From 43c144b7c8e18a649e46bc96774f3a8a8c7e0621 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 19 Jan 2022 10:46:15 +0100 Subject: [PATCH 01/12] Add timeout for agentctl Signed-off-by: Ondrej Fabry --- cmd/agentctl/cli/cli.go | 1 + cmd/agentctl/cli/config.go | 1 + cmd/agentctl/cli/flags.go | 4 +++- cmd/agentctl/client/client.go | 27 ++++++++++++++++----------- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/cmd/agentctl/cli/cli.go b/cmd/agentctl/cli/cli.go index 137f01c4a4..36ff8b20e2 100644 --- a/cmd/agentctl/cli/cli.go +++ b/cmd/agentctl/cli/cli.go @@ -177,6 +177,7 @@ func (cli *AgentCli) Initialize(opts *ClientOptions, ops ...InitializeOpt) error func buildClientOptions(cfg *Config) []client.Opt { clientOpts := []client.Opt{ client.WithHost(cfg.Host), + client.WithTimeout(cfg.Timeout), client.WithServiceLabel(cfg.ServiceLabel), client.WithGrpcPort(cfg.GRPCPort), client.WithHTTPPort(cfg.HTTPPort), diff --git a/cmd/agentctl/cli/config.go b/cmd/agentctl/cli/config.go index c8b314af5d..a395e0af39 100644 --- a/cmd/agentctl/cli/config.go +++ b/cmd/agentctl/cli/config.go @@ -40,6 +40,7 @@ type Config struct { GRPCPort int `json:"grpc-port"` HTTPPort int `json:"http-port"` HTTPBasicAuth string `json:"http-basic-auth"` + Timeout time.Duration `json:"timeout"` EtcdEndpoints []string `json:"etcd-endpoints"` EtcdDialTimeout time.Duration `json:"etcd-dial-timeout"` InsecureTLS bool `json:"insecure-tls"` diff --git a/cmd/agentctl/cli/flags.go b/cmd/agentctl/cli/flags.go index a50a382e43..c081364893 100644 --- a/cmd/agentctl/cli/flags.go +++ b/cmd/agentctl/cli/flags.go @@ -61,6 +61,8 @@ func (opts *ClientOptions) InstallFlags(flags *pflag.FlagSet) { flags.Int("http-port", client.DefaultPortHTTP, "HTTP server port") _ = viper.BindPFlag("http-port", flags.Lookup("http-port")) + flags.Duration("timeout", client.DefaultTimeout, "Timeout for client requests") + flags.Int("grpc-port", client.DefaultPortGRPC, "gRPC server port") _ = viper.BindPFlag("grpc-port", flags.Lookup("grpc-port")) @@ -98,5 +100,5 @@ func SetLogLevel(logLevel string) { os.Exit(1) } logrus.SetLevel(lvl) - logging.DefaultLogger.SetLevel(logging.ParseLogLevel(logLevel)) + logging.DefaultLogger.SetLevel(logging.LogLevel(lvl)) } diff --git a/cmd/agentctl/client/client.go b/cmd/agentctl/client/client.go index c8b3a27812..a1f99fee75 100644 --- a/cmd/agentctl/client/client.go +++ b/cmd/agentctl/client/client.go @@ -27,8 +27,8 @@ import ( "time" "git.fd.io/govpp.git/proxy" - "github.com/coreos/etcd/clientv3" "github.com/docker/docker/api/types/versions" + "go.etcd.io/etcd/clientv3" "go.ligato.io/cn-infra/v2/db/keyval" "go.ligato.io/cn-infra/v2/db/keyval/etcd" "go.ligato.io/cn-infra/v2/logging" @@ -56,10 +56,12 @@ const ( // Constants for etcd connection. const ( - // defaultEtcdOpTimeout defines default dial timeout. - defaultEtcdDialTimeout = time.Second * 3 - // defaultEtcdOpTimeout defines default timeout for a pending operation. - defaultEtcdOpTimeout = time.Second * 10 + // DefaultTimeout defines default timeout for client HTTP requests. + DefaultTimeout = time.Second * 120 + // DefaultEtcdDialTimeout defines default timeout for dialing Etcd. + DefaultEtcdDialTimeout = time.Second * 3 + // DefaultEtcdOpTimeout defines default timeout for a pending Etcd operation. + DefaultEtcdOpTimeout = time.Second * 10 ) var _ APIClient = (*Client)(nil) @@ -186,9 +188,9 @@ func (c *Client) HTTPClient() *http.Client { if c.httpClient == nil { tr := cloneHTTPTransport() tr.TLSClientConfig = c.httpTLS - c.httpClient = &http.Client{ Transport: tr, + Timeout: DefaultTimeout, } } return c.httpClient @@ -198,11 +200,11 @@ func (c *Client) HTTPClient() *http.Client { // GoVPP proxy from vpp-agent func (c *Client) GoVPPProxyClient() (*proxy.Client, error) { if c.govppProxyClient == nil { - client, err := proxy.Connect(c.httpAddr) + cc, err := proxy.Connect(c.httpAddr) if err != nil { return nil, fmt.Errorf("connecting to proxy failed due to: %v", err) } - c.govppProxyClient = client + c.govppProxyClient = cc } return c.govppProxyClient, nil } @@ -310,17 +312,20 @@ func connectEtcd(endpoints []string, dialTimeout time.Duration, tc *tls.Config) } else { log.SetLevel(logging.WarnLevel) } - dt := defaultEtcdDialTimeout - if dialTimeout != 0 { + dt := DefaultEtcdDialTimeout + if dialTimeout > 0 { dt = dialTimeout } + ctx, cancel := context.WithTimeout(context.Background(), dt) + defer cancel() cfg := etcd.ClientConfig{ Config: &clientv3.Config{ Endpoints: endpoints, DialTimeout: dt, TLS: tc, + Context: ctx, }, - OpTimeout: defaultEtcdOpTimeout, + OpTimeout: DefaultEtcdOpTimeout, } kvdb, err := etcd.NewEtcdConnectionWithBytes(cfg, log) if err != nil { From 05e21334cc432b7fcea57358c6f0317083431cd0 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 19 Jan 2022 10:47:47 +0100 Subject: [PATCH 02/12] Migrate fully to proto v2 Signed-off-by: Ondrej Fabry --- client/client_api.go | 3 +- client/dynamic_config.go | 11 +- client/dynamic_config_test.go | 17 +- client/local_client.go | 22 +- client/remoteclient/grpc_client.go | 37 +- client/txn.go | 3 +- cmd/agentctl/client/model.go | 4 +- cmd/agentctl/client/scheduler.go | 19 +- cmd/agentctl/commands/config.go | 16 +- cmd/agentctl/commands/dump.go | 3 +- cmd/agentctl/commands/generate.go | 61 +- cmd/agentctl/commands/import.go | 16 +- cmd/agentctl/commands/proto.go | 30 + examples/customize/custom_api_model/main.go | 11 +- .../custom_api_model/proto/custom/model.pb.go | 183 +++-- .../custom_api_model/proto/custom/model.proto | 2 + .../proto/custom/vpp/syslog/syslog.pb.go | 199 ++++-- .../syslog/descriptor/adapter/syslogsender.go | 2 +- .../syslog/descriptor/sender.go | 2 +- examples/grpc_vpp/remote_client/main.go | 7 +- .../ifplugin/descriptor/adapter/interface.go | 2 +- .../ifplugin/model/interface.pb.go | 270 +++++--- .../ifplugin/model/interface.proto | 2 + .../descriptor/adapter/bdinterface.go | 2 +- .../descriptor/adapter/bridgedomain.go | 2 +- .../l2plugin/descriptor/adapter/fib.go | 2 +- .../l2plugin/descriptor/bd_interface.go | 4 +- .../l2plugin/mockcalls/fib_mockcalls.go | 3 +- .../l2plugin/model/bridge-domain.pb.go | 277 +++++--- .../l2plugin/model/bridge-domain.proto | 2 + .../mock_plugins/l2plugin/model/fib.pb.go | 269 +++++--- .../mock_plugins/l2plugin/model/fib.proto | 2 + .../descriptor/adapter/skeleton.go | 2 +- .../with_metadata/model/model.pb.go | 171 +++-- .../with_metadata/model/model.proto | 2 + .../descriptor/adapter/skeleton.go | 2 +- .../without_metadata/model/model.pb.go | 171 +++-- .../without_metadata/model/model.proto | 2 + examples/kvscheduler/vrf/main.go | 2 +- .../05_kv-scheduler/adapter/interface.go | 2 +- .../05_kv-scheduler/adapter/route.go | 2 +- .../tutorials/05_kv-scheduler/descriptors.go | 6 +- .../05_kv-scheduler/model/model.pb.go | 257 ++++--- .../05_kv-scheduler/model/model.proto | 2 + go.mod | 44 +- go.sum | 643 ++++++++++++++---- pkg/models/api.go | 7 +- pkg/models/item.go | 27 +- pkg/models/item_test.go | 11 +- pkg/models/model.go | 5 +- pkg/models/models.go | 31 +- pkg/models/option.go | 12 +- pkg/models/registry.go | 6 +- pkg/models/registry_test.go | 4 +- pkg/models/remote_model.go | 31 +- pkg/models/remote_registry.go | 11 +- pkg/models/testdata/gen.go | 2 +- pkg/models/testdata/proto/simple.pb.go | 387 +++++++---- pkg/models/testdata/proto/simple.proto | 2 + pkg/models/testdata/proto/withoption.pb.go | 187 +++-- pkg/models/testdata/proto/withoption.proto | 2 + pkg/util/proto.go | 8 +- plugins/configurator/configurator.go | 2 +- plugins/configurator/notify.go | 2 +- plugins/kvscheduler/api/errors.go | 2 +- plugins/kvscheduler/api/kv_descriptor_api.go | 2 +- plugins/kvscheduler/api/kv_scheduler_api.go | 2 +- plugins/kvscheduler/datachange_test.go | 20 +- .../descriptor-adapter/template.go | 2 +- plugins/kvscheduler/descriptor_handler.go | 2 +- plugins/kvscheduler/graph.go | 4 +- .../kvscheduler/internal/graph/graph_api.go | 2 +- .../kvscheduler/internal/graph/graph_test.go | 2 +- .../kvscheduler/internal/graph/node_read.go | 2 +- .../kvscheduler/internal/graph/node_write.go | 3 +- .../kvscheduler/internal/test/descriptor.go | 2 +- .../internal/test/model/values.pb.go | 258 ++++--- .../internal/test/model/values.proto | 2 + .../kvscheduler/internal/test/southbound.go | 2 +- plugins/kvscheduler/internal/test/values.go | 2 +- .../kvscheduler/internal/utils/conversions.go | 9 +- plugins/kvscheduler/internal/utils/record.go | 46 +- plugins/kvscheduler/node_utils.go | 3 +- plugins/kvscheduler/notification_test.go | 12 +- plugins/kvscheduler/plugin_scheduler.go | 2 +- plugins/kvscheduler/refresh.go | 4 +- plugins/kvscheduler/resync_test.go | 17 +- plugins/kvscheduler/txn_exec.go | 4 +- plugins/kvscheduler/txn_process.go | 2 +- plugins/kvscheduler/utils_for_test.go | 14 +- plugins/kvscheduler/validation.go | 5 +- plugins/kvscheduler/value_flags.go | 2 +- .../ifplugin/descriptor/adapter/interface.go | 2 +- .../descriptor/adapter/interfaceaddress.go | 2 +- .../descriptor/adapter/interfacevrf.go | 2 +- .../linux/ifplugin/descriptor/interface.go | 6 +- .../ifplugin/descriptor/interface_vrf.go | 2 +- plugins/linux/ifplugin/descriptor/watcher.go | 18 +- plugins/linux/ifplugin/ifaceidx/ifaceidx.go | 2 +- .../linuxcalls/dump_interface_linuxcalls.go | 2 +- .../descriptor/adapter/rulechain.go | 2 +- .../iptablesplugin/descriptor/rulechain.go | 3 +- .../linux/l3plugin/descriptor/adapter/arp.go | 2 +- .../l3plugin/descriptor/adapter/route.go | 2 +- plugins/linux/l3plugin/descriptor/route.go | 6 +- .../linux/nsplugin/descriptor/microservice.go | 6 +- .../netalloc/descriptor/adapter/ipalloc.go | 2 +- plugins/netalloc/descriptor/ip_alloc.go | 4 +- plugins/orchestrator/dispatcher.go | 6 +- .../localregistry/initfileregistry.go | 10 +- plugins/orchestrator/meta_service.go | 27 +- plugins/orchestrator/orchestrator.go | 7 +- plugins/orchestrator/store.go | 2 +- plugins/restapi/handlers.go | 64 +- .../restapi/jsonschema/converter/converter.go | 30 +- .../jsonschema/converter/proto_package.go | 22 +- .../jsonschema/converter/sourcecodeinfo.go | 30 +- plugins/restapi/jsonschema/converter/types.go | 99 +-- plugins/telemetry/stats_poller.go | 2 +- plugins/vpp/abfplugin/descriptor/abf.go | 4 +- .../abfplugin/descriptor/abf_to_interface.go | 2 +- .../vpp/abfplugin/descriptor/adapter/abf.go | 2 +- plugins/vpp/aclplugin/descriptor/acl.go | 8 +- .../aclplugin/descriptor/acl_to_interface.go | 2 +- .../vpp/aclplugin/descriptor/adapter/acl.go | 2 +- .../dnsplugin/descriptor/adapter/dnscache.go | 2 +- .../descriptor/adapter/bondedinterface.go | 2 +- .../ifplugin/descriptor/adapter/interface.go | 2 +- .../vpp/ifplugin/descriptor/adapter/ip6nd.go | 2 +- .../vpp/ifplugin/descriptor/adapter/rxmode.go | 2 +- .../descriptor/adapter/rxplacement.go | 2 +- .../vpp/ifplugin/descriptor/adapter/span.go | 2 +- .../ifplugin/descriptor/adapter/unnumbered.go | 2 +- .../ifplugin/descriptor/bonded_interface.go | 4 +- plugins/vpp/ifplugin/descriptor/dhcp.go | 8 +- plugins/vpp/ifplugin/descriptor/interface.go | 34 +- .../ifplugin/descriptor/interface_address.go | 2 +- .../vpp/ifplugin/descriptor/interface_vrf.go | 2 +- .../descriptor/interface_with_address.go | 2 +- plugins/vpp/ifplugin/descriptor/link_state.go | 6 +- plugins/vpp/ifplugin/descriptor/rx_mode.go | 4 +- .../vpp/ifplugin/descriptor/rx_placement.go | 4 +- plugins/vpp/ifplugin/descriptor/unnumbered.go | 4 +- .../descriptor/adapter/flowprobefeature.go | 2 +- .../descriptor/adapter/flowprobeparams.go | 2 +- .../ipfixplugin/descriptor/adapter/ipfix.go | 2 +- .../vpp/ipsecplugin/descriptor/adapter/sa.go | 2 +- .../vpp/ipsecplugin/descriptor/adapter/sp.go | 2 +- .../vpp/ipsecplugin/descriptor/adapter/spd.go | 2 +- .../descriptor/adapter/spdinterface.go | 2 +- .../descriptor/adapter/tunprotect.go | 2 +- .../ipsecplugin/descriptor/spd_interface.go | 4 +- .../descriptor/adapter/bdinterface.go | 2 +- .../descriptor/adapter/bridgedomain.go | 2 +- .../vpp/l2plugin/descriptor/adapter/fib.go | 2 +- .../l2plugin/descriptor/adapter/xconnect.go | 2 +- .../vpp/l2plugin/descriptor/bd_interface.go | 4 +- .../l3plugin/descriptor/adapter/arpentry.go | 2 +- .../l3plugin/descriptor/adapter/dhcpproxy.go | 2 +- .../descriptor/adapter/ipscanneighbor.go | 2 +- .../vpp/l3plugin/descriptor/adapter/l3xc.go | 2 +- .../l3plugin/descriptor/adapter/proxyarp.go | 2 +- .../descriptor/adapter/proxyarpinterface.go | 2 +- .../vpp/l3plugin/descriptor/adapter/route.go | 2 +- .../l3plugin/descriptor/adapter/teibentry.go | 2 +- .../l3plugin/descriptor/adapter/vrftable.go | 2 +- .../l3plugin/descriptor/adapter/vrrpentry.go | 2 +- plugins/vpp/l3plugin/descriptor/arp_entry.go | 2 +- .../l3plugin/descriptor/ip_scan_neighbor.go | 2 +- plugins/vpp/l3plugin/descriptor/l3xc.go | 2 +- .../descriptor/proxy_arp_interface.go | 4 +- plugins/vpp/l3plugin/descriptor/route.go | 2 +- plugins/vpp/l3plugin/descriptor/vrf_table.go | 2 +- plugins/vpp/l3plugin/descriptor/vrrp.go | 3 +- .../natplugin/descriptor/adapter/dnat44.go | 2 +- .../descriptor/adapter/nat44addresspool.go | 2 +- .../descriptor/adapter/nat44global.go | 2 +- .../descriptor/adapter/nat44globaladdress.go | 2 +- .../adapter/nat44globalinterface.go | 2 +- .../descriptor/adapter/nat44interface.go | 2 +- .../vpp/natplugin/descriptor/nat44_dnat.go | 3 +- .../vpp/natplugin/descriptor/nat44_global.go | 4 +- .../descriptor/nat44_global_address.go | 4 +- .../descriptor/nat44_global_interface.go | 4 +- .../vppcalls/vpp2005/dump_nat_vppcalls.go | 2 +- .../vppcalls/vpp2009/dump_nat_vppcalls.go | 2 +- .../vppcalls/vpp2101/dump_nat_vppcalls.go | 2 +- .../vppcalls/vpp2106/dump_nat_vppcalls.go | 2 +- .../descriptor/adapter/ippuntredirect.go | 2 +- .../descriptor/adapter/puntexception.go | 2 +- .../descriptor/adapter/punttohost.go | 2 +- .../puntplugin/descriptor/ip_punt_redirect.go | 2 +- .../srplugin/descriptor/adapter/localsid.go | 2 +- .../vpp/srplugin/descriptor/adapter/policy.go | 2 +- .../srplugin/descriptor/adapter/srv6global.go | 2 +- .../srplugin/descriptor/adapter/steering.go | 2 +- plugins/vpp/srplugin/descriptor/policy.go | 6 +- .../vpp/srplugin/descriptor/srv6_global.go | 2 +- .../vpp/stnplugin/descriptor/adapter/stn.go | 2 +- plugins/vpp/stnplugin/descriptor/stn.go | 2 +- .../descriptor/adapter/peer.go | 2 +- .../vpp/wireguardplugin/descriptor/peer.go | 46 +- proto/ligato/annotations.pb.go | 23 +- proto/ligato/configurator/configurator.pb.go | 9 +- proto/ligato/configurator/statspoller.pb.go | 9 +- proto/ligato/generic/manager.pb.go | 17 +- proto/ligato/generic/meta.pb.go | 33 +- proto/ligato/generic/model.pb.go | 9 +- proto/ligato/generic/options.pb.go | 19 +- proto/ligato/govppmux/metrics.pb.go | 9 +- proto/ligato/kvscheduler/value_status.go | 6 +- proto/ligato/kvscheduler/value_status.pb.go | 9 +- proto/ligato/linux/interfaces/interface.pb.go | 9 +- proto/ligato/linux/interfaces/models.go | 8 +- proto/ligato/linux/interfaces/state.pb.go | 9 +- proto/ligato/linux/iptables/iptables.pb.go | 9 +- proto/ligato/linux/l3/arp.pb.go | 9 +- proto/ligato/linux/l3/route.pb.go | 9 +- proto/ligato/linux/linux.pb.go | 9 +- proto/ligato/linux/namespace/namespace.pb.go | 9 +- proto/ligato/linux/punt/punt.pb.go | 9 +- proto/ligato/netalloc/netalloc.pb.go | 9 +- proto/ligato/vpp/abf/abf.pb.go | 9 +- proto/ligato/vpp/acl/acl.pb.go | 9 +- proto/ligato/vpp/dns/dns.pb.go | 9 +- proto/ligato/vpp/interfaces/dhcp.pb.go | 9 +- proto/ligato/vpp/interfaces/interface.pb.go | 19 +- proto/ligato/vpp/interfaces/models.go | 4 +- proto/ligato/vpp/interfaces/span.pb.go | 9 +- proto/ligato/vpp/interfaces/state.pb.go | 9 +- proto/ligato/vpp/ipfix/flowprobe.pb.go | 9 +- proto/ligato/vpp/ipfix/ipfix.pb.go | 9 +- proto/ligato/vpp/ipsec/ipsec.pb.go | 9 +- proto/ligato/vpp/l2/bridge_domain.pb.go | 9 +- proto/ligato/vpp/l2/fib.pb.go | 9 +- proto/ligato/vpp/l2/xconnect.pb.go | 9 +- proto/ligato/vpp/l3/arp.pb.go | 9 +- proto/ligato/vpp/l3/l3.pb.go | 9 +- proto/ligato/vpp/l3/l3xc.pb.go | 9 +- proto/ligato/vpp/l3/route.pb.go | 9 +- proto/ligato/vpp/l3/teib.pb.go | 9 +- proto/ligato/vpp/l3/vrf.pb.go | 9 +- proto/ligato/vpp/l3/vrrp.pb.go | 9 +- proto/ligato/vpp/nat/nat.pb.go | 9 +- proto/ligato/vpp/punt/punt.pb.go | 9 +- proto/ligato/vpp/srv6/srv6.pb.go | 9 +- proto/ligato/vpp/stn/stn.pb.go | 9 +- proto/ligato/vpp/vpp.pb.go | 9 +- proto/ligato/vpp/wireguard/wireguard.pb.go | 9 +- scripts/make/buf.make | 6 +- 250 files changed, 3154 insertions(+), 1939 deletions(-) create mode 100644 cmd/agentctl/commands/proto.go diff --git a/client/client_api.go b/client/client_api.go index ee020bd431..6e33176a4b 100644 --- a/client/client_api.go +++ b/client/client_api.go @@ -17,7 +17,8 @@ package client import ( "context" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" + "go.ligato.io/vpp-agent/v3/pkg/models" "go.ligato.io/vpp-agent/v3/proto/ligato/generic" ) diff --git a/client/dynamic_config.go b/client/dynamic_config.go index b2c2c9317b..ce01082216 100644 --- a/client/dynamic_config.go +++ b/client/dynamic_config.go @@ -7,9 +7,6 @@ import ( "github.com/go-errors/errors" "github.com/goccy/go-yaml" "go.ligato.io/cn-infra/v2/logging/logrus" - "go.ligato.io/vpp-agent/v3/pkg/models" - "go.ligato.io/vpp-agent/v3/pkg/util" - "go.ligato.io/vpp-agent/v3/proto/ligato/generic" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" @@ -17,6 +14,10 @@ import ( "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/dynamicpb" + + "go.ligato.io/vpp-agent/v3/pkg/models" + "go.ligato.io/vpp-agent/v3/pkg/util" + "go.ligato.io/vpp-agent/v3/proto/ligato/generic" ) // field proto name/json name constants (can't be changes to not break json/yaml compatibility with configurator.Config) @@ -200,7 +201,7 @@ func createDynamicConfigDescriptorProto(knownModels []*ModelInfo, dependencyRegi TypeName: proto.String(fmt.Sprintf(".%v", modelDetail.ProtoName)), }) - //add proto file dependency for this known model (+ check that it is in dependency file descriptor registry) + // add proto file dependency for this known model (+ check that it is in dependency file descriptor registry) protoFile, err := ModelOptionFor("protoFile", modelDetail.Options) if err != nil { error = errors.Errorf("can't retrieve protoFile from model options "+ @@ -210,7 +211,7 @@ func createDynamicConfigDescriptorProto(knownModels []*ModelInfo, dependencyRegi if _, found := importedDependency[protoFile]; !found { importedDependency[protoFile] = struct{}{} - //add proto file dependency for this known model + // add proto file dependency for this known model fileDP.Dependency = append(fileDP.Dependency, protoFile) // checking dependency registry that should already contain the linked dependency diff --git a/client/dynamic_config_test.go b/client/dynamic_config_test.go index 525adc0694..70f41750fe 100644 --- a/client/dynamic_config_test.go +++ b/client/dynamic_config_test.go @@ -19,21 +19,20 @@ import ( "encoding/json" "testing" - testmodel "go.ligato.io/vpp-agent/v3/pkg/models/testdata/proto" - yaml2 "github.com/ghodss/yaml" "github.com/go-errors/errors" "github.com/goccy/go-yaml" - protoV1 "github.com/golang/protobuf/proto" . "github.com/onsi/gomega" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "go.ligato.io/vpp-agent/v3/client" "go.ligato.io/vpp-agent/v3/pkg/models" + testmodel "go.ligato.io/vpp-agent/v3/pkg/models/testdata/proto" "go.ligato.io/vpp-agent/v3/proto/ligato/configurator" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp" interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" vpp_srv6 "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/srv6" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" ) // TestYamlCompatibility test dynamically generated all-in-one configuration proto message to be compatible @@ -60,8 +59,8 @@ func TestYamlCompatibility(t *testing.T) { for _, model := range models.RegisteredModels() { if model.Spec().Class == "config" { knownModels = append(knownModels, &models.ModelInfo{ - ModelDetail: *model.ModelDetail(), - MessageDescriptor: protoV1.MessageV2(model.NewInstance()).ProtoReflect().Descriptor(), + ModelDetail: model.ModelDetail(), + MessageDescriptor: model.NewInstance().ProtoReflect().Descriptor(), }) } } @@ -107,8 +106,8 @@ func TestDynamicConfigWithThirdPartyModel(t *testing.T) { for _, model := range models.RegisteredModels() { if model.Spec().Class == "config" && model.Spec().Module == "model" { knownModels = append(knownModels, &models.ModelInfo{ - ModelDetail: *model.ModelDetail(), - MessageDescriptor: protoV1.MessageV2(model.NewInstance()).ProtoReflect().Descriptor(), + ModelDetail: model.ModelDetail(), + MessageDescriptor: model.NewInstance().ProtoReflect().Descriptor(), }) } } diff --git a/client/local_client.go b/client/local_client.go index dd60bc3d62..538c4a5edb 100644 --- a/client/local_client.go +++ b/client/local_client.go @@ -17,16 +17,16 @@ package client import ( "context" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/datasync/kvdbsync/local" "go.ligato.io/cn-infra/v2/datasync/syncbase" "go.ligato.io/cn-infra/v2/db/keyval" + "google.golang.org/protobuf/proto" + "go.ligato.io/vpp-agent/v3/pkg/models" "go.ligato.io/vpp-agent/v3/pkg/util" "go.ligato.io/vpp-agent/v3/plugins/orchestrator" "go.ligato.io/vpp-agent/v3/plugins/orchestrator/contextdecorator" "go.ligato.io/vpp-agent/v3/proto/ligato/generic" - protoV2 "google.golang.org/protobuf/proto" ) // LocalClient is global client for direct local access. @@ -53,8 +53,8 @@ func (c *client) KnownModels(class string) ([]*ModelInfo, error) { for _, model := range models.RegisteredModels() { if class == "" || model.Spec().Class == class { modules = append(modules, &models.ModelInfo{ - ModelDetail: *model.ModelDetail(), - MessageDescriptor: proto.MessageV2(model.NewInstance()).ProtoReflect().Descriptor(), + ModelDetail: model.ModelDetail(), + MessageDescriptor: model.NewInstance().ProtoReflect().Descriptor(), }) } } @@ -162,14 +162,14 @@ func (p *txnFactory) NewTxn(resync bool) keyval.ProtoTxn { return local.NewProtoTxn(p.registry.PropagateChanges) } -func extractProtoMessages(dsts []interface{}) []protoV2.Message { - protoDsts := make([]protoV2.Message, 0) +func extractProtoMessages(dsts []interface{}) []proto.Message { + protoDsts := make([]proto.Message, 0) for _, dst := range dsts { protoV1Dst, isProtoV1 := dst.(proto.Message) if isProtoV1 { - protoDsts = append(protoDsts, proto.MessageV2(protoV1Dst)) + protoDsts = append(protoDsts, protoV1Dst) } else { - protoV2Dst, isProtoV2 := dst.(protoV2.Message) + protoV2Dst, isProtoV2 := dst.(proto.Message) if isProtoV2 { protoDsts = append(protoDsts, protoV2Dst) } else { @@ -180,10 +180,10 @@ func extractProtoMessages(dsts []interface{}) []protoV2.Message { return protoDsts } -func convertToProtoV2(protoMap map[string]proto.Message) []protoV2.Message { - result := make([]protoV2.Message, 0, len(protoMap)) +func convertToProtoV2(protoMap map[string]proto.Message) []proto.Message { + result := make([]proto.Message, 0, len(protoMap)) for _, msg := range protoMap { - result = append(result, proto.MessageV2(msg)) + result = append(result, msg) } return result } diff --git a/client/remoteclient/grpc_client.go b/client/remoteclient/grpc_client.go index 6e6ba03759..862ab48c2e 100644 --- a/client/remoteclient/grpc_client.go +++ b/client/remoteclient/grpc_client.go @@ -5,18 +5,17 @@ import ( "strings" "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/descriptor" - "go.ligato.io/vpp-agent/v3/client" - "go.ligato.io/vpp-agent/v3/pkg/models" - "go.ligato.io/vpp-agent/v3/pkg/util" - "go.ligato.io/vpp-agent/v3/proto/ligato/generic" "google.golang.org/grpc" - protoV2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/descriptorpb" + + "go.ligato.io/vpp-agent/v3/client" + "go.ligato.io/vpp-agent/v3/pkg/models" + "go.ligato.io/vpp-agent/v3/pkg/util" + "go.ligato.io/vpp-agent/v3/proto/ligato/generic" ) type grpcClient struct { @@ -31,17 +30,17 @@ type NewClientOption = func(client.GenericClient) error func NewClientGRPC(conn grpc.ClientConnInterface, options ...NewClientOption) (client.ConfigClient, error) { manager := generic.NewManagerServiceClient(conn) meta := generic.NewMetaServiceClient(conn) - client := &grpcClient{ + c := &grpcClient{ manager: manager, meta: meta, modelRegistry: models.DefaultRegistry, } for _, option := range options { - if err := option(client); err != nil { + if err := option(c); err != nil { return nil, errors.Errorf("can't apply option to newly created GRPC client due to: %v", err) } } - return client, nil + return c, nil } func (c *grpcClient) KnownModels(class string) ([]*client.ModelInfo, error) { @@ -68,7 +67,7 @@ func (c *grpcClient) KnownModels(class string) ([]*client.ModelInfo, error) { } // query meta service for extracted proto files to get their file descriptor protos - fileDescProtos := make(map[string]*descriptor.FileDescriptorProto) // deduplicaton + data container + fileDescProtos := make(map[string]*descriptorpb.FileDescriptorProto) // deduplicaton + data container for protoFilePath, _ := range protoFilePaths { ctx := context.Background() resp, err := c.meta.ProtoFileDescriptor(ctx, &generic.ProtoFileDescriptorRequest{ @@ -118,7 +117,7 @@ func (c *grpcClient) KnownModels(class string) ([]*client.ModelInfo, error) { var result []*models.ModelInfo for _, info := range knownModels { result = append(result, &models.ModelInfo{ - ModelDetail: *info, + ModelDetail: info, MessageDescriptor: messageDescriptors[info.ProtoName], }) } @@ -344,14 +343,14 @@ func fileDescriptorProtoMapToString(fdps map[string]*descriptorpb.FileDescriptor return strings.Join(keys, ",") } -func extractProtoMessages(dsts []interface{}) []protoV2.Message { - protoDsts := make([]protoV2.Message, 0) +func extractProtoMessages(dsts []interface{}) []proto.Message { + protoDsts := make([]proto.Message, 0) for _, dst := range dsts { protoV1Dst, isProtoV1 := dst.(proto.Message) if isProtoV1 { - protoDsts = append(protoDsts, proto.MessageV2(protoV1Dst)) + protoDsts = append(protoDsts, proto.Message(protoV1Dst)) } else { - protoV2Dst, isProtoV2 := dst.(protoV2.Message) + protoV2Dst, isProtoV2 := dst.(proto.Message) if isProtoV2 { protoDsts = append(protoDsts, protoV2Dst) } else { @@ -362,10 +361,10 @@ func extractProtoMessages(dsts []interface{}) []protoV2.Message { return protoDsts } -func convertToProtoV2(protoMap map[string]proto.Message) []protoV2.Message { - result := make([]protoV2.Message, 0, len(protoMap)) +func convertToProtoV2(protoMap map[string]proto.Message) []proto.Message { + result := make([]proto.Message, 0, len(protoMap)) for _, msg := range protoMap { - result = append(result, proto.MessageV2(msg)) + result = append(result, proto.Message(msg)) } return result } diff --git a/client/txn.go b/client/txn.go index 74e4d403b3..c05152bc4f 100644 --- a/client/txn.go +++ b/client/txn.go @@ -17,7 +17,8 @@ package client import ( "context" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" + "go.ligato.io/vpp-agent/v3/pkg/models" ) diff --git a/cmd/agentctl/client/model.go b/cmd/agentctl/client/model.go index b2d08c7c40..64e6145e58 100644 --- a/cmd/agentctl/client/model.go +++ b/cmd/agentctl/client/model.go @@ -4,8 +4,8 @@ import ( "context" "sort" - "github.com/golang/protobuf/proto" "github.com/sirupsen/logrus" + "google.golang.org/protobuf/encoding/prototext" "go.ligato.io/vpp-agent/v3/cmd/agentctl/api/types" "go.ligato.io/vpp-agent/v3/pkg/debug" @@ -24,7 +24,7 @@ func (c *Client) ModelList(ctx context.Context, opts types.ModelListOptions) ([] logrus.Debugf("retrieved %d known models", len(knownModels)) if debug.IsEnabledFor("models") { for _, m := range knownModels { - logrus.Trace(" - ", proto.CompactTextString(m)) + logrus.Trace(" - ", prototext.Format(m)) } } allModels := convertModels(knownModels) diff --git a/cmd/agentctl/client/scheduler.go b/cmd/agentctl/client/scheduler.go index 7ebcfa37a4..f62b8a2b98 100644 --- a/cmd/agentctl/client/scheduler.go +++ b/cmd/agentctl/client/scheduler.go @@ -5,10 +5,11 @@ import ( "encoding/json" "fmt" "net/url" - "reflect" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" "go.ligato.io/vpp-agent/v3/cmd/agentctl/api/types" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" @@ -42,16 +43,16 @@ func (c *Client) SchedulerDump(ctx context.Context, opts types.SchedulerDumpOpti if kvd.Value.ProtoMsgName == "" { return nil, fmt.Errorf("empty proto message name for key %s", d.Key) } - valueType := proto.MessageType(kvd.Value.ProtoMsgName) - if valueType == nil { - return nil, fmt.Errorf("unknown proto message defined for key %s", d.Key) + valueType, err := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(kvd.Value.ProtoMsgName)) + if err != nil { + return nil, fmt.Errorf("proto message defined for key %s error: %v", d.Key, err) } - d.Value = reflect.New(valueType.Elem()).Interface().(proto.Message) + d.Value = valueType.New().Interface() if len(kvd.Value.ProtoMsgData) > 0 && kvd.Value.ProtoMsgData[0] == '{' { - err = jsonpb.UnmarshalString(kvd.Value.ProtoMsgData, d.Value) + err = protojson.Unmarshal([]byte(kvd.Value.ProtoMsgData), d.Value) } else { - err = proto.UnmarshalText(kvd.Value.ProtoMsgData, d.Value) + err = prototext.Unmarshal([]byte(kvd.Value.ProtoMsgData), d.Value) } if err != nil { return nil, fmt.Errorf("decoding dump reply for %v failed: %v", valueType, err) diff --git a/cmd/agentctl/commands/config.go b/cmd/agentctl/commands/config.go index 405c4eb556..01bb814bd1 100644 --- a/cmd/agentctl/commands/config.go +++ b/cmd/agentctl/commands/config.go @@ -25,20 +25,22 @@ import ( "time" yaml2 "github.com/ghodss/yaml" - "github.com/golang/protobuf/proto" "github.com/olekukonko/tablewriter" "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + + //protoV2 "google.golang.org/protobuf/proto" + "go.ligato.io/vpp-agent/v3/client" "go.ligato.io/vpp-agent/v3/cmd/agentctl/api/types" agentcli "go.ligato.io/vpp-agent/v3/cmd/agentctl/cli" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/configurator" "go.ligato.io/vpp-agent/v3/proto/ligato/kvscheduler" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "google.golang.org/protobuf/encoding/protojson" - protoV2 "google.golang.org/protobuf/proto" ) func NewConfigCommand(cli agentcli.Cli) *cobra.Command { @@ -318,10 +320,10 @@ func runConfigDelete(cli agentcli.Cli, opts ConfigDeleteOptions, args []string) return nil } -func convertToProtoV1(messages []protoV2.Message) []proto.Message { +func convertToProtoV1(messages []proto.Message) []proto.Message { result := make([]proto.Message, 0, len(messages)) for _, message := range messages { - result = append(result, proto.MessageV1(message.ProtoReflect().Interface())) + result = append(result, message) } return result } diff --git a/cmd/agentctl/commands/dump.go b/cmd/agentctl/commands/dump.go index 8625ee9e79..ab056c454b 100644 --- a/cmd/agentctl/commands/dump.go +++ b/cmd/agentctl/commands/dump.go @@ -21,7 +21,6 @@ import ( "sort" "strings" - "github.com/golang/protobuf/proto" "github.com/olekukonko/tablewriter" "github.com/spf13/cobra" "go.ligato.io/cn-infra/v2/logging" @@ -212,7 +211,7 @@ func printDumpTable(out io.Writer, dump []api.KVWithMetadata) { name = d.Key } } - val = fmt.Sprintf("# %s\n%s", proto.MessageName(d.Value), val) + val = fmt.Sprintf("# %s\n%s", d.Value.ProtoReflect().Descriptor().FullName(), val) var row []string row = []string{ model, diff --git a/cmd/agentctl/commands/generate.go b/cmd/agentctl/commands/generate.go index 942df558b0..ad2d622e8b 100644 --- a/cmd/agentctl/commands/generate.go +++ b/cmd/agentctl/commands/generate.go @@ -17,19 +17,20 @@ package commands import ( "context" "fmt" - "reflect" "strings" "github.com/ghodss/yaml" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/encoding/prototext" "go.ligato.io/vpp-agent/v3/cmd/agentctl/api/types" agentcli "go.ligato.io/vpp-agent/v3/cmd/agentctl/cli" ) +const defaultIndent = " " + func NewGenerateCommand(cli agentcli.Cli) *cobra.Command { var ( opts GenerateOptions @@ -78,53 +79,65 @@ func runGenerate(cli agentcli.Cli, opts GenerateOptions) error { logrus.Debugf("models: %+v", modelList) model := modelList[0] - valueType := proto.MessageType(model.ProtoName) + valueType := protoMessageType(model.ProtoName) if valueType == nil { return fmt.Errorf("unknown proto message defined for: %s", model.ProtoName) } - modelInstance := reflect.New(valueType.Elem()).Interface().(proto.Message) + modelInstance := valueType.New().Interface() var out string switch strings.ToLower(opts.Format) { case "j", "json": - m := jsonpb.Marshaler{ - EnumsAsInts: false, - EmitDefaults: true, - Indent: " ", - OrigName: true, - AnyResolver: nil, + m := protojson.MarshalOptions{ + UseEnumNumbers: false, + EmitUnpopulated: true, + AllowPartial: true, + Indent: defaultIndent, + UseProtoNames: true, + Resolver: nil, } if opts.OneLine { m.Indent = "" } - out, err = m.MarshalToString(modelInstance) + b, err := m.Marshal(modelInstance) if err != nil { return fmt.Errorf("encoding to json failed: %v", err) } + out = string(b) case "y", "yaml": - m := jsonpb.Marshaler{ - EnumsAsInts: false, - EmitDefaults: true, - Indent: " ", - OrigName: true, - AnyResolver: nil, + m := protojson.MarshalOptions{ + UseEnumNumbers: false, + AllowPartial: true, + EmitUnpopulated: true, + Indent: defaultIndent, + UseProtoNames: true, + Resolver: nil, + } + if opts.OneLine { + m.Indent = "" } - out, err = m.MarshalToString(modelInstance) + b, err := m.Marshal(modelInstance) if err != nil { return fmt.Errorf("encoding to json failed: %v", err) } - b, err := yaml.JSONToYAML([]byte(out)) + out = string(b) + b, err = yaml.JSONToYAML([]byte(out)) if err != nil { return fmt.Errorf("encoding to yaml failed: %v", err) } out = string(b) case "p", "proto": - m := proto.TextMarshaler{ - Compact: false, - ExpandAny: false, + m := prototext.MarshalOptions{ + AllowPartial: true, + Indent: " ", + Resolver: nil, } - out = m.Text(modelInstance) + b, err := m.Marshal(modelInstance) + if err != nil { + return fmt.Errorf("encoding to proto text failed: %v", err) + } + out = string(b) default: return fmt.Errorf("unknown format: %s", opts.Format) } diff --git a/cmd/agentctl/commands/import.go b/cmd/agentctl/commands/import.go index a20301e24b..84749c9c34 100644 --- a/cmd/agentctl/commands/import.go +++ b/cmd/agentctl/commands/import.go @@ -20,16 +20,15 @@ import ( "fmt" "io/ioutil" "path" - "reflect" "strings" "time" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" "github.com/sirupsen/logrus" "github.com/spf13/cobra" "go.ligato.io/cn-infra/v2/logging" "go.ligato.io/cn-infra/v2/servicelabel" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" agentcli "go.ligato.io/vpp-agent/v3/cmd/agentctl/cli" "go.ligato.io/vpp-agent/v3/pkg/models" @@ -184,7 +183,7 @@ func parseImportFile(importFile string) (keyVals []keyVal, err error) { } logrus.Debugf("parse line: %s %s\n", key, data) - //key = completeFullKey(key) + // key = completeFullKey(key) val, err := unmarshalKeyVal(key, data) if err != nil { return nil, fmt.Errorf("decoding value failed: %v", err) @@ -202,13 +201,12 @@ func unmarshalKeyVal(fullKey string, data string) (proto.Message, error) { if err != nil { return nil, err } - valueType := proto.MessageType(model.ProtoName()) + valueType := protoMessageType(model.ProtoName()) if valueType == nil { - return nil, fmt.Errorf("unknown proto message defined for key %s", key) + return nil, fmt.Errorf("unknown proto message defined for: %s", model.ProtoName()) } - value := reflect.New(valueType.Elem()).Interface().(proto.Message) - - if err := jsonpb.UnmarshalString(data, value); err != nil { + value := valueType.New().Interface() + if err = protojson.Unmarshal([]byte(data), value); err != nil { return nil, err } return value, nil diff --git a/cmd/agentctl/commands/proto.go b/cmd/agentctl/commands/proto.go new file mode 100644 index 0000000000..004204fc15 --- /dev/null +++ b/cmd/agentctl/commands/proto.go @@ -0,0 +1,30 @@ +// Copyright (c) 2022 Cisco and/or its affiliates. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at: +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package commands + +import ( + "github.com/sirupsen/logrus" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" +) + +func protoMessageType(fullName string) protoreflect.MessageType { + valueType, err := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(fullName)) + if err != nil { + logrus.Errorf("error finding message with name %q: %v", fullName, err) + return nil + } + return valueType +} diff --git a/examples/customize/custom_api_model/main.go b/examples/customize/custom_api_model/main.go index cd04b59776..2081ebd2c4 100644 --- a/examples/customize/custom_api_model/main.go +++ b/examples/customize/custom_api_model/main.go @@ -22,12 +22,12 @@ import ( "os" "time" - "github.com/golang/protobuf/proto" "github.com/namsral/flag" "go.ligato.io/cn-infra/v2/agent" "go.ligato.io/cn-infra/v2/infra" "go.ligato.io/cn-infra/v2/logging" "google.golang.org/grpc" + "google.golang.org/protobuf/encoding/prototext" "go.ligato.io/vpp-agent/v3/client" "go.ligato.io/vpp-agent/v3/client/remoteclient" @@ -127,11 +127,6 @@ func (p *Example) Init() (err error) { } func demonstrateClient(c client.ConfigClient) { - tm := proto.TextMarshaler{ - Compact: true, - ExpandAny: true, - } - // List known models fmt.Println("# ==========================================") fmt.Println("# List known models..") @@ -196,7 +191,7 @@ func demonstrateClient(c client.ConfigClient) { if err := c.GetConfig(&cfg.VPP, &cfg.Linux, &cfg); err != nil { log.Println("GetConfig failed:", err) } - fmt.Printf("Retrieved config:\n%+v\n", cfg) + fmt.Printf("Retrieved config:\n%+v\n", &cfg) // Dump state fmt.Println("# ==========================================") @@ -208,7 +203,7 @@ func demonstrateClient(c client.ConfigClient) { } fmt.Printf("Dumping %d states\n", len(states)) for _, state := range states { - fmt.Printf(" - %v\n", tm.Text(state)) + fmt.Printf(" - %v\n", prototext.Format(state)) } } diff --git a/examples/customize/custom_api_model/proto/custom/model.pb.go b/examples/customize/custom_api_model/proto/custom/model.pb.go index f2c0a31c40..cdbbe2db67 100644 --- a/examples/customize/custom_api_model/proto/custom/model.pb.go +++ b/examples/customize/custom_api_model/proto/custom/model.pb.go @@ -1,85 +1,156 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: proto/custom/model.proto package custom import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type MyModel struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *MyModel) Reset() { *m = MyModel{} } -func (m *MyModel) String() string { return proto.CompactTextString(m) } -func (*MyModel) ProtoMessage() {} -func (*MyModel) Descriptor() ([]byte, []int) { - return fileDescriptor_e6ec31244dfdbb3d, []int{0} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *MyModel) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MyModel.Unmarshal(m, b) -} -func (m *MyModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MyModel.Marshal(b, m, deterministic) -} -func (m *MyModel) XXX_Merge(src proto.Message) { - xxx_messageInfo_MyModel.Merge(m, src) +func (x *MyModel) Reset() { + *x = MyModel{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_custom_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *MyModel) XXX_Size() int { - return xxx_messageInfo_MyModel.Size(m) + +func (x *MyModel) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *MyModel) XXX_DiscardUnknown() { - xxx_messageInfo_MyModel.DiscardUnknown(m) + +func (*MyModel) ProtoMessage() {} + +func (x *MyModel) ProtoReflect() protoreflect.Message { + mi := &file_proto_custom_model_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_MyModel proto.InternalMessageInfo +// Deprecated: Use MyModel.ProtoReflect.Descriptor instead. +func (*MyModel) Descriptor() ([]byte, []int) { + return file_proto_custom_model_proto_rawDescGZIP(), []int{0} +} -func (m *MyModel) GetName() string { - if m != nil { - return m.Name +func (x *MyModel) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *MyModel) GetValue() int32 { - if m != nil { - return m.Value +func (x *MyModel) GetValue() int32 { + if x != nil { + return x.Value } return 0 } -func init() { - proto.RegisterType((*MyModel)(nil), "custom.MyModel") +var File_proto_custom_model_proto protoreflect.FileDescriptor + +var file_proto_custom_model_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x22, 0x33, 0x0a, 0x07, 0x4d, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x53, 0x5a, 0x51, 0x67, 0x6f, 0x2e, 0x6c, 0x69, + 0x67, 0x61, 0x74, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x70, 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x61, + 0x70, 0x69, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x3b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_custom_model_proto_rawDescOnce sync.Once + file_proto_custom_model_proto_rawDescData = file_proto_custom_model_proto_rawDesc +) + +func file_proto_custom_model_proto_rawDescGZIP() []byte { + file_proto_custom_model_proto_rawDescOnce.Do(func() { + file_proto_custom_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_custom_model_proto_rawDescData) + }) + return file_proto_custom_model_proto_rawDescData } -func init() { proto.RegisterFile("proto/custom/model.proto", fileDescriptor_e6ec31244dfdbb3d) } - -var fileDescriptor_e6ec31244dfdbb3d = []byte{ - // 99 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x28, 0xca, 0x2f, - 0xc9, 0xd7, 0x4f, 0x2e, 0x2d, 0x2e, 0xc9, 0xcf, 0xd5, 0xcf, 0xcd, 0x4f, 0x49, 0xcd, 0xd1, 0x03, - 0x0b, 0x09, 0xb1, 0x41, 0xc4, 0x94, 0x8c, 0xb9, 0xd8, 0x7d, 0x2b, 0x7d, 0x41, 0x12, 0x42, 0x42, - 0x5c, 0x2c, 0x79, 0x89, 0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0xb6, 0x90, - 0x08, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x84, - 0x93, 0xc4, 0x06, 0x36, 0xc3, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x34, 0x0d, 0xf1, 0x5f, - 0x00, 0x00, 0x00, +var file_proto_custom_model_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proto_custom_model_proto_goTypes = []interface{}{ + (*MyModel)(nil), // 0: custom.MyModel +} +var file_proto_custom_model_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_custom_model_proto_init() } +func file_proto_custom_model_proto_init() { + if File_proto_custom_model_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_custom_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MyModel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_custom_model_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_custom_model_proto_goTypes, + DependencyIndexes: file_proto_custom_model_proto_depIdxs, + MessageInfos: file_proto_custom_model_proto_msgTypes, + }.Build() + File_proto_custom_model_proto = out.File + file_proto_custom_model_proto_rawDesc = nil + file_proto_custom_model_proto_goTypes = nil + file_proto_custom_model_proto_depIdxs = nil } diff --git a/examples/customize/custom_api_model/proto/custom/model.proto b/examples/customize/custom_api_model/proto/custom/model.proto index c69964017e..4a61aff62b 100644 --- a/examples/customize/custom_api_model/proto/custom/model.proto +++ b/examples/customize/custom_api_model/proto/custom/model.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +option go_package = "go.ligato.io/vpp-agent/v3/examples/customize/custom_api_model/proto/custom;custom"; + package custom; message MyModel { diff --git a/examples/customize/custom_vpp_plugin/proto/custom/vpp/syslog/syslog.pb.go b/examples/customize/custom_vpp_plugin/proto/custom/vpp/syslog/syslog.pb.go index 012d8670f8..56fa32148b 100644 --- a/examples/customize/custom_vpp_plugin/proto/custom/vpp/syslog/syslog.pb.go +++ b/examples/customize/custom_vpp_plugin/proto/custom/vpp/syslog/syslog.pb.go @@ -1,101 +1,168 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: proto/custom/vpp/syslog/syslog.proto package vpp_syslog import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type Sender struct { - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - Collector string `protobuf:"bytes,2,opt,name=collector,proto3" json:"collector,omitempty"` - Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Sender) Reset() { *m = Sender{} } -func (m *Sender) String() string { return proto.CompactTextString(m) } -func (*Sender) ProtoMessage() {} -func (*Sender) Descriptor() ([]byte, []int) { - return fileDescriptor_947997541bf72f4b, []int{0} + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + Collector string `protobuf:"bytes,2,opt,name=collector,proto3" json:"collector,omitempty"` + Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` } -func (m *Sender) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Sender.Unmarshal(m, b) -} -func (m *Sender) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Sender.Marshal(b, m, deterministic) -} -func (m *Sender) XXX_Merge(src proto.Message) { - xxx_messageInfo_Sender.Merge(m, src) +func (x *Sender) Reset() { + *x = Sender{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_custom_vpp_syslog_syslog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Sender) XXX_Size() int { - return xxx_messageInfo_Sender.Size(m) + +func (x *Sender) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Sender) XXX_DiscardUnknown() { - xxx_messageInfo_Sender.DiscardUnknown(m) + +func (*Sender) ProtoMessage() {} + +func (x *Sender) ProtoReflect() protoreflect.Message { + mi := &file_proto_custom_vpp_syslog_syslog_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Sender proto.InternalMessageInfo +// Deprecated: Use Sender.ProtoReflect.Descriptor instead. +func (*Sender) Descriptor() ([]byte, []int) { + return file_proto_custom_vpp_syslog_syslog_proto_rawDescGZIP(), []int{0} +} -func (m *Sender) GetSource() string { - if m != nil { - return m.Source +func (x *Sender) GetSource() string { + if x != nil { + return x.Source } return "" } -func (m *Sender) GetCollector() string { - if m != nil { - return m.Collector +func (x *Sender) GetCollector() string { + if x != nil { + return x.Collector } return "" } -func (m *Sender) GetPort() int32 { - if m != nil { - return m.Port +func (x *Sender) GetPort() int32 { + if x != nil { + return x.Port } return 0 } -func init() { - proto.RegisterType((*Sender)(nil), "custom.vpp.syslog.Sender") +var File_proto_custom_vpp_syslog_syslog_proto protoreflect.FileDescriptor + +var file_proto_custom_vpp_syslog_syslog_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2f, 0x76, + 0x70, 0x70, 0x2f, 0x73, 0x79, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x73, 0x79, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x76, + 0x70, 0x70, 0x2e, 0x73, 0x79, 0x73, 0x6c, 0x6f, 0x67, 0x22, 0x52, 0x0a, 0x06, 0x53, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x63, 0x5a, + 0x61, 0x67, 0x6f, 0x2e, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x70, + 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x73, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x65, 0x2f, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x76, 0x70, 0x70, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2f, 0x76, 0x70, 0x70, + 0x2f, 0x73, 0x79, 0x73, 0x6c, 0x6f, 0x67, 0x3b, 0x76, 0x70, 0x70, 0x5f, 0x73, 0x79, 0x73, 0x6c, + 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_custom_vpp_syslog_syslog_proto_rawDescOnce sync.Once + file_proto_custom_vpp_syslog_syslog_proto_rawDescData = file_proto_custom_vpp_syslog_syslog_proto_rawDesc +) + +func file_proto_custom_vpp_syslog_syslog_proto_rawDescGZIP() []byte { + file_proto_custom_vpp_syslog_syslog_proto_rawDescOnce.Do(func() { + file_proto_custom_vpp_syslog_syslog_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_custom_vpp_syslog_syslog_proto_rawDescData) + }) + return file_proto_custom_vpp_syslog_syslog_proto_rawDescData } -func init() { - proto.RegisterFile("proto/custom/vpp/syslog/syslog.proto", fileDescriptor_947997541bf72f4b) +var file_proto_custom_vpp_syslog_syslog_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proto_custom_vpp_syslog_syslog_proto_goTypes = []interface{}{ + (*Sender)(nil), // 0: custom.vpp.syslog.Sender +} +var file_proto_custom_vpp_syslog_syslog_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } -var fileDescriptor_947997541bf72f4b = []byte{ - // 193 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x8f, 0x3d, 0x6b, 0xc3, 0x30, - 0x10, 0x86, 0x71, 0x3f, 0x0c, 0xd6, 0x56, 0x0d, 0xc5, 0x43, 0x07, 0x53, 0x3a, 0x78, 0xa9, 0x34, - 0x78, 0xec, 0xd6, 0x9f, 0xe0, 0x6c, 0x59, 0x8c, 0xa2, 0x1c, 0x42, 0x20, 0xfb, 0x0e, 0x49, 0x16, - 0x49, 0x7e, 0x7d, 0xb0, 0x2c, 0xc8, 0x94, 0xe9, 0x9e, 0xbb, 0xe7, 0x1d, 0xde, 0x63, 0x3f, 0xe4, - 0x31, 0xa2, 0xd4, 0x6b, 0x88, 0x38, 0xcb, 0x44, 0x24, 0xc3, 0x35, 0x38, 0x34, 0x65, 0x88, 0xac, - 0xf9, 0xc7, 0xee, 0x45, 0x22, 0x12, 0xbb, 0xf8, 0x1e, 0x59, 0x7d, 0x80, 0xe5, 0x0c, 0x9e, 0x7f, - 0xb2, 0x3a, 0xe0, 0xea, 0x35, 0xb4, 0x55, 0x57, 0xf5, 0xcd, 0x58, 0x36, 0xfe, 0xc5, 0x1a, 0x8d, - 0xce, 0x81, 0x8e, 0xe8, 0xdb, 0x97, 0xac, 0x1e, 0x07, 0xce, 0xd9, 0x1b, 0xa1, 0x8f, 0xed, 0x6b, - 0x57, 0xf5, 0xef, 0x63, 0xe6, 0x7f, 0x7d, 0x54, 0x06, 0x85, 0xb3, 0x46, 0x45, 0x14, 0x16, 0xb7, - 0x3a, 0xbf, 0xca, 0xc0, 0x12, 0x65, 0x1a, 0x24, 0x5c, 0xd4, 0x4c, 0x0e, 0x42, 0xe9, 0x6a, 0x6f, - 0x50, 0x68, 0x4a, 0x44, 0x13, 0xb9, 0xd5, 0xd8, 0x45, 0x3e, 0xf9, 0xe6, 0x6f, 0x8b, 0xec, 0x78, - 0xaa, 0x73, 0x66, 0xb8, 0x07, 0x00, 0x00, 0xff, 0xff, 0x13, 0x91, 0x42, 0x67, 0xfa, 0x00, 0x00, - 0x00, +func init() { file_proto_custom_vpp_syslog_syslog_proto_init() } +func file_proto_custom_vpp_syslog_syslog_proto_init() { + if File_proto_custom_vpp_syslog_syslog_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_custom_vpp_syslog_syslog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sender); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_custom_vpp_syslog_syslog_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_custom_vpp_syslog_syslog_proto_goTypes, + DependencyIndexes: file_proto_custom_vpp_syslog_syslog_proto_depIdxs, + MessageInfos: file_proto_custom_vpp_syslog_syslog_proto_msgTypes, + }.Build() + File_proto_custom_vpp_syslog_syslog_proto = out.File + file_proto_custom_vpp_syslog_syslog_proto_rawDesc = nil + file_proto_custom_vpp_syslog_syslog_proto_goTypes = nil + file_proto_custom_vpp_syslog_syslog_proto_depIdxs = nil } diff --git a/examples/customize/custom_vpp_plugin/syslog/descriptor/adapter/syslogsender.go b/examples/customize/custom_vpp_plugin/syslog/descriptor/adapter/syslogsender.go index 0b97d55723..ef64d3f92b 100644 --- a/examples/customize/custom_vpp_plugin/syslog/descriptor/adapter/syslogsender.go +++ b/examples/customize/custom_vpp_plugin/syslog/descriptor/adapter/syslogsender.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/examples/customize/custom_vpp_plugin/proto/custom/vpp/syslog" ) diff --git a/examples/customize/custom_vpp_plugin/syslog/descriptor/sender.go b/examples/customize/custom_vpp_plugin/syslog/descriptor/sender.go index 48fb9e293c..8b42f455d9 100644 --- a/examples/customize/custom_vpp_plugin/syslog/descriptor/sender.go +++ b/examples/customize/custom_vpp_plugin/syslog/descriptor/sender.go @@ -18,8 +18,8 @@ import ( "errors" "net" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" vpp_syslog "go.ligato.io/vpp-agent/v3/examples/customize/custom_vpp_plugin/proto/custom/vpp/syslog" "go.ligato.io/vpp-agent/v3/examples/customize/custom_vpp_plugin/syslog/descriptor/adapter" diff --git a/examples/grpc_vpp/remote_client/main.go b/examples/grpc_vpp/remote_client/main.go index 4f95ab6208..43a2a7d10b 100644 --- a/examples/grpc_vpp/remote_client/main.go +++ b/examples/grpc_vpp/remote_client/main.go @@ -22,13 +22,12 @@ import ( "sync" "time" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" "github.com/namsral/flag" "go.ligato.io/cn-infra/v2/agent" "go.ligato.io/cn-infra/v2/infra" "go.ligato.io/cn-infra/v2/logging/logrus" "google.golang.org/grpc" + "google.golang.org/protobuf/encoding/protojson" "go.ligato.io/vpp-agent/v3/proto/ligato/configurator" "go.ligato.io/vpp-agent/v3/proto/ligato/linux" @@ -182,7 +181,7 @@ func (p *ExamplePlugin) demonstrateClient(client configurator.ConfiguratorServic if err != nil { log.Fatalln(err) } - out, _ := (&jsonpb.Marshaler{Indent: " "}).MarshalToString(cfg) + out := protojson.Format(cfg) fmt.Printf("Config:\n %+v\n", out) time.Sleep(time.Second * 5) @@ -192,7 +191,7 @@ func (p *ExamplePlugin) demonstrateClient(client configurator.ConfiguratorServic if err != nil { log.Fatalln(err) } - fmt.Printf("Dump:\n %+v\n", proto.MarshalTextString(dump)) + fmt.Printf("Dump:\n %+v\n", protojson.Format(dump)) } // Dialer for unix domain socket diff --git a/examples/kvscheduler/mock_plugins/ifplugin/descriptor/adapter/interface.go b/examples/kvscheduler/mock_plugins/ifplugin/descriptor/adapter/interface.go index d146d5dc97..9956b11d52 100644 --- a/examples/kvscheduler/mock_plugins/ifplugin/descriptor/adapter/interface.go +++ b/examples/kvscheduler/mock_plugins/ifplugin/descriptor/adapter/interface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/examples/kvscheduler/mock_plugins/ifplugin/model" "go.ligato.io/vpp-agent/v3/pkg/idxvpp" diff --git a/examples/kvscheduler/mock_plugins/ifplugin/model/interface.pb.go b/examples/kvscheduler/mock_plugins/ifplugin/model/interface.pb.go index 1c3f044da8..4619dac87a 100644 --- a/examples/kvscheduler/mock_plugins/ifplugin/model/interface.pb.go +++ b/examples/kvscheduler/mock_plugins/ifplugin/model/interface.pb.go @@ -1,24 +1,24 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: model/interface.proto package mock_interfaces import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type Interface_Type int32 @@ -28,110 +28,208 @@ const ( Interface_TAP Interface_Type = 2 ) -var Interface_Type_name = map[int32]string{ - 0: "UNDEFINED_TYPE", - 1: "LOOPBACK", - 2: "TAP", -} +// Enum value maps for Interface_Type. +var ( + Interface_Type_name = map[int32]string{ + 0: "UNDEFINED_TYPE", + 1: "LOOPBACK", + 2: "TAP", + } + Interface_Type_value = map[string]int32{ + "UNDEFINED_TYPE": 0, + "LOOPBACK": 1, + "TAP": 2, + } +) -var Interface_Type_value = map[string]int32{ - "UNDEFINED_TYPE": 0, - "LOOPBACK": 1, - "TAP": 2, +func (x Interface_Type) Enum() *Interface_Type { + p := new(Interface_Type) + *p = x + return p } func (x Interface_Type) String() string { - return proto.EnumName(Interface_Type_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (Interface_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d354b33e68715588, []int{0, 0} +func (Interface_Type) Descriptor() protoreflect.EnumDescriptor { + return file_model_interface_proto_enumTypes[0].Descriptor() } -type Interface struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Type Interface_Type `protobuf:"varint,2,opt,name=type,proto3,enum=mock.interfaces.Interface_Type" json:"type,omitempty"` - Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` - PhysAddress string `protobuf:"bytes,4,opt,name=phys_address,json=physAddress,proto3" json:"phys_address,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Interface) Reset() { *m = Interface{} } -func (m *Interface) String() string { return proto.CompactTextString(m) } -func (*Interface) ProtoMessage() {} -func (*Interface) Descriptor() ([]byte, []int) { - return fileDescriptor_d354b33e68715588, []int{0} +func (Interface_Type) Type() protoreflect.EnumType { + return &file_model_interface_proto_enumTypes[0] } -func (m *Interface) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Interface.Unmarshal(m, b) +func (x Interface_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Interface.Marshal(b, m, deterministic) + +// Deprecated: Use Interface_Type.Descriptor instead. +func (Interface_Type) EnumDescriptor() ([]byte, []int) { + return file_model_interface_proto_rawDescGZIP(), []int{0, 0} } -func (m *Interface) XXX_Merge(src proto.Message) { - xxx_messageInfo_Interface.Merge(m, src) + +type Interface struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // interface name (in our simplified example used as both logical and host name) + Type Interface_Type `protobuf:"varint,2,opt,name=type,proto3,enum=mock.interfaces.Interface_Type" json:"type,omitempty"` // interface type + Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` // interface admin status (UP/DOWN) + PhysAddress string `protobuf:"bytes,4,opt,name=phys_address,json=physAddress,proto3" json:"phys_address,omitempty"` // interface MAC address +} + +func (x *Interface) Reset() { + *x = Interface{} + if protoimpl.UnsafeEnabled { + mi := &file_model_interface_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Interface) XXX_Size() int { - return xxx_messageInfo_Interface.Size(m) + +func (x *Interface) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Interface) XXX_DiscardUnknown() { - xxx_messageInfo_Interface.DiscardUnknown(m) + +func (*Interface) ProtoMessage() {} + +func (x *Interface) ProtoReflect() protoreflect.Message { + mi := &file_model_interface_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Interface proto.InternalMessageInfo +// Deprecated: Use Interface.ProtoReflect.Descriptor instead. +func (*Interface) Descriptor() ([]byte, []int) { + return file_model_interface_proto_rawDescGZIP(), []int{0} +} -func (m *Interface) GetName() string { - if m != nil { - return m.Name +func (x *Interface) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Interface) GetType() Interface_Type { - if m != nil { - return m.Type +func (x *Interface) GetType() Interface_Type { + if x != nil { + return x.Type } return Interface_UNDEFINED_TYPE } -func (m *Interface) GetEnabled() bool { - if m != nil { - return m.Enabled +func (x *Interface) GetEnabled() bool { + if x != nil { + return x.Enabled } return false } -func (m *Interface) GetPhysAddress() string { - if m != nil { - return m.PhysAddress +func (x *Interface) GetPhysAddress() string { + if x != nil { + return x.PhysAddress } return "" } -func init() { - proto.RegisterEnum("mock.interfaces.Interface_Type", Interface_Type_name, Interface_Type_value) - proto.RegisterType((*Interface)(nil), "mock.interfaces.Interface") -} - -func init() { proto.RegisterFile("model/interface.proto", fileDescriptor_d354b33e68715588) } - -var fileDescriptor_d354b33e68715588 = []byte{ - // 212 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcd, 0x4f, 0x49, - 0xcd, 0xd1, 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0x4a, 0x4b, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0xe2, 0xcf, 0xcd, 0x4f, 0xce, 0xd6, 0x83, 0x8b, 0x16, 0x2b, 0x1d, 0x61, 0xe4, 0xe2, - 0xf4, 0x84, 0x71, 0x85, 0x84, 0xb8, 0x58, 0xf2, 0x12, 0x73, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35, - 0x38, 0x83, 0xc0, 0x6c, 0x21, 0x63, 0x2e, 0x96, 0x92, 0xca, 0x82, 0x54, 0x09, 0x26, 0x05, 0x46, - 0x0d, 0x3e, 0x23, 0x79, 0x3d, 0x34, 0x13, 0xf4, 0xe0, 0xba, 0xf5, 0x42, 0x2a, 0x0b, 0x52, 0x83, - 0xc0, 0x8a, 0x85, 0x24, 0xb8, 0xd8, 0x53, 0xf3, 0x12, 0x93, 0x72, 0x52, 0x53, 0x24, 0x98, 0x15, - 0x18, 0x35, 0x38, 0x82, 0x60, 0x5c, 0x21, 0x45, 0x2e, 0x9e, 0x82, 0x8c, 0xca, 0xe2, 0xf8, 0xc4, - 0x94, 0x94, 0xa2, 0xd4, 0xe2, 0x62, 0x09, 0x16, 0xb0, 0x55, 0xdc, 0x20, 0x31, 0x47, 0x88, 0x90, - 0x92, 0x21, 0x17, 0x0b, 0xc8, 0x28, 0x21, 0x21, 0x2e, 0xbe, 0x50, 0x3f, 0x17, 0x57, 0x37, 0x4f, - 0x3f, 0x57, 0x97, 0xf8, 0x90, 0xc8, 0x00, 0x57, 0x01, 0x06, 0x21, 0x1e, 0x2e, 0x0e, 0x1f, 0x7f, - 0xff, 0x00, 0x27, 0x47, 0x67, 0x6f, 0x01, 0x46, 0x21, 0x76, 0x2e, 0xe6, 0x10, 0xc7, 0x00, 0x01, - 0xa6, 0x24, 0x36, 0xb0, 0xf7, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x59, 0xf7, 0xa4, 0x54, - 0xf7, 0x00, 0x00, 0x00, +var File_model_interface_proto protoreflect.FileDescriptor + +var file_model_interface_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6d, 0x6f, 0x63, 0x6b, 0x2e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x09, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x79, + 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x70, 0x68, 0x79, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x31, 0x0a, 0x04, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, + 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, + 0x42, 0x41, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x50, 0x10, 0x02, 0x42, + 0x5c, 0x5a, 0x5a, 0x67, 0x6f, 0x2e, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, + 0x76, 0x70, 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x6b, 0x76, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x2f, 0x6d, 0x6f, 0x63, 0x6b, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x69, + 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x3b, 0x6d, 0x6f, + 0x63, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_model_interface_proto_rawDescOnce sync.Once + file_model_interface_proto_rawDescData = file_model_interface_proto_rawDesc +) + +func file_model_interface_proto_rawDescGZIP() []byte { + file_model_interface_proto_rawDescOnce.Do(func() { + file_model_interface_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_interface_proto_rawDescData) + }) + return file_model_interface_proto_rawDescData +} + +var file_model_interface_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_model_interface_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_interface_proto_goTypes = []interface{}{ + (Interface_Type)(0), // 0: mock.interfaces.Interface.Type + (*Interface)(nil), // 1: mock.interfaces.Interface +} +var file_model_interface_proto_depIdxs = []int32{ + 0, // 0: mock.interfaces.Interface.type:type_name -> mock.interfaces.Interface.Type + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_model_interface_proto_init() } +func file_model_interface_proto_init() { + if File_model_interface_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_interface_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Interface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_model_interface_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_interface_proto_goTypes, + DependencyIndexes: file_model_interface_proto_depIdxs, + EnumInfos: file_model_interface_proto_enumTypes, + MessageInfos: file_model_interface_proto_msgTypes, + }.Build() + File_model_interface_proto = out.File + file_model_interface_proto_rawDesc = nil + file_model_interface_proto_goTypes = nil + file_model_interface_proto_depIdxs = nil } diff --git a/examples/kvscheduler/mock_plugins/ifplugin/model/interface.proto b/examples/kvscheduler/mock_plugins/ifplugin/model/interface.proto index f788205dbb..bc1d1ffd42 100644 --- a/examples/kvscheduler/mock_plugins/ifplugin/model/interface.proto +++ b/examples/kvscheduler/mock_plugins/ifplugin/model/interface.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package mock.interfaces; +option go_package = "go.ligato.io/vpp-agent/v3/examples/kvscheduler/mock_plugins/ifplugin/model;mock_interfaces"; + message Interface { enum Type { UNDEFINED_TYPE = 0; diff --git a/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/bdinterface.go b/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/bdinterface.go index e6aba14b5d..dde09478d9 100644 --- a/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/bdinterface.go +++ b/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/bdinterface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/examples/kvscheduler/mock_plugins/l2plugin/model" ) diff --git a/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/bridgedomain.go b/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/bridgedomain.go index cd8b554588..8242f2779c 100644 --- a/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/bridgedomain.go +++ b/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/bridgedomain.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/examples/kvscheduler/mock_plugins/l2plugin/model" "go.ligato.io/vpp-agent/v3/pkg/idxvpp" diff --git a/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/fib.go b/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/fib.go index 16cf79fe24..1e5ef86933 100644 --- a/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/fib.go +++ b/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter/fib.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/examples/kvscheduler/mock_plugins/l2plugin/model" ) diff --git a/examples/kvscheduler/mock_plugins/l2plugin/descriptor/bd_interface.go b/examples/kvscheduler/mock_plugins/l2plugin/descriptor/bd_interface.go index 8122234bb9..7c2c8a0e9e 100644 --- a/examples/kvscheduler/mock_plugins/l2plugin/descriptor/bd_interface.go +++ b/examples/kvscheduler/mock_plugins/l2plugin/descriptor/bd_interface.go @@ -15,9 +15,9 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" interfaces "go.ligato.io/vpp-agent/v3/examples/kvscheduler/mock_plugins/ifplugin/model" "go.ligato.io/vpp-agent/v3/examples/kvscheduler/mock_plugins/l2plugin/descriptor/adapter" @@ -63,7 +63,7 @@ func NewBDInterfaceDescriptor(bdIndex idxvpp.NameToIndex, bdHandler mockcalls.Mo typedDescr := &adapter.BDInterfaceDescriptor{ Name: BDInterfaceDescriptorName, KeySelector: descrCtx.IsBDInterfaceKey, - ValueTypeName: proto.MessageName(&l2.BridgeDomain_Interface{}), + ValueTypeName: string(proto.MessageName(&l2.BridgeDomain_Interface{})), Create: descrCtx.Create, Delete: descrCtx.Delete, Dependencies: descrCtx.Dependencies, diff --git a/examples/kvscheduler/mock_plugins/l2plugin/mockcalls/fib_mockcalls.go b/examples/kvscheduler/mock_plugins/l2plugin/mockcalls/fib_mockcalls.go index a9ec23b883..f7f2a96959 100644 --- a/examples/kvscheduler/mock_plugins/l2plugin/mockcalls/fib_mockcalls.go +++ b/examples/kvscheduler/mock_plugins/l2plugin/mockcalls/fib_mockcalls.go @@ -17,7 +17,8 @@ package mockcalls import ( "fmt" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" + l2 "go.ligato.io/vpp-agent/v3/examples/kvscheduler/mock_plugins/l2plugin/model" ) diff --git a/examples/kvscheduler/mock_plugins/l2plugin/model/bridge-domain.pb.go b/examples/kvscheduler/mock_plugins/l2plugin/model/bridge-domain.pb.go index f8a0f49df2..41e3bfb59d 100644 --- a/examples/kvscheduler/mock_plugins/l2plugin/model/bridge-domain.pb.go +++ b/examples/kvscheduler/mock_plugins/l2plugin/model/bridge-domain.pb.go @@ -1,137 +1,234 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: model/bridge-domain.proto package mock_l2 import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type BridgeDomain struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Interfaces []*BridgeDomain_Interface `protobuf:"bytes,10,rep,name=interfaces,proto3" json:"interfaces,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *BridgeDomain) Reset() { *m = BridgeDomain{} } -func (m *BridgeDomain) String() string { return proto.CompactTextString(m) } -func (*BridgeDomain) ProtoMessage() {} -func (*BridgeDomain) Descriptor() ([]byte, []int) { - return fileDescriptor_1d3fba68d05addcf, []int{0} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // bridge domain name + Interfaces []*BridgeDomain_Interface `protobuf:"bytes,10,rep,name=interfaces,proto3" json:"interfaces,omitempty"` // list of interfaces } -func (m *BridgeDomain) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BridgeDomain.Unmarshal(m, b) -} -func (m *BridgeDomain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BridgeDomain.Marshal(b, m, deterministic) -} -func (m *BridgeDomain) XXX_Merge(src proto.Message) { - xxx_messageInfo_BridgeDomain.Merge(m, src) +func (x *BridgeDomain) Reset() { + *x = BridgeDomain{} + if protoimpl.UnsafeEnabled { + mi := &file_model_bridge_domain_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BridgeDomain) XXX_Size() int { - return xxx_messageInfo_BridgeDomain.Size(m) + +func (x *BridgeDomain) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BridgeDomain) XXX_DiscardUnknown() { - xxx_messageInfo_BridgeDomain.DiscardUnknown(m) + +func (*BridgeDomain) ProtoMessage() {} + +func (x *BridgeDomain) ProtoReflect() protoreflect.Message { + mi := &file_model_bridge_domain_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BridgeDomain proto.InternalMessageInfo +// Deprecated: Use BridgeDomain.ProtoReflect.Descriptor instead. +func (*BridgeDomain) Descriptor() ([]byte, []int) { + return file_model_bridge_domain_proto_rawDescGZIP(), []int{0} +} -func (m *BridgeDomain) GetName() string { - if m != nil { - return m.Name +func (x *BridgeDomain) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *BridgeDomain) GetInterfaces() []*BridgeDomain_Interface { - if m != nil { - return m.Interfaces +func (x *BridgeDomain) GetInterfaces() []*BridgeDomain_Interface { + if x != nil { + return x.Interfaces } return nil } type BridgeDomain_Interface struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - BridgedVirtualInterface bool `protobuf:"varint,2,opt,name=bridged_virtual_interface,json=bridgedVirtualInterface,proto3" json:"bridged_virtual_interface,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *BridgeDomain_Interface) Reset() { *m = BridgeDomain_Interface{} } -func (m *BridgeDomain_Interface) String() string { return proto.CompactTextString(m) } -func (*BridgeDomain_Interface) ProtoMessage() {} -func (*BridgeDomain_Interface) Descriptor() ([]byte, []int) { - return fileDescriptor_1d3fba68d05addcf, []int{0, 0} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // interface name belonging to this bridge domain + BridgedVirtualInterface bool `protobuf:"varint,2,opt,name=bridged_virtual_interface,json=bridgedVirtualInterface,proto3" json:"bridged_virtual_interface,omitempty"` // true if this is a BVI interface } -func (m *BridgeDomain_Interface) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BridgeDomain_Interface.Unmarshal(m, b) -} -func (m *BridgeDomain_Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BridgeDomain_Interface.Marshal(b, m, deterministic) -} -func (m *BridgeDomain_Interface) XXX_Merge(src proto.Message) { - xxx_messageInfo_BridgeDomain_Interface.Merge(m, src) +func (x *BridgeDomain_Interface) Reset() { + *x = BridgeDomain_Interface{} + if protoimpl.UnsafeEnabled { + mi := &file_model_bridge_domain_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BridgeDomain_Interface) XXX_Size() int { - return xxx_messageInfo_BridgeDomain_Interface.Size(m) + +func (x *BridgeDomain_Interface) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BridgeDomain_Interface) XXX_DiscardUnknown() { - xxx_messageInfo_BridgeDomain_Interface.DiscardUnknown(m) + +func (*BridgeDomain_Interface) ProtoMessage() {} + +func (x *BridgeDomain_Interface) ProtoReflect() protoreflect.Message { + mi := &file_model_bridge_domain_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BridgeDomain_Interface proto.InternalMessageInfo +// Deprecated: Use BridgeDomain_Interface.ProtoReflect.Descriptor instead. +func (*BridgeDomain_Interface) Descriptor() ([]byte, []int) { + return file_model_bridge_domain_proto_rawDescGZIP(), []int{0, 0} +} -func (m *BridgeDomain_Interface) GetName() string { - if m != nil { - return m.Name +func (x *BridgeDomain_Interface) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *BridgeDomain_Interface) GetBridgedVirtualInterface() bool { - if m != nil { - return m.BridgedVirtualInterface +func (x *BridgeDomain_Interface) GetBridgedVirtualInterface() bool { + if x != nil { + return x.BridgedVirtualInterface } return false } -func init() { - proto.RegisterType((*BridgeDomain)(nil), "mock.l2.BridgeDomain") - proto.RegisterType((*BridgeDomain_Interface)(nil), "mock.l2.BridgeDomain.Interface") +var File_model_bridge_domain_proto protoreflect.FileDescriptor + +var file_model_bridge_domain_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6d, 0x6f, 0x63, + 0x6b, 0x2e, 0x6c, 0x32, 0x22, 0xc0, 0x01, 0x0a, 0x0c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x44, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x6d, 0x6f, 0x63, 0x6b, 0x2e, 0x6c, 0x32, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x44, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x0a, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x1a, 0x5b, 0x0a, 0x09, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x19, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x64, 0x5f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x64, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x42, 0x54, 0x5a, 0x52, 0x67, 0x6f, 0x2e, 0x6c, 0x69, + 0x67, 0x61, 0x74, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x70, 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x6b, 0x76, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x6d, 0x6f, 0x63, 0x6b, 0x5f, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x6c, 0x32, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x3b, 0x6d, 0x6f, 0x63, 0x6b, 0x5f, 0x6c, 0x32, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_model_bridge_domain_proto_rawDescOnce sync.Once + file_model_bridge_domain_proto_rawDescData = file_model_bridge_domain_proto_rawDesc +) + +func file_model_bridge_domain_proto_rawDescGZIP() []byte { + file_model_bridge_domain_proto_rawDescOnce.Do(func() { + file_model_bridge_domain_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_bridge_domain_proto_rawDescData) + }) + return file_model_bridge_domain_proto_rawDescData } -func init() { proto.RegisterFile("model/bridge-domain.proto", fileDescriptor_1d3fba68d05addcf) } +var file_model_bridge_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_model_bridge_domain_proto_goTypes = []interface{}{ + (*BridgeDomain)(nil), // 0: mock.l2.BridgeDomain + (*BridgeDomain_Interface)(nil), // 1: mock.l2.BridgeDomain.Interface +} +var file_model_bridge_domain_proto_depIdxs = []int32{ + 1, // 0: mock.l2.BridgeDomain.interfaces:type_name -> mock.l2.BridgeDomain.Interface + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} -var fileDescriptor_1d3fba68d05addcf = []byte{ - // 169 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcd, 0x4f, 0x49, - 0xcd, 0xd1, 0x4f, 0x2a, 0xca, 0x4c, 0x49, 0x4f, 0xd5, 0x4d, 0xc9, 0xcf, 0x4d, 0xcc, 0xcc, 0xd3, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xcf, 0xcd, 0x4f, 0xce, 0xd6, 0xcb, 0x31, 0x52, 0x3a, - 0xc0, 0xc8, 0xc5, 0xe3, 0x04, 0x56, 0xe0, 0x02, 0x96, 0x17, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, - 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0xec, 0xb9, 0xb8, 0x32, 0xf3, - 0x4a, 0x52, 0x8b, 0xd2, 0x12, 0x93, 0x53, 0x8b, 0x25, 0xb8, 0x14, 0x98, 0x35, 0xb8, 0x8d, 0xe4, - 0xf5, 0xa0, 0x46, 0xe8, 0x21, 0x6b, 0xd7, 0xf3, 0x84, 0xa9, 0x0b, 0x42, 0xd2, 0x22, 0x15, 0xcd, - 0xc5, 0x09, 0x97, 0xc0, 0x6a, 0x83, 0x15, 0x97, 0x24, 0xc4, 0x99, 0x29, 0xf1, 0x65, 0x99, 0x45, - 0x25, 0xa5, 0x89, 0x39, 0xf1, 0x70, 0xed, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x1c, 0x41, 0xe2, 0x50, - 0x05, 0x61, 0x10, 0x79, 0xb8, 0x79, 0x49, 0x6c, 0x60, 0x2f, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, - 0xff, 0xc3, 0xb2, 0x31, 0xa7, 0xef, 0x00, 0x00, 0x00, +func init() { file_model_bridge_domain_proto_init() } +func file_model_bridge_domain_proto_init() { + if File_model_bridge_domain_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_bridge_domain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BridgeDomain); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_model_bridge_domain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BridgeDomain_Interface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_model_bridge_domain_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_bridge_domain_proto_goTypes, + DependencyIndexes: file_model_bridge_domain_proto_depIdxs, + MessageInfos: file_model_bridge_domain_proto_msgTypes, + }.Build() + File_model_bridge_domain_proto = out.File + file_model_bridge_domain_proto_rawDesc = nil + file_model_bridge_domain_proto_goTypes = nil + file_model_bridge_domain_proto_depIdxs = nil } diff --git a/examples/kvscheduler/mock_plugins/l2plugin/model/bridge-domain.proto b/examples/kvscheduler/mock_plugins/l2plugin/model/bridge-domain.proto index ae904578ed..0130e2c7de 100644 --- a/examples/kvscheduler/mock_plugins/l2plugin/model/bridge-domain.proto +++ b/examples/kvscheduler/mock_plugins/l2plugin/model/bridge-domain.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package mock.l2; +option go_package = "go.ligato.io/vpp-agent/v3/examples/kvscheduler/mock_plugins/l2plugin/model;mock_l2"; + message BridgeDomain { string name = 1; /* bridge domain name */ diff --git a/examples/kvscheduler/mock_plugins/l2plugin/model/fib.pb.go b/examples/kvscheduler/mock_plugins/l2plugin/model/fib.pb.go index 11e5d36afa..d2211d5ed6 100644 --- a/examples/kvscheduler/mock_plugins/l2plugin/model/fib.pb.go +++ b/examples/kvscheduler/mock_plugins/l2plugin/model/fib.pb.go @@ -1,134 +1,231 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: model/fib.proto package mock_l2 import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type FIBEntry_Action int32 const ( - FIBEntry_FORWARD FIBEntry_Action = 0 - FIBEntry_DROP FIBEntry_Action = 1 + FIBEntry_FORWARD FIBEntry_Action = 0 // forward the matching frame + FIBEntry_DROP FIBEntry_Action = 1 // drop the matching frame ) -var FIBEntry_Action_name = map[int32]string{ - 0: "FORWARD", - 1: "DROP", -} +// Enum value maps for FIBEntry_Action. +var ( + FIBEntry_Action_name = map[int32]string{ + 0: "FORWARD", + 1: "DROP", + } + FIBEntry_Action_value = map[string]int32{ + "FORWARD": 0, + "DROP": 1, + } +) -var FIBEntry_Action_value = map[string]int32{ - "FORWARD": 0, - "DROP": 1, +func (x FIBEntry_Action) Enum() *FIBEntry_Action { + p := new(FIBEntry_Action) + *p = x + return p } func (x FIBEntry_Action) String() string { - return proto.EnumName(FIBEntry_Action_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (FIBEntry_Action) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fe592485f465b8e1, []int{0, 0} +func (FIBEntry_Action) Descriptor() protoreflect.EnumDescriptor { + return file_model_fib_proto_enumTypes[0].Descriptor() } -type FIBEntry struct { - PhysAddress string `protobuf:"bytes,1,opt,name=phys_address,json=physAddress,proto3" json:"phys_address,omitempty"` - BridgeDomain string `protobuf:"bytes,2,opt,name=bridge_domain,json=bridgeDomain,proto3" json:"bridge_domain,omitempty"` - Action FIBEntry_Action `protobuf:"varint,3,opt,name=action,proto3,enum=mock.l2.FIBEntry_Action" json:"action,omitempty"` - OutgoingInterface string `protobuf:"bytes,4,opt,name=outgoing_interface,json=outgoingInterface,proto3" json:"outgoing_interface,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FIBEntry) Reset() { *m = FIBEntry{} } -func (m *FIBEntry) String() string { return proto.CompactTextString(m) } -func (*FIBEntry) ProtoMessage() {} -func (*FIBEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_fe592485f465b8e1, []int{0} +func (FIBEntry_Action) Type() protoreflect.EnumType { + return &file_model_fib_proto_enumTypes[0] } -func (m *FIBEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FIBEntry.Unmarshal(m, b) +func (x FIBEntry_Action) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *FIBEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FIBEntry.Marshal(b, m, deterministic) + +// Deprecated: Use FIBEntry_Action.Descriptor instead. +func (FIBEntry_Action) EnumDescriptor() ([]byte, []int) { + return file_model_fib_proto_rawDescGZIP(), []int{0, 0} } -func (m *FIBEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_FIBEntry.Merge(m, src) + +type FIBEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PhysAddress string `protobuf:"bytes,1,opt,name=phys_address,json=physAddress,proto3" json:"phys_address,omitempty"` // unique destination MAC address + BridgeDomain string `protobuf:"bytes,2,opt,name=bridge_domain,json=bridgeDomain,proto3" json:"bridge_domain,omitempty"` // name of bridge domain this FIB table entry belongs to + Action FIBEntry_Action `protobuf:"varint,3,opt,name=action,proto3,enum=mock.l2.FIBEntry_Action" json:"action,omitempty"` // action to tke on matching frames + OutgoingInterface string `protobuf:"bytes,4,opt,name=outgoing_interface,json=outgoingInterface,proto3" json:"outgoing_interface,omitempty"` // outgoing interface for matching frames +} + +func (x *FIBEntry) Reset() { + *x = FIBEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_model_fib_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *FIBEntry) XXX_Size() int { - return xxx_messageInfo_FIBEntry.Size(m) + +func (x *FIBEntry) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FIBEntry) XXX_DiscardUnknown() { - xxx_messageInfo_FIBEntry.DiscardUnknown(m) + +func (*FIBEntry) ProtoMessage() {} + +func (x *FIBEntry) ProtoReflect() protoreflect.Message { + mi := &file_model_fib_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_FIBEntry proto.InternalMessageInfo +// Deprecated: Use FIBEntry.ProtoReflect.Descriptor instead. +func (*FIBEntry) Descriptor() ([]byte, []int) { + return file_model_fib_proto_rawDescGZIP(), []int{0} +} -func (m *FIBEntry) GetPhysAddress() string { - if m != nil { - return m.PhysAddress +func (x *FIBEntry) GetPhysAddress() string { + if x != nil { + return x.PhysAddress } return "" } -func (m *FIBEntry) GetBridgeDomain() string { - if m != nil { - return m.BridgeDomain +func (x *FIBEntry) GetBridgeDomain() string { + if x != nil { + return x.BridgeDomain } return "" } -func (m *FIBEntry) GetAction() FIBEntry_Action { - if m != nil { - return m.Action +func (x *FIBEntry) GetAction() FIBEntry_Action { + if x != nil { + return x.Action } return FIBEntry_FORWARD } -func (m *FIBEntry) GetOutgoingInterface() string { - if m != nil { - return m.OutgoingInterface +func (x *FIBEntry) GetOutgoingInterface() string { + if x != nil { + return x.OutgoingInterface } return "" } -func init() { - proto.RegisterEnum("mock.l2.FIBEntry_Action", FIBEntry_Action_name, FIBEntry_Action_value) - proto.RegisterType((*FIBEntry)(nil), "mock.l2.FIBEntry") -} - -func init() { proto.RegisterFile("model/fib.proto", fileDescriptor_fe592485f465b8e1) } - -var fileDescriptor_fe592485f465b8e1 = []byte{ - // 216 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x8f, 0xb1, 0x4e, 0xc3, 0x30, - 0x14, 0x45, 0x31, 0x54, 0x69, 0x79, 0x2d, 0x50, 0xde, 0xe4, 0x8d, 0x52, 0x96, 0x2e, 0x18, 0x54, - 0xbe, 0x20, 0x28, 0x54, 0xea, 0x54, 0xe4, 0x85, 0x31, 0x72, 0x62, 0x37, 0x58, 0x34, 0x7e, 0x91, - 0x63, 0x86, 0xfc, 0x27, 0x1f, 0x84, 0xea, 0x24, 0xeb, 0x39, 0x57, 0xf7, 0xea, 0xc2, 0x5d, 0x4d, - 0xda, 0x9c, 0x5e, 0x8e, 0xb6, 0x10, 0x8d, 0xa7, 0x40, 0x38, 0xad, 0xa9, 0xfc, 0x11, 0xa7, 0xed, - 0xfa, 0x8f, 0xc1, 0x6c, 0xb7, 0x7f, 0xff, 0x70, 0xc1, 0x77, 0xf8, 0x08, 0x8b, 0xe6, 0xbb, 0x6b, - 0x73, 0xa5, 0xb5, 0x37, 0x6d, 0xcb, 0xd9, 0x8a, 0x6d, 0xae, 0xe5, 0xfc, 0xcc, 0xd2, 0x1e, 0xe1, - 0x13, 0xdc, 0x14, 0xde, 0xea, 0xca, 0xe4, 0x9a, 0x6a, 0x65, 0x1d, 0xbf, 0x8c, 0x99, 0x45, 0x0f, - 0xb3, 0xc8, 0xf0, 0x15, 0x12, 0x55, 0x06, 0x4b, 0x8e, 0x5f, 0xad, 0xd8, 0xe6, 0x76, 0xcb, 0xc5, - 0x30, 0x27, 0xc6, 0x29, 0x91, 0x46, 0x2f, 0x87, 0x1c, 0x3e, 0x03, 0xd2, 0x6f, 0xa8, 0xc8, 0xba, - 0x2a, 0xb7, 0x2e, 0x18, 0x7f, 0x54, 0xa5, 0xe1, 0x93, 0xd8, 0x7d, 0x3f, 0x9a, 0xfd, 0x28, 0xd6, - 0x0f, 0x90, 0xf4, 0x05, 0x38, 0x87, 0xe9, 0xee, 0x20, 0xbf, 0x52, 0x99, 0x2d, 0x2f, 0x70, 0x06, - 0x93, 0x4c, 0x1e, 0x3e, 0x97, 0xac, 0x48, 0xe2, 0xcd, 0xb7, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x0f, 0xd5, 0x15, 0x81, 0xf9, 0x00, 0x00, 0x00, +var File_model_fib_proto protoreflect.FileDescriptor + +var file_model_fib_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x66, 0x69, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x07, 0x6d, 0x6f, 0x63, 0x6b, 0x2e, 0x6c, 0x32, 0x22, 0xd4, 0x01, 0x0a, 0x08, 0x46, + 0x49, 0x42, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x79, 0x73, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x68, 0x79, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, + 0x30, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x18, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x2e, 0x6c, 0x32, 0x2e, 0x46, 0x49, 0x42, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, + 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x22, 0x1f, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4f, + 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x52, 0x4f, 0x50, 0x10, + 0x01, 0x42, 0x54, 0x5a, 0x52, 0x67, 0x6f, 0x2e, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x2e, 0x69, + 0x6f, 0x2f, 0x76, 0x70, 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x6b, 0x76, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x72, 0x2f, 0x6d, 0x6f, 0x63, 0x6b, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, + 0x2f, 0x69, 0x66, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x3b, + 0x6d, 0x6f, 0x63, 0x6b, 0x5f, 0x6c, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_model_fib_proto_rawDescOnce sync.Once + file_model_fib_proto_rawDescData = file_model_fib_proto_rawDesc +) + +func file_model_fib_proto_rawDescGZIP() []byte { + file_model_fib_proto_rawDescOnce.Do(func() { + file_model_fib_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_fib_proto_rawDescData) + }) + return file_model_fib_proto_rawDescData +} + +var file_model_fib_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_model_fib_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_fib_proto_goTypes = []interface{}{ + (FIBEntry_Action)(0), // 0: mock.l2.FIBEntry.Action + (*FIBEntry)(nil), // 1: mock.l2.FIBEntry +} +var file_model_fib_proto_depIdxs = []int32{ + 0, // 0: mock.l2.FIBEntry.action:type_name -> mock.l2.FIBEntry.Action + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_model_fib_proto_init() } +func file_model_fib_proto_init() { + if File_model_fib_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_fib_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FIBEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_model_fib_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_fib_proto_goTypes, + DependencyIndexes: file_model_fib_proto_depIdxs, + EnumInfos: file_model_fib_proto_enumTypes, + MessageInfos: file_model_fib_proto_msgTypes, + }.Build() + File_model_fib_proto = out.File + file_model_fib_proto_rawDesc = nil + file_model_fib_proto_goTypes = nil + file_model_fib_proto_depIdxs = nil } diff --git a/examples/kvscheduler/mock_plugins/l2plugin/model/fib.proto b/examples/kvscheduler/mock_plugins/l2plugin/model/fib.proto index 4d7d341912..fb44597c07 100644 --- a/examples/kvscheduler/mock_plugins/l2plugin/model/fib.proto +++ b/examples/kvscheduler/mock_plugins/l2plugin/model/fib.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package mock.l2; +option go_package = "go.ligato.io/vpp-agent/v3/examples/kvscheduler/mock_plugins/ifplugin/model;mock_l2"; + message FIBEntry { string phys_address = 1; /* unique destination MAC address */ string bridge_domain = 2; /* name of bridge domain this FIB table entry belongs to */ diff --git a/examples/kvscheduler/plugin_skeleton/with_metadata/descriptor/adapter/skeleton.go b/examples/kvscheduler/plugin_skeleton/with_metadata/descriptor/adapter/skeleton.go index 0cf6336907..ddda7e2a88 100644 --- a/examples/kvscheduler/plugin_skeleton/with_metadata/descriptor/adapter/skeleton.go +++ b/examples/kvscheduler/plugin_skeleton/with_metadata/descriptor/adapter/skeleton.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/examples/kvscheduler/plugin_skeleton/with_metadata/model" "go.ligato.io/vpp-agent/v3/examples/kvscheduler/plugin_skeleton/with_metadata/metaidx" diff --git a/examples/kvscheduler/plugin_skeleton/with_metadata/model/model.pb.go b/examples/kvscheduler/plugin_skeleton/with_metadata/model/model.pb.go index 5156026898..1effb09f1f 100644 --- a/examples/kvscheduler/plugin_skeleton/with_metadata/model/model.pb.go +++ b/examples/kvscheduler/plugin_skeleton/with_metadata/model/model.pb.go @@ -1,82 +1,153 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: model/model.proto package model import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ValueSkeleton struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // //logical name is often defined to build unique keys for value instances //- alternativelly, in the value model (keys.go), you may apply the //WithNameTemplate() option to generate value instance name using a golang //template, combining multiple value attributes that collectively //guarantee unique value identification (i.e. primary key) - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *ValueSkeleton) Reset() { *m = ValueSkeleton{} } -func (m *ValueSkeleton) String() string { return proto.CompactTextString(m) } -func (*ValueSkeleton) ProtoMessage() {} -func (*ValueSkeleton) Descriptor() ([]byte, []int) { - return fileDescriptor_312ac5bcab6cbb43, []int{0} +func (x *ValueSkeleton) Reset() { + *x = ValueSkeleton{} + if protoimpl.UnsafeEnabled { + mi := &file_model_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ValueSkeleton) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValueSkeleton.Unmarshal(m, b) -} -func (m *ValueSkeleton) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValueSkeleton.Marshal(b, m, deterministic) +func (x *ValueSkeleton) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ValueSkeleton) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValueSkeleton.Merge(m, src) -} -func (m *ValueSkeleton) XXX_Size() int { - return xxx_messageInfo_ValueSkeleton.Size(m) -} -func (m *ValueSkeleton) XXX_DiscardUnknown() { - xxx_messageInfo_ValueSkeleton.DiscardUnknown(m) + +func (*ValueSkeleton) ProtoMessage() {} + +func (x *ValueSkeleton) ProtoReflect() protoreflect.Message { + mi := &file_model_model_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ValueSkeleton proto.InternalMessageInfo +// Deprecated: Use ValueSkeleton.ProtoReflect.Descriptor instead. +func (*ValueSkeleton) Descriptor() ([]byte, []int) { + return file_model_model_proto_rawDescGZIP(), []int{0} +} -func (m *ValueSkeleton) GetName() string { - if m != nil { - return m.Name +func (x *ValueSkeleton) GetName() string { + if x != nil { + return x.Name } return "" } -func init() { - proto.RegisterType((*ValueSkeleton)(nil), "model.ValueSkeleton") +var File_model_model_proto protoreflect.FileDescriptor + +var file_model_model_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x23, 0x0a, 0x0d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x53, 0x6b, 0x65, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x5a, 0x5a, 0x58, 0x67, 0x6f, 0x2e, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, + 0x76, 0x70, 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x6b, 0x76, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x6b, 0x65, 0x6c, 0x65, 0x74, 0x6f, + 0x6e, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x3b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } -func init() { proto.RegisterFile("model/model.proto", fileDescriptor_312ac5bcab6cbb43) } +var ( + file_model_model_proto_rawDescOnce sync.Once + file_model_model_proto_rawDescData = file_model_model_proto_rawDesc +) + +func file_model_model_proto_rawDescGZIP() []byte { + file_model_model_proto_rawDescOnce.Do(func() { + file_model_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_model_proto_rawDescData) + }) + return file_model_model_proto_rawDescData +} -var fileDescriptor_312ac5bcab6cbb43 = []byte{ - // 82 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0xcd, 0x4f, 0x49, - 0xcd, 0xd1, 0x07, 0x93, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xac, 0x60, 0x8e, 0x92, 0x32, - 0x17, 0x6f, 0x58, 0x62, 0x4e, 0x69, 0x6a, 0x70, 0x76, 0x6a, 0x4e, 0x6a, 0x49, 0x7e, 0x9e, 0x90, - 0x10, 0x17, 0x4b, 0x5e, 0x62, 0x6e, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x98, 0x9d, - 0xc4, 0x06, 0xd6, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x82, 0xe4, 0x91, 0x47, 0x00, - 0x00, 0x00, +var file_model_model_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_model_proto_goTypes = []interface{}{ + (*ValueSkeleton)(nil), // 0: model.ValueSkeleton +} +var file_model_model_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_model_model_proto_init() } +func file_model_model_proto_init() { + if File_model_model_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValueSkeleton); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_model_model_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_model_proto_goTypes, + DependencyIndexes: file_model_model_proto_depIdxs, + MessageInfos: file_model_model_proto_msgTypes, + }.Build() + File_model_model_proto = out.File + file_model_model_proto_rawDesc = nil + file_model_model_proto_goTypes = nil + file_model_model_proto_depIdxs = nil } diff --git a/examples/kvscheduler/plugin_skeleton/with_metadata/model/model.proto b/examples/kvscheduler/plugin_skeleton/with_metadata/model/model.proto index a16fd54fff..1e643c4d6d 100644 --- a/examples/kvscheduler/plugin_skeleton/with_metadata/model/model.proto +++ b/examples/kvscheduler/plugin_skeleton/with_metadata/model/model.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package model; +option go_package = "go.ligato.io/vpp-agent/v3/examples/kvscheduler/plugin_skeleton/with_metadata/model;model"; + message ValueSkeleton { /* logical name is often defined to build unique keys for value instances diff --git a/examples/kvscheduler/plugin_skeleton/without_metadata/descriptor/adapter/skeleton.go b/examples/kvscheduler/plugin_skeleton/without_metadata/descriptor/adapter/skeleton.go index da6e7dc291..32e24580f6 100644 --- a/examples/kvscheduler/plugin_skeleton/without_metadata/descriptor/adapter/skeleton.go +++ b/examples/kvscheduler/plugin_skeleton/without_metadata/descriptor/adapter/skeleton.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/examples/kvscheduler/plugin_skeleton/without_metadata/model" ) diff --git a/examples/kvscheduler/plugin_skeleton/without_metadata/model/model.pb.go b/examples/kvscheduler/plugin_skeleton/without_metadata/model/model.pb.go index 5156026898..18241bf0cc 100644 --- a/examples/kvscheduler/plugin_skeleton/without_metadata/model/model.pb.go +++ b/examples/kvscheduler/plugin_skeleton/without_metadata/model/model.pb.go @@ -1,82 +1,153 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: model/model.proto package model import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ValueSkeleton struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // //logical name is often defined to build unique keys for value instances //- alternativelly, in the value model (keys.go), you may apply the //WithNameTemplate() option to generate value instance name using a golang //template, combining multiple value attributes that collectively //guarantee unique value identification (i.e. primary key) - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *ValueSkeleton) Reset() { *m = ValueSkeleton{} } -func (m *ValueSkeleton) String() string { return proto.CompactTextString(m) } -func (*ValueSkeleton) ProtoMessage() {} -func (*ValueSkeleton) Descriptor() ([]byte, []int) { - return fileDescriptor_312ac5bcab6cbb43, []int{0} +func (x *ValueSkeleton) Reset() { + *x = ValueSkeleton{} + if protoimpl.UnsafeEnabled { + mi := &file_model_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ValueSkeleton) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValueSkeleton.Unmarshal(m, b) -} -func (m *ValueSkeleton) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValueSkeleton.Marshal(b, m, deterministic) +func (x *ValueSkeleton) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ValueSkeleton) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValueSkeleton.Merge(m, src) -} -func (m *ValueSkeleton) XXX_Size() int { - return xxx_messageInfo_ValueSkeleton.Size(m) -} -func (m *ValueSkeleton) XXX_DiscardUnknown() { - xxx_messageInfo_ValueSkeleton.DiscardUnknown(m) + +func (*ValueSkeleton) ProtoMessage() {} + +func (x *ValueSkeleton) ProtoReflect() protoreflect.Message { + mi := &file_model_model_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ValueSkeleton proto.InternalMessageInfo +// Deprecated: Use ValueSkeleton.ProtoReflect.Descriptor instead. +func (*ValueSkeleton) Descriptor() ([]byte, []int) { + return file_model_model_proto_rawDescGZIP(), []int{0} +} -func (m *ValueSkeleton) GetName() string { - if m != nil { - return m.Name +func (x *ValueSkeleton) GetName() string { + if x != nil { + return x.Name } return "" } -func init() { - proto.RegisterType((*ValueSkeleton)(nil), "model.ValueSkeleton") +var File_model_model_proto protoreflect.FileDescriptor + +var file_model_model_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x23, 0x0a, 0x0d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x53, 0x6b, 0x65, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x5d, 0x5a, 0x5b, 0x67, 0x6f, 0x2e, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, + 0x76, 0x70, 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x6b, 0x76, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x73, 0x6b, 0x65, 0x6c, 0x65, 0x74, 0x6f, + 0x6e, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x3b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -func init() { proto.RegisterFile("model/model.proto", fileDescriptor_312ac5bcab6cbb43) } +var ( + file_model_model_proto_rawDescOnce sync.Once + file_model_model_proto_rawDescData = file_model_model_proto_rawDesc +) + +func file_model_model_proto_rawDescGZIP() []byte { + file_model_model_proto_rawDescOnce.Do(func() { + file_model_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_model_proto_rawDescData) + }) + return file_model_model_proto_rawDescData +} -var fileDescriptor_312ac5bcab6cbb43 = []byte{ - // 82 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0xcd, 0x4f, 0x49, - 0xcd, 0xd1, 0x07, 0x93, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xac, 0x60, 0x8e, 0x92, 0x32, - 0x17, 0x6f, 0x58, 0x62, 0x4e, 0x69, 0x6a, 0x70, 0x76, 0x6a, 0x4e, 0x6a, 0x49, 0x7e, 0x9e, 0x90, - 0x10, 0x17, 0x4b, 0x5e, 0x62, 0x6e, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x98, 0x9d, - 0xc4, 0x06, 0xd6, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x82, 0xe4, 0x91, 0x47, 0x00, - 0x00, 0x00, +var file_model_model_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_model_model_proto_goTypes = []interface{}{ + (*ValueSkeleton)(nil), // 0: model.ValueSkeleton +} +var file_model_model_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_model_model_proto_init() } +func file_model_model_proto_init() { + if File_model_model_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValueSkeleton); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_model_model_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_model_proto_goTypes, + DependencyIndexes: file_model_model_proto_depIdxs, + MessageInfos: file_model_model_proto_msgTypes, + }.Build() + File_model_model_proto = out.File + file_model_model_proto_rawDesc = nil + file_model_model_proto_goTypes = nil + file_model_model_proto_depIdxs = nil } diff --git a/examples/kvscheduler/plugin_skeleton/without_metadata/model/model.proto b/examples/kvscheduler/plugin_skeleton/without_metadata/model/model.proto index a16fd54fff..42ce250cf7 100644 --- a/examples/kvscheduler/plugin_skeleton/without_metadata/model/model.proto +++ b/examples/kvscheduler/plugin_skeleton/without_metadata/model/model.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package model; +option go_package = "go.ligato.io/vpp-agent/v3/examples/kvscheduler/plugin_skeleton/without_metadata/model;model"; + message ValueSkeleton { /* logical name is often defined to build unique keys for value instances diff --git a/examples/kvscheduler/vrf/main.go b/examples/kvscheduler/vrf/main.go index 1ab3a33a84..d3af956b8c 100644 --- a/examples/kvscheduler/vrf/main.go +++ b/examples/kvscheduler/vrf/main.go @@ -21,7 +21,7 @@ import ( "go.ligato.io/cn-infra/v2/agent" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/clientv2/linux/localclient" "go.ligato.io/vpp-agent/v3/plugins/orchestrator" diff --git a/examples/tutorials/05_kv-scheduler/adapter/interface.go b/examples/tutorials/05_kv-scheduler/adapter/interface.go index edf15bca2d..961de573f1 100644 --- a/examples/tutorials/05_kv-scheduler/adapter/interface.go +++ b/examples/tutorials/05_kv-scheduler/adapter/interface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/examples/tutorials/05_kv-scheduler/model" ) diff --git a/examples/tutorials/05_kv-scheduler/adapter/route.go b/examples/tutorials/05_kv-scheduler/adapter/route.go index ea6522e27b..224510f990 100644 --- a/examples/tutorials/05_kv-scheduler/adapter/route.go +++ b/examples/tutorials/05_kv-scheduler/adapter/route.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/examples/tutorials/05_kv-scheduler/model" ) diff --git a/examples/tutorials/05_kv-scheduler/descriptors.go b/examples/tutorials/05_kv-scheduler/descriptors.go index 8d5744ba52..f1ef3f2ef7 100644 --- a/examples/tutorials/05_kv-scheduler/descriptors.go +++ b/examples/tutorials/05_kv-scheduler/descriptors.go @@ -3,8 +3,8 @@ package main import ( "strings" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/examples/tutorials/05_kv-scheduler/adapter" "go.ligato.io/vpp-agent/v3/examples/tutorials/05_kv-scheduler/model" @@ -27,7 +27,7 @@ func NewIfDescriptor(logger logging.PluginLogger) *api.KVDescriptor { // Prefix for the descriptor-specific configuration NBKeyPrefix: ifPrefix, // A string value defining descriptor type - ValueTypeName: proto.MessageName(&model.Interface{}), + ValueTypeName: string(proto.MessageName(&model.Interface{})), // A unique identifier of the configuration (name, label) KeyLabel: func(key string) string { return strings.TrimPrefix(key, ifPrefix) @@ -76,7 +76,7 @@ func NewRouteDescriptor(logger logging.PluginLogger) *api.KVDescriptor { // Prefix for the descriptor-specific configuration NBKeyPrefix: routePrefix, // A string value defining descriptor type - ValueTypeName: proto.MessageName(&model.Route{}), + ValueTypeName: string(proto.MessageName(&model.Route{})), // A unique identifier of the configuration (name, label) KeyLabel: descriptorCtx.KeyLabel, // Returns true if the provided key is relevant for this descriptor is some way diff --git a/examples/tutorials/05_kv-scheduler/model/model.pb.go b/examples/tutorials/05_kv-scheduler/model/model.pb.go index 7c5b33e510..118cc36f6a 100644 --- a/examples/tutorials/05_kv-scheduler/model/model.pb.go +++ b/examples/tutorials/05_kv-scheduler/model/model.pb.go @@ -1,125 +1,218 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: model/model.proto package model import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type Interface struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Interface) Reset() { *m = Interface{} } -func (m *Interface) String() string { return proto.CompactTextString(m) } -func (*Interface) ProtoMessage() {} -func (*Interface) Descriptor() ([]byte, []int) { - return fileDescriptor_312ac5bcab6cbb43, []int{0} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *Interface) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Interface.Unmarshal(m, b) -} -func (m *Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Interface.Marshal(b, m, deterministic) -} -func (m *Interface) XXX_Merge(src proto.Message) { - xxx_messageInfo_Interface.Merge(m, src) +func (x *Interface) Reset() { + *x = Interface{} + if protoimpl.UnsafeEnabled { + mi := &file_model_model_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Interface) XXX_Size() int { - return xxx_messageInfo_Interface.Size(m) + +func (x *Interface) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Interface) XXX_DiscardUnknown() { - xxx_messageInfo_Interface.DiscardUnknown(m) + +func (*Interface) ProtoMessage() {} + +func (x *Interface) ProtoReflect() protoreflect.Message { + mi := &file_model_model_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Interface proto.InternalMessageInfo +// Deprecated: Use Interface.ProtoReflect.Descriptor instead. +func (*Interface) Descriptor() ([]byte, []int) { + return file_model_model_proto_rawDescGZIP(), []int{0} +} -func (m *Interface) GetName() string { - if m != nil { - return m.Name +func (x *Interface) GetName() string { + if x != nil { + return x.Name } return "" } type Route struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - InterfaceName string `protobuf:"bytes,2,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Route) Reset() { *m = Route{} } -func (m *Route) String() string { return proto.CompactTextString(m) } -func (*Route) ProtoMessage() {} -func (*Route) Descriptor() ([]byte, []int) { - return fileDescriptor_312ac5bcab6cbb43, []int{1} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + InterfaceName string `protobuf:"bytes,2,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"` } -func (m *Route) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Route.Unmarshal(m, b) -} -func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Route.Marshal(b, m, deterministic) -} -func (m *Route) XXX_Merge(src proto.Message) { - xxx_messageInfo_Route.Merge(m, src) +func (x *Route) Reset() { + *x = Route{} + if protoimpl.UnsafeEnabled { + mi := &file_model_model_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Route) XXX_Size() int { - return xxx_messageInfo_Route.Size(m) + +func (x *Route) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Route) XXX_DiscardUnknown() { - xxx_messageInfo_Route.DiscardUnknown(m) + +func (*Route) ProtoMessage() {} + +func (x *Route) ProtoReflect() protoreflect.Message { + mi := &file_model_model_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Route proto.InternalMessageInfo +// Deprecated: Use Route.ProtoReflect.Descriptor instead. +func (*Route) Descriptor() ([]byte, []int) { + return file_model_model_proto_rawDescGZIP(), []int{1} +} -func (m *Route) GetName() string { - if m != nil { - return m.Name +func (x *Route) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Route) GetInterfaceName() string { - if m != nil { - return m.InterfaceName +func (x *Route) GetInterfaceName() string { + if x != nil { + return x.InterfaceName } return "" } -func init() { - proto.RegisterType((*Interface)(nil), "model.Interface") - proto.RegisterType((*Route)(nil), "model.Route") +var File_model_model_proto protoreflect.FileDescriptor + +var file_model_model_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x1f, 0x0a, 0x09, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x42, 0x0a, 0x05, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, + 0x4a, 0x5a, 0x48, 0x67, 0x6f, 0x2e, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, + 0x76, 0x70, 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x74, 0x75, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x2f, + 0x30, 0x35, 0x5f, 0x6b, 0x76, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x3b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_model_model_proto_rawDescOnce sync.Once + file_model_model_proto_rawDescData = file_model_model_proto_rawDesc +) + +func file_model_model_proto_rawDescGZIP() []byte { + file_model_model_proto_rawDescOnce.Do(func() { + file_model_model_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_model_proto_rawDescData) + }) + return file_model_model_proto_rawDescData } -func init() { proto.RegisterFile("model/model.proto", fileDescriptor_312ac5bcab6cbb43) } +var file_model_model_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_model_model_proto_goTypes = []interface{}{ + (*Interface)(nil), // 0: model.Interface + (*Route)(nil), // 1: model.Route +} +var file_model_model_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} -var fileDescriptor_312ac5bcab6cbb43 = []byte{ - // 108 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0xcd, 0x4f, 0x49, - 0xcd, 0xd1, 0x07, 0x93, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xac, 0x60, 0x8e, 0x92, 0x3c, - 0x17, 0xa7, 0x67, 0x5e, 0x49, 0x6a, 0x51, 0x5a, 0x62, 0x72, 0xaa, 0x90, 0x10, 0x17, 0x4b, 0x5e, - 0x62, 0x6e, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x98, 0xad, 0xe4, 0xc4, 0xc5, 0x1a, - 0x94, 0x5f, 0x5a, 0x82, 0x55, 0x52, 0x48, 0x95, 0x8b, 0x2f, 0x13, 0xa6, 0x3b, 0x1e, 0x2c, 0xcb, - 0x04, 0x96, 0xe5, 0x85, 0x8b, 0xfa, 0x25, 0xe6, 0xa6, 0x26, 0xb1, 0x81, 0xad, 0x34, 0x06, 0x04, - 0x00, 0x00, 0xff, 0xff, 0x5c, 0xb1, 0x1d, 0x01, 0x87, 0x00, 0x00, 0x00, +func init() { file_model_model_proto_init() } +func file_model_model_proto_init() { + if File_model_model_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_model_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Interface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_model_model_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Route); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_model_model_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_model_proto_goTypes, + DependencyIndexes: file_model_model_proto_depIdxs, + MessageInfos: file_model_model_proto_msgTypes, + }.Build() + File_model_model_proto = out.File + file_model_model_proto_rawDesc = nil + file_model_model_proto_goTypes = nil + file_model_model_proto_depIdxs = nil } diff --git a/examples/tutorials/05_kv-scheduler/model/model.proto b/examples/tutorials/05_kv-scheduler/model/model.proto index f3b4c63c81..fb4b212f8b 100644 --- a/examples/tutorials/05_kv-scheduler/model/model.proto +++ b/examples/tutorials/05_kv-scheduler/model/model.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package model; +option go_package = "go.ligato.io/vpp-agent/v3/examples/tutorials/05_kv-scheduler/model;model"; + message Interface { string name = 1; } diff --git a/go.mod b/go.mod index fd9a503817..a292d07ee5 100644 --- a/go.mod +++ b/go.mod @@ -8,12 +8,11 @@ require ( github.com/alecthomas/jsonschema v0.0.0-20200217214135-7152f22193c9 github.com/alicebob/miniredis v2.5.0+incompatible // indirect github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2 - github.com/coreos/bbolt v1.3.3 // indirect - github.com/coreos/etcd v3.3.13+incompatible + github.com/containerd/containerd v1.4.12 // indirect github.com/coreos/go-iptables v0.4.5 github.com/coreos/go-semver v0.3.0 // indirect github.com/docker/cli v0.0.0-20190822175708-578ab52ece34 - github.com/docker/docker v17.12.0-ce-rc1.0.20200505174321-1655290016ac+incompatible + github.com/docker/docker v20.10.12+incompatible github.com/fatih/color v1.10.0 // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/fsouza/go-dockerclient v1.6.6 @@ -21,15 +20,13 @@ require ( github.com/go-errors/errors v1.0.1 github.com/goccy/go-graphviz v0.0.6 github.com/goccy/go-yaml v1.8.0 - github.com/golang/protobuf v1.4.2 - github.com/google/go-cmp v0.5.5 + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/go-cmp v0.5.6 github.com/gorilla/mux v1.8.0 - github.com/gorilla/websocket v1.4.1 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/grpc-ecosystem/grpc-gateway v1.11.3 // indirect - github.com/hashicorp/go-uuid v1.0.1 // indirect github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 - github.com/jhump/protoreflect v1.7.0 + github.com/jhump/protoreflect v1.10.1 github.com/jonboulle/clockwork v0.2.2 // indirect github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936 @@ -37,30 +34,33 @@ require ( github.com/namsral/flag v1.7.4-pre github.com/olekukonko/tablewriter v0.0.4 github.com/onsi/gomega v1.10.3 - github.com/opencontainers/runc v1.0.0-rc5 // indirect + github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/opencontainers/runc v1.0.3 // indirect github.com/pkg/errors v0.9.1 github.com/pkg/profile v1.5.0 - github.com/prometheus/client_golang v0.9.3 - github.com/sirupsen/logrus v1.6.0 + github.com/prometheus/client_golang v1.4.0 + github.com/segmentio/textio v1.2.0 + github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v0.0.7 github.com/spf13/pflag v1.0.3 github.com/spf13/viper v1.4.0 github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d - github.com/vishvananda/netlink v0.0.0-20180910184128-56b1bd27a9a3 - github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc + github.com/vishvananda/netlink v1.1.0 + github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 // indirect - go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20200313154441-b0d4c1b11c73 + go.etcd.io/etcd v0.5.0-alpha.5.0.20210419091813-4276c3302675 + go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220111104833-05747d9d2783 go.uber.org/multierr v1.2.0 // indirect - golang.org/x/net v0.0.0-20201021035429-f5854403a974 - golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 // indirect - golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 - golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/genproto v0.0.0-20200601130524-0f60399e6634 // indirect - google.golang.org/grpc v1.29.1 - google.golang.org/protobuf v1.25.0 + golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420 + golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 + google.golang.org/grpc v1.38.0 + google.golang.org/protobuf v1.27.1 gotest.tools/v3 v3.0.3 // indirect ) + +replace google.golang.org/grpc => google.golang.org/grpc v1.27.0 + +replace go.etcd.io/etcd => github.com/coreos/etcd v0.5.0-alpha.5.0.20210419091813-4276c3302675 diff --git a/go.sum b/go.sum index 0cbe00796c..b39b0630fb 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,52 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= -cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.85.0 h1:SXzDv2gGwe7wksUfLX+rGaqYoXVpfJE6KtHD2vtzRcs= +cloud.google.com/go v0.85.0/go.mod h1:HOusalN+gIoNqMWdD2t7SftJE5iXvz0BbMjUyjFaRNo= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.fd.io/govpp.git v0.3.6-0.20210810100027-c0da1f2999a6 h1:dZPJ0JRnoHevxdXhonJG9MtkYD6qXitFMr7gAONwLks= git.fd.io/govpp.git v0.3.6-0.20210810100027-c0da1f2999a6/go.mod h1:OCVd4W8SH+666KRQoMj6PM+oipLDZAHhqMz9B1TGbgI= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.3.5 h1:DtpNbljikUepEPD16hD4LvIcmhnhdLTiW/5pHgbmp14= github.com/DataDog/zstd v1.3.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= @@ -25,22 +65,30 @@ github.com/Songmu/prompter v0.0.0-20150725163906-b5721e8d5566/go.mod h1:fNhSFBGC github.com/alecthomas/jsonschema v0.0.0-20200217214135-7152f22193c9 h1:h+KAZEUnNceFhqyH46BgwH4lk8m6pdR/3x3h7IPn7VA= github.com/alecthomas/jsonschema v0.0.0-20200217214135-7152f22193c9/go.mod h1:/n6+1/DWPltRLWL/VKyUxg6tzsl5kHUCcraimt4vr60= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6 h1:45bxf7AZMwWcqkLzDAQugVEwedisr5nRJ1r+7LYnv0U= github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/miniredis v2.4.5+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= github.com/alicebob/miniredis v2.5.0+incompatible h1:yBHoLpsyjupjz3NL3MhKMVkR41j82Yjf3KFv7ApYzUI= github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.0 h1:B7AQgHi8QSEi4uHu7Sbsga+IJDU+CENgjxoo81vDUqU= -github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= +github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= +github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/bennyscetbun/jsongo v1.1.0 h1:ZDSks3aLP13jhY139lWaUqZaU8G0tELMohzumut/KDM= github.com/bennyscetbun/jsongo v1.1.0/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boltdb/bolt v1.3.2-0.20180302180052-fd01fc79c553/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= @@ -49,21 +97,29 @@ github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR github.com/bsm/sarama-cluster v2.1.15+incompatible h1:RkV6WiNRnqEEbp81druK8zYhmnIgdOjqSVi0+9Cnl2A= github.com/bsm/sarama-cluster v2.1.15+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2 h1:tjT4Jp4gxECvsJcYpAMtW2I3YqzBTPuB67OejxXs86s= github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2/go.mod h1:mk5IQ+Y0ZeO87b858TlA645sVcEcbiX6YqP98kt+7+w= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.4 h1:3o0smo5SKY7H6AJCmJhsnCjR2/V2T8VmiHt7seN2/kI= github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.12 h1:V+SHzYmhng/iju6M5nFrpTTusrhidoxKTwdwLw+u4c4= +github.com/containerd/containerd v1.4.12/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb h1:nXPkFq8X1a9ycY3GYQpFNxHh3j2JgY7zDZfq2EXMIzk= github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= @@ -71,29 +127,32 @@ github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/coreos/bbolt v1.3.1-etcd.8/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= -github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v0.5.0-alpha.5.0.20210419091813-4276c3302675 h1:Fzy3ekXL5JFCoG5bndcm97eGExqx3wYU5NEgfulE2uU= +github.com/coreos/etcd v0.5.0-alpha.5.0.20210419091813-4276c3302675/go.mod h1:q+i20RPAmay+xq8LJ3VMOhXCNk4YCk3V7QP91meFavw= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-iptables v0.4.5 h1:DpHb9vJrZQEFMcVLFKAAGMUVX0XoRC0ptCthinRYm38= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/corona10/goimagehash v1.0.2 h1:pUfB0LnsJASMPGEZLj7tGY251vF+qLGqOgEP4rUs6kA= github.com/corona10/goimagehash v1.0.2/go.mod h1:/l9umBhvcHQXVtQO1V6Gp1yD20STawkhRnnX0D1bvVI= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -102,14 +161,15 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/cli v0.0.0-20190822175708-578ab52ece34 h1:H/dVI9lW9zuagcDsmBz2cj8E8paBX5FarjO7oQCpbVA= github.com/docker/cli v0.0.0-20190822175708-578ab52ece34/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v17.12.0-ce-rc1.0.20200505174321-1655290016ac+incompatible h1:ZxJX4ZSNg1LORBsStUojbrLfkrE3Ut122XhzyZnN110= github.com/docker/docker v17.12.0-ce-rc1.0.20200505174321-1655290016ac+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.12+incompatible h1:CEeNmFM0QZIsJCZKMkZx0ZcahTiewkrgiwfYD+dfl1U= +github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -119,21 +179,21 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evalphobia/logrus_fluent v0.4.0 h1:uYIgSLezcopy6V7Epr5yIvsnzGqH+bE/62b32xIEe+A= github.com/evalphobia/logrus_fluent v0.4.0/go.mod h1:hasyj+CXm3BDP1YhFk/rnTcjlegyqvkokV9A25cQsaA= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fluent/fluent-logger-golang v1.3.0 h1:oBolFKS9fY9HReChzaX1RQF5GkdNdByrledPTfUWoGA= github.com/fluent/fluent-logger-golang v1.3.0/go.mod h1:2/HCT/jTy78yGyeNGQLGQsjF3zzzAuy6Xlk6FCMV5eU= github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3BTYk= github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= +github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -145,7 +205,11 @@ github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= @@ -161,33 +225,54 @@ github.com/goccy/go-yaml v1.8.0 h1:WCe9sBiI0oZb6EC6f3kq3dv0+aEiNdstT7b4xxq4MJQ= github.com/goccy/go-yaml v1.8.0/go.mod h1:wS4gNoLalDSJxo/SpngzPQ2BN4uuZVLCmbM4S3vd4+Y= github.com/gocql/gocql v0.0.0-20181030013202-a84ce58083d3/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 h1:uHTyIjqVhYRhLbJ8nIiOJHkEZZ+5YoOsAbD3sk82NiE= -github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -197,83 +282,131 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.11.3 h1:h8+NsYENhxNTuq+dobk3+ODoJtwY4Fu0WQXsxJfL8aM= github.com/grpc-ecosystem/grpc-gateway v1.11.3/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= -github.com/hashicorp/consul v1.3.0 h1:0ihJs1J8ejURfAbwhwv+USnf4oyqfAddv/3xXXv4ltg= -github.com/hashicorp/consul v1.3.0/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI= +github.com/hashicorp/consul/api v1.12.0 h1:k3y1FYv6nuKyNTqj6w9gXOx5r5CfLj/k/euUeBXj1OY= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.12.0 h1:d4QkX8FRTYaKaCZBoXYY8zJX2BXjWxurN/GA2tkrmZM= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 h1:VBj0QYQ0u2MCJzBfeYXGexnAl17GsH1yidnoxCqqD9E= -github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90/go.mod h1:o4zcYY1e0GEZI6eSEr+43QDYmuGglw1qSO6qdHUHCgg= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/memberlist v0.1.5 h1:AYBsgJOW9gab/toO5tEB8lWetVgDKZycqkebJ8xxpqM= -github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.1 h1:mYs6SMzu72+90OcPa5wr3nfznA4Dw9UyR791ZFNOIf4= -github.com/hashicorp/serf v0.8.1/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.3.0 h1:8+567mCcFDnS5ADl7lrpxPMWiFCElyUEeW0gtj34fMA= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.6 h1:uuEX1kLR6aoda1TBttmJQKDLZE1Ob7KN0NPdE7EtCDc= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/howeyc/crc16 v0.0.0-20171223171357-2b2a61e366a6 h1:IIVxLyDUYErC950b8kecjoqDet8P5S4lcVRUOM6rdkU= github.com/howeyc/crc16 v0.0.0-20171223171357-2b2a61e366a6/go.mod h1:JslaLRrzGsOKJgFEPBP65Whn+rdwDQSk0I0MCRFe2Zw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.7.0 h1:qJ7piXPrjP3mDrfHf5ATkxfLix8ANs226vpo0aACOn0= -github.com/jhump/protoreflect v1.7.0/go.mod h1:RZkzh7Hi9J7qT/sPlWnJ/UwZqCJvciFxKDA0UCeltSM= +github.com/jhump/protoreflect v1.10.1 h1:iH+UZfsbRE6vpyZH7asAjTPWJf7RJbpZ9j/N3lDlKs0= +github.com/jhump/protoreflect v1.10.1/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= -github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -284,41 +417,52 @@ github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe/go.mod h1:vy1vK6w github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/maraino/go-mock v0.0.0-20180321183845-4c74c434cd3a/go.mod h1:KpdDhCgE2rvPhsnLbGZ8Uf1QORj6v92FOgFKnCz5CXM= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936 h1:kw1v0NlnN+GZcU8Ma8CLF2Zzgjfx95gs3/GN3vYAPpo= github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/moby/sys/mount v0.1.0 h1:Ytx78EatgFKtrqZ0BvJ0UtJE472ZvawVmil6pIfuCCU= github.com/moby/sys/mount v0.1.0/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74= -github.com/moby/sys/mountinfo v0.1.0 h1:r8vMRbMAFEAfiNptYVokP+nfxPJzvRuia5e2vzXtENo= github.com/moby/sys/mountinfo v0.1.0/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= +github.com/moby/sys/mountinfo v0.4.1 h1:1O+1cHA1aujwEwwVMa2Xm2l+gIpUHyd3+D+d7LZh1kM= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/term v0.0.0-20200429084858-129dac9f73f6 h1:3Y9aosU6S5Bo8GYH0s+t1ej4m30GuUKvQ3c9ZLqdL28= github.com/moby/term v0.0.0-20200429084858-129dac9f73f6/go.mod h1:or9wGItza1sRcM4Wd3dIv8DsFHYQuFsMHEdxUIlUxms= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/namsral/flag v1.7.4-pre h1:b2ScHhoCUkbsq0d2C15Mv+VU8bl8hAXV8arnWiOHNZs= github.com/namsral/flag v1.7.4-pre/go.mod h1:OXldTctbM6SWH1K899kPZcf65KxJiD7MsceFUpB5yDo= @@ -328,6 +472,7 @@ github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -344,13 +489,16 @@ github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDs github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc5 h1:rYjdzMDXVly2Av0RLs3nf/iVkaWh2UrDhuTdTT2KggQ= -github.com/opencontainers/runc v1.0.0-rc5/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.3 h1:1hbqejyQWCJBvtKAfdO0b1FmaEf2z/bxnjqbARass5k= +github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -370,41 +518,49 @@ github.com/pkg/profile v1.5.0 h1:042Buzk+NhDI+DeSAA62RwJL8VAuZUMQZUjCsRz1Mug= github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0 h1:YVIb/fVcOTMSqtqZWSKnHpSLBxu8DKgxq8z6RuBZwqI= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM= -github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/segmentio/textio v1.2.0 h1:Ug4IkV3kh72juJbG8azoSBlgebIbUUxVNrfFcKHfTSQ= +github.com/segmentio/textio v1.2.0/go.mod h1:+Rb7v0YVODP+tK5F7FD9TCkV7gOYx9IgLHWiqtvY8ag= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -413,36 +569,43 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.7 h1:FfTH+vuMXOas8jmfb5/M7dzEYx7LpcLb7a0LPe34uOU= github.com/spf13/cobra v0.0.7/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tinylib/msgp v1.0.2 h1:DfdQrzQa7Yh2es9SuLkixqxuXS2SxsdYn0KbdrOGWD8= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966 h1:j6JEOq5QWFker+d7mFQYOhjTZonQ7YkLTHm56dbn+yM= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d h1:ggUgChAeyge4NZ4QUw6lhHsVymzwSDJOZcE0s2X8S20= github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d/go.mod h1:tu82oB5W2ykJRVioYsB+IQKcft7ryBr7w12qMBUPyXg= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/vishvananda/netlink v0.0.0-20180910184128-56b1bd27a9a3 h1:oQccJ/ewO6mMMoDST1l1QNv4wHgYJrjPgB02iO0QWHk= -github.com/vishvananda/netlink v0.0.0-20180910184128-56b1bd27a9a3/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc h1:R83G5ikgLMxrBvLh22JhdfI8K6YXEPHx5P03Uu3DRs4= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/willfaught/gockle v0.0.0-20160623235217-4f254e1e0f0a/go.mod h1:NLcF+3nDpXVIZatjn5Z97gKzFFVU7TzgbAcs8G7/Jrs= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -450,153 +613,382 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.1.0 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehpNAaZg= github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/gopher-lua v0.0.0-20181031023651-12c4817b42c5/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 h1:1b6PAtenNyhsmo/NKXVe34h7JEZKva1YB/ne7K7mqKM= github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20200313154441-b0d4c1b11c73 h1:sJFlfW8T9HF+5FkVRvhXnMrcMWSw8PVwDURzi5YiZ9o= -go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20200313154441-b0d4c1b11c73/go.mod h1:mYLtG2Bq3C/SOUUafEe8JOwdqohd4NVYl6Bu/nh/O8Y= +go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220111104833-05747d9d2783 h1:8mgVnfYJh106V3jvEC+5+OuyJvf872ORS/pjLXK+9UE= +go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220111104833-05747d9d2783/go.mod h1:DKuJBQLtHDAs9i6ysa5P49cbEX7ddscedE1T6qfot3Q= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.2.0 h1:6I+W7f5VwC5SV9dNrZ3qXrDB9mD0dyGOi/ZJmYw03T4= go.uber.org/multierr v1.2.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200119044424-58c23975cae1 h1:5h3ngYt7+vXCDZCup/HkCQgW5XwmSvR/nA2JmJ0RErg= golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108150841-be88a9aa50a1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420 h1:a8jGStKg0XqKDlKqjLrXn0ioF5MH36pT7Z0BRTqLhbk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210615190721-d04028783cf1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 h1:3B43BWw0xEBsLZ/NO1VALz6fppU3481pik+2Ksv45z8= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181031143558-9b800f95dbbc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200610111108-226ff32320da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 h1:myAQVi0cGEoqQVR5POX+8RR2mrocKqNN1hmeMqhX27k= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0 h1:xQwXv67TxFo9nC1GJFyab5eq/5B590r6RlnL/G8Sz7w= -golang.org/x/time v0.0.0-20190921001708-c4c64cad1fd0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.49.0/go.mod h1:BECiH72wsfwUvOVn3+btPD5WHi0LzavZReBndi42L18= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181101192439-c830210a61df/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200601130524-0f60399e6634 h1:yUEnIJPm1I2GGauN1xOkwj6gXw/3t1R+HA1r/cdnkHE= -google.golang.org/genproto v0.0.0-20200601130524-0f60399e6634/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210629200056-84d6f6074151 h1:H/uPzsolsGjhl3CVT6Wb7bK+mf+hmkEvUVu+FBKyNlc= +google.golang.org/genproto v0.0.0-20210629200056-84d6f6074151/go.mod h1:yiaVoXHpRzHGyxV3o4DktVWY4mSUErTKaeEOq6C3t3U= +google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -606,13 +998,19 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= @@ -628,15 +1026,26 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/pkg/models/api.go b/pkg/models/api.go index 8434f8a8d4..baf93e2ac5 100644 --- a/pkg/models/api.go +++ b/pkg/models/api.go @@ -17,15 +17,16 @@ package models import ( "reflect" - "github.com/golang/protobuf/proto" - "go.ligato.io/vpp-agent/v3/proto/ligato/generic" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" + + "go.ligato.io/vpp-agent/v3/proto/ligato/generic" ) // ModelInfo represents model information retrieved using meta service type ModelInfo struct { - generic.ModelDetail + *generic.ModelDetail // MessageDescriptor is the proto message descriptor of the message represented by this ModelInfo struct MessageDescriptor protoreflect.MessageDescriptor diff --git a/pkg/models/item.go b/pkg/models/item.go index 2314762793..348fa7bcd4 100644 --- a/pkg/models/item.go +++ b/pkg/models/item.go @@ -19,13 +19,11 @@ import ( "path" "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" - types "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/any" - api "go.ligato.io/vpp-agent/v3/proto/ligato/generic" - protoV2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/known/anypb" + + api "go.ligato.io/vpp-agent/v3/proto/ligato/generic" ) // This constant is used as prefix for TypeUrl when marshalling to Any. @@ -49,11 +47,11 @@ func MarshalItemUsingModelRegistry(pb proto.Message, modelRegistry Registry) (*a return nil, errors.Errorf("can't compute model instance name due to: %v (message %+v)", err, pb) } - any, err := types.MarshalAny(pb) + any, err := anypb.New(pb) if err != nil { return nil, err } - any.TypeUrl = ligatoModels + string(proto.MessageV2(pb).ProtoReflect().Descriptor().FullName()) + any.TypeUrl = ligatoModels + string(pb.ProtoReflect().Descriptor().FullName()) item := &api.Item{ Id: &api.Item_ID{ @@ -93,25 +91,26 @@ func UnmarshalItemUsingModelRegistry(item *api.Item, modelRegistry Registry) (pr // unmarshalItemDataAnyOfRemoteModel unmarshalls the generic data part of api.Item that has remote model. // The unmarshalled proto.Message will have dynamic type (*dynamicpb.Message). -func unmarshalItemDataAnyOfRemoteModel(itemAny *any.Any, msgTypeResolver *protoregistry.Types) (proto.Message, error) { - msg, err := anypb.UnmarshalNew(itemAny, protoV2.UnmarshalOptions{ +func unmarshalItemDataAnyOfRemoteModel(itemAny *anypb.Any, msgTypeResolver *protoregistry.Types) (proto.Message, error) { + msg, err := anypb.UnmarshalNew(itemAny, proto.UnmarshalOptions{ Resolver: msgTypeResolver, }) if err != nil { return nil, err } - return proto.MessageV1(msg), nil + return msg, nil } // unmarshalItemDataAnyOfLocalModel unmarshalls the generic data part of api.Item that has local model. // The unmarshalled proto.Message will have the go type of model generated go structures (that is due to // go type registering in init() method of generated go structures file). -func unmarshalItemDataAnyOfLocalModel(itemAny *any.Any) (proto.Message, error) { - var any types.DynamicAny // local - if err := types.UnmarshalAny(itemAny, &any); err != nil { +func unmarshalItemDataAnyOfLocalModel(itemAny *anypb.Any) (proto.Message, error) { + // var any types.DynamicAny + m, err := anypb.UnmarshalNew(itemAny, proto.UnmarshalOptions{}) + if err != nil { return nil, err } - return any.Message, nil + return m, nil } // GetModelForItem returns model for given item. diff --git a/pkg/models/item_test.go b/pkg/models/item_test.go index 0fd3c8be48..a051098208 100644 --- a/pkg/models/item_test.go +++ b/pkg/models/item_test.go @@ -17,8 +17,9 @@ package models_test import ( "testing" - "github.com/golang/protobuf/proto" . "github.com/onsi/gomega" + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/pkg/models" testmodel "go.ligato.io/vpp-agent/v3/pkg/models/testdata/proto" @@ -41,7 +42,7 @@ func TestEncode(t *testing.T) { if err != nil { t.Fatalf("marshal error: %v", err) } - t.Logf("marshalled:\n%+v", proto.MarshalTextString(item)) + t.Logf("marshalled:\n%+v", prototext.Format(item)) tc.Expect(item.GetData().GetAny().GetTypeUrl()). To(Equal("models.ligato.io/model.Basic")) @@ -50,7 +51,7 @@ func TestEncode(t *testing.T) { if err != nil { t.Fatalf("unmarshal error: %v", err) } - t.Logf("unmarshalled:\n%+v", proto.MarshalTextString(out)) + t.Logf("unmarshalled:\n%+v", prototext.Format(out)) } func TestDecode(t *testing.T) { @@ -70,7 +71,7 @@ func TestDecode(t *testing.T) { if err != nil { t.Fatalf("marshal error: %v", err) } - t.Logf("marshalled:\n%+v", proto.MarshalTextString(item)) + t.Logf("marshalled:\n%+v", prototext.Format(item)) tc.Expect(item.GetId().GetModel()).To(Equal("module.basic")) tc.Expect(item.GetId().GetName()).To(Equal("basic1")) @@ -82,7 +83,7 @@ func TestDecode(t *testing.T) { if err != nil { t.Fatalf("unmarshal error: %v", err) } - t.Logf("unmarshalled:\n%+v", proto.MarshalTextString(out)) + t.Logf("unmarshalled:\n%+v", prototext.Format(out)) tc.Expect(proto.Equal(in, out)).To(BeTrue()) } diff --git a/pkg/models/model.go b/pkg/models/model.go index 5c084008e7..88e844b775 100644 --- a/pkg/models/model.go +++ b/pkg/models/model.go @@ -18,9 +18,10 @@ import ( "reflect" "strings" - "github.com/golang/protobuf/proto" - "go.ligato.io/vpp-agent/v3/proto/ligato/generic" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" + + "go.ligato.io/vpp-agent/v3/proto/ligato/generic" ) // LocallyKnownModel represents a registered local model (local model has go types compiled into program binary) diff --git a/pkg/models/models.go b/pkg/models/models.go index 6c915983bd..0e88e3da56 100644 --- a/pkg/models/models.go +++ b/pkg/models/models.go @@ -20,8 +20,9 @@ import ( "strings" "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" - protoV2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoimpl" "google.golang.org/protobuf/types/dynamicpb" ) @@ -49,7 +50,7 @@ func GetModel(name string) (KnownModel, error) { return GetModelFromRegistry(name, DefaultRegistry) } -// GetModel returns registered model in given registry for given model name. +// GetModelFromRegistry returns registered model in given registry for given model name. func GetModelFromRegistry(name string, modelRegistry Registry) (KnownModel, error) { return modelRegistry.GetModel(name) } @@ -94,7 +95,7 @@ func GetKey(x proto.Message) (string, error) { return GetKeyUsingModelRegistry(x, DefaultRegistry) } -// GetKey returns complete key for given model from given model registry, +// GetKeyUsingModelRegistry returns complete key for given model from given model registry, // including key prefix defined by model specification. // It returns error if given model is not registered. func GetKeyUsingModelRegistry(message proto.Message, modelRegistry Registry) (string, error) { @@ -166,14 +167,16 @@ func DynamicLocallyKnownMessageToGeneratedMessage(dynamicMessage *dynamicpb.Mess } else { registeredGoType = reflect.Zero(goType).Interface() } - message, isProtoV1 := registeredGoType.(proto.Message) - if !isProtoV1 { - messageV2, isProtoV2 := registeredGoType.(protoV2.Message) - if !isProtoV2 { - return nil, errors.Errorf("registered go type(%T) is not proto.Message", registeredGoType) - } - message = proto.MessageV1(messageV2) - } + + /*message, isProtoV2 := registeredGoType.(protoreflect.ProtoMessage) + if !isProtoV2 { + messageV1, isProtoV1 := registeredGoType.(protoiface.MessageV1) + if !isProtoV1 { + return nil, errors.Errorf("registered go type(%T) is not proto.Message", registeredGoType) + } + message = protoimpl.X.ProtoMessageV2Of(messageV1) + }*/ + message := protoMessageOf(registeredGoType) // fill empty statically-generated proto message with data from its dynamic proto message counterpart // (alternative approach to this is marshalling dynamicMessage to json and unmarshalling it back to message) @@ -181,3 +184,7 @@ func DynamicLocallyKnownMessageToGeneratedMessage(dynamicMessage *dynamicpb.Mess return message, nil } + +func protoMessageOf(m interface{}) protoreflect.ProtoMessage { + return protoimpl.X.ProtoMessageV2Of(m) +} diff --git a/pkg/models/option.go b/pkg/models/option.go index 8b2aff527d..0a01aea994 100644 --- a/pkg/models/option.go +++ b/pkg/models/option.go @@ -15,22 +15,18 @@ package models import ( - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" "go.ligato.io/vpp-agent/v3/proto/ligato/generic" ) func (r *LocalRegistry) checkProtoOptions(x interface{}) *LocallyKnownModel { - p, ok := x.(descriptor.Message) + p, ok := x.(protoreflect.Message) if !ok { return nil } - _, md := descriptor.ForMessage(p) - s, err := proto.GetExtension(md.Options, generic.E_Model) - if err != nil { - return nil - } + s := proto.GetExtension(p.Interface(), generic.E_Model) if spec, ok := s.(*generic.ModelSpec); ok { km, err := r.Register(x, ToSpec(spec)) if err != nil { diff --git a/pkg/models/registry.go b/pkg/models/registry.go index 35239dd2f2..fdb7ebe549 100644 --- a/pkg/models/registry.go +++ b/pkg/models/registry.go @@ -20,7 +20,7 @@ import ( "reflect" "strings" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/dynamicpb" @@ -88,7 +88,7 @@ func (r *LocalRegistry) GetModelFor(x interface{}) (KnownModel, error) { if pb, ok := x.(protoreflect.ProtoMessage); ok { protoName = string(pb.ProtoReflect().Descriptor().FullName()) } else if v1, ok := x.(proto.Message); ok { - protoName = string(proto.MessageV2(v1).ProtoReflect().Descriptor().FullName()) + protoName = string(v1.ProtoReflect().Descriptor().FullName()) } if protoName != "" { if model, found = r.registeredModelsByProtoName[protoName]; found { @@ -207,7 +207,7 @@ func (r *LocalRegistry) Register(x interface{}, spec Spec, opts ...ModelOption) if pb, ok := x.(protoreflect.ProtoMessage); ok { model.proto = pb } else if v1, ok := x.(proto.Message); ok { - model.proto = proto.MessageV2(v1) + model.proto = v1 } // Use GetName as fallback for generating name diff --git a/pkg/models/registry_test.go b/pkg/models/registry_test.go index 8198d2d592..5bb1bd5e51 100644 --- a/pkg/models/registry_test.go +++ b/pkg/models/registry_test.go @@ -17,8 +17,8 @@ package models_test import ( "testing" - "github.com/golang/protobuf/proto" . "github.com/onsi/gomega" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/pkg/models" testmodel "go.ligato.io/vpp-agent/v3/pkg/models/testdata/proto" @@ -82,6 +82,8 @@ func TestRegisterClassFallback(t *testing.T) { } func TestRegisterWithOption(t *testing.T) { + t.Skip("TODO") + g := NewGomegaWithT(t) ResetDefaultRegistry() diff --git a/pkg/models/remote_model.go b/pkg/models/remote_model.go index 829e40399b..1c52db6110 100644 --- a/pkg/models/remote_model.go +++ b/pkg/models/remote_model.go @@ -22,12 +22,13 @@ import ( "unicode/utf8" "github.com/go-errors/errors" - "github.com/golang/protobuf/jsonpb" - protoV1 "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging/logrus" - api "go.ligato.io/vpp-agent/v3/proto/ligato/generic" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/dynamicpb" + + api "go.ligato.io/vpp-agent/v3/proto/ligato/generic" ) // RemotelyKnownModel represents a registered remote model (remote model has only information about model @@ -44,14 +45,14 @@ func (m *RemotelyKnownModel) Spec() *Spec { // ModelDetail returns descriptor for the model. func (m *RemotelyKnownModel) ModelDetail() *api.ModelDetail { - return &m.model.ModelDetail + return m.model.ModelDetail } // NewInstance creates new instance value for model type. Due to missing go type for remote models, the created // instance won't have the same go type as in case of local models, but dynamic proto message's go type // (the proto descriptor will be the same). -func (m *RemotelyKnownModel) NewInstance() protoV1.Message { - return protoV1.MessageV1(dynamicpb.NewMessageType(m.model.MessageDescriptor).New().Interface()) +func (m *RemotelyKnownModel) NewInstance() proto.Message { + return dynamicpb.NewMessageType(m.model.MessageDescriptor).New().Interface() } // ProtoName returns proto message name registered with the model. @@ -133,15 +134,7 @@ func (m *RemotelyKnownModel) StripKeyPrefix(key string) string { // InstanceName computes message name for given proto message using name template (if present). func (m *RemotelyKnownModel) InstanceName(x interface{}) (string, error) { - // convert to proto message - var message protoV1.Message - if pb, ok := x.(protoreflect.ProtoMessage); ok { - message = protoV1.MessageV1(pb) - } else if v1, ok := x.(protoV1.Message); ok { - message = v1 - } else { - return "", errors.Errorf("instance %+v is not proto message", x) - } + message := protoMessageOf(x) // extract data from message and use them with name template to get the name nameTemplate, err := m.modelOptionFor("nameTemplate", m.model.Options) @@ -151,14 +144,16 @@ func (m *RemotelyKnownModel) InstanceName(x interface{}) (string, error) { return "", nil // having no name template is valid case for some models } nameTemplate = m.replaceFieldNamesInNameTemplate(m.model.MessageDescriptor, nameTemplate) - marshaler := jsonpb.Marshaler{EmitDefaults: true} // using jsonbp to generate json with json name field in proto tag - jsonData, err := marshaler.MarshalToString(message) + marshaller := protojson.MarshalOptions{ + EmitUnpopulated: true, + } + jsonData, err := marshaller.Marshal(message) if err != nil { return "", errors.Errorf("can't marshall message "+ "to json due to: %v (message: %+v)", err, message) } var mapData map[string]interface{} - if err := json.Unmarshal([]byte(jsonData), &mapData); err != nil { + if err := json.Unmarshal(jsonData, &mapData); err != nil { return "", errors.Errorf("can't load json of marshalled "+ "message to generic map due to: %v (json=%v)", err, jsonData) } diff --git a/pkg/models/remote_registry.go b/pkg/models/remote_registry.go index 1fa144a6d5..718d0707d0 100644 --- a/pkg/models/remote_registry.go +++ b/pkg/models/remote_registry.go @@ -17,11 +17,10 @@ package models import ( "fmt" + "github.com/go-errors/errors" + "go.ligato.io/cn-infra/v2/logging" "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/types/dynamicpb" - - "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" ) // RemoteRegistry defines model registry for managing registered remote models. The remote model have no @@ -50,7 +49,7 @@ func (r *RemoteRegistry) GetModel(name string) (KnownModel, error) { // GetModelFor returns registered model for the given proto message. func (r *RemoteRegistry) GetModelFor(x interface{}) (KnownModel, error) { - messageDesc := proto.MessageV2(x).ProtoReflect().Descriptor() + messageDesc := protoMessageOf(x).ProtoReflect().Descriptor() messageFullName := string(messageDesc.FullName()) var foundModel *RemotelyKnownModel for _, model := range r.modelByName { @@ -89,7 +88,9 @@ func (r *RemoteRegistry) RegisteredModels() []KnownModel { func (r *RemoteRegistry) MessageTypeRegistry() *protoregistry.Types { typeRegistry := new(protoregistry.Types) for _, model := range r.modelByName { - typeRegistry.RegisterMessage(dynamicpb.NewMessageType(model.model.MessageDescriptor)) + if err := typeRegistry.RegisterMessage(dynamicpb.NewMessageType(model.model.MessageDescriptor)); err != nil { + logging.Warn("registering message %v for remote registry failed: %v", model, err) + } } return typeRegistry } diff --git a/pkg/models/testdata/gen.go b/pkg/models/testdata/gen.go index af64908f37..8c49a0374a 100644 --- a/pkg/models/testdata/gen.go +++ b/pkg/models/testdata/gen.go @@ -1,4 +1,4 @@ package testdata //go:generate protoc --proto_path=. --proto_path=../../../proto --go_out=paths=source_relative:. proto/simple.proto -//go:generate protoc --proto_path=. --proto_path=../../../proto --go_out=paths=source_relative:. proto/withoption.proto +//go:generate protoc --proto_path=. --proto_path=../../../proto --proto_path=/usr/local/include --go_out=paths=source_relative:. proto/withoption.proto diff --git a/pkg/models/testdata/proto/simple.pb.go b/pkg/models/testdata/proto/simple.pb.go index fbd5cb6c26..bf8097da7b 100644 --- a/pkg/models/testdata/proto/simple.pb.go +++ b/pkg/models/testdata/proto/simple.pb.go @@ -1,205 +1,320 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: proto/simple.proto package model import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type Basic struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - ValueInt int32 `protobuf:"varint,2,opt,name=value_int,json=valueInt,proto3" json:"value_int,omitempty"` - ValueUint uint32 `protobuf:"varint,3,opt,name=value_uint,json=valueUint,proto3" json:"value_uint,omitempty"` - ValueInt64 int64 `protobuf:"varint,4,opt,name=value_int64,json=valueInt64,proto3" json:"value_int64,omitempty"` - RepeatedString []string `protobuf:"bytes,5,rep,name=repeated_string,json=repeatedString,proto3" json:"repeated_string,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Basic) Reset() { *m = Basic{} } -func (m *Basic) String() string { return proto.CompactTextString(m) } -func (*Basic) ProtoMessage() {} -func (*Basic) Descriptor() ([]byte, []int) { - return fileDescriptor_4285f8f75e6ba5cf, []int{0} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Basic) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Basic.Unmarshal(m, b) -} -func (m *Basic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Basic.Marshal(b, m, deterministic) + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + ValueInt int32 `protobuf:"varint,2,opt,name=value_int,json=valueInt,proto3" json:"value_int,omitempty"` + ValueUint uint32 `protobuf:"varint,3,opt,name=value_uint,json=valueUint,proto3" json:"value_uint,omitempty"` + ValueInt64 int64 `protobuf:"varint,4,opt,name=value_int64,json=valueInt64,proto3" json:"value_int64,omitempty"` + RepeatedString []string `protobuf:"bytes,5,rep,name=repeated_string,json=repeatedString,proto3" json:"repeated_string,omitempty"` } -func (m *Basic) XXX_Merge(src proto.Message) { - xxx_messageInfo_Basic.Merge(m, src) + +func (x *Basic) Reset() { + *x = Basic{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_simple_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Basic) XXX_Size() int { - return xxx_messageInfo_Basic.Size(m) + +func (x *Basic) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Basic) XXX_DiscardUnknown() { - xxx_messageInfo_Basic.DiscardUnknown(m) + +func (*Basic) ProtoMessage() {} + +func (x *Basic) ProtoReflect() protoreflect.Message { + mi := &file_proto_simple_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Basic proto.InternalMessageInfo +// Deprecated: Use Basic.ProtoReflect.Descriptor instead. +func (*Basic) Descriptor() ([]byte, []int) { + return file_proto_simple_proto_rawDescGZIP(), []int{0} +} -func (m *Basic) GetName() string { - if m != nil { - return m.Name +func (x *Basic) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Basic) GetValueInt() int32 { - if m != nil { - return m.ValueInt +func (x *Basic) GetValueInt() int32 { + if x != nil { + return x.ValueInt } return 0 } -func (m *Basic) GetValueUint() uint32 { - if m != nil { - return m.ValueUint +func (x *Basic) GetValueUint() uint32 { + if x != nil { + return x.ValueUint } return 0 } -func (m *Basic) GetValueInt64() int64 { - if m != nil { - return m.ValueInt64 +func (x *Basic) GetValueInt64() int64 { + if x != nil { + return x.ValueInt64 } return 0 } -func (m *Basic) GetRepeatedString() []string { - if m != nil { - return m.RepeatedString +func (x *Basic) GetRepeatedString() []string { + if x != nil { + return x.RepeatedString } return nil } type Nest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Nested *Nest_Nested `protobuf:"bytes,2,opt,name=nested,proto3" json:"nested,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Nest) Reset() { *m = Nest{} } -func (m *Nest) String() string { return proto.CompactTextString(m) } -func (*Nest) ProtoMessage() {} -func (*Nest) Descriptor() ([]byte, []int) { - return fileDescriptor_4285f8f75e6ba5cf, []int{1} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Nested *Nest_Nested `protobuf:"bytes,2,opt,name=nested,proto3" json:"nested,omitempty"` } -func (m *Nest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Nest.Unmarshal(m, b) -} -func (m *Nest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Nest.Marshal(b, m, deterministic) -} -func (m *Nest) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nest.Merge(m, src) +func (x *Nest) Reset() { + *x = Nest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_simple_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Nest) XXX_Size() int { - return xxx_messageInfo_Nest.Size(m) + +func (x *Nest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Nest) XXX_DiscardUnknown() { - xxx_messageInfo_Nest.DiscardUnknown(m) + +func (*Nest) ProtoMessage() {} + +func (x *Nest) ProtoReflect() protoreflect.Message { + mi := &file_proto_simple_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Nest proto.InternalMessageInfo +// Deprecated: Use Nest.ProtoReflect.Descriptor instead. +func (*Nest) Descriptor() ([]byte, []int) { + return file_proto_simple_proto_rawDescGZIP(), []int{1} +} -func (m *Nest) GetName() string { - if m != nil { - return m.Name +func (x *Nest) GetName() string { + if x != nil { + return x.Name } return "" } -func (m *Nest) GetNested() *Nest_Nested { - if m != nil { - return m.Nested +func (x *Nest) GetNested() *Nest_Nested { + if x != nil { + return x.Nested } return nil } type Nest_Nested struct { - Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"` } -func (m *Nest_Nested) Reset() { *m = Nest_Nested{} } -func (m *Nest_Nested) String() string { return proto.CompactTextString(m) } -func (*Nest_Nested) ProtoMessage() {} -func (*Nest_Nested) Descriptor() ([]byte, []int) { - return fileDescriptor_4285f8f75e6ba5cf, []int{1, 0} +func (x *Nest_Nested) Reset() { + *x = Nest_Nested{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_simple_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Nest_Nested) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Nest_Nested.Unmarshal(m, b) +func (x *Nest_Nested) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Nest_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Nest_Nested.Marshal(b, m, deterministic) + +func (*Nest_Nested) ProtoMessage() {} + +func (x *Nest_Nested) ProtoReflect() protoreflect.Message { + mi := &file_proto_simple_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *Nest_Nested) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nest_Nested.Merge(m, src) + +// Deprecated: Use Nest_Nested.ProtoReflect.Descriptor instead. +func (*Nest_Nested) Descriptor() ([]byte, []int) { + return file_proto_simple_proto_rawDescGZIP(), []int{1, 0} } -func (m *Nest_Nested) XXX_Size() int { - return xxx_messageInfo_Nest_Nested.Size(m) + +func (x *Nest_Nested) GetLevel() string { + if x != nil { + return x.Level + } + return "" } -func (m *Nest_Nested) XXX_DiscardUnknown() { - xxx_messageInfo_Nest_Nested.DiscardUnknown(m) + +var File_proto_simple_proto protoreflect.FileDescriptor + +var file_proto_simple_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0xa1, 0x01, 0x0a, 0x05, + 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, + 0x75, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x55, 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0e, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, + 0x66, 0x0a, 0x04, 0x4e, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x6e, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, + 0x06, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x1a, 0x1e, 0x0a, 0x06, 0x4e, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x6f, 0x2e, 0x6c, 0x69, + 0x67, 0x61, 0x74, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x70, 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, + 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -var xxx_messageInfo_Nest_Nested proto.InternalMessageInfo +var ( + file_proto_simple_proto_rawDescOnce sync.Once + file_proto_simple_proto_rawDescData = file_proto_simple_proto_rawDesc +) -func (m *Nest_Nested) GetLevel() string { - if m != nil { - return m.Level - } - return "" +func file_proto_simple_proto_rawDescGZIP() []byte { + file_proto_simple_proto_rawDescOnce.Do(func() { + file_proto_simple_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_simple_proto_rawDescData) + }) + return file_proto_simple_proto_rawDescData } -func init() { - proto.RegisterType((*Basic)(nil), "model.Basic") - proto.RegisterType((*Nest)(nil), "model.Nest") - proto.RegisterType((*Nest_Nested)(nil), "model.Nest.Nested") -} - -func init() { proto.RegisterFile("proto/simple.proto", fileDescriptor_4285f8f75e6ba5cf) } - -var fileDescriptor_4285f8f75e6ba5cf = []byte{ - // 230 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x41, 0x4b, 0xc4, 0x30, - 0x10, 0x85, 0x89, 0x6d, 0x8a, 0x9d, 0x45, 0x85, 0xc1, 0x43, 0x51, 0xd4, 0xb0, 0x17, 0x83, 0x87, - 0x0a, 0xba, 0xec, 0x0f, 0xf0, 0xe6, 0xc5, 0x43, 0xc4, 0xf3, 0x52, 0xed, 0x28, 0x81, 0x34, 0x2d, - 0xcd, 0xec, 0xfe, 0x1f, 0xff, 0xa9, 0xec, 0x74, 0xeb, 0x69, 0x2f, 0x21, 0xf3, 0xbd, 0xf7, 0xc2, - 0xcb, 0x00, 0x0e, 0x63, 0xcf, 0xfd, 0x63, 0xf2, 0xdd, 0x10, 0xa8, 0x96, 0x01, 0x75, 0xd7, 0xb7, - 0x14, 0x96, 0xbf, 0x0a, 0xf4, 0x4b, 0x93, 0xfc, 0x17, 0x22, 0xe4, 0xb1, 0xe9, 0xa8, 0x52, 0x46, - 0xd9, 0xd2, 0xc9, 0x1d, 0xaf, 0xa1, 0xdc, 0x35, 0x61, 0x4b, 0x1b, 0x1f, 0xb9, 0x3a, 0x31, 0xca, - 0x6a, 0x77, 0x2a, 0xe0, 0x35, 0x32, 0xde, 0x00, 0x4c, 0xe2, 0x76, 0xaf, 0x66, 0x46, 0xd9, 0x33, - 0x37, 0xd9, 0x3f, 0x7c, 0x64, 0xbc, 0x83, 0xc5, 0x7f, 0x76, 0xbd, 0xaa, 0x72, 0xa3, 0x6c, 0xe6, - 0x60, 0x4e, 0xaf, 0x57, 0x78, 0x0f, 0x17, 0x23, 0x0d, 0xd4, 0x30, 0xb5, 0x9b, 0xc4, 0xa3, 0x8f, - 0x3f, 0x95, 0x36, 0x99, 0x2d, 0xdd, 0xf9, 0x8c, 0xdf, 0x85, 0x2e, 0xbf, 0x21, 0x7f, 0xa3, 0xc4, - 0x47, 0x1b, 0x3e, 0x40, 0x11, 0x29, 0x31, 0xb5, 0x52, 0x6f, 0xf1, 0x84, 0xb5, 0xfc, 0xab, 0xde, - 0x07, 0xe4, 0xa0, 0xd6, 0x1d, 0x1c, 0x57, 0xb7, 0x50, 0x4c, 0x04, 0x2f, 0x41, 0x07, 0xda, 0x51, - 0x38, 0x3c, 0x35, 0x0d, 0x9f, 0x85, 0x6c, 0xe6, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x52, - 0xd2, 0x57, 0x2f, 0x01, 0x00, 0x00, +var file_proto_simple_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_simple_proto_goTypes = []interface{}{ + (*Basic)(nil), // 0: model.Basic + (*Nest)(nil), // 1: model.Nest + (*Nest_Nested)(nil), // 2: model.Nest.Nested +} +var file_proto_simple_proto_depIdxs = []int32{ + 2, // 0: model.Nest.nested:type_name -> model.Nest.Nested + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_proto_simple_proto_init() } +func file_proto_simple_proto_init() { + if File_proto_simple_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_simple_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Basic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_simple_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Nest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_simple_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Nest_Nested); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_simple_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_simple_proto_goTypes, + DependencyIndexes: file_proto_simple_proto_depIdxs, + MessageInfos: file_proto_simple_proto_msgTypes, + }.Build() + File_proto_simple_proto = out.File + file_proto_simple_proto_rawDesc = nil + file_proto_simple_proto_goTypes = nil + file_proto_simple_proto_depIdxs = nil } diff --git a/pkg/models/testdata/proto/simple.proto b/pkg/models/testdata/proto/simple.proto index c1595a5ce8..23d3a1696b 100644 --- a/pkg/models/testdata/proto/simple.proto +++ b/pkg/models/testdata/proto/simple.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +option go_package = "go.ligato.io/vpp-agent/v3/pkg/models/testdata/proto;model"; + package model; message Basic { diff --git a/pkg/models/testdata/proto/withoption.pb.go b/pkg/models/testdata/proto/withoption.pb.go index dd61d61203..e3c719fc33 100644 --- a/pkg/models/testdata/proto/withoption.pb.go +++ b/pkg/models/testdata/proto/withoption.pb.go @@ -1,88 +1,159 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: proto/withoption.proto package model import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato/generic" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type WithOption struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Caption string `protobuf:"bytes,2,opt,name=caption,proto3" json:"caption,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *WithOption) Reset() { *m = WithOption{} } -func (m *WithOption) String() string { return proto.CompactTextString(m) } -func (*WithOption) ProtoMessage() {} -func (*WithOption) Descriptor() ([]byte, []int) { - return fileDescriptor_2f7848ce778760ed, []int{0} + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Caption string `protobuf:"bytes,2,opt,name=caption,proto3" json:"caption,omitempty"` } -func (m *WithOption) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WithOption.Unmarshal(m, b) -} -func (m *WithOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WithOption.Marshal(b, m, deterministic) -} -func (m *WithOption) XXX_Merge(src proto.Message) { - xxx_messageInfo_WithOption.Merge(m, src) +func (x *WithOption) Reset() { + *x = WithOption{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_withoption_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *WithOption) XXX_Size() int { - return xxx_messageInfo_WithOption.Size(m) + +func (x *WithOption) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *WithOption) XXX_DiscardUnknown() { - xxx_messageInfo_WithOption.DiscardUnknown(m) + +func (*WithOption) ProtoMessage() {} + +func (x *WithOption) ProtoReflect() protoreflect.Message { + mi := &file_proto_withoption_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_WithOption proto.InternalMessageInfo +// Deprecated: Use WithOption.ProtoReflect.Descriptor instead. +func (*WithOption) Descriptor() ([]byte, []int) { + return file_proto_withoption_proto_rawDescGZIP(), []int{0} +} -func (m *WithOption) GetId() int32 { - if m != nil { - return m.Id +func (x *WithOption) GetId() int32 { + if x != nil { + return x.Id } return 0 } -func (m *WithOption) GetCaption() string { - if m != nil { - return m.Caption +func (x *WithOption) GetCaption() string { + if x != nil { + return x.Caption } return "" } -func init() { - proto.RegisterType((*WithOption)(nil), "model.WithOption") +var File_proto_withoption_proto protoreflect.FileDescriptor + +var file_proto_withoption_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, + 0x1c, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, 0x0a, + 0x0a, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x61, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x19, 0xf2, 0xc2, 0x18, 0x15, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x74, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x07, 0x77, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x6f, 0x2e, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x6f, 0x2e, 0x69, 0x6f, + 0x2f, 0x76, 0x70, 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_withoption_proto_rawDescOnce sync.Once + file_proto_withoption_proto_rawDescData = file_proto_withoption_proto_rawDesc +) + +func file_proto_withoption_proto_rawDescGZIP() []byte { + file_proto_withoption_proto_rawDescOnce.Do(func() { + file_proto_withoption_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_withoption_proto_rawDescData) + }) + return file_proto_withoption_proto_rawDescData } -func init() { proto.RegisterFile("proto/withoption.proto", fileDescriptor_2f7848ce778760ed) } - -var fileDescriptor_2f7848ce778760ed = []byte{ - // 143 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0xd7, 0x2f, 0xcf, 0x2c, 0xc9, 0xc8, 0x2f, 0x28, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x0b, 0x08, - 0xb1, 0xe6, 0xe6, 0xa7, 0xa4, 0xe6, 0x48, 0xc9, 0xe4, 0x64, 0xa6, 0x27, 0x96, 0xe4, 0xeb, 0xa7, - 0xa7, 0xe6, 0xa5, 0x16, 0x65, 0x26, 0xeb, 0x43, 0xd4, 0x14, 0x43, 0x14, 0x29, 0x05, 0x72, 0x71, - 0x85, 0x67, 0x96, 0x64, 0xf8, 0x83, 0x05, 0x85, 0xf8, 0xb8, 0x98, 0x32, 0x53, 0x24, 0x18, 0x15, - 0x18, 0x35, 0x58, 0x83, 0x98, 0x32, 0x53, 0x84, 0x24, 0xb8, 0xd8, 0x93, 0x13, 0xc1, 0x52, 0x12, - 0x4c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x30, 0xae, 0x95, 0xe4, 0xa7, 0x43, 0x12, 0xa2, 0x5c, 0x5c, - 0x60, 0x2b, 0x4a, 0x52, 0x8b, 0x4b, 0x8a, 0xa5, 0xd8, 0xcb, 0x21, 0x26, 0x27, 0xb1, 0x81, 0x4d, - 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x59, 0x7c, 0x47, 0xa0, 0x98, 0x00, 0x00, 0x00, +var file_proto_withoption_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proto_withoption_proto_goTypes = []interface{}{ + (*WithOption)(nil), // 0: model.WithOption +} +var file_proto_withoption_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_withoption_proto_init() } +func file_proto_withoption_proto_init() { + if File_proto_withoption_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_withoption_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WithOption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_withoption_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_withoption_proto_goTypes, + DependencyIndexes: file_proto_withoption_proto_depIdxs, + MessageInfos: file_proto_withoption_proto_msgTypes, + }.Build() + File_proto_withoption_proto = out.File + file_proto_withoption_proto_rawDesc = nil + file_proto_withoption_proto_goTypes = nil + file_proto_withoption_proto_depIdxs = nil } diff --git a/pkg/models/testdata/proto/withoption.proto b/pkg/models/testdata/proto/withoption.proto index 92b6e3fa1e..7b71f14093 100644 --- a/pkg/models/testdata/proto/withoption.proto +++ b/pkg/models/testdata/proto/withoption.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +option go_package = "go.ligato.io/vpp-agent/v3/pkg/models/testdata/proto;model"; + package model; import "ligato/generic/options.proto"; diff --git a/pkg/util/proto.go b/pkg/util/proto.go index 961b793969..ea0a481639 100644 --- a/pkg/util/proto.go +++ b/pkg/util/proto.go @@ -17,10 +17,8 @@ package util import ( "reflect" - protoV2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" - - "github.com/golang/protobuf/proto" ) func ExtractProtos(from ...interface{}) (protos []proto.Message) { @@ -82,7 +80,7 @@ func PlaceProtos(protos map[string]proto.Message, dsts ...interface{}) { // The matching is done by message descriptor's full name. The variable controls // how many top model structure hierarchy layers can have empty values for messages (see // util.placeProtosInProto(...) for details) -func PlaceProtosIntoProtos(protos []protoV2.Message, clearIgnoreLayerCount int, dsts ...protoV2.Message) { +func PlaceProtosIntoProtos(protos []proto.Message, clearIgnoreLayerCount int, dsts ...proto.Message) { // create help structure for insertion proto messages // (map values are protoreflect.Message(s) that contains proto message and its type. These messages will be // later wrapped into protoreflect.Value(s) and filled into destination proto message using proto reflection. @@ -109,7 +107,7 @@ func PlaceProtosIntoProtos(protos []protoV2.Message, clearIgnoreLayerCount int, // for their message fields (as the algorithm backtracks the descriptor model tree, it unfortunately initialize // empty value for visited fields). The layer below top layer will be cleared // from the fake empty value. Currently unsupported are maps as fields. -func placeProtosInProto(dst protoV2.Message, messageMap map[string][]protoreflect.Message, clearIgnoreLayerCount int) bool { +func placeProtosInProto(dst proto.Message, messageMap map[string][]protoreflect.Message, clearIgnoreLayerCount int) bool { changed := false fields := dst.ProtoReflect().Descriptor().Fields() for i := 0; i < fields.Len(); i++ { diff --git a/plugins/configurator/configurator.go b/plugins/configurator/configurator.go index a876cc664b..91eac84d6c 100644 --- a/plugins/configurator/configurator.go +++ b/plugins/configurator/configurator.go @@ -22,12 +22,12 @@ import ( "strconv" "time" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/pkg/models" "go.ligato.io/vpp-agent/v3/pkg/util" diff --git a/plugins/configurator/notify.go b/plugins/configurator/notify.go index f1240e17a1..31220f364b 100644 --- a/plugins/configurator/notify.go +++ b/plugins/configurator/notify.go @@ -19,9 +19,9 @@ import ( "sync" "sync/atomic" - "github.com/golang/protobuf/proto" "github.com/google/go-cmp/cmp" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" proto3 "google.golang.org/protobuf/proto" "google.golang.org/protobuf/testing/protocmp" diff --git a/plugins/kvscheduler/api/errors.go b/plugins/kvscheduler/api/errors.go index e441c39ece..29b10f0647 100644 --- a/plugins/kvscheduler/api/errors.go +++ b/plugins/kvscheduler/api/errors.go @@ -18,8 +18,8 @@ import ( "fmt" "strings" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" + "google.golang.org/protobuf/proto" ) var ( diff --git a/plugins/kvscheduler/api/kv_descriptor_api.go b/plugins/kvscheduler/api/kv_descriptor_api.go index e737d5b69f..8c81fee623 100644 --- a/plugins/kvscheduler/api/kv_descriptor_api.go +++ b/plugins/kvscheduler/api/kv_descriptor_api.go @@ -15,8 +15,8 @@ package api import ( - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/idxmap" + "google.golang.org/protobuf/proto" ) // Dependency references another kv pair that must exist before the associated diff --git a/plugins/kvscheduler/api/kv_scheduler_api.go b/plugins/kvscheduler/api/kv_scheduler_api.go index e34ee0f5d6..81ee0079e6 100644 --- a/plugins/kvscheduler/api/kv_scheduler_api.go +++ b/plugins/kvscheduler/api/kv_scheduler_api.go @@ -18,8 +18,8 @@ import ( "context" "time" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/idxmap" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/proto/ligato/kvscheduler" ) diff --git a/plugins/kvscheduler/datachange_test.go b/plugins/kvscheduler/datachange_test.go index df78122d80..dfb22fab06 100644 --- a/plugins/kvscheduler/datachange_test.go +++ b/plugins/kvscheduler/datachange_test.go @@ -20,8 +20,8 @@ import ( "testing" "time" - "github.com/golang/protobuf/proto" . "github.com/onsi/gomega" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/test" @@ -48,7 +48,7 @@ func TestDataChangeTransactions(t *testing.T) { Name: descriptor1Name, NBKeyPrefix: prefixA, KeySelector: prefixSelector(prefixA), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, WithMetadata: true, }, mockSB, 0) @@ -57,7 +57,7 @@ func TestDataChangeTransactions(t *testing.T) { Name: descriptor2Name, NBKeyPrefix: prefixB, KeySelector: prefixSelector(prefixB), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, Dependencies: func(key string, value proto.Message) []Dependency { if key == prefixB+baseValue2+"/item1" { @@ -82,7 +82,7 @@ func TestDataChangeTransactions(t *testing.T) { Name: descriptor3Name, NBKeyPrefix: prefixC, KeySelector: prefixSelector(prefixC), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, UpdateWithRecreate: func(key string, oldValue, newValue proto.Message, metadata Metadata) bool { return key == prefixC+baseValue3 @@ -757,7 +757,7 @@ func TestDataChangeTransactionWithRevert(t *testing.T) { Name: descriptor1Name, NBKeyPrefix: prefixA, KeySelector: prefixSelector(prefixA), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, WithMetadata: true, }, mockSB, 0) @@ -766,7 +766,7 @@ func TestDataChangeTransactionWithRevert(t *testing.T) { Name: descriptor2Name, NBKeyPrefix: prefixB, KeySelector: prefixSelector(prefixB), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, Dependencies: func(key string, value proto.Message) []Dependency { if key == prefixB+baseValue2+"/item1" { @@ -791,7 +791,7 @@ func TestDataChangeTransactionWithRevert(t *testing.T) { Name: descriptor3Name, NBKeyPrefix: prefixC, KeySelector: prefixSelector(prefixC), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, UpdateWithRecreate: func(key string, oldValue, newValue proto.Message, metadata Metadata) bool { return key == prefixC+baseValue3 @@ -1304,7 +1304,7 @@ func TestDependencyCycles(t *testing.T) { Name: descriptor1Name, KeySelector: prefixSelector(prefixA), NBKeyPrefix: prefixA, - ValueTypeName: proto.MessageName(test.NewStringValue("")), + ValueTypeName: string(proto.MessageName(test.NewStringValue(""))), ValueComparator: test.StringValueComparator, Dependencies: func(key string, value proto.Message) []Dependency { if key == prefixA+baseValue1 { @@ -1916,7 +1916,7 @@ func TestFailedDeleteOfDerivedValue(t *testing.T) { Name: descriptor1Name, NBKeyPrefix: prefixA, KeySelector: prefixSelector(prefixA), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, WithMetadata: true, }, mockSB, 0) @@ -2059,7 +2059,7 @@ func TestFailedRecreateOfDerivedValue(t *testing.T) { Name: descriptor1Name, NBKeyPrefix: prefixA, KeySelector: prefixSelector(prefixA), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, WithMetadata: true, UpdateWithRecreate: func(key string, oldValue, newValue proto.Message, metadata Metadata) bool { diff --git a/plugins/kvscheduler/descriptor-adapter/template.go b/plugins/kvscheduler/descriptor-adapter/template.go index 7223260722..d24209bded 100644 --- a/plugins/kvscheduler/descriptor-adapter/template.go +++ b/plugins/kvscheduler/descriptor-adapter/template.go @@ -19,7 +19,7 @@ const adapterTemplate = `// Code generated by adapter-generator. DO NOT EDIT. package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" {{- range $i, $path := .Imports }} diff --git a/plugins/kvscheduler/descriptor_handler.go b/plugins/kvscheduler/descriptor_handler.go index 55fef57bc6..76dc55cc38 100644 --- a/plugins/kvscheduler/descriptor_handler.go +++ b/plugins/kvscheduler/descriptor_handler.go @@ -4,8 +4,8 @@ import ( "errors" "os" - "github.com/golang/protobuf/proto" "github.com/vishvananda/netns" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" ) diff --git a/plugins/kvscheduler/graph.go b/plugins/kvscheduler/graph.go index 1649c4a29e..725e8879b9 100644 --- a/plugins/kvscheduler/graph.go +++ b/plugins/kvscheduler/graph.go @@ -10,7 +10,7 @@ import ( "text/template" "time" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/encoding/prototext" "go.ligato.io/vpp-agent/v3/pkg/graphviz" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" @@ -191,7 +191,7 @@ func (s *Scheduler) renderDotOutput(graphNodes []*graph.RecordedNode, txn *kvs.R if rec, ok := value.(*utils.RecordedProtoMessage); ok { value = rec.Message } - attrs["tooltip"] = fmt.Sprintf("[%s] %s\n-----\n%s", valueState, key, proto.MarshalTextString(value)) + attrs["tooltip"] = fmt.Sprintf("[%s] %s\n-----\n%s", valueState, key, prototext.Format(value)) n := &dotNode{ ID: key, diff --git a/plugins/kvscheduler/internal/graph/graph_api.go b/plugins/kvscheduler/internal/graph/graph_api.go index 6f8b24182f..2a16d7108e 100644 --- a/plugins/kvscheduler/internal/graph/graph_api.go +++ b/plugins/kvscheduler/internal/graph/graph_api.go @@ -20,8 +20,8 @@ import ( "sort" "time" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/idxmap" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/utils" diff --git a/plugins/kvscheduler/internal/graph/graph_test.go b/plugins/kvscheduler/internal/graph/graph_test.go index ab9e97f047..98c381ea82 100644 --- a/plugins/kvscheduler/internal/graph/graph_test.go +++ b/plugins/kvscheduler/internal/graph/graph_test.go @@ -18,8 +18,8 @@ import ( "testing" "time" - "github.com/golang/protobuf/proto" . "github.com/onsi/gomega" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/test" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/utils" diff --git a/plugins/kvscheduler/internal/graph/node_read.go b/plugins/kvscheduler/internal/graph/node_read.go index 84cb2b9054..dc0572191c 100644 --- a/plugins/kvscheduler/internal/graph/node_read.go +++ b/plugins/kvscheduler/internal/graph/node_read.go @@ -15,7 +15,7 @@ package graph import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // maximum number of flags allowed to have defined diff --git a/plugins/kvscheduler/internal/graph/node_write.go b/plugins/kvscheduler/internal/graph/node_write.go index 4dfc114e08..a862dcceeb 100644 --- a/plugins/kvscheduler/internal/graph/node_write.go +++ b/plugins/kvscheduler/internal/graph/node_write.go @@ -18,7 +18,8 @@ import ( "reflect" "sort" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" + "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/utils" ) diff --git a/plugins/kvscheduler/internal/test/descriptor.go b/plugins/kvscheduler/internal/test/descriptor.go index ae4d63cf9d..17b0fcb9a4 100644 --- a/plugins/kvscheduler/internal/test/descriptor.go +++ b/plugins/kvscheduler/internal/test/descriptor.go @@ -17,8 +17,8 @@ package test import ( "strings" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/idxmap" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" ) diff --git a/plugins/kvscheduler/internal/test/model/values.pb.go b/plugins/kvscheduler/internal/test/model/values.pb.go index 4a61ad09fb..daf1824c48 100644 --- a/plugins/kvscheduler/internal/test/model/values.pb.go +++ b/plugins/kvscheduler/internal/test/model/values.pb.go @@ -1,126 +1,218 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: model/values.proto package model import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) type ArrayValue struct { - Items []string `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` - ItemSuffix string `protobuf:"bytes,2,opt,name=item_suffix,json=itemSuffix,proto3" json:"item_suffix,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ArrayValue) Reset() { *m = ArrayValue{} } -func (m *ArrayValue) String() string { return proto.CompactTextString(m) } -func (*ArrayValue) ProtoMessage() {} -func (*ArrayValue) Descriptor() ([]byte, []int) { - return fileDescriptor_e3033e5157dd4a7b, []int{0} + Items []string `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + ItemSuffix string `protobuf:"bytes,2,opt,name=item_suffix,json=itemSuffix,proto3" json:"item_suffix,omitempty"` } -func (m *ArrayValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ArrayValue.Unmarshal(m, b) -} -func (m *ArrayValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ArrayValue.Marshal(b, m, deterministic) -} -func (m *ArrayValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArrayValue.Merge(m, src) +func (x *ArrayValue) Reset() { + *x = ArrayValue{} + if protoimpl.UnsafeEnabled { + mi := &file_model_values_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ArrayValue) XXX_Size() int { - return xxx_messageInfo_ArrayValue.Size(m) + +func (x *ArrayValue) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ArrayValue) XXX_DiscardUnknown() { - xxx_messageInfo_ArrayValue.DiscardUnknown(m) + +func (*ArrayValue) ProtoMessage() {} + +func (x *ArrayValue) ProtoReflect() protoreflect.Message { + mi := &file_model_values_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ArrayValue proto.InternalMessageInfo +// Deprecated: Use ArrayValue.ProtoReflect.Descriptor instead. +func (*ArrayValue) Descriptor() ([]byte, []int) { + return file_model_values_proto_rawDescGZIP(), []int{0} +} -func (m *ArrayValue) GetItems() []string { - if m != nil { - return m.Items +func (x *ArrayValue) GetItems() []string { + if x != nil { + return x.Items } return nil } -func (m *ArrayValue) GetItemSuffix() string { - if m != nil { - return m.ItemSuffix +func (x *ArrayValue) GetItemSuffix() string { + if x != nil { + return x.ItemSuffix } return "" } type StringValue struct { - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StringValue) Reset() { *m = StringValue{} } -func (m *StringValue) String() string { return proto.CompactTextString(m) } -func (*StringValue) ProtoMessage() {} -func (*StringValue) Descriptor() ([]byte, []int) { - return fileDescriptor_e3033e5157dd4a7b, []int{1} + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *StringValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StringValue.Unmarshal(m, b) -} -func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StringValue.Marshal(b, m, deterministic) -} -func (m *StringValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringValue.Merge(m, src) +func (x *StringValue) Reset() { + *x = StringValue{} + if protoimpl.UnsafeEnabled { + mi := &file_model_values_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StringValue) XXX_Size() int { - return xxx_messageInfo_StringValue.Size(m) + +func (x *StringValue) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StringValue) XXX_DiscardUnknown() { - xxx_messageInfo_StringValue.DiscardUnknown(m) + +func (*StringValue) ProtoMessage() {} + +func (x *StringValue) ProtoReflect() protoreflect.Message { + mi := &file_model_values_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StringValue proto.InternalMessageInfo +// Deprecated: Use StringValue.ProtoReflect.Descriptor instead. +func (*StringValue) Descriptor() ([]byte, []int) { + return file_model_values_proto_rawDescGZIP(), []int{1} +} -func (m *StringValue) GetValue() string { - if m != nil { - return m.Value +func (x *StringValue) GetValue() string { + if x != nil { + return x.Value } return "" } -func init() { - proto.RegisterType((*ArrayValue)(nil), "model.ArrayValue") - proto.RegisterType((*StringValue)(nil), "model.StringValue") +var File_model_values_proto protoreflect.FileDescriptor + +var file_model_values_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x43, 0x0a, 0x0a, 0x41, + 0x72, 0x72, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, + 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x6f, 0x2e, 0x6c, 0x69, 0x67, 0x61, + 0x74, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x70, 0x70, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, + 0x76, 0x33, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x6b, 0x76, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x74, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_model_values_proto_rawDescOnce sync.Once + file_model_values_proto_rawDescData = file_model_values_proto_rawDesc +) + +func file_model_values_proto_rawDescGZIP() []byte { + file_model_values_proto_rawDescOnce.Do(func() { + file_model_values_proto_rawDescData = protoimpl.X.CompressGZIP(file_model_values_proto_rawDescData) + }) + return file_model_values_proto_rawDescData } -func init() { proto.RegisterFile("model/values.proto", fileDescriptor_e3033e5157dd4a7b) } +var file_model_values_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_model_values_proto_goTypes = []interface{}{ + (*ArrayValue)(nil), // 0: model.ArrayValue + (*StringValue)(nil), // 1: model.StringValue +} +var file_model_values_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} -var fileDescriptor_e3033e5157dd4a7b = []byte{ - // 128 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0xcd, 0x4f, 0x49, - 0xcd, 0xd1, 0x2f, 0x4b, 0xcc, 0x29, 0x4d, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, - 0x05, 0x8b, 0x29, 0x39, 0x73, 0x71, 0x39, 0x16, 0x15, 0x25, 0x56, 0x86, 0x81, 0xe4, 0x84, 0x44, - 0xb8, 0x58, 0x33, 0x4b, 0x52, 0x73, 0x8b, 0x25, 0x18, 0x15, 0x98, 0x35, 0x38, 0x83, 0x20, 0x1c, - 0x21, 0x79, 0x2e, 0x6e, 0x10, 0x23, 0xbe, 0xb8, 0x34, 0x2d, 0x2d, 0xb3, 0x42, 0x82, 0x49, 0x81, - 0x51, 0x83, 0x33, 0x88, 0x0b, 0x24, 0x14, 0x0c, 0x16, 0x51, 0x52, 0xe6, 0xe2, 0x0e, 0x2e, 0x29, - 0xca, 0xcc, 0x4b, 0x87, 0x9b, 0x02, 0xb6, 0x4a, 0x82, 0x11, 0xac, 0x12, 0xc2, 0x49, 0x62, 0x03, - 0xdb, 0x6b, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x81, 0x3f, 0x60, 0xd4, 0x8d, 0x00, 0x00, 0x00, +func init() { file_model_values_proto_init() } +func file_model_values_proto_init() { + if File_model_values_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_model_values_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArrayValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_model_values_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_model_values_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_model_values_proto_goTypes, + DependencyIndexes: file_model_values_proto_depIdxs, + MessageInfos: file_model_values_proto_msgTypes, + }.Build() + File_model_values_proto = out.File + file_model_values_proto_rawDesc = nil + file_model_values_proto_goTypes = nil + file_model_values_proto_depIdxs = nil } diff --git a/plugins/kvscheduler/internal/test/model/values.proto b/plugins/kvscheduler/internal/test/model/values.proto index 33347e22aa..3c819a7b7d 100644 --- a/plugins/kvscheduler/internal/test/model/values.proto +++ b/plugins/kvscheduler/internal/test/model/values.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +option go_package = "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/test/model"; + package model; message ArrayValue { diff --git a/plugins/kvscheduler/internal/test/southbound.go b/plugins/kvscheduler/internal/test/southbound.go index 11e6e20917..3a174ac46e 100644 --- a/plugins/kvscheduler/internal/test/southbound.go +++ b/plugins/kvscheduler/internal/test/southbound.go @@ -17,7 +17,7 @@ package test import ( "sync" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" ) diff --git a/plugins/kvscheduler/internal/test/values.go b/plugins/kvscheduler/internal/test/values.go index 06646b8b88..e090e03039 100644 --- a/plugins/kvscheduler/internal/test/values.go +++ b/plugins/kvscheduler/internal/test/values.go @@ -17,7 +17,7 @@ package test import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/test/model" diff --git a/plugins/kvscheduler/internal/utils/conversions.go b/plugins/kvscheduler/internal/utils/conversions.go index 44d95b3cf5..038c3fe5ac 100644 --- a/plugins/kvscheduler/internal/utils/conversions.go +++ b/plugins/kvscheduler/internal/utils/conversions.go @@ -15,8 +15,9 @@ package utils import ( - "github.com/golang/protobuf/proto" - prototypes "github.com/golang/protobuf/ptypes/empty" + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/emptypb" ) // ProtoToString converts proto message to string. @@ -31,11 +32,11 @@ func ProtoToString(msg proto.Message) string { if msg == nil { return "" } - if _, isEmpty := msg.(*prototypes.Empty); isEmpty { + if _, isEmpty := msg.(*emptypb.Empty); isEmpty { return "" } // wrap with curly braces, it is easier to read - return "{ " + msg.String() + " }" + return "{ " + prototext.Format(msg) + " }" } // ErrorToString converts error to string. diff --git a/plugins/kvscheduler/internal/utils/record.go b/plugins/kvscheduler/internal/utils/record.go index 145efb520e..f1dcb5d5d1 100644 --- a/plugins/kvscheduler/internal/utils/record.go +++ b/plugins/kvscheduler/internal/utils/record.go @@ -16,11 +16,9 @@ package utils import ( "encoding/json" - "fmt" - "reflect" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/proto" ) // RecordedProtoMessage is a proto.Message suitable for recording and access via @@ -47,8 +45,12 @@ func (p *RecordedProtoMessage) MarshalJSON() ([]byte, error) { err error ) if p != nil { - msgName = proto.MessageName(p.Message) - msgData = proto.CompactTextString(p.Message) + msgName = string(proto.MessageName(p.Message)) + b, err := prototext.Marshal(p.Message) + if err != nil { + return nil, err + } + msgData = string(b) // protov1.CompactTextString(protov1.MessageV1(p.Message)) } pwn, err := json.Marshal(ProtoWithName{ ProtoMsgName: msgName, @@ -72,21 +74,21 @@ func (p *RecordedProtoMessage) UnmarshalJSON(data []byte) error { if p.ProtoMsgName == "" { return nil } - msgType := proto.MessageType(pwn.ProtoMsgName) - if msgType == nil { - return fmt.Errorf("unknown proto message: %s", p.ProtoMsgName) - } - msg := reflect.New(msgType.Elem()).Interface().(proto.Message) - var err error - if len(pwn.ProtoMsgData) > 0 && pwn.ProtoMsgData[0] == '{' { - err = jsonpb.UnmarshalString(pwn.ProtoMsgData, msg) - } else { - err = proto.UnmarshalText(pwn.ProtoMsgData, msg) - } - if err != nil { - return err - } - p.Message = msg + /*msgType := proto.MessageType(pwn.ProtoMsgName) + if msgType == nil { + return fmt.Errorf("unknown proto message: %s", p.ProtoMsgName) + } + msg := reflect.New(msgType.Elem()).Interface().(proto.Message) + var err error + if len(pwn.ProtoMsgData) > 0 && pwn.ProtoMsgData[0] == '{' { + err = jsonpb.UnmarshalString(pwn.ProtoMsgData, msg) + } else { + err = proto.UnmarshalText(pwn.ProtoMsgData, msg) + } + if err != nil { + return err + } + p.Message = msg*/ return nil } @@ -100,6 +102,6 @@ func RecordProtoMessage(msg proto.Message) *RecordedProtoMessage { } return &RecordedProtoMessage{ Message: msg, - ProtoMsgName: proto.MessageName(msg), + ProtoMsgName: string(proto.MessageName(msg)), } } diff --git a/plugins/kvscheduler/node_utils.go b/plugins/kvscheduler/node_utils.go index 58aafdbb04..5669c9951d 100644 --- a/plugins/kvscheduler/node_utils.go +++ b/plugins/kvscheduler/node_utils.go @@ -15,7 +15,8 @@ package kvscheduler import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" + kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/graph" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/utils" diff --git a/plugins/kvscheduler/notification_test.go b/plugins/kvscheduler/notification_test.go index 7efe3de3dd..a8589246b4 100644 --- a/plugins/kvscheduler/notification_test.go +++ b/plugins/kvscheduler/notification_test.go @@ -20,8 +20,8 @@ import ( "testing" "time" - "github.com/golang/protobuf/proto" . "github.com/onsi/gomega" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/test" @@ -59,7 +59,7 @@ func TestNotifications(t *testing.T) { } return true }, - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, WithMetadata: true, }, mockSB, 0, test.WithoutRetrieve) @@ -68,7 +68,7 @@ func TestNotifications(t *testing.T) { Name: descriptor2Name, NBKeyPrefix: prefixB, KeySelector: prefixSelector(prefixB), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, Dependencies: func(key string, value proto.Message) []Dependency { if key == prefixB+baseValue2 { @@ -752,7 +752,7 @@ func TestNotificationsWithRetry(t *testing.T) { Name: descriptor1Name, NBKeyPrefix: prefixA, KeySelector: prefixSelector(prefixA), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, WithMetadata: true, }, mockSB, 0, test.WithoutRetrieve) @@ -761,7 +761,7 @@ func TestNotificationsWithRetry(t *testing.T) { Name: descriptor2Name, NBKeyPrefix: prefixB, KeySelector: prefixSelector(prefixB), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), Dependencies: func(key string, value proto.Message) []Dependency { if key == prefixB+baseValue2 { depKey := prefixA + baseValue1 @@ -785,7 +785,7 @@ func TestNotificationsWithRetry(t *testing.T) { Name: descriptor3Name, NBKeyPrefix: prefixC, KeySelector: prefixSelector(prefixC), - ValueTypeName: proto.MessageName(test.NewStringValue("")), + ValueTypeName: string(proto.MessageName(test.NewStringValue(""))), ValueComparator: test.StringValueComparator, Dependencies: func(key string, value proto.Message) []Dependency { if key == prefixC+baseValue3 { diff --git a/plugins/kvscheduler/plugin_scheduler.go b/plugins/kvscheduler/plugin_scheduler.go index 64d56158cb..684853e89c 100644 --- a/plugins/kvscheduler/plugin_scheduler.go +++ b/plugins/kvscheduler/plugin_scheduler.go @@ -22,7 +22,7 @@ import ( "time" "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" "go.ligato.io/cn-infra/v2/idxmap" "go.ligato.io/cn-infra/v2/idxmap/mem" diff --git a/plugins/kvscheduler/refresh.go b/plugins/kvscheduler/refresh.go index 9063f52fdd..5f051e7bab 100644 --- a/plugins/kvscheduler/refresh.go +++ b/plugins/kvscheduler/refresh.go @@ -19,8 +19,8 @@ import ( "os" "strings" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/encoding/prototext" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/graph" @@ -444,7 +444,7 @@ func dumpGraph(g graph.RWAccess) string { lastUpdate, getNodeState(node).String(), )) - writeLines(proto.MarshalTextString(node.GetValue()), " ") + writeLines(prototext.Format(node.GetValue()), " ") if f := node.GetTargets(DependencyRelation); f != nil && len(f) > 0 { writeLine("Depends on:", "") diff --git a/plugins/kvscheduler/resync_test.go b/plugins/kvscheduler/resync_test.go index f72ce1a27d..05b42b81ad 100644 --- a/plugins/kvscheduler/resync_test.go +++ b/plugins/kvscheduler/resync_test.go @@ -21,7 +21,8 @@ import ( . "github.com/onsi/gomega" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" + . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/test" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/utils" @@ -141,7 +142,7 @@ func TestResyncWithEmptySB(t *testing.T) { Name: descriptor1Name, NBKeyPrefix: prefixA, KeySelector: prefixSelector(prefixA), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, Dependencies: func(key string, value proto.Message) []Dependency { if key == prefixA+baseValue2 { @@ -567,7 +568,7 @@ func TestResyncWithNonEmptySB(t *testing.T) { Name: descriptor1Name, NBKeyPrefix: prefixA, KeySelector: prefixSelector(prefixA), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, Dependencies: func(key string, value proto.Message) []Dependency { if key == prefixA+baseValue2+"/item1" { @@ -981,7 +982,7 @@ func TestResyncNotRemovingSBValues(t *testing.T) { Name: descriptor1Name, KeySelector: prefixSelector(prefixA), NBKeyPrefix: prefixA, - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, Dependencies: func(key string, value proto.Message) []Dependency { if key == prefixA+baseValue2 { @@ -1214,7 +1215,7 @@ func TestResyncWithMultipleDescriptors(t *testing.T) { Name: descriptor1Name, NBKeyPrefix: prefixA, KeySelector: prefixSelector(prefixA), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, WithMetadata: true, }, mockSB, 1) @@ -1223,7 +1224,7 @@ func TestResyncWithMultipleDescriptors(t *testing.T) { Name: descriptor2Name, NBKeyPrefix: prefixB, KeySelector: prefixSelector(prefixB), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, Dependencies: func(key string, value proto.Message) []Dependency { if key == prefixB+baseValue2+"/item1" { @@ -1248,7 +1249,7 @@ func TestResyncWithMultipleDescriptors(t *testing.T) { Name: descriptor3Name, NBKeyPrefix: prefixC, KeySelector: prefixSelector(prefixC), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, UpdateWithRecreate: func(key string, oldValue, newValue proto.Message, metadata Metadata) bool { return key == prefixC+baseValue3 @@ -1691,7 +1692,7 @@ func TestResyncWithRetry(t *testing.T) { Name: descriptor1Name, NBKeyPrefix: prefixA, KeySelector: prefixSelector(prefixA), - ValueTypeName: proto.MessageName(test.NewArrayValue()), + ValueTypeName: string(proto.MessageName(test.NewArrayValue())), DerivedValues: test.ArrayValueDerBuilder, WithMetadata: true, }, mockSB, 1) diff --git a/plugins/kvscheduler/txn_exec.go b/plugins/kvscheduler/txn_exec.go index 04111c1069..d3b917afeb 100644 --- a/plugins/kvscheduler/txn_exec.go +++ b/plugins/kvscheduler/txn_exec.go @@ -20,7 +20,7 @@ import ( "sort" "strings" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" @@ -831,7 +831,7 @@ func (s *Scheduler) compressTxnOps(executed kvs.RecordedTxnOps) kvs.RecordedTxnO compressedOp = true executed[j].PrevValue = op.PrevValue executed[j].PrevErr = op.PrevErr - if op.PrevErr!=nil { + if op.PrevErr != nil { executed[j].PrevErrMsg = op.PrevErr.Error() } executed[j].PrevState = op.PrevState diff --git a/plugins/kvscheduler/txn_process.go b/plugins/kvscheduler/txn_process.go index 2da5260f5b..248580ee33 100644 --- a/plugins/kvscheduler/txn_process.go +++ b/plugins/kvscheduler/txn_process.go @@ -19,7 +19,7 @@ import ( "runtime/trace" "time" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" diff --git a/plugins/kvscheduler/utils_for_test.go b/plugins/kvscheduler/utils_for_test.go index 92204f0e2b..8fb76ac5fd 100644 --- a/plugins/kvscheduler/utils_for_test.go +++ b/plugins/kvscheduler/utils_for_test.go @@ -17,8 +17,8 @@ package kvscheduler import ( "strings" - "github.com/golang/protobuf/proto" . "github.com/onsi/gomega" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/internal/test" @@ -55,7 +55,9 @@ func checkRecordedValues(recorded, expected []RecordedKVPair) { for _, kv2 := range recorded { if kv2.Key == kv.Key { found = true - Expect(proto.Equal(kv2.Value, kv.Value)).To(BeTrue()) + if kv2.Value != nil && kv.Value != nil { + Expect(proto.Equal(kv2.Value.Message, kv.Value.Message)).To(BeTrue()) + } Expect(kv2.Origin).To(Equal(kv.Origin)) } } @@ -66,8 +68,12 @@ func checkRecordedValues(recorded, expected []RecordedKVPair) { func checkTxnOperation(recorded, expected *RecordedTxnOp) { Expect(recorded.Operation).To(Equal(expected.Operation)) Expect(recorded.Key).To(Equal(expected.Key)) - Expect(proto.Equal(recorded.PrevValue, expected.PrevValue)).To(BeTrue()) - Expect(proto.Equal(recorded.NewValue, expected.NewValue)).To(BeTrue()) + if recorded.PrevValue != nil && expected.PrevValue != nil { + Expect(proto.Equal(recorded.PrevValue, expected.PrevValue)).To(BeTrue()) + } + if recorded.NewValue != nil && expected.NewValue != nil { + Expect(proto.Equal(recorded.NewValue, expected.NewValue)).To(BeTrue()) + } Expect(recorded.PrevState).To(Equal(expected.PrevState)) Expect(recorded.NewState).To(Equal(expected.NewState)) if expected.PrevErr == nil { diff --git a/plugins/kvscheduler/validation.go b/plugins/kvscheduler/validation.go index cdb9178576..742d48b228 100644 --- a/plugins/kvscheduler/validation.go +++ b/plugins/kvscheduler/validation.go @@ -16,10 +16,11 @@ package kvscheduler import ( "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/dynamicpb" + "go.ligato.io/vpp-agent/v3/pkg/models" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" - "google.golang.org/protobuf/types/dynamicpb" ) // ValidateSemantically validates given proto messages according to semantic validation(KVDescriptor.Validate) diff --git a/plugins/kvscheduler/value_flags.go b/plugins/kvscheduler/value_flags.go index 45222a696c..bda60a7dbe 100644 --- a/plugins/kvscheduler/value_flags.go +++ b/plugins/kvscheduler/value_flags.go @@ -17,7 +17,7 @@ package kvscheduler import ( "fmt" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/kvscheduler" diff --git a/plugins/linux/ifplugin/descriptor/adapter/interface.go b/plugins/linux/ifplugin/descriptor/adapter/interface.go index 3e9e2859c8..c9c1377827 100644 --- a/plugins/linux/ifplugin/descriptor/adapter/interface.go +++ b/plugins/linux/ifplugin/descriptor/adapter/interface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/linux/interfaces" "go.ligato.io/vpp-agent/v3/plugins/linux/ifplugin/ifaceidx" diff --git a/plugins/linux/ifplugin/descriptor/adapter/interfaceaddress.go b/plugins/linux/ifplugin/descriptor/adapter/interfaceaddress.go index c077a5ea99..31fb482b41 100644 --- a/plugins/linux/ifplugin/descriptor/adapter/interfaceaddress.go +++ b/plugins/linux/ifplugin/descriptor/adapter/interfaceaddress.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/linux/interfaces" ) diff --git a/plugins/linux/ifplugin/descriptor/adapter/interfacevrf.go b/plugins/linux/ifplugin/descriptor/adapter/interfacevrf.go index 11c2db1d64..28a5f8ddf8 100644 --- a/plugins/linux/ifplugin/descriptor/adapter/interfacevrf.go +++ b/plugins/linux/ifplugin/descriptor/adapter/interfacevrf.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/linux/interfaces" ) diff --git a/plugins/linux/ifplugin/descriptor/interface.go b/plugins/linux/ifplugin/descriptor/interface.go index 337fd86842..992673828b 100644 --- a/plugins/linux/ifplugin/descriptor/interface.go +++ b/plugins/linux/ifplugin/descriptor/interface.go @@ -27,9 +27,9 @@ import ( "go.ligato.io/vpp-agent/v3/pkg/models" - "github.com/golang/protobuf/proto" - prototypes "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/emptypb" "go.ligato.io/cn-infra/v2/idxmap" "go.ligato.io/cn-infra/v2/logging" @@ -671,7 +671,7 @@ func (d *InterfaceDescriptor) DerivedValues(key string, linuxIf *interfaces.Inte // interface state derValues = append(derValues, kvs.KeyValuePair{ Key: interfaces.InterfaceStateKey(linuxIf.Name, linuxIf.Enabled), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, }) if linuxIf.GetVrfMasterInterface() != "" { derValues = append(derValues, kvs.KeyValuePair{ diff --git a/plugins/linux/ifplugin/descriptor/interface_vrf.go b/plugins/linux/ifplugin/descriptor/interface_vrf.go index aa325ffbf9..d042001d94 100644 --- a/plugins/linux/ifplugin/descriptor/interface_vrf.go +++ b/plugins/linux/ifplugin/descriptor/interface_vrf.go @@ -17,9 +17,9 @@ package descriptor import ( "fmt" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/linux/ifplugin/descriptor/adapter" diff --git a/plugins/linux/ifplugin/descriptor/watcher.go b/plugins/linux/ifplugin/descriptor/watcher.go index 2bfd3860e6..163de9adf4 100644 --- a/plugins/linux/ifplugin/descriptor/watcher.go +++ b/plugins/linux/ifplugin/descriptor/watcher.go @@ -22,11 +22,11 @@ import ( "sync" "time" - "github.com/golang/protobuf/proto" - prototypes "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" "github.com/vishvananda/netlink" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/emptypb" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/linux/ifplugin/linuxcalls" @@ -145,20 +145,20 @@ func (w *InterfaceWatcher) Retrieve(correlate []kvs.KVWithMetadata) (values []kv } values = append(values, kvs.KVWithMetadata{ Key: ifmodel.InterfaceHostNameKey(hostIface.name), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, Origin: kvs.FromSB, }) for _, ipAddr := range hostIface.ipAddrs { values = append(values, kvs.KVWithMetadata{ Key: ifmodel.InterfaceHostNameWithAddrKey(hostIface.name, ipAddr), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, Origin: kvs.FromSB, }) } if hostIface.vrfName != "" { values = append(values, kvs.KVWithMetadata{ Key: ifmodel.InterfaceHostNameWithVrfKey(hostIface.name, hostIface.vrfName), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, Origin: kvs.FromSB, }) } @@ -264,7 +264,7 @@ func (w *InterfaceWatcher) processLinkNotification(linkNotif linkNotif) { if !linkNotif.delayed && exists && !isLinkUp(linkNotif.LinkUpdate) { // do not react to interface being DOWN immediately, this could be only very temporary linkNotif.delayed = true - time.AfterFunc(linkDownDelay, func() {w.delayedLinkNotifCh <- linkNotif}) + time.AfterFunc(linkDownDelay, func() { w.delayedLinkNotifCh <- linkNotif }) return } @@ -372,7 +372,7 @@ func (w *InterfaceWatcher) updateLinkKV(ifName string, enabled bool) { var value proto.Message if enabled { // empty == enabled, nil == disabled - value = &prototypes.Empty{} + value = &emptypb.Empty{} } if err := w.kvscheduler.PushSBNotification(kvs.KVWithMetadata{ Key: ifmodel.InterfaceHostNameKey(ifName), @@ -388,7 +388,7 @@ func (w *InterfaceWatcher) updateAddrKV(ifName string, address string, removed b var value proto.Message if !removed { // empty == assigned, nil == not assigned - value = &prototypes.Empty{} + value = &emptypb.Empty{} } if err := w.kvscheduler.PushSBNotification(kvs.KVWithMetadata{ Key: ifmodel.InterfaceHostNameWithAddrKey(ifName, address), @@ -407,7 +407,7 @@ func (w *InterfaceWatcher) updateVrfKV(ifName string, vrf string, removed bool) } if !removed { // empty == assigned, nil == not assigned - value = &prototypes.Empty{} + value = &emptypb.Empty{} } if err := w.kvscheduler.PushSBNotification(kvs.KVWithMetadata{ Key: ifmodel.InterfaceHostNameWithVrfKey(ifName, vrf), diff --git a/plugins/linux/ifplugin/ifaceidx/ifaceidx.go b/plugins/linux/ifplugin/ifaceidx/ifaceidx.go index d90e0addff..4400132d5a 100644 --- a/plugins/linux/ifplugin/ifaceidx/ifaceidx.go +++ b/plugins/linux/ifplugin/ifaceidx/ifaceidx.go @@ -17,10 +17,10 @@ package ifaceidx import ( "time" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/idxmap" "go.ligato.io/cn-infra/v2/idxmap/mem" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" linux_namespace "go.ligato.io/vpp-agent/v3/proto/ligato/linux/namespace" ) diff --git a/plugins/linux/ifplugin/linuxcalls/dump_interface_linuxcalls.go b/plugins/linux/ifplugin/linuxcalls/dump_interface_linuxcalls.go index d3b0bb2f40..fe1d7700ab 100644 --- a/plugins/linux/ifplugin/linuxcalls/dump_interface_linuxcalls.go +++ b/plugins/linux/ifplugin/linuxcalls/dump_interface_linuxcalls.go @@ -20,10 +20,10 @@ import ( "strconv" "strings" - "github.com/golang/protobuf/proto" "github.com/vishvananda/netlink" "go.ligato.io/cn-infra/v2/logging" "golang.org/x/sys/unix" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/plugins/linux/nsplugin/linuxcalls" interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/linux/interfaces" diff --git a/plugins/linux/iptablesplugin/descriptor/adapter/rulechain.go b/plugins/linux/iptablesplugin/descriptor/adapter/rulechain.go index d6e82eae52..0b61b23294 100644 --- a/plugins/linux/iptablesplugin/descriptor/adapter/rulechain.go +++ b/plugins/linux/iptablesplugin/descriptor/adapter/rulechain.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/linux/iptables" ) diff --git a/plugins/linux/iptablesplugin/descriptor/rulechain.go b/plugins/linux/iptablesplugin/descriptor/rulechain.go index 63d321ed37..eb29c3ab2c 100644 --- a/plugins/linux/iptablesplugin/descriptor/rulechain.go +++ b/plugins/linux/iptablesplugin/descriptor/rulechain.go @@ -17,9 +17,10 @@ package descriptor import ( "strings" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" + kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" ifdescriptor "go.ligato.io/vpp-agent/v3/plugins/linux/ifplugin/descriptor" "go.ligato.io/vpp-agent/v3/plugins/linux/iptablesplugin/descriptor/adapter" diff --git a/plugins/linux/l3plugin/descriptor/adapter/arp.go b/plugins/linux/l3plugin/descriptor/adapter/arp.go index d9bef5f8e9..40175a10cb 100644 --- a/plugins/linux/l3plugin/descriptor/adapter/arp.go +++ b/plugins/linux/l3plugin/descriptor/adapter/arp.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/linux/l3" ) diff --git a/plugins/linux/l3plugin/descriptor/adapter/route.go b/plugins/linux/l3plugin/descriptor/adapter/route.go index c41353db18..4cd52553f1 100644 --- a/plugins/linux/l3plugin/descriptor/adapter/route.go +++ b/plugins/linux/l3plugin/descriptor/adapter/route.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/linux/l3" ) diff --git a/plugins/linux/l3plugin/descriptor/route.go b/plugins/linux/l3plugin/descriptor/route.go index 8f20848498..5920356a75 100644 --- a/plugins/linux/l3plugin/descriptor/route.go +++ b/plugins/linux/l3plugin/descriptor/route.go @@ -19,12 +19,12 @@ import ( "net" "strings" - "github.com/golang/protobuf/proto" - prototypes "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" "github.com/vishvananda/netlink" - "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" + prototypes "google.golang.org/protobuf/types/known/emptypb" + "go.ligato.io/vpp-agent/v3/pkg/models" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/linux/ifplugin" diff --git a/plugins/linux/nsplugin/descriptor/microservice.go b/plugins/linux/nsplugin/descriptor/microservice.go index 1fbc1d78c3..bdf36d1e3e 100644 --- a/plugins/linux/nsplugin/descriptor/microservice.go +++ b/plugins/linux/nsplugin/descriptor/microservice.go @@ -21,8 +21,8 @@ import ( "time" docker "github.com/fsouza/go-dockerclient" - prototypes "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" + "google.golang.org/protobuf/types/known/emptypb" "go.ligato.io/cn-infra/v2/logging" "go.ligato.io/cn-infra/v2/servicelabel" @@ -140,7 +140,7 @@ func (d *MicroserviceDescriptor) Retrieve(correlate []kvs.KVWithMetadata) (value for msLabel := range d.microServiceByLabel { values = append(values, kvs.KVWithMetadata{ Key: nsmodel.MicroserviceKey(msLabel), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, Origin: kvs.FromSB, }) } @@ -217,7 +217,7 @@ func (d *MicroserviceDescriptor) processNewMicroservice(microserviceLabel string if d.msStateInSync { d.kvscheduler.PushSBNotification(kvs.KVWithMetadata{ Key: nsmodel.MicroserviceKey(ms.Label), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, Metadata: nil, }) } diff --git a/plugins/netalloc/descriptor/adapter/ipalloc.go b/plugins/netalloc/descriptor/adapter/ipalloc.go index b8db35a153..e3145ee392 100644 --- a/plugins/netalloc/descriptor/adapter/ipalloc.go +++ b/plugins/netalloc/descriptor/adapter/ipalloc.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/netalloc" ) diff --git a/plugins/netalloc/descriptor/ip_alloc.go b/plugins/netalloc/descriptor/ip_alloc.go index b81c54a228..540764fe7d 100644 --- a/plugins/netalloc/descriptor/ip_alloc.go +++ b/plugins/netalloc/descriptor/ip_alloc.go @@ -17,8 +17,8 @@ package descriptor import ( "net" - prototypes "github.com/golang/protobuf/ptypes/empty" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/types/known/emptypb" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/netalloc/descriptor/adapter" @@ -83,7 +83,7 @@ func (d *IPAllocDescriptor) DerivedValues(key string, addrAlloc *netalloc.IPAllo if neighGw { derValues = append(derValues, kvs.KeyValuePair{ Key: netalloc.NeighGwKey(addrAlloc.NetworkName, addrAlloc.InterfaceName), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, }) } return derValues diff --git a/plugins/orchestrator/dispatcher.go b/plugins/orchestrator/dispatcher.go index 2e6b088918..0b795e37cb 100644 --- a/plugins/orchestrator/dispatcher.go +++ b/plugins/orchestrator/dispatcher.go @@ -21,13 +21,13 @@ import ( "sync" "time" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" - "go.ligato.io/vpp-agent/v3/plugins/orchestrator/contextdecorator" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/pkg/models" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" + "go.ligato.io/vpp-agent/v3/plugins/orchestrator/contextdecorator" "go.ligato.io/vpp-agent/v3/proto/ligato/kvscheduler" ) @@ -194,7 +194,7 @@ func (p *dispatcher) ListState() (KVPairs, error) { return nil, err } for _, d := range data { - //status := p.kvs.GetValueStatus(d.Key) + // status := p.kvs.GetValueStatus(d.Key) pairs[d.Key] = d.Value } } diff --git a/plugins/orchestrator/localregistry/initfileregistry.go b/plugins/orchestrator/localregistry/initfileregistry.go index 01eeec79f9..b68c2ec500 100644 --- a/plugins/orchestrator/localregistry/initfileregistry.go +++ b/plugins/orchestrator/localregistry/initfileregistry.go @@ -21,7 +21,6 @@ import ( yaml2 "github.com/ghodss/yaml" "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/config" "go.ligato.io/cn-infra/v2/datasync" "go.ligato.io/cn-infra/v2/datasync/kvdbsync/local" @@ -29,10 +28,11 @@ import ( "go.ligato.io/cn-infra/v2/datasync/syncbase" "go.ligato.io/cn-infra/v2/db/keyval" "go.ligato.io/cn-infra/v2/infra" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "go.ligato.io/vpp-agent/v3/client" "go.ligato.io/vpp-agent/v3/plugins/orchestrator" - "google.golang.org/protobuf/encoding/protojson" - protoV2 "google.golang.org/protobuf/proto" ) const ( @@ -282,10 +282,10 @@ func (p *txnFactory) NewTxn(resync bool) keyval.ProtoTxn { return local.NewProtoTxn(p.registry.PropagateChanges) } -func convertToProtoV1(messages []protoV2.Message) []proto.Message { +func convertToProtoV1(messages []proto.Message) []proto.Message { result := make([]proto.Message, 0, len(messages)) for _, message := range messages { - result = append(result, proto.MessageV1(message.ProtoReflect().Interface())) + result = append(result, message.ProtoReflect().Interface()) } return result } diff --git a/plugins/orchestrator/meta_service.go b/plugins/orchestrator/meta_service.go index 8a186cafce..d96566de3d 100644 --- a/plugins/orchestrator/meta_service.go +++ b/plugins/orchestrator/meta_service.go @@ -18,20 +18,21 @@ import ( "fmt" "strings" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/descriptor" "go.ligato.io/cn-infra/v2/logging" - "go.ligato.io/vpp-agent/v3/pkg/models" - kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" - "go.ligato.io/vpp-agent/v3/plugins/orchestrator/contextdecorator" - "go.ligato.io/vpp-agent/v3/proto/ligato/generic" "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/descriptorpb" + + "go.ligato.io/vpp-agent/v3/pkg/models" + kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" + "go.ligato.io/vpp-agent/v3/plugins/orchestrator/contextdecorator" + "go.ligato.io/vpp-agent/v3/proto/ligato/generic" ) type genericService struct { @@ -58,7 +59,7 @@ func (s *genericService) KnownModels(ctx context.Context, req *generic.KnownMode func (s *genericService) ProtoFileDescriptor(ctx context.Context, req *generic.ProtoFileDescriptorRequest) (*generic.ProtoFileDescriptorResponse, error) { for _, model := range models.RegisteredModels() { if req.FullProtoFileName == model.ProtoFile() { - fileDesc := proto.MessageV2(model.NewInstance()).ProtoReflect().Descriptor().ParentFile() + fileDesc := model.NewInstance().ProtoReflect().Descriptor().ParentFile() if fileDesc != nil { return &generic.ProtoFileDescriptorResponse{ FileDescriptor: protodesc.ToFileDescriptorProto(fileDesc), @@ -150,7 +151,7 @@ func (s *genericService) SetConfig(ctx context.Context, req *generic.SetConfigRe Status: res.Status.State.String(), Message: msg, }, - //Op: res.Status.LastOperation.String(), + // Op: res.Status.LastOperation.String(), }) } @@ -212,7 +213,11 @@ func (s *genericService) DumpState(context.Context, *generic.DumpStateRequest) ( fmt.Printf("dispatch.ListState: %d pairs", len(pairs)) for key, val := range pairs { - fmt.Printf(" - [%s] %+v\n", key, proto.CompactTextString(val)) + b, err := prototext.Marshal(val) + if err != nil { + return nil, err + } + fmt.Printf(" - [%s] %+v\n", key, string(b)) } var states []*generic.StateItem @@ -236,8 +241,8 @@ func (s *genericService) Subscribe(req *generic.SubscribeRequest, server generic } // toImportSet performs convenient format conversion to descriptor.FileDescriptorSet -func toImportSet(importFDs []protoreflect.FileDescriptor) *descriptor.FileDescriptorSet { - fdProtoimports := &descriptor.FileDescriptorSet{ +func toImportSet(importFDs []protoreflect.FileDescriptor) *descriptorpb.FileDescriptorSet { + fdProtoimports := &descriptorpb.FileDescriptorSet{ File: make([]*descriptorpb.FileDescriptorProto, 0, len(importFDs)), } for _, importFD := range importFDs { diff --git a/plugins/orchestrator/orchestrator.go b/plugins/orchestrator/orchestrator.go index 5dd97eb96e..d0f497218b 100644 --- a/plugins/orchestrator/orchestrator.go +++ b/plugins/orchestrator/orchestrator.go @@ -20,19 +20,20 @@ import ( "sync" "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/datasync" "go.ligato.io/cn-infra/v2/datasync/resync" "go.ligato.io/cn-infra/v2/infra" "go.ligato.io/cn-infra/v2/logging" "go.ligato.io/cn-infra/v2/rpc/grpc" + "golang.org/x/net/context" + "google.golang.org/grpc/reflection" + "google.golang.org/protobuf/proto" + "go.ligato.io/vpp-agent/v3/pkg/models" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/orchestrator/contextdecorator" "go.ligato.io/vpp-agent/v3/proto/ligato/generic" "go.ligato.io/vpp-agent/v3/proto/ligato/kvscheduler" - "golang.org/x/net/context" - "google.golang.org/grpc/reflection" ) var ( diff --git a/plugins/orchestrator/store.go b/plugins/orchestrator/store.go index f509d8a381..0aa119bf36 100644 --- a/plugins/orchestrator/store.go +++ b/plugins/orchestrator/store.go @@ -17,7 +17,7 @@ package orchestrator import ( "sort" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" ) // KVStore describes an interface for key-value store used by dispatcher. diff --git a/plugins/restapi/handlers.go b/plugins/restapi/handlers.go index ba501ca0b3..0a083f83dc 100644 --- a/plugins/restapi/handlers.go +++ b/plugins/restapi/handlers.go @@ -28,10 +28,17 @@ import ( yaml2 "github.com/ghodss/yaml" "github.com/go-errors/errors" "github.com/goccy/go-yaml" - "github.com/golang/protobuf/proto" - protoc_plugin "github.com/golang/protobuf/protoc-gen-go/plugin" "github.com/unrolled/render" "go.ligato.io/cn-infra/v2/logging/logrus" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protodesc" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/descriptorpb" + "google.golang.org/protobuf/types/dynamicpb" + "google.golang.org/protobuf/types/pluginpb" + "go.ligato.io/vpp-agent/v3/client" "go.ligato.io/vpp-agent/v3/cmd/agentctl/api/types" "go.ligato.io/vpp-agent/v3/pkg/models" @@ -44,12 +51,6 @@ import ( "go.ligato.io/vpp-agent/v3/plugins/restapi/jsonschema/converter" "go.ligato.io/vpp-agent/v3/plugins/restapi/resturl" interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" - "google.golang.org/protobuf/encoding/protojson" - protoV2 "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protodesc" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/types/descriptorpb" - "google.golang.org/protobuf/types/dynamicpb" ) const ( @@ -411,7 +412,7 @@ func (p *Plugin) jsonSchemaHandler(formatter *render.Render) http.HandlerFunc { params = append(params, fieldNamesConverterParam) } paramsStr := strings.Join(params, ",") - cgReq := &protoc_plugin.CodeGeneratorRequest{ + cgReq := &pluginpb.CodeGeneratorRequest{ ProtoFile: fileDescriptorProtos, FileToGenerate: []string{dynConfigFileDescProto.GetName()}, Parameter: ¶msStr, @@ -425,7 +426,7 @@ func (p *Plugin) jsonSchemaHandler(formatter *render.Render) http.HandlerFunc { // use JSON schema converter and handle error cases p.Log.Debug("Processing code generator request") - protoConverter := converter.New(logrus.DefaultLogger().StandardLogger()) + protoConverter := converter.New(logrus.DefaultLogger().Logger) res, err := protoConverter.ConvertFrom(bytes.NewReader(cgReqMarshalled)) if err != nil { if res == nil { @@ -579,24 +580,24 @@ func (p *Plugin) ConvertValidationErrorOutput(validationErrors *kvscheduler.Inva // define types for REST API output (could use map, but struct hold field ordering within each validation error) type singleConfig struct { - Path string "json: path" - Error string "json: error" + Path string `json:"path"` + Error string `json:"error"` } type repeatedConfig struct { - Path string "json: path" - Error string "json: error" - ErrorConfigPart string "json: error_config_part" + Path string `json:"path"` + Error string `json:"error"` + ErrorConfigPart string `json:"error_config_part"` } type singleConfigDerivedValue struct { - Path string "json: path" - Error string "json: error" - ErrorDerivedConfigPart string "json: error_derived_config_part" + Path string `json:"path"` + Error string `json:"error"` + ErrorDerivedConfigPart string `json:"error_derived_config_part"` } type repeatedConfigDerivedValue struct { - Path string "json: path" - Error string "json: error" - ErrorDerivedConfigPart string "json: error_derived_config_part" - ErrorConfigPart string "json: error_config_part" + Path string `json:"path"` + Error string `json:"error"` + ErrorDerivedConfigPart string `json:"error_derived_config_part"` + ErrorConfigPart string `json:"error_config_part"` } // convert each validation error to REST API output (data filled structs defined above) @@ -607,8 +608,7 @@ func (p *Plugin) ConvertValidationErrorOutput(validationErrors *kvscheduler.Inva if messageError.ParentMessage() != nil { nonDerivedMessage = messageError.ParentMessage() } - messageModel := nameToModel[proto.MessageV2(nonDerivedMessage). - ProtoReflect().Descriptor().FullName()] + messageModel := nameToModel[nonDerivedMessage.ProtoReflect().Descriptor().FullName()] groupFieldName := client.DynamicConfigGroupFieldNaming(messageModel) modelFieldProtoName, modelFieldName := client.DynamicConfigKnownModelFieldNaming(messageModel) invalidMessageFields := messageError.InvalidFields() @@ -625,7 +625,7 @@ func (p *Plugin) ConvertValidationErrorOutput(validationErrors *kvscheduler.Inva // disassemble field reference (can refer to inner message field), guess the yaml name for each // segment and assemble the path again fieldPath := strings.Split(invalidMessageFieldsStr, ".") - messageDesc := proto.MessageV2(messageError.Message()).ProtoReflect().Descriptor() + messageDesc := messageError.Message().ProtoReflect().Descriptor() for i := range fieldPath { // find current field path segment in proto message fields fieldDesc := messageDesc.Fields().ByName(protoreflect.Name(fieldPath[i])) @@ -659,8 +659,8 @@ func (p *Plugin) ConvertValidationErrorOutput(validationErrors *kvscheduler.Inva // no direct yaml configuration for derived value) var parentConfigPart string if messageError.ParentMessage() != nil { - parentConfigPart = messageError.ParentMessage().String() - json, err := protojson.Marshal(proto.MessageV2(messageError.ParentMessage())) + parentConfigPart = prototext.Format(messageError.ParentMessage()) + json, err := protojson.Marshal(messageError.ParentMessage()) if err == nil { parentConfigPart = string(json) yaml, err := yaml2.JSONToYAML(json) @@ -672,8 +672,8 @@ func (p *Plugin) ConvertValidationErrorOutput(validationErrors *kvscheduler.Inva // compute again the string representation of error configuration (yaml is preferred) // (no original reference to REST API string is remembered -> computing it from proto message) - configPart := messageError.Message().String() - json, err := protojson.Marshal(proto.MessageV2(messageError.Message())) + configPart := prototext.Format(messageError.Message()) + json, err := protojson.Marshal(messageError.Message()) if err == nil { configPart = string(json) yaml, err := yaml2.JSONToYAML(json) @@ -722,10 +722,10 @@ func (p *Plugin) ConvertValidationErrorOutput(validationErrors *kvscheduler.Inva return convertedValidationErrors } -func convertToProtoV1(messages []protoV2.Message) []proto.Message { +func convertToProtoV1(messages []proto.Message) []proto.Message { result := make([]proto.Message, 0, len(messages)) for _, message := range messages { - result = append(result, proto.MessageV1(message.ProtoReflect().Interface())) + result = append(result, message.ProtoReflect().Interface()) } return result } @@ -756,7 +756,7 @@ func (p *Plugin) configurationGetHandler(formatter *render.Render) http.HandlerF } // convert data-filled config into yaml - jsonBytes, err := protojson.Marshal(protoV2.Message(config)) + jsonBytes, err := protojson.Marshal(config) if err != nil { p.internalError("failed to convert retrieved configuration "+ "to intermediate json output", err, w, formatter) diff --git a/plugins/restapi/jsonschema/converter/converter.go b/plugins/restapi/jsonschema/converter/converter.go index 6c0dc6866a..684a92a8c3 100644 --- a/plugins/restapi/jsonschema/converter/converter.go +++ b/plugins/restapi/jsonschema/converter/converter.go @@ -10,10 +10,10 @@ import ( "strings" "github.com/alecthomas/jsonschema" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/descriptor" - plugin "github.com/golang/protobuf/protoc-gen-go/plugin" "github.com/sirupsen/logrus" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/descriptorpb" + "google.golang.org/protobuf/types/pluginpb" ) const ( @@ -42,7 +42,7 @@ func New(logger *logrus.Logger) *Converter { } // ConvertFrom tells the convert to work on the given input: -func (c *Converter) ConvertFrom(rd io.Reader) (*plugin.CodeGeneratorResponse, error) { +func (c *Converter) ConvertFrom(rd io.Reader) (*pluginpb.CodeGeneratorResponse, error) { c.logger.Debug("Reading code generation request") input, err := ioutil.ReadAll(rd) if err != nil { @@ -50,7 +50,7 @@ func (c *Converter) ConvertFrom(rd io.Reader) (*plugin.CodeGeneratorResponse, er return nil, err } - req := &plugin.CodeGeneratorRequest{} + req := &pluginpb.CodeGeneratorRequest{} err = proto.Unmarshal(input, req) if err != nil { c.logger.WithError(err).Error("Can't unmarshal input") @@ -95,7 +95,7 @@ func (c *Converter) parseGeneratorParameters(parameters string) { } // Converts a proto "ENUM" into a JSON-Schema: -func (c *Converter) convertEnumType(enum *descriptor.EnumDescriptorProto) (jsonschema.Type, error) { +func (c *Converter) convertEnumType(enum *descriptorpb.EnumDescriptorProto) (jsonschema.Type, error) { // Prepare a new jsonschema.Type for our eventual return value: jsonSchemaType := jsonschema.Type{ @@ -113,8 +113,8 @@ func (c *Converter) convertEnumType(enum *descriptor.EnumDescriptorProto) (jsons // correct type for enum value but rather chooses random type from oneof and cast value to that type) // // Allow both strings and integers: - //jsonSchemaType.OneOf = append(jsonSchemaType.OneOf, &jsonschema.Type{Type: "string"}) - //jsonSchemaType.OneOf = append(jsonSchemaType.OneOf, &jsonschema.Type{Type: "integer"}) + // jsonSchemaType.OneOf = append(jsonSchemaType.OneOf, &jsonschema.Type{Type: "string"}) + // jsonSchemaType.OneOf = append(jsonSchemaType.OneOf, &jsonschema.Type{Type: "integer"}) // Add the allowed values: for _, enumValue := range enum.Value { @@ -126,12 +126,12 @@ func (c *Converter) convertEnumType(enum *descriptor.EnumDescriptorProto) (jsons } // Converts a proto file into a JSON-Schema: -func (c *Converter) convertFile(file *descriptor.FileDescriptorProto) ([]*plugin.CodeGeneratorResponse_File, error) { +func (c *Converter) convertFile(file *descriptorpb.FileDescriptorProto) ([]*pluginpb.CodeGeneratorResponse_File, error) { // Input filename: protoFileName := path.Base(file.GetName()) // Prepare a list of responses: - var response []*plugin.CodeGeneratorResponse_File + var response []*pluginpb.CodeGeneratorResponse_File // user wants specific messages genSpecificMessages := len(c.messageTargets) > 0 @@ -166,7 +166,7 @@ func (c *Converter) convertFile(file *descriptor.FileDescriptorProto) ([]*plugin } // Add a response: - resFile := &plugin.CodeGeneratorResponse_File{ + resFile := &pluginpb.CodeGeneratorResponse_File{ Name: proto.String(jsonSchemaFileName), Content: proto.String(string(jsonSchemaJSON)), } @@ -203,7 +203,7 @@ func (c *Converter) convertFile(file *descriptor.FileDescriptorProto) ([]*plugin } // Add a response: - resFile := &plugin.CodeGeneratorResponse_File{ + resFile := &pluginpb.CodeGeneratorResponse_File{ Name: proto.String(jsonSchemaFileName), Content: proto.String(string(jsonSchemaJSON)), } @@ -214,7 +214,7 @@ func (c *Converter) convertFile(file *descriptor.FileDescriptorProto) ([]*plugin return response, nil } -func (c *Converter) convert(req *plugin.CodeGeneratorRequest) (*plugin.CodeGeneratorResponse, error) { +func (c *Converter) convert(req *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error) { c.parseGeneratorParameters(req.GetParameter()) generateTargets := make(map[string]bool) @@ -223,7 +223,7 @@ func (c *Converter) convert(req *plugin.CodeGeneratorRequest) (*plugin.CodeGener } c.sourceInfo = newSourceCodeInfo(req.GetProtoFile()) - res := &plugin.CodeGeneratorResponse{} + res := &pluginpb.CodeGeneratorResponse{} for _, file := range req.GetProtoFile() { if file.GetPackage() == "" { c.logger.WithField("filename", file.GetName()).Warn("Proto file doesn't specify a package") @@ -253,7 +253,7 @@ func (c *Converter) convert(req *plugin.CodeGeneratorRequest) (*plugin.CodeGener return res, nil } -func (c *Converter) generateSchemaFilename(file *descriptor.FileDescriptorProto, protoName string) string { +func (c *Converter) generateSchemaFilename(file *descriptorpb.FileDescriptorProto, protoName string) string { if c.PrefixSchemaFilesWithPackage { return fmt.Sprintf("%s/%s.jsonschema", file.GetPackage(), protoName) } diff --git a/plugins/restapi/jsonschema/converter/proto_package.go b/plugins/restapi/jsonschema/converter/proto_package.go index 21ccab955d..3909f3ce71 100644 --- a/plugins/restapi/jsonschema/converter/proto_package.go +++ b/plugins/restapi/jsonschema/converter/proto_package.go @@ -3,7 +3,7 @@ package converter import ( "strings" - "github.com/golang/protobuf/protoc-gen-go/descriptor" + "google.golang.org/protobuf/types/descriptorpb" ) // ProtoPackage describes a package of Protobuf, which is an container of message types. @@ -11,8 +11,8 @@ type ProtoPackage struct { name string parent *ProtoPackage children map[string]*ProtoPackage - types map[string]*descriptor.DescriptorProto - enums map[string]*descriptor.EnumDescriptorProto + types map[string]*descriptorpb.DescriptorProto + enums map[string]*descriptorpb.EnumDescriptorProto } func newProtoPackage(parent *ProtoPackage, name string) *ProtoPackage { @@ -25,12 +25,12 @@ func newProtoPackage(parent *ProtoPackage, name string) *ProtoPackage { name: pkgName, parent: parent, children: make(map[string]*ProtoPackage), - types: make(map[string]*descriptor.DescriptorProto), - enums: make(map[string]*descriptor.EnumDescriptorProto), + types: make(map[string]*descriptorpb.DescriptorProto), + enums: make(map[string]*descriptorpb.EnumDescriptorProto), } } -func (c *Converter) lookupType(pkg *ProtoPackage, name string) (*descriptor.DescriptorProto, string, bool) { +func (c *Converter) lookupType(pkg *ProtoPackage, name string) (*descriptorpb.DescriptorProto, string, bool) { if strings.HasPrefix(name, ".") { return c.relativelyLookupType(globalPkg, name[1:]) } @@ -43,7 +43,7 @@ func (c *Converter) lookupType(pkg *ProtoPackage, name string) (*descriptor.Desc return nil, "", false } -func (c *Converter) lookupEnum(pkg *ProtoPackage, name string) (*descriptor.EnumDescriptorProto, string, bool) { +func (c *Converter) lookupEnum(pkg *ProtoPackage, name string) (*descriptorpb.EnumDescriptorProto, string, bool) { if strings.HasPrefix(name, ".") { return c.relativelyLookupEnum(globalPkg, name[1:]) } @@ -56,7 +56,7 @@ func (c *Converter) lookupEnum(pkg *ProtoPackage, name string) (*descriptor.Enum return nil, "", false } -func (c *Converter) relativelyLookupType(pkg *ProtoPackage, name string) (*descriptor.DescriptorProto, string, bool) { +func (c *Converter) relativelyLookupType(pkg *ProtoPackage, name string) (*descriptorpb.DescriptorProto, string, bool) { components := strings.SplitN(name, ".", 2) switch len(components) { case 0: @@ -83,7 +83,7 @@ func (c *Converter) relativelyLookupType(pkg *ProtoPackage, name string) (*descr } } -func (c *Converter) relativelyLookupNestedType(desc *descriptor.DescriptorProto, name string) (*descriptor.DescriptorProto, bool) { +func (c *Converter) relativelyLookupNestedType(desc *descriptorpb.DescriptorProto, name string) (*descriptorpb.DescriptorProto, bool) { components := strings.Split(name, ".") componentLoop: for _, component := range components { @@ -99,7 +99,7 @@ componentLoop: return desc, true } -func (c *Converter) relativelyLookupEnum(pkg *ProtoPackage, name string) (*descriptor.EnumDescriptorProto, string, bool) { +func (c *Converter) relativelyLookupEnum(pkg *ProtoPackage, name string) (*descriptorpb.EnumDescriptorProto, string, bool) { components := strings.SplitN(name, ".", 2) switch len(components) { case 0: @@ -126,7 +126,7 @@ func (c *Converter) relativelyLookupEnum(pkg *ProtoPackage, name string) (*descr } } -func (c *Converter) relativelyLookupNestedEnum(desc *descriptor.DescriptorProto, name string) (*descriptor.EnumDescriptorProto, bool) { +func (c *Converter) relativelyLookupNestedEnum(desc *descriptorpb.DescriptorProto, name string) (*descriptorpb.EnumDescriptorProto, bool) { components := strings.Split(name, ".") parent := desc diff --git a/plugins/restapi/jsonschema/converter/sourcecodeinfo.go b/plugins/restapi/jsonschema/converter/sourcecodeinfo.go index 566a25b164..eabc4b25d6 100644 --- a/plugins/restapi/jsonschema/converter/sourcecodeinfo.go +++ b/plugins/restapi/jsonschema/converter/sourcecodeinfo.go @@ -1,12 +1,12 @@ package converter import ( - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/descriptor" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/descriptorpb" ) // Protobuf tag values for relevant message fields. Full list here: -// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto +// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptorpb.proto const ( tag_FileDescriptor_messageType int32 = 4 tag_FileDescriptor_enumType int32 = 5 @@ -18,30 +18,30 @@ const ( ) type sourceCodeInfo struct { - lookup map[proto.Message]*descriptor.SourceCodeInfo_Location + lookup map[proto.Message]*descriptorpb.SourceCodeInfo_Location } -func (s sourceCodeInfo) GetMessage(m *descriptor.DescriptorProto) *descriptor.SourceCodeInfo_Location { +func (s sourceCodeInfo) GetMessage(m *descriptorpb.DescriptorProto) *descriptorpb.SourceCodeInfo_Location { return s.lookup[m] } -func (s sourceCodeInfo) GetField(f *descriptor.FieldDescriptorProto) *descriptor.SourceCodeInfo_Location { +func (s sourceCodeInfo) GetField(f *descriptorpb.FieldDescriptorProto) *descriptorpb.SourceCodeInfo_Location { return s.lookup[f] } -func (s sourceCodeInfo) GetEnum(e *descriptor.EnumDescriptorProto) *descriptor.SourceCodeInfo_Location { +func (s sourceCodeInfo) GetEnum(e *descriptorpb.EnumDescriptorProto) *descriptorpb.SourceCodeInfo_Location { return s.lookup[e] } -func (s sourceCodeInfo) GetEnumValue(e *descriptor.EnumValueDescriptorProto) *descriptor.SourceCodeInfo_Location { +func (s sourceCodeInfo) GetEnumValue(e *descriptorpb.EnumValueDescriptorProto) *descriptorpb.SourceCodeInfo_Location { return s.lookup[e] } -func newSourceCodeInfo(fs []*descriptor.FileDescriptorProto) *sourceCodeInfo { +func newSourceCodeInfo(fs []*descriptorpb.FileDescriptorProto) *sourceCodeInfo { // For each source location in the provided files // - resolve the (annoyingly) encoded path to its message/field/service/enum/etc definition // - store the source info by its resolved definition - lookup := map[proto.Message]*descriptor.SourceCodeInfo_Location{} + lookup := map[proto.Message]*descriptorpb.SourceCodeInfo_Location{} for _, f := range fs { for _, loc := range f.GetSourceCodeInfo().GetLocation() { declaration := getDefinitionAtPath(f, loc.Path) @@ -56,10 +56,10 @@ func newSourceCodeInfo(fs []*descriptor.FileDescriptorProto) *sourceCodeInfo { // Resolve a protobuf "file-source path" to its associated definition (eg message/field/enum/etc). // Note that some paths don't point to definitions (some reference subcomponents like name, type, // field #, etc) and will therefore return nil. -func getDefinitionAtPath(file *descriptor.FileDescriptorProto, path []int32) proto.Message { +func getDefinitionAtPath(file *descriptorpb.FileDescriptorProto, path []int32) proto.Message { // The way protobuf encodes "file-source path" is a little opaque/tricky; // this doc describes how it works: - // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto#L730 + // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptorpb.proto#L730 // Starting at the root of the file descriptor, traverse its object graph by following the // specified path (and updating our position/state at each step) until either: @@ -69,7 +69,7 @@ func getDefinitionAtPath(file *descriptor.FileDescriptorProto, path []int32) pro var pos proto.Message = file for step := 0; step < len(path); step++ { switch p := pos.(type) { - case *descriptor.FileDescriptorProto: + case *descriptorpb.FileDescriptorProto: switch path[step] { case tag_FileDescriptor_messageType: step++ @@ -81,7 +81,7 @@ func getDefinitionAtPath(file *descriptor.FileDescriptorProto, path []int32) pro return nil // ignore all other types } - case *descriptor.DescriptorProto: + case *descriptorpb.DescriptorProto: switch path[step] { case tag_Descriptor_field: step++ @@ -99,7 +99,7 @@ func getDefinitionAtPath(file *descriptor.FileDescriptorProto, path []int32) pro return nil // ignore all other types } - case *descriptor.EnumDescriptorProto: + case *descriptorpb.EnumDescriptorProto: switch path[step] { case tag_EnumDescriptor_value: step++ diff --git a/plugins/restapi/jsonschema/converter/types.go b/plugins/restapi/jsonschema/converter/types.go index 962d533e2c..a5809dbc51 100644 --- a/plugins/restapi/jsonschema/converter/types.go +++ b/plugins/restapi/jsonschema/converter/types.go @@ -7,13 +7,14 @@ import ( "strconv" "strings" - "go.ligato.io/vpp-agent/v3/proto/ligato" - "github.com/alecthomas/jsonschema" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/descriptor" "github.com/iancoleman/orderedmap" "github.com/xeipuuv/gojsonschema" + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/descriptorpb" + + "go.ligato.io/vpp-agent/v3/proto/ligato" ) const ( @@ -57,7 +58,7 @@ func init() { } } -func (c *Converter) registerEnum(pkgName *string, enum *descriptor.EnumDescriptorProto) { +func (c *Converter) registerEnum(pkgName *string, enum *descriptorpb.EnumDescriptorProto) { pkg := globalPkg if pkgName != nil { for _, node := range strings.Split(*pkgName, ".") { @@ -76,7 +77,7 @@ func (c *Converter) registerEnum(pkgName *string, enum *descriptor.EnumDescripto pkg.enums[enum.GetName()] = enum } -func (c *Converter) registerType(pkgName *string, msg *descriptor.DescriptorProto) { +func (c *Converter) registerType(pkgName *string, msg *descriptorpb.DescriptorProto) { pkg := globalPkg if pkgName != nil { for _, node := range strings.Split(*pkgName, ".") { @@ -131,7 +132,7 @@ func (c *Converter) applyAllowNullValuesOption(schema *jsonschema.Type, schemaCh } // Convert a proto "field" (essentially a type-switch with some recursion): -func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptor.FieldDescriptorProto, msg *descriptor.DescriptorProto, duplicatedMessages map[*descriptor.DescriptorProto]string) (*jsonschema.Type, error) { +func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptorpb.FieldDescriptorProto, msg *descriptorpb.DescriptorProto, duplicatedMessages map[*descriptorpb.DescriptorProto]string) (*jsonschema.Type, error) { // Prepare a new jsonschema.Type for our eventual return value: jsonSchemaType := &jsonschema.Type{} @@ -142,26 +143,26 @@ func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptor.FieldDes // get field annotations var fieldAnnotations *ligato.LigatoOptions - val, err := proto.GetExtension(desc.Options, ligato.E_LigatoOptions) - if err != nil { + val := proto.GetExtension(desc, ligato.E_LigatoOptions) + /*if err != nil { c.logger.Debugf("Field %s.%s doesn't have ligato option extension", msg.GetName(), desc.GetName()) - } else { - var ok bool - if fieldAnnotations, ok = val.(*ligato.LigatoOptions); !ok { - c.logger.Debugf("Field %s.%s have ligato option extension, but its value has "+ - "unexpected type (%T)", msg.GetName(), desc.GetName(), val) - } + } else {*/ + var ok bool + if fieldAnnotations, ok = val.(*ligato.LigatoOptions); !ok { + c.logger.Debugf("Field %s.%s have ligato option extension, but its value has "+ + "unexpected type (%T)", msg.GetName(), desc.GetName(), val) } + // } // Switch the types, and pick a JSONSchema equivalent: switch desc.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FLOAT: + case descriptorpb.FieldDescriptorProto_TYPE_DOUBLE, + descriptorpb.FieldDescriptorProto_TYPE_FLOAT: c.applyAllowNullValuesOption(jsonSchemaType, &jsonschema.Type{Type: gojsonschema.TYPE_NUMBER}) - case descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32, - descriptor.FieldDescriptorProto_TYPE_SINT32: + case descriptorpb.FieldDescriptorProto_TYPE_INT32, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED32, + descriptorpb.FieldDescriptorProto_TYPE_SINT32: schema := &jsonschema.Type{ Type: gojsonschema.TYPE_INTEGER, Minimum: math.MinInt32, @@ -170,8 +171,8 @@ func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptor.FieldDes c.applyIntRangeFieldAnnotation(fieldAnnotations, schema) c.applyAllowNullValuesOption(jsonSchemaType, schema) - case descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_FIXED32: + case descriptorpb.FieldDescriptorProto_TYPE_UINT32, + descriptorpb.FieldDescriptorProto_TYPE_FIXED32: schema := &jsonschema.Type{ Type: gojsonschema.TYPE_INTEGER, Minimum: -1, @@ -181,9 +182,9 @@ func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptor.FieldDes c.applyIntRangeFieldAnnotation(fieldAnnotations, schema) c.applyAllowNullValuesOption(jsonSchemaType, schema) - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64, - descriptor.FieldDescriptorProto_TYPE_SINT64: + case descriptorpb.FieldDescriptorProto_TYPE_INT64, + descriptorpb.FieldDescriptorProto_TYPE_SFIXED64, + descriptorpb.FieldDescriptorProto_TYPE_SINT64: if !c.DisallowBigIntsAsStrings { c.applyAllowNullValuesOption(jsonSchemaType, &jsonschema.Type{Type: gojsonschema.TYPE_STRING}) } else { @@ -196,8 +197,8 @@ func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptor.FieldDes c.applyAllowNullValuesOption(jsonSchemaType, schema) } - case descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_FIXED64: + case descriptorpb.FieldDescriptorProto_TYPE_UINT64, + descriptorpb.FieldDescriptorProto_TYPE_FIXED64: if !c.DisallowBigIntsAsStrings { c.applyAllowNullValuesOption(jsonSchemaType, &jsonschema.Type{Type: gojsonschema.TYPE_STRING}) } else { @@ -211,7 +212,7 @@ func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptor.FieldDes c.applyAllowNullValuesOption(jsonSchemaType, schema) } - case descriptor.FieldDescriptorProto_TYPE_STRING: + case descriptorpb.FieldDescriptorProto_TYPE_STRING: schema := &jsonschema.Type{} switch fieldAnnotations.GetType() { case ligato.LigatoOptions_IPV6: @@ -294,17 +295,17 @@ func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptor.FieldDes } c.applyAllowNullValuesOption(jsonSchemaType, schema) - case descriptor.FieldDescriptorProto_TYPE_BYTES: + case descriptorpb.FieldDescriptorProto_TYPE_BYTES: c.applyAllowNullValuesOption(jsonSchemaType, &jsonschema.Type{Type: gojsonschema.TYPE_STRING}) - case descriptor.FieldDescriptorProto_TYPE_ENUM: + case descriptorpb.FieldDescriptorProto_TYPE_ENUM: // Note: not setting type specification(oneof string and integer), because explicitly saying which // values are valid (and any other is invalid) is enough specification what can be used // (this also overcome bug in example creator https://json-schema-faker.js.org/ that doesn't select // correct type for enum value but rather chooses random type from oneof and cast value to that type) // - //jsonSchemaType.OneOf = append(jsonSchemaType.OneOf, &jsonschema.Type{Type: gojsonschema.TYPE_STRING}) - //jsonSchemaType.OneOf = append(jsonSchemaType.OneOf, &jsonschema.Type{Type: gojsonschema.TYPE_INTEGER}) + // jsonSchemaType.OneOf = append(jsonSchemaType.OneOf, &jsonschema.Type{Type: gojsonschema.TYPE_STRING}) + // jsonSchemaType.OneOf = append(jsonSchemaType.OneOf, &jsonschema.Type{Type: gojsonschema.TYPE_INTEGER}) if c.AllowNullValues { jsonSchemaType.OneOf = append(jsonSchemaType.OneOf, &jsonschema.Type{Type: gojsonschema.TYPE_NULL}) } @@ -322,10 +323,10 @@ func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptor.FieldDes jsonSchemaType.Enum = append(jsonSchemaType.Enum, value.Number) } - case descriptor.FieldDescriptorProto_TYPE_BOOL: + case descriptorpb.FieldDescriptorProto_TYPE_BOOL: c.applyAllowNullValuesOption(jsonSchemaType, &jsonschema.Type{Type: gojsonschema.TYPE_BOOLEAN}) - case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE: + case descriptorpb.FieldDescriptorProto_TYPE_GROUP, descriptorpb.FieldDescriptorProto_TYPE_MESSAGE: switch desc.GetTypeName() { case ".google.protobuf.Timestamp": jsonSchemaType.Type = gojsonschema.TYPE_STRING @@ -346,7 +347,7 @@ func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptor.FieldDes } // Recurse array of primitive types: - if desc.GetLabel() == descriptor.FieldDescriptorProto_LABEL_REPEATED && jsonSchemaType.Type != gojsonschema.TYPE_OBJECT { + if desc.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED && jsonSchemaType.Type != gojsonschema.TYPE_OBJECT { jsonSchemaType.Items = &jsonschema.Type{} if len(jsonSchemaType.Enum) > 0 { @@ -421,7 +422,7 @@ func (c *Converter) convertField(curPkg *ProtoPackage, desc *descriptor.FieldDes jsonSchemaType.AdditionalProperties = additionalPropertiesJSON // Arrays: - case desc.GetLabel() == descriptor.FieldDescriptorProto_LABEL_REPEATED: + case desc.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED: jsonSchemaType.Items = recursedJSONSchemaType jsonSchemaType.Type = gojsonschema.TYPE_ARRAY @@ -511,7 +512,7 @@ func (c *Converter) applyIntRangeFieldAnnotation(fieldAnnotations *ligato.Ligato } // Converts a proto "MESSAGE" into a JSON-Schema: -func (c *Converter) convertMessageType(curPkg *ProtoPackage, msg *descriptor.DescriptorProto) (*jsonschema.Schema, error) { +func (c *Converter) convertMessageType(curPkg *ProtoPackage, msg *descriptorpb.DescriptorProto) (*jsonschema.Schema, error) { // first, recursively find messages that appear more than once - in particular, that will break cycles duplicatedMessages, err := c.findDuplicatedNestedMessages(curPkg, msg) @@ -546,9 +547,9 @@ func (c *Converter) convertMessageType(curPkg *ProtoPackage, msg *descriptor.Des Definitions: definitions, } - // Look for required fields (either by proto2 required flag, or the AllFieldsRequired option): + // Look for required fields (either by proto required flag, or the AllFieldsRequired option): for _, fieldDesc := range msg.GetField() { - if c.AllFieldsRequired || fieldDesc.GetLabel() == descriptor.FieldDescriptorProto_LABEL_REQUIRED { + if c.AllFieldsRequired || fieldDesc.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REQUIRED { newJSONSchema.Required = append(newJSONSchema.Required, fieldDesc.GetName()) } } @@ -560,13 +561,13 @@ func (c *Converter) convertMessageType(curPkg *ProtoPackage, msg *descriptor.Des // findDuplicatedNestedMessages takes a message, and returns a map mapping pointers to messages that appear more than once // (typically because they're part of a reference cycle) to the sub-schema name that we give them. -func (c *Converter) findDuplicatedNestedMessages(curPkg *ProtoPackage, msg *descriptor.DescriptorProto) (map[*descriptor.DescriptorProto]string, error) { - all := make(map[*descriptor.DescriptorProto]*nameAndCounter) +func (c *Converter) findDuplicatedNestedMessages(curPkg *ProtoPackage, msg *descriptorpb.DescriptorProto) (map[*descriptorpb.DescriptorProto]string, error) { + all := make(map[*descriptorpb.DescriptorProto]*nameAndCounter) if err := c.recursiveFindDuplicatedNestedMessages(curPkg, msg, msg.GetName(), all); err != nil { return nil, err } - result := make(map[*descriptor.DescriptorProto]string) + result := make(map[*descriptorpb.DescriptorProto]string) for m, nameAndCounter := range all { if nameAndCounter.counter > 1 && !strings.HasPrefix(nameAndCounter.name, ".google.protobuf.") { result[m] = strings.TrimLeft(nameAndCounter.name, ".") @@ -581,7 +582,7 @@ type nameAndCounter struct { counter int } -func (c *Converter) recursiveFindDuplicatedNestedMessages(curPkg *ProtoPackage, msg *descriptor.DescriptorProto, typeName string, alreadySeen map[*descriptor.DescriptorProto]*nameAndCounter) error { +func (c *Converter) recursiveFindDuplicatedNestedMessages(curPkg *ProtoPackage, msg *descriptorpb.DescriptorProto, typeName string, alreadySeen map[*descriptorpb.DescriptorProto]*nameAndCounter) error { if nameAndCounter, present := alreadySeen[msg]; present { nameAndCounter.counter++ return nil @@ -593,7 +594,7 @@ func (c *Converter) recursiveFindDuplicatedNestedMessages(curPkg *ProtoPackage, for _, desc := range msg.GetField() { descType := desc.GetType() - if descType != descriptor.FieldDescriptorProto_TYPE_MESSAGE && descType != descriptor.FieldDescriptorProto_TYPE_GROUP { + if descType != descriptorpb.FieldDescriptorProto_TYPE_MESSAGE && descType != descriptorpb.FieldDescriptorProto_TYPE_GROUP { // no nested messages continue } @@ -611,7 +612,7 @@ func (c *Converter) recursiveFindDuplicatedNestedMessages(curPkg *ProtoPackage, return nil } -func (c *Converter) recursiveConvertMessageType(curPkg *ProtoPackage, msg *descriptor.DescriptorProto, pkgName string, duplicatedMessages map[*descriptor.DescriptorProto]string, ignoreDuplicatedMessages bool) (*jsonschema.Type, error) { +func (c *Converter) recursiveConvertMessageType(curPkg *ProtoPackage, msg *descriptorpb.DescriptorProto, pkgName string, duplicatedMessages map[*descriptorpb.DescriptorProto]string, ignoreDuplicatedMessages bool) (*jsonschema.Type, error) { // Handle google's well-known types: if msg.Name != nil && wellKnownTypes[*msg.Name] && pkgName == ".google.protobuf" { var typeSchema *jsonschema.Type @@ -715,7 +716,7 @@ func (c *Converter) recursiveConvertMessageType(curPkg *ProtoPackage, msg *descr } } - c.logger.WithField("message_str", proto.MarshalTextString(msg)).Trace("Converting message") + c.logger.WithField("message_str", prototext.Format(msg)).Trace("Converting message") for _, fieldDesc := range msg.GetField() { // get field schema recursedJSONSchemaType, err := c.convertField(curPkg, fieldDesc, msg, duplicatedMessages) @@ -762,8 +763,8 @@ func (c *Converter) recursiveConvertMessageType(curPkg *ProtoPackage, msg *descr jsonSchemaType.Properties.Set(fieldName, recursedJSONSchemaType) } - // Look for required fields (either by proto2 required flag, or the AllFieldsRequired option): - if fieldDesc.GetLabel() == descriptor.FieldDescriptorProto_LABEL_REQUIRED { + // Look for required fields (either by proto required flag, or the AllFieldsRequired option): + if fieldDesc.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REQUIRED { jsonSchemaType.Required = append(jsonSchemaType.Required, fieldDesc.GetName()) } } @@ -777,7 +778,7 @@ func (c *Converter) recursiveConvertMessageType(curPkg *ProtoPackage, msg *descr return jsonSchemaType, nil } -func formatDescription(sl *descriptor.SourceCodeInfo_Location) string { +func formatDescription(sl *descriptorpb.SourceCodeInfo_Location) string { var lines []string for _, str := range sl.GetLeadingDetachedComments() { if s := strings.TrimSpace(str); s != "" { diff --git a/plugins/telemetry/stats_poller.go b/plugins/telemetry/stats_poller.go index 8844890462..31c9b40fc8 100644 --- a/plugins/telemetry/stats_poller.go +++ b/plugins/telemetry/stats_poller.go @@ -6,10 +6,10 @@ import ( "time" govppapi "git.fd.io/govpp.git/api" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/plugins/telemetry/vppcalls" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/ifaceidx" diff --git a/plugins/vpp/abfplugin/descriptor/abf.go b/plugins/vpp/abfplugin/descriptor/abf.go index da852cfa74..f8ae8294c0 100644 --- a/plugins/vpp/abfplugin/descriptor/abf.go +++ b/plugins/vpp/abfplugin/descriptor/abf.go @@ -16,8 +16,8 @@ package descriptor import ( "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" - prototypes "github.com/golang/protobuf/ptypes/empty" + "google.golang.org/protobuf/proto" + prototypes "google.golang.org/protobuf/types/known/emptypb" "go.ligato.io/cn-infra/v2/idxmap" "go.ligato.io/cn-infra/v2/logging" diff --git a/plugins/vpp/abfplugin/descriptor/abf_to_interface.go b/plugins/vpp/abfplugin/descriptor/abf_to_interface.go index e4ea05b0ea..0baa0d3c4c 100644 --- a/plugins/vpp/abfplugin/descriptor/abf_to_interface.go +++ b/plugins/vpp/abfplugin/descriptor/abf_to_interface.go @@ -22,8 +22,8 @@ import ( vpp_interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/abfplugin/vppcalls" diff --git a/plugins/vpp/abfplugin/descriptor/adapter/abf.go b/plugins/vpp/abfplugin/descriptor/adapter/abf.go index 732d06ba83..94096259ec 100644 --- a/plugins/vpp/abfplugin/descriptor/adapter/abf.go +++ b/plugins/vpp/abfplugin/descriptor/adapter/abf.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/abfplugin/abfidx" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/abf" diff --git a/plugins/vpp/aclplugin/descriptor/acl.go b/plugins/vpp/aclplugin/descriptor/acl.go index 51b954063b..6113b77f49 100644 --- a/plugins/vpp/aclplugin/descriptor/acl.go +++ b/plugins/vpp/aclplugin/descriptor/acl.go @@ -18,11 +18,11 @@ import ( "bytes" "net" - "github.com/golang/protobuf/proto" - prototypes "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/idxmap" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/emptypb" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/aclplugin/aclidx" @@ -219,13 +219,13 @@ func (d *ACLDescriptor) DerivedValues(key string, value *acl.ACL) (derived []api for _, ifName := range value.GetInterfaces().GetIngress() { derived = append(derived, api.KeyValuePair{ Key: acl.ToInterfaceKey(value.Name, ifName, acl.IngressFlow), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, }) } for _, ifName := range value.GetInterfaces().GetEgress() { derived = append(derived, api.KeyValuePair{ Key: acl.ToInterfaceKey(value.Name, ifName, acl.EgressFlow), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, }) } return derived diff --git a/plugins/vpp/aclplugin/descriptor/acl_to_interface.go b/plugins/vpp/aclplugin/descriptor/acl_to_interface.go index 23046ea4a6..fbd51c9af8 100644 --- a/plugins/vpp/aclplugin/descriptor/acl_to_interface.go +++ b/plugins/vpp/aclplugin/descriptor/acl_to_interface.go @@ -1,9 +1,9 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/aclplugin/aclidx" diff --git a/plugins/vpp/aclplugin/descriptor/adapter/acl.go b/plugins/vpp/aclplugin/descriptor/adapter/acl.go index 95cdc17f99..4bd4881aca 100644 --- a/plugins/vpp/aclplugin/descriptor/adapter/acl.go +++ b/plugins/vpp/aclplugin/descriptor/adapter/acl.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/aclplugin/aclidx" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/acl" diff --git a/plugins/vpp/dnsplugin/descriptor/adapter/dnscache.go b/plugins/vpp/dnsplugin/descriptor/adapter/dnscache.go index 5b545cf00c..32db026a42 100644 --- a/plugins/vpp/dnsplugin/descriptor/adapter/dnscache.go +++ b/plugins/vpp/dnsplugin/descriptor/adapter/dnscache.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/dns" ) diff --git a/plugins/vpp/ifplugin/descriptor/adapter/bondedinterface.go b/plugins/vpp/ifplugin/descriptor/adapter/bondedinterface.go index bd360b490a..e7c9325d3f 100644 --- a/plugins/vpp/ifplugin/descriptor/adapter/bondedinterface.go +++ b/plugins/vpp/ifplugin/descriptor/adapter/bondedinterface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" ) diff --git a/plugins/vpp/ifplugin/descriptor/adapter/interface.go b/plugins/vpp/ifplugin/descriptor/adapter/interface.go index 3276329ebc..3028816e73 100644 --- a/plugins/vpp/ifplugin/descriptor/adapter/interface.go +++ b/plugins/vpp/ifplugin/descriptor/adapter/interface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/ifaceidx" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" diff --git a/plugins/vpp/ifplugin/descriptor/adapter/ip6nd.go b/plugins/vpp/ifplugin/descriptor/adapter/ip6nd.go index 8d1ce8b8f3..8dab41d5e5 100644 --- a/plugins/vpp/ifplugin/descriptor/adapter/ip6nd.go +++ b/plugins/vpp/ifplugin/descriptor/adapter/ip6nd.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" ) diff --git a/plugins/vpp/ifplugin/descriptor/adapter/rxmode.go b/plugins/vpp/ifplugin/descriptor/adapter/rxmode.go index 05aa0c40ea..991ffa5676 100644 --- a/plugins/vpp/ifplugin/descriptor/adapter/rxmode.go +++ b/plugins/vpp/ifplugin/descriptor/adapter/rxmode.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" ) diff --git a/plugins/vpp/ifplugin/descriptor/adapter/rxplacement.go b/plugins/vpp/ifplugin/descriptor/adapter/rxplacement.go index 538c1c0ef6..a89ad80628 100644 --- a/plugins/vpp/ifplugin/descriptor/adapter/rxplacement.go +++ b/plugins/vpp/ifplugin/descriptor/adapter/rxplacement.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" ) diff --git a/plugins/vpp/ifplugin/descriptor/adapter/span.go b/plugins/vpp/ifplugin/descriptor/adapter/span.go index e3775e81c7..65644d16c2 100644 --- a/plugins/vpp/ifplugin/descriptor/adapter/span.go +++ b/plugins/vpp/ifplugin/descriptor/adapter/span.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" ) diff --git a/plugins/vpp/ifplugin/descriptor/adapter/unnumbered.go b/plugins/vpp/ifplugin/descriptor/adapter/unnumbered.go index 1abe908d24..f6b83668f1 100644 --- a/plugins/vpp/ifplugin/descriptor/adapter/unnumbered.go +++ b/plugins/vpp/ifplugin/descriptor/adapter/unnumbered.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" ) diff --git a/plugins/vpp/ifplugin/descriptor/bonded_interface.go b/plugins/vpp/ifplugin/descriptor/bonded_interface.go index b2bb07f511..2d801e85d1 100644 --- a/plugins/vpp/ifplugin/descriptor/bonded_interface.go +++ b/plugins/vpp/ifplugin/descriptor/bonded_interface.go @@ -16,8 +16,8 @@ package descriptor import ( "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/descriptor/adapter" @@ -53,7 +53,7 @@ func NewBondedInterfaceDescriptor(ifHandler vppcalls.InterfaceVppAPI, ifIndex if typedDescriptor := &adapter.BondedInterfaceDescriptor{ Name: BondedInterfaceDescriptorName, KeySelector: descriptorCtx.IsBondEnslaveKey, - ValueTypeName: proto.MessageName(&interfaces.BondLink_BondedInterface{}), + ValueTypeName: string(proto.MessageName(&interfaces.BondLink_BondedInterface{})), Create: descriptorCtx.Create, Delete: descriptorCtx.Delete, Dependencies: descriptorCtx.Dependencies, diff --git a/plugins/vpp/ifplugin/descriptor/dhcp.go b/plugins/vpp/ifplugin/descriptor/dhcp.go index ca60d773fc..f88d9a5a53 100644 --- a/plugins/vpp/ifplugin/descriptor/dhcp.go +++ b/plugins/vpp/ifplugin/descriptor/dhcp.go @@ -19,10 +19,10 @@ import ( "strings" "sync" - "github.com/golang/protobuf/proto" - prototypes "github.com/golang/protobuf/ptypes/empty" - "github.com/pkg/errors" + "github.com/go-errors/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/emptypb" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/ifaceidx" @@ -205,7 +205,7 @@ func (d *DHCPDescriptor) DerivedValues(key string, dhcpData proto.Message) (derV { Key: interfaces.InterfaceAddressKey(dhcpLease.InterfaceName, dhcpLease.HostIpAddress, netalloc.IPAddressSource_FROM_DHCP), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, }, } } diff --git a/plugins/vpp/ifplugin/descriptor/interface.go b/plugins/vpp/ifplugin/descriptor/interface.go index 165eb380f2..590078bf3e 100644 --- a/plugins/vpp/ifplugin/descriptor/interface.go +++ b/plugins/vpp/ifplugin/descriptor/interface.go @@ -21,11 +21,11 @@ import ( "net" "strings" - "github.com/golang/protobuf/proto" - prototypes "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/idxmap" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" + empty "google.golang.org/protobuf/types/known/emptypb" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" linux_ifdescriptor "go.ligato.io/vpp-agent/v3/plugins/linux/ifplugin/descriptor" @@ -80,7 +80,7 @@ const ( wireguardKeyLength = 44 // default RDMA attributes - defaultRdmaQueueNum = 1 + defaultRdmaQueueNum = 1 defaultRdmaQueueSize = 1024 ) @@ -187,16 +187,16 @@ var ( ErrWgPort = errors.New("invalid wireguard port") // ErrRdmaHostInterfaceMissing is returned when host_if_name is not configured for RDMA link. - ErrRdmaHostInterfaceMissing = errors.Errorf("missing the host interface name for RDMA") + ErrRdmaHostInterfaceMissing = errors.Errorf("missing the host interface name for RDMA") // ErrRdmaInvalidQueueSize is returned when configured Rx or Tx queue size for RDMA driver is not power of 2. - ErrRdmaInvalidQueueSize = errors.Errorf("RDMA Rx/Tx queue size is not power of 2") + ErrRdmaInvalidQueueSize = errors.Errorf("RDMA Rx/Tx queue size is not power of 2") // ErrRdmaQueueSizeTooLarge is returned when configured Rx or Tx queue size for RDMA driver is too large. - ErrRdmaQueueSizeTooLarge = errors.Errorf("RDMA Rx/Tx queue size is too large (more than 16bits)") + ErrRdmaQueueSizeTooLarge = errors.Errorf("RDMA Rx/Tx queue size is too large (more than 16bits)") // ErrRdmaQueueNumTooLarge is returned when the number of configured Rx/Tx queues for RDMA driver exceeds the limit. - ErrRdmaQueueNumTooLarge = errors.Errorf("Number of RDMA queues is too large (more than 16bits)") + ErrRdmaQueueNumTooLarge = errors.Errorf("Number of RDMA queues is too large (more than 16bits)") ) // InterfaceDescriptor teaches KVScheduler how to configure VPP interfaces. @@ -664,22 +664,22 @@ func (d *InterfaceDescriptor) Validate(key string, intf *interfaces.Interface) e if intf.GetRdma().GetHostIfName() == "" { return kvs.NewInvalidValueError(ErrRdmaHostInterfaceMissing, "link.rdma.host_if_name") } - if intf.GetRdma().GetRxqNum() >> 16 != 0 { + if intf.GetRdma().GetRxqNum()>>16 != 0 { return kvs.NewInvalidValueError(ErrRdmaQueueNumTooLarge, "link.rdma.rxq_num") } if rxQSize := intf.GetRdma().GetRxqSize(); rxQSize > 0 { - if rxQSize & (rxQSize - 1) != 0 { + if rxQSize&(rxQSize-1) != 0 { return kvs.NewInvalidValueError(ErrRdmaInvalidQueueSize, "link.rdma.rxq_size") } - if rxQSize >> 16 != 0 { + if rxQSize>>16 != 0 { return kvs.NewInvalidValueError(ErrRdmaQueueSizeTooLarge, "link.rdma.rxq_size") } } if txQSize := intf.GetRdma().GetTxqSize(); txQSize > 0 { - if txQSize & (txQSize - 1) != 0 { + if txQSize&(txQSize-1) != 0 { return kvs.NewInvalidValueError(ErrRdmaInvalidQueueSize, "link.rdma.txq_size") } - if txQSize >> 16 != 0 { + if txQSize>>16 != 0 { return kvs.NewInvalidValueError(ErrRdmaQueueSizeTooLarge, "link.rdma.txq_size") } } @@ -908,7 +908,7 @@ func (d *InterfaceDescriptor) DerivedValues(key string, intf *interfaces.Interfa if intf.SetDhcpClient { derValues = append(derValues, kvs.KeyValuePair{ Key: interfaces.DHCPClientKey(intf.Name), - Value: &prototypes.Empty{}, + Value: &empty.Empty{}, }) } @@ -924,7 +924,7 @@ func (d *InterfaceDescriptor) DerivedValues(key string, intf *interfaces.Interfa for _, ipAddr := range intf.IpAddresses { derValues = append(derValues, kvs.KeyValuePair{ Key: interfaces.InterfaceAddressKey(intf.Name, ipAddr, netalloc_api.IPAddressSource_STATIC), - Value: &prototypes.Empty{}, + Value: &empty.Empty{}, }) } @@ -933,7 +933,7 @@ func (d *InterfaceDescriptor) DerivedValues(key string, intf *interfaces.Interfa // VRF inherited from the target numbered interface derValues = append(derValues, kvs.KeyValuePair{ Key: interfaces.InterfaceInheritedVrfKey(intf.GetName(), intf.GetUnnumbered().GetInterfaceWithIp()), - Value: &prototypes.Empty{}, + Value: &empty.Empty{}, }) } else { // not unnumbered @@ -969,7 +969,7 @@ func (d *InterfaceDescriptor) DerivedValues(key string, intf *interfaces.Interfa if hasIPv4 || hasIPv6 { derValues = append(derValues, kvs.KeyValuePair{ Key: interfaces.InterfaceVrfKey(intf.GetName(), int(intf.GetVrf()), hasIPv4, hasIPv6), - Value: &prototypes.Empty{}, + Value: &empty.Empty{}, }) } } @@ -998,7 +998,7 @@ func (d *InterfaceDescriptor) DerivedValues(key string, intf *interfaces.Interfa if len(intf.GetIpAddresses()) > 0 { derValues = append(derValues, kvs.KeyValuePair{ Key: interfaces.InterfaceWithIPKey(intf.GetName()), - Value: &prototypes.Empty{}, + Value: &empty.Empty{}, }) } diff --git a/plugins/vpp/ifplugin/descriptor/interface_address.go b/plugins/vpp/ifplugin/descriptor/interface_address.go index 8394810cef..e558ad2e60 100644 --- a/plugins/vpp/ifplugin/descriptor/interface_address.go +++ b/plugins/vpp/ifplugin/descriptor/interface_address.go @@ -15,9 +15,9 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/netalloc" diff --git a/plugins/vpp/ifplugin/descriptor/interface_vrf.go b/plugins/vpp/ifplugin/descriptor/interface_vrf.go index 9ca1925354..b4ae246828 100644 --- a/plugins/vpp/ifplugin/descriptor/interface_vrf.go +++ b/plugins/vpp/ifplugin/descriptor/interface_vrf.go @@ -15,9 +15,9 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/ifaceidx" diff --git a/plugins/vpp/ifplugin/descriptor/interface_with_address.go b/plugins/vpp/ifplugin/descriptor/interface_with_address.go index d6d6b25704..94b49b3d21 100644 --- a/plugins/vpp/ifplugin/descriptor/interface_with_address.go +++ b/plugins/vpp/ifplugin/descriptor/interface_with_address.go @@ -15,8 +15,8 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" diff --git a/plugins/vpp/ifplugin/descriptor/link_state.go b/plugins/vpp/ifplugin/descriptor/link_state.go index a0de4881be..b4c05b7499 100644 --- a/plugins/vpp/ifplugin/descriptor/link_state.go +++ b/plugins/vpp/ifplugin/descriptor/link_state.go @@ -17,8 +17,8 @@ package descriptor import ( "sync" - prototypes "github.com/golang/protobuf/ptypes/empty" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/types/known/emptypb" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/ifaceidx" @@ -100,7 +100,7 @@ func (w *LinkStateDescriptor) Retrieve(correlate []kvs.KVWithMetadata) (values [ w.linkStates[ifaceName] = linkIsUp values = append(values, kvs.KVWithMetadata{ Key: interfaces.LinkStateKey(ifaceName, linkIsUp), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, Origin: kvs.FromSB, }) } @@ -138,7 +138,7 @@ func (w *LinkStateDescriptor) UpdateLinkState(ifaceState *interfaces.InterfaceNo // push new key-value pair notifs = append(notifs, kvs.KVWithMetadata{ Key: interfaces.LinkStateKey(ifaceState.State.Name, linkIsUp), - Value: &prototypes.Empty{}, + Value: &emptypb.Empty{}, Metadata: nil, }) w.linkStates[ifaceName] = linkIsUp diff --git a/plugins/vpp/ifplugin/descriptor/rx_mode.go b/plugins/vpp/ifplugin/descriptor/rx_mode.go index de2bcfdd5e..0434dacb44 100644 --- a/plugins/vpp/ifplugin/descriptor/rx_mode.go +++ b/plugins/vpp/ifplugin/descriptor/rx_mode.go @@ -17,9 +17,9 @@ package descriptor import ( "fmt" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/descriptor/adapter" @@ -72,7 +72,7 @@ func NewRxModeDescriptor(ifHandler vppcalls.InterfaceVppAPI, ifIndex ifaceidx.If Name: RxModeDescriptorName, KeySelector: ctx.IsInterfaceRxModeKey, // proto message Interface is only used as container for RxMode - ValueTypeName: proto.MessageName(&interfaces.Interface{}), + ValueTypeName: string(proto.MessageName(&interfaces.Interface{})), ValueComparator: ctx.EquivalentRxMode, Validate: ctx.Validate, Create: ctx.Create, diff --git a/plugins/vpp/ifplugin/descriptor/rx_placement.go b/plugins/vpp/ifplugin/descriptor/rx_placement.go index 2df4c59fe8..1e8e1fba97 100644 --- a/plugins/vpp/ifplugin/descriptor/rx_placement.go +++ b/plugins/vpp/ifplugin/descriptor/rx_placement.go @@ -15,9 +15,9 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/descriptor/adapter" @@ -53,7 +53,7 @@ func NewRxPlacementDescriptor(ifHandler vppcalls.InterfaceVppAPI, ifIndex ifacei Name: RxPlacementDescriptorName, KeySelector: ctx.IsInterfaceRxPlacementKey, ValueComparator: ctx.EquivalentRxPlacement, - ValueTypeName: proto.MessageName(&interfaces.Interface{}), + ValueTypeName: string(proto.MessageName(&interfaces.Interface{})), Create: ctx.Create, Delete: ctx.Delete, Dependencies: ctx.Dependencies, diff --git a/plugins/vpp/ifplugin/descriptor/unnumbered.go b/plugins/vpp/ifplugin/descriptor/unnumbered.go index b18c35adee..f34730003e 100644 --- a/plugins/vpp/ifplugin/descriptor/unnumbered.go +++ b/plugins/vpp/ifplugin/descriptor/unnumbered.go @@ -17,9 +17,9 @@ package descriptor import ( "context" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/descriptor/adapter" @@ -58,7 +58,7 @@ func NewUnnumberedIfDescriptor(ifHandler vppcalls.InterfaceVppAPI, ifIndex iface typedDescr := &adapter.UnnumberedDescriptor{ Name: UnnumberedIfDescriptorName, KeySelector: ctx.IsUnnumberedInterfaceKey, - ValueTypeName: proto.MessageName(&interfaces.Interface_Unnumbered{}), + ValueTypeName: string(proto.MessageName(&interfaces.Interface_Unnumbered{})), Create: ctx.Create, Delete: ctx.Delete, Dependencies: ctx.Dependencies, diff --git a/plugins/vpp/ipfixplugin/descriptor/adapter/flowprobefeature.go b/plugins/vpp/ipfixplugin/descriptor/adapter/flowprobefeature.go index 5e6ddaafb3..1c4e7117e7 100644 --- a/plugins/vpp/ipfixplugin/descriptor/adapter/flowprobefeature.go +++ b/plugins/vpp/ipfixplugin/descriptor/adapter/flowprobefeature.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipfix" ) diff --git a/plugins/vpp/ipfixplugin/descriptor/adapter/flowprobeparams.go b/plugins/vpp/ipfixplugin/descriptor/adapter/flowprobeparams.go index 8b326d2253..a342fd2b08 100644 --- a/plugins/vpp/ipfixplugin/descriptor/adapter/flowprobeparams.go +++ b/plugins/vpp/ipfixplugin/descriptor/adapter/flowprobeparams.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipfix" ) diff --git a/plugins/vpp/ipfixplugin/descriptor/adapter/ipfix.go b/plugins/vpp/ipfixplugin/descriptor/adapter/ipfix.go index 3cc5475a49..5d5adb3046 100644 --- a/plugins/vpp/ipfixplugin/descriptor/adapter/ipfix.go +++ b/plugins/vpp/ipfixplugin/descriptor/adapter/ipfix.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipfix" ) diff --git a/plugins/vpp/ipsecplugin/descriptor/adapter/sa.go b/plugins/vpp/ipsecplugin/descriptor/adapter/sa.go index 0e984c3c3a..c37556bcae 100644 --- a/plugins/vpp/ipsecplugin/descriptor/adapter/sa.go +++ b/plugins/vpp/ipsecplugin/descriptor/adapter/sa.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipsec" ) diff --git a/plugins/vpp/ipsecplugin/descriptor/adapter/sp.go b/plugins/vpp/ipsecplugin/descriptor/adapter/sp.go index 3a89d01f88..58bb44f08d 100644 --- a/plugins/vpp/ipsecplugin/descriptor/adapter/sp.go +++ b/plugins/vpp/ipsecplugin/descriptor/adapter/sp.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipsec" ) diff --git a/plugins/vpp/ipsecplugin/descriptor/adapter/spd.go b/plugins/vpp/ipsecplugin/descriptor/adapter/spd.go index e5d6e3fce6..3c75c513c6 100644 --- a/plugins/vpp/ipsecplugin/descriptor/adapter/spd.go +++ b/plugins/vpp/ipsecplugin/descriptor/adapter/spd.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipsec" ) diff --git a/plugins/vpp/ipsecplugin/descriptor/adapter/spdinterface.go b/plugins/vpp/ipsecplugin/descriptor/adapter/spdinterface.go index 77ad5c98bb..04b74602b7 100644 --- a/plugins/vpp/ipsecplugin/descriptor/adapter/spdinterface.go +++ b/plugins/vpp/ipsecplugin/descriptor/adapter/spdinterface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipsec" ) diff --git a/plugins/vpp/ipsecplugin/descriptor/adapter/tunprotect.go b/plugins/vpp/ipsecplugin/descriptor/adapter/tunprotect.go index 65b43ba1f5..28a771b64d 100644 --- a/plugins/vpp/ipsecplugin/descriptor/adapter/tunprotect.go +++ b/plugins/vpp/ipsecplugin/descriptor/adapter/tunprotect.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipsec" ) diff --git a/plugins/vpp/ipsecplugin/descriptor/spd_interface.go b/plugins/vpp/ipsecplugin/descriptor/spd_interface.go index 86ec899f12..058d386c3e 100644 --- a/plugins/vpp/ipsecplugin/descriptor/spd_interface.go +++ b/plugins/vpp/ipsecplugin/descriptor/spd_interface.go @@ -18,8 +18,8 @@ import ( "strconv" "github.com/go-errors/errors" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/ipsecplugin/descriptor/adapter" @@ -59,7 +59,7 @@ func (d *SPDInterfaceDescriptor) GetDescriptor() *adapter.SPDInterfaceDescriptor return &adapter.SPDInterfaceDescriptor{ Name: SPDInterfaceDescriptorName, KeySelector: d.IsSPDInterfaceKey, - ValueTypeName: proto.MessageName(&ipsec.SecurityPolicyDatabase{}), + ValueTypeName: string(proto.MessageName(&ipsec.SecurityPolicyDatabase{})), Create: d.Create, Delete: d.Delete, Dependencies: d.Dependencies, diff --git a/plugins/vpp/l2plugin/descriptor/adapter/bdinterface.go b/plugins/vpp/l2plugin/descriptor/adapter/bdinterface.go index 2e0f6d8f34..c807c926ca 100644 --- a/plugins/vpp/l2plugin/descriptor/adapter/bdinterface.go +++ b/plugins/vpp/l2plugin/descriptor/adapter/bdinterface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l2" ) diff --git a/plugins/vpp/l2plugin/descriptor/adapter/bridgedomain.go b/plugins/vpp/l2plugin/descriptor/adapter/bridgedomain.go index 8bc86ce63b..24ddcefdf1 100644 --- a/plugins/vpp/l2plugin/descriptor/adapter/bridgedomain.go +++ b/plugins/vpp/l2plugin/descriptor/adapter/bridgedomain.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/pkg/idxvpp" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l2" diff --git a/plugins/vpp/l2plugin/descriptor/adapter/fib.go b/plugins/vpp/l2plugin/descriptor/adapter/fib.go index 1113c3ffe9..ca9d84000d 100644 --- a/plugins/vpp/l2plugin/descriptor/adapter/fib.go +++ b/plugins/vpp/l2plugin/descriptor/adapter/fib.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l2" ) diff --git a/plugins/vpp/l2plugin/descriptor/adapter/xconnect.go b/plugins/vpp/l2plugin/descriptor/adapter/xconnect.go index c6f9df3ce4..8b6e914167 100644 --- a/plugins/vpp/l2plugin/descriptor/adapter/xconnect.go +++ b/plugins/vpp/l2plugin/descriptor/adapter/xconnect.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l2" ) diff --git a/plugins/vpp/l2plugin/descriptor/bd_interface.go b/plugins/vpp/l2plugin/descriptor/bd_interface.go index 6baba7136e..09b54a28f8 100644 --- a/plugins/vpp/l2plugin/descriptor/bd_interface.go +++ b/plugins/vpp/l2plugin/descriptor/bd_interface.go @@ -15,9 +15,9 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/pkg/idxvpp" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" @@ -61,7 +61,7 @@ func (d *BDInterfaceDescriptor) GetDescriptor() *adapter.BDInterfaceDescriptor { return &adapter.BDInterfaceDescriptor{ Name: BDInterfaceDescriptorName, KeySelector: d.IsBDInterfaceKey, - ValueTypeName: proto.MessageName(&l2.BridgeDomain_Interface{}), + ValueTypeName: string(proto.MessageName(&l2.BridgeDomain_Interface{})), Create: d.Create, Delete: d.Delete, Dependencies: d.Dependencies, diff --git a/plugins/vpp/l3plugin/descriptor/adapter/arpentry.go b/plugins/vpp/l3plugin/descriptor/adapter/arpentry.go index 5c21c4d83c..f57b571bf2 100644 --- a/plugins/vpp/l3plugin/descriptor/adapter/arpentry.go +++ b/plugins/vpp/l3plugin/descriptor/adapter/arpentry.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3" ) diff --git a/plugins/vpp/l3plugin/descriptor/adapter/dhcpproxy.go b/plugins/vpp/l3plugin/descriptor/adapter/dhcpproxy.go index acfcbbecfa..4a6fef87d4 100644 --- a/plugins/vpp/l3plugin/descriptor/adapter/dhcpproxy.go +++ b/plugins/vpp/l3plugin/descriptor/adapter/dhcpproxy.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3" ) diff --git a/plugins/vpp/l3plugin/descriptor/adapter/ipscanneighbor.go b/plugins/vpp/l3plugin/descriptor/adapter/ipscanneighbor.go index 53295d7318..01fde5e68a 100644 --- a/plugins/vpp/l3plugin/descriptor/adapter/ipscanneighbor.go +++ b/plugins/vpp/l3plugin/descriptor/adapter/ipscanneighbor.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3" ) diff --git a/plugins/vpp/l3plugin/descriptor/adapter/l3xc.go b/plugins/vpp/l3plugin/descriptor/adapter/l3xc.go index a52564de6a..b6dd9c6402 100644 --- a/plugins/vpp/l3plugin/descriptor/adapter/l3xc.go +++ b/plugins/vpp/l3plugin/descriptor/adapter/l3xc.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3" ) diff --git a/plugins/vpp/l3plugin/descriptor/adapter/proxyarp.go b/plugins/vpp/l3plugin/descriptor/adapter/proxyarp.go index 869d119499..f00aecc3a9 100644 --- a/plugins/vpp/l3plugin/descriptor/adapter/proxyarp.go +++ b/plugins/vpp/l3plugin/descriptor/adapter/proxyarp.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3" ) diff --git a/plugins/vpp/l3plugin/descriptor/adapter/proxyarpinterface.go b/plugins/vpp/l3plugin/descriptor/adapter/proxyarpinterface.go index 448b6c7269..7187288413 100644 --- a/plugins/vpp/l3plugin/descriptor/adapter/proxyarpinterface.go +++ b/plugins/vpp/l3plugin/descriptor/adapter/proxyarpinterface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3" ) diff --git a/plugins/vpp/l3plugin/descriptor/adapter/route.go b/plugins/vpp/l3plugin/descriptor/adapter/route.go index 1daa36c13d..cc0ef40b9d 100644 --- a/plugins/vpp/l3plugin/descriptor/adapter/route.go +++ b/plugins/vpp/l3plugin/descriptor/adapter/route.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3" ) diff --git a/plugins/vpp/l3plugin/descriptor/adapter/teibentry.go b/plugins/vpp/l3plugin/descriptor/adapter/teibentry.go index 95b49b8c9c..cba7c99e27 100644 --- a/plugins/vpp/l3plugin/descriptor/adapter/teibentry.go +++ b/plugins/vpp/l3plugin/descriptor/adapter/teibentry.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3" ) diff --git a/plugins/vpp/l3plugin/descriptor/adapter/vrftable.go b/plugins/vpp/l3plugin/descriptor/adapter/vrftable.go index 5cbbff9774..a997b3873c 100644 --- a/plugins/vpp/l3plugin/descriptor/adapter/vrftable.go +++ b/plugins/vpp/l3plugin/descriptor/adapter/vrftable.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/l3plugin/vrfidx" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3" diff --git a/plugins/vpp/l3plugin/descriptor/adapter/vrrpentry.go b/plugins/vpp/l3plugin/descriptor/adapter/vrrpentry.go index 6f6c3ae3d7..c23179e884 100644 --- a/plugins/vpp/l3plugin/descriptor/adapter/vrrpentry.go +++ b/plugins/vpp/l3plugin/descriptor/adapter/vrrpentry.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3" ) diff --git a/plugins/vpp/l3plugin/descriptor/arp_entry.go b/plugins/vpp/l3plugin/descriptor/arp_entry.go index c1909d8428..04f5682824 100644 --- a/plugins/vpp/l3plugin/descriptor/arp_entry.go +++ b/plugins/vpp/l3plugin/descriptor/arp_entry.go @@ -15,9 +15,9 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" ifdescriptor "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/descriptor" diff --git a/plugins/vpp/l3plugin/descriptor/ip_scan_neighbor.go b/plugins/vpp/l3plugin/descriptor/ip_scan_neighbor.go index d38ad83590..ed400b44eb 100644 --- a/plugins/vpp/l3plugin/descriptor/ip_scan_neighbor.go +++ b/plugins/vpp/l3plugin/descriptor/ip_scan_neighbor.go @@ -15,9 +15,9 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/pkg/models" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" diff --git a/plugins/vpp/l3plugin/descriptor/l3xc.go b/plugins/vpp/l3plugin/descriptor/l3xc.go index 62695e36f9..baba7b35c0 100644 --- a/plugins/vpp/l3plugin/descriptor/l3xc.go +++ b/plugins/vpp/l3plugin/descriptor/l3xc.go @@ -21,9 +21,9 @@ import ( "strconv" "strings" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/pkg/models" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" diff --git a/plugins/vpp/l3plugin/descriptor/proxy_arp_interface.go b/plugins/vpp/l3plugin/descriptor/proxy_arp_interface.go index 70af7c7b8c..ffec08a27e 100644 --- a/plugins/vpp/l3plugin/descriptor/proxy_arp_interface.go +++ b/plugins/vpp/l3plugin/descriptor/proxy_arp_interface.go @@ -15,9 +15,9 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/l3plugin/descriptor/adapter" @@ -57,7 +57,7 @@ func NewProxyArpInterfaceDescriptor(scheduler kvs.KVScheduler, _, isProxyARPInterfaceKey := l3.ParseProxyARPInterfaceKey(key) return isProxyARPInterfaceKey }, - ValueTypeName: proto.MessageName(&l3.ProxyARP_Interface{}), + ValueTypeName: string(proto.MessageName(&l3.ProxyARP_Interface{})), Create: ctx.Create, Delete: ctx.Delete, Dependencies: ctx.Dependencies, diff --git a/plugins/vpp/l3plugin/descriptor/route.go b/plugins/vpp/l3plugin/descriptor/route.go index 3bf1748ee8..3cfacd7c71 100644 --- a/plugins/vpp/l3plugin/descriptor/route.go +++ b/plugins/vpp/l3plugin/descriptor/route.go @@ -21,10 +21,10 @@ import ( "net" "strings" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" "go.ligato.io/cn-infra/v2/utils/addrs" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/pkg/models" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" diff --git a/plugins/vpp/l3plugin/descriptor/vrf_table.go b/plugins/vpp/l3plugin/descriptor/vrf_table.go index 0dd2643d32..3ef3b2433e 100644 --- a/plugins/vpp/l3plugin/descriptor/vrf_table.go +++ b/plugins/vpp/l3plugin/descriptor/vrf_table.go @@ -19,10 +19,10 @@ import ( "math" "strings" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/idxmap" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/l3plugin/descriptor/adapter" diff --git a/plugins/vpp/l3plugin/descriptor/vrrp.go b/plugins/vpp/l3plugin/descriptor/vrrp.go index e3768110d0..b4c003546b 100644 --- a/plugins/vpp/l3plugin/descriptor/vrrp.go +++ b/plugins/vpp/l3plugin/descriptor/vrrp.go @@ -18,10 +18,11 @@ import ( "math" "net" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" + "google.golang.org/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" ifdescriptor "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/descriptor" "go.ligato.io/vpp-agent/v3/plugins/vpp/l3plugin/descriptor/adapter" diff --git a/plugins/vpp/natplugin/descriptor/adapter/dnat44.go b/plugins/vpp/natplugin/descriptor/adapter/dnat44.go index 843bce0883..b975e818c6 100644 --- a/plugins/vpp/natplugin/descriptor/adapter/dnat44.go +++ b/plugins/vpp/natplugin/descriptor/adapter/dnat44.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/nat" ) diff --git a/plugins/vpp/natplugin/descriptor/adapter/nat44addresspool.go b/plugins/vpp/natplugin/descriptor/adapter/nat44addresspool.go index f981eb60b3..f97d2636eb 100644 --- a/plugins/vpp/natplugin/descriptor/adapter/nat44addresspool.go +++ b/plugins/vpp/natplugin/descriptor/adapter/nat44addresspool.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/nat" ) diff --git a/plugins/vpp/natplugin/descriptor/adapter/nat44global.go b/plugins/vpp/natplugin/descriptor/adapter/nat44global.go index a23d799d8b..ec6cfd343a 100644 --- a/plugins/vpp/natplugin/descriptor/adapter/nat44global.go +++ b/plugins/vpp/natplugin/descriptor/adapter/nat44global.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/nat" ) diff --git a/plugins/vpp/natplugin/descriptor/adapter/nat44globaladdress.go b/plugins/vpp/natplugin/descriptor/adapter/nat44globaladdress.go index ce0bc62aef..d72a3bd02d 100644 --- a/plugins/vpp/natplugin/descriptor/adapter/nat44globaladdress.go +++ b/plugins/vpp/natplugin/descriptor/adapter/nat44globaladdress.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/nat" ) diff --git a/plugins/vpp/natplugin/descriptor/adapter/nat44globalinterface.go b/plugins/vpp/natplugin/descriptor/adapter/nat44globalinterface.go index 44f8752501..e10ddf44b8 100644 --- a/plugins/vpp/natplugin/descriptor/adapter/nat44globalinterface.go +++ b/plugins/vpp/natplugin/descriptor/adapter/nat44globalinterface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/nat" ) diff --git a/plugins/vpp/natplugin/descriptor/adapter/nat44interface.go b/plugins/vpp/natplugin/descriptor/adapter/nat44interface.go index 45d14f9cbb..b792dfbaec 100644 --- a/plugins/vpp/natplugin/descriptor/adapter/nat44interface.go +++ b/plugins/vpp/natplugin/descriptor/adapter/nat44interface.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/nat" ) diff --git a/plugins/vpp/natplugin/descriptor/nat44_dnat.go b/plugins/vpp/natplugin/descriptor/nat44_dnat.go index dc17550782..78ae49dffb 100644 --- a/plugins/vpp/natplugin/descriptor/nat44_dnat.go +++ b/plugins/vpp/natplugin/descriptor/nat44_dnat.go @@ -19,9 +19,10 @@ import ( "net" "strconv" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" + kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" vpp_ifdescriptor "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/descriptor" "go.ligato.io/vpp-agent/v3/plugins/vpp/natplugin/descriptor/adapter" diff --git a/plugins/vpp/natplugin/descriptor/nat44_global.go b/plugins/vpp/natplugin/descriptor/nat44_global.go index 4b96785900..a0b7398cac 100644 --- a/plugins/vpp/natplugin/descriptor/nat44_global.go +++ b/plugins/vpp/natplugin/descriptor/nat44_global.go @@ -18,10 +18,10 @@ import ( "fmt" "net" - "github.com/golang/protobuf/proto" - prototypes "github.com/golang/protobuf/ptypes/empty" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" + prototypes "google.golang.org/protobuf/types/known/emptypb" "go.ligato.io/vpp-agent/v3/pkg/models" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" diff --git a/plugins/vpp/natplugin/descriptor/nat44_global_address.go b/plugins/vpp/natplugin/descriptor/nat44_global_address.go index 99e9b462f2..d675d549c4 100644 --- a/plugins/vpp/natplugin/descriptor/nat44_global_address.go +++ b/plugins/vpp/natplugin/descriptor/nat44_global_address.go @@ -18,8 +18,8 @@ import ( "errors" "net" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/natplugin/descriptor/adapter" @@ -64,7 +64,7 @@ func NewNAT44GlobalAddressDescriptor(natHandler vppcalls.NatVppAPI, log logging. typedDescr := &adapter.NAT44GlobalAddressDescriptor{ Name: NAT44GlobalAddressDescriptorName, KeySelector: ctx.IsNat44DerivedAddressKey, - ValueTypeName: proto.MessageName(&nat.Nat44Global_Address{}), + ValueTypeName: string(proto.MessageName(&nat.Nat44Global_Address{})), Create: ctx.Create, Delete: ctx.Delete, Dependencies: ctx.Dependencies, diff --git a/plugins/vpp/natplugin/descriptor/nat44_global_interface.go b/plugins/vpp/natplugin/descriptor/nat44_global_interface.go index 0f27279343..89da7173a4 100644 --- a/plugins/vpp/natplugin/descriptor/nat44_global_interface.go +++ b/plugins/vpp/natplugin/descriptor/nat44_global_interface.go @@ -15,8 +15,8 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/natplugin/descriptor/adapter" @@ -54,7 +54,7 @@ func NewNAT44GlobalInterfaceDescriptor(natHandler vppcalls.NatVppAPI, log loggin typedDescr := &adapter.NAT44GlobalInterfaceDescriptor{ Name: NAT44GlobalInterfaceDescriptorName, KeySelector: ctx.IsNAT44DerivedInterfaceKey, - ValueTypeName: proto.MessageName(&nat.Nat44Global_Interface{}), + ValueTypeName: string(proto.MessageName(&nat.Nat44Global_Interface{})), Create: ctx.Create, Delete: ctx.Delete, Dependencies: ctx.Dependencies, diff --git a/plugins/vpp/natplugin/vppcalls/vpp2005/dump_nat_vppcalls.go b/plugins/vpp/natplugin/vppcalls/vpp2005/dump_nat_vppcalls.go index db9df88c0a..4826ffeb00 100644 --- a/plugins/vpp/natplugin/vppcalls/vpp2005/dump_nat_vppcalls.go +++ b/plugins/vpp/natplugin/vppcalls/vpp2005/dump_nat_vppcalls.go @@ -20,7 +20,7 @@ import ( "sort" "strings" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" vpp_nat "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2005/nat" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/ifaceidx" diff --git a/plugins/vpp/natplugin/vppcalls/vpp2009/dump_nat_vppcalls.go b/plugins/vpp/natplugin/vppcalls/vpp2009/dump_nat_vppcalls.go index ebee0a80d8..517f7fe954 100644 --- a/plugins/vpp/natplugin/vppcalls/vpp2009/dump_nat_vppcalls.go +++ b/plugins/vpp/natplugin/vppcalls/vpp2009/dump_nat_vppcalls.go @@ -20,7 +20,7 @@ import ( "sort" "strings" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" vpp_nat "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2009/nat" "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2009/nat_types" diff --git a/plugins/vpp/natplugin/vppcalls/vpp2101/dump_nat_vppcalls.go b/plugins/vpp/natplugin/vppcalls/vpp2101/dump_nat_vppcalls.go index 96004fa9a3..9e510c06c6 100644 --- a/plugins/vpp/natplugin/vppcalls/vpp2101/dump_nat_vppcalls.go +++ b/plugins/vpp/natplugin/vppcalls/vpp2101/dump_nat_vppcalls.go @@ -20,7 +20,7 @@ import ( "sort" "strings" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" vpp_nat "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/nat44" "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/nat_types" diff --git a/plugins/vpp/natplugin/vppcalls/vpp2106/dump_nat_vppcalls.go b/plugins/vpp/natplugin/vppcalls/vpp2106/dump_nat_vppcalls.go index 6303174304..0ba9ba4223 100644 --- a/plugins/vpp/natplugin/vppcalls/vpp2106/dump_nat_vppcalls.go +++ b/plugins/vpp/natplugin/vppcalls/vpp2106/dump_nat_vppcalls.go @@ -20,7 +20,7 @@ import ( "sort" "strings" - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" vpp_nat_ed "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/nat44_ed" vpp_nat_ei "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/nat44_ei" diff --git a/plugins/vpp/puntplugin/descriptor/adapter/ippuntredirect.go b/plugins/vpp/puntplugin/descriptor/adapter/ippuntredirect.go index 0f7c36d690..30efc04a0b 100644 --- a/plugins/vpp/puntplugin/descriptor/adapter/ippuntredirect.go +++ b/plugins/vpp/puntplugin/descriptor/adapter/ippuntredirect.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/punt" ) diff --git a/plugins/vpp/puntplugin/descriptor/adapter/puntexception.go b/plugins/vpp/puntplugin/descriptor/adapter/puntexception.go index c101f259f7..0e28aea371 100644 --- a/plugins/vpp/puntplugin/descriptor/adapter/puntexception.go +++ b/plugins/vpp/puntplugin/descriptor/adapter/puntexception.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/punt" ) diff --git a/plugins/vpp/puntplugin/descriptor/adapter/punttohost.go b/plugins/vpp/puntplugin/descriptor/adapter/punttohost.go index 115140a1c7..3402d04142 100644 --- a/plugins/vpp/puntplugin/descriptor/adapter/punttohost.go +++ b/plugins/vpp/puntplugin/descriptor/adapter/punttohost.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/punt" ) diff --git a/plugins/vpp/puntplugin/descriptor/ip_punt_redirect.go b/plugins/vpp/puntplugin/descriptor/ip_punt_redirect.go index d82d012b46..ec2d210850 100644 --- a/plugins/vpp/puntplugin/descriptor/ip_punt_redirect.go +++ b/plugins/vpp/puntplugin/descriptor/ip_punt_redirect.go @@ -17,8 +17,8 @@ package descriptor import ( "errors" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/pkg/models" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" diff --git a/plugins/vpp/srplugin/descriptor/adapter/localsid.go b/plugins/vpp/srplugin/descriptor/adapter/localsid.go index 2bfe00efc9..e885d96da0 100644 --- a/plugins/vpp/srplugin/descriptor/adapter/localsid.go +++ b/plugins/vpp/srplugin/descriptor/adapter/localsid.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/srv6" ) diff --git a/plugins/vpp/srplugin/descriptor/adapter/policy.go b/plugins/vpp/srplugin/descriptor/adapter/policy.go index 346363241a..a29cc54752 100644 --- a/plugins/vpp/srplugin/descriptor/adapter/policy.go +++ b/plugins/vpp/srplugin/descriptor/adapter/policy.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/srv6" ) diff --git a/plugins/vpp/srplugin/descriptor/adapter/srv6global.go b/plugins/vpp/srplugin/descriptor/adapter/srv6global.go index 31ba97a801..f3825667ee 100644 --- a/plugins/vpp/srplugin/descriptor/adapter/srv6global.go +++ b/plugins/vpp/srplugin/descriptor/adapter/srv6global.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/srv6" ) diff --git a/plugins/vpp/srplugin/descriptor/adapter/steering.go b/plugins/vpp/srplugin/descriptor/adapter/steering.go index e4b6321e9d..b3af970629 100644 --- a/plugins/vpp/srplugin/descriptor/adapter/steering.go +++ b/plugins/vpp/srplugin/descriptor/adapter/steering.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/srv6" ) diff --git a/plugins/vpp/srplugin/descriptor/policy.go b/plugins/vpp/srplugin/descriptor/policy.go index 708d2a149c..feb0f17173 100644 --- a/plugins/vpp/srplugin/descriptor/policy.go +++ b/plugins/vpp/srplugin/descriptor/policy.go @@ -16,8 +16,8 @@ package descriptor import ( "github.com/pkg/errors" + "google.golang.org/protobuf/encoding/prototext" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" scheduler "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" @@ -174,7 +174,7 @@ func (d *PolicyDescriptor) Update(key string, oldPolicy, newPolicy *srv6.Policy, // remove old segment lists not present in newPolicy slIndexes := oldMetadata.(*PolicyMetadata).segmentListIndexes for _, sl := range removePool { - index, exists := slIndexes[proto.CompactTextString(sl)] + index, exists := slIndexes[prototext.MarshalOptions{}.Format(sl)] if !exists { return nil, errors.Errorf("failed update policy: failed to find index for segment list "+ "%+v in policy with bsid %v (metadata segment list indexes: %+v)", sl, oldPolicy.GetBsid(), slIndexes) @@ -204,7 +204,7 @@ func (d *PolicyDescriptor) policyIndexInfo(policy *srv6.Policy) (map[string]uint } result := make(map[string]uint32) for slist, index := range indexes { - result[proto.CompactTextString(slist)] = index + result[prototext.MarshalOptions{}.Format(slist)] = index } return result, nil } diff --git a/plugins/vpp/srplugin/descriptor/srv6_global.go b/plugins/vpp/srplugin/descriptor/srv6_global.go index 0a4173ebbf..b94d354335 100644 --- a/plugins/vpp/srplugin/descriptor/srv6_global.go +++ b/plugins/vpp/srplugin/descriptor/srv6_global.go @@ -1,8 +1,8 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" scheduler "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/srplugin/descriptor/adapter" diff --git a/plugins/vpp/stnplugin/descriptor/adapter/stn.go b/plugins/vpp/stnplugin/descriptor/adapter/stn.go index 13d938acf3..cb53d8f09b 100644 --- a/plugins/vpp/stnplugin/descriptor/adapter/stn.go +++ b/plugins/vpp/stnplugin/descriptor/adapter/stn.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/stn" ) diff --git a/plugins/vpp/stnplugin/descriptor/stn.go b/plugins/vpp/stnplugin/descriptor/stn.go index 44e57e746e..4260bf58e5 100644 --- a/plugins/vpp/stnplugin/descriptor/stn.go +++ b/plugins/vpp/stnplugin/descriptor/stn.go @@ -15,9 +15,9 @@ package descriptor import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/pkg/models" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" diff --git a/plugins/vpp/wireguardplugin/descriptor/adapter/peer.go b/plugins/vpp/wireguardplugin/descriptor/adapter/peer.go index 401987cec7..57b5075ddf 100644 --- a/plugins/vpp/wireguardplugin/descriptor/adapter/peer.go +++ b/plugins/vpp/wireguardplugin/descriptor/adapter/peer.go @@ -3,7 +3,7 @@ package adapter import ( - "github.com/golang/protobuf/proto" + "google.golang.org/protobuf/proto" . "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/wireguardplugin/wgidx" "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/wireguard" diff --git a/plugins/vpp/wireguardplugin/descriptor/peer.go b/plugins/vpp/wireguardplugin/descriptor/peer.go index b85c652a48..4866c6fbcd 100644 --- a/plugins/vpp/wireguardplugin/descriptor/peer.go +++ b/plugins/vpp/wireguardplugin/descriptor/peer.go @@ -16,15 +16,17 @@ package descriptor import ( "fmt" - "github.com/golang/protobuf/proto" + "net" + "github.com/pkg/errors" "go.ligato.io/cn-infra/v2/logging" + "google.golang.org/protobuf/proto" + "go.ligato.io/vpp-agent/v3/pkg/models" kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2009/ip_types" vpp_ifdescriptor "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/descriptor" "go.ligato.io/vpp-agent/v3/plugins/vpp/wireguardplugin/wgidx" - "net" "go.ligato.io/vpp-agent/v3/plugins/vpp/wireguardplugin/descriptor/adapter" "go.ligato.io/vpp-agent/v3/plugins/vpp/wireguardplugin/vppcalls" @@ -67,21 +69,19 @@ var ( // ErrWgPeerAllowedIPs is returned when one of allowedIp address was not set to valid IP address. ErrWgPeerAllowedIPs = errors.New("Invalid wireguard peer allowedIps") - - ) // WgPeerDescriptor teaches KVScheduler how to configure VPP wg peer. type WgPeerDescriptor struct { - log logging.Logger + log logging.Logger wgHandler vppcalls.WgVppAPI } // NewWgPeerDescriptor creates a new instance of the wireguard interface descriptor. func NewWgPeerDescriptor(wgHandler vppcalls.WgVppAPI, log logging.PluginLogger) *WgPeerDescriptor { return &WgPeerDescriptor{ - wgHandler: wgHandler, - log: log.NewLogger("wg-peer-descriptor"), + wgHandler: wgHandler, + log: log.NewLogger("wg-peer-descriptor"), } } @@ -89,18 +89,18 @@ func NewWgPeerDescriptor(wgHandler vppcalls.WgVppAPI, log logging.PluginLogger) // the KVScheduler. func (d *WgPeerDescriptor) GetDescriptor() *adapter.PeerDescriptor { return &adapter.PeerDescriptor{ - Name: PeerDescriptorName, - NBKeyPrefix: wg.ModelPeer.KeyPrefix(), - ValueTypeName: wg.ModelPeer.ProtoName(), - KeySelector: wg.ModelPeer.IsKeyValid, - KeyLabel: wg.ModelPeer.StripKeyPrefix, - ValueComparator: d.EquivalentWgPeers, - Validate: d.Validate, - Create: d.Create, - Delete: d.Delete, - Retrieve: d.Retrieve, + Name: PeerDescriptorName, + NBKeyPrefix: wg.ModelPeer.KeyPrefix(), + ValueTypeName: wg.ModelPeer.ProtoName(), + KeySelector: wg.ModelPeer.IsKeyValid, + KeyLabel: wg.ModelPeer.StripKeyPrefix, + ValueComparator: d.EquivalentWgPeers, + Validate: d.Validate, + Create: d.Create, + Delete: d.Delete, + Retrieve: d.Retrieve, RetrieveDependencies: []string{vpp_ifdescriptor.InterfaceDescriptorName}, - WithMetadata: true, + WithMetadata: true, } } @@ -130,7 +130,7 @@ func (d *WgPeerDescriptor) Validate(key string, peer *wg.Peer) (err error) { } for _, allowedIp := range peer.AllowedIps { - _,err := ip_types.ParsePrefix(allowedIp) + _, err := ip_types.ParsePrefix(allowedIp) if err != nil { return kvs.NewInvalidValueError(ErrWgPeerAllowedIPs, "allowed_ips") } @@ -174,11 +174,11 @@ func (d *WgPeerDescriptor) Retrieve(correlate []adapter.PeerKVWithMetadata) (dum } for _, peer := range peers { dump = append(dump, adapter.PeerKVWithMetadata{ - Key: models.Key(peer), - Value: peer, - Origin: kvs.FromNB, + Key: models.Key(peer), + Value: peer, + Origin: kvs.FromNB, }) } return dump, nil -} \ No newline at end of file +} diff --git a/proto/ligato/annotations.pb.go b/proto/ligato/annotations.pb.go index 01a4d9c141..c9d418963a 100644 --- a/proto/ligato/annotations.pb.go +++ b/proto/ligato/annotations.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/annotations.proto package ligato import ( - proto "github.com/golang/protobuf/proto" - descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" ) @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type LigatoOptions_Type int32 const ( @@ -208,7 +203,7 @@ func (x *LigatoOptions_IntRange) GetMaximum() uint64 { var file_ligato_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ { - ExtendedType: (*descriptor.FieldOptions)(nil), + ExtendedType: (*descriptorpb.FieldOptions)(nil), ExtensionType: (*LigatoOptions)(nil), Field: 2000, Name: "ligato.ligato_options", @@ -217,7 +212,7 @@ var file_ligato_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ }, } -// Extension fields to descriptor.FieldOptions. +// Extension fields to descriptorpb.FieldOptions. var ( // NOTE: used option field index(2000) is in extension index range of descriptor.proto, but is not registered // in protobuf global extension registry (https://github.com/protocolbuffers/protobuf/blob/master/docs/options.md) @@ -283,10 +278,10 @@ func file_ligato_annotations_proto_rawDescGZIP() []byte { var file_ligato_annotations_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_ligato_annotations_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_ligato_annotations_proto_goTypes = []interface{}{ - (LigatoOptions_Type)(0), // 0: ligato.LigatoOptions.Type - (*LigatoOptions)(nil), // 1: ligato.LigatoOptions - (*LigatoOptions_IntRange)(nil), // 2: ligato.LigatoOptions.IntRange - (*descriptor.FieldOptions)(nil), // 3: google.protobuf.FieldOptions + (LigatoOptions_Type)(0), // 0: ligato.LigatoOptions.Type + (*LigatoOptions)(nil), // 1: ligato.LigatoOptions + (*LigatoOptions_IntRange)(nil), // 2: ligato.LigatoOptions.IntRange + (*descriptorpb.FieldOptions)(nil), // 3: google.protobuf.FieldOptions } var file_ligato_annotations_proto_depIdxs = []int32{ 0, // 0: ligato.LigatoOptions.type:type_name -> ligato.LigatoOptions.Type diff --git a/proto/ligato/configurator/configurator.pb.go b/proto/ligato/configurator/configurator.pb.go index a3bc543552..76518c8cd7 100644 --- a/proto/ligato/configurator/configurator.pb.go +++ b/proto/ligato/configurator/configurator.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/configurator/configurator.proto package configurator import ( - proto "github.com/golang/protobuf/proto" linux "go.ligato.io/vpp-agent/v3/proto/ligato/linux" netalloc "go.ligato.io/vpp-agent/v3/proto/ligato/netalloc" vpp "go.ligato.io/vpp-agent/v3/proto/ligato/vpp" @@ -24,10 +23,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Config describes all supported configs into a single config message. type Config struct { state protoimpl.MessageState diff --git a/proto/ligato/configurator/statspoller.pb.go b/proto/ligato/configurator/statspoller.pb.go index 79dd05e4b6..fd13e3b98e 100644 --- a/proto/ligato/configurator/statspoller.pb.go +++ b/proto/ligato/configurator/statspoller.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/configurator/statspoller.proto package configurator import ( - proto "github.com/golang/protobuf/proto" vpp "go.ligato.io/vpp-agent/v3/proto/ligato/vpp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Stats defines stats data returned by StatsPollerService. type Stats struct { state protoimpl.MessageState diff --git a/proto/ligato/generic/manager.pb.go b/proto/ligato/generic/manager.pb.go index ff4356a2e2..87dc7845cc 100644 --- a/proto/ligato/generic/manager.pb.go +++ b/proto/ligato/generic/manager.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/generic/manager.proto package generic import ( - proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" ) @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type UpdateResult_Operation int32 const ( @@ -184,7 +179,7 @@ func (m *Data) GetUnion() isData_Union { return nil } -func (x *Data) GetAny() *any.Any { +func (x *Data) GetAny() *anypb.Any { if x, ok := x.GetUnion().(*Data_Any); ok { return x.Any } @@ -196,7 +191,7 @@ type isData_Union interface { } type Data_Any struct { - Any *any.Any `protobuf:"bytes,1,opt,name=any,proto3,oneof"` + Any *anypb.Any `protobuf:"bytes,1,opt,name=any,proto3,oneof"` } func (*Data_Any) isData_Union() {} @@ -1240,7 +1235,7 @@ var file_ligato_generic_manager_proto_goTypes = []interface{}{ nil, // 19: ligato.generic.UpdateItem.LabelsEntry nil, // 20: ligato.generic.ConfigItem.LabelsEntry nil, // 21: ligato.generic.StateItem.MetadataEntry - (*any.Any)(nil), // 22: google.protobuf.Any + (*anypb.Any)(nil), // 22: google.protobuf.Any } var file_ligato_generic_manager_proto_depIdxs = []int32{ 18, // 0: ligato.generic.Item.id:type_name -> ligato.generic.Item.ID diff --git a/proto/ligato/generic/meta.pb.go b/proto/ligato/generic/meta.pb.go index 450bfe17f2..665d554fb8 100644 --- a/proto/ligato/generic/meta.pb.go +++ b/proto/ligato/generic/meta.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/generic/meta.proto package generic import ( - proto "github.com/golang/protobuf/proto" - descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" sync "sync" ) @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type KnownModelsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -187,11 +182,11 @@ type ProtoFileDescriptorResponse struct { unknownFields protoimpl.UnknownFields // file_descriptor is proto message representing proto file descriptor - FileDescriptor *descriptor.FileDescriptorProto `protobuf:"bytes,1,opt,name=file_descriptor,json=fileDescriptor,proto3" json:"file_descriptor,omitempty"` + FileDescriptor *descriptorpb.FileDescriptorProto `protobuf:"bytes,1,opt,name=file_descriptor,json=fileDescriptor,proto3" json:"file_descriptor,omitempty"` // file_import_descriptors is set of file descriptors that the file_descriptor is using as import. This // is needed when converting file descriptor proto to protoreflect.FileDescriptor (using // "google.golang.org/protobuf/reflect/protodesc".NewFile(...) ) - FileImportDescriptors *descriptor.FileDescriptorSet `protobuf:"bytes,2,opt,name=file_import_descriptors,json=fileImportDescriptors,proto3" json:"file_import_descriptors,omitempty"` + FileImportDescriptors *descriptorpb.FileDescriptorSet `protobuf:"bytes,2,opt,name=file_import_descriptors,json=fileImportDescriptors,proto3" json:"file_import_descriptors,omitempty"` } func (x *ProtoFileDescriptorResponse) Reset() { @@ -226,14 +221,14 @@ func (*ProtoFileDescriptorResponse) Descriptor() ([]byte, []int) { return file_ligato_generic_meta_proto_rawDescGZIP(), []int{3} } -func (x *ProtoFileDescriptorResponse) GetFileDescriptor() *descriptor.FileDescriptorProto { +func (x *ProtoFileDescriptorResponse) GetFileDescriptor() *descriptorpb.FileDescriptorProto { if x != nil { return x.FileDescriptor } return nil } -func (x *ProtoFileDescriptorResponse) GetFileImportDescriptors() *descriptor.FileDescriptorSet { +func (x *ProtoFileDescriptorResponse) GetFileImportDescriptors() *descriptorpb.FileDescriptorSet { if x != nil { return x.FileImportDescriptors } @@ -311,13 +306,13 @@ func file_ligato_generic_meta_proto_rawDescGZIP() []byte { var file_ligato_generic_meta_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_ligato_generic_meta_proto_goTypes = []interface{}{ - (*KnownModelsRequest)(nil), // 0: ligato.generic.KnownModelsRequest - (*ProtoFileDescriptorRequest)(nil), // 1: ligato.generic.ProtoFileDescriptorRequest - (*KnownModelsResponse)(nil), // 2: ligato.generic.KnownModelsResponse - (*ProtoFileDescriptorResponse)(nil), // 3: ligato.generic.ProtoFileDescriptorResponse - (*ModelDetail)(nil), // 4: ligato.generic.ModelDetail - (*descriptor.FileDescriptorProto)(nil), // 5: google.protobuf.FileDescriptorProto - (*descriptor.FileDescriptorSet)(nil), // 6: google.protobuf.FileDescriptorSet + (*KnownModelsRequest)(nil), // 0: ligato.generic.KnownModelsRequest + (*ProtoFileDescriptorRequest)(nil), // 1: ligato.generic.ProtoFileDescriptorRequest + (*KnownModelsResponse)(nil), // 2: ligato.generic.KnownModelsResponse + (*ProtoFileDescriptorResponse)(nil), // 3: ligato.generic.ProtoFileDescriptorResponse + (*ModelDetail)(nil), // 4: ligato.generic.ModelDetail + (*descriptorpb.FileDescriptorProto)(nil), // 5: google.protobuf.FileDescriptorProto + (*descriptorpb.FileDescriptorSet)(nil), // 6: google.protobuf.FileDescriptorSet } var file_ligato_generic_meta_proto_depIdxs = []int32{ 4, // 0: ligato.generic.KnownModelsResponse.known_models:type_name -> ligato.generic.ModelDetail diff --git a/proto/ligato/generic/model.pb.go b/proto/ligato/generic/model.pb.go index 9f49e59e77..c97d91b689 100644 --- a/proto/ligato/generic/model.pb.go +++ b/proto/ligato/generic/model.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/generic/model.proto package generic import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // ModelSpec defines a model specification to identify a model. type ModelSpec struct { state protoimpl.MessageState diff --git a/proto/ligato/generic/options.pb.go b/proto/ligato/generic/options.pb.go index 66c38be6aa..e7010c9cff 100644 --- a/proto/ligato/generic/options.pb.go +++ b/proto/ligato/generic/options.pb.go @@ -1,16 +1,15 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/generic/options.proto package generic import ( - proto "github.com/golang/protobuf/proto" - descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" reflect "reflect" ) @@ -21,13 +20,9 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - var file_ligato_generic_options_proto_extTypes = []protoimpl.ExtensionInfo{ { - ExtendedType: (*descriptor.MessageOptions)(nil), + ExtendedType: (*descriptorpb.MessageOptions)(nil), ExtensionType: (*ModelSpec)(nil), Field: 50222, Name: "ligato.generic.model", @@ -36,7 +31,7 @@ var file_ligato_generic_options_proto_extTypes = []protoimpl.ExtensionInfo{ }, } -// Extension fields to descriptor.MessageOptions. +// Extension fields to descriptorpb.MessageOptions. var ( // optional ligato.generic.ModelSpec model = 50222; E_Model = &file_ligato_generic_options_proto_extTypes[0] @@ -64,8 +59,8 @@ var file_ligato_generic_options_proto_rawDesc = []byte{ } var file_ligato_generic_options_proto_goTypes = []interface{}{ - (*descriptor.MessageOptions)(nil), // 0: google.protobuf.MessageOptions - (*ModelSpec)(nil), // 1: ligato.generic.ModelSpec + (*descriptorpb.MessageOptions)(nil), // 0: google.protobuf.MessageOptions + (*ModelSpec)(nil), // 1: ligato.generic.ModelSpec } var file_ligato_generic_options_proto_depIdxs = []int32{ 0, // 0: ligato.generic.model:extendee -> google.protobuf.MessageOptions diff --git a/proto/ligato/govppmux/metrics.pb.go b/proto/ligato/govppmux/metrics.pb.go index acbfbff49d..dbc458c894 100644 --- a/proto/ligato/govppmux/metrics.pb.go +++ b/proto/ligato/govppmux/metrics.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/govppmux/metrics.proto package govppmux import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Metrics struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ligato/kvscheduler/value_status.go b/proto/ligato/kvscheduler/value_status.go index 9d818d3e54..2f6f9367e5 100644 --- a/proto/ligato/kvscheduler/value_status.go +++ b/proto/ligato/kvscheduler/value_status.go @@ -15,12 +15,10 @@ package kvscheduler import ( - "bytes" "encoding/json" - - "github.com/golang/protobuf/jsonpb" ) +/* // MarshalJSON ensures data is correctly marshaled func (m ValueStatus) MarshalJSON() ([]byte, error) { marshaller := &jsonpb.Marshaler{} @@ -35,7 +33,7 @@ func (m ValueStatus) MarshalJSON() ([]byte, error) { func (m *ValueStatus) UnmarshalJSON(data []byte) error { return jsonpb.Unmarshal(bytes.NewReader(data), m) } - +*/ // MarshalJSON ensures data is correctly marshaled func (x ValueState) MarshalJSON() ([]byte, error) { return json.Marshal(x.String()) diff --git a/proto/ligato/kvscheduler/value_status.pb.go b/proto/ligato/kvscheduler/value_status.pb.go index ccda2b5b44..22e641752c 100644 --- a/proto/ligato/kvscheduler/value_status.pb.go +++ b/proto/ligato/kvscheduler/value_status.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/kvscheduler/value_status.proto package kvscheduler import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ValueState int32 const ( diff --git a/proto/ligato/linux/interfaces/interface.pb.go b/proto/ligato/linux/interfaces/interface.pb.go index 81c6128125..5d968d83d7 100644 --- a/proto/ligato/linux/interfaces/interface.pb.go +++ b/proto/ligato/linux/interfaces/interface.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/linux/interfaces/interface.proto package linux_interfaces import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" namespace "go.ligato.io/vpp-agent/v3/proto/ligato/linux/namespace" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Interface_Type int32 const ( diff --git a/proto/ligato/linux/interfaces/models.go b/proto/ligato/linux/interfaces/models.go index 7bb50eb09a..cd638b1ce7 100644 --- a/proto/ligato/linux/interfaces/models.go +++ b/proto/ligato/linux/interfaces/models.go @@ -17,8 +17,6 @@ package linux_interfaces import ( "strings" - "github.com/golang/protobuf/jsonpb" - "go.ligato.io/vpp-agent/v3/pkg/models" "go.ligato.io/vpp-agent/v3/proto/ligato/netalloc" ) @@ -49,7 +47,7 @@ const ( InterfaceHostNameKeyPrefix = "linux/interface/host-name/" interfaceHostNameWithAddrKeyTmpl = InterfaceHostNameKeyPrefix + "{host-name}/address/{address}" - interfaceHostNameWithVrfKeyTmpl = InterfaceHostNameKeyPrefix + "{host-name}/vrf-host-name/{vrf-host-name}" + interfaceHostNameWithVrfKeyTmpl = InterfaceHostNameKeyPrefix + "{host-name}/vrf-host-name/{vrf-host-name}" /* Interface State (derived) */ @@ -301,6 +299,7 @@ func ParseInterfaceVrfKey(key string) (iface string, vrf string, invalidKey, isV return } +/* // MarshalJSON ensures that field of type 'oneOf' is correctly marshaled // by using protobuf json marshaller func (m *Interface) MarshalJSON() ([]byte, error) { @@ -315,4 +314,5 @@ func (m *Interface) MarshalJSON() ([]byte, error) { // UnmarshalJSON ensures that field of type 'oneOf' is correctly unmarshaled func (m *Interface) UnmarshalJSON(data []byte) error { return jsonpb.UnmarshalString(string(data), m) -} \ No newline at end of file +} +*/ diff --git a/proto/ligato/linux/interfaces/state.pb.go b/proto/ligato/linux/interfaces/state.pb.go index a2e3b3e702..d4cf1f49c9 100644 --- a/proto/ligato/linux/interfaces/state.pb.go +++ b/proto/ligato/linux/interfaces/state.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/linux/interfaces/state.proto package linux_interfaces import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type InterfaceState_Status int32 const ( diff --git a/proto/ligato/linux/iptables/iptables.pb.go b/proto/ligato/linux/iptables/iptables.pb.go index 702ab17bb1..58a5479a94 100644 --- a/proto/ligato/linux/iptables/iptables.pb.go +++ b/proto/ligato/linux/iptables/iptables.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/linux/iptables/iptables.proto package linux_iptables import ( - proto "github.com/golang/protobuf/proto" namespace "go.ligato.io/vpp-agent/v3/proto/ligato/linux/namespace" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type RuleChain_Protocol int32 const ( diff --git a/proto/ligato/linux/l3/arp.pb.go b/proto/ligato/linux/l3/arp.pb.go index 8b491b7296..4c3eb796f3 100644 --- a/proto/ligato/linux/l3/arp.pb.go +++ b/proto/ligato/linux/l3/arp.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/linux/l3/arp.proto package linux_l3 import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ARPEntry struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ligato/linux/l3/route.pb.go b/proto/ligato/linux/l3/route.pb.go index b412627523..500d7b8149 100644 --- a/proto/ligato/linux/l3/route.pb.go +++ b/proto/ligato/linux/l3/route.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/linux/l3/route.proto package linux_l3 import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Route_Scope int32 const ( diff --git a/proto/ligato/linux/linux.pb.go b/proto/ligato/linux/linux.pb.go index d1f2082231..ca3feec499 100644 --- a/proto/ligato/linux/linux.pb.go +++ b/proto/ligato/linux/linux.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/linux/linux.proto package linux import ( - proto "github.com/golang/protobuf/proto" interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/linux/interfaces" l3 "go.ligato.io/vpp-agent/v3/proto/ligato/linux/l3" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ConfigData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ligato/linux/namespace/namespace.pb.go b/proto/ligato/linux/namespace/namespace.pb.go index bef7892fbe..2c2a843ff5 100644 --- a/proto/ligato/linux/namespace/namespace.pb.go +++ b/proto/ligato/linux/namespace/namespace.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/linux/namespace/namespace.proto package linux_namespace import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type NetNamespace_ReferenceType int32 const ( diff --git a/proto/ligato/linux/punt/punt.pb.go b/proto/ligato/linux/punt/punt.pb.go index 8724f110ed..ab08ed2b9e 100644 --- a/proto/ligato/linux/punt/punt.pb.go +++ b/proto/ligato/linux/punt/punt.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/linux/punt/punt.proto package linux_punt import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type PortBased_L4Protocol int32 const ( diff --git a/proto/ligato/netalloc/netalloc.pb.go b/proto/ligato/netalloc/netalloc.pb.go index 3b2f4e80a6..cd46377579 100644 --- a/proto/ligato/netalloc/netalloc.pb.go +++ b/proto/ligato/netalloc/netalloc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/netalloc/netalloc.proto // Netalloc allows to disassociate topology from addressing in the network @@ -26,7 +26,6 @@ package netalloc import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -41,10 +40,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // IPAddressForm can be used in descriptors whose models reference allocated IP // addresses, to ask for a specific form in which the address should applied. type IPAddressForm int32 diff --git a/proto/ligato/vpp/abf/abf.pb.go b/proto/ligato/vpp/abf/abf.pb.go index 394758aa4f..85b43b2219 100644 --- a/proto/ligato/vpp/abf/abf.pb.go +++ b/proto/ligato/vpp/abf/abf.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/abf/abf.proto package vpp_abf import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // ABF defines ACL based forwarding. type ABF struct { state protoimpl.MessageState diff --git a/proto/ligato/vpp/acl/acl.pb.go b/proto/ligato/vpp/acl/acl.pb.go index dd9ecf7f1f..d1a7dca3e8 100644 --- a/proto/ligato/vpp/acl/acl.pb.go +++ b/proto/ligato/vpp/acl/acl.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/acl/acl.proto package vpp_acl import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ACL_Rule_Action int32 const ( diff --git a/proto/ligato/vpp/dns/dns.pb.go b/proto/ligato/vpp/dns/dns.pb.go index 16cc4c4544..08cd8656bc 100644 --- a/proto/ligato/vpp/dns/dns.pb.go +++ b/proto/ligato/vpp/dns/dns.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/dns/dns.proto package vpp_dns import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // DNSCache configuration models VPP's DNS cache server functionality. The main goal of this functionality is //to cache DNS records and minimize external DNS traffic. //The presence of this configuration enables the VPP DNS functionality and VPP start to acts as DNS cache Server. diff --git a/proto/ligato/vpp/interfaces/dhcp.pb.go b/proto/ligato/vpp/interfaces/dhcp.pb.go index 2e0eb093d3..b5659094b9 100644 --- a/proto/ligato/vpp/interfaces/dhcp.pb.go +++ b/proto/ligato/vpp/interfaces/dhcp.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/interfaces/dhcp.proto package vpp_interfaces import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // DHCPLease is a notification, i.e. flows from SB upwards type DHCPLease struct { state protoimpl.MessageState diff --git a/proto/ligato/vpp/interfaces/interface.pb.go b/proto/ligato/vpp/interfaces/interface.pb.go index e276ab153b..c66ede464e 100644 --- a/proto/ligato/vpp/interfaces/interface.pb.go +++ b/proto/ligato/vpp/interfaces/interface.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/interfaces/interface.proto package vpp_interfaces import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" ipsec "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipsec" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -23,10 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Type defines VPP interface types. type Interface_Type int32 @@ -1555,6 +1550,10 @@ func (x *TapLink) GetEnableTunnel() bool { } // IPSecLink defines configuration for interface type: IPSEC_TUNNEL +// In VPP 21.06 and newer, IPSecLink serves just for creation of the link and thus only tunnel_mode is taken into +// account and all of the remaining (deprecated) fields are ignored. +// Please use separate SecurityPolicy, SecurityAssociation and TunnelProtection messages from ligato.vpp.ipsec +// package to associate SA, SP and tunnel protection with the link. type IPSecLink struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1562,8 +1561,6 @@ type IPSecLink struct { // Mode of the IPIP tunnel TunnelMode IPSecLink_Mode `protobuf:"varint,1,opt,name=tunnel_mode,json=tunnelMode,proto3,enum=ligato.vpp.interfaces.IPSecLink_Mode" json:"tunnel_mode,omitempty"` - // In VPP 21.06 and newer, IPSecLink serves just for creation of the link and thus all of the following - // information is ignored. Please use separate messages for addition of SA and SPD instead. // Extended sequence number // // Deprecated: Do not use. @@ -1700,7 +1697,7 @@ func (x *IPSecLink) GetCryptoAlg() ipsec.CryptoAlg { if x != nil { return x.CryptoAlg } - return ipsec.CryptoAlg_NONE_CRYPTO + return ipsec.CryptoAlg(0) } // Deprecated: Do not use. @@ -1724,7 +1721,7 @@ func (x *IPSecLink) GetIntegAlg() ipsec.IntegAlg { if x != nil { return x.IntegAlg } - return ipsec.IntegAlg_NONE_INTEG + return ipsec.IntegAlg(0) } // Deprecated: Do not use. diff --git a/proto/ligato/vpp/interfaces/models.go b/proto/ligato/vpp/interfaces/models.go index d4aa67f1c1..d19337c540 100644 --- a/proto/ligato/vpp/interfaces/models.go +++ b/proto/ligato/vpp/interfaces/models.go @@ -18,8 +18,6 @@ import ( "strconv" "strings" - "github.com/golang/protobuf/jsonpb" - "go.ligato.io/vpp-agent/v3/pkg/models" "go.ligato.io/vpp-agent/v3/proto/ligato/netalloc" ) @@ -658,6 +656,7 @@ func ParseRxModesKey(key string) (ifaceName string, isRxModesKey bool) { return } +/* // MarshalJSON ensures that field of type 'oneOf' is correctly marshaled // by using protobuf json marshaller func (m *Interface) MarshalJSON() ([]byte, error) { @@ -673,3 +672,4 @@ func (m *Interface) MarshalJSON() ([]byte, error) { func (m *Interface) UnmarshalJSON(data []byte) error { return jsonpb.UnmarshalString(string(data), m) } +*/ diff --git a/proto/ligato/vpp/interfaces/span.pb.go b/proto/ligato/vpp/interfaces/span.pb.go index 068eb4ef72..be1fdf0b10 100644 --- a/proto/ligato/vpp/interfaces/span.pb.go +++ b/proto/ligato/vpp/interfaces/span.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/interfaces/span.proto package vpp_interfaces import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Span_Direction int32 const ( diff --git a/proto/ligato/vpp/interfaces/state.pb.go b/proto/ligato/vpp/interfaces/state.pb.go index e7ceffcca8..2f403b8cca 100644 --- a/proto/ligato/vpp/interfaces/state.pb.go +++ b/proto/ligato/vpp/interfaces/state.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/interfaces/state.proto package vpp_interfaces import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type InterfaceState_Status int32 const ( diff --git a/proto/ligato/vpp/ipfix/flowprobe.pb.go b/proto/ligato/vpp/ipfix/flowprobe.pb.go index 0478f930e6..114f04df14 100644 --- a/proto/ligato/vpp/ipfix/flowprobe.pb.go +++ b/proto/ligato/vpp/ipfix/flowprobe.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/ipfix/flowprobe.proto package vpp_ipfix import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FlowProbeFeature struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ligato/vpp/ipfix/ipfix.pb.go b/proto/ligato/vpp/ipfix/ipfix.pb.go index ecd1be0e00..29838f1160 100644 --- a/proto/ligato/vpp/ipfix/ipfix.pb.go +++ b/proto/ligato/vpp/ipfix/ipfix.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/ipfix/ipfix.proto package vpp_ipfix import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // IPFIX defines the IP Flow Information eXport (IPFIX) configuration. type IPFIX struct { state protoimpl.MessageState diff --git a/proto/ligato/vpp/ipsec/ipsec.pb.go b/proto/ligato/vpp/ipsec/ipsec.pb.go index 7d8c4cf5e9..59f749f5cd 100644 --- a/proto/ligato/vpp/ipsec/ipsec.pb.go +++ b/proto/ligato/vpp/ipsec/ipsec.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/ipsec/ipsec.proto package vpp_ipsec import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Cryptographic algorithm for encryption type CryptoAlg int32 diff --git a/proto/ligato/vpp/l2/bridge_domain.pb.go b/proto/ligato/vpp/l2/bridge_domain.pb.go index 0028e31ba4..c1c501733c 100644 --- a/proto/ligato/vpp/l2/bridge_domain.pb.go +++ b/proto/ligato/vpp/l2/bridge_domain.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/l2/bridge_domain.proto package vpp_l2 import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type BridgeDomain struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ligato/vpp/l2/fib.pb.go b/proto/ligato/vpp/l2/fib.pb.go index 836ad2f47e..4e881e2f1c 100644 --- a/proto/ligato/vpp/l2/fib.pb.go +++ b/proto/ligato/vpp/l2/fib.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/l2/fib.proto package vpp_l2 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type FIBEntry_Action int32 const ( diff --git a/proto/ligato/vpp/l2/xconnect.pb.go b/proto/ligato/vpp/l2/xconnect.pb.go index 61f4dbea29..c6e05f98de 100644 --- a/proto/ligato/vpp/l2/xconnect.pb.go +++ b/proto/ligato/vpp/l2/xconnect.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/l2/xconnect.proto package vpp_l2 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type XConnectPair struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ligato/vpp/l3/arp.pb.go b/proto/ligato/vpp/l3/arp.pb.go index 0b1cda4159..9ce8d9397c 100644 --- a/proto/ligato/vpp/l3/arp.pb.go +++ b/proto/ligato/vpp/l3/arp.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/l3/arp.proto package vpp_l3 import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type ARPEntry struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ligato/vpp/l3/l3.pb.go b/proto/ligato/vpp/l3/l3.pb.go index ac0719b4ae..d767422164 100644 --- a/proto/ligato/vpp/l3/l3.pb.go +++ b/proto/ligato/vpp/l3/l3.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/l3/l3.proto package vpp_l3 import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type IPScanNeighbor_Mode int32 const ( diff --git a/proto/ligato/vpp/l3/l3xc.pb.go b/proto/ligato/vpp/l3/l3xc.pb.go index bdf66a58d2..9fba62f72e 100644 --- a/proto/ligato/vpp/l3/l3xc.pb.go +++ b/proto/ligato/vpp/l3/l3xc.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/l3/l3xc.proto package vpp_l3 import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type L3XConnect_Protocol int32 const ( diff --git a/proto/ligato/vpp/l3/route.pb.go b/proto/ligato/vpp/l3/route.pb.go index af66a30997..888ff70b8d 100644 --- a/proto/ligato/vpp/l3/route.pb.go +++ b/proto/ligato/vpp/l3/route.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/l3/route.proto package vpp_l3 import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Route_RouteType int32 const ( diff --git a/proto/ligato/vpp/l3/teib.pb.go b/proto/ligato/vpp/l3/teib.pb.go index 8c4479fa7e..8dc9aee24e 100644 --- a/proto/ligato/vpp/l3/teib.pb.go +++ b/proto/ligato/vpp/l3/teib.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/l3/teib.proto package vpp_l3 import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // TeibEntry represents an tunnel endpoint information base entry. type TeibEntry struct { state protoimpl.MessageState diff --git a/proto/ligato/vpp/l3/vrf.pb.go b/proto/ligato/vpp/l3/vrf.pb.go index 132836f5d5..d3e2b4dffa 100644 --- a/proto/ligato/vpp/l3/vrf.pb.go +++ b/proto/ligato/vpp/l3/vrf.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/l3/vrf.proto package vpp_l3 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,10 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Protocol define IP protocol of VRF table. type VrfTable_Protocol int32 diff --git a/proto/ligato/vpp/l3/vrrp.pb.go b/proto/ligato/vpp/l3/vrrp.pb.go index 6a52ce677b..1b0245c5d5 100644 --- a/proto/ligato/vpp/l3/vrrp.pb.go +++ b/proto/ligato/vpp/l3/vrrp.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/l3/vrrp.proto package vpp_l3 import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // VRRPEntry represents Virtual Router desired state. type VRRPEntry struct { state protoimpl.MessageState diff --git a/proto/ligato/vpp/nat/nat.pb.go b/proto/ligato/vpp/nat/nat.pb.go index cf0322e66b..471422a17b 100644 --- a/proto/ligato/vpp/nat/nat.pb.go +++ b/proto/ligato/vpp/nat/nat.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/nat/nat.proto package vpp_nat import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Available protocols. type DNat44_Protocol int32 diff --git a/proto/ligato/vpp/punt/punt.pb.go b/proto/ligato/vpp/punt/punt.pb.go index 980dce77dc..be5b4af2c5 100644 --- a/proto/ligato/vpp/punt/punt.pb.go +++ b/proto/ligato/vpp/punt/punt.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/punt/punt.proto package vpp_punt import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // L3Protocol defines Layer 3 protocols. type L3Protocol int32 diff --git a/proto/ligato/vpp/srv6/srv6.pb.go b/proto/ligato/vpp/srv6/srv6.pb.go index fea06de5a2..4c08aaaa90 100644 --- a/proto/ligato/vpp/srv6/srv6.pb.go +++ b/proto/ligato/vpp/srv6/srv6.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/srv6/srv6.proto package vpp_srv6 import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type LocalSID struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ligato/vpp/stn/stn.pb.go b/proto/ligato/vpp/stn/stn.pb.go index 5258f2cedb..7acd6d8212 100644 --- a/proto/ligato/vpp/stn/stn.pb.go +++ b/proto/ligato/vpp/stn/stn.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/stn/stn.proto package vpp_stn import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Rule struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ligato/vpp/vpp.pb.go b/proto/ligato/vpp/vpp.pb.go index 7cd84bcdf9..bae810d413 100644 --- a/proto/ligato/vpp/vpp.pb.go +++ b/proto/ligato/vpp/vpp.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/vpp.proto package vpp import ( - proto "github.com/golang/protobuf/proto" abf "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/abf" acl "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/acl" dns "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/dns" @@ -33,10 +32,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // ConfigData holds the entire VPP configuration. type ConfigData struct { state protoimpl.MessageState diff --git a/proto/ligato/vpp/wireguard/wireguard.pb.go b/proto/ligato/vpp/wireguard/wireguard.pb.go index 0339d0647d..167d05980c 100644 --- a/proto/ligato/vpp/wireguard/wireguard.pb.go +++ b/proto/ligato/vpp/wireguard/wireguard.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.4 +// protoc-gen-go v1.27.1 +// protoc v3.17.3 // source: ligato/vpp/wireguard/wireguard.proto package vpp_wg import ( - proto "github.com/golang/protobuf/proto" _ "go.ligato.io/vpp-agent/v3/proto/ligato" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -22,10 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type Peer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/scripts/make/buf.make b/scripts/make/buf.make index 272be27a30..e5eadac5ae 100644 --- a/scripts/make/buf.make +++ b/scripts/make/buf.make @@ -12,13 +12,13 @@ REMOTE_GIT := https://github.com/ligato/vpp-agent.git CHECK_BREAKING_BRANCH := master # https://github.com/bufbuild/buf/releases 20200724 -BUF_VERSION := 0.20.5 +BUF_VERSION := 0.51.1 # https://github.com/protocolbuffers/protobuf-go 20200624 -PROTOC_GEN_GO_VERSION ?= v1.25.0 +PROTOC_GEN_GO_VERSION ?= v1.27.1 # https://github.com/grpc/grpc-go 20200730 PROTOC_GEN_GO_GRPC_VERSION ?= v1.31.0 # https://github.com/protocolbuffers/protobuf/releases 20200729 -PROTOC_VERSION ?= 3.12.4 +PROTOC_VERSION ?= 3.17.3 GO_BINS := $(GO_BINS) \ buf \ From 682d9c19d027fffec89ace07f55d9c9db6e313b7 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 19 Jan 2022 10:48:32 +0100 Subject: [PATCH 03/12] Instantiate gomega handler for each test context Signed-off-by: Ondrej Fabry --- tests/e2e/000_initial_test.go | 30 +- tests/e2e/010_interfaces_test.go | 256 +++++++++--------- tests/e2e/011_interface_link_only_test.go | 38 +-- tests/e2e/012_linux_interfaces_test.go | 152 +++++------ tests/e2e/020_netalloc_test.go | 162 +++++------ tests/e2e/030_span_test.go | 28 +- tests/e2e/040_bridge_domain_test.go | 186 ++++++------- tests/e2e/050_nat_test.go | 180 ++++++------ tests/e2e/060_acl_test.go | 60 ++-- tests/e2e/070_ipsec_test.go | 120 ++++---- tests/e2e/080_vrf_test.go | 198 +++++++------- tests/e2e/081_route_test.go | 30 +- tests/e2e/100_agentctl_test.go | 141 +++++----- tests/e2e/101_rest_api_test.go | 22 +- tests/e2e/120_dns_test.go | 44 +-- tests/e2e/13_dhcp_proxy_test.go | 34 +-- tests/e2e/200_telemetry_test.go | 38 +-- tests/e2e/containerruntime.go | 24 +- tests/e2e/e2e.go | 35 ++- tests/e2e/options.go | 5 +- tests/integration/run_integration.sh | 4 +- tests/integration/vpp/022_ip_neighbor_test.go | 6 +- tests/integration/vpp/130_ipsec_test.go | 3 +- tests/perf/grpc-perf/main.go | 19 +- 24 files changed, 923 insertions(+), 892 deletions(-) diff --git a/tests/e2e/000_initial_test.go b/tests/e2e/000_initial_test.go index 91b3a4175d..5b898c01ec 100644 --- a/tests/e2e/000_initial_test.go +++ b/tests/e2e/000_initial_test.go @@ -28,7 +28,7 @@ func TestAgentInSync(t *testing.T) { ctx := Setup(t) defer ctx.Teardown() - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } func TestStartStopMicroservice(t *testing.T) { @@ -42,10 +42,10 @@ func TestStartStopMicroservice(t *testing.T) { } ctx.StartMicroservice(ms1) - Eventually(msState).Should(Equal(kvscheduler.ValueState_OBTAINED)) + ctx.Eventually(msState).Should(Equal(kvscheduler.ValueState_OBTAINED)) ctx.StopMicroservice(ms1) - Eventually(msState).Should(Equal(kvscheduler.ValueState_NONEXISTENT)) + ctx.Eventually(msState).Should(Equal(kvscheduler.ValueState_NONEXISTENT)) } func TestStartStopAgent(t *testing.T) { @@ -59,10 +59,10 @@ func TestStartStopAgent(t *testing.T) { } ctx.StartAgent(agent1) - Eventually(msState).Should(Equal(kvscheduler.ValueState_OBTAINED)) + ctx.Eventually(msState).Should(Equal(kvscheduler.ValueState_OBTAINED)) ctx.StopAgent(agent1) - Eventually(msState).Should(Equal(kvscheduler.ValueState_NONEXISTENT)) + ctx.Eventually(msState).Should(Equal(kvscheduler.ValueState_NONEXISTENT)) } // TestInitFromFile tests configuring initial state of NB from file @@ -102,7 +102,7 @@ initial-configuration-file-path: %v initInterfaceConfigState := func() kvscheduler.ValueState { return ctx.GetValueStateByKey("vpp/interface/loop-test-from-init-file/address/static/10.10.1.1/24") } - Eventually(initInterfaceConfigState).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(initInterfaceConfigState).Should(Equal(kvscheduler.ValueState_CONFIGURED), "loopback from init file was not properly created") } @@ -115,7 +115,7 @@ func TestInitFromEtcd(t *testing.T) { defer ctx.Teardown() // will teardown also VPP-Agent created later // put NB config into Etcd - Expect(ctx.Etcd.Put( + ctx.Expect(ctx.Etcd.Put( fmt.Sprintf("/vnf-agent/%v/config/vpp/v2/interfaces/loop-test-from-etcd", AgentInstanceName(ctx)), `{"name":"loop-test-from-etcd","type":"SOFTWARE_LOOPBACK","enabled":true,"ip_addresses":["10.10.1.2/24"], "mtu":1500}`)). To(Succeed(), "can't insert data into ETCD") @@ -127,7 +127,7 @@ endpoints: - "%v:2379" ` etcdIPAddress := ctx.Etcd.IPAddress() - Expect(etcdIPAddress).ShouldNot(BeNil()) + ctx.Expect(etcdIPAddress).ShouldNot(BeNil()) etcdConfig = fmt.Sprintf(etcdConfig, etcdIPAddress) // create VPP-Agent @@ -140,7 +140,7 @@ endpoints: initInterfaceConfigState := func() kvscheduler.ValueState { return ctx.GetValueStateByKey("vpp/interface/loop-test-from-etcd/address/static/10.10.1.2/24") } - Eventually(initInterfaceConfigState).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(initInterfaceConfigState).Should(Equal(kvscheduler.ValueState_CONFIGURED), "loopback from etcd was not properly created") } @@ -153,7 +153,7 @@ func TestInitFromFileAndEtcd(t *testing.T) { defer ctx.Teardown() // will teardown also VPP-Agent created later // put NB config into Etcd - Expect(ctx.Etcd.Put( + ctx.Expect(ctx.Etcd.Put( fmt.Sprintf("/vnf-agent/%v/config/vpp/v2/interfaces/memif-from-etcd", AgentInstanceName(ctx)), `{ "name":"memif-from-etcd", @@ -167,7 +167,7 @@ func TestInitFromFileAndEtcd(t *testing.T) { "socket_filename": "/run/vpp/default.sock" } }`)).To(Succeed(), "can't insert data1 into ETCD") - Expect(ctx.Etcd.Put( + ctx.Expect(ctx.Etcd.Put( fmt.Sprintf("/vnf-agent/%v/config/vpp/v2/interfaces/memif-from-both-sources", AgentInstanceName(ctx)), `{ "name":"memif-from-both-sources", @@ -225,7 +225,7 @@ endpoints: - "%v:2379" ` etcdIPAddress := ctx.Etcd.IPAddress() - Expect(etcdIPAddress).ShouldNot(BeNil()) + ctx.Expect(etcdIPAddress).ShouldNot(BeNil()) etcdConfig = fmt.Sprintf(etcdConfig, etcdIPAddress) // create VPP-Agent @@ -240,13 +240,13 @@ endpoints: return ctx.GetValueStateByKey( fmt.Sprintf("vpp/interface/%v/address/static/%v/32", interfaceName, ipAddress)) } - Eventually(initInterfaceConfigState("memif-from-etcd", "10.10.1.1")). + ctx.Eventually(initInterfaceConfigState("memif-from-etcd", "10.10.1.1")). Should(Equal(kvscheduler.ValueState_CONFIGURED), "unique memif from etcd was not properly created") - Eventually(initInterfaceConfigState("memif-from-init-file", "10.10.1.2")). + ctx.Eventually(initInterfaceConfigState("memif-from-init-file", "10.10.1.2")). Should(Equal(kvscheduler.ValueState_CONFIGURED), "unique memif from init file was not properly created") - Eventually(initInterfaceConfigState("memif-from-both-sources", "10.10.1.3")). + ctx.Eventually(initInterfaceConfigState("memif-from-both-sources", "10.10.1.3")). Should(Equal(kvscheduler.ValueState_CONFIGURED), "conflicting memif (defined in init file and etcd) was either not correctly "+ "merged (etcd data should have priority) or other things prevented its proper creation") diff --git a/tests/e2e/010_interfaces_test.go b/tests/e2e/010_interfaces_test.go index b5cf1c162d..60c3ad5719 100644 --- a/tests/e2e/010_interfaces_test.go +++ b/tests/e2e/010_interfaces_test.go @@ -77,75 +77,75 @@ func TestInterfaceConnTap(t *testing.T) { vppTap, linuxTap, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) // resync TAPs err = ctx.GenericClient().ResyncConfig( vppTap, linuxTap, ) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) // restart microservice twice for i := 0; i < 2; i++ { ctx.StopMicroservice(msName) - Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_PENDING)) - Eventually(ctx.GetValueStateClb(linuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.PingFromVPP(linuxTapIP)).NotTo(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Eventually(ctx.GetValueStateClb(linuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) ctx.StartMicroservice(msName) - Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } // re-create VPP TAP err = ctx.GenericClient().ChangeRequest(). Delete(vppTap).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.PingFromVPP(linuxTapIP)).NotTo(Succeed()) - Expect(ctx.PingFromMs(msName, vppTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppTapIP)).NotTo(Succeed()) err = ctx.GenericClient().ChangeRequest().Update( vppTap, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.PingFromVPPClb(linuxTapIP)).Should(Succeed()) - Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.PingFromVPPClb(linuxTapIP)).Should(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // re-create Linux TAP err = ctx.GenericClient().ChangeRequest().Delete( linuxTap, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.PingFromVPP(linuxTapIP)).NotTo(Succeed()) - Expect(ctx.PingFromMs(msName, vppTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppTapIP)).NotTo(Succeed()) err = ctx.GenericClient().ChangeRequest().Update( linuxTap, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.PingFromVPPClb(linuxTapIP)).Should(Succeed()) - Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.PingFromVPPClb(linuxTapIP)).Should(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } // connect VPP with a microservice via TAP tunnel interface @@ -202,12 +202,12 @@ func TestInterfaceTapTunnel(t *testing.T) { vppTap, linuxTap, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - //Expect(ctx.pingFromVPP(linuxTapIP)).To(Succeed()) - //Expect(ctx.pingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + //ctx.Expect(ctx.pingFromVPP(linuxTapIP)).To(Succeed()) + //ctx.Expect(ctx.pingFromMs(msName, vppTapIP)).To(Succeed()) ctx.ExecVppctl("show", "int") ctx.ExecVppctl("show", "int", "addr") @@ -220,32 +220,32 @@ func TestInterfaceTapTunnel(t *testing.T) { vppTap, linuxTap, ) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) ctx.ExecVppctl("show", "int") ctx.ExecVppctl("show", "int", "addr") ctx.ExecCmd("ip", "link") ctx.ExecCmd("ip", "addr") - Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - //Expect(ctx.pingFromVPP(linuxTapIP)).To(Succeed()) - //Expect(ctx.pingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + //ctx.Expect(ctx.pingFromVPP(linuxTapIP)).To(Succeed()) + //ctx.Expect(ctx.pingFromMs(msName, vppTapIP)).To(Succeed()) // restart microservice twice /*for i := 0; i < 2; i++ { ctx.stopMicroservice(msName) - Eventually(ctx.getValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_PENDING)) - Eventually(ctx.getValueStateClb(linuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.pingFromVPP(linuxTapIP)).NotTo(Succeed()) - Expect(ctx.agentInSync()).To(BeTrue()) + ctx.Eventually(ctx.getValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Eventually(ctx.getValueStateClb(linuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.pingFromVPP(linuxTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.agentInSync()).To(BeTrue()) ctx.startMicroservice(msName) - Eventually(ctx.getValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.getValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.pingFromVPP(linuxTapIP)).To(Succeed()) - Expect(ctx.pingFromMs(msName, vppTapIP)).To(Succeed()) - Expect(ctx.agentInSync()).To(BeTrue()) + ctx.Eventually(ctx.getValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.getValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.pingFromVPP(linuxTapIP)).To(Succeed()) + ctx.Expect(ctx.pingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Expect(ctx.agentInSync()).To(BeTrue()) } // re-create VPP TAP @@ -253,40 +253,40 @@ func TestInterfaceTapTunnel(t *testing.T) { err = req.Delete( vppTap, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.pingFromVPP(linuxTapIP)).NotTo(Succeed()) - Expect(ctx.pingFromMs(msName, vppTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.pingFromVPP(linuxTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.pingFromMs(msName, vppTapIP)).NotTo(Succeed()) req = ctx.GenericClient().ChangeRequest() err = req.Update( vppTap, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.pingFromVPPClb(linuxTapIP)).Should(Succeed()) - Expect(ctx.pingFromMs(msName, vppTapIP)).To(Succeed()) - Expect(ctx.agentInSync()).To(BeTrue()) + ctx.Eventually(ctx.pingFromVPPClb(linuxTapIP)).Should(Succeed()) + ctx.Expect(ctx.pingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Expect(ctx.agentInSync()).To(BeTrue()) // re-create Linux TAP req = ctx.GenericClient().ChangeRequest() err = req.Delete( linuxTap, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.pingFromVPP(linuxTapIP)).NotTo(Succeed()) - Expect(ctx.pingFromMs(msName, vppTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.pingFromVPP(linuxTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.pingFromMs(msName, vppTapIP)).NotTo(Succeed()) req = ctx.GenericClient().ChangeRequest() err = req.Update( linuxTap, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.pingFromVPPClb(linuxTapIP)).Should(Succeed()) - Expect(ctx.pingFromMs(msName, vppTapIP)).To(Succeed()) - Expect(ctx.agentInSync()).To(BeTrue())*/ + ctx.Eventually(ctx.pingFromVPPClb(linuxTapIP)).Should(Succeed()) + ctx.Expect(ctx.pingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Expect(ctx.agentInSync()).To(BeTrue())*/ } // connect VPP with a microservice via AF-PACKET + VETH interfaces @@ -352,30 +352,30 @@ func TestInterfaceConnAfPacket(t *testing.T) { veth1, veth2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(veth1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(veth2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) + ctx.Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(veth1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(veth2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) // restart microservice twice for i := 0; i < 2; i++ { ctx.StopMicroservice(msName) - Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_PENDING)) - Eventually(ctx.GetValueStateClb(veth1)).Should(Equal(kvscheduler.ValueState_PENDING)) - Eventually(ctx.GetValueStateClb(veth2)).Should(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Eventually(ctx.GetValueStateClb(veth1)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Eventually(ctx.GetValueStateClb(veth2)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) ctx.StartMicroservice(msName) - Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(veth1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(veth2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(veth1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(veth2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } // re-create AF-PACKET @@ -383,40 +383,40 @@ func TestInterfaceConnAfPacket(t *testing.T) { err = req.Delete( afPacket, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).NotTo(Succeed()) req = ctx.GenericClient().ChangeRequest() err = req.Update( afPacket, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.PingFromVPPClb(veth2IP)).Should(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.PingFromVPPClb(veth2IP)).Should(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // re-create VETH req = ctx.GenericClient().ChangeRequest() err = req.Delete( veth2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).NotTo(Succeed()) req = ctx.GenericClient().ChangeRequest() err = req.Update( veth2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.PingFromVPPClb(veth2IP)).Should(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.PingFromVPPClb(veth2IP)).Should(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } // Connect VPP with a microservice via AF-PACKET + VETH interfaces. @@ -483,30 +483,30 @@ func TestInterfaceAfPacketWithLogicalReference(t *testing.T) { veth1, veth2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(veth1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(veth2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) + ctx.Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(veth1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(veth2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) // restart microservice twice for i := 0; i < 2; i++ { ctx.StopMicroservice(msName) - Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_PENDING)) - Eventually(ctx.GetValueStateClb(veth1)).Should(Equal(kvscheduler.ValueState_PENDING)) - Eventually(ctx.GetValueStateClb(veth2)).Should(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Eventually(ctx.GetValueStateClb(veth1)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Eventually(ctx.GetValueStateClb(veth2)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) ctx.StartMicroservice(msName) - Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(veth1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(veth2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(afPacket)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(veth1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(veth2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } // re-create AF-PACKET @@ -514,38 +514,38 @@ func TestInterfaceAfPacketWithLogicalReference(t *testing.T) { err = req.Delete( afPacket, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).NotTo(Succeed()) req = ctx.GenericClient().ChangeRequest() err = req.Update( afPacket, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.PingFromVPPClb(veth2IP)).Should(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.PingFromVPPClb(veth2IP)).Should(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // re-create VETH req = ctx.GenericClient().ChangeRequest() err = req.Delete( veth2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth2IP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).NotTo(Succeed()) req = ctx.GenericClient().ChangeRequest() err = req.Update( veth2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.PingFromVPPClb(veth2IP)).Should(Succeed()) - Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.PingFromVPPClb(veth2IP)).Should(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, afPacketIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } diff --git a/tests/e2e/011_interface_link_only_test.go b/tests/e2e/011_interface_link_only_test.go index 3d3b307b88..c834080f7b 100644 --- a/tests/e2e/011_interface_link_only_test.go +++ b/tests/e2e/011_interface_link_only_test.go @@ -86,15 +86,15 @@ func TestInterfaceLinkOnlyTap(t *testing.T) { vppTap, linuxTap, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromVPP(linuxTapIPIgnored)).NotTo(Succeed()) // IP address was not set + ctx.Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromVPP(linuxTapIPIgnored)).NotTo(Succeed()) // IP address was not set hasIP := func(tapLinkName netlink.Link, ipAddr string) bool { addrs, err := netlink.AddrList(tapLinkName, netlink.FAMILY_ALL) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) for _, addr := range addrs { if addr.IP.String() == ipAddr { return true @@ -105,34 +105,34 @@ func TestInterfaceLinkOnlyTap(t *testing.T) { leaveMs := ms.enterNetNs() tapLinkName, err := netlink.LinkByName(linuxTapHostname) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) // agent didn't set IP address - Expect(hasIP(tapLinkName, linuxTapIPIgnored)).To(BeFalse()) + ctx.Expect(hasIP(tapLinkName, linuxTapIPIgnored)).To(BeFalse()) // set IP and MAC addresses from outside of the agent ipAddr, _, err := utils.ParseIPAddr(linuxTapIPExternal+netMask, nil) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = netlink.AddrAdd(tapLinkName, &netlink.Addr{IPNet: ipAddr}) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) hwAddr, err := ParseMAC(linuxTapHwExternal) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = netlink.LinkSetHardwareAddr(tapLinkName, hwAddr) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) leaveMs() // run downstream resync - Expect(ctx.AgentInSync()).To(BeTrue()) // everything in-sync even though the IP addr was added + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // everything in-sync even though the IP addr was added leaveMs = ms.enterNetNs() - Expect(hasIP(tapLinkName, linuxTapIPIgnored)).To(BeFalse()) - Expect(hasIP(tapLinkName, linuxTapIPExternal)).To(BeTrue()) + ctx.Expect(hasIP(tapLinkName, linuxTapIPIgnored)).To(BeFalse()) + ctx.Expect(hasIP(tapLinkName, linuxTapIPExternal)).To(BeTrue()) link, err := netlink.LinkByName(linuxTapHostname) - Expect(err).ToNot(HaveOccurred()) - Expect(link).ToNot(BeNil()) - Expect(link.Attrs().HardwareAddr.String()).To(Equal(linuxTapHwExternal)) + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Expect(link).ToNot(BeNil()) + ctx.Expect(link.Attrs().HardwareAddr.String()).To(Equal(linuxTapHwExternal)) leaveMs() // test with ping - Expect(ctx.PingFromVPP(linuxTapIPExternal)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTapIPExternal)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppTapIP)).To(Succeed()) } diff --git a/tests/e2e/012_linux_interfaces_test.go b/tests/e2e/012_linux_interfaces_test.go index 99b946b5f3..172a3eec66 100644 --- a/tests/e2e/012_linux_interfaces_test.go +++ b/tests/e2e/012_linux_interfaces_test.go @@ -72,38 +72,38 @@ func TestDummyInterface(t *testing.T) { dummyIf1, dummyIf2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(dummyIf1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(dummyIf2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromMs(msName, ipAddr1)).To(Succeed()) - Expect(ctx.PingFromMs(msName, ipAddr2)).To(Succeed()) - Expect(ctx.PingFromMs(msName, ipAddr3)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(dummyIf1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(dummyIf2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromMs(msName, ipAddr1)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, ipAddr2)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, ipAddr3)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // Delete dummy2 req = ctx.GenericClient().ChangeRequest() err = req.Delete( dummyIf2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.GetValueState(dummyIf1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(dummyIf2)).ToNot(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromMs(msName, ipAddr1)).To(Succeed()) - Expect(ctx.PingFromMs(msName, ipAddr2)).To(Succeed()) - Expect(ctx.PingFromMs(msName, ipAddr3)).ToNot(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.GetValueState(dummyIf1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(dummyIf2)).ToNot(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromMs(msName, ipAddr1)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, ipAddr2)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, ipAddr3)).ToNot(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // restart microservice ctx.StopMicroservice(msName) - Eventually(ctx.GetValueStateClb(dummyIf1)).Should(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(dummyIf1)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) ctx.StartMicroservice(msName) - Eventually(ctx.GetValueStateClb(dummyIf1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromMs(msName, ipAddr1)).To(Succeed()) - Expect(ctx.PingFromMs(msName, ipAddr2)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(dummyIf1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromMs(msName, ipAddr1)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, ipAddr2)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // Disable dummy1 dummyIf1.Enabled = false @@ -111,7 +111,7 @@ func TestDummyInterface(t *testing.T) { err = req.Update( dummyIf1, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) } // Test interfaces created externally but with IP addresses assigned by the agent. @@ -140,7 +140,7 @@ func TestExistingInterface(t *testing.T) { hasIP := func(ifName, ipAddr string) bool { addrs, err := ifHandler.GetAddressList(ifName) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) for _, addr := range addrs { if addr.IP.String() == ipAddr { return true @@ -158,54 +158,54 @@ func TestExistingInterface(t *testing.T) { err := req.Update( existingIface, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) // referenced interface does not exist yet - Expect(ctx.GetValueState(existingIface)).To(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.GetValueState(existingIface)).To(Equal(kvscheduler.ValueState_PENDING)) // create referenced host interface using linuxcalls err = ifHandler.AddDummyInterface(ifaceHostName) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = ifHandler.SetInterfaceUp(ifaceHostName) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(existingIface)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr1+netMask))). + ctx.Eventually(ctx.GetValueStateClb(existingIface)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr1+netMask))). Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr2+netMask))). + ctx.Eventually(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr2+netMask))). Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // check that the IP addresses have been configured - Expect(hasIP(ifaceHostName, ipAddr1)).To(BeTrue()) - Expect(hasIP(ifaceHostName, ipAddr2)).To(BeTrue()) + ctx.Expect(hasIP(ifaceHostName, ipAddr1)).To(BeTrue()) + ctx.Expect(hasIP(ifaceHostName, ipAddr2)).To(BeTrue()) // add third IP address externally, it should get removed by resync ipAddr, _, err := utils.ParseIPAddr(ipAddr3+netMask, nil) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = ifHandler.AddInterfaceIP(ifaceHostName, ipAddr) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) // resync should remove the address that was added externally - Expect(ctx.AgentInSync()).To(BeFalse()) - Expect(hasIP(ifaceHostName, ipAddr1)).To(BeTrue()) - Expect(hasIP(ifaceHostName, ipAddr2)).To(BeTrue()) - Expect(hasIP(ifaceHostName, ipAddr3)).To(BeFalse()) + ctx.Expect(ctx.AgentInSync()).To(BeFalse()) + ctx.Expect(hasIP(ifaceHostName, ipAddr1)).To(BeTrue()) + ctx.Expect(hasIP(ifaceHostName, ipAddr2)).To(BeTrue()) + ctx.Expect(hasIP(ifaceHostName, ipAddr3)).To(BeFalse()) // remove the EXISTING interface (IP addresses should be unassigned) req = ctx.GenericClient().ChangeRequest() err = req.Delete( existingIface, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) - Expect(ctx.GetValueState(existingIface)).ToNot(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(hasIP(ifaceHostName, ipAddr1)).To(BeFalse()) - Expect(hasIP(ifaceHostName, ipAddr2)).To(BeFalse()) - Expect(hasIP(ifaceHostName, ipAddr3)).To(BeFalse()) + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Expect(ctx.GetValueState(existingIface)).ToNot(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(hasIP(ifaceHostName, ipAddr1)).To(BeFalse()) + ctx.Expect(hasIP(ifaceHostName, ipAddr2)).To(BeFalse()) + ctx.Expect(hasIP(ifaceHostName, ipAddr3)).To(BeFalse()) // cleanup err = ifHandler.DeleteInterface(ifaceHostName) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) } // Test interfaces created externally including the IP address assignments. @@ -238,7 +238,7 @@ func TestExistingLinkOnlyInterface(t *testing.T) { hasIP := func(ifName, ipAddr string) bool { addrs, err := ifHandler.GetAddressList(ifName) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) for _, addr := range addrs { if addr.IP.String() == ipAddr { return true @@ -256,58 +256,58 @@ func TestExistingLinkOnlyInterface(t *testing.T) { err := req.Update( existingIface, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) // the referenced interface does not exist yet - Expect(ctx.GetValueState(existingIface)).To(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.GetValueState(existingIface)).To(Equal(kvscheduler.ValueState_PENDING)) // create referenced host interface using linuxcalls (without IPs for now) err = ifHandler.AddDummyInterface(ifaceHostName) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = ifHandler.SetInterfaceUp(ifaceHostName) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(existingIface)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr1+netMask))). + ctx.Eventually(ctx.GetValueStateClb(existingIface)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr1+netMask))). Should(Equal(kvscheduler.ValueState_PENDING)) - Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr2+netMask))). + ctx.Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr2+netMask))). Should(Equal(kvscheduler.ValueState_PENDING)) - Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr3+netMask))). + ctx.Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr3+netMask))). Should(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // add IP addresses using linuxcalls (except ipAddr3) - Expect(hasIP(ifaceHostName, ipAddr1)).To(BeFalse()) - Expect(hasIP(ifaceHostName, ipAddr2)).To(BeFalse()) - Expect(hasIP(ifaceHostName, ipAddr3)).To(BeFalse()) + ctx.Expect(hasIP(ifaceHostName, ipAddr1)).To(BeFalse()) + ctx.Expect(hasIP(ifaceHostName, ipAddr2)).To(BeFalse()) + ctx.Expect(hasIP(ifaceHostName, ipAddr3)).To(BeFalse()) ipAddr, _, err := utils.ParseIPAddr(ipAddr1+netMask, nil) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = ifHandler.AddInterfaceIP(ifaceHostName, ipAddr) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) ipAddr, _, err = utils.ParseIPAddr(ipAddr2+netMask, nil) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = ifHandler.AddInterfaceIP(ifaceHostName, ipAddr) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) // ipAddr1 and ipAddr2 should be eventually marked as configured - Eventually(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr1+netMask))). + ctx.Eventually(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr1+netMask))). Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr2+netMask))). + ctx.Eventually(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr2+netMask))). Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr3+netMask))). + ctx.Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr3+netMask))). Should(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // remove one IP address ipAddr, _, err = utils.ParseIPAddr(ipAddr1+netMask, nil) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = ifHandler.DelInterfaceIP(ifaceHostName, ipAddr) - Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr1+netMask))). + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Eventually(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr1+netMask))). Should(Equal(kvscheduler.ValueState_PENDING)) - Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr2+netMask))). + ctx.Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr2+netMask))). Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr3+netMask))). + ctx.Consistently(ctx.GetDerivedValueStateClb(existingIface, addrKey(ipAddr3+netMask))). Should(Equal(kvscheduler.ValueState_PENDING)) // remove the EXISTING interface (the actual interface should be left untouched including IPs) @@ -315,13 +315,13 @@ func TestExistingLinkOnlyInterface(t *testing.T) { err = req.Delete( existingIface, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) - Expect(ctx.GetValueState(existingIface)).ToNot(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(hasIP(ifaceHostName, ipAddr1)).To(BeFalse()) - Expect(hasIP(ifaceHostName, ipAddr2)).To(BeTrue()) - Expect(hasIP(ifaceHostName, ipAddr3)).To(BeFalse()) + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Expect(ctx.GetValueState(existingIface)).ToNot(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(hasIP(ifaceHostName, ipAddr1)).To(BeFalse()) + ctx.Expect(hasIP(ifaceHostName, ipAddr2)).To(BeTrue()) + ctx.Expect(hasIP(ifaceHostName, ipAddr3)).To(BeFalse()) // cleanup err = ifHandler.DeleteInterface(ifaceHostName) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) } diff --git a/tests/e2e/020_netalloc_test.go b/tests/e2e/020_netalloc_test.go index 2d19ea8a0c..f3058453d9 100644 --- a/tests/e2e/020_netalloc_test.go +++ b/tests/e2e/020_netalloc_test.go @@ -142,36 +142,36 @@ func TestIPWithNeighGW(t *testing.T) { vppLoop, vppTap, linuxTap, linuxArp, linuxRoute, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) checkItemsAreConfigured := func(msRestart, withLoopAddr bool) { // configured immediately: if withLoopAddr { - Expect(ctx.GetValueState(vppLoopAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppLoopAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) } - Expect(ctx.GetValueState(vppTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED)) // the rest depends on the microservice if msRestart { - Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) } else { - Expect(ctx.GetValueState(vppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) } - Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxArp)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxArp)).To(Equal(kvscheduler.ValueState_CONFIGURED)) if withLoopAddr { - Expect(ctx.GetValueState(linuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) } else { - Expect(ctx.GetValueState(linuxRoute)).To(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.GetValueState(linuxRoute)).To(Equal(kvscheduler.ValueState_PENDING)) } } checkItemsAreConfigured(true, true) // check connection with ping - Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppLoopIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppLoopIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // restart microservice ctx.StopMicroservice(msName) @@ -180,9 +180,9 @@ func TestIPWithNeighGW(t *testing.T) { // check connection with ping (few packets will get lost before tables are refreshed) ctx.PingFromVPP(linuxTapIP) - Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppLoopIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppLoopIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // change IP addresses - the network items should be re-created vppLoopAddr.Address = vppLoopIP2 + netMask @@ -193,28 +193,28 @@ func TestIPWithNeighGW(t *testing.T) { req = ctx.GenericClient().ChangeRequest() err = req.Update(vppLoopAddr, vppTapAddr, linuxTapAddr).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) checkItemsAreConfigured(false, true) // check connection with ping - Expect(ctx.PingFromVPP(linuxTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).NotTo(Succeed()) - Expect(ctx.PingFromMs(msName, vppLoopIP)).NotTo(Succeed()) - Expect(ctx.PingFromVPP(linuxTapIP2)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppLoopIP2)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromMs(msName, vppLoopIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP2)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppLoopIP2)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // de-allocate loopback IP - the connection should not work anymore req = ctx.GenericClient().ChangeRequest() err = req.Delete(vppLoopAddr).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) // loopback is still created but without IP and route is pending checkItemsAreConfigured(false, false) // can ping linux TAP from VPP, but cannot ping loopback - Expect(ctx.PingFromVPP(linuxTapIP2)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppLoopIP2)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP2)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppLoopIP2)).NotTo(Succeed()) // TODO: not in-sync - the list of IP addresses is updated in the metadata // - we need to figure out how to get rid of this and how to solve VRF-related @@ -343,35 +343,35 @@ func TestIPWithNonLocalGW(t *testing.T) { vppLoop, vppTap, linuxTap, linuxArp, linuxRoute, linuxLinkRoute, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) checkItemsAreConfigured := func(msRestart, withLinkRoute bool) { // configured immediately: - Expect(ctx.GetValueState(vppLoopAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vppTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppLoopAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED)) // the rest depends on the microservice if msRestart { - Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) } else { - Expect(ctx.GetValueState(vppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) } - Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxArp)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxArp)).To(Equal(kvscheduler.ValueState_CONFIGURED)) if withLinkRoute { - Expect(ctx.GetValueState(linuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxLinkRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxLinkRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) } else { - Expect(ctx.GetValueState(linuxRoute)).To(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.GetValueState(linuxRoute)).To(Equal(kvscheduler.ValueState_PENDING)) } } checkItemsAreConfigured(true, true) // check connection with ping - Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppLoopIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppLoopIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // restart microservice ctx.StopMicroservice(msName) @@ -380,9 +380,9 @@ func TestIPWithNonLocalGW(t *testing.T) { // check connection with ping (few packets will get lost before tables are refreshed) ctx.PingFromVPP(linuxTapIP) - Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppLoopIP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppLoopIP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // change IP addresses - the network items should be re-created vppLoopAddr.Address = vppLoopIP2 + vppNetMask @@ -393,29 +393,29 @@ func TestIPWithNonLocalGW(t *testing.T) { req = ctx.GenericClient().ChangeRequest() err = req.Update(vppLoopAddr, vppTapAddr, linuxTapAddr).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) checkItemsAreConfigured(false, true) // check connection with ping - Expect(ctx.PingFromVPP(linuxTapIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP)).NotTo(Succeed()) - Expect(ctx.PingFromMs(msName, vppLoopIP)).NotTo(Succeed()) - Expect(ctx.PingFromVPP(linuxTapIP2)).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppLoopIP2)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromMs(msName, vppLoopIP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP2)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppLoopIP2)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // remove link route - this should make the GW for linux TAP non-routable req = ctx.GenericClient().ChangeRequest() err = req.Delete(linuxLinkRoute).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) // the route to VPP is pending checkItemsAreConfigured(false, false) // cannot ping anymore from any of the sides - Expect(ctx.PingFromVPP(linuxTapIP2)).NotTo(Succeed()) - Expect(ctx.PingFromMs(msName, vppLoopIP2)).NotTo(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromVPP(linuxTapIP2)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppLoopIP2)).NotTo(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } // test IP address allocation using the netalloc plugin for VPP routes mainly. @@ -539,37 +539,37 @@ func TestVPPRoutesWithNetalloc(t *testing.T) { vppTap, linuxTap, linuxLoop, vppRouteLoopNet1, vppRouteLoopNet2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) checkItemsAreConfigured := func(msRestart, withLoopNet2Addr bool) { // configured immediately: if withLoopNet2Addr { - Expect(ctx.GetValueState(linuxLoopNet2Addr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxLoopNet2Addr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) } - Expect(ctx.GetValueState(vppTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxLoopNet1Addr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTapAddr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxLoopNet1Addr)).To(Equal(kvscheduler.ValueState_CONFIGURED)) // the rest depends on the microservice if msRestart { - Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(vppTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) } else { - Expect(ctx.GetValueState(vppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) } - Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vppRouteLoopNet1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppRouteLoopNet1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) if withLoopNet2Addr { - Expect(ctx.GetValueState(vppRouteLoopNet2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppRouteLoopNet2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) } else { - Expect(ctx.GetValueState(vppRouteLoopNet2)).To(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.GetValueState(vppRouteLoopNet2)).To(Equal(kvscheduler.ValueState_PENDING)) } } checkItemsAreConfigured(true, true) // check connection with ping - Expect(ctx.PingFromVPP(linuxLoopNet1IP)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxLoopNet2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromVPP(linuxLoopNet1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxLoopNet2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // restart microservice ctx.StopMicroservice(msName) @@ -579,9 +579,9 @@ func TestVPPRoutesWithNetalloc(t *testing.T) { // check connection with ping (few packets will get lost before tables are refreshed) ctx.PingFromVPP(linuxLoopNet1IP) ctx.PingFromVPP(linuxLoopNet2IP) - Expect(ctx.PingFromVPP(linuxLoopNet1IP)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxLoopNet2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromVPP(linuxLoopNet1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxLoopNet2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // change IP addresses - the network items should be re-created linuxLoopNet1Addr.Address = linuxLoopNet1IP2 + net1Mask @@ -592,25 +592,25 @@ func TestVPPRoutesWithNetalloc(t *testing.T) { req = ctx.GenericClient().ChangeRequest() err = req.Update(linuxLoopNet1Addr, vppTapAddr, linuxTapAddr).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) checkItemsAreConfigured(false, true) // check connection with ping - Expect(ctx.PingFromVPP(linuxLoopNet1IP)).NotTo(Succeed()) - Expect(ctx.PingFromVPP(linuxLoopNet1IP2)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxLoopNet2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromVPP(linuxLoopNet1IP)).NotTo(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxLoopNet1IP2)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxLoopNet2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // de-allocate loopback IP in net2 - the connection to that IP should not work anymore req = ctx.GenericClient().ChangeRequest() err = req.Delete(linuxLoopNet2Addr).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) // loopback is still created but without IP and route is pending checkItemsAreConfigured(false, false) // can ping loop1, but cannot ping loop2 - Expect(ctx.PingFromVPP(linuxLoopNet1IP2)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxLoopNet2IP)).NotTo(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromVPP(linuxLoopNet1IP2)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxLoopNet2IP)).NotTo(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } diff --git a/tests/e2e/030_span_test.go b/tests/e2e/030_span_test.go index b4862743c5..65c16d4c56 100644 --- a/tests/e2e/030_span_test.go +++ b/tests/e2e/030_span_test.go @@ -108,50 +108,50 @@ func TestSpan(t *testing.T) { ctx.StartMicroservice(msName) req := ctx.GenericClient().ChangeRequest() err := req.Update(dstTap, dstLinuxTap, spanRx).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") + ctx.Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") - Eventually(ctx.GetValueStateClb(dstTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(dstTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "Destination TAP is not configured") - Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_PENDING), + ctx.Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_PENDING), "SPAN is not in a `PENDING` state, but `InterfaceFrom` is not ready") req = ctx.GenericClient().ChangeRequest() err = req.Update(srcTap, srcLinuxTap).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(srcTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(srcTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "Source TAP is not configured") - Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_CONFIGURED), "SPAN is not in a `CONFIGURED` state, but both interfaces are ready") ctx.StopMicroservice(msName) - Eventually(ctx.GetValueStateClb(dstTap)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(dstTap)).Should(Equal(kvscheduler.ValueState_PENDING), "Destination TAP must be in a `PENDING` state, after its microservice stops") - Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_PENDING), + ctx.Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_PENDING), "SPAN is not in a `PENDING` state, but `InterfaceTo` is not ready") // Check `show int span` output stdout, err := ctx.ExecVppctl("show", "int", "span") - Expect(err).ToNot(HaveOccurred(), "Running `show int span` failed with err") - Expect(stdout).To(HaveLen(0), + ctx.Expect(err).ToNot(HaveOccurred(), "Running `show int span` failed with err") + ctx.Expect(stdout).To(HaveLen(0), "Expected empty output from `show int span` command") // Start container and configure destination interface again ctx.StartMicroservice(msName) - Eventually(ctx.GetValueStateClb(dstTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(dstTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "Destination TAP expected to be configured") - Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_CONFIGURED), "SPAN is not in a `CONFIGURED` state, but both interfaces are ready") // Check `show int span` output stdout, err = ctx.ExecVppctl("show", "int", "span") - Expect(err).ToNot(HaveOccurred(), "Running `show int span` failed with err") + ctx.Expect(err).ToNot(HaveOccurred(), "Running `show int span` failed with err") s := regexp.MustCompile(`\s+`).ReplaceAllString(stdout, " ") - Expect(s).To(Equal("Source Destination Device L2 tap1 tap0 ( rx) ( none) "), + ctx.Expect(s).To(Equal("Source Destination Device L2 tap1 tap0 ( rx) ( none) "), "Output of `show int span` didn't match to expected") } diff --git a/tests/e2e/040_bridge_domain_test.go b/tests/e2e/040_bridge_domain_test.go index 2d3ec770d7..e713d4f18a 100644 --- a/tests/e2e/040_bridge_domain_test.go +++ b/tests/e2e/040_bridge_domain_test.go @@ -179,70 +179,70 @@ func TestBridgeDomainWithTAPs(t *testing.T) { vppLoop, bd, ).Send(context.Background()) - Expect(err).To(BeNil(), "Transaction creating BD with TAPs failed") + ctx.Expect(err).To(BeNil(), "Transaction creating BD with TAPs failed") - Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED), "BD BVI should be configured even before microservices start") - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TAP attached to a newly started microservice1 should be eventually configured") - Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TAP attached to a newly started microservice2 should be eventually configured") if ctx.VppRelease() < "21.01" { // "show bridge-domain" hard to parse in VPP>=21.01 (https://jira.fd.io/browse/VPP-1969) bds, err := bridgeDomains(ctx) - Expect(err).ToNot(HaveOccurred()) - Expect(bds).To(HaveLen(1)) - Expect(bds[0]).To(SatisfyAll( + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Expect(bds).To(HaveLen(1)) + ctx.Expect(bds[0]).To(SatisfyAll( bdAgeIs(0), bdWithFlooding(), bdWithForwarding(), bdWithLearning())) } - Expect(ctx.PingFromMs(ms2Name, linuxTap1IP)).To(Succeed()) - Expect(ctx.PingFromMs(ms1Name, linuxTap2IP)).To(Succeed()) - Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxTap1IP)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxTap2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ctx.PingFromMs(ms2Name, linuxTap1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, linuxTap2IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTap1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTap2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // kill one of the microservices // - "Eventually" is also used with linuxTap1 to wait for retry txn that // will change state from RETRYING to PENDING ctx.StopMicroservice(ms1Name) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated VPP-TAP should be pending") - Eventually(ctx.GetValueStateClb(linuxTap1)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(linuxTap1)).Should(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated LinuxTAP should be pending") - Expect(ctx.GetValueState(vppTap2)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(vppTap2)).To(Equal(kvscheduler.ValueState_CONFIGURED), "VPP-TAP attached to running microservice is not configured") - Expect(ctx.GetValueState(linuxTap2)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(linuxTap2)).To(Equal(kvscheduler.ValueState_CONFIGURED), "Linux-TAP attached to running microservice is not configured") - Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED), "BD BVI interface is not configured") - Expect(ctx.GetValueState(bd)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(bd)).To(Equal(kvscheduler.ValueState_CONFIGURED), "BD is not configured") - Expect(ctx.PingFromMs(ms2Name, linuxTap1IP)).ToNot(Succeed()) - Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxTap1IP)).ToNot(Succeed()) - Expect(ctx.PingFromVPP(linuxTap2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ctx.PingFromMs(ms2Name, linuxTap1IP)).ToNot(Succeed()) + ctx.Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTap1IP)).ToNot(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTap2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // restart the microservice ctx.StartMicroservice(ms1Name) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "VPP-TAP attached to a re-started microservice1 should be eventually configured") - Expect(ctx.GetValueState(linuxTap1)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(linuxTap1)).To(Equal(kvscheduler.ValueState_CONFIGURED), "Linux-TAP attached to a re-started microservice1 is not configured") // Waiting for TAP interface after restart // See: https://github.com/ligato/vpp-agent/issues/1489 - Eventually(ctx.PingFromMsClb(ms2Name, linuxTap1IP), "18s", "2s").Should(Succeed()) - Expect(ctx.PingFromMs(ms1Name, linuxTap2IP)).To(Succeed()) - Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxTap1IP)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxTap2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Eventually(ctx.PingFromMsClb(ms2Name, linuxTap1IP), "18s", "2s").Should(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, linuxTap2IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTap1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTap2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // change bridge domain config to trigger re-creation bd.MacAge = 10 @@ -250,21 +250,21 @@ func TestBridgeDomainWithTAPs(t *testing.T) { err = req.Update( bd, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction updating BD failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction updating BD failed") - Expect(ctx.PingFromMs(ms2Name, linuxTap1IP)).To(Succeed()) - Expect(ctx.PingFromMs(ms1Name, linuxTap2IP)).To(Succeed()) - Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxTap1IP)).To(Succeed()) - Expect(ctx.PingFromVPP(linuxTap2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ctx.PingFromMs(ms2Name, linuxTap1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, linuxTap2IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTap1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(linuxTap2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") if ctx.VppRelease() < "21.01" { // "show bridge-domain" hard to parse in VPP>=21.01 (https://jira.fd.io/browse/VPP-1969) bds, err := bridgeDomains(ctx) - Expect(err).ToNot(HaveOccurred()) - Expect(bds).To(HaveLen(1)) - Expect(bds[0]).To(SatisfyAll( + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Expect(bds).To(HaveLen(1)) + ctx.Expect(bds[0]).To(SatisfyAll( bdAgeIs(10), bdWithFlooding(), bdWithForwarding(), bdWithLearning())) } } @@ -418,76 +418,76 @@ func TestBridgeDomainWithAfPackets(t *testing.T) { vppLoop, bd, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction creating BD with AF-PACKETs failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction creating BD with AF-PACKETs failed") - Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED), "BD BVI should be configured even before microservices start") - Eventually(ctx.GetValueStateClb(afPacket1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(afPacket1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "AF-PACKET attached to a newly started microservice1 should be eventually configured") - Eventually(ctx.GetValueStateClb(afPacket2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(afPacket2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "AF-PACKET attached to a newly started microservice2 should be eventually configured") if ctx.VppRelease() < "21.01" { // "show bridge-domain" hard to parse in VPP>=21.01 (https://jira.fd.io/browse/VPP-1969) bds, err := bridgeDomains(ctx) - Expect(err).ToNot(HaveOccurred()) - Expect(bds).To(HaveLen(1)) - Expect(bds[0]).To(SatisfyAll( + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Expect(bds).To(HaveLen(1)) + ctx.Expect(bds[0]).To(SatisfyAll( bdAgeIs(0), bdWithFlooding(), bdWithForwarding(), bdWithLearning())) } - Expect(ctx.PingFromMs(ms2Name, veth1IP)).To(Succeed()) - Expect(ctx.PingFromMs(ms1Name, veth2IP)).To(Succeed()) - Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromVPP(veth1IP)).To(Succeed()) - Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ctx.PingFromMs(ms2Name, veth1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, veth2IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // kill one of the microservices // - both AF-PACKET and VETH use separate "Eventually" assertion since // they react to different SB notifications ctx.StopMicroservice(ms1Name) - Eventually(ctx.GetValueStateClb(afPacket1)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(afPacket1)).Should(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated AF-PACKET should be pending") - Eventually(ctx.GetValueStateClb(veth1a)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(veth1a)).Should(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated VETH should be pending") - Expect(ctx.GetValueState(veth1b)).To(Equal(kvscheduler.ValueState_PENDING), + ctx.Expect(ctx.GetValueState(veth1b)).To(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated VETH should be pending") - Expect(ctx.GetValueState(afPacket2)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(afPacket2)).To(Equal(kvscheduler.ValueState_CONFIGURED), "AF-PACKET attached to running microservice is not configured") - Expect(ctx.GetValueState(veth2a)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(veth2a)).To(Equal(kvscheduler.ValueState_CONFIGURED), "VETH attached to running microservice is not configured") - Expect(ctx.GetValueState(veth2b)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(veth2b)).To(Equal(kvscheduler.ValueState_CONFIGURED), "VETH attached to running microservice is not configured") - Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(vppLoop)).To(Equal(kvscheduler.ValueState_CONFIGURED), "BD BVI interface is not configured") - Expect(ctx.GetValueState(bd)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(bd)).To(Equal(kvscheduler.ValueState_CONFIGURED), "BD is not configured") - Expect(ctx.PingFromMs(ms2Name, veth1IP)).ToNot(Succeed()) - Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromVPP(veth1IP)).ToNot(Succeed()) - Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ctx.PingFromMs(ms2Name, veth1IP)).ToNot(Succeed()) + ctx.Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth1IP)).ToNot(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // restart the microservice ctx.StartMicroservice(ms1Name) - Eventually(ctx.GetValueStateClb(afPacket1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(afPacket1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "AF-PACKET attached to a re-started microservice1 should be eventually configured") - Expect(ctx.GetValueState(veth1a)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(veth1a)).To(Equal(kvscheduler.ValueState_CONFIGURED), "VETH attached to re-started microservice1 is not configured") - Expect(ctx.GetValueState(veth1b)).To(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Expect(ctx.GetValueState(veth1b)).To(Equal(kvscheduler.ValueState_CONFIGURED), "VETH attached to re-started microservice1 is not configured") // Waiting for AF-PACKET interface after restart // See: https://github.com/ligato/vpp-agent/issues/1489 - Eventually(ctx.PingFromMsClb(ms2Name, veth1IP), "18s", "2s").Should(Succeed()) - Expect(ctx.PingFromMs(ms1Name, veth2IP)).To(Succeed()) - Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromVPP(veth1IP)).To(Succeed()) - Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Eventually(ctx.PingFromMsClb(ms2Name, veth1IP), "18s", "2s").Should(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, veth2IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // change bridge domain config to trigger re-creation bd.MacAge = 10 @@ -495,21 +495,21 @@ func TestBridgeDomainWithAfPackets(t *testing.T) { err = req.Update( bd, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction updating BD failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction updating BD failed") if ctx.VppRelease() < "21.01" { // "show bridge-domain" hard to parse in VPP>=21.01 (https://jira.fd.io/browse/VPP-1969) bds, err := bridgeDomains(ctx) - Expect(err).ToNot(HaveOccurred()) - Expect(bds).To(HaveLen(1)) - Expect(bds[0]).To(SatisfyAll( + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Expect(bds).To(HaveLen(1)) + ctx.Expect(bds[0]).To(SatisfyAll( bdAgeIs(10), bdWithFlooding(), bdWithForwarding(), bdWithLearning())) } - Expect(ctx.PingFromMs(ms2Name, veth1IP)).To(Succeed()) - Expect(ctx.PingFromMs(ms1Name, veth2IP)).To(Succeed()) - Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) - Expect(ctx.PingFromVPP(veth1IP)).To(Succeed()) - Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ctx.PingFromMs(ms2Name, veth1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, veth2IP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms1Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromMs(ms2Name, vppLoopbackIP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth1IP)).To(Succeed()) + ctx.Expect(ctx.PingFromVPP(veth2IP)).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") } diff --git a/tests/e2e/050_nat_test.go b/tests/e2e/050_nat_test.go index 8efbe13c49..f987a14855 100644 --- a/tests/e2e/050_nat_test.go +++ b/tests/e2e/050_nat_test.go @@ -156,7 +156,7 @@ func TestSourceNAT(t *testing.T) { ctx.StartMicroservice(ms1Name) ctx.StartMicroservice(ms2Name) - Expect(nat44Addresses()).ShouldNot(SatisfyAny( + ctx.Expect(nat44Addresses()).ShouldNot(SatisfyAny( ContainSubstring(sNatAddr1), ContainSubstring(sNatAddr2), ContainSubstring(sNatAddr3))) req := ctx.GenericClient().ChangeRequest() err := req.Update( @@ -169,19 +169,19 @@ func TestSourceNAT(t *testing.T) { natInterface, natPool, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction creating public and private networks failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction creating public and private networks failed") - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TAP attached to a newly started microservice1 should be eventually configured") - Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TAP attached to a newly started microservice2 should be eventually configured") - Expect(nat44Addresses()).Should(SatisfyAll( + ctx.Expect(nat44Addresses()).Should(SatisfyAll( ContainSubstring(sNatAddr1), ContainSubstring(sNatAddr2), ContainSubstring(sNatAddr3))) - Expect(ping()).Should(Succeed()) - Expect(connectTCP()).Should(Succeed()) - Expect(connectUDP()).Should(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ping()).Should(Succeed()) + ctx.Expect(connectTCP()).Should(Succeed()) + ctx.Expect(connectUDP()).Should(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // remove S-NAT configuration req = ctx.GenericClient().ChangeRequest() @@ -190,15 +190,15 @@ func TestSourceNAT(t *testing.T) { natInterface, natPool, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction removing S-NAT failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction removing S-NAT failed") // check configuration - Expect(nat44Addresses()).ShouldNot(SatisfyAny( + ctx.Expect(nat44Addresses()).ShouldNot(SatisfyAny( ContainSubstring(sNatAddr1), ContainSubstring(sNatAddr2), ContainSubstring(sNatAddr3))) - Expect(ping()).ShouldNot(Succeed()) - Expect(connectTCP()).ShouldNot(Succeed()) - Expect(connectUDP()).ShouldNot(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ping()).ShouldNot(Succeed()) + ctx.Expect(connectTCP()).ShouldNot(Succeed()) + ctx.Expect(connectUDP()).ShouldNot(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // get back the S-NAT configuration req = ctx.GenericClient().ChangeRequest() @@ -207,29 +207,29 @@ func TestSourceNAT(t *testing.T) { natInterface, natPool, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction creating S-NAT failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction creating S-NAT failed") - Expect(nat44Addresses()).Should(SatisfyAll( + ctx.Expect(nat44Addresses()).Should(SatisfyAll( ContainSubstring(sNatAddr1), ContainSubstring(sNatAddr2), ContainSubstring(sNatAddr3))) - Expect(ping()).Should(Succeed()) - Expect(connectTCP()).Should(Succeed()) - Expect(connectUDP()).Should(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ping()).Should(Succeed()) + ctx.Expect(connectTCP()).Should(Succeed()) + ctx.Expect(connectUDP()).Should(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // restart microservice with S-NAT attached ctx.StopMicroservice(ms1Name) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated VPP-TAP should be pending") ctx.StartMicroservice(ms1Name) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "VPP-TAP attached to a re-started microservice1 should be eventually configured") - Expect(nat44Addresses()).Should(SatisfyAll( + ctx.Expect(nat44Addresses()).Should(SatisfyAll( ContainSubstring(sNatAddr1), ContainSubstring(sNatAddr2), ContainSubstring(sNatAddr3))) - Expect(ping()).Should(Succeed()) - Expect(connectTCP()).Should(Succeed()) - Expect(connectUDP()).Should(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ping()).Should(Succeed()) + ctx.Expect(connectTCP()).Should(Succeed()) + ctx.Expect(connectUDP()).Should(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") } // Tests NAT pool CRUD operation and NAT pool resync. @@ -247,12 +247,12 @@ func TestNATPools(t *testing.T) { } mustBeInVPP := func(ctx *TestCtx, addrs []string) { for _, addr := range addrs { //Eventually is needed due to VPP-Agent to VPP configuration delay - Eventually(nat44Addresses(ctx)).Should(ContainSubstring(addr)) + ctx.Eventually(nat44Addresses(ctx)).Should(ContainSubstring(addr)) } } cantBeInVPP := func(ctx *TestCtx, addrs []string) { for _, addr := range addrs { //Eventually is needed due to VPP-Agent to VPP configuration delay - Eventually(nat44Addresses(ctx)).ShouldNot(ContainSubstring(addr)) + ctx.Eventually(nat44Addresses(ctx)).ShouldNot(ContainSubstring(addr)) } } @@ -328,27 +328,27 @@ func TestNATPools(t *testing.T) { &vpp_nat.Nat44Global{}, test.createNATPool, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction creating nat pool failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction creating nat pool failed") test.checkAfterCreation(ctx) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // resync + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // resync // update NAT pool req = ctx.GenericClient().ChangeRequest() err = req.Update( test.updateNATPool, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction updating nat pool failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction updating nat pool failed") test.checkAfterUpdate(ctx) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // resync + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // resync // delete NAT pool req = ctx.GenericClient().ChangeRequest() err = req.Delete( test.updateNATPool, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction deleting NAT pool failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction deleting NAT pool failed") test.checkAfterDelete(ctx) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // resync + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // resync }) } } @@ -543,7 +543,7 @@ func TestNATStaticMappings(t *testing.T) { ctx.StartMicroservice(ms1Name) ctx.StartMicroservice(ms2Name) - Expect(staticMappings()).ShouldNot(SatisfyAny(containTCP, containUDP)) + ctx.Expect(staticMappings()).ShouldNot(SatisfyAny(containTCP, containUDP)) req := ctx.GenericClient().ChangeRequest() err := req.Update( vppTap1, @@ -557,60 +557,60 @@ func TestNATStaticMappings(t *testing.T) { natInterface2, tcpSvc, udpSvc, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction creating public and private networks failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction creating public and private networks failed") - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TAP attached to a newly started microservice1 should be eventually configured") - Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TAP attached to a newly started microservice2 should be eventually configured") - Expect(staticMappings()).Should(SatisfyAll(containTCP, containUDP)) - Expect(connectTCP()).Should(Succeed()) - Expect(connectUDP()).Should(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(staticMappings()).Should(SatisfyAll(containTCP, containUDP)) + ctx.Expect(connectTCP()).Should(Succeed()) + ctx.Expect(connectUDP()).Should(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // remove static mappings req = ctx.GenericClient().ChangeRequest() err = req.Delete( tcpSvc, udpSvc, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction removing NAT static mappings failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction removing NAT static mappings failed") - Expect(staticMappings()).ShouldNot(SatisfyAny(containTCP, containUDP)) - Expect(connectTCP()).ShouldNot(Succeed()) - Expect(connectUDP()).ShouldNot(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(staticMappings()).ShouldNot(SatisfyAny(containTCP, containUDP)) + ctx.Expect(connectTCP()).ShouldNot(Succeed()) + ctx.Expect(connectUDP()).ShouldNot(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // get back the NAT configuration req = ctx.GenericClient().ChangeRequest() err = req.Update( tcpSvc, udpSvc, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction creating NAT static mappings failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction creating NAT static mappings failed") - Expect(staticMappings()).Should(SatisfyAll(containTCP, containUDP)) - Expect(connectTCP()).Should(Succeed()) - Expect(connectUDP()).Should(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(staticMappings()).Should(SatisfyAll(containTCP, containUDP)) + ctx.Expect(connectTCP()).Should(Succeed()) + ctx.Expect(connectUDP()).Should(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // restart both microservices ctx.StopMicroservice(ms1Name) ctx.StopMicroservice(ms2Name) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated VPP-TAP should be pending") - Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated VPP-TAP should be pending") ctx.StartMicroservice(ms1Name) ctx.StartMicroservice(ms2Name) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "VPP-TAP attached to a re-started microservice1 should be eventually configured") - Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "VPP-TAP attached to a re-started microservice1 should be eventually configured") - Expect(staticMappings()).Should(SatisfyAll(containTCP, containUDP)) - Expect(connectTCP()).Should(Succeed()) - Expect(connectUDP()).Should(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(staticMappings()).Should(SatisfyAll(containTCP, containUDP)) + ctx.Expect(connectTCP()).Should(Succeed()) + ctx.Expect(connectUDP()).Should(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") } // Simulate public and private networks using two microservices and test @@ -748,7 +748,7 @@ func TestSourceNATDeprecatedAPI(t *testing.T) { ctx.StartMicroservice(ms1Name) ctx.StartMicroservice(ms2Name) - Expect(nat44Addresses()).ShouldNot(SatisfyAny( + ctx.Expect(nat44Addresses()).ShouldNot(SatisfyAny( ContainSubstring(sNatAddr1), ContainSubstring(sNatAddr2), ContainSubstring(sNatAddr3))) req := ctx.GenericClient().ChangeRequest() err := req.Update( @@ -759,61 +759,61 @@ func TestSourceNATDeprecatedAPI(t *testing.T) { ms2DefaultRoute, sourceNat, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction creating public and private networks failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction creating public and private networks failed") - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TAP attached to a newly started microservice1 should be eventually configured") - Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TAP attached to a newly started microservice2 should be eventually configured") - Expect(nat44Addresses()).Should(SatisfyAll( + ctx.Expect(nat44Addresses()).Should(SatisfyAll( ContainSubstring(sNatAddr1), ContainSubstring(sNatAddr2), ContainSubstring(sNatAddr3))) - Expect(ping()).Should(Succeed()) - Expect(connectTCP()).Should(Succeed()) - Expect(connectUDP()).Should(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ping()).Should(Succeed()) + ctx.Expect(connectTCP()).Should(Succeed()) + ctx.Expect(connectUDP()).Should(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // remove S-NAT configuration req = ctx.GenericClient().ChangeRequest() err = req.Delete( sourceNat, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction removing S-NAT failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction removing S-NAT failed") // check configuration - Expect(nat44Addresses()).ShouldNot(SatisfyAny( + ctx.Expect(nat44Addresses()).ShouldNot(SatisfyAny( ContainSubstring(sNatAddr1), ContainSubstring(sNatAddr2), ContainSubstring(sNatAddr3))) - Expect(ping()).ShouldNot(Succeed()) - Expect(connectTCP()).ShouldNot(Succeed()) - Expect(connectUDP()).ShouldNot(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ping()).ShouldNot(Succeed()) + ctx.Expect(connectTCP()).ShouldNot(Succeed()) + ctx.Expect(connectUDP()).ShouldNot(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // get back the S-NAT configuration req = ctx.GenericClient().ChangeRequest() err = req.Update( sourceNat, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction creating S-NAT failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction creating S-NAT failed") - Expect(nat44Addresses()).Should(SatisfyAll( + ctx.Expect(nat44Addresses()).Should(SatisfyAll( ContainSubstring(sNatAddr1), ContainSubstring(sNatAddr2), ContainSubstring(sNatAddr3))) - Expect(ping()).Should(Succeed()) - Expect(connectTCP()).Should(Succeed()) - Expect(connectUDP()).Should(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ping()).Should(Succeed()) + ctx.Expect(connectTCP()).Should(Succeed()) + ctx.Expect(connectUDP()).Should(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // restart microservice with S-NAT attached ctx.StopMicroservice(ms1Name) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated VPP-TAP should be pending") ctx.StartMicroservice(ms1Name) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "VPP-TAP attached to a re-started microservice1 should be eventually configured") - Expect(nat44Addresses()).Should(SatisfyAll( + ctx.Expect(nat44Addresses()).Should(SatisfyAll( ContainSubstring(sNatAddr1), ContainSubstring(sNatAddr2), ContainSubstring(sNatAddr3))) - Expect(ping()).Should(Succeed()) - Expect(connectTCP()).Should(Succeed()) - Expect(connectUDP()).Should(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ping()).Should(Succeed()) + ctx.Expect(connectTCP()).Should(Succeed()) + ctx.Expect(connectUDP()).Should(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") } diff --git a/tests/e2e/060_acl_test.go b/tests/e2e/060_acl_test.go index 7f6a2c4a34..0525ddd1b7 100644 --- a/tests/e2e/060_acl_test.go +++ b/tests/e2e/060_acl_test.go @@ -316,37 +316,37 @@ func TestL3ACLs(t *testing.T) { } // ICMP - ExpectWithOffset(1, ctx.PingFromMs(ms1Name, linuxTap2IP)).To(beAllowed) // reflected by ms1IngressACL - ExpectWithOffset(1, ctx.PingFromMs(ms2Name, linuxTap1IP)).To(beBlocked) // blocked by ms1EgressACL + ctx.ExpectWithOffset(1, ctx.PingFromMs(ms1Name, linuxTap2IP)).To(beAllowed) // reflected by ms1IngressACL + ctx.ExpectWithOffset(1, ctx.PingFromMs(ms2Name, linuxTap1IP)).To(beBlocked) // blocked by ms1EgressACL // TCP - ExpectWithOffset(1, ctx.TestConnection(ms1Name, ms2Name, linuxTap2IP, linuxTap2IP, + ctx.ExpectWithOffset(1, ctx.TestConnection(ms1Name, ms2Name, linuxTap2IP, linuxTap2IP, ms2BlockedTCPPort, ms2BlockedTCPPort, false, tapv2InputNode)).To(beBlocked) // blocked by ms2EgressACL - ExpectWithOffset(1, ctx.TestConnection(ms1Name, ms2Name, linuxTap2IP, linuxTap2IP, + ctx.ExpectWithOffset(1, ctx.TestConnection(ms1Name, ms2Name, linuxTap2IP, linuxTap2IP, 8080, 8080, false, tapv2InputNode)).To(beAllowed) - ExpectWithOffset(1, ctx.TestConnection(ms1Name, ms2Name, linuxTap2IP, linuxTap2IP, + ctx.ExpectWithOffset(1, ctx.TestConnection(ms1Name, ms2Name, linuxTap2IP, linuxTap2IP, 80, 80, false, tapv2InputNode)).To(beAllowed) - ExpectWithOffset(1, ctx.TestConnection(ms2Name, ms1Name, linuxTap1IP, linuxTap1IP, + ctx.ExpectWithOffset(1, ctx.TestConnection(ms2Name, ms1Name, linuxTap1IP, linuxTap1IP, ms2BlockedTCPPort, ms2BlockedTCPPort, false, tapv2InputNode)).To(beAllowed) - ExpectWithOffset(1, ctx.TestConnection(ms2Name, ms1Name, linuxTap1IP, linuxTap1IP, + ctx.ExpectWithOffset(1, ctx.TestConnection(ms2Name, ms1Name, linuxTap1IP, linuxTap1IP, 8080, 8080, false, tapv2InputNode)).To(beAllowed) - ExpectWithOffset(1, ctx.TestConnection(ms2Name, ms1Name, linuxTap1IP, linuxTap1IP, + ctx.ExpectWithOffset(1, ctx.TestConnection(ms2Name, ms1Name, linuxTap1IP, linuxTap1IP, 80, 80, false, tapv2InputNode)).To(beBlocked) // blocked by ms2IngressACL // UDP - ExpectWithOffset(1, ctx.TestConnection(ms1Name, ms2Name, linuxTap2IP, linuxTap2IP, + ctx.ExpectWithOffset(1, ctx.TestConnection(ms1Name, ms2Name, linuxTap2IP, linuxTap2IP, ms1BlockedUDPPort, ms1BlockedUDPPort, true, tapv2InputNode)).To(beAllowed) - ExpectWithOffset(1, ctx.TestConnection(ms1Name, ms2Name, linuxTap2IP, linuxTap2IP, + ctx.ExpectWithOffset(1, ctx.TestConnection(ms1Name, ms2Name, linuxTap2IP, linuxTap2IP, 9999, 9999, true, tapv2InputNode)).To(beAllowed) - ExpectWithOffset(1, ctx.TestConnection(ms2Name, ms1Name, linuxTap1IP, linuxTap1IP, + ctx.ExpectWithOffset(1, ctx.TestConnection(ms2Name, ms1Name, linuxTap1IP, linuxTap1IP, ms1BlockedUDPPort, ms1BlockedUDPPort, true, tapv2InputNode)).To(beBlocked) // blocked by ms1EgressACL - ExpectWithOffset(1, ctx.TestConnection(ms2Name, ms1Name, linuxTap1IP, linuxTap1IP, + ctx.ExpectWithOffset(1, ctx.TestConnection(ms2Name, ms1Name, linuxTap1IP, linuxTap1IP, 9999, 9999, true, tapv2InputNode)).To(beAllowed) } ctx.StartMicroservice(ms1Name) ctx.StartMicroservice(ms2Name) - Expect(vppACLs(ctx)).ShouldNot(SatisfyAny( + ctx.Expect(vppACLs(ctx)).ShouldNot(SatisfyAny( ContainSubstring(showMs1IngressACL), ContainSubstring(showMs1EgressACL), ContainSubstring(showMs2IngressACL), ContainSubstring(showMs2EgressACL))) req := ctx.GenericClient().ChangeRequest() @@ -359,18 +359,18 @@ func TestL3ACLs(t *testing.T) { ms1IngressACL, ms1EgressACL, ms2IngressACL, ms2EgressACL, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction connecting microservices and configuring ACLs failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction connecting microservices and configuring ACLs failed") - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TAP attached to a newly started microservice1 should be eventually configured") - Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TAP attached to a newly started microservice2 should be eventually configured") - Expect(vppACLs(ctx)).Should(SatisfyAll( + ctx.Expect(vppACLs(ctx)).Should(SatisfyAll( ContainSubstring(showMs1IngressACL), ContainSubstring(showMs1EgressACL), ContainSubstring(showMs2IngressACL), ContainSubstring(showMs2EgressACL))) checkAccess(true) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // remove ACL configuration req = ctx.GenericClient().ChangeRequest() @@ -378,13 +378,13 @@ func TestL3ACLs(t *testing.T) { ms1IngressACL, ms1EgressACL, ms2IngressACL, ms2EgressACL, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction removing ACLs failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction removing ACLs failed") - Expect(vppACLs(ctx)).ShouldNot(SatisfyAny( + ctx.Expect(vppACLs(ctx)).ShouldNot(SatisfyAny( ContainSubstring(showMs1IngressACL), ContainSubstring(showMs1EgressACL), ContainSubstring(showMs2IngressACL), ContainSubstring(showMs2EgressACL))) checkAccess(false) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // get back the ACL configuration req = ctx.GenericClient().ChangeRequest() @@ -392,33 +392,33 @@ func TestL3ACLs(t *testing.T) { ms1IngressACL, ms1EgressACL, ms2IngressACL, ms2EgressACL, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Transaction creating ACLs failed") + ctx.Expect(err).ToNot(HaveOccurred(), "Transaction creating ACLs failed") - Expect(vppACLs(ctx)).Should(SatisfyAll( + ctx.Expect(vppACLs(ctx)).Should(SatisfyAll( ContainSubstring(showMs1IngressACL), ContainSubstring(showMs1EgressACL), ContainSubstring(showMs2IngressACL), ContainSubstring(showMs2EgressACL))) checkAccess(true) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") // restart both microservices ctx.StopMicroservice(ms1Name) ctx.StopMicroservice(ms2Name) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated VPP-TAP should be pending") - Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_PENDING), + ctx.Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_PENDING), "Without microservice, the associated VPP-TAP should be pending") ctx.StartMicroservice(ms1Name) ctx.StartMicroservice(ms2Name) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "VPP-TAP attached to a re-started microservice1 should be eventually configured") - Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "VPP-TAP attached to a re-started microservice1 should be eventually configured") - Expect(vppACLs(ctx)).Should(SatisfyAll( + ctx.Expect(vppACLs(ctx)).Should(SatisfyAll( ContainSubstring(showMs1IngressACL), ContainSubstring(showMs1EgressACL), ContainSubstring(showMs2IngressACL), ContainSubstring(showMs2EgressACL))) checkAccess(true) - Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") + ctx.Expect(ctx.AgentInSync()).To(BeTrue(), "Agent is not in-sync") } diff --git a/tests/e2e/070_ipsec_test.go b/tests/e2e/070_ipsec_test.go index b3fa06d61b..46c276ea59 100644 --- a/tests/e2e/070_ipsec_test.go +++ b/tests/e2e/070_ipsec_test.go @@ -132,25 +132,25 @@ func TestIPSec(t *testing.T) { spIn, spOut, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") + ctx.Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") - Eventually(ctx.GetValueStateClb(ipipTun)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(ipipTun)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "IPIP tunnel is not configured") - Eventually(ctx.GetValueStateClb(saOut)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(saOut)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "OUT SA is not configured") - Eventually(ctx.GetValueStateClb(saIn)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(saIn)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "IN SA is not configured") - Eventually(ctx.GetValueStateClb(tp)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(tp)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "tunnel protection is not configured") - Eventually(ctx.GetValueStateClb(spd)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(spd)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "SPD is not configured") - Eventually(ctx.GetValueStateClb(spIn)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(spIn)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "IN SP is not configured") - Eventually(ctx.GetValueStateClb(spOut)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(spOut)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "OUT SP is not configured") if ctx.VppRelease() >= "20.05" { - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } // rekey - delete old SAs, create new SAs and modify tunnel protection @@ -227,29 +227,29 @@ func TestIPSec(t *testing.T) { spInNew, tpNew, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") + ctx.Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") - Eventually(ctx.GetValueStateClb(saOut)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(saOut)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "old OUT SA was not removed") - Eventually(ctx.GetValueStateClb(saIn)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(saIn)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "old IN SA was not removed") - Eventually(ctx.GetValueStateClb(saOutNew)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(saOutNew)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "OUT SA is not configured") - Eventually(ctx.GetValueStateClb(saInNew)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(saInNew)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "IN SA is not configured") - Eventually(ctx.GetValueStateClb(tpNew)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(tpNew)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "tunnel protection is not configured") - Eventually(ctx.GetValueStateClb(spOut)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(spOut)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "old OUT SP was not removed") - Eventually(ctx.GetValueStateClb(spIn)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(spIn)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "old IN SP was not removed") - Eventually(ctx.GetValueStateClb(spOutNew)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(spOutNew)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "OUT SP is not configured") - Eventually(ctx.GetValueStateClb(spInNew)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(spInNew)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "IN SP is not configured") if ctx.VppRelease() >= "20.05" { - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } // delete the tunnel @@ -264,25 +264,25 @@ func TestIPSec(t *testing.T) { spOutNew, spd, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") + ctx.Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") - Eventually(ctx.GetValueStateClb(saOutNew)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(saOutNew)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "OUT SA was not removed") - Eventually(ctx.GetValueStateClb(saInNew)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(saInNew)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "IN SA was not removed") - Eventually(ctx.GetValueStateClb(spOutNew)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(spOutNew)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "OUT SP was not removed") - Eventually(ctx.GetValueStateClb(spInNew)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(spInNew)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "IN SP was not removed") - Eventually(ctx.GetValueStateClb(spd)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(spd)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "SPD was not removed") - Eventually(ctx.GetValueStateClb(tpNew)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(tpNew)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "tunnel protection was not removed") - Eventually(ctx.GetValueStateClb(ipipTun)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(ipipTun)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "IPIP tunnel was not removed") if ctx.VppRelease() >= "20.05" { - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } } @@ -456,39 +456,39 @@ func TestIPSecMultiPoint(t *testing.T) { tp1, tp2, teib1, teib2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") + ctx.Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") - Eventually(ctx.GetValueStateClb(ipipTun)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(ipipTun)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "IPIP tunnel is not configured") - Eventually(ctx.GetValueStateClb(saOut1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(saOut1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "OUT SA 1 is not configured") - Eventually(ctx.GetValueStateClb(saIn1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(saIn1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "IN SA 1 is not configured") - Eventually(ctx.GetValueStateClb(saOut2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(saOut2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "OUT SA 2 is not configured") - Eventually(ctx.GetValueStateClb(saIn2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(saIn2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "IN SA 2 is not configured") - Eventually(ctx.GetValueStateClb(tp1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(tp1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "tunnel protection 1 is not configured") - Eventually(ctx.GetValueStateClb(tp2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(tp2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "tunnel protection 2 is not configured") - Eventually(ctx.GetValueStateClb(teib1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(teib1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TEIB 1 is not configured") - Eventually(ctx.GetValueStateClb(teib2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(teib2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "TEIB 2 is not configured") - Eventually(ctx.GetValueStateClb(spOut1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(spOut1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "OUT SP 1 is not configured") - Eventually(ctx.GetValueStateClb(spIn1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(spIn1)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "IN SP 1 is not configured") - Eventually(ctx.GetValueStateClb(spOut2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(spOut2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "OUT SP 2 is not configured") - Eventually(ctx.GetValueStateClb(spIn2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(spIn2)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "IN SP 2 is not configured") - Eventually(ctx.GetValueStateClb(spd)).Should(Equal(kvscheduler.ValueState_CONFIGURED), + ctx.Eventually(ctx.GetValueStateClb(spd)).Should(Equal(kvscheduler.ValueState_CONFIGURED), "SPD is not configured") if ctx.VppRelease() >= "20.05" { - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } req3 := ctx.GenericClient().ChangeRequest() @@ -499,36 +499,36 @@ func TestIPSecMultiPoint(t *testing.T) { tp1, tp2, teib1, teib2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") + ctx.Expect(err).ToNot(HaveOccurred(), "Sending change request failed with err") - Eventually(ctx.GetValueStateClb(teib1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(teib1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "TEIB 1 was not removed") - Eventually(ctx.GetValueStateClb(teib2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(teib2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "TEIB 2 was not removed") - Eventually(ctx.GetValueStateClb(saOut1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(saOut1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "OUT SA 1 was not removed") - Eventually(ctx.GetValueStateClb(saIn1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(saIn1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "IN SA 1 was not removed") - Eventually(ctx.GetValueStateClb(saOut2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(saOut2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "OUT SA 2 was not removed") - Eventually(ctx.GetValueStateClb(saIn2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(saIn2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "IN SA 2 was not removed") - Eventually(ctx.GetValueStateClb(tp2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(tp2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "tunnel protection 2 was not removed") - Eventually(ctx.GetValueStateClb(tp1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(tp1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "tunnel protection 1 was not removed") - Eventually(ctx.GetValueStateClb(ipipTun)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(ipipTun)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "IPIP tunnel was not removed") - Eventually(ctx.GetValueStateClb(spOut1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(spOut1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "OUT SP 1 was not removed") - Eventually(ctx.GetValueStateClb(spIn1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(spIn1)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "IN SP 1 was not removed") - Eventually(ctx.GetValueStateClb(spOut2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(spOut2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "OUT SP 2 was not removed") - Eventually(ctx.GetValueStateClb(spIn2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), + ctx.Eventually(ctx.GetValueStateClb(spIn2)).Should(Equal(kvscheduler.ValueState_NONEXISTENT), "IN SP 2 was not removed") if ctx.VppRelease() >= "20.05" { - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } } diff --git a/tests/e2e/080_vrf_test.go b/tests/e2e/080_vrf_test.go index 866f6479e8..7fb4cafe19 100644 --- a/tests/e2e/080_vrf_test.go +++ b/tests/e2e/080_vrf_test.go @@ -196,60 +196,60 @@ func TestVRFsWithSameSubnets(t *testing.T) { vrf1VppTap, vrf1LinuxTap, vrf2VppTap, vrf2LinuxTap, ) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vrf1VppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vrf2LinuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vrf2VppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxVrf1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxVrf2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vppVrf1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vppVrf2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vrf1VppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vrf2LinuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vrf2VppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxVrf1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxVrf2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppVrf1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppVrf2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) // vrf mtu check linuxVrf1Mtu := ctx.GetValue(linuxVrf1, kvs.SBView).(*linux_interfaces.Interface).Mtu - Expect(int(linuxVrf1Mtu)).To(SatisfyAny(Equal(vrf.DefaultVrfDevMTU), Equal(vrf.DefaultVrfDevLegacyMTU))) + ctx.Expect(int(linuxVrf1Mtu)).To(SatisfyAny(Equal(vrf.DefaultVrfDevMTU), Equal(vrf.DefaultVrfDevLegacyMTU))) linuxVrf2Mtu := ctx.GetValue(linuxVrf2, kvs.SBView).(*linux_interfaces.Interface).Mtu - Expect(int(linuxVrf2Mtu)).To(SatisfyAny(Equal(vrf.DefaultVrfDevMTU), Equal(vrf.DefaultVrfDevLegacyMTU))) + ctx.Expect(int(linuxVrf2Mtu)).To(SatisfyAny(Equal(vrf.DefaultVrfDevMTU), Equal(vrf.DefaultVrfDevLegacyMTU))) // try to ping in both VRFs - Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).To(Succeed()) - Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // restart microservice ctx.StopMicroservice(msName) - Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) - Eventually(ctx.GetValueStateClb(vrf2LinuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Eventually(ctx.GetValueStateClb(vrf2LinuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) ctx.StartMicroservice(msName) - Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetValueStateClb(vrf2LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).To(Succeed()) - Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(vrf2LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // re-create Linux VRF1 err = ctx.GenericClient().ChangeRequest(). Delete(linuxVrf1).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) - Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).ToNot(Succeed()) - Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).ToNot(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) err = ctx.GenericClient().ChangeRequest().Update( linuxVrf1Updated, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) // vrf 1 mtu re-check linuxVrf1Mtu = ctx.GetValue(linuxVrf1, kvs.SBView).(*linux_interfaces.Interface).Mtu - Expect(linuxVrf1Mtu).To(Equal(vrf1Mtu)) + ctx.Expect(linuxVrf1Mtu).To(Equal(vrf1Mtu)) - Eventually(ctx.PingFromMsClb(msName, vrfVppIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).Should(Succeed()) - Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.PingFromMsClb(msName, vrfVppIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).Should(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vrfVppIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } // @@ -436,49 +436,49 @@ func TestVRFRoutes(t *testing.T) { vrf1VppRoute, vrf2VppRoute, vrf1LinuxRoute, vrf2LinuxRoute, ) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vrf1VppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vrf2LinuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vrf2VppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vrf1VppRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vrf2VppRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vrf1LinuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vrf2LinuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vrf1VppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vrf2LinuxTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vrf2VppTap)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vrf1VppRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vrf2VppRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vrf1LinuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vrf2LinuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) // try to ping across VRFs - Expect(ctx.PingFromMs(msName, vrf2LinuxIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).To(Succeed()) - Expect(ctx.PingFromMs(msName, vrf1LinuxIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.PingFromMs(msName, vrf2LinuxIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vrf1LinuxIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // restart microservice ctx.StopMicroservice(msName) - Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) - Eventually(ctx.GetValueStateClb(vrf2LinuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Eventually(ctx.GetValueStateClb(vrf2LinuxTap)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) ctx.StartMicroservice(msName) - Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetValueStateClb(vrf2LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromMs(msName, vrf2LinuxIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).To(Succeed()) - Expect(ctx.PingFromMs(msName, vrf1LinuxIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(vrf1LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(vrf2LinuxTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromMs(msName, vrf2LinuxIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vrf1LinuxIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // re-create Linux VRF1 err = ctx.GenericClient().ChangeRequest(). Delete(linuxVrf1).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) - Expect(ctx.PingFromMs(msName, vrf2LinuxIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).ToNot(Succeed()) - Expect(ctx.PingFromMs(msName, vrf1LinuxIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).ToNot(Succeed()) + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Expect(ctx.PingFromMs(msName, vrf2LinuxIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).ToNot(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vrf1LinuxIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).ToNot(Succeed()) err = ctx.GenericClient().ChangeRequest().Update( linuxVrf1, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.PingFromMsClb(msName, vrf2LinuxIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).Should(Succeed()) - Expect(ctx.PingFromMs(msName, vrf1LinuxIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Eventually(ctx.PingFromMsClb(msName, vrf2LinuxIP, PingWithSourceInterface(vrf1Label+tapNameSuffix))).Should(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vrf1LinuxIP, PingWithSourceInterface(vrf2Label+tapNameSuffix))).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) } // Test VRF created externally (i.e. not by the agent). @@ -547,92 +547,92 @@ func TestExistingLinuxVRF(t *testing.T) { existingIface1, iface2, ) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) // the referenced VRF with interface does not exist yet - Expect(ctx.GetValueState(existingVrf)).To(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.GetValueState(existingIface1)).To(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.GetValueState(iface2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) // created but not in VRF yet - Expect(ctx.GetDerivedValueState(iface2, iface2InVrfKey)).To(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.GetValueState(existingVrf)).To(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.GetValueState(existingIface1)).To(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.GetValueState(iface2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) // created but not in VRF yet + ctx.Expect(ctx.GetDerivedValueState(iface2, iface2InVrfKey)).To(Equal(kvscheduler.ValueState_PENDING)) ifHandler := ctx.Agent.LinuxInterfaceHandler() // create referenced VRF using netlink (without the interface inside it for now) err = ifHandler.AddVRFDevice(vrfHostName, vrfRT) - Expect(err).To(BeNil()) + ctx.Expect(err).To(BeNil()) err = ifHandler.SetInterfaceUp(vrfHostName) - Expect(err).To(BeNil()) + ctx.Expect(err).To(BeNil()) - Eventually(ctx.GetValueStateClb(existingVrf)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueMetadata(existingVrf, kvs.CachedView)).To( + ctx.Eventually(ctx.GetValueStateClb(existingVrf)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueMetadata(existingVrf, kvs.CachedView)).To( HaveKeyWithValue(BeEquivalentTo("VrfDevRT"), BeEquivalentTo(vrfRT))) - Eventually(ctx.GetDerivedValueStateClb(iface2, iface2InVrfKey)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueMetadata(iface2, kvs.CachedView)).To( + ctx.Eventually(ctx.GetDerivedValueStateClb(iface2, iface2InVrfKey)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueMetadata(iface2, kvs.CachedView)).To( HaveKeyWithValue(BeEquivalentTo("VrfMasterIf"), BeEquivalentTo(vrfName))) - Eventually(ctx.GetDerivedValueStateClb(iface2, ipAddr3Key)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Consistently(ctx.GetValueStateClb(existingIface1)).Should(Equal(kvscheduler.ValueState_PENDING)) + ctx.Eventually(ctx.GetDerivedValueStateClb(iface2, ipAddr3Key)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Consistently(ctx.GetValueStateClb(existingIface1)).Should(Equal(kvscheduler.ValueState_PENDING)) // re-check metadata after resync - Expect(ctx.AgentInSync()).To(BeTrue()) - Expect(ctx.GetValueMetadata(existingVrf, kvs.CachedView)).To( + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.GetValueMetadata(existingVrf, kvs.CachedView)).To( HaveKeyWithValue(BeEquivalentTo("VrfDevRT"), BeEquivalentTo(vrfRT))) - Expect(ctx.GetValueMetadata(iface2, kvs.CachedView)).To( + ctx.Expect(ctx.GetValueMetadata(iface2, kvs.CachedView)).To( HaveKeyWithValue(BeEquivalentTo("VrfMasterIf"), BeEquivalentTo(vrfName))) // create vrfIface1 but do not put it into VRF yet err = ifHandler.AddDummyInterface(vrfIface1HostName) - Expect(err).To(BeNil()) + ctx.Expect(err).To(BeNil()) err = ifHandler.SetInterfaceUp(vrfIface1HostName) - Expect(err).To(BeNil()) + ctx.Expect(err).To(BeNil()) - Eventually(ctx.GetValueStateClb(existingIface1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueMetadata(existingIface1, kvs.CachedView)).To( + ctx.Eventually(ctx.GetValueStateClb(existingIface1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueMetadata(existingIface1, kvs.CachedView)).To( HaveKeyWithValue(BeEquivalentTo("VrfMasterIf"), BeEquivalentTo(vrfName))) - Expect(ctx.GetDerivedValueState(existingIface1, iface1InVrfKey)).To(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.GetDerivedValueState(existingIface1, iface1InVrfKey)).To(Equal(kvscheduler.ValueState_PENDING)) // put interface into VRF (without IPs for now) err = ifHandler.PutInterfaceIntoVRF(vrfIface1HostName, vrfHostName) - Expect(err).To(BeNil()) + ctx.Expect(err).To(BeNil()) - Eventually(ctx.GetDerivedValueStateClb(existingIface1, iface1InVrfKey)). + ctx.Eventually(ctx.GetDerivedValueStateClb(existingIface1, iface1InVrfKey)). Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Consistently(ctx.GetDerivedValueStateClb(existingIface1, ipAddr1Key)). + ctx.Consistently(ctx.GetDerivedValueStateClb(existingIface1, ipAddr1Key)). Should(Equal(kvscheduler.ValueState_PENDING)) - Consistently(ctx.GetDerivedValueStateClb(existingIface1, ipAddr2Key)). + ctx.Consistently(ctx.GetDerivedValueStateClb(existingIface1, ipAddr2Key)). Should(Equal(kvscheduler.ValueState_PENDING)) // re-check metadata after resync - Expect(ctx.AgentInSync()).To(BeTrue()) - Expect(ctx.GetValueMetadata(existingVrf, kvs.CachedView)).To( + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.GetValueMetadata(existingVrf, kvs.CachedView)).To( HaveKeyWithValue(BeEquivalentTo("VrfDevRT"), BeEquivalentTo(vrfRT))) - Expect(ctx.GetValueMetadata(existingIface1, kvs.CachedView)).To( + ctx.Expect(ctx.GetValueMetadata(existingIface1, kvs.CachedView)).To( HaveKeyWithValue(BeEquivalentTo("VrfMasterIf"), BeEquivalentTo(vrfName))) - Expect(ctx.GetValueMetadata(iface2, kvs.CachedView)).To( + ctx.Expect(ctx.GetValueMetadata(iface2, kvs.CachedView)).To( HaveKeyWithValue(BeEquivalentTo("VrfMasterIf"), BeEquivalentTo(vrfName))) // add ipAddr1 ipAddr, _, err := utils.ParseIPAddr(ipAddr1+netMask, nil) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = ifHandler.AddInterfaceIP(vrfIface1HostName, ipAddr) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetDerivedValueStateClb(existingIface1, ipAddr1Key)). + ctx.Eventually(ctx.GetDerivedValueStateClb(existingIface1, ipAddr1Key)). Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Consistently(ctx.GetDerivedValueStateClb(existingIface1, ipAddr2Key)). + ctx.Consistently(ctx.GetDerivedValueStateClb(existingIface1, ipAddr2Key)). Should(Equal(kvscheduler.ValueState_PENDING)) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // add ipAddr2 ipAddr, _, err = utils.ParseIPAddr(ipAddr2+netMask, nil) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = ifHandler.AddInterfaceIP(vrfIface1HostName, ipAddr) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetDerivedValueStateClb(existingIface1, ipAddr1Key)). + ctx.Eventually(ctx.GetDerivedValueStateClb(existingIface1, ipAddr1Key)). Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetDerivedValueStateClb(existingIface1, ipAddr2Key)). + ctx.Eventually(ctx.GetDerivedValueStateClb(existingIface1, ipAddr2Key)). Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) // cleanup req := ctx.GenericClient().ChangeRequest() @@ -641,9 +641,9 @@ func TestExistingLinuxVRF(t *testing.T) { existingIface1, iface2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = ifHandler.DeleteInterface(vrfIface1HostName) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) err = ifHandler.DeleteInterface(vrfHostName) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) } diff --git a/tests/e2e/081_route_test.go b/tests/e2e/081_route_test.go index 8b468fe4bb..2555c4ba77 100644 --- a/tests/e2e/081_route_test.go +++ b/tests/e2e/081_route_test.go @@ -16,14 +16,16 @@ package e2e import ( "context" + "testing" + . "github.com/onsi/gomega" + kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/kvscheduler" linux_interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/linux/interfaces" linux_l3 "go.ligato.io/vpp-agent/v3/proto/ligato/linux/l3" linux_namespace "go.ligato.io/vpp-agent/v3/proto/ligato/linux/namespace" vpp_interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces" - "testing" ) // TestIPv4Routes tests L3 routes in the default VRF and for various scopes @@ -135,17 +137,17 @@ func TestIPv4Routes(t *testing.T) { vppTap2, linuxTap2, subnet1LinuxRoute, subnet2LinuxRoute, ) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTap1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(vppTap2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(linuxTap2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(subnet1LinuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(subnet2LinuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap1)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(vppTap2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(linuxTap2)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(subnet1LinuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(subnet2LinuxRoute)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.AlreadyRunningMicroservice(msName1).Ping("20.0.0.2")).To(Succeed()) - Expect(ctx.AlreadyRunningMicroservice(msName2).Ping("10.0.0.2")).To(Succeed()) + ctx.Expect(ctx.AlreadyRunningMicroservice(msName1).Ping("20.0.0.2")).To(Succeed()) + ctx.Expect(ctx.AlreadyRunningMicroservice(msName2).Ping("10.0.0.2")).To(Succeed()) // keep the current number of routes before the update numLinuxRoutes := ctx.NumValues(&linux_l3.Route{}, kvs.SBView) @@ -154,11 +156,11 @@ func TestIPv4Routes(t *testing.T) { err = ctx.GenericClient().ChangeRequest().Update( subnet2LinuxLinkRoute, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.AlreadyRunningMicroservice(msName1).Ping("20.0.0.2")).NotTo(Succeed()) - Expect(ctx.AlreadyRunningMicroservice(msName2).Ping("10.0.0.2")).NotTo(Succeed()) + ctx.Expect(ctx.AlreadyRunningMicroservice(msName1).Ping("20.0.0.2")).NotTo(Succeed()) + ctx.Expect(ctx.AlreadyRunningMicroservice(msName2).Ping("10.0.0.2")).NotTo(Succeed()) // route count should be unchanged - Expect(ctx.NumValues(&linux_l3.Route{}, kvs.SBView)).To(Equal(numLinuxRoutes)) + ctx.Expect(ctx.NumValues(&linux_l3.Route{}, kvs.SBView)).To(Equal(numLinuxRoutes)) } diff --git a/tests/e2e/100_agentctl_test.go b/tests/e2e/100_agentctl_test.go index c39cf88d6e..a9e58fe9dc 100644 --- a/tests/e2e/100_agentctl_test.go +++ b/tests/e2e/100_agentctl_test.go @@ -16,12 +16,13 @@ package e2e import ( "bufio" + "encoding/json" "os" - "regexp" "strings" "testing" . "github.com/onsi/gomega" + "github.com/onsi/gomega/types" ) func TestAgentCtlCommands(t *testing.T) { @@ -30,15 +31,18 @@ func TestAgentCtlCommands(t *testing.T) { var err error var stdout, stderr string - var matched bool // file created below is required to test `import` action err = createFileWithContent( "/tmp/config1", `config/vpp/v2/interfaces/tap1 {"name":"tap1", "type":"TAP", "enabled":true, "ip_addresses":["10.10.10.10/24"], "tap":{"version": "2"}}`, ) - Expect(err).To(BeNil(), "Failed to create file required by one of the tests") + ctx.Expect(err).To(BeNil(), "Failed to create file required by one of the tests") + type KeyVal struct { + Key string + Value interface{} + } tests := []struct { name string cmd string @@ -48,6 +52,7 @@ func TestAgentCtlCommands(t *testing.T) { expectInStdout string expectReStdout string expectInStderr string + expectJsonKeyVals []KeyVal }{ { name: "Check if executable is present", @@ -122,28 +127,32 @@ func TestAgentCtlCommands(t *testing.T) { expectInStdout: "type: UNDEFINED_TYPE", }, { - name: "Test `generate` action to json", - cmd: "generate vpp.interfaces -f=json", - expectInStdout: `"type": "UNDEFINED_TYPE",`, + name: "Test `generate` action to json", + cmd: "generate vpp.interfaces -f=json", + expectJsonKeyVals: []KeyVal{ + {"type", "UNDEFINED_TYPE"}, + }, }, { - name: "Test `generate` action to json (oneline)", - cmd: "generate vpp.interfaces -f=json --oneline", - expectInStdout: `{"name":"","type":"UNDEFINED_TYPE",`, + name: "Test `generate` action to json (oneline)", + cmd: "generate vpp.interfaces -f=json --oneline", + expectJsonKeyVals: []KeyVal{ + {"type", "UNDEFINED_TYPE"}, + }, }, /*{ - // This test depends on file (/tmp/config1) which was created before. - name: "Test `import` action", - cmd: "import /tmp/config1 --service-label vpp1", - expectErr: true, - expectInStderr: "connecting to Etcd failed", - }, - { - // This test depends on file (/tmp/config1) which was created before. - name: "Test `import` action (grpc)", - cmd: "import /tmp/config1 --service-label vpp1 --grpc", - expectStdout: "importing 1 key vals\n - /vnf-agent/vpp1/config/vpp/v2/interfaces/tap1\nsending via gRPC\n", - },*/ + // This test depends on file (/tmp/config1) which was created before. + name: "Test `import` action", + cmd: "import /tmp/config1 --service-label vpp1", + expectErr: true, + expectInStderr: "connecting to Etcd failed", + }, + { + // This test depends on file (/tmp/config1) which was created before. + name: "Test `import` action (grpc)", + cmd: "import /tmp/config1 --service-label vpp1 --grpc", + expectStdout: "importing 1 key vals\n - /vnf-agent/vpp1/config/vpp/v2/interfaces/tap1\nsending via gRPC\n", + },*/ { name: "Test `kvdb list` action", cmd: "kvdb list", @@ -153,7 +162,7 @@ func TestAgentCtlCommands(t *testing.T) { { name: "Test `log list` action", cmd: "log list", - expectReStdout: `agent\s+info`, + expectReStdout: `agent\s+(trace|debug|info)`, }, { name: "Test `log set` action", @@ -227,50 +236,50 @@ func TestAgentCtlCommands(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - // we need to register again for each subtest - // TODO: remove this after migration to NewWithT - RegisterTestingT(t) + g := NewWithT(t) - stdout, stderr, err = ctx.ExecCmd("agentctl", strings.Split(test.cmd, " ")...) + stdout, stderr, err = ctx.Agent.ExecCmd("agentctl", strings.Split(test.cmd, " ")...) if test.expectErr { - Expect(err).To(Not(BeNil()), - "Command `%s` should fail\n", - test.cmd, - ) + g.Expect(err).To(HaveOccurred(), + "Expected command `%s` to fail\n", test.cmd) } else { - Expect(err).To(BeNil(), - "Command `%s` should not fail. Got err: %v\nStderr:\n%s\n", - test.cmd, err, stderr, - ) + g.Expect(err).ToNot(HaveOccurred(), + "Expected command `%s` not to fail, but failed with err: %v\nStderr:\n%s\n", test.cmd, err, stderr) } // Check STDOUT: if test.expectNotEmptyStdout { - Expect(len(stdout)).To(Not(BeZero()), - "Stdout should not be empty\n", - ) + g.Expect(stdout).ToNot(BeEmpty(), + "Stdout should not be empty\n") } if test.expectStdout != "" { - Expect(stdout).To(Equal(test.expectStdout), - "Expected output not equal stdout", - ) + g.Expect(stdout).To(Equal(test.expectStdout), + "Expected output not equal stdout") } if test.expectInStdout != "" { - Expect(stdout).To(ContainSubstring(test.expectInStdout), + g.Expect(stdout).To(ContainSubstring(test.expectInStdout), "Expected string not found in stdout") } + if test.expectJsonKeyVals != nil { + var data map[string]interface{} + err := json.Unmarshal([]byte(stdout), &data) + if err != nil { + t.Fatal(err) + } + var matchers []types.GomegaMatcher + for _, kv := range test.expectJsonKeyVals { + matchers = append(matchers, HaveKeyWithValue(kv.Key, kv.Value)) + + } + g.Expect(data).To(SatisfyAll(matchers...), "Expected key-value not found in JSON data from stdout") + } if test.expectReStdout != "" { - matched, err = regexp.MatchString(test.expectReStdout, stdout) - Expect(err).To(BeNil()) - Expect(matched).To(BeTrue(), "Expect regexp %q to match stdout "+ - "for command %q, stdout:\n%s", test.expectReStdout, test.cmd, stdout) + g.Expect(stdout).To(MatchRegexp(test.expectReStdout), "Expect regexp %q to match stdout for command %q, stdout:\n%s", test.expectReStdout, test.cmd, stdout) } // Check STDERR: if test.expectInStderr != "" { - Expect(strings.Contains(stderr, test.expectInStderr)).To(BeTrue(), - "Want in stderr: \n%s\nGot stderr: \n%s\n", - test.expectInStderr, stderr, - ) + g.Expect(stderr).To(ContainSubstring(test.expectInStderr), + "Want in stderr: \n%s\nGot stderr: \n%s\n", test.expectInStderr, stderr) } }) } @@ -300,8 +309,8 @@ func TestAgentCtlCommands(t *testing.T) { _, stderr, err := ctx.ExecCmd( "/agentctl", "--debug", "dump", "vpp.interfaces", ) - Expect(err).To(Not(BeNil())) - Expect(strings.Contains(stderr, "rpc error")).To(BeTrue(), +ctx.Expect(err).To(Not(BeNil())) +ctx.Expect(strings.Contains(stderr, "rpc error")).To(BeTrue(), "Want in stderr: \n\"rpc error\"\nGot stderr: \n%s\n", stderr, ) @@ -309,8 +318,8 @@ func TestAgentCtlCommands(t *testing.T) { _, stderr, err = ctx.ExecCmd( "/agentctl", "--debug", "--insecure-tls", "dump", "vpp.interfaces", ) - Expect(err).To(Not(BeNil())) - Expect(strings.Contains(stderr, "rpc error")).To(BeTrue(), +ctx.Expect(err).To(Not(BeNil())) +ctx.Expect(strings.Contains(stderr, "rpc error")).To(BeTrue(), "Want in stderr: \n\"rpc error\"\nGot stderr: \n%s\n", stderr, ) @@ -318,10 +327,10 @@ func TestAgentCtlCommands(t *testing.T) { stdout, stderr, err := ctx.ExecCmd( "/agentctl", "--debug", "--config-dir=/etc/.agentctl", "dump", "vpp.interfaces", ) - Expect(err).To(BeNil(), +ctx.Expect(err).To(BeNil(), "Should not fail. Got err: %v\nStderr:\n%s\n", err, stderr, ) - Expect(len(stdout)).To(Not(BeZero())) +ctx.Expect(len(stdout)).To(Not(BeZero())) }*/ func TestAgentCtlSecureGrpc(t *testing.T) { @@ -349,20 +358,20 @@ func TestAgentCtlSecureGrpc(t *testing.T) { t.Log("Try without any TLS") _, stderr, err := ctx.ExecCmd( "agentctl", "--debug", "dump", "vpp.interfaces") - Expect(err).To(Not(BeNil())) - Expect(stderr).To(ContainSubstring("rpc error"), "Expected string not found in stderr") + ctx.Expect(err).To(Not(BeNil())) + ctx.Expect(stderr).To(ContainSubstring("rpc error"), "Expected string not found in stderr") t.Log("Try with TLS enabled via flag --insecure-tls. Should work because server is not configured to check client certs.") stdout, stderr, err := ctx.ExecCmd( "agentctl", "--debug", "--insecure-tls", "dump", "vpp.interfaces") - Expect(err).To(BeNil(), "Should not fail. Got err: %v\nStderr:\n%s\n", err, stderr) - Expect(len(stdout)).To(Not(BeZero())) + ctx.Expect(err).To(BeNil(), "Should not fail. Got err: %v\nStderr:\n%s\n", err, stderr) + ctx.Expect(len(stdout)).To(Not(BeZero())) t.Log("Try with fully configured TLS via config file") stdout, stderr, err = ctx.ExecCmd( "agentctl", "--debug", "--config=/testdata/agentctl.conf", "dump", "vpp.interfaces") - Expect(err).To(BeNil(), "Should not fail. Got err: %v\nStderr:\n%s\n", err, stderr) - Expect(stdout).ToNot(BeEmpty()) + ctx.Expect(err).To(BeNil(), "Should not fail. Got err: %v\nStderr:\n%s\n", err, stderr) + ctx.Expect(stdout).ToNot(BeEmpty()) } func TestAgentCtlSecureETCD(t *testing.T) { @@ -372,20 +381,20 @@ func TestAgentCtlSecureETCD(t *testing.T) { // test without any TLS t.Run("no TLS", func(t *testing.T) { _, _, err := ctx.ExecCmd("agentctl", "--debug", "kvdb", "list") - Expect(err).To(Not(BeNil())) + ctx.Expect(err).To(Not(BeNil())) }) // test with TLS enabled via flag --insecure-tls, but without cert and key (note: server configured to check those files) t.Run("insecure TLS", func(t *testing.T) { _, _, err := ctx.ExecCmd("agentctl", "--debug", "--insecure-tls", "kvdb", "list") - Expect(err).To(Not(BeNil())) + ctx.Expect(err).To(Not(BeNil())) }) // test with fully configured TLS via config file /*t.Run("fully cofigured TLS", func(t *testing.T) { - _, stderr, err := ctx.ExecCmd("/agentctl", "--debug", "--config-dir=/etc/.agentctl", "kvdb", "list") - Expect(err).To(BeNil(), "Should not fail. Got err: %v\nStderr:\n%s\n", err, stderr) - })*/ + _, stderr, err := ctx.ExecCmd("/agentctl", "--debug", "--config-dir=/etc/.agentctl", "kvdb", "list") + ctx.Expect(err).To(BeNil(), "Should not fail. Got err: %v\nStderr:\n%s\n", err, stderr) + })*/ } func createFileWithContent(path, content string) error { diff --git a/tests/e2e/101_rest_api_test.go b/tests/e2e/101_rest_api_test.go index dd95359dac..8f22b54d51 100644 --- a/tests/e2e/101_rest_api_test.go +++ b/tests/e2e/101_rest_api_test.go @@ -26,15 +26,15 @@ func TestInfoVersionHandler(t *testing.T) { defer ctx.Teardown() version, err := ctx.agentClient.AgentVersion(context.Background()) - Expect(err).ToNot(HaveOccurred()) - Expect(version.App).ToNot(BeEmpty()) - Expect(version.Version).ToNot(BeEmpty()) - Expect(version.GitCommit).ToNot(BeEmpty()) - Expect(version.GitBranch).ToNot(BeEmpty()) - Expect(version.BuildUser).ToNot(BeEmpty()) - Expect(version.BuildHost).ToNot(BeEmpty()) - Expect(version.BuildTime).ToNot(BeZero()) - Expect(version.GoVersion).ToNot(BeEmpty()) - Expect(version.OS).ToNot(BeEmpty()) - Expect(version.Arch).ToNot(BeEmpty()) + ctx.Expect(err).ToNot(HaveOccurred()) + ctx.Expect(version.App).ToNot(BeEmpty()) + ctx.Expect(version.Version).ToNot(BeEmpty()) + ctx.Expect(version.GitCommit).ToNot(BeEmpty()) + ctx.Expect(version.GitBranch).ToNot(BeEmpty()) + ctx.Expect(version.BuildUser).ToNot(BeEmpty()) + ctx.Expect(version.BuildHost).ToNot(BeEmpty()) + ctx.Expect(version.BuildTime).ToNot(BeZero()) + ctx.Expect(version.GoVersion).ToNot(BeEmpty()) + ctx.Expect(version.OS).ToNot(BeEmpty()) + ctx.Expect(version.Arch).ToNot(BeEmpty()) } diff --git a/tests/e2e/120_dns_test.go b/tests/e2e/120_dns_test.go index 3f3bcac086..d1e16b935e 100644 --- a/tests/e2e/120_dns_test.go +++ b/tests/e2e/120_dns_test.go @@ -23,6 +23,7 @@ import ( docker "github.com/fsouza/go-dockerclient" . "github.com/onsi/gomega" + linux_interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/linux/interfaces" linux_iptables "go.ligato.io/vpp-agent/v3/proto/ligato/linux/iptables" vpp_dns "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/dns" @@ -85,6 +86,7 @@ func TestDnsCache(t *testing.T) { if td.SkipAll { t.Skipf("Skipped due to %s", td.SkipReason) } + // test setup td.SetupModifiers = append(td.SetupModifiers, WithCustomVPPAgent()) // need iptables to be installed ctx := Setup(t, td.SetupModifiers...) @@ -95,36 +97,36 @@ func TestDnsCache(t *testing.T) { // configure VPP-Agent container as DNS server vppDNSServer := net.ParseIP(ctx.Agent.IPAddress()) - Expect(vppDNSServer).ShouldNot(BeNil(), "VPP DNS Server container has no IP address") + ctx.Expect(vppDNSServer).ShouldNot(BeNil(), "VPP DNS Server container has no IP address") upstreamDNSServer := td.PublicUpstreamDNSServer if td.PublicUpstreamDNSServer == nil { upstreamDNSServer = net.ParseIP(ctx.DNSServer.IPAddress()) - Expect(upstreamDNSServer).ShouldNot(BeNil(), + ctx.Expect(upstreamDNSServer).ShouldNot(BeNil(), "Local upstream DNS Server container (CoreDNS) has no IP address") } err := configureVPPAgentAsDNSServer(ctx, vppDNSServer, upstreamDNSServer) - Expect(err).ShouldNot(HaveOccurred(), "Configuring changes to VPP-Agent failed with err") + ctx.Expect(err).ShouldNot(HaveOccurred(), "Configuring changes to VPP-Agent failed with err") // Testing resolving DNS query by VPP (it should make request to upstream DNS server) //// Testing A (IPv4) record resolvedIPAddresses, err := ms.Dig(vppDNSServer, td.QueryDomainName, A) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) if td.ExpectedResolvedIPv4Address != nil { - Expect(resolvedIPAddresses).To(ConsistOf([]net.IP{td.ExpectedResolvedIPv4Address})) + ctx.Expect(resolvedIPAddresses).To(ConsistOf([]net.IP{td.ExpectedResolvedIPv4Address})) } else { // external domain have loadbalancers -> can't tell what IP address we get from upstream DNS server - Expect(resolvedIPAddresses).NotTo(BeEmpty()) - Expect(resolvedIPAddresses[0].To4() != nil).Should(BeTrue(), "is not ipv4 address") + ctx.Expect(resolvedIPAddresses).NotTo(BeEmpty()) + ctx.Expect(resolvedIPAddresses[0].To4() != nil).Should(BeTrue(), "is not ipv4 address") } //// Testing AAAA (IPv6) record if !td.SkipAAAARecordCheck { resolvedIPAddresses, err = ms.Dig(vppDNSServer, td.QueryDomainName, AAAA) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) if td.ExpectedResolvedIPv6Address != nil { - Expect(resolvedIPAddresses).To(ConsistOf([]net.IP{td.ExpectedResolvedIPv6Address})) + ctx.Expect(resolvedIPAddresses).To(ConsistOf([]net.IP{td.ExpectedResolvedIPv6Address})) } else { // external domain have loadbalancers -> can't tell what IP address we get from upstream DNS server - Expect(resolvedIPAddresses).NotTo(BeEmpty()) - Expect(resolvedIPAddresses[0].To4() == nil).Should(BeTrue(), "is not ipv6 address") + ctx.Expect(resolvedIPAddresses).NotTo(BeEmpty()) + ctx.Expect(resolvedIPAddresses[0].To4() == nil).Should(BeTrue(), "is not ipv6 address") } } @@ -141,7 +143,7 @@ func TestDnsCache(t *testing.T) { fmt.Sprintf("-j DROP -d %s", upstreamDNSServer.String()), }, } - Expect(ctx.GenericClient().ChangeRequest().Update(blockUpstreamDNSServer). + ctx.Expect(ctx.GenericClient().ChangeRequest().Update(blockUpstreamDNSServer). Send(context.Background())).To(Succeed()) } else { // using local container as DNS server -> the easy way how to block it is to kill it @@ -151,7 +153,7 @@ func TestDnsCache(t *testing.T) { // verify the upstream DNS blocking (without it some mild test/container changes could introduce // silent error when VPP will still access upstream DNS server due to ineffective(or still not // effectively applied) blocking and therefore test of VPP caching will not test the cache at all) - Eventually(func() error { + ctx.Eventually(func() error { _, err := ms.Dig(vppDNSServer, td.UnreachabilityVerificationDomainName, A) return err }, 3*time.Second).Should(HaveOccurred(), @@ -160,23 +162,23 @@ func TestDnsCache(t *testing.T) { // Testing resolving DNS query by VPP from its cache (upstream DNS server requests are blocked) //// Testing A (IPv4) record resolvedIPAddresses, err = ms.Dig(vppDNSServer, td.QueryDomainName, A) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) if td.ExpectedResolvedIPv4Address != nil { - Expect(resolvedIPAddresses).To(ConsistOf([]net.IP{td.ExpectedResolvedIPv4Address})) + ctx.Expect(resolvedIPAddresses).To(ConsistOf([]net.IP{td.ExpectedResolvedIPv4Address})) } else { // external domain have loadbalancers -> can't tell what IP address we get from upstream DNS server - Expect(resolvedIPAddresses).NotTo(BeEmpty()) - Expect(resolvedIPAddresses[0].To4() != nil).Should(BeTrue(), "is not ipv4 address") + ctx.Expect(resolvedIPAddresses).NotTo(BeEmpty()) + ctx.Expect(resolvedIPAddresses[0].To4() != nil).Should(BeTrue(), "is not ipv4 address") } //// Testing AAAA (IPv6) record if !td.SkipAAAARecordCheck { resolvedIPAddresses, err = ms.Dig(vppDNSServer, td.QueryDomainName, AAAA) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) if td.ExpectedResolvedIPv6Address != nil { - Expect(resolvedIPAddresses).To(ConsistOf([]net.IP{td.ExpectedResolvedIPv6Address})) + ctx.Expect(resolvedIPAddresses).To(ConsistOf([]net.IP{td.ExpectedResolvedIPv6Address})) } else { // external domain have loadbalancers -> can't tell what IP address we get from upstream DNS server - Expect(resolvedIPAddresses).NotTo(BeEmpty()) - Expect(resolvedIPAddresses[0].To4() == nil).Should(BeTrue(), "is not ipv6 address") + ctx.Expect(resolvedIPAddresses).NotTo(BeEmpty()) + ctx.Expect(resolvedIPAddresses[0].To4() == nil).Should(BeTrue(), "is not ipv6 address") } } }) diff --git a/tests/e2e/13_dhcp_proxy_test.go b/tests/e2e/13_dhcp_proxy_test.go index 2411a8aa62..b3d2256262 100644 --- a/tests/e2e/13_dhcp_proxy_test.go +++ b/tests/e2e/13_dhcp_proxy_test.go @@ -177,7 +177,7 @@ func TestDhcpProxy(t *testing.T) { dhcpProxies := func() string { output, err := ctx.ExecVppctl("show", "dhcp", "proxy") - Expect(err).ShouldNot(HaveOccurred()) + ctx.Expect(err).ShouldNot(HaveOccurred()) return output } dhcpProxyRegexp := func(vrf int) string { @@ -196,28 +196,28 @@ func TestDhcpProxy(t *testing.T) { dhcpProxy1, dhcpProxy2, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetValueStateClb(linuxTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetValueStateClb(linuxTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetValueStateClb(dhcpProxy1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Eventually(ctx.GetValueStateClb(dhcpProxy2)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromMs(msName, vppTapIP, PingWithSourceInterface(linuxTap1Hostname))).To(Succeed()) - Expect(ctx.PingFromMs(msName, vppTapIP, PingWithSourceInterface(linuxTap2Hostname))).To(Succeed()) - Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Eventually(ctx.GetValueStateClb(vppTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(vppTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(linuxTap1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(linuxTap2)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(dhcpProxy1)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(dhcpProxy2)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.PingFromMs(msName, vppTapIP, PingWithSourceInterface(linuxTap1Hostname))).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, vppTapIP, PingWithSourceInterface(linuxTap2Hostname))).To(Succeed()) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) - Expect(dhcpProxies()).Should(MatchRegexp(dhcpProxyRegexp(vrf1ID))) - Expect(dhcpProxies()).Should(MatchRegexp(dhcpProxyRegexp(vrf2ID))) + ctx.Expect(dhcpProxies()).Should(MatchRegexp(dhcpProxyRegexp(vrf1ID))) + ctx.Expect(dhcpProxies()).Should(MatchRegexp(dhcpProxyRegexp(vrf2ID))) err = ctx.GenericClient().ChangeRequest().Delete( dhcpProxy1, ).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Expect(ctx.AgentInSync()).To(BeTrue()) - Expect(dhcpProxies()).ShouldNot(MatchRegexp(dhcpProxyRegexp(vrf1ID))) - Expect(dhcpProxies()).Should(MatchRegexp(dhcpProxyRegexp(vrf2ID))) + ctx.Expect(ctx.AgentInSync()).To(BeTrue()) + ctx.Expect(dhcpProxies()).ShouldNot(MatchRegexp(dhcpProxyRegexp(vrf1ID))) + ctx.Expect(dhcpProxies()).Should(MatchRegexp(dhcpProxyRegexp(vrf2ID))) } diff --git a/tests/e2e/200_telemetry_test.go b/tests/e2e/200_telemetry_test.go index 7c7b44340b..d5a4273453 100644 --- a/tests/e2e/200_telemetry_test.go +++ b/tests/e2e/200_telemetry_test.go @@ -110,32 +110,32 @@ func TestTelemetryStatsPoller(t *testing.T) { req := ctx.GenericClient().ChangeRequest() err := req.Update(dstTap, dstLinuxTap, spanRx).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(dstTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(dstTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_PENDING)) + ctx.Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_PENDING)) req = ctx.GenericClient().ChangeRequest() err = req.Update(srcTap, srcLinuxTap).Send(context.Background()) - Expect(err).ToNot(HaveOccurred()) + ctx.Expect(err).ToNot(HaveOccurred()) - Eventually(ctx.GetValueStateClb(srcTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Eventually(ctx.GetValueStateClb(srcTap)).Should(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_CONFIGURED)) + ctx.Expect(ctx.GetValueState(spanRx)).To(Equal(kvscheduler.ValueState_CONFIGURED)) - Expect(ctx.PingFromVPP("10.20.1.1")).To(Succeed()) - Expect(ctx.PingFromMs(msName, "10.20.1.2")).To(Succeed()) + ctx.Expect(ctx.PingFromVPP("10.20.1.1")).To(Succeed()) + ctx.Expect(ctx.PingFromMs(msName, "10.20.1.2")).To(Succeed()) pollerClient := configurator.NewStatsPollerServiceClient(ctx.GRPCConn()) t.Run("periodSec=0", func(tt *testing.T) { - RegisterTestingT(tt) + g := NewWithT(tt) stream, err := pollerClient.PollStats(context.Background(), &configurator.PollStatsRequest{ PeriodSec: 0, }) - Expect(err).ToNot(HaveOccurred()) + g.Expect(err).ToNot(HaveOccurred()) maxSeq := uint32(0) n := 0 for { @@ -151,18 +151,18 @@ func TestTelemetryStatsPoller(t *testing.T) { maxSeq = stats.GetPollSeq() } } - Expect(n).To(BeEquivalentTo(3)) - Expect(maxSeq).To(BeEquivalentTo(0)) + g.Expect(n).To(BeEquivalentTo(3)) + g.Expect(maxSeq).To(BeEquivalentTo(0)) }) t.Run("numPolls=1", func(tt *testing.T) { - RegisterTestingT(tt) + g := NewWithT(tt) stream, err := pollerClient.PollStats(context.Background(), &configurator.PollStatsRequest{ NumPolls: 1, PeriodSec: 1, }) - Expect(err).ToNot(HaveOccurred()) + g.Expect(err).ToNot(HaveOccurred()) maxSeq := uint32(0) n := 0 for { @@ -178,19 +178,19 @@ func TestTelemetryStatsPoller(t *testing.T) { maxSeq = stats.GetPollSeq() } } - Expect(n).To(BeEquivalentTo(3)) - Expect(maxSeq).To(BeEquivalentTo(1)) + g.Expect(n).To(BeEquivalentTo(3)) + g.Expect(maxSeq).To(BeEquivalentTo(1)) }) t.Run("numPolls=2", func(tt *testing.T) { - RegisterTestingT(tt) + g := NewWithT(tt) stream, err := pollerClient.PollStats(context.Background(), &configurator.PollStatsRequest{ NumPolls: 2, }) - Expect(err).ToNot(HaveOccurred()) + g.Expect(err).ToNot(HaveOccurred()) _, err = stream.Recv() - Expect(err).To(HaveOccurred()) + g.Expect(err).To(HaveOccurred()) }) } diff --git a/tests/e2e/containerruntime.go b/tests/e2e/containerruntime.go index 907e9114fe..1cadf92877 100644 --- a/tests/e2e/containerruntime.go +++ b/tests/e2e/containerruntime.go @@ -22,8 +22,10 @@ import ( "strings" "time" + "github.com/docker/docker/pkg/stringid" docker "github.com/fsouza/go-dockerclient" "github.com/go-errors/errors" + "github.com/segmentio/textio" "github.com/sirupsen/logrus" ) @@ -68,12 +70,13 @@ func (c *ContainerRuntime) Start(options interface{}) error { return errors.Errorf("can't start %s container due to: %v", c.logIdentity, err) } log = log.WithField("container", c.container.Name) - log = log.WithField("cid", c.container.ID) + log = log.WithField("cid", stringid.TruncateID(c.container.ID)) log.Debugf("container started") // attach logs (using one buffer from testctx -> all logs from all containers are merged together) if opts.AttachLogs { - if err = c.attachLoggingToContainer(c.ctx.outputBuf); err != nil { + logWriter := textio.NewPrefixWriter(c.ctx.outputBuf, fmt.Sprintf("[container::%s/%v] ", c.container.Name, stringid.TruncateID(c.container.ID))) + if err = c.attachLoggingToContainer(logWriter); err != nil { return errors.Errorf("can't attach logging to %s container due to: %v", c.logIdentity, err) } } @@ -109,6 +112,8 @@ func (c *ContainerRuntime) Stop(options ...interface{}) error { // ExecCmd executes command inside docker container func (c *ContainerRuntime) ExecCmd(cmd string, args ...string) (stdout, stderr string, err error) { + c.ctx.Logger.Printf("[container:%v] ExecCmd(%s, %v)", c.container.ID, cmd, args) + opts := docker.CreateExecOptions{ Context: c.ctx.ctx, Container: c.container.ID, @@ -134,19 +139,22 @@ func (c *ContainerRuntime) ExecCmd(cmd string, args ...string) (stdout, stderr s stdout = stdoutBuf.String() stderr = stderrBuf.String() - c.ctx.Logger.Printf("exec: '%s %s':\nstdout: %v\nstderr: %v", - cmd, strings.Join(args, " "), stdout, stderr) + cmdStr := fmt.Sprintf("`%s %s`", cmd, strings.Join(args, " ")) + + c.ctx.Logger.Printf("docker exec: %v:\nstdout(%d): %v\nstderr(%d): %v", cmdStr, len(stdout), stdout, len(stderr), stderr) + if err != nil { - errMsg := fmt.Sprintf("starting of docker exec for command %v failed due to: %v", cmd, err) + errMsg := fmt.Sprintf("exec command %v failed due to: %v", cmdStr, err) c.ctx.Logger.Printf(errMsg) err = errors.Errorf(errMsg) return } if info, er := c.ctx.dockerClient.InspectExec(exec.ID); er != nil { - c.ctx.t.Logf("exec inspect failed (ID %v, Cmd %s)s: %v", exec.ID, cmd, er) + c.ctx.t.Logf("exec inspect failed (ID %v, Cmd %s)s: %v", exec.ID, cmdStr, er) + err = errors.Errorf("inspect exec error: %v", err) } else { - c.ctx.Logger.Printf("exec details (ID %v, Cmd %s): %+v", exec.ID, cmd, info) + c.ctx.Logger.Printf("exec details (ID %v, Cmd %s): %+v", exec.ID, cmdStr, info) if info.ExitCode != 0 { err = errors.Errorf("exec error (exit code %v): %v", info.ExitCode, stderr) } @@ -266,7 +274,7 @@ func (c *ContainerRuntime) attachLoggingToContainer(logOutput io.Writer) error { log := logrus.WithField("name", c.logIdentity) log = log.WithField("container", c.container.Name) - log = log.WithField("cid", c.container.ID) + log = log.WithField("cid", stringid.TruncateID(c.container.ID)) go func() { err := closeWaiter.Wait() diff --git a/tests/e2e/e2e.go b/tests/e2e/e2e.go index 2a05328988..46ed2a9f04 100644 --- a/tests/e2e/e2e.go +++ b/tests/e2e/e2e.go @@ -19,6 +19,7 @@ import ( "context" "flag" "fmt" + "io" "log" "net" "os" @@ -27,11 +28,10 @@ import ( "time" docker "github.com/fsouza/go-dockerclient" - "github.com/golang/protobuf/proto" - . "github.com/onsi/gomega" "github.com/sirupsen/logrus" "go.ligato.io/cn-infra/v2/health/statuscheck/model/status" "google.golang.org/grpc" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/client" "go.ligato.io/vpp-agent/v3/cmd/agentctl/api/types" @@ -40,6 +40,9 @@ import ( kvs "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" nslinuxcalls "go.ligato.io/vpp-agent/v3/plugins/linux/nsplugin/linuxcalls" "go.ligato.io/vpp-agent/v3/proto/ligato/kvscheduler" + + "github.com/onsi/gomega" + . "github.com/onsi/gomega" ) var ( @@ -67,6 +70,8 @@ const ( // TestCtx represents data context fur currently running test type TestCtx struct { + *gomega.WithT + Agent *Agent // the default agent (first agent in multi-agent test scenario) Etcd *Etcd DNSServer *DNSServer @@ -140,20 +145,26 @@ type Diger interface { // NewTest creates new TestCtx for given runnin test func NewTest(t *testing.T) *TestCtx { - RegisterTestingT(t) - // TODO: Do not use global test registration. - // It is now deprecated and you should use NewWithT() instead. - // g := NewWithT(t) - - logrus.Debugf("Environ:\n%v", strings.Join(os.Environ(), "\n")) + g := gomega.NewWithT(t) SetDefaultEventuallyPollingInterval(checkPollingInterval) SetDefaultEventuallyTimeout(checkTimeout) + logrus.Debugf("Environ:\n%v", strings.Join(os.Environ(), "\n")) + outputBuf := new(bytes.Buffer) - logger := log.New(outputBuf, "e2e-test: ", log.Lshortfile|log.Lmicroseconds) + var logW io.Writer + if *debug { + logW = os.Stderr // io.MultiWriter(os.Stderr, outputBuf) + } else { + logW = outputBuf + } + + prefix := fmt.Sprintf("[E2E-TEST::%v] ", t.Name()) + logger := log.New(logW, prefix, log.Lshortfile|log.Lmicroseconds) te := &TestCtx{ + WithT: g, t: t, testDataDir: os.Getenv("TESTDATA_DIR"), testShareDir: defaultTestShareDir, @@ -218,13 +229,13 @@ func Setup(t *testing.T, options ...SetupOptModifier) *TestCtx { // setup DNS server if opt.SetupDNSServer { testCtx.DNSServer, err = NewDNSServer(testCtx, extractDNSOptions(opt)) - Expect(err).ShouldNot(HaveOccurred()) + testCtx.Expect(err).ShouldNot(HaveOccurred()) } // setup Etcd if opt.SetupEtcd { testCtx.Etcd, err = NewEtcd(testCtx, extractEtcdOptions(opt)) - Expect(err).ShouldNot(HaveOccurred()) + testCtx.Expect(err).ShouldNot(HaveOccurred()) } if opt.SetupAgent { @@ -259,7 +270,7 @@ func SetupVPPAgent(testCtx *TestCtx, opts ...AgentOptModifier) { } // wait to agent to start properly - Eventually(testCtx.checkAgentReady, agentInitTimeout, checkPollingInterval).Should(Succeed()) + testCtx.Eventually(testCtx.checkAgentReady, agentInitTimeout, checkPollingInterval).Should(Succeed()) // run initial resync if !options.NoManualInitialResync { diff --git a/tests/e2e/options.go b/tests/e2e/options.go index 003517f855..475bfdcfa2 100644 --- a/tests/e2e/options.go +++ b/tests/e2e/options.go @@ -194,6 +194,7 @@ func DefaultAgentOpt(testCtx *TestCtx, agentName string) *AgentOpt { "INITIAL_LOGLVL=" + logging.DefaultLogger.GetLevel().String(), "ETCD_CONFIG=" + etcdConfig, "GRPC_CONFIG=" + grpcConfig, + "DEBUG=" + os.Getenv("DEBUG"), }, } return opt @@ -291,8 +292,8 @@ func CreateFileOnSharedVolume(ctx *TestCtx, simpleFileName string, fileContent s testName := strings.ReplaceAll(ctx.t.Name(), string(filepath.Separator), "-") filePath, err := filepath.Abs(filepath.Join(ctx.testShareDir, fmt.Sprintf("e2e-test-%v-%v", testName, simpleFileName))) - Expect(err).To(Not(HaveOccurred())) - Expect(ioutil.WriteFile(filePath, []byte(fileContent), 0777)).To(Succeed()) + ctx.Expect(err).To(Not(HaveOccurred())) + ctx.Expect(ioutil.WriteFile(filePath, []byte(fileContent), 0777)).To(Succeed()) // TODO register in context and delete in teardown? this doesn't matter // that much because file names contain unique test names so no file collision can happen diff --git a/tests/integration/run_integration.sh b/tests/integration/run_integration.sh index 40c0f5a548..82e9e63dc4 100755 --- a/tests/integration/run_integration.sh +++ b/tests/integration/run_integration.sh @@ -10,7 +10,8 @@ imgname="vpp-agent-integration-tests" # Compile testing suite go test -c -o ./tests/integration/integration.test \ - -tags 'osusergo netgo integration' \ + -covermode atomic \ + -tags 'osusergo netgo integration' \ -ldflags '-w -s -extldflags "-static"' \ ./tests/integration/... @@ -43,6 +44,7 @@ if docker run -i \ --label io.ligato.vpp-agent.testname="${testname}" \ --env INITIAL_LOGLVL \ --env VPPVER=${vppver:0:5} \ + --volume $(pwd)/report:/reports \ ${DOCKER_ARGS-} \ "${imgname}" ${args[@]:-} then diff --git a/tests/integration/vpp/022_ip_neighbor_test.go b/tests/integration/vpp/022_ip_neighbor_test.go index 64dec79257..aa0ef29abe 100644 --- a/tests/integration/vpp/022_ip_neighbor_test.go +++ b/tests/integration/vpp/022_ip_neighbor_test.go @@ -17,8 +17,8 @@ package vpp import ( "testing" - "github.com/golang/protobuf/proto" "go.ligato.io/cn-infra/v2/logging/logrus" + "google.golang.org/protobuf/encoding/prototext" vpe_vppcalls "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls" netalloc_mock "go.ligato.io/vpp-agent/v3/plugins/netalloc/mock" @@ -70,7 +70,7 @@ func TestIPNeighbor(t *testing.T) { if err != nil { t.Fatal("getting ip neighbor config failed:", err) } - t.Logf("dump config:\n%+v", proto.MarshalTextString(ipneigh)) + t.Logf("dump config:\n%+v", prototext.Format(ipneigh)) if ipneigh.Mode != vpp_l3.IPScanNeighbor_DISABLED { t.Fatal("expected Mode to be DISABLED") } @@ -92,7 +92,7 @@ func TestIPNeighbor(t *testing.T) { if err != nil { t.Fatal("getting ip neighbor config failed:", err) } - t.Logf("dump config:\n%+v", proto.MarshalTextString(ipneigh)) + t.Logf("dump config:\n%+v", prototext.Format(ipneigh)) if ipneigh.Mode != vpp_l3.IPScanNeighbor_IPV4 { t.Fatalf("expected Mode to be IPV4, got %v", ipneigh.Mode) } diff --git a/tests/integration/vpp/130_ipsec_test.go b/tests/integration/vpp/130_ipsec_test.go index aff360ec18..741f8dbf2b 100644 --- a/tests/integration/vpp/130_ipsec_test.go +++ b/tests/integration/vpp/130_ipsec_test.go @@ -18,9 +18,8 @@ import ( "fmt" "testing" - "github.com/golang/protobuf/proto" - "go.ligato.io/cn-infra/v2/logging/logrus" + "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/ifaceidx" ifplugin_vppcalls "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/vppcalls" diff --git a/tests/perf/grpc-perf/main.go b/tests/perf/grpc-perf/main.go index 4f370146b2..901dc2ac60 100644 --- a/tests/perf/grpc-perf/main.go +++ b/tests/perf/grpc-perf/main.go @@ -25,8 +25,6 @@ import ( "sync" "time" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/namsral/flag" "github.com/prometheus/client_golang/prometheus" @@ -36,6 +34,7 @@ import ( "go.ligato.io/cn-infra/v2/infra" "go.ligato.io/cn-infra/v2/logging" "google.golang.org/grpc" + "google.golang.org/protobuf/encoding/protojson" "go.ligato.io/vpp-agent/v3/pkg/version" "go.ligato.io/vpp-agent/v3/proto/ligato/configurator" @@ -215,7 +214,7 @@ func (p *GRPCStressPlugin) setupInitial() { if err != nil { log.Fatalln(err) } - out, _ := (&jsonpb.Marshaler{Indent: " "}).MarshalToString(cfg) + out := protojson.Format(cfg) fmt.Printf("Config:\n %+v\n", out) p.Log.Infof("Requesting dump..") @@ -223,7 +222,7 @@ func (p *GRPCStressPlugin) setupInitial() { if err != nil { log.Fatalln(err) } - fmt.Printf("Dump:\n %+v\n", proto.MarshalTextString(dump)) + fmt.Printf("Dump:\n %+v\n", protojson.Format(dump)) } time.Sleep(time.Second * 1) @@ -290,8 +289,7 @@ func (p *GRPCStressPlugin) runGRPCCreateRedBlackMemifs(client configurator.Confi if err != nil { log.Fatalln(err) } - out, _ := (&jsonpb.Marshaler{Indent: " "}).MarshalToString(cfg) - fmt.Printf("Config:\n %+v\n", out) + fmt.Printf("Config:\n %+v\n", protojson.Format(cfg)) } } @@ -357,8 +355,7 @@ func (p *GRPCStressPlugin) runAllClients() { if err != nil { log.Fatalln(err) } - out, _ := (&jsonpb.Marshaler{Indent: " "}).MarshalToString(cfg) - fmt.Printf("Config:\n %+v\n", out) + fmt.Printf("Config:\n %+v\n", protojson.Format(cfg)) time.Sleep(time.Second * 5) p.Log.Infof("Requesting dump..") @@ -367,7 +364,7 @@ func (p *GRPCStressPlugin) runAllClients() { if err != nil { log.Fatalln(err) } - fmt.Printf("Dump:\n %+v\n", proto.MarshalTextString(dump)) + fmt.Printf("Dump:\n %+v\n", protojson.Format(dump)) } } @@ -442,13 +439,13 @@ func (p *GRPCStressPlugin) runGRPCStressCreate(clientId int, client configurator OutgoingInterface: ipsecTunnelName, } - //p.Log.Infof("Creating %s ... client: %d, tunNum: %d", ipsecTunnelName, clientId, tunNum) + // p.Log.Infof("Creating %s ... client: %d, tunNum: %d", ipsecTunnelName, clientId, tunNum) ifaces = append(ifaces, ipsecTunnel) routes = append(routes, route) } - //p.Log.Infof("Creating %d ifaces & %d routes", len(ifaces), len(routes)) + // p.Log.Infof("Creating %d ifaces & %d routes", len(ifaces), len(routes)) _, err := client.Update(context.Background(), &configurator.UpdateRequest{ Update: &configurator.Config{ From 018e9aeb8f506bc9278e28cef40124f288fae52f Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 19 Jan 2022 11:03:35 +0100 Subject: [PATCH 04/12] Update go to 1.16 in CI workflow Signed-off-by: Ondrej Fabry --- .github/workflows/ci.yml | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 557b68d54c..6acf13a7c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.16 - run: go mod tidy -v - name: Check for changes in go.mod run: | @@ -44,32 +44,16 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: 1.16 - run: | go build -v ./... - -# shellcheck: -# name: shellcheck -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v2 -# - name: shellcheck -# uses: reviewdog/action-shellcheck@v1 -# with: -# github_token: ${{ secrets.github_token }} -# reporter: github-check -# test: -# name: test -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v2 -# - uses: actions/setup-go@v1 -# with: -# go-version: 1.13 -# - name: Install gotestsum -# run: go get gotest.tools/gotestsum@v0.4.0 -# - name: Run tests -# run: | -# eval $(go env) -# mkdir -p ~/junit/ -# ${GOPATH}/bin/gotestsum --junitfile ~/junit/unit-tests.xml -- -short $(go list ./...) + unittest: + name: unit test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v1 + with: + go-version: 1.16 + - run: | + go test -v ./... From b598009f498673f5f41c66c3d614a1dc1a5b2974 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Thu, 20 Jan 2022 11:08:19 +0100 Subject: [PATCH 05/12] Update cn-infra This change drops previously required replaces in go.mod for etcd and grpc. Signed-off-by: Ondrej Fabry --- cmd/agentctl/client/client.go | 2 +- go.mod | 21 +-- go.sum | 284 +++++++++++++++++++++++++--------- 3 files changed, 220 insertions(+), 87 deletions(-) diff --git a/cmd/agentctl/client/client.go b/cmd/agentctl/client/client.go index a1f99fee75..ee95a73e37 100644 --- a/cmd/agentctl/client/client.go +++ b/cmd/agentctl/client/client.go @@ -28,7 +28,7 @@ import ( "git.fd.io/govpp.git/proxy" "github.com/docker/docker/api/types/versions" - "go.etcd.io/etcd/clientv3" + clientv3 "go.etcd.io/etcd/client/v3" "go.ligato.io/cn-infra/v2/db/keyval" "go.ligato.io/cn-infra/v2/db/keyval/etcd" "go.ligato.io/cn-infra/v2/logging" diff --git a/go.mod b/go.mod index a292d07ee5..eaa84f578e 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2 github.com/containerd/containerd v1.4.12 // indirect github.com/coreos/go-iptables v0.4.5 - github.com/coreos/go-semver v0.3.0 // indirect github.com/docker/cli v0.0.0-20190822175708-578ab52ece34 github.com/docker/docker v20.10.12+incompatible github.com/fatih/color v1.10.0 // indirect @@ -20,14 +19,11 @@ require ( github.com/go-errors/errors v1.0.1 github.com/goccy/go-graphviz v0.0.6 github.com/goccy/go-yaml v1.8.0 - github.com/gogo/protobuf v1.3.2 // indirect github.com/google/go-cmp v0.5.6 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/grpc-ecosystem/grpc-gateway v1.11.3 // indirect github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 github.com/jhump/protoreflect v1.10.1 - github.com/jonboulle/clockwork v0.2.2 // indirect github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936 github.com/mitchellh/mapstructure v1.1.2 @@ -38,12 +34,12 @@ require ( github.com/opencontainers/runc v1.0.3 // indirect github.com/pkg/errors v0.9.1 github.com/pkg/profile v1.5.0 - github.com/prometheus/client_golang v1.4.0 + github.com/prometheus/client_golang v1.11.0 github.com/segmentio/textio v1.2.0 github.com/sirupsen/logrus v1.8.1 - github.com/spf13/cobra v0.0.7 - github.com/spf13/pflag v1.0.3 - github.com/spf13/viper v1.4.0 + github.com/spf13/cobra v1.1.3 + github.com/spf13/pflag v1.0.5 + github.com/spf13/viper v1.7.0 github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d github.com/vishvananda/netlink v1.1.0 github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df @@ -51,16 +47,11 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 // indirect - go.etcd.io/etcd v0.5.0-alpha.5.0.20210419091813-4276c3302675 - go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220111104833-05747d9d2783 - go.uber.org/multierr v1.2.0 // indirect + go.etcd.io/etcd/client/v3 v3.5.1 + go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220120095228-fab55b0d3627 golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420 golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 google.golang.org/grpc v1.38.0 google.golang.org/protobuf v1.27.1 gotest.tools/v3 v3.0.3 // indirect ) - -replace google.golang.org/grpc => google.golang.org/grpc v1.27.0 - -replace go.etcd.io/etcd => github.com/coreos/etcd v0.5.0-alpha.5.0.20210419091813-4276c3302675 diff --git a/go.sum b/go.sum index b39b0630fb..997953e81f 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,5 @@ bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= @@ -30,6 +31,7 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -68,18 +70,21 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6 h1:45bxf7AZMwWcqkLzDAQugVEwedisr5nRJ1r+7LYnv0U= github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/miniredis v2.4.5+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= github.com/alicebob/miniredis v2.5.0+incompatible h1:yBHoLpsyjupjz3NL3MhKMVkR41j82Yjf3KFv7ApYzUI= github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/bennyscetbun/jsongo v1.1.0 h1:ZDSks3aLP13jhY139lWaUqZaU8G0tELMohzumut/KDM= github.com/bennyscetbun/jsongo v1.1.0/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -89,6 +94,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boltdb/bolt v1.3.2-0.20180302180052-fd01fc79c553/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= @@ -97,6 +103,9 @@ github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR github.com/bsm/sarama-cluster v2.1.15+incompatible h1:RkV6WiNRnqEEbp81druK8zYhmnIgdOjqSVi0+9Cnl2A= github.com/bsm/sarama-cluster v2.1.15+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= @@ -108,8 +117,16 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4 h1:Lap807SXTH5tri2TivECb/4abUkMZC9zRoLarvcKDqs= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2 h1:tjT4Jp4gxECvsJcYpAMtW2I3YqzBTPuB67OejxXs86s= github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2/go.mod h1:mk5IQ+Y0ZeO87b858TlA645sVcEcbiX6YqP98kt+7+w= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s= @@ -128,22 +145,15 @@ github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v0.5.0-alpha.5.0.20210419091813-4276c3302675 h1:Fzy3ekXL5JFCoG5bndcm97eGExqx3wYU5NEgfulE2uU= -github.com/coreos/etcd v0.5.0-alpha.5.0.20210419091813-4276c3302675/go.mod h1:q+i20RPAmay+xq8LJ3VMOhXCNk4YCk3V7QP91meFavw= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-iptables v0.4.5 h1:DpHb9vJrZQEFMcVLFKAAGMUVX0XoRC0ptCthinRYm38= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/corona10/goimagehash v1.0.2 h1:pUfB0LnsJASMPGEZLj7tGY251vF+qLGqOgEP4rUs6kA= github.com/corona10/goimagehash v1.0.2/go.mod h1:/l9umBhvcHQXVtQO1V6Gp1yD20STawkhRnnX0D1bvVI= @@ -156,7 +166,6 @@ github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/cli v0.0.0-20190822175708-578ab52ece34 h1:H/dVI9lW9zuagcDsmBz2cj8E8paBX5FarjO7oQCpbVA= @@ -169,8 +178,9 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= @@ -179,7 +189,12 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evalphobia/logrus_fluent v0.4.0 h1:uYIgSLezcopy6V7Epr5yIvsnzGqH+bE/62b32xIEe+A= github.com/evalphobia/logrus_fluent v0.4.0/go.mod h1:hasyj+CXm3BDP1YhFk/rnTcjlegyqvkokV9A25cQsaA= @@ -191,6 +206,8 @@ github.com/fluent/fluent-logger-golang v1.3.0 h1:oBolFKS9fY9HReChzaX1RQF5GkdNdBy github.com/fluent/fluent-logger-golang v1.3.0/go.mod h1:2/HCT/jTy78yGyeNGQLGQsjF3zzzAuy6Xlk6FCMV5eU= github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= @@ -201,6 +218,8 @@ github.com/fsouza/go-dockerclient v1.6.6 h1:9e3xkBrVkPb81gzYq23i7iDUEd6sx2ooeJA/ github.com/fsouza/go-dockerclient v1.6.6/go.mod h1:3/oRIWoe7uT6bwtAayj/EmJmepBjeL4pYvt7ZxC7Rnk= github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff h1:zk1wwii7uXmI0znwU+lqg+wFL9G5+vm5I+9rv2let60= github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff/go.mod h1:yUhRXHewUVJ1k89wHKP68xfzk7kwXUx/DV1nx4EBMbw= +github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= @@ -210,8 +229,10 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= @@ -235,14 +256,13 @@ github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keL github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -276,8 +296,9 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -310,30 +331,31 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.11.3 h1:h8+NsYENhxNTuq+dobk3+ODoJtwY4Fu0WQXsxJfL8aM= -github.com/grpc-ecosystem/grpc-gateway v1.11.3/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.12.0 h1:k3y1FYv6nuKyNTqj6w9gXOx5r5CfLj/k/euUeBXj1OY= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= @@ -353,6 +375,7 @@ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHh github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= @@ -361,6 +384,7 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= @@ -368,9 +392,12 @@ github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uG github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.3.0 h1:8+567mCcFDnS5ADl7lrpxPMWiFCElyUEeW0gtj34fMA= github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.6 h1:uuEX1kLR6aoda1TBttmJQKDLZE1Ob7KN0NPdE7EtCDc= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/howeyc/crc16 v0.0.0-20171223171357-2b2a61e366a6 h1:IIVxLyDUYErC950b8kecjoqDet8P5S4lcVRUOM6rdkU= @@ -388,19 +415,23 @@ github.com/jhump/protoreflect v1.10.1/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -408,14 +439,15 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe h1:ewr1srjRCmcQogPQ/NCx6XCk6LGVmsVCc9Y3vvPZj+Y= github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe/go.mod h1:vy1vK6wD6j7xX6O6hXe621WabdtNkou2h7uRtTfRMyg= -github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/maraino/go-mock v0.0.0-20180321183845-4c74c434cd3a/go.mod h1:KpdDhCgE2rvPhsnLbGZ8Uf1QORj6v92FOgFKnCz5CXM= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -423,27 +455,30 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936 h1:kw1v0NlnN+GZcU8Ma8CLF2Zzgjfx95gs3/GN3vYAPpo= github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -464,6 +499,7 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/namsral/flag v1.7.4-pre h1:b2ScHhoCUkbsq0d2C15Mv+VU8bl8hAXV8arnWiOHNZs= github.com/namsral/flag v1.7.4-pre/go.mod h1:OXldTctbM6SWH1K899kPZcf65KxJiD7MsceFUpB5yDo= github.com/nfnt/resize v0.0.0-20160724205520-891127d8d1b5 h1:BvoENQQU+fZ9uukda/RzCAL/191HHwJA5b13R6diVlY= @@ -472,7 +508,6 @@ github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -499,6 +534,7 @@ github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04s github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -523,8 +559,10 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0 h1:YVIb/fVcOTMSqtqZWSKnHpSLBxu8DKgxq8z6RuBZwqI= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -533,18 +571,23 @@ github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -559,27 +602,32 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.7 h1:FfTH+vuMXOas8jmfb5/M7dzEYx7LpcLb7a0LPe34uOU= -github.com/spf13/cobra v0.0.7/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -587,20 +635,22 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tinylib/msgp v1.0.2 h1:DfdQrzQa7Yh2es9SuLkixqxuXS2SxsdYn0KbdrOGWD8= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966 h1:j6JEOq5QWFker+d7mFQYOhjTZonQ7YkLTHm56dbn+yM= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d h1:ggUgChAeyge4NZ4QUw6lhHsVymzwSDJOZcE0s2X8S20= github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d/go.mod h1:tu82oB5W2ykJRVioYsB+IQKcft7ryBr7w12qMBUPyXg= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= @@ -615,7 +665,6 @@ github.com/xeipuuv/gojsonschema v1.1.0 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehp github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -625,10 +674,24 @@ github.com/yuin/gopher-lua v0.0.0-20181031023651-12c4817b42c5/go.mod h1:aEV29Xrm github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 h1:1b6PAtenNyhsmo/NKXVe34h7JEZKva1YB/ne7K7mqKM= github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220111104833-05747d9d2783 h1:8mgVnfYJh106V3jvEC+5+OuyJvf872ORS/pjLXK+9UE= -go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220111104833-05747d9d2783/go.mod h1:DKuJBQLtHDAs9i6ysa5P49cbEX7ddscedE1T6qfot3Q= +go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.1 h1:v28cktvBq+7vGyJXF8G+rWJmj+1XUmMtqcLnH8hDocM= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.1 h1:XIQcHCFSG53bJETYeRJtIxdLv2EWRGxcfzR8lSnTH4E= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.1 h1:vtxYCKWA9x31w0WJj7DdqsHFNjhkigdAnziDtkZb/l4= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v3 v3.5.1 h1:oImGuV5LGKjCqXdjkMHCyWa5OO1gYKCnC/1sgdfj1Uk= +go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= +go.etcd.io/etcd/pkg/v3 v3.5.1 h1:nYifzmtBQ2l91wUQM6aZGGwR/pvpQQyscmS4azm184Q= +go.etcd.io/etcd/pkg/v3 v3.5.1/go.mod h1:Qb9MvSx6rlo+Es8pOvkCQjGf7L8GA+NxrkRcyZ7eGXo= +go.etcd.io/etcd/raft/v3 v3.5.1 h1:nthXrxmATKB9OZ9C64sk3QZaJ1WZ8tmlI0VwzpJSZwg= +go.etcd.io/etcd/raft/v3 v3.5.1/go.mod h1:WIlKzH/rjc54LDZ8SOa7GObrrdX3z96MkP1WDfODBeA= +go.etcd.io/etcd/server/v3 v3.5.1 h1:u8risUH348DmLy2XD3krH/S3GWk2ljuCrs8V3hd4584= +go.etcd.io/etcd/server/v3 v3.5.1/go.mod h1:yBKYw++NWu6ciuWoKuL7UXgGKDP7ICBCuVQrIcYbPdw= +go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220120095228-fab55b0d3627 h1:OX/TwjHTQ2FN4fzx0W6bGU0TkM1CEhqT6Me2hgaETbA= +go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220120095228-fab55b0d3627/go.mod h1:N4rrtufgHchultyJuN8ClAS7szH3IhcfDcC3LX9cRRo= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -637,16 +700,42 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 h1:sO4WKdPAudZGKPcpZT4MJn6JaDmpyLrMPDGGyA1SttE= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/otel v0.20.0 h1:eaP0Fqu7SXHwvjiqDq83zImeehOHX8doTvU9AwXON8g= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0 h1:4kzhXFP+btKm4jwxpjIqjs41A7MakRFUS86bqLHTIw8= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0 h1:JsxtGXd06J8jrnya7fdI/U/MR6yXA5DtbZy+qoHQlr8= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0 h1:c5VRjxCXdQlx1HjzwGdQHzZaVI82b5EbBgOu2ljD92g= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0 h1:7ao1wpzHRVKf0OQ7GIxiQJA6X7DLX9o14gmVon7mMK8= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0 h1:1DL6EXUdcg95gukhuRRvLDO/4X5THh/5dIV52lqtnbw= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.2.0 h1:6I+W7f5VwC5SV9dNrZ3qXrDB9mD0dyGOi/ZJmYw03T4= -go.uber.org/multierr v1.2.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -654,8 +743,9 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -670,6 +760,7 @@ golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMx golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20200119044424-58c23975cae1 h1:5h3ngYt7+vXCDZCup/HkCQgW5XwmSvR/nA2JmJ0RErg= golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -680,6 +771,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -691,10 +783,14 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -702,7 +798,6 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -728,6 +823,7 @@ golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -765,8 +861,10 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -795,6 +893,7 @@ golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -810,9 +909,12 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200610111108-226ff32320da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -825,10 +927,12 @@ golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -842,18 +946,20 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -865,6 +971,8 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -903,6 +1011,7 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4 h1:cVngSRcfgyZCzys3KYOpCFa+4dqX/Oub9tAq00ttGVs= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -933,6 +1042,7 @@ google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.49.0/go.mod h1:BECiH72wsfwUvOVn3+btPD5WHi0LzavZReBndi42L18= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -961,13 +1071,16 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -986,9 +1099,32 @@ google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxH google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20210629200056-84d6f6074151 h1:H/uPzsolsGjhl3CVT6Wb7bK+mf+hmkEvUVu+FBKyNlc= google.golang.org/genproto v0.0.0-20210629200056-84d6f6074151/go.mod h1:yiaVoXHpRzHGyxV3o4DktVWY4mSUErTKaeEOq6C3t3U= -google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc/examples v0.0.0-20220120004855-f93e8e673710/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1010,7 +1146,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= @@ -1019,19 +1154,26 @@ gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8 gopkg.in/go-playground/validator.v9 v9.30.0 h1:Wk0Z37oBmKj9/n+tPyBHZmeL19LaCoK3Qq48VwYENss= gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= @@ -1047,5 +1189,5 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= From 86fba7e06a34bd890ceaaba80e95b8131f088ecb Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Thu, 20 Jan 2022 11:11:40 +0100 Subject: [PATCH 06/12] Tidy up go.mod with go 1.17 Signed-off-by: Ondrej Fabry --- go.mod | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++------ go.sum | 13 -------- 2 files changed, 93 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index eaa84f578e..1e11d1e249 100644 --- a/go.mod +++ b/go.mod @@ -1,19 +1,14 @@ module go.ligato.io/vpp-agent/v3 -go 1.13 +go 1.17 require ( git.fd.io/govpp.git v0.3.6-0.20210810100027-c0da1f2999a6 - github.com/Shopify/sarama v1.20.1 // indirect github.com/alecthomas/jsonschema v0.0.0-20200217214135-7152f22193c9 - github.com/alicebob/miniredis v2.5.0+incompatible // indirect github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2 - github.com/containerd/containerd v1.4.12 // indirect github.com/coreos/go-iptables v0.4.5 github.com/docker/cli v0.0.0-20190822175708-578ab52ece34 github.com/docker/docker v20.10.12+incompatible - github.com/fatih/color v1.10.0 // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/fsouza/go-dockerclient v1.6.6 github.com/ghodss/yaml v1.0.0 github.com/go-errors/errors v1.0.1 @@ -30,8 +25,6 @@ require ( github.com/namsral/flag v1.7.4-pre github.com/olekukonko/tablewriter v0.0.4 github.com/onsi/gomega v1.10.3 - github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/opencontainers/runc v1.0.3 // indirect github.com/pkg/errors v0.9.1 github.com/pkg/profile v1.5.0 github.com/prometheus/client_golang v1.11.0 @@ -43,15 +36,104 @@ require ( github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d github.com/vishvananda/netlink v1.1.0 github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df - github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 - github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 // indirect go.etcd.io/etcd/client/v3 v3.5.1 go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220120095228-fab55b0d3627 golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420 golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 google.golang.org/grpc v1.38.0 google.golang.org/protobuf v1.27.1 +) + +require ( + github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect + github.com/DataDog/zstd v1.3.5 // indirect + github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873 // indirect + github.com/Microsoft/hcsshim v0.8.9 // indirect + github.com/Shopify/sarama v1.20.1 // indirect + github.com/alicebob/miniredis v2.5.0+incompatible // indirect + github.com/armon/go-metrics v0.3.9 // indirect + github.com/bennyscetbun/jsongo v1.1.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect + github.com/bsm/sarama-cluster v2.1.15+incompatible // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f // indirect + github.com/containerd/containerd v1.4.12 // indirect + github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/creack/pty v1.1.11 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.4.0 // indirect + github.com/eapache/go-resiliency v1.1.0 // indirect + github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect + github.com/eapache/queue v1.1.0 // indirect + github.com/evalphobia/logrus_fluent v0.4.0 // indirect + github.com/fatih/color v1.10.0 // indirect + github.com/fluent/fluent-logger-golang v1.3.0 // indirect + github.com/fogleman/gg v1.3.0 // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff // indirect + github.com/go-redis/redis v6.14.2+incompatible // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt v3.2.2+incompatible // indirect + github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/snappy v0.0.3 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/hashicorp/consul/api v1.12.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.1 // indirect + github.com/hashicorp/go-hclog v0.12.0 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/serf v0.9.6 // indirect + github.com/howeyc/crc16 v0.0.0-20171223171357-2b2a61e366a6 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/magiconair/properties v1.8.1 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-runewidth v0.0.7 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/moby/sys/mount v0.1.0 // indirect + github.com/moby/sys/mountinfo v0.4.1 // indirect + github.com/moby/term v0.0.0-20200429084858-129dac9f73f6 // indirect + github.com/morikuni/aec v1.0.0 // indirect + github.com/opencontainers/go-digest v1.0.0-rc1 // indirect + github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/opencontainers/runc v1.0.3 // indirect + github.com/pelletier/go-toml v1.2.0 // indirect + github.com/philhofer/fwd v1.0.0 // indirect + github.com/pierrec/lz4 v2.3.0+incompatible // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.26.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect + github.com/spf13/afero v1.1.2 // indirect + github.com/spf13/cast v1.3.0 // indirect + github.com/spf13/jwalterweatherman v1.0.0 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + github.com/tinylib/msgp v1.0.2 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 // indirect + go.etcd.io/etcd/api/v3 v3.5.1 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.1 // indirect + go.opencensus.io v0.23.0 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.17.0 // indirect + golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 // indirect + golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/genproto v0.0.0-20210629200056-84d6f6074151 // indirect + gopkg.in/ini.v1 v1.51.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gotest.tools/v3 v3.0.3 // indirect ) diff --git a/go.sum b/go.sum index 997953e81f..ea9257769f 100644 --- a/go.sum +++ b/go.sum @@ -83,7 +83,6 @@ github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m1 github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/bennyscetbun/jsongo v1.1.0 h1:ZDSks3aLP13jhY139lWaUqZaU8G0tELMohzumut/KDM= github.com/bennyscetbun/jsongo v1.1.0/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U= @@ -104,7 +103,6 @@ github.com/bsm/sarama-cluster v2.1.15+incompatible h1:RkV6WiNRnqEEbp81druK8zYhmn github.com/bsm/sarama-cluster v2.1.15+incompatible/go.mod h1:r7ao+4tTNXvWm+VRpRJchr2kQhqxgmAp2iEX5W96gMM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -121,11 +119,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4 h1:Lap807SXTH5tri2TivECb/4abUkMZC9zRoLarvcKDqs= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2 h1:tjT4Jp4gxECvsJcYpAMtW2I3YqzBTPuB67OejxXs86s= github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2/go.mod h1:mk5IQ+Y0ZeO87b858TlA645sVcEcbiX6YqP98kt+7+w= @@ -218,7 +213,6 @@ github.com/fsouza/go-dockerclient v1.6.6 h1:9e3xkBrVkPb81gzYq23i7iDUEd6sx2ooeJA/ github.com/fsouza/go-dockerclient v1.6.6/go.mod h1:3/oRIWoe7uT6bwtAayj/EmJmepBjeL4pYvt7ZxC7Rnk= github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff h1:zk1wwii7uXmI0znwU+lqg+wFL9G5+vm5I+9rv2let60= github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff/go.mod h1:yUhRXHewUVJ1k89wHKP68xfzk7kwXUx/DV1nx4EBMbw= -github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -710,7 +704,6 @@ go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85 go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0 h1:4kzhXFP+btKm4jwxpjIqjs41A7MakRFUS86bqLHTIw8= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v0.20.0 h1:JsxtGXd06J8jrnya7fdI/U/MR6yXA5DtbZy+qoHQlr8= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= @@ -725,7 +718,6 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= @@ -771,7 +763,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -783,7 +774,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -858,7 +848,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1011,7 +1000,6 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4 h1:cVngSRcfgyZCzys3KYOpCFa+4dqX/Oub9tAq00ttGVs= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1149,7 +1137,6 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.30.0 h1:Wk0Z37oBmKj9/n+tPyBHZmeL19LaCoK3Qq48VwYENss= gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= From 5240a8c3769af7e993b5d9bce12fd878d5ff2fc8 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Thu, 20 Jan 2022 11:23:01 +0100 Subject: [PATCH 07/12] Update go to 1.17 Signed-off-by: Ondrej Fabry --- .github/workflows/ci.yml | 6 +++--- docker/dev/Dockerfile | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6acf13a7c2..b95536757d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v1 with: - go-version: 1.16 + go-version: 1.17 - run: go mod tidy -v - name: Check for changes in go.mod run: | @@ -44,7 +44,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v1 with: - go-version: 1.16 + go-version: 1.17 - run: | go build -v ./... unittest: @@ -54,6 +54,6 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v1 with: - go-version: 1.16 + go-version: 1.17 - run: | go test -v ./... diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfile index 2e3775eb8e..7b50ad355e 100644 --- a/docker/dev/Dockerfile +++ b/docker/dev/Dockerfile @@ -3,7 +3,7 @@ FROM ${VPP_IMG} AS vppimg RUN dpkg-query -f '${Version}' -W vpp > /vpp/version -FROM golang:1.15 AS verify-binapi +FROM golang:1.17 AS verify-binapi RUN apt-get update && apt-get install -y --no-install-recommends \ patch \ @@ -76,7 +76,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # Install Go -ENV GOLANG_VERSION 1.15.2 +ENV GOLANG_VERSION 1.17.6 RUN set -eux; \ dpkgArch="$(dpkg --print-architecture)"; \ case "${dpkgArch##*-}" in \ From cf96d29da4033be1f75a02b288c084de073419e9 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Mon, 24 Jan 2022 17:38:25 +0100 Subject: [PATCH 08/12] Update cn-infra to master Signed-off-by: Ondrej Fabry --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1e11d1e249..aac20ae037 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df github.com/xeipuuv/gojsonschema v1.1.0 go.etcd.io/etcd/client/v3 v3.5.1 - go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220120095228-fab55b0d3627 + go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220120170329-049260adfdff golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420 golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 google.golang.org/grpc v1.38.0 diff --git a/go.sum b/go.sum index ea9257769f..8b33381dd0 100644 --- a/go.sum +++ b/go.sum @@ -684,8 +684,8 @@ go.etcd.io/etcd/raft/v3 v3.5.1 h1:nthXrxmATKB9OZ9C64sk3QZaJ1WZ8tmlI0VwzpJSZwg= go.etcd.io/etcd/raft/v3 v3.5.1/go.mod h1:WIlKzH/rjc54LDZ8SOa7GObrrdX3z96MkP1WDfODBeA= go.etcd.io/etcd/server/v3 v3.5.1 h1:u8risUH348DmLy2XD3krH/S3GWk2ljuCrs8V3hd4584= go.etcd.io/etcd/server/v3 v3.5.1/go.mod h1:yBKYw++NWu6ciuWoKuL7UXgGKDP7ICBCuVQrIcYbPdw= -go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220120095228-fab55b0d3627 h1:OX/TwjHTQ2FN4fzx0W6bGU0TkM1CEhqT6Me2hgaETbA= -go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220120095228-fab55b0d3627/go.mod h1:N4rrtufgHchultyJuN8ClAS7szH3IhcfDcC3LX9cRRo= +go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220120170329-049260adfdff h1:1b+H5kMrYlCd2M2Zi6Rb5MQ926mN9kxEG36xk82ZN8Y= +go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220120170329-049260adfdff/go.mod h1:N4rrtufgHchultyJuN8ClAS7szH3IhcfDcC3LX9cRRo= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= From 551be03b37cd80c04b18fa354b051e599757f550 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Mon, 24 Jan 2022 18:20:38 +0100 Subject: [PATCH 09/12] Address review comments Signed-off-by: Ondrej Fabry --- client/dynamic_config.go | 27 +++++----- client/local_client.go | 23 ++++---- client/remoteclient/grpc_client.go | 53 +++++++++---------- client/txn.go | 2 +- cmd/agentctl/cli/cli.go | 1 - cmd/agentctl/cli/flags.go | 1 - cmd/agentctl/cli/viper.go | 1 - cmd/agentctl/client/api.go | 3 +- cmd/agentctl/client/errors.go | 7 ++- cmd/agentctl/commands/config.go | 35 +++++------- cmd/agentctl/commands/config_test.go | 1 - cmd/agentctl/commands/generate.go | 3 +- cmd/agentctl/commands/root.go | 3 +- cmd/agentctl/commands/service.go | 6 +-- pkg/models/models.go | 22 +++----- plugins/kvscheduler/internal/utils/record.go | 6 +-- .../localregistry/initfileregistry.go | 48 +++++++---------- plugins/restapi/handlers.go | 34 +++++------- 18 files changed, 113 insertions(+), 163 deletions(-) diff --git a/client/dynamic_config.go b/client/dynamic_config.go index ce01082216..fdab83d663 100644 --- a/client/dynamic_config.go +++ b/client/dynamic_config.go @@ -4,7 +4,6 @@ import ( "fmt" "strings" - "github.com/go-errors/errors" "github.com/goccy/go-yaml" "go.ligato.io/cn-infra/v2/logging/logrus" "google.golang.org/protobuf/encoding/protojson" @@ -93,19 +92,19 @@ func NewDynamicConfig(knownModels []*models.ModelInfo) (*dynamicpb.Message, erro // create dependency registry dependencyRegistry, err := createFileDescRegistry(knownModels) if err != nil { - return nil, errors.Errorf("can't create dependency file descriptor registry due to: %v", err) + return nil, fmt.Errorf("cannot create dependency file descriptor registry due to: %w", err) } // get file descriptor proto for give known models fileDP, rootMsgName, err := createDynamicConfigDescriptorProto(knownModels, dependencyRegistry) if err != nil { - return nil, errors.Errorf("can't create descriptor proto for dynamic config due to: %v", err) + return nil, fmt.Errorf("cannot create descriptor proto for dynamic config due to: %v", err) } // convert file descriptor proto to file descriptor fd, err := protodesc.NewFile(fileDP, dependencyRegistry) if err != nil { - return nil, errors.Errorf("can't convert file descriptor proto to file descriptor due to: %v", err) + return nil, fmt.Errorf("cannot convert file descriptor proto to file descriptor due to: %v", err) } // get descriptor for config root message @@ -204,7 +203,7 @@ func createDynamicConfigDescriptorProto(knownModels []*ModelInfo, dependencyRegi // add proto file dependency for this known model (+ check that it is in dependency file descriptor registry) protoFile, err := ModelOptionFor("protoFile", modelDetail.Options) if err != nil { - error = errors.Errorf("can't retrieve protoFile from model options "+ + error = fmt.Errorf("cannot retrieve protoFile from model options "+ "from model %v due to: %v", modelDetail.ProtoName, err) return } @@ -217,12 +216,12 @@ func createDynamicConfigDescriptorProto(knownModels []*ModelInfo, dependencyRegi // checking dependency registry that should already contain the linked dependency if _, err := dependencyRegistry.FindFileByPath(protoFile); err != nil { if err == protoregistry.NotFound { - error = errors.Errorf("proto file %v need to be referenced in dynamic config, but it "+ + error = fmt.Errorf("proto file %v need to be referenced in dynamic config, but it "+ "is not in dependency registry that was created from file descriptor proto input "+ "(missing in input? check debug output from creating dependency registry) ", protoFile) return } - error = errors.Errorf("can't verify that proto file %v is in "+ + error = fmt.Errorf("cannot verify that proto file %v is in "+ "dependency registry, it is due to: %v", protoFile, err) return } @@ -266,7 +265,7 @@ func DynamicConfigKnownModelFieldNaming(modelDetail *models.ModelInfo) (protoNam // dynamic config (i.e. after json/yaml loading into dynamic config). func DynamicConfigExport(dynamicConfig *dynamicpb.Message) ([]proto.Message, error) { if dynamicConfig == nil { - return nil, errors.Errorf("dynamic config can't be nil") + return nil, fmt.Errorf("dynamic config cannot be nil") } // iterate over config group messages and extract proto message from them @@ -301,17 +300,17 @@ func ExportDynamicConfigStructure(dynamicConfig proto.Message) (string, error) { } b, err := m.Marshal(dynamicConfig) if err != nil { - return "", errors.Errorf("can't marshal dynamic config to json due to: %v", err) + return "", fmt.Errorf("cannot marshal dynamic config to json due to: %v", err) } var jsonObj interface{} err = yaml.UnmarshalWithOptions(b, &jsonObj, yaml.UseOrderedMap()) if err != nil { - return "", errors.Errorf("can't convert dynamic config's json bytes to "+ + return "", fmt.Errorf("cannot convert dynamic config's json bytes to "+ "json struct for yaml marshalling due to: %v", err) } bb, err := yaml.Marshal(jsonObj) if err != nil { - return "", errors.Errorf("can't marshal dynamic config from json to yaml due to: %v", err) + return "", fmt.Errorf("cannot marshal dynamic config from json to yaml due to: %v", err) } return string(bb), nil } @@ -349,16 +348,16 @@ func ModelOptionFor(key string, options []*generic.ModelDetail_Option) (string, for _, option := range options { if option.Key == key { if len(option.Values) == 0 { - return "", errors.Errorf("there is no value for key %v in model options", key) + return "", fmt.Errorf("there is no value for key %v in model options", key) } if strings.TrimSpace(option.Values[0]) == "" { - return "", errors.Errorf("there is no value(only empty string "+ + return "", fmt.Errorf("there is no value(only empty string "+ "after trimming) for key %v in model options", key) } return option.Values[0], nil } } - return "", errors.Errorf("there is no model option with key %v (model options=%+v))", key, options) + return "", fmt.Errorf("there is no model option with key %v (model options=%+v))", key, options) } func existsModelOptionFor(key string, options []*generic.ModelDetail_Option) bool { diff --git a/client/local_client.go b/client/local_client.go index 538c4a5edb..c5c41614d9 100644 --- a/client/local_client.go +++ b/client/local_client.go @@ -17,6 +17,7 @@ package client import ( "context" + "github.com/sirupsen/logrus" "go.ligato.io/cn-infra/v2/datasync/kvdbsync/local" "go.ligato.io/cn-infra/v2/datasync/syncbase" "go.ligato.io/cn-infra/v2/db/keyval" @@ -84,7 +85,7 @@ func (c *client) GetConfig(dsts ...interface{}) error { // TODO the clearIgnoreLayerCount function argument should be a option of generic.Client // (the value 1 generates from dynamic config the same json/yaml output as the hardcoded // configurator.Config and therefore serves for backward compatibility) - util.PlaceProtosIntoProtos(convertToProtoV2(protos), 1, protoDsts...) + util.PlaceProtosIntoProtos(protoMapToList(protos), 1, protoDsts...) } else { util.PlaceProtos(protos, dsts...) } @@ -163,24 +164,20 @@ func (p *txnFactory) NewTxn(resync bool) keyval.ProtoTxn { } func extractProtoMessages(dsts []interface{}) []proto.Message { - protoDsts := make([]proto.Message, 0) + msgs := make([]proto.Message, 0) for _, dst := range dsts { - protoV1Dst, isProtoV1 := dst.(proto.Message) - if isProtoV1 { - protoDsts = append(protoDsts, protoV1Dst) + msg, ok := dst.(proto.Message) + if ok { + msgs = append(msgs, msg) } else { - protoV2Dst, isProtoV2 := dst.(proto.Message) - if isProtoV2 { - protoDsts = append(protoDsts, protoV2Dst) - } else { - break - } + logrus.Debugf("at least one of the %d items is not proto message, but: %#v", len(dsts), dst) + break } } - return protoDsts + return msgs } -func convertToProtoV2(protoMap map[string]proto.Message) []proto.Message { +func protoMapToList(protoMap map[string]proto.Message) []proto.Message { result := make([]proto.Message, 0, len(protoMap)) for _, msg := range protoMap { result = append(result, msg) diff --git a/client/remoteclient/grpc_client.go b/client/remoteclient/grpc_client.go index 862ab48c2e..7d3eeebe0f 100644 --- a/client/remoteclient/grpc_client.go +++ b/client/remoteclient/grpc_client.go @@ -2,9 +2,9 @@ package remoteclient import ( "context" + "fmt" "strings" - "github.com/go-errors/errors" "google.golang.org/grpc" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" @@ -37,7 +37,7 @@ func NewClientGRPC(conn grpc.ClientConnInterface, options ...NewClientOption) (c } for _, option := range options { if err := option(c); err != nil { - return nil, errors.Errorf("can't apply option to newly created GRPC client due to: %v", err) + return nil, fmt.Errorf("cannot apply option to newly created GRPC client due to: %w", err) } } return c, nil @@ -60,29 +60,29 @@ func (c *grpcClient) KnownModels(class string) ([]*client.ModelInfo, error) { for _, modelDetail := range knownModels { protoFilePath, err := client.ModelOptionFor("protoFile", modelDetail.Options) if err != nil { - return nil, errors.Errorf("can't get protoFile from model options of "+ - "known model %v due to: %v", modelDetail.ProtoName, err) + return nil, fmt.Errorf("cannot get protoFile from model options of "+ + "known model %v due to: %w", modelDetail.ProtoName, err) } protoFilePaths[protoFilePath] = struct{}{} } // query meta service for extracted proto files to get their file descriptor protos fileDescProtos := make(map[string]*descriptorpb.FileDescriptorProto) // deduplicaton + data container - for protoFilePath, _ := range protoFilePaths { + for protoFilePath := range protoFilePaths { ctx := context.Background() resp, err := c.meta.ProtoFileDescriptor(ctx, &generic.ProtoFileDescriptorRequest{ FullProtoFileName: protoFilePath, }) if err != nil { - return nil, errors.Errorf("can't retrieve ProtoFileDescriptor "+ - "for proto file %v due to: %v", protoFilePath, err) + return nil, fmt.Errorf("cannot retrieve ProtoFileDescriptor "+ + "for proto file %v due to: %w", protoFilePath, err) } if resp.FileDescriptor == nil { - return nil, errors.Errorf("returned file descriptor proto "+ + return nil, fmt.Errorf("returned file descriptor proto "+ "for proto file %v from meta service can't be nil", protoFilePath) } if resp.FileImportDescriptors == nil { - return nil, errors.Errorf("returned import file descriptors proto "+ + return nil, fmt.Errorf("returned import file descriptors proto "+ "for proto file %v from meta service can't be nil", protoFilePath) } @@ -101,8 +101,8 @@ func (c *grpcClient) KnownModels(class string) ([]*client.ModelInfo, error) { } fileDescriptors, err := toFileDescriptors(fileDescProtosSlice) if err != nil { - return nil, errors.Errorf("can't convert file descriptor protos to file descriptors "+ - "(for dependency registry creation) due to: %v", err) + return nil, fmt.Errorf("cannot convert file descriptor protos to file descriptors "+ + "(for dependency registry creation) due to: %w", err) } // extract all messages from file descriptors @@ -183,7 +183,7 @@ func (c *grpcClient) GetConfig(dsts ...interface{}) error { // TODO the clearIgnoreLayerCount function argument should be a option of generic.Client // (the value 1 generates from dynamic config the same json/yaml output as the hardcoded // configurator.Config and therefore serves for backward compatibility) - util.PlaceProtosIntoProtos(convertToProtoV2(protos), 1, protoDsts...) + util.PlaceProtosIntoProtos(protoMapToList(protos), 1, protoDsts...) } else { util.PlaceProtos(protos, dsts...) } @@ -260,14 +260,14 @@ func UseRemoteRegistry(modelClass string) NewClientOption { // get all remote models knownModels, err := grpcClient.KnownModels(modelClass) if err != nil { - return errors.Errorf("can't retrieve remote models (in UseRemoteRegistry) due to: %w", err) + return fmt.Errorf("cannot retrieve remote models (in UseRemoteRegistry) due to: %w", err) } // fill them into new remote registry and use that registry instead of default local model registry grpcClient.modelRegistry = models.NewRemoteRegistry() for _, knowModel := range knownModels { if _, err := grpcClient.modelRegistry.Register(knowModel, models.ToSpec(knowModel.Spec)); err != nil { - return errors.Errorf("can't register remote known model "+ + return fmt.Errorf("cannot register remote known model "+ "for remote generic client usage due to: %w", err) } } @@ -306,14 +306,14 @@ func toFileDescriptors(fileDescProtos []*descriptorpb.FileDescriptorProto) ([]pr break } if err := reg.RegisterFile(resolvedDep); err != nil { - return nil, errors.Errorf("can't put resolved dependency %v "+ + return nil, fmt.Errorf("cannot put resolved dependency %v "+ "into descriptor registry due to: %v", resolvedDep.Name(), err) } } if allDepsFound { fd, err := protodesc.NewFile(fdp, reg) if err != nil { - return nil, errors.Errorf("can't create file descriptor "+ + return nil, fmt.Errorf("cannot create file descriptor "+ "(from file descriptor proto named %v) due to: %v", *fdp.Name, err) } resolved[fdpName] = fd @@ -323,7 +323,7 @@ func toFileDescriptors(fileDescProtos []*descriptorpb.FileDescriptorProto) ([]pr } } if len(unresolvedFDProtos) > 0 { - return nil, errors.Errorf("can't resolve some FileDescriptorProtos due to missing of "+ + return nil, fmt.Errorf("cannot resolve some FileDescriptorProtos due to missing of "+ "some protos of their imports (FileDescriptorProtos with unresolvable imports: %v)", fileDescriptorProtoMapToString(unresolvedFDProtos)) } @@ -337,7 +337,7 @@ func toFileDescriptors(fileDescProtos []*descriptorpb.FileDescriptorProto) ([]pr func fileDescriptorProtoMapToString(fdps map[string]*descriptorpb.FileDescriptorProto) string { keys := make([]string, 0, len(fdps)) - for key, _ := range fdps { + for key := range fdps { keys = append(keys, key) } return strings.Join(keys, ",") @@ -346,25 +346,20 @@ func fileDescriptorProtoMapToString(fdps map[string]*descriptorpb.FileDescriptor func extractProtoMessages(dsts []interface{}) []proto.Message { protoDsts := make([]proto.Message, 0) for _, dst := range dsts { - protoV1Dst, isProtoV1 := dst.(proto.Message) - if isProtoV1 { - protoDsts = append(protoDsts, proto.Message(protoV1Dst)) + msg, ok := dst.(proto.Message) + if ok { + protoDsts = append(protoDsts, msg) } else { - protoV2Dst, isProtoV2 := dst.(proto.Message) - if isProtoV2 { - protoDsts = append(protoDsts, protoV2Dst) - } else { - break - } + break } } return protoDsts } -func convertToProtoV2(protoMap map[string]proto.Message) []proto.Message { +func protoMapToList(protoMap map[string]proto.Message) []proto.Message { result := make([]proto.Message, 0, len(protoMap)) for _, msg := range protoMap { - result = append(result, proto.Message(msg)) + result = append(result, msg) } return result } diff --git a/client/txn.go b/client/txn.go index c05152bc4f..21c81f1463 100644 --- a/client/txn.go +++ b/client/txn.go @@ -55,7 +55,7 @@ func (t *Txn) FindItem(id string) (model proto.Message, found bool) { return item, ok } -// Items returns map of items defined for the request, +// ListItems returns map of items defined for the request, // where key represents model ID and nil value represents delete. // NOTE: Do not alter the returned map directly. func (t *Txn) ListItems() map[string]proto.Message { diff --git a/cmd/agentctl/cli/cli.go b/cmd/agentctl/cli/cli.go index 36ff8b20e2..b4660107ab 100644 --- a/cmd/agentctl/cli/cli.go +++ b/cmd/agentctl/cli/cli.go @@ -21,7 +21,6 @@ import ( "github.com/docker/cli/cli/streams" "github.com/docker/docker/pkg/term" - "go.ligato.io/cn-infra/v2/logging" "go.ligato.io/vpp-agent/v3/cmd/agentctl/api" diff --git a/cmd/agentctl/cli/flags.go b/cmd/agentctl/cli/flags.go index c081364893..50884c583e 100644 --- a/cmd/agentctl/cli/flags.go +++ b/cmd/agentctl/cli/flags.go @@ -21,7 +21,6 @@ import ( "github.com/sirupsen/logrus" "github.com/spf13/pflag" "github.com/spf13/viper" - "go.ligato.io/cn-infra/v2/logging" "go.ligato.io/vpp-agent/v3/cmd/agentctl/client" diff --git a/cmd/agentctl/cli/viper.go b/cmd/agentctl/cli/viper.go index de879206d5..1aa2f1b404 100644 --- a/cmd/agentctl/cli/viper.go +++ b/cmd/agentctl/cli/viper.go @@ -20,7 +20,6 @@ import ( "github.com/mitchellh/mapstructure" "github.com/spf13/viper" - "go.ligato.io/cn-infra/v2/logging" ) diff --git a/cmd/agentctl/client/api.go b/cmd/agentctl/client/api.go index b4fafc5643..3796c70c9c 100644 --- a/cmd/agentctl/client/api.go +++ b/cmd/agentctl/client/api.go @@ -7,13 +7,14 @@ import ( govppapi "git.fd.io/govpp.git/api" "go.ligato.io/cn-infra/v2/db/keyval" "go.ligato.io/cn-infra/v2/health/probe" + "google.golang.org/grpc" + "go.ligato.io/vpp-agent/v3/client" "go.ligato.io/vpp-agent/v3/cmd/agentctl/api/types" "go.ligato.io/vpp-agent/v3/plugins/kvscheduler/api" "go.ligato.io/vpp-agent/v3/proto/ligato/configurator" "go.ligato.io/vpp-agent/v3/proto/ligato/generic" "go.ligato.io/vpp-agent/v3/proto/ligato/kvscheduler" - "google.golang.org/grpc" ) // APIClient is an interface that clients that talk with a agent server must implement. diff --git a/cmd/agentctl/client/errors.go b/cmd/agentctl/client/errors.go index 6a6d611261..b703f33daf 100644 --- a/cmd/agentctl/client/errors.go +++ b/cmd/agentctl/client/errors.go @@ -1,9 +1,8 @@ package client import ( + "errors" "fmt" - - "github.com/pkg/errors" ) // errConnectionFailed implements an error returned when connection failed. @@ -21,8 +20,8 @@ func (err errConnectionFailed) Error() string { // IsErrConnectionFailed returns true if the error is caused by connection failed. func IsErrConnectionFailed(err error) bool { - _, ok := errors.Cause(err).(errConnectionFailed) - return ok + var connErr *errConnectionFailed + return errors.As(err, &connErr) } // ErrorConnectionFailed returns an error with host in the error message when connection to agent failed. diff --git a/cmd/agentctl/commands/config.go b/cmd/agentctl/commands/config.go index 01bb814bd1..bf7095f3ad 100644 --- a/cmd/agentctl/commands/config.go +++ b/cmd/agentctl/commands/config.go @@ -31,9 +31,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" - - //protoV2 "google.golang.org/protobuf/proto" "go.ligato.io/vpp-agent/v3/client" "go.ligato.io/vpp-agent/v3/cmd/agentctl/api/types" @@ -133,9 +130,9 @@ func newConfigUpdateCommand(cli agentcli.Cli) *cobra.Command { flags.StringVarP(&opts.Format, "format", "f", "", "Format output") flags.BoolVar(&opts.Replace, "replace", false, "Replaces all existing config") // TODO implement waitdone also for generic client - //flags.BoolVar(&opts.WaitDone, "waitdone", false, "Waits until config update is done") + // flags.BoolVar(&opts.WaitDone, "waitdone", false, "Waits until config update is done") // TODO implement transaction output when verbose is used - //flags.BoolVarP(&opts.Verbose, "verbose", "v", false, "Show verbose output") + // flags.BoolVarP(&opts.Verbose, "verbose", "v", false, "Show verbose output") flags.DurationVarP(&opts.Timeout, "timeout", "t", 5*time.Minute, "Timeout for sending updated data") return cmd @@ -144,8 +141,8 @@ func newConfigUpdateCommand(cli agentcli.Cli) *cobra.Command { type ConfigUpdateOptions struct { Format string Replace bool - //WaitDone bool - //Verbose bool + // WaitDone bool + // Verbose bool Timeout time.Duration } @@ -202,12 +199,12 @@ func runConfigUpdate(cli agentcli.Cli, opts ConfigUpdateOptions, args []string) // update/resync configuration if opts.Replace { - if err := c.ResyncConfig(convertToProtoV1(configMessages)...); err != nil { + if err := c.ResyncConfig(configMessages...); err != nil { return fmt.Errorf("resync failed: %v", err) } } else { req := c.ChangeRequest() - req.Update(convertToProtoV1(configMessages)...) + req.Update(configMessages...) if err := req.Send(ctx); err != nil { return fmt.Errorf("send failed: %v", err) } @@ -255,7 +252,7 @@ func runConfigDelete(cli agentcli.Cli, opts ConfigDeleteOptions, args []string) ctx, cancel := context.WithCancel(context.Background()) defer cancel() - client, err := cli.Client().ConfiguratorClient() + c, err := cli.Client().ConfiguratorClient() if err != nil { return err } @@ -283,7 +280,7 @@ func runConfigDelete(cli agentcli.Cli, opts ConfigDeleteOptions, args []string) var data interface{} var header metadata.MD - resp, err := client.Delete(ctx, &configurator.DeleteRequest{ + resp, err := c.Delete(ctx, &configurator.DeleteRequest{ Delete: update, WaitDone: opts.WaitDone, }, grpc.Header(&header)) @@ -320,14 +317,6 @@ func runConfigDelete(cli agentcli.Cli, opts ConfigDeleteOptions, args []string) return nil } -func convertToProtoV1(messages []proto.Message) []proto.Message { - result := make([]proto.Message, 0, len(messages)) - for _, message := range messages { - result = append(result, message) - } - return result -} - func newConfigRetrieveCommand(cli agentcli.Cli) *cobra.Command { var ( opts ConfigRetrieveOptions @@ -354,11 +343,11 @@ func runConfigRetrieve(cli agentcli.Cli, opts ConfigRetrieveOptions) error { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - client, err := cli.Client().ConfiguratorClient() + c, err := cli.Client().ConfiguratorClient() if err != nil { return err } - resp, err := client.Dump(ctx, &configurator.DumpRequest{}) + resp, err := c.Dump(ctx, &configurator.DumpRequest{}) if err != nil { return err } @@ -407,7 +396,7 @@ func runConfigWatch(cli agentcli.Cli, opts ConfigWatchOptions) error { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - client, err := cli.Client().ConfiguratorClient() + c, err := cli.Client().ConfiguratorClient() if err != nil { return err } @@ -418,7 +407,7 @@ func runConfigWatch(cli agentcli.Cli, opts ConfigWatchOptions) error { } var nextIdx uint32 - stream, err := client.Notify(ctx, &configurator.NotifyRequest{ + stream, err := c.Notify(ctx, &configurator.NotifyRequest{ Idx: nextIdx, Filters: filters, }) diff --git a/cmd/agentctl/commands/config_test.go b/cmd/agentctl/commands/config_test.go index 26c261a592..aec1a8cefa 100644 --- a/cmd/agentctl/commands/config_test.go +++ b/cmd/agentctl/commands/config_test.go @@ -53,7 +53,6 @@ func Test_prepareNotifyFilters(t *testing.T) { } for i, n := range got { if !proto.Equal(n, tt.want[i]) { - //if !reflect.DeepEqual(got, tt.want) { t.Errorf("prepareNotifyFilters()[%d] = %v, want %v", i, n, tt.want[i]) } } diff --git a/cmd/agentctl/commands/generate.go b/cmd/agentctl/commands/generate.go index ad2d622e8b..09faadfd65 100644 --- a/cmd/agentctl/commands/generate.go +++ b/cmd/agentctl/commands/generate.go @@ -121,8 +121,7 @@ func runGenerate(cli agentcli.Cli, opts GenerateOptions) error { if err != nil { return fmt.Errorf("encoding to json failed: %v", err) } - out = string(b) - b, err = yaml.JSONToYAML([]byte(out)) + b, err = yaml.JSONToYAML(b) if err != nil { return fmt.Errorf("encoding to yaml failed: %v", err) } diff --git a/cmd/agentctl/commands/root.go b/cmd/agentctl/commands/root.go index e26dbd625e..95421063d6 100644 --- a/cmd/agentctl/commands/root.go +++ b/cmd/agentctl/commands/root.go @@ -24,7 +24,6 @@ import ( "github.com/common-nighthawk/go-figure" "github.com/docker/docker/pkg/term" - "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" "go.ligato.io/cn-infra/v2/agent" @@ -216,7 +215,7 @@ var helpCommand = &cobra.Command{ RunE: func(c *cobra.Command, args []string) error { cmd, args, e := c.Root().Find(args) if cmd == nil || e != nil || len(args) > 0 { - return errors.Errorf("unknown help topic: %v", strings.Join(args, " ")) + return fmt.Errorf("unknown help topic: %v", strings.Join(args, " ")) } helpFunc := cmd.HelpFunc() helpFunc(cmd, args) diff --git a/cmd/agentctl/commands/service.go b/cmd/agentctl/commands/service.go index bd34635281..7f3b2c0154 100644 --- a/cmd/agentctl/commands/service.go +++ b/cmd/agentctl/commands/service.go @@ -18,6 +18,7 @@ import ( "bytes" "context" "encoding/json" + "errors" "fmt" "strings" "time" @@ -25,7 +26,6 @@ import ( "github.com/ghodss/yaml" "github.com/jhump/protoreflect/dynamic" "github.com/jhump/protoreflect/grpcreflect" - "github.com/pkg/errors" "github.com/spf13/cobra" ref "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" "google.golang.org/grpc/status" @@ -78,7 +78,7 @@ func runServiceList(cli agentcli.Cli, opts ServiceListOptions) error { services, err := c.ListServices() if err != nil { msg := status.Convert(err).Message() - return errors.Wrapf(err, "listing services failed: %v", msg) + return fmt.Errorf("listing services failed: %v: %w", msg, err) } for _, srv := range services { @@ -144,7 +144,7 @@ func runServiceCall(cli agentcli.Cli, opts ServiceCallOptions) error { svc, err := c.ResolveService(opts.Service) if err != nil { msg := status.Convert(err).Message() - return errors.Wrapf(err, "resolving service failed: %v", msg) + return fmt.Errorf("resolving service failed: %v: %w", msg, err) } m := svc.FindMethodByName(opts.Method) diff --git a/pkg/models/models.go b/pkg/models/models.go index 0e88e3da56..34a0cfc1c7 100644 --- a/pkg/models/models.go +++ b/pkg/models/models.go @@ -15,11 +15,11 @@ package models import ( + "fmt" "path" "reflect" "strings" - "github.com/go-errors/errors" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoimpl" @@ -102,14 +102,14 @@ func GetKeyUsingModelRegistry(message proto.Message, modelRegistry Registry) (st // find model for message model, err := GetModelFromRegistryFor(message, modelRegistry) if err != nil { - return "", errors.Errorf("can't find known model "+ - "for message (while getting key for model) due to: %v (message = %+v)", err, message) + return "", fmt.Errorf("cannot find known model "+ + "for message (while getting key for model) due to: %w (message = %+v)", err, message) } // compute Item.ID.Name name, err := model.InstanceName(message) if err != nil { - return "", errors.Errorf("can't compute model instance name due to: %v (message %+v)", err, message) + return "", fmt.Errorf("cannot compute model instance name due to: %v (message %+v)", err, message) } key := path.Join(model.KeyPrefix(), name) @@ -151,12 +151,12 @@ func DynamicLocallyKnownMessageToGeneratedMessage(dynamicMessage *dynamicpb.Mess // get go type of statically generated proto message corresponding to locally known dynamic message model, err := GetModelFor(dynamicMessage) if err != nil { - return nil, errors.Errorf("can't get model "+ - "for dynamic message due to: %v (message=%v)", err, dynamicMessage) + return nil, fmt.Errorf("can't get model "+ + "for dynamic message due to: %w (message=%v)", err, dynamicMessage) } goType := model.LocalGoType() // only for locally known models will return meaningful go type if goType == nil { - return nil, errors.Errorf("dynamic messages for remote models are not supported due to "+ + return nil, fmt.Errorf("dynamic messages for remote models are not supported due to "+ "not available go type of statically generated proto message (dynamic message=%v)", dynamicMessage) } @@ -168,14 +168,6 @@ func DynamicLocallyKnownMessageToGeneratedMessage(dynamicMessage *dynamicpb.Mess registeredGoType = reflect.Zero(goType).Interface() } - /*message, isProtoV2 := registeredGoType.(protoreflect.ProtoMessage) - if !isProtoV2 { - messageV1, isProtoV1 := registeredGoType.(protoiface.MessageV1) - if !isProtoV1 { - return nil, errors.Errorf("registered go type(%T) is not proto.Message", registeredGoType) - } - message = protoimpl.X.ProtoMessageV2Of(messageV1) - }*/ message := protoMessageOf(registeredGoType) // fill empty statically-generated proto message with data from its dynamic proto message counterpart diff --git a/plugins/kvscheduler/internal/utils/record.go b/plugins/kvscheduler/internal/utils/record.go index f1dcb5d5d1..6d6a27c53b 100644 --- a/plugins/kvscheduler/internal/utils/record.go +++ b/plugins/kvscheduler/internal/utils/record.go @@ -35,8 +35,8 @@ type ProtoWithName struct { ProtoMsgData string } -// MarshalJSON marshalls proto message using the marshaller from jsonpb. -// The jsonpb package produces a different output than the standard "encoding/json" +// MarshalJSON marshalls proto message using the marshaller from protojson. +// The protojson package produces a different output than the standard "encoding/json" // package, which does not operate correctly on protocol buffers. func (p *RecordedProtoMessage) MarshalJSON() ([]byte, error) { var ( @@ -50,7 +50,7 @@ func (p *RecordedProtoMessage) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - msgData = string(b) // protov1.CompactTextString(protov1.MessageV1(p.Message)) + msgData = string(b) } pwn, err := json.Marshal(ProtoWithName{ ProtoMsgName: msgName, diff --git a/plugins/orchestrator/localregistry/initfileregistry.go b/plugins/orchestrator/localregistry/initfileregistry.go index b68c2ec500..9666722d1c 100644 --- a/plugins/orchestrator/localregistry/initfileregistry.go +++ b/plugins/orchestrator/localregistry/initfileregistry.go @@ -15,12 +15,12 @@ package localregistry import ( + "fmt" "io/ioutil" "os" "path/filepath" yaml2 "github.com/ghodss/yaml" - "github.com/go-errors/errors" "go.ligato.io/cn-infra/v2/config" "go.ligato.io/cn-infra/v2/datasync" "go.ligato.io/cn-infra/v2/datasync/kvdbsync/local" @@ -118,7 +118,7 @@ func (r *InitFileRegistry) Init() error { func (r *InitFileRegistry) Empty() bool { if !r.initialized { // could be called from init of other plugins -> possibly before this plugin init if err := r.initialize(); err != nil { - r.Log.Errorf("can't initialize InitFileRegistry due to: %v", err) + r.Log.Errorf("cannot initialize InitFileRegistry due to: %v", err) } } return len(r.preloadedNBConfigs) == 0 @@ -151,7 +151,7 @@ func (r *InitFileRegistry) initialize() error { if !r.config.DisableInitialConfiguration { // preload NB config data from file if err := r.preloadNBConfigs(r.config.InitialConfigurationFilePath); err != nil { - return errors.Errorf("can't preload initial NB configuration from file due to: %v", err) + return fmt.Errorf("cannot preload initial NB configuration from file due to: %w", err) } if len(r.preloadedNBConfigs) != 0 { // watch for resync.DefaultPlugin.DoResync() that will trigger pushing of preloaded @@ -165,24 +165,24 @@ func (r *InitFileRegistry) initialize() error { // retrieveConfig loads InitFileRegistry plugin configuration file. func (r *InitFileRegistry) retrieveConfig() (*Config, error) { - config := &Config{ + cfg := &Config{ // default configuration DisableInitialConfiguration: false, InitialConfigurationFilePath: defaultInitFilePath, } - found, err := r.Cfg.LoadValue(config) + found, err := r.Cfg.LoadValue(cfg) if !found { if err == nil { r.Log.Debug("InitFileRegistry plugin config not found") } else { - r.Log.Debugf("InitFileRegistry plugin config can't be loaded due to: %v", err) + r.Log.Debugf("InitFileRegistry plugin config cannot be loaded due to: %v", err) } - return config, err + return cfg, err } if err != nil { return nil, err } - return config, err + return cfg, err } // watchNBResync will watch to default resync plugin's resync call(resync.DefaultPlugin.DoResync()) and will @@ -202,7 +202,7 @@ func (r *InitFileRegistry) watchResync(resyncReg resync.Registration) { c := client.NewClient(&txnFactory{r.watchedRegistry}, &orchestrator.DefaultPlugin) if err := c.ResyncConfig(r.preloadedNBConfigs...); err != nil { r.Log.Errorf("resyncing preloaded NB init file data "+ - "into watched registry failed: %v", err) + "into watched registry failed: %w", err) } } r.pushedToWatchedRegistry = true @@ -232,7 +232,7 @@ func (r *InitFileRegistry) preloadNBConfigs(filePath string) error { // read data from file b, err := ioutil.ReadFile(filePath) if err != nil { - return errors.Errorf("problem reading file %s: %w", filePath, err) + return fmt.Errorf("problem reading file %s: %w", filePath, err) } // create dynamic config (using it instead of configurator.Config because it can hold also models defined @@ -240,33 +240,33 @@ func (r *InitFileRegistry) preloadNBConfigs(filePath string) error { // additional properly registered configuration models) knownModels, err := client.LocalClient.KnownModels("config") // locally registered models if err != nil { - return errors.Errorf("can't get registered models: %w", err) + return fmt.Errorf("cannot get registered models: %w", err) } - config, err := client.NewDynamicConfig(knownModels) + cfg, err := client.NewDynamicConfig(knownModels) if err != nil { - return errors.Errorf("can't create dynamic config due to: %w", err) + return fmt.Errorf("cannot create dynamic config due to: %w", err) } // filling dynamically created config with data from NB init file bj, err := yaml2.YAMLToJSON(b) if err != nil { - return errors.Errorf("can't converting to JSON: %w", err) + return fmt.Errorf("cannot converting to JSON: %w", err) } - err = protojson.Unmarshal(bj, config) + err = protojson.Unmarshal(bj, cfg) if err != nil { - return errors.Errorf("can't unmarshall init file data into dynamic config due to: %v", err) + return fmt.Errorf("cannot unmarshall init file data into dynamic config due to: %w", err) } // extracting proto messages from dynamic config structure // (generic client wants single proto messages and not one big hierarchical config) - configMessages, err := client.DynamicConfigExport(config) + configMessages, err := client.DynamicConfigExport(cfg) if err != nil { - return errors.Errorf("can't extract single init configuration proto messages "+ - "from one big configuration proto message due to: %v", err) + return fmt.Errorf("cannot extract single init configuration proto messages "+ + "from one big configuration proto message due to: %w", err) } // remember extracted data for later push to watched registry - r.preloadedNBConfigs = convertToProtoV1(configMessages) + r.preloadedNBConfigs = configMessages return nil } @@ -281,11 +281,3 @@ func (p *txnFactory) NewTxn(resync bool) keyval.ProtoTxn { } return local.NewProtoTxn(p.registry.PropagateChanges) } - -func convertToProtoV1(messages []proto.Message) []proto.Message { - result := make([]proto.Message, 0, len(messages)) - for _, message := range messages { - result = append(result, message.ProtoReflect().Interface()) - } - return result -} diff --git a/plugins/restapi/handlers.go b/plugins/restapi/handlers.go index 0a083f83dc..a130a10640 100644 --- a/plugins/restapi/handlers.go +++ b/plugins/restapi/handlers.go @@ -19,6 +19,7 @@ package restapi import ( "bytes" "context" + "errors" "fmt" "io/ioutil" "net/http" @@ -26,7 +27,6 @@ import ( "strings" yaml2 "github.com/ghodss/yaml" - "github.com/go-errors/errors" "github.com/goccy/go-yaml" "github.com/unrolled/render" "go.ligato.io/cn-infra/v2/logging/logrus" @@ -79,7 +79,7 @@ const ( var ( // ErrHandlerUnavailable represents error returned when particular // handler is not available - ErrHandlerUnavailable = errors.New("Handler is not available") + ErrHandlerUnavailable = errors.New("handler is not available") ) func (p *Plugin) registerInfoHandlers() { @@ -493,7 +493,7 @@ func allFileDescriptorProtos(knownModels []*client.ModelInfo) []*descriptorpb.Fi // versionHandler returns version of Agent. func (p *Plugin) versionHandler(formatter *render.Render) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { - version := types.Version{ + ver := types.Version{ App: version.App(), Version: version.Version(), GitCommit: version.GitCommit(), @@ -505,7 +505,7 @@ func (p *Plugin) versionHandler(formatter *render.Render) http.HandlerFunc { OS: runtime.GOOS, Arch: runtime.GOARCH, } - p.logError(formatter.JSON(w, http.StatusOK, version)) + p.logError(formatter.JSON(w, http.StatusOK, ver)) } } @@ -556,7 +556,7 @@ func (p *Plugin) validationHandler(formatter *render.Render) http.HandlerFunc { } // run Descriptor validators on config messages - err = p.KVScheduler.ValidateSemantically(convertToProtoV1(configMessages)) + err = p.KVScheduler.ValidateSemantically(configMessages) if err != nil { if validationErrors, ok := err.(*kvscheduler.InvalidMessagesError); ok { convertedValidationErrors := p.ConvertValidationErrorOutput(validationErrors, knownModels, config) @@ -663,9 +663,9 @@ func (p *Plugin) ConvertValidationErrorOutput(validationErrors *kvscheduler.Inva json, err := protojson.Marshal(messageError.ParentMessage()) if err == nil { parentConfigPart = string(json) - yaml, err := yaml2.JSONToYAML(json) + b, err := yaml2.JSONToYAML(json) if err == nil { - parentConfigPart = string(yaml) + parentConfigPart = string(b) } } } @@ -676,9 +676,9 @@ func (p *Plugin) ConvertValidationErrorOutput(validationErrors *kvscheduler.Inva json, err := protojson.Marshal(messageError.Message()) if err == nil { configPart = string(json) - yaml, err := yaml2.JSONToYAML(json) + b, err := yaml2.JSONToYAML(json) if err == nil { - configPart = string(yaml) + configPart = string(b) } } @@ -722,14 +722,6 @@ func (p *Plugin) ConvertValidationErrorOutput(validationErrors *kvscheduler.Inva return convertedValidationErrors } -func convertToProtoV1(messages []proto.Message) []proto.Message { - result := make([]proto.Message, 0, len(messages)) - for _, message := range messages { - result = append(result, message.ProtoReflect().Interface()) - } - return result -} - // configurationGetHandler returns NB configuration of VPP-Agent in yaml format as used by agentctl. func (p *Plugin) configurationGetHandler(formatter *render.Render) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { @@ -891,13 +883,13 @@ func (p *Plugin) configurationUpdateHandler(formatter *render.Render) http.Handl // create context for data push ctx := context.Background() - //// FullResync + // // FullResync if _, found := req.URL.Query()[URLReplaceParamName]; found { ctx = kvs.WithResync(ctx, kvs.FullResync, true) } - //// Note: using "grpc" data source so that 'agentctl update --replace' can also work with this data - //// ('agentctl update' can change data also from non-grpc data sources, but - //// 'agentctl update --replace' (=resync) can't) + // // Note: using "grpc" data source so that 'agentctl update --replace' can also work with this data + // // ('agentctl update' can change data also from non-grpc data sources, but + // // 'agentctl update --replace' (=resync) can't) ctx = contextdecorator.DataSrcContext(ctx, "grpc") // config data pushed into VPP-Agent From b8ce289a474b215174cf40b774ad1e72af1515fa Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 26 Jan 2022 09:38:37 +0100 Subject: [PATCH 10/12] Remove commented code Signed-off-by: Ondrej Fabry --- pkg/models/item.go | 1 - proto/ligato/kvscheduler/value_status.go | 16 ---------------- proto/ligato/linux/interfaces/models.go | 18 ------------------ proto/ligato/vpp/interfaces/models.go | 18 ------------------ 4 files changed, 53 deletions(-) diff --git a/pkg/models/item.go b/pkg/models/item.go index 348fa7bcd4..8ce5dce188 100644 --- a/pkg/models/item.go +++ b/pkg/models/item.go @@ -105,7 +105,6 @@ func unmarshalItemDataAnyOfRemoteModel(itemAny *anypb.Any, msgTypeResolver *prot // The unmarshalled proto.Message will have the go type of model generated go structures (that is due to // go type registering in init() method of generated go structures file). func unmarshalItemDataAnyOfLocalModel(itemAny *anypb.Any) (proto.Message, error) { - // var any types.DynamicAny m, err := anypb.UnmarshalNew(itemAny, proto.UnmarshalOptions{}) if err != nil { return nil, err diff --git a/proto/ligato/kvscheduler/value_status.go b/proto/ligato/kvscheduler/value_status.go index 2f6f9367e5..7cadeb2784 100644 --- a/proto/ligato/kvscheduler/value_status.go +++ b/proto/ligato/kvscheduler/value_status.go @@ -18,22 +18,6 @@ import ( "encoding/json" ) -/* -// MarshalJSON ensures data is correctly marshaled -func (m ValueStatus) MarshalJSON() ([]byte, error) { - marshaller := &jsonpb.Marshaler{} - var buf bytes.Buffer - if err := marshaller.Marshal(&buf, &m); err != nil { - return nil, err - } - return buf.Bytes(), nil -} - -// UnmarshalJSON ensures that data is correctly unmarshaled -func (m *ValueStatus) UnmarshalJSON(data []byte) error { - return jsonpb.Unmarshal(bytes.NewReader(data), m) -} -*/ // MarshalJSON ensures data is correctly marshaled func (x ValueState) MarshalJSON() ([]byte, error) { return json.Marshal(x.String()) diff --git a/proto/ligato/linux/interfaces/models.go b/proto/ligato/linux/interfaces/models.go index cd638b1ce7..03a0c3df29 100644 --- a/proto/ligato/linux/interfaces/models.go +++ b/proto/ligato/linux/interfaces/models.go @@ -298,21 +298,3 @@ func ParseInterfaceVrfKey(key string) (iface string, vrf string, invalidKey, isV vrf = parts[vrfIdx+1] return } - -/* -// MarshalJSON ensures that field of type 'oneOf' is correctly marshaled -// by using protobuf json marshaller -func (m *Interface) MarshalJSON() ([]byte, error) { - marshaller := &jsonpb.Marshaler{} - str, err := marshaller.MarshalToString(m) - if err != nil { - return nil, err - } - return []byte(str), nil -} - -// UnmarshalJSON ensures that field of type 'oneOf' is correctly unmarshaled -func (m *Interface) UnmarshalJSON(data []byte) error { - return jsonpb.UnmarshalString(string(data), m) -} -*/ diff --git a/proto/ligato/vpp/interfaces/models.go b/proto/ligato/vpp/interfaces/models.go index d19337c540..9e7a2e0981 100644 --- a/proto/ligato/vpp/interfaces/models.go +++ b/proto/ligato/vpp/interfaces/models.go @@ -655,21 +655,3 @@ func ParseRxModesKey(key string) (ifaceName string, isRxModesKey bool) { } return } - -/* -// MarshalJSON ensures that field of type 'oneOf' is correctly marshaled -// by using protobuf json marshaller -func (m *Interface) MarshalJSON() ([]byte, error) { - marshaller := &jsonpb.Marshaler{} - str, err := marshaller.MarshalToString(m) - if err != nil { - return nil, err - } - return []byte(str), nil -} - -// UnmarshalJSON ensures that field of type 'oneOf' is correctly unmarshaled -func (m *Interface) UnmarshalJSON(data []byte) error { - return jsonpb.UnmarshalString(string(data), m) -} -*/ From 1c5d171eabf9ef03352711085751c034a8f24cca Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 26 Jan 2022 09:52:44 +0100 Subject: [PATCH 11/12] Fix RecordedProtoMessage Signed-off-by: Ondrej Fabry --- plugins/kvscheduler/internal/utils/record.go | 32 +++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/plugins/kvscheduler/internal/utils/record.go b/plugins/kvscheduler/internal/utils/record.go index 6d6a27c53b..f23584394b 100644 --- a/plugins/kvscheduler/internal/utils/record.go +++ b/plugins/kvscheduler/internal/utils/record.go @@ -17,8 +17,11 @@ package utils import ( "encoding/json" + "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/encoding/prototext" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" ) // RecordedProtoMessage is a proto.Message suitable for recording and access via @@ -74,21 +77,20 @@ func (p *RecordedProtoMessage) UnmarshalJSON(data []byte) error { if p.ProtoMsgName == "" { return nil } - /*msgType := proto.MessageType(pwn.ProtoMsgName) - if msgType == nil { - return fmt.Errorf("unknown proto message: %s", p.ProtoMsgName) - } - msg := reflect.New(msgType.Elem()).Interface().(proto.Message) - var err error - if len(pwn.ProtoMsgData) > 0 && pwn.ProtoMsgData[0] == '{' { - err = jsonpb.UnmarshalString(pwn.ProtoMsgData, msg) - } else { - err = proto.UnmarshalText(pwn.ProtoMsgData, msg) - } - if err != nil { - return err - } - p.Message = msg*/ + msgType, err := protoregistry.GlobalTypes.FindMessageByName(protoreflect.FullName(pwn.ProtoMsgName)) + if err != nil { + return err + } + msg := msgType.New().Interface() + if len(pwn.ProtoMsgData) > 0 && pwn.ProtoMsgData[0] == '{' { + err = protojson.Unmarshal([]byte(pwn.ProtoMsgData), msg) + } else { + err = prototext.Unmarshal([]byte(pwn.ProtoMsgData), msg) + } + if err != nil { + return err + } + p.Message = msg return nil } From 5c9ca0b600c84cc32c9fc912699d49d5d5234eb6 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 26 Jan 2022 09:53:42 +0100 Subject: [PATCH 12/12] Update comment Signed-off-by: Ondrej Fabry --- plugins/kvscheduler/internal/utils/record.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kvscheduler/internal/utils/record.go b/plugins/kvscheduler/internal/utils/record.go index f23584394b..4c67e15602 100644 --- a/plugins/kvscheduler/internal/utils/record.go +++ b/plugins/kvscheduler/internal/utils/record.go @@ -65,8 +65,8 @@ func (p *RecordedProtoMessage) MarshalJSON() ([]byte, error) { return pwn, nil } -// UnmarshalJSON un-marshalls proto message using the marshaller from jsonpb. -// The jsonpb package produces a different output than the standard "encoding/json" +// UnmarshalJSON un-marshalls proto message using the marshaller from protojson. +// The protojson package produces a different output than the standard "encoding/json" // package, which does not operate correctly on protocol buffers. func (p *RecordedProtoMessage) UnmarshalJSON(data []byte) error { var pwn ProtoWithName