From 8c2b96b40f7417222a53725e0f9b2e2f649fec54 Mon Sep 17 00:00:00 2001 From: anjan-keysight <84822148+anjan-keysight@users.noreply.github.com> Date: Fri, 5 Jan 2024 05:03:44 +0530 Subject: [PATCH 01/33] Ixia-c operator upgrade (#475) --- go.mod | 2 +- go.sum | 4 ++-- manifests/keysight/ixiatg-configmap.yaml | 10 +++++----- manifests/keysight/ixiatg-operator.yaml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 4db32241..c6a5616e 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/h-fam/errdiff v1.0.2 github.com/kr/pretty v0.3.1 github.com/networkop/meshnet-cni v0.3.1-0.20230525201116-d7c306c635cf - github.com/open-traffic-generator/keng-operator v0.3.13 + github.com/open-traffic-generator/keng-operator v0.3.14 github.com/open-traffic-generator/snappi/gosnappi v0.13.0 github.com/openconfig/gnmi v0.10.0 github.com/openconfig/gnoigo v0.0.0-20231026010722-87413fdb22e7 diff --git a/go.sum b/go.sum index 7e0286d7..380bde15 100644 --- a/go.sum +++ b/go.sum @@ -1089,8 +1089,8 @@ github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/open-traffic-generator/keng-operator v0.3.13 h1:XTYbqKafrSPF55YxfbTU4x6OEvsslvWKxxEocN959AM= -github.com/open-traffic-generator/keng-operator v0.3.13/go.mod h1:+koaOnSyrJHdzxnaye+M6k+ZbszQlWI9u3tMxSpORNA= +github.com/open-traffic-generator/keng-operator v0.3.14 h1:bAtQlTcxKtcVc4x3ULNw9Nj7Ry120mzoanpb3R47kGs= +github.com/open-traffic-generator/keng-operator v0.3.14/go.mod h1:+koaOnSyrJHdzxnaye+M6k+ZbszQlWI9u3tMxSpORNA= github.com/open-traffic-generator/snappi/gosnappi v0.13.0 h1:RdlbT+CIlVum6xbhiFr/IzTvQee5bMa3V4oBWa79UBw= github.com/open-traffic-generator/snappi/gosnappi v0.13.0/go.mod h1:QjB939WFJqUq6V7RQqkY/LFCgRRzKrybHHFp7F7xdWA= github.com/openconfig/gnmi v0.0.0-20200414194230-1597cc0f2600/go.mod h1:M/EcuapNQgvzxo1DDXHK4tx3QpYM/uG4l591v33jG2A= diff --git a/manifests/keysight/ixiatg-configmap.yaml b/manifests/keysight/ixiatg-configmap.yaml index 8634e319..bad3d768 100644 --- a/manifests/keysight/ixiatg-configmap.yaml +++ b/manifests/keysight/ixiatg-configmap.yaml @@ -11,27 +11,27 @@ data: { "name": "controller", "path": "ghcr.io/open-traffic-generator/keng-controller", - "tag": "0.1.0-81" + "tag": "0.1.0-158" }, { "name": "gnmi-server", "path": "ghcr.io/open-traffic-generator/otg-gnmi-server", - "tag": "1.13.2" + "tag": "1.13.4" }, { "name": "traffic-engine", "path": "ghcr.io/open-traffic-generator/ixia-c-traffic-engine", - "tag": "1.6.0.100" + "tag": "1.6.0.109" }, { "name": "protocol-engine", "path": "ghcr.io/open-traffic-generator/ixia-c-protocol-engine", - "tag": "1.00.0.339" + "tag": "1.00.0.348" }, { "name": "ixhw-server", "path": "ghcr.io/open-traffic-generator/keng-layer23-hw-server", - "tag": "0.13.2-2" + "tag": "0.13.4-1" } ] } diff --git a/manifests/keysight/ixiatg-operator.yaml b/manifests/keysight/ixiatg-operator.yaml index 4935b8f4..fffc3e0a 100644 --- a/manifests/keysight/ixiatg-operator.yaml +++ b/manifests/keysight/ixiatg-operator.yaml @@ -387,7 +387,7 @@ spec: - --leader-elect command: - /manager - image: ghcr.io/open-traffic-generator/keng-operator:0.3.13 + image: ghcr.io/open-traffic-generator/keng-operator:0.3.14 livenessProbe: httpGet: path: /healthz From 033329555dc28a0c13ea5d61a85db051ca7b93b8 Mon Sep 17 00:00:00 2001 From: Likai Liu Date: Tue, 9 Jan 2024 16:28:40 -0500 Subject: [PATCH 02/33] Update internal.pkr.hcl to install network diagnosis tools (#476) Install net-tools (ifconfig), iptables, nftables (nft). --- cloudbuild/internal.pkr.hcl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cloudbuild/internal.pkr.hcl b/cloudbuild/internal.pkr.hcl index da797dd2..a69fb1cf 100644 --- a/cloudbuild/internal.pkr.hcl +++ b/cloudbuild/internal.pkr.hcl @@ -179,4 +179,11 @@ build { "rm add-google-cloud-ops-agent-repo.sh", ] } + + provisioner "shell" { + inline = [ + "echo Installing network diagnosis tools...", + "sudo apt-get -o DPkg::Lock::Timeout=60 install net-tools iptables nftables -y", + ] + } } From 8910cd22530dc481d3ed0c870767e24c84f6d444 Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Fri, 19 Jan 2024 17:39:34 -0800 Subject: [PATCH 03/33] add safe type conv (#478) --- topo/node/arista/arista.go | 5 ++++- topo/node/nokia/nokia.go | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/topo/node/arista/arista.go b/topo/node/arista/arista.go index d805722d..f46a0d5c 100644 --- a/topo/node/arista/arista.go +++ b/topo/node/arista/arista.go @@ -220,7 +220,10 @@ func (n *Node) CreateCRD(ctx context.Context) error { return err } for e := range w.ResultChan() { - p := e.Object.(*corev1.Pod) + p, ok := e.Object.(*corev1.Pod) + if !ok { + continue + } if p.Status.Phase == corev1.PodPending || p.Status.Phase == corev1.PodRunning { break } diff --git a/topo/node/nokia/nokia.go b/topo/node/nokia/nokia.go index ab651a80..89623e25 100644 --- a/topo/node/nokia/nokia.go +++ b/topo/node/nokia/nokia.go @@ -115,7 +115,10 @@ func (n *Node) GenerateSelfSigned(ctx context.Context) error { return err } for e := range w.ResultChan() { - p := e.Object.(*corev1.Pod) + p, ok := e.Object.(*corev1.Pod) + if !ok { + continue + } if p.Status.Phase == corev1.PodRunning { break } @@ -256,7 +259,10 @@ func (n *Node) Create(ctx context.Context) error { return err } for e := range w.ResultChan() { - p := e.Object.(*corev1.Pod) + p, ok := e.Object.(*corev1.Pod) + if !ok { + continue + } if p.Status.Phase == corev1.PodPending { break } From b2616e9717d092b3b87a6112607127f2400ca745 Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Tue, 23 Jan 2024 13:09:50 -0800 Subject: [PATCH 04/33] pin to docker 24 (#482) --- cloudbuild/external.pkr.hcl | 2 +- cloudbuild/internal.pkr.hcl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudbuild/external.pkr.hcl b/cloudbuild/external.pkr.hcl index eebc1bff..5a37d88c 100644 --- a/cloudbuild/external.pkr.hcl +++ b/cloudbuild/external.pkr.hcl @@ -69,7 +69,7 @@ build { "curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg", "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null", "sudo apt-get -o DPkg::Lock::Timeout=60 update", - "sudo apt-get -o DPkg::Lock::Timeout=60 install docker-ce docker-ce-cli containerd.io build-essential -y", + "sudo apt-get -o DPkg::Lock::Timeout=60 install docker-ce=5:24.0.7-1~debian.12~bookworm docker-ce-cli=5:24.0.7-1~debian.12~bookworm containerd.io build-essential -y", "sudo usermod -aG docker $USER", "sudo docker version", "sudo apt-get -o DPkg::Lock::Timeout=60 install openvswitch-switch-dpdk -y", # install openvswitch for cisco containers diff --git a/cloudbuild/internal.pkr.hcl b/cloudbuild/internal.pkr.hcl index a69fb1cf..3c54a89f 100644 --- a/cloudbuild/internal.pkr.hcl +++ b/cloudbuild/internal.pkr.hcl @@ -69,7 +69,7 @@ build { "curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg", "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null", "sudo apt-get -o DPkg::Lock::Timeout=60 update", - "sudo apt-get -o DPkg::Lock::Timeout=60 install docker-ce docker-ce-cli containerd.io build-essential -y", + "sudo apt-get -o DPkg::Lock::Timeout=60 install docker-ce=5:24.0.7-1~debian.12~bookworm docker-ce-cli=5:24.0.7-1~debian.12~bookworm containerd.io build-essential -y", "sudo usermod -aG docker $USER", "sudo docker version", "sudo apt-get -o DPkg::Lock::Timeout=60 install openvswitch-switch-dpdk -y", # install openvswitch for cisco containers From 0a97b3b18c0d1d3295c1be287911438a5ac8d262 Mon Sep 17 00:00:00 2001 From: Nitin Soni Date: Thu, 25 Jan 2024 11:49:53 -0800 Subject: [PATCH 05/33] juniper cptx, ncptx allow inside gRPC port other than 32767 (#485) * juniper cptx, ncptx allow inside gRPC port other than 32767 This change helps allow users change inside port other than 32767. If user wants to configure a port other than default 32767, they need to modify the gnmi service in KNE protobuf config. In the absense of config the default 32767 will be used. Both reset to factory and cert generation will make sure configured port is used. * juniper cptx, ncptx allow inside gRPC port other than 32767 This change helps allow users change inside port other than 32767. If user wants to configure a port other than default 32767, they need to modify the gnmi service in KNE protobuf config. In the absense of config the default 32767 will be used. removes some unnessary changes from previous commit and looks up for gnmi service in the map of services to find the inside port. --- topo/node/juniper/juniper.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/topo/node/juniper/juniper.go b/topo/node/juniper/juniper.go index 94bd5a1c..dd35cb39 100644 --- a/topo/node/juniper/juniper.go +++ b/topo/node/juniper/juniper.go @@ -39,6 +39,8 @@ var ( configModeTimeout = 10 * time.Minute // Time between polls - config mode configModeRetrySleep = 30 * time.Second + // Default gRPC port + defaultGrpcPort = uint32(32767) ) const ( @@ -100,12 +102,20 @@ func (n *Node) SpawnCLIConn() error { // Returns config required to configure gRPC service func (n *Node) GRPCConfig() []string { + port := defaultGrpcPort + for _, service := range n.GetProto().GetServices() { + if service.GetName() == "gnmi" { + port = service.GetInside() + } + } + log.Infof("gNMI Port %d", port) + portConfig := fmt.Sprintf("set openconfig-system:system openconfig-system-grpc:grpc-servers grpc-server grpc-server config port %d", port) return []string{ "set system services extension-service request-response grpc ssl hot-reloading", "set system services extension-service request-response grpc ssl use-pki", "set openconfig-system:system openconfig-system-grpc:grpc-servers grpc-server grpc-server config services GNMI", "set openconfig-system:system openconfig-system-grpc:grpc-servers grpc-server grpc-server config enable true", - "set openconfig-system:system openconfig-system-grpc:grpc-servers grpc-server grpc-server config port 32767", + portConfig, "set openconfig-system:system openconfig-system-grpc:grpc-servers grpc-server grpc-server config transport-security true", "set openconfig-system:system openconfig-system-grpc:grpc-servers grpc-server grpc-server config certificate-id grpc-server-cert", "set openconfig-system:system openconfig-system-grpc:grpc-servers grpc-server grpc-server config listen-addresses 0.0.0.0", From c6583baa80fb96424f8c15e3745bfad5586e4ede Mon Sep 17 00:00:00 2001 From: NehaManjunath Date: Thu, 25 Jan 2024 15:46:48 -0800 Subject: [PATCH 06/33] Initial commit handling defaults in vendor node to make KNE topo create easier for users (#484) * Initial commit handling defaults in vendor node to make KNE topo create easier for users * Simple topo example * Resolve comments --------- Co-authored-by: Neha Manjunath --- .../multivendor/multivendor-simple.pb.txt | 232 ++++++++++++++++++ topo/node/arista/arista.go | 20 ++ topo/node/arista/arista_test.go | 32 ++- topo/node/cisco/cisco.go | 20 ++ topo/node/cisco/cisco_test.go | 89 ++++++- topo/node/juniper/juniper.go | 9 + topo/node/juniper/juniper_test.go | 17 +- topo/node/nokia/nokia.go | 15 +- topo/node/nokia/nokia_test.go | 15 +- 9 files changed, 430 insertions(+), 19 deletions(-) create mode 100644 examples/multivendor/multivendor-simple.pb.txt diff --git a/examples/multivendor/multivendor-simple.pb.txt b/examples/multivendor/multivendor-simple.pb.txt new file mode 100644 index 00000000..711abc89 --- /dev/null +++ b/examples/multivendor/multivendor-simple.pb.txt @@ -0,0 +1,232 @@ +name: "multivendor" +nodes: { + name: "ceos" + vendor: ARISTA + config: { + file: "ceos.cfg" + } +} +nodes: { + name: "cptx" + vendor: JUNIPER + config: { + file: "cptx.cfg" + } + interfaces: { + key: "eth4" + value: { + name: "et-0/0/0" + } + } + interfaces: { + key: "eth5" + value: { + name: "et-0/0/1" + } + } + interfaces: { + key: "eth6" + value: { + name: "et-0/0/2" + } + } + interfaces: { + key: "eth7" + value: { + name: "et-0/0/3" + } + } + interfaces: { + key: "eth8" + value: { + name: "et-0/0/4" + } + } + interfaces: { + key: "eth9" + value: { + name: "et-0/0/5" + } + } + interfaces: { + key: "eth10" + value: { + name: "et-0/0/6" + } + } + interfaces: { + key: "eth11" + value: { + name: "et-0/0/7" + } + } + interfaces: { + key: "eth12" + value: { + name: "et-0/0/8" + } + } + interfaces: { + key: "eth13" + value: { + name: "et-0/0/9" + } + } +} +nodes: { + name: "srl" + vendor: NOKIA + config: { + file: "srlinux.cfg" + } +} +nodes: { + name: "xrd" + vendor: CISCO + config: { + file: "xrd.cfg" + } +} +nodes: { + name: "otg" + vendor: KEYSIGHT + version: "0.0.1-9999" +} +links: { + a_node: "ceos" + a_int: "eth1" + z_node: "xrd" + z_int: "eth1" +} +links: { + a_node: "ceos" + a_int: "eth2" + z_node: "xrd" + z_int: "eth2" +} +links: { + a_node: "ceos" + a_int: "eth3" + z_node: "xrd" + z_int: "eth3" +} +# ceos - cptx +links: { + a_node: "ceos" + a_int: "eth4" + z_node: "cptx" + z_int: "eth4" +} +links: { + a_node: "ceos" + a_int: "eth5" + z_node: "cptx" + z_int: "eth5" +} +links: { + a_node: "ceos" + a_int: "eth6" + z_node: "cptx" + z_int: "eth6" +} +# xrd - cptx +links: { + a_node: "xrd" + a_int: "eth4" + z_node: "cptx" + z_int: "eth7" +} +links: { + a_node: "xrd" + a_int: "eth5" + z_node: "cptx" + z_int: "eth8" +} +links: { + a_node: "xrd" + a_int: "eth6" + z_node: "cptx" + z_int: "eth9" +} +# otg - everything +links: { + a_node: "otg" + a_int: "eth1" + z_node: "ceos" + z_int: "eth10" +} +links: { + a_node: "otg" + a_int: "eth2" + z_node: "cptx" + z_int: "eth10" +} +links: { + a_node: "otg" + a_int: "eth3" + z_node: "srl" + z_int: "eth10" +} +links: { + a_node: "otg" + a_int: "eth4" + z_node: "xrd" + z_int: "eth10" +} +# srl - ceos +links: { + a_node: "srl" + a_int: "eth1" + z_node: "ceos" + z_int: "eth7" +} +links: { + a_node: "srl" + a_int: "eth2" + z_node: "ceos" + z_int: "eth8" +} +links: { + a_node: "srl" + a_int: "eth3" + z_node: "ceos" + z_int: "eth9" +} +# srl - xrd +links: { + a_node: "srl" + a_int: "eth4" + z_node: "xrd" + z_int: "eth7" +} +links: { + a_node: "srl" + a_int: "eth5" + z_node: "xrd" + z_int: "eth8" +} +links: { + a_node: "srl" + a_int: "eth6" + z_node: "xrd" + z_int: "eth9" +} +# srl - cptx +links: { + a_node: "srl" + a_int: "eth7" + z_node: "cptx" + z_int: "eth11" +} +links: { + a_node: "srl" + a_int: "eth8" + z_node: "cptx" + z_int: "eth12" +} +links: { + a_node: "srl" + a_int: "eth9" + z_node: "cptx" + z_int: "eth13" +} diff --git a/topo/node/arista/arista.go b/topo/node/arista/arista.go index f46a0d5c..2c17a010 100644 --- a/topo/node/arista/arista.go +++ b/topo/node/arista/arista.go @@ -359,6 +359,12 @@ func defaults(pb *tpb.Node) *tpb.Node { }, } } + if pb.Os == "" { + pb.Os = "eos" + } + if pb.Model == "" { + pb.Model = "ceos" + } if pb.Labels == nil { pb.Labels = map[string]string{} } @@ -389,6 +395,20 @@ func defaults(pb *tpb.Node) *tpb.Node { if pb.Config.ConfigFile == "" { pb.Config.ConfigFile = "startup-config" } + if pb.Config.Image == "" { + pb.Config.Image = "ceos:latest" + } + if pb.Config.Cert == nil { + pb.Config.Cert = &tpb.CertificateCfg{ + Config: &tpb.CertificateCfg_SelfSigned{ + SelfSigned: &tpb.SelfSignedCertCfg{ + CertName: "gnmiCert.pem", + KeyName: "gnmiCertKey.key", + KeySize: 4096, + }, + }, + } + } return pb } diff --git a/topo/node/arista/arista_test.go b/topo/node/arista/arista_test.go index 315081f8..64f5f4ad 100644 --- a/topo/node/arista/arista_test.go +++ b/topo/node/arista/arista_test.go @@ -31,7 +31,7 @@ import ( scraplitransport "github.com/scrapli/scrapligo/transport" scrapliutil "github.com/scrapli/scrapligo/util" "google.golang.org/protobuf/encoding/prototext" - "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/anypb" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -128,11 +128,21 @@ func TestNew(t *testing.T) { EntryCommand: fmt.Sprintf("kubectl exec -it %s -- Cli", ""), ConfigPath: "/mnt/flash", ConfigFile: "startup-config", + Image: "ceos:latest", + Cert: &topopb.CertificateCfg{ + Config: &topopb.CertificateCfg_SelfSigned{ + SelfSigned: &topopb.SelfSignedCertCfg{ + CertName: "gnmiCert.pem", + KeyName: "gnmiCertKey.key", + KeySize: 4096, + }, + }, + }, }, Labels: map[string]string{ "vendor": "ARISTA", - "model": "", - "os": "", + "model": "ceos", + "os": "eos", "version": "", "ondatra-role": "DUT", }, @@ -158,6 +168,8 @@ func TestNew(t *testing.T) { Inside: 9340, }, }, + Model: "ceos", + Os: "eos", }, }, { desc: "with config", @@ -182,12 +194,14 @@ func TestNew(t *testing.T) { }, }, Labels: map[string]string{ - "model": "foo", - "os": "bar", + "model": "", + "os": "", }, }, }, want: &topopb.Node{ + Model: "ceos", + Os: "eos", Config: &topopb.Config{ EntryCommand: fmt.Sprintf("kubectl exec -it %s -- Cli", ""), Image: "foo", @@ -211,8 +225,8 @@ func TestNew(t *testing.T) { }, Labels: map[string]string{ "vendor": "ARISTA", - "model": "foo", - "os": "bar", + "model": "ceos", + "os": "eos", "version": "", "ondatra-role": "DUT", }, @@ -251,8 +265,8 @@ func TestNew(t *testing.T) { if tt.wantErr != "" { return } - if !proto.Equal(n.GetProto(), tt.want) { - t.Fatalf("New() failed: got\n\n%swant\n\n%s", prototext.Format(n.GetProto()), prototext.Format(tt.want)) + if diff := cmp.Diff(tt.want, n.GetProto(), protocmp.Transform()); diff != "" { + t.Fatalf("New() failed: diff (-want, +got): %v\nwant\n\n %s\ngot\n\n%s", diff, prototext.Format(tt.want), prototext.Format(n.GetProto())) } }) } diff --git a/topo/node/cisco/cisco.go b/topo/node/cisco/cisco.go index 2a593c33..49ee28d0 100644 --- a/topo/node/cisco/cisco.go +++ b/topo/node/cisco/cisco.go @@ -376,9 +376,23 @@ func defaults(pb *tpb.Node) (*tpb.Node, error) { if pb.Config.ConfigPath == "" { pb.Config.ConfigPath = "/" } + if pb.Config.Cert == nil { + pb.Config.Cert = &tpb.CertificateCfg{ + Config: &tpb.CertificateCfg_SelfSigned{ + SelfSigned: &tpb.SelfSignedCertCfg{ + CertName: "ems.pem", + KeyName: "ems.key", + KeySize: 2048, + }, + }, + } + } if pb.Model == "" { pb.Model = ModelXRD } + if pb.Os == "" { + pb.Os = "ios-xr" + } pb = constraints(pb) if pb.Services == nil { pb.Services = map[uint32]*tpb.Service{ @@ -410,6 +424,12 @@ func defaults(pb *tpb.Node) (*tpb.Node, error) { if pb.Labels["vendor"] == "" { pb.Labels["vendor"] = tpb.Vendor_CISCO.String() } + if pb.Labels["model"] == "" { + pb.Labels["model"] = pb.Model + } + if pb.Labels["os"] == "" { + pb.Labels["os"] = pb.Os + } if pb.Labels[node.OndatraRoleLabel] == "" { pb.Labels[node.OndatraRoleLabel] = node.OndatraRoleDUT } diff --git a/topo/node/cisco/cisco_test.go b/topo/node/cisco/cisco_test.go index 0ce786a7..d7f50204 100644 --- a/topo/node/cisco/cisco_test.go +++ b/topo/node/cisco/cisco_test.go @@ -25,6 +25,7 @@ import ( "github.com/openconfig/kne/topo/node" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/prototext" "google.golang.org/protobuf/testing/protocmp" "k8s.io/client-go/kubernetes/fake" @@ -107,6 +108,7 @@ func TestNew(t *testing.T) { want: &tpb.Node{ Name: "pod1", Model: ModelXRD, + Os: "ios-xr", Constraints: map[string]string{ "cpu": "2", "memory": "2Gi", @@ -136,6 +138,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_CISCO.String(), "ondatra-role": "DUT", + "model": ModelXRD, + "os": "ios-xr", }, Config: &tpb.Config{ Image: "xrd:latest", @@ -150,6 +154,15 @@ func TestNew(t *testing.T) { ConfigData: &tpb.Config_Data{ Data: []byte("config file data"), }, + Cert: &tpb.CertificateCfg{ + Config: &tpb.CertificateCfg_SelfSigned{ + SelfSigned: &tpb.SelfSignedCertCfg{ + CertName: "ems.pem", + KeyName: "ems.key", + KeySize: 2048, + }, + }, + }, }, HostConstraints: []*tpb.HostConstraint{ { @@ -189,6 +202,7 @@ func TestNew(t *testing.T) { want: &tpb.Node{ Name: "pod1", Model: ModelXRD, + Os: "ios-xr", Interfaces: map[string]*tpb.Interface{ "eth1": {}, "eth2": { @@ -225,6 +239,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_CISCO.String(), "ondatra-role": "DUT", + "model": ModelXRD, + "os": "ios-xr", }, Config: &tpb.Config{ Image: "xrd:latest", @@ -239,6 +255,15 @@ func TestNew(t *testing.T) { ConfigData: &tpb.Config_Data{ Data: []byte("config file data"), }, + Cert: &tpb.CertificateCfg{ + Config: &tpb.CertificateCfg_SelfSigned{ + SelfSigned: &tpb.SelfSignedCertCfg{ + CertName: "ems.pem", + KeyName: "ems.key", + KeySize: 2048, + }, + }, + }, }, HostConstraints: []*tpb.HostConstraint{ { @@ -280,6 +305,7 @@ func TestNew(t *testing.T) { want: &tpb.Node{ Name: "pod1", Model: "8201", + Os: "ios-xr", Interfaces: map[string]*tpb.Interface{ "eth1": {}, "eth2": { @@ -318,6 +344,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_CISCO.String(), "ondatra-role": "DUT", + "model": "8201", + "os": "ios-xr", }, Config: &tpb.Config{ Image: "8000e:latest", @@ -332,6 +360,15 @@ func TestNew(t *testing.T) { ConfigData: &tpb.Config_Data{ Data: []byte("config file data"), }, + Cert: &tpb.CertificateCfg{ + Config: &tpb.CertificateCfg_SelfSigned{ + SelfSigned: &tpb.SelfSignedCertCfg{ + CertName: "ems.pem", + KeyName: "ems.key", + KeySize: 2048, + }, + }, + }, }, HostConstraints: []*tpb.HostConstraint{ { @@ -390,6 +427,7 @@ func TestNew(t *testing.T) { want: &tpb.Node{ Name: "pod1", Model: "8202", + Os: "ios-xr", Interfaces: map[string]*tpb.Interface{ "eth1": {}, "eth2": { @@ -430,6 +468,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_CISCO.String(), "ondatra-role": "DUT", + "model": "8202", + "os": "ios-xr", }, Config: &tpb.Config{ Image: "8000e:latest", @@ -444,6 +484,15 @@ func TestNew(t *testing.T) { ConfigData: &tpb.Config_Data{ Data: []byte("config file data"), }, + Cert: &tpb.CertificateCfg{ + Config: &tpb.CertificateCfg_SelfSigned{ + SelfSigned: &tpb.SelfSignedCertCfg{ + CertName: "ems.pem", + KeyName: "ems.key", + KeySize: 2048, + }, + }, + }, }, HostConstraints: []*tpb.HostConstraint{ { @@ -513,6 +562,7 @@ func TestNew(t *testing.T) { want: &tpb.Node{ Name: "pod1", Model: "8201-32FH", + Os: "ios-xr", Interfaces: map[string]*tpb.Interface{ "eth1": {}, "eth2": { @@ -549,6 +599,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_CISCO.String(), "ondatra-role": "DUT", + "model": "8201-32FH", + "os": "ios-xr", }, Config: &tpb.Config{ Image: "8000e:latest", @@ -563,6 +615,15 @@ func TestNew(t *testing.T) { ConfigData: &tpb.Config_Data{ Data: []byte("config file data"), }, + Cert: &tpb.CertificateCfg{ + Config: &tpb.CertificateCfg_SelfSigned{ + SelfSigned: &tpb.SelfSignedCertCfg{ + CertName: "ems.pem", + KeyName: "ems.key", + KeySize: 2048, + }, + }, + }, }, HostConstraints: []*tpb.HostConstraint{ { @@ -602,6 +663,7 @@ func TestNew(t *testing.T) { want: &tpb.Node{ Name: "pod1", Model: "8101-32H", + Os: "ios-xr", Interfaces: map[string]*tpb.Interface{ "eth1": {}, "eth2": { @@ -638,6 +700,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_CISCO.String(), "ondatra-role": "DUT", + "model": "8101-32H", + "os": "ios-xr", }, Config: &tpb.Config{ Image: "8000e:latest", @@ -652,6 +716,15 @@ func TestNew(t *testing.T) { ConfigData: &tpb.Config_Data{ Data: []byte("config file data"), }, + Cert: &tpb.CertificateCfg{ + Config: &tpb.CertificateCfg_SelfSigned{ + SelfSigned: &tpb.SelfSignedCertCfg{ + CertName: "ems.pem", + KeyName: "ems.key", + KeySize: 2048, + }, + }, + }, }, HostConstraints: []*tpb.HostConstraint{ { @@ -721,6 +794,7 @@ func TestNew(t *testing.T) { want: &tpb.Node{ Name: "pod1", Model: "8102-64H", + Os: "ios-xr", Interfaces: map[string]*tpb.Interface{ "eth1": {}, "eth2": { @@ -757,6 +831,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_CISCO.String(), "ondatra-role": "DUT", + "model": "8102-64H", + "os": "ios-xr", }, Config: &tpb.Config{ Image: "8000e:latest", @@ -771,6 +847,15 @@ func TestNew(t *testing.T) { ConfigData: &tpb.Config_Data{ Data: []byte("config file data"), }, + Cert: &tpb.CertificateCfg{ + Config: &tpb.CertificateCfg_SelfSigned{ + SelfSigned: &tpb.SelfSignedCertCfg{ + CertName: "ems.pem", + KeyName: "ems.key", + KeySize: 2048, + }, + }, + }, }, HostConstraints: []*tpb.HostConstraint{ { @@ -793,8 +878,8 @@ func TestNew(t *testing.T) { if err != nil { return } - if s := cmp.Diff(n.GetProto(), tt.want, protocmp.Transform(), protocmp.IgnoreFields(&tpb.Service{}, "node_port")); s != "" { - t.Fatalf("Protos not equal: %s", s) + if s := cmp.Diff(tt.want, n.GetProto(), protocmp.Transform(), protocmp.IgnoreFields(&tpb.Service{}, "node_port")); s != "" { + t.Fatalf("New() failed: diff (-want, +got): %v\nwant\n\n %s\ngot\n\n%s", s, prototext.Format(tt.want), prototext.Format(n.GetProto())) } err = n.Create(context.Background()) if s := errdiff.Check(err, tt.cErr); s != "" { diff --git a/topo/node/juniper/juniper.go b/topo/node/juniper/juniper.go index dd35cb39..632a4c41 100644 --- a/topo/node/juniper/juniper.go +++ b/topo/node/juniper/juniper.go @@ -531,6 +531,9 @@ func defaults(pb *tpb.Node) *tpb.Node { if pb.Model == "" { pb.Model = ModelCPTX } + if pb.Os == "" { + pb.Os = "evo" + } if pb.Config == nil { pb.Config = &tpb.Config{} } @@ -613,6 +616,12 @@ func defaults(pb *tpb.Node) *tpb.Node { if pb.Labels["vendor"] == "" { pb.Labels["vendor"] = tpb.Vendor_JUNIPER.String() } + if pb.Labels["model"] == "" { + pb.Labels["model"] = pb.Model + } + if pb.Labels["os"] == "" { + pb.Labels["os"] = pb.Os + } if pb.Labels[node.OndatraRoleLabel] == "" { pb.Labels[node.OndatraRoleLabel] = node.OndatraRoleDUT } diff --git a/topo/node/juniper/juniper_test.go b/topo/node/juniper/juniper_test.go index 8b711b0d..8888c4a2 100644 --- a/topo/node/juniper/juniper_test.go +++ b/topo/node/juniper/juniper_test.go @@ -22,6 +22,7 @@ import ( scraplilogging "github.com/scrapli/scrapligo/logging" scraplitransport "github.com/scrapli/scrapligo/transport" scrapliutil "github.com/scrapli/scrapligo/util" + "google.golang.org/protobuf/encoding/prototext" "google.golang.org/protobuf/testing/protocmp" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -438,6 +439,7 @@ func TestNew(t *testing.T) { want: &tpb.Node{ Name: "pod1", Model: "cptx", + Os: "evo", Constraints: map[string]string{ "cpu": "8", "memory": "8Gi", @@ -467,6 +469,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_JUNIPER.String(), "ondatra-role": "DUT", + "model": "cptx", + "os": "evo", }, Config: &tpb.Config{ Image: "cptx:latest", @@ -513,6 +517,7 @@ func TestNew(t *testing.T) { want: &tpb.Node{ Name: "pod1", Model: "cptx", + Os: "evo", Constraints: map[string]string{ "cpu": "8", "memory": "8Gi", @@ -542,6 +547,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_JUNIPER.String(), "ondatra-role": "DUT", + "model": "cptx", + "os": "evo", }, Config: &tpb.Config{ Image: "cptx:latest", @@ -587,6 +594,7 @@ func TestNew(t *testing.T) { }, want: &tpb.Node{ Name: "pod1", + Os: "evo", Model: "ncptx", Constraints: map[string]string{ "cpu": "4", @@ -617,6 +625,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_JUNIPER.String(), "ondatra-role": "DUT", + "model": "ncptx", + "os": "evo", }, Config: &tpb.Config{ Image: "ncptx:latest", @@ -652,6 +662,7 @@ func TestNew(t *testing.T) { }, want: &tpb.Node{ Model: "cptx", + Os: "evo", Constraints: map[string]string{ "cpu": "8", "memory": "8Gi", @@ -681,6 +692,8 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_JUNIPER.String(), "ondatra-role": "DUT", + "model": "cptx", + "os": "evo", }, Config: &tpb.Config{ Image: "cptx:latest", @@ -714,8 +727,8 @@ func TestNew(t *testing.T) { if err != nil { return } - if s := cmp.Diff(n.GetProto(), tt.want, protocmp.Transform(), protocmp.IgnoreFields(&tpb.Service{}, "node_port")); s != "" { - t.Fatalf("Protos not equal: %s", s) + if s := cmp.Diff(tt.want, n.GetProto(), protocmp.Transform(), protocmp.IgnoreFields(&tpb.Service{}, "node_port")); s != "" { + t.Fatalf("New() failed: diff (-want, +got): %v\nwant\n\n %s\ngot\n\n%s", s, prototext.Format(tt.want), prototext.Format(n.GetProto())) } err = n.Create(context.Background()) if s := errdiff.Check(err, tt.cErr); s != "" { diff --git a/topo/node/nokia/nokia.go b/topo/node/nokia/nokia.go index 89623e25..338d9221 100644 --- a/topo/node/nokia/nokia.go +++ b/topo/node/nokia/nokia.go @@ -328,9 +328,6 @@ func (n *Node) Delete(ctx context.Context) error { } func defaults(pb *tpb.Node) *tpb.Node { - if pb.Config == nil { - pb.Config = &tpb.Config{} - } if pb.Services == nil { pb.Services = map[uint32]*tpb.Service{ 443: { @@ -359,12 +356,24 @@ func defaults(pb *tpb.Node) *tpb.Node { }, } } + if pb.Model == "" { + pb.Model = "ixrd2" + } + if pb.Os == "" { + pb.Os = "nokia_srlinux" + } if pb.Labels == nil { pb.Labels = map[string]string{} } if pb.Labels["vendor"] == "" { pb.Labels["vendor"] = tpb.Vendor_NOKIA.String() } + if pb.Labels["model"] == "" { + pb.Labels["model"] = pb.Model + } + if pb.Labels["os"] == "" { + pb.Labels["os"] = pb.Os + } if pb.Labels[node.OndatraRoleLabel] == "" { pb.Labels[node.OndatraRoleLabel] = node.OndatraRoleDUT } diff --git a/topo/node/nokia/nokia_test.go b/topo/node/nokia/nokia_test.go index 5bd8e14a..82ce0ab5 100644 --- a/topo/node/nokia/nokia_test.go +++ b/topo/node/nokia/nokia_test.go @@ -19,6 +19,7 @@ import ( "testing" "time" + "github.com/google/go-cmp/cmp" "github.com/h-fam/errdiff" topopb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" @@ -27,7 +28,7 @@ import ( scraplitransport "github.com/scrapli/scrapligo/transport" scrapliutil "github.com/scrapli/scrapligo/util" "google.golang.org/protobuf/encoding/prototext" - "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/testing/protocmp" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" @@ -104,6 +105,8 @@ func TestNew(t *testing.T) { }, }, want: &topopb.Node{ + Model: "ixrd2", + Os: "nokia_srlinux", Config: &topopb.Config{ Image: "ghcr.io/nokia/srlinux:latest", ConfigFile: "config.cli", @@ -112,6 +115,8 @@ func TestNew(t *testing.T) { "vendor": "NOKIA", "foo": "test_label", "ondatra-role": "DUT", + "model": "ixrd2", + "os": "nokia_srlinux", }, Services: map[uint32]*topopb.Service{ 443: { @@ -157,6 +162,8 @@ func TestNew(t *testing.T) { }, }, want: &topopb.Node{ + Model: "ixrd2", + Os: "nokia_srlinux", Config: &topopb.Config{ Image: "ghcr.io/nokia/srlinux:latest", ConfigFile: "config.json", @@ -165,6 +172,8 @@ func TestNew(t *testing.T) { "vendor": "NOKIA", "foo": "test_label", "ondatra-role": "DUT", + "model": "ixrd2", + "os": "nokia_srlinux", }, Services: map[uint32]*topopb.Service{ 443: { @@ -208,8 +217,8 @@ func TestNew(t *testing.T) { if tt.wantErr != "" { return } - if !proto.Equal(n.GetProto(), tt.want) { - t.Fatalf("New() failed: got\n%swant\n%s", prototext.Format(n.GetProto()), prototext.Format(tt.want)) + if diff := cmp.Diff(tt.want, n.GetProto(), protocmp.Transform()); diff != "" { + t.Fatalf("New() failed: diff (-want, +got): %v\nwant\n\n %s\ngot\n\n%s", diff, prototext.Format(tt.want), prototext.Format(n.GetProto())) } }) } From f007b8d73751cc5555f292ac24063792cbe5e224 Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Thu, 25 Jan 2024 17:34:21 -0800 Subject: [PATCH 07/33] Add credential refresh for GAR registries in kind (#479) * add registry package * add registry to deploy * switch to refresher * get refresh working * Refactor in packages * remove leftover file * cleanup tests and imports * fix lint * linter * linter * add more tests * finish unit tests * linter after merge * address comments --- .../clientset/v1beta1/ipaddresspool_test.go | 2 +- .../clientset/v1beta1/l2advertisement_test.go | 2 +- cluster/kind/kind.go | 179 ++++++++ cluster/kind/kind_test.go | 394 ++++++++++++++++++ cmd/deploy/deploy_test.go | 2 +- cmd/topology/topology_test.go | 2 +- controller/server/main_test.go | 2 +- deploy/deploy.go | 201 ++------- deploy/deploy_test.go | 242 +---------- events/events_test.go | 2 +- events/status_test.go | 2 +- exec/exec_test.go | 3 +- exec/run/run.go | 71 ++++ exec/run/run_test.go | 129 ++++++ go.mod | 1 - go.sum | 1 - pods/status_test.go | 2 +- topo/node/alpine/alpine_test.go | 2 +- topo/node/arista/arista_test.go | 2 +- topo/node/cisco/cisco_test.go | 14 +- topo/node/gobgp/gobgp_test.go | 7 +- topo/node/host/host_test.go | 2 +- topo/node/juniper/juniper_test.go | 2 +- topo/node/keysight/keysight_test.go | 2 +- topo/node/node_test.go | 5 +- topo/node/nokia/nokia_test.go | 2 +- topo/node/openconfig/openconfig_test.go | 2 +- topo/topo.go | 20 +- topo/topo_test.go | 10 +- 29 files changed, 871 insertions(+), 436 deletions(-) create mode 100644 cluster/kind/kind.go create mode 100644 cluster/kind/kind_test.go create mode 100644 exec/run/run.go create mode 100644 exec/run/run_test.go diff --git a/api/metallb/clientset/v1beta1/ipaddresspool_test.go b/api/metallb/clientset/v1beta1/ipaddresspool_test.go index 6a6e567e..8bb58fe8 100644 --- a/api/metallb/clientset/v1beta1/ipaddresspool_test.go +++ b/api/metallb/clientset/v1beta1/ipaddresspool_test.go @@ -20,7 +20,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" metallbv1 "go.universe.tf/metallb/api/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/api/metallb/clientset/v1beta1/l2advertisement_test.go b/api/metallb/clientset/v1beta1/l2advertisement_test.go index b563ae2d..1f1b516d 100644 --- a/api/metallb/clientset/v1beta1/l2advertisement_test.go +++ b/api/metallb/clientset/v1beta1/l2advertisement_test.go @@ -6,7 +6,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" metallbv1 "go.universe.tf/metallb/api/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/cluster/kind/kind.go b/cluster/kind/kind.go new file mode 100644 index 00000000..16d21b2d --- /dev/null +++ b/cluster/kind/kind.go @@ -0,0 +1,179 @@ +package kind + +import ( + "context" + "encoding/json" + "fmt" + "os" + "path/filepath" + "regexp" + "strings" + + "github.com/openconfig/kne/exec/run" + "golang.org/x/oauth2/google" + log "k8s.io/klog/v2" +) + +const ( + dockerConfigEnvVar = "DOCKER_CONFIG" + kubeletConfigPath = "/var/lib/kubelet/config.json" +) + +var ( + kubeletConfigPathTemplate = "%s:" + kubeletConfigPath + googleFindDefaultCredentials = google.FindDefaultCredentials + clusterKindNameRE = regexp.MustCompile("kind-(.*)") +) + +func ClusterIsKind() (bool, error) { + name, err := clusterName() + if err != nil { + return false, fmt.Errorf("unable to determine cluster name: %v", err) + } + matches := clusterKindNameRE.FindStringSubmatch(name) + if len(matches) != 2 || matches[1] == "" { + return false, nil + } + return true, nil +} + +func clusterName() (string, error) { + b, err := run.OutCommand("kubectl", "config", "current-context") + if err != nil { + return "", fmt.Errorf("unable to determine cluster information: %v", err) + } + return string(b), nil +} + +func clusterKindName() (string, error) { + name, err := clusterName() + if err != nil { + return "", fmt.Errorf("unable to determine cluster name: %v", err) + } + matches := clusterKindNameRE.FindStringSubmatch(name) + if len(matches) != 2 || matches[1] == "" { + return "", fmt.Errorf("cluster %v is not a kind cluster", name) + } + return matches[1], nil +} + +func clusterKindNodes() ([]string, error) { + name, err := clusterKindName() + if err != nil { + return nil, err + } + out, err := run.OutCommand("kind", "get", "nodes", "--name", name) + if err != nil { + return nil, err + } + if len(out) == 0 { + return []string{}, nil + } + nodes := []string{} + for _, n := range strings.Split(string(out), " ") { + nodes = append(nodes, strings.TrimSuffix(n, "\n")) + } + return nodes, nil +} + +func SetupGARAccess(ctx context.Context, registries []string) error { + // Create a temporary dir to hold a new docker config that lacks credsStore. + // Then use `docker login` to store the generated credentials directly in + // the temporary docker config. + // See https://kind.sigs.k8s.io/docs/user/private-registries/#use-an-access-token + // for more information. + tempDockerDir, err := os.MkdirTemp("", "kne_kind_docker") + if err != nil { + return err + } + defer os.RemoveAll(tempDockerDir) + originalConfig := os.Getenv(dockerConfigEnvVar) + defer os.Setenv(dockerConfigEnvVar, originalConfig) + if err := os.Setenv(dockerConfigEnvVar, tempDockerDir); err != nil { + return err + } + configPath := filepath.Join(tempDockerDir, "config.json") + if err := writeDockerConfig(configPath, registries); err != nil { + return err + } + creds, err := googleFindDefaultCredentials(ctx, "https://www.googleapis.com/auth/cloud-platform") + if err != nil { + return fmt.Errorf("failed to find gcloud credentials: %v", err) + } + token, err := creds.TokenSource.Token() + if err != nil { + return fmt.Errorf("failed to get token from gcloud credentials: %v", err) + } + for _, r := range registries { + s := fmt.Sprintf("https://%s", r) + if err := run.LogCommandWithInput([]byte(token.AccessToken), "docker", "login", "-u", "oauth2accesstoken", "--password-stdin", s); err != nil { + return err + } + } + // Copy the new docker config to each node and restart kubelet so it + // picks up the new config that contains the embedded credentials. + nodes, err := clusterKindNodes() + if err != nil { + return err + } + for _, node := range nodes { + if err := run.LogCommand("docker", "cp", configPath, fmt.Sprintf(kubeletConfigPathTemplate, node)); err != nil { + return err + } + if err := run.LogCommand("docker", "exec", node, "systemctl", "restart", "kubelet.service"); err != nil { + return err + } + } + log.Infof("Setup GAR access for %v", registries) + return nil +} + +func RefreshGARAccess(ctx context.Context) error { + nodes, err := clusterKindNodes() + if err != nil { + return err + } + if len(nodes) == 0 { + log.Infof("No kind nodes found in cluster, no GAR access to refresh") + return nil + } + cfg, err := run.OutCommand("docker", "exec", nodes[0], "cat", kubeletConfigPath) + if err != nil { + log.Infof("Kubelet docker config not found on %v, no GAR access to refresh", nodes[0]) + return nil + } + var dCfg DockerConfig + if err := json.Unmarshal(cfg, &dCfg); err != nil { + return err + } + var registries []string + for r := range dCfg.Auths { + registries = append(registries, r) + } + log.Infof("Refreshing GAR access for %v", registries) + return SetupGARAccess(ctx, registries) +} + +type DockerConfig struct { + Auths map[string]struct{} `json:"auths"` +} + +func writeDockerConfig(path string, registries []string) error { + dc := &DockerConfig{Auths: map[string]struct{}{}} + for _, r := range registries { + dc.Auths[r] = struct{}{} + } + b, err := json.MarshalIndent(dc, "", " ") + if err != nil { + return err + } + f, err := os.Create(path) + if err != nil { + return err + } + defer f.Close() + if _, err := f.Write(b); err != nil { + return err + } + return nil +} diff --git a/cluster/kind/kind_test.go b/cluster/kind/kind_test.go new file mode 100644 index 00000000..be36c10d --- /dev/null +++ b/cluster/kind/kind_test.go @@ -0,0 +1,394 @@ +package kind + +import ( + "context" + "errors" + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/openconfig/gnmi/errdiff" + kexec "github.com/openconfig/kne/exec" + fexec "github.com/openconfig/kne/exec/fake" + "golang.org/x/oauth2" + "golang.org/x/oauth2/google" +) + +func TestClusterIsKind(t *testing.T) { + tests := []struct { + desc string + resp []fexec.Response + want bool + wantErr string + }{{ + desc: "is kind", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + }, + want: true, + }, { + desc: "is not kind", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kne"}, + }, + }, { + desc: "failed to get name", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Err: "failed to get name"}, + }, + wantErr: "unable to determine cluster name", + }} + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + fexec.LogCommand = func(s string) { + t.Logf("%s: %s", tt.desc, s) + } + cmds := fexec.Commands(tt.resp) + kexec.Command = cmds.Command + defer checkCmds(t, cmds) + + got, err := ClusterIsKind() + if s := errdiff.Substring(err, tt.wantErr); s != "" { + t.Errorf("unexpected error: %s", s) + } + if got != tt.want { + t.Errorf("ClusterIsKind() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestClusterKindName(t *testing.T) { + tests := []struct { + desc string + resp []fexec.Response + want string + wantErr string + }{{ + desc: "is kind", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + }, + want: "kne", + }, { + desc: "is not kind", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kne"}, + }, + wantErr: "not a kind cluster", + }, { + desc: "failed to get name", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Err: "failed to get name"}, + }, + wantErr: "unable to determine cluster name", + }} + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + fexec.LogCommand = func(s string) { + t.Logf("%s: %s", tt.desc, s) + } + cmds := fexec.Commands(tt.resp) + kexec.Command = cmds.Command + defer checkCmds(t, cmds) + + got, err := clusterKindName() + if s := errdiff.Substring(err, tt.wantErr); s != "" { + t.Errorf("unexpected error: %s", s) + } + if got != tt.want { + t.Errorf("clusterKindName() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestClusterKindNodes(t *testing.T) { + tests := []struct { + desc string + resp []fexec.Response + want []string + wantErr string + }{{ + desc: "is kind", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + }, + want: []string{"kne-control-plane"}, + }, { + desc: "is kind multinode", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane kne-worker"}, + }, + want: []string{"kne-control-plane", "kne-worker"}, + }, { + desc: "no nodes", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}}, + }, + want: []string{}, + }, { + desc: "is not kind", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kne"}, + }, + wantErr: "not a kind cluster", + }, { + desc: "failed to get name", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Err: "failed to get name"}, + }, + wantErr: "unable to determine cluster name", + }, { + desc: "failed to get nodes", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Err: "failed to get name"}, + }, + wantErr: "unable to determine cluster name", + }} + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + fexec.LogCommand = func(s string) { + t.Logf("%s: %s", tt.desc, s) + } + cmds := fexec.Commands(tt.resp) + kexec.Command = cmds.Command + defer checkCmds(t, cmds) + + got, err := clusterKindNodes() + if s := errdiff.Substring(err, tt.wantErr); s != "" { + t.Errorf("unexpected error: %s", s) + } + if s := cmp.Diff(tt.want, got, cmpopts.SortSlices(func(a, b string) bool { return a < b })); s != "" { + t.Errorf("clusterKindNodes() unexpected diff (-want +got):\n%s", s) + } + }) + } +} + +func TestSetupGARAccess(t *testing.T) { + ctx := context.Background() + + tests := []struct { + desc string + regs []string + resp []fexec.Response + findCredsErr bool + tokenSourceErr bool + wantErr string + }{{ + desc: "1 reg", + regs: []string{"us-west1-docker.pkg.dev"}, + resp: []fexec.Response{ + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + {Cmd: "docker", Args: []string{"cp", ".*/config.json", "kne-control-plane:/var/lib/kubelet/config.json"}}, + {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "systemctl", "restart", "kubelet.service"}}, + }, + }, { + desc: "1 reg, 2 nodes", + regs: []string{"us-west1-docker.pkg.dev"}, + resp: []fexec.Response{ + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane kne-worker"}, + {Cmd: "docker", Args: []string{"cp", ".*/config.json", "kne-control-plane:/var/lib/kubelet/config.json"}}, + {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "systemctl", "restart", "kubelet.service"}}, + {Cmd: "docker", Args: []string{"cp", ".*/config.json", "kne-worker:/var/lib/kubelet/config.json"}}, + {Cmd: "docker", Args: []string{"exec", "kne-worker", "systemctl", "restart", "kubelet.service"}}, + }, + }, { + desc: "0 nodes", + regs: []string{"us-west1-docker.pkg.dev"}, + resp: []fexec.Response{ + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}}, + }, + }, { + desc: "2 regs", + regs: []string{"us-west1-docker.pkg.dev", "us-central1-docker.pkg.dev"}, + resp: []fexec.Response{ + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-central1-docker.pkg.dev"}}, + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + {Cmd: "docker", Args: []string{"cp", ".*/config.json", "kne-control-plane:/var/lib/kubelet/config.json"}}, + {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "systemctl", "restart", "kubelet.service"}}, + }, + }, { + desc: "failed to get creds", + regs: []string{"us-west1-docker.pkg.dev"}, + findCredsErr: true, + wantErr: "failed to find gcloud credentials", + }, { + desc: "failed to get access token", + regs: []string{"us-west1-docker.pkg.dev"}, + tokenSourceErr: true, + wantErr: "unable to generate token", + }, { + desc: "failed docker login", + regs: []string{"us-west1-docker.pkg.dev"}, + resp: []fexec.Response{ + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}, Err: "failed to login to docker"}, + }, + wantErr: "failed to login to docker", + }, { + desc: "failed to get name", + regs: []string{"us-west1-docker.pkg.dev"}, + resp: []fexec.Response{ + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Err: "failed to get name"}, + }, + wantErr: "failed to get name", + }, { + desc: "failed to get nodes", + regs: []string{"us-west1-docker.pkg.dev"}, + resp: []fexec.Response{ + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Err: "failed to get nodes"}, + }, + wantErr: "failed to get nodes", + }, { + desc: "failed to cp config to node", + regs: []string{"us-west1-docker.pkg.dev"}, + resp: []fexec.Response{ + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + {Cmd: "docker", Args: []string{"cp", ".*/config.json", "kne-control-plane:/var/lib/kubelet/config.json"}, Err: "failed to cp config to node"}, + }, + wantErr: "failed to cp config to node", + }, { + desc: "failed to restart kubelet", + regs: []string{"us-west1-docker.pkg.dev"}, + resp: []fexec.Response{ + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + {Cmd: "docker", Args: []string{"cp", ".*/config.json", "kne-control-plane:/var/lib/kubelet/config.json"}}, + {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "systemctl", "restart", "kubelet.service"}, Err: "failed to restart kubelet"}, + }, + wantErr: "failed to restart kubelet", + }} + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + fexec.LogCommand = func(s string) { + t.Logf("%s: %s", tt.desc, s) + } + cmds := fexec.Commands(tt.resp) + kexec.Command = cmds.Command + defer checkCmds(t, cmds) + + googleFindDefaultCredentials = func(_ context.Context, _ ...string) (*google.Credentials, error) { + if tt.findCredsErr { + return nil, errors.New("unable to find default credentials") + } + return &google.Credentials{TokenSource: &fakeTokenSource{hasTokenErr: tt.tokenSourceErr}}, nil + } + + err := SetupGARAccess(ctx, tt.regs) + if s := errdiff.Substring(err, tt.wantErr); s != "" { + t.Fatalf("unexpected error: %s", s) + } + }) + } +} + +type fakeTokenSource struct { + hasTokenErr bool +} + +func (f *fakeTokenSource) Token() (*oauth2.Token, error) { + if f.hasTokenErr { + return nil, errors.New("unable to generate token") + } + return &oauth2.Token{AccessToken: "some-fake-token"}, nil +} + +func TestRefreshGARAccess(t *testing.T) { + ctx := context.Background() + + tests := []struct { + desc string + resp []fexec.Response + wantErr string + }{{ + desc: "1 reg", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "cat", "/var/lib/kubelet/config.json"}, Stdout: `{"auths": {"us-west1-docker.pkg.dev": {}}}`}, + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + {Cmd: "docker", Args: []string{"cp", ".*/config.json", "kne-control-plane:/var/lib/kubelet/config.json"}}, + {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "systemctl", "restart", "kubelet.service"}}, + }, + }, { + desc: "2 regs", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "cat", "/var/lib/kubelet/config.json"}, Stdout: `{"auths": {"us-west1-docker.pkg.dev": {}, "us-central1-docker.pkg.dev": {}}}`}, + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-central1-docker.pkg.dev"}}, + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + {Cmd: "docker", Args: []string{"cp", ".*/config.json", "kne-control-plane:/var/lib/kubelet/config.json"}}, + {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "systemctl", "restart", "kubelet.service"}}, + }, + }, { + desc: "0 regs", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "cat", "/var/lib/kubelet/config.json"}, Err: "no file"}, + }, + }, { + desc: "0 nodes", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}}, + }, + }, { + desc: "invalid docker cfg", + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, + {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, + {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "cat", "/var/lib/kubelet/config.json"}, Stdout: `{"auths": {"us-west1-docker.pkg.dev": {`}, + }, + wantErr: "unexpected end of JSON input", + }} + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + fexec.LogCommand = func(s string) { + t.Logf("%s: %s", tt.desc, s) + } + cmds := fexec.Commands(tt.resp) + kexec.Command = cmds.Command + defer checkCmds(t, cmds) + + googleFindDefaultCredentials = func(_ context.Context, _ ...string) (*google.Credentials, error) { + return &google.Credentials{TokenSource: &fakeTokenSource{}}, nil + } + + err := RefreshGARAccess(ctx) + if s := errdiff.Substring(err, tt.wantErr); s != "" { + t.Fatalf("unexpected error: %s", s) + } + }) + } +} + +func checkCmds(t *testing.T, cmds *fexec.Command) { + t.Helper() + if err := cmds.Done(); err != nil { + t.Errorf("%v", err) + } +} diff --git a/cmd/deploy/deploy_test.go b/cmd/deploy/deploy_test.go index ea2b416d..2db958c2 100644 --- a/cmd/deploy/deploy_test.go +++ b/cmd/deploy/deploy_test.go @@ -18,7 +18,7 @@ import ( "strings" "testing" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" ) var ( diff --git a/cmd/topology/topology_test.go b/cmd/topology/topology_test.go index e4eb7790..4f7982c5 100644 --- a/cmd/topology/topology_test.go +++ b/cmd/topology/topology_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/h-fam/errdiff" tfake "github.com/networkop/meshnet-cni/api/clientset/v1beta1/fake" + "github.com/openconfig/gnmi/errdiff" cpb "github.com/openconfig/kne/proto/controller" tpb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo" diff --git a/controller/server/main_test.go b/controller/server/main_test.go index 881db80d..5250d866 100644 --- a/controller/server/main_test.go +++ b/controller/server/main_test.go @@ -6,7 +6,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" "github.com/openconfig/kne/deploy" cpb "github.com/openconfig/kne/proto/controller" ) diff --git a/deploy/deploy.go b/deploy/deploy.go index c4995620..388a391e 100644 --- a/deploy/deploy.go +++ b/deploy/deploy.go @@ -1,13 +1,11 @@ package deploy import ( - "bytes" "context" "crypto/rand" "encoding/base64" "encoding/json" "fmt" - "io" "net" "os" "os/exec" @@ -20,15 +18,14 @@ import ( dclient "github.com/docker/docker/client" "github.com/openconfig/gnmi/errlist" metallbclientv1 "github.com/openconfig/kne/api/metallb/clientset/v1beta1" + "github.com/openconfig/kne/cluster/kind" "github.com/openconfig/kne/events" - kexec "github.com/openconfig/kne/exec" + "github.com/openconfig/kne/exec/run" "github.com/openconfig/kne/load" - logshim "github.com/openconfig/kne/logshim" "github.com/openconfig/kne/metrics" "github.com/openconfig/kne/pods" epb "github.com/openconfig/kne/proto/event" metallbv1 "go.universe.tf/metallb/api/v1beta1" - "golang.org/x/oauth2/google" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -42,78 +39,15 @@ import ( "sigs.k8s.io/yaml" ) -const ( - dockerConfigEnvVar = "DOCKER_CONFIG" - kubeletConfigPathTemplate = "%s:/var/lib/kubelet/config.json" -) - var ( setPIDMaxScript = filepath.Join(homedir.HomeDir(), "kne-internal", "set_pid_max.sh") pullRetryDelay = time.Second poolRetryDelay = 5 * time.Second - logInfo = log.Info - logWarning = log.Warning -) - -func runCommand(writeLogs bool, in []byte, cmd string, args ...string) ([]byte, error) { - c := kexec.Command(cmd, args...) - var out bytes.Buffer - c.SetStdout(&out) - if writeLogs { - outLog := logshim.New(func(v ...interface{}) { - logInfo(append([]interface{}{"(" + cmd + "): "}, v...)...) - }) - errLog := logshim.New(func(v ...interface{}) { - logWarning(append([]interface{}{"(" + cmd + "): "}, v...)...) - }) - defer func() { - outLog.Close() - errLog.Close() - }() - c.SetStdout(io.MultiWriter(outLog, &out)) - c.SetStderr(io.MultiWriter(errLog, &out)) - } - if len(in) > 0 { - c.SetStdin(bytes.NewReader(in)) - } - err := c.Run() - return out.Bytes(), err -} - -// logCommand runs the specified command but records standard output -// with log.Info and standard error with log.Warning. -func logCommand(cmd string, args ...string) error { - _, err := runCommand(true, nil, cmd, args...) - return err -} - -// logCommandWithInput runs the specified command but records standard output -// with log.Info and standard error with log.Warning. in is sent to -// the standard input of the command. -func logCommandWithInput(in []byte, cmd string, args ...string) error { - _, err := runCommand(true, in, cmd, args...) - return err -} - -// outLogCommand runs the specified command but records standard output -// with log.Info and standard error with log.Warning. Standard output -// and standard error are also returned. -func outLogCommand(cmd string, args ...string) ([]byte, error) { - return runCommand(true, nil, cmd, args...) -} - -// outCommand runs the specified command and returns any standard output -// as well as any errors. -func outCommand(cmd string, args ...string) ([]byte, error) { - return runCommand(false, nil, cmd, args...) -} - -var ( - healthTimeout = time.Minute + healthTimeout = time.Minute // Stubs for testing. - execLookPath = exec.LookPath - googleFindDefaultCredentials = google.FindDefaultCredentials + execLookPath = exec.LookPath + kindSetupGARAccess = kind.SetupGARAccess ) type Cluster interface { @@ -270,7 +204,7 @@ func (d *Deployment) Deploy(ctx context.Context, kubecfg string) (rerr error) { } log.Infof("Checking kubectl versions.") - output, err := outCommand("kubectl", "version", "--output=yaml") + output, err := run.OutCommand("kubectl", "version", "--output=yaml") if err != nil { return fmt.Errorf("failed get kubectl version: %w", err) } @@ -420,7 +354,7 @@ func (e *ExternalSpec) Delete() error { } func (e *ExternalSpec) Healthy() error { - if err := logCommand("kubectl", "cluster-info"); err != nil { + if err := run.LogCommand("kubectl", "cluster-info"); err != nil { return fmt.Errorf("cluster not healthy: %w", err) } return nil @@ -439,7 +373,7 @@ func (e *ExternalSpec) Apply(cfg []byte) error { } func kubectlApply(cfg []byte) error { - return logCommandWithInput(cfg, "kubectl", "apply", "-f", "-") + return run.LogCommandWithInput(cfg, "kubectl", "apply", "-f", "-") } func init() { @@ -527,7 +461,7 @@ func (k *KindSpec) checkDependencies() error { return fmt.Errorf("failed to parse desired kind version: %w", err) } - stdout, err := outCommand("kind", "version") + stdout, err := run.OutCommand("kind", "version") if err != nil { return fmt.Errorf("failed to get kind version: %w", err) } @@ -556,7 +490,7 @@ func (k *KindSpec) create() error { } if k.Recycle { log.Infof("Attempting to recycle existing cluster %q...", k.Name) - if err := logCommand("kubectl", "cluster-info", "--context", fmt.Sprintf("kind-%s", k.Name)); err == nil { + if err := run.LogCommand("kubectl", "cluster-info", "--context", fmt.Sprintf("kind-%s", k.Name)); err == nil { log.Infof("Recycling existing cluster %q", k.Name) return nil } @@ -581,7 +515,7 @@ func (k *KindSpec) create() error { args = append(args, "--config", k.KindConfigFile) } log.Infof("Creating kind cluster with: %v", args) - if out, err := outLogCommand("kind", args...); err != nil { + if out, err := run.OutLogCommand("kind", args...); err != nil { msg := []string{} // Filter output to only show lines relevant to the error message. For kind these are lines // prefixed with "ERROR" or "Command Output". @@ -609,22 +543,22 @@ func (k *KindSpec) Deploy(ctx context.Context) error { // The set_pid_max script modifies the kernel.pid_max value to // be acceptable for the Cisco 8000e container. if _, err := os.Stat(setPIDMaxScript); err == nil { - if err := logCommand(setPIDMaxScript); err != nil { + if err := run.LogCommand(setPIDMaxScript); err != nil { return fmt.Errorf("failed to exec set_pid_max script: %w", err) } } for _, s := range k.AdditionalManifests { log.Infof("Found manifest %q", s) - if err := logCommand("kubectl", "apply", "-f", s); err != nil { + if err := run.LogCommand("kubectl", "apply", "-f", s); err != nil { return fmt.Errorf("failed to deploy manifest: %w", err) } } if len(k.GoogleArtifactRegistries) != 0 { - log.Infof("Setting up Google Artifact Registry access for %v", k.GoogleArtifactRegistries) + log.Infof("Setting up GAR access for %v", k.GoogleArtifactRegistries) if err := k.setupGoogleArtifactRegistryAccess(ctx); err != nil { - return fmt.Errorf("failed to setup Google artifact registry access: %w", err) + return fmt.Errorf("failed to setup GAR access: %w", err) } } @@ -643,14 +577,14 @@ func (k *KindSpec) Delete() error { if k.Name != "" { args = append(args, "--name", k.Name) } - if err := logCommand("kind", args...); err != nil { + if err := run.LogCommand("kind", args...); err != nil { return fmt.Errorf("failed to delete cluster: %w", err) } return nil } func (k *KindSpec) Healthy() error { - if err := logCommand("kubectl", "cluster-info", "--context", fmt.Sprintf("kind-%s", k.GetName())); err != nil { + if err := run.LogCommand("kubectl", "cluster-info", "--context", fmt.Sprintf("kind-%s", k.GetName())); err != nil { return fmt.Errorf("cluster not healthy: %w", err) } return nil @@ -672,62 +606,7 @@ func (k *KindSpec) Apply(cfg []byte) error { } func (k *KindSpec) setupGoogleArtifactRegistryAccess(ctx context.Context) error { - // Create a temporary dir to hold a new docker config that lacks credsStore. - // Then use `docker login` to store the generated credentials directly in - // the temporary docker config. - // See https://kind.sigs.k8s.io/docs/user/private-registries/#use-an-access-token - // for more information. - tempDockerDir, err := os.MkdirTemp("", "kne_kind_docker") - if err != nil { - return err - } - defer os.RemoveAll(tempDockerDir) - originalConfig := os.Getenv(dockerConfigEnvVar) - defer os.Setenv(dockerConfigEnvVar, originalConfig) - if err := os.Setenv(dockerConfigEnvVar, tempDockerDir); err != nil { - return err - } - configPath := filepath.Join(tempDockerDir, "config.json") - if err := writeDockerConfig(configPath, k.GoogleArtifactRegistries); err != nil { - return err - } - creds, err := googleFindDefaultCredentials(ctx, "https://www.googleapis.com/auth/cloud-platform") - if err != nil { - return fmt.Errorf("failed to find gcloud credentials: %v", err) - } - token, err := creds.TokenSource.Token() - if err != nil { - return fmt.Errorf("failed to get token from gcloud credentials: %v", err) - } - // Logs will show up as coming from logshim.go. Since this is output - // from an external program that is the best we can do. - for _, r := range k.GoogleArtifactRegistries { - s := fmt.Sprintf("https://%s", r) - if err := logCommand("docker", "login", "-u", "oauth2accesstoken", "-p", token.AccessToken, s); err != nil { - return err - } - } - args := []string{"get", "nodes"} - if k.Name != "" { - args = append(args, "--name", k.Name) - } - nodes, err := outCommand("kind", args...) - if err != nil { - return err - } - // Copy the new docker config to each node and restart kubelet so it - // picks up the new config that contains the embedded credentials. - for _, node := range strings.Split(string(nodes), " ") { - node = strings.TrimSuffix(node, "\n") - if err := logCommand("docker", "cp", configPath, fmt.Sprintf(kubeletConfigPathTemplate, node)); err != nil { - return err - } - if err := logCommand("docker", "exec", node, "systemctl", "restart", "kubelet.service"); err != nil { - return err - } - } - log.Infof("Setup credentials for accessing GAR locations %v in kind cluster", k.GoogleArtifactRegistries) - return nil + return kindSetupGARAccess(ctx, k.GoogleArtifactRegistries) } func (k *KindSpec) loadContainerImages() error { @@ -745,7 +624,7 @@ func (k *KindSpec) loadContainerImages() error { var out []byte var err error for ; ; retries-- { - out, err = outCommand("docker", "pull", s) + out, err = run.OutCommand("docker", "pull", s) // Command succeeded or out of retries then break. if err == nil || retries == 0 { break @@ -762,7 +641,7 @@ func (k *KindSpec) loadContainerImages() error { return err } if d != s { - if err := logCommand("docker", "tag", s, d); err != nil { + if err := run.LogCommand("docker", "tag", s, d); err != nil { return fmt.Errorf("failed to tag %q with %q: %w", s, d, err) } } @@ -770,7 +649,7 @@ func (k *KindSpec) loadContainerImages() error { if k.Name != "" { args = append(args, "--name", k.Name) } - if err := logCommand("kind", args...); err != nil { + if err := run.LogCommand("kind", args...); err != nil { return fmt.Errorf("failed to load %q: %w", d, err) } } @@ -778,30 +657,6 @@ func (k *KindSpec) loadContainerImages() error { return nil } -type DockerConfig struct { - Auths map[string]struct{} `json:"auths"` -} - -func writeDockerConfig(path string, registries []string) error { - dc := &DockerConfig{Auths: map[string]struct{}{}} - for _, r := range registries { - dc.Auths[r] = struct{}{} - } - b, err := json.MarshalIndent(dc, "", " ") - if err != nil { - return err - } - f, err := os.Create(path) - if err != nil { - return err - } - defer f.Close() - if _, err := f.Write(b); err != nil { - return err - } - return nil -} - func init() { load.Register("MetalLB", &load.Spec{ Type: MetalLBSpec{}, @@ -898,7 +753,7 @@ func (m *MetalLBSpec) Deploy(ctx context.Context) error { m.Manifest = filepath.Join(m.ManifestDir, "metallb-native.yaml") } log.Infof("Deploying MetalLB from: %s", m.Manifest) - if err := logCommand("kubectl", "apply", "-f", m.Manifest); err != nil { + if err := run.LogCommand("kubectl", "apply", "-f", m.Manifest); err != nil { return fmt.Errorf("failed to deploy metallb: %w", err) } if _, err := m.kClient.CoreV1().Secrets("metallb-system").Get(ctx, "memberlist", metav1.GetOptions{}); err != nil { @@ -1028,7 +883,7 @@ func (m *MeshnetSpec) Deploy(ctx context.Context) error { m.Manifest = filepath.Join(m.ManifestDir, "manifest.yaml") } log.Infof("Deploying Meshnet from: %s", m.Manifest) - if err := logCommand("kubectl", "apply", "-f", m.Manifest); err != nil { + if err := run.LogCommand("kubectl", "apply", "-f", m.Manifest); err != nil { return fmt.Errorf("failed to deploy meshnet: %w", err) } log.Infof("Meshnet Deployed") @@ -1102,7 +957,7 @@ func (c *CEOSLabSpec) Deploy(ctx context.Context) error { c.Operator = filepath.Join(c.ManifestDir, "manifest.yaml") } log.Infof("Deploying CEOSLab controller from: %s", c.Operator) - if err := logCommand("kubectl", "apply", "-f", c.Operator); err != nil { + if err := run.LogCommand("kubectl", "apply", "-f", c.Operator); err != nil { return fmt.Errorf("failed to deploy ceoslab operator: %w", err) } log.Infof("CEOSLab controller deployed") @@ -1151,7 +1006,7 @@ func (l *LemmingSpec) Deploy(ctx context.Context) error { l.Operator = filepath.Join(l.ManifestDir, "manifest.yaml") } log.Infof("Deploying Lemming controller from: %s", l.Operator) - if err := logCommand("kubectl", "apply", "-f", l.Operator); err != nil { + if err := run.LogCommand("kubectl", "apply", "-f", l.Operator); err != nil { return fmt.Errorf("failed to deploy lemming operator: %w", err) } log.Infof("Lemming controller deployed") @@ -1200,7 +1055,7 @@ func (s *SRLinuxSpec) Deploy(ctx context.Context) error { s.Operator = filepath.Join(s.ManifestDir, "manifest.yaml") } log.Infof("Deploying SRLinux controller from: %s", s.Operator) - if err := logCommand("kubectl", "apply", "-f", s.Operator); err != nil { + if err := run.LogCommand("kubectl", "apply", "-f", s.Operator); err != nil { return fmt.Errorf("failed to deploy srlinux operator: %w", err) } log.Infof("SRLinux controller deployed") @@ -1251,7 +1106,7 @@ func (i *IxiaTGSpec) Deploy(ctx context.Context) error { i.Operator = filepath.Join(i.ManifestDir, "ixiatg-operator.yaml") } log.Infof("Deploying IxiaTG controller from: %s", i.Operator) - if err := logCommand("kubectl", "apply", "-f", i.Operator); err != nil { + if err := run.LogCommand("kubectl", "apply", "-f", i.Operator); err != nil { return fmt.Errorf("failed to deploy ixiatg operator: %w", err) } @@ -1285,7 +1140,7 @@ func (i *IxiaTGSpec) Deploy(ctx context.Context) error { i.ConfigMap = f.Name() } log.Infof("Deploying IxiaTG config map from: %s", i.ConfigMap) - if err := logCommand("kubectl", "apply", "-f", i.ConfigMap); err != nil { + if err := run.LogCommand("kubectl", "apply", "-f", i.ConfigMap); err != nil { return fmt.Errorf("failed to deploy ixiatg config map: %w", err) } log.Infof("IxiaTG controller deployed") diff --git a/deploy/deploy_test.go b/deploy/deploy_test.go index 4cd6cde3..683e6c4d 100644 --- a/deploy/deploy_test.go +++ b/deploy/deploy_test.go @@ -1,7 +1,6 @@ package deploy import ( - "bytes" "context" "fmt" "testing" @@ -11,15 +10,13 @@ import ( "github.com/docker/docker/api/types/network" "github.com/golang/mock/gomock" "github.com/google/go-cmp/cmp" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" mfake "github.com/openconfig/kne/api/metallb/clientset/v1beta1/fake" "github.com/openconfig/kne/deploy/mocks" kexec "github.com/openconfig/kne/exec" fexec "github.com/openconfig/kne/exec/fake" "github.com/pkg/errors" metallbv1 "go.universe.tf/metallb/api/v1beta1" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -32,127 +29,13 @@ import ( ) const ( - verbose = true - fakeAccessToken = "some-fake-token" + verbose = true ) func init() { klog.LogToStderr(false) } -func TestRunCommand(t *testing.T) { - tests := []struct { - desc string - writeLogs bool - in string - cmd string - args []string - resp []fexec.Response - want string - wantInfos string - wantWarnings string - wantErr string - }{{ - desc: "log no input", - writeLogs: true, - cmd: "echo", - args: []string{"hello"}, - resp: []fexec.Response{ - {Cmd: "echo", Args: []string{"hello"}, Stdout: "hello"}, - }, - want: "hello", - wantInfos: "(echo): hello", - }, { - desc: "log no input with stderr", - writeLogs: true, - cmd: "echo", - args: []string{"hello"}, - resp: []fexec.Response{ - {Cmd: "echo", Args: []string{"hello"}, Stdout: "hello", Stderr: "err"}, - }, - want: "helloerr", - wantInfos: "(echo): hello", - wantWarnings: "(echo): err", - }, { - desc: "log with input", - writeLogs: true, - in: "echo hello", - cmd: "cat", - resp: []fexec.Response{ - {Cmd: "cat", Stdout: "hello"}, - }, - want: "hello", - wantInfos: "(cat): hello", - }, { - desc: "no log no input", - cmd: "echo", - args: []string{"hello"}, - resp: []fexec.Response{ - {Cmd: "echo", Args: []string{"hello"}, Stdout: "hello"}, - }, - want: "hello", - }, { - desc: "no log with input", - in: "echo hello", - cmd: "cat", - resp: []fexec.Response{ - {Cmd: "cat", Stdout: "hello"}, - }, - want: "hello", - }, { - desc: "failed command", - cmd: "false", - resp: []fexec.Response{ - {Cmd: "false", Err: "failure"}, - }, - wantErr: "failure", - }} - for _, tt := range tests { - t.Run(tt.desc, func(t *testing.T) { - if verbose { - fexec.LogCommand = func(s string) { - t.Logf("%s: %s", tt.desc, s) - } - } - cmds := fexec.Commands(tt.resp) - kexec.Command = cmds.Command - defer checkCmds(t, cmds) - - origLogInfo := logInfo - defer func() { - logInfo = origLogInfo - }() - var infos bytes.Buffer - logInfo = func(args ...interface{}) { - fmt.Fprint(&infos, args...) - } - - origLogWarning := logWarning - defer func() { - logWarning = origLogWarning - }() - var warnings bytes.Buffer - logWarning = func(args ...interface{}) { - fmt.Fprint(&warnings, args...) - } - - got, err := runCommand(tt.writeLogs, []byte(tt.in), tt.cmd, tt.args...) - if s := errdiff.Substring(err, tt.wantErr); s != "" { - t.Fatalf("unexpected error: %s", s) - } - if string(got) != tt.want { - t.Errorf("runCommand() got output %v, want %v", string(got), tt.want) - } - if string(infos.Bytes()) != tt.wantInfos { - t.Errorf("runCommand() got info logs %v, want %v", string(infos.Bytes()), tt.wantInfos) - } - if string(warnings.Bytes()) != tt.wantWarnings { - t.Errorf("runCommand() got warning logs %v, want %v", string(warnings.Bytes()), tt.wantWarnings) - } - }) - } -} - func TestKubectlApply(t *testing.T) { tests := []struct { desc string @@ -208,13 +91,12 @@ func TestKindSpec(t *testing.T) { pullRetryDelay = time.Millisecond tests := []struct { - desc string - k *KindSpec - resp []fexec.Response - execPathErr bool - findCredsErr bool - tokenSourceErr bool - wantErr string + desc string + k *KindSpec + resp []fexec.Response + execPathErr bool + setupGARErr bool + wantErr string }{{ desc: "create cluster with cli", k: &KindSpec{ @@ -259,104 +141,25 @@ func TestKindSpec(t *testing.T) { }, wantErr: "failed to create cluster", }, { - desc: "create cluster with GAR - 1 reg", - k: &KindSpec{ - Name: "test", - GoogleArtifactRegistries: []string{"us-west1-docker.pkg.dev"}, - }, - resp: []fexec.Response{ - {Cmd: "kind", Args: []string{"create", "cluster", "--name", "test"}}, - {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "-p", fakeAccessToken, "https://us-west1-docker.pkg.dev"}}, - {Cmd: "kind", Args: []string{"get", "nodes", "--name", "test"}}, - {Cmd: "docker", Args: []string{"cp", ".*/config.json", ":/var/lib/kubelet/config.json"}}, - {Cmd: "docker", Args: []string{"exec", "", "systemctl", "restart", "kubelet.service"}}, - }, - }, { - desc: "create cluster with GAR - 2 regs", + desc: "create cluster with GAR", k: &KindSpec{ Name: "test", GoogleArtifactRegistries: []string{"us-west1-docker.pkg.dev", "us-central1-docker.pkg.dev"}, }, - resp: []fexec.Response{ - {Cmd: "kind", Args: []string{"create", "cluster", "--name", "test"}}, - {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "-p", fakeAccessToken, "https://us-west1-docker.pkg.dev"}}, - {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "-p", fakeAccessToken, "https://us-central1-docker.pkg.dev"}}, - {Cmd: "kind", Args: []string{"get", "nodes", "--name", "test"}}, - {Cmd: "docker", Args: []string{"cp", ".*/config.json", ":/var/lib/kubelet/config.json"}}, - {Cmd: "docker", Args: []string{"exec", "", "systemctl", "restart", "kubelet.service"}}, - }, - }, { - desc: "create cluster with GAR - failed to get creds", - k: &KindSpec{ - Name: "test", - GoogleArtifactRegistries: []string{"us-west1-docker.pkg.dev"}, - }, - resp: []fexec.Response{ - {Cmd: "kind", Args: []string{"create", "cluster", "--name", "test"}}, - }, - findCredsErr: true, - wantErr: "failed to find gcloud credentials", - }, { - desc: "create cluster with GAR - failed to get access token", - k: &KindSpec{ - Name: "test", - GoogleArtifactRegistries: []string{"us-west1-docker.pkg.dev"}, - }, resp: []fexec.Response{ {Cmd: "kind", Args: []string{"create", "cluster", "--name", "test"}}, }, - tokenSourceErr: true, - wantErr: "unable to generate token", }, { - desc: "create cluster with GAR - failed docker login", + desc: "create cluster with GAR - failure", k: &KindSpec{ Name: "test", - GoogleArtifactRegistries: []string{"us-west1-docker.pkg.dev"}, - }, - resp: []fexec.Response{ - {Cmd: "kind", Args: []string{"create", "cluster", "--name", "test"}}, - {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "-p", fakeAccessToken, "https://us-west1-docker.pkg.dev"}, Err: "failed to login to docker"}, - }, - wantErr: "failed to login to docker", - }, { - desc: "create cluster with GAR - failed to get nodes", - k: &KindSpec{ - Name: "test", - GoogleArtifactRegistries: []string{"us-west1-docker.pkg.dev"}, - }, - resp: []fexec.Response{ - {Cmd: "kind", Args: []string{"create", "cluster", "--name", "test"}}, - {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "-p", fakeAccessToken, "https://us-west1-docker.pkg.dev"}}, - {Cmd: "kind", Args: []string{"get", "nodes", "--name", "test"}, Err: "failed to get nodes"}, - }, - wantErr: "failed to get nodes", - }, { - desc: "create cluster with GAR - failed to cp config to node", - k: &KindSpec{ - Name: "test", - GoogleArtifactRegistries: []string{"us-west1-docker.pkg.dev"}, - }, - resp: []fexec.Response{ - {Cmd: "kind", Args: []string{"create", "cluster", "--name", "test"}}, - {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "-p", fakeAccessToken, "https://us-west1-docker.pkg.dev"}}, - {Cmd: "kind", Args: []string{"get", "nodes", "--name", "test"}}, - {Cmd: "docker", Args: []string{"cp", ".*/config.json", ":/var/lib/kubelet/config.json"}, Err: "failed to cp config to node"}, - }, - wantErr: "failed to cp config to node", - }, { - desc: "create cluster with GAR - failed to restart kubelet", - k: &KindSpec{ - Name: "test", - GoogleArtifactRegistries: []string{"us-west1-docker.pkg.dev"}, + GoogleArtifactRegistries: []string{"us-west1-docker.pkg.dev", "us-central1-docker.pkg.dev"}, }, resp: []fexec.Response{ {Cmd: "kind", Args: []string{"create", "cluster", "--name", "test"}}, - {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "-p", fakeAccessToken, "https://us-west1-docker.pkg.dev"}}, - {Cmd: "kind", Args: []string{"get", "nodes", "--name", "test"}}, - {Cmd: "docker", Args: []string{"cp", ".*/config.json", ":/var/lib/kubelet/config.json"}}, - {Cmd: "docker", Args: []string{"exec", "", "systemctl", "restart", "kubelet.service"}, Err: "failed to restart kubelet"}, }, - wantErr: "failed to restart kubelet", + setupGARErr: true, + wantErr: "failed to setup GAR access", }, { desc: "create cluster load containers", k: &KindSpec{ @@ -656,11 +459,11 @@ func TestKindSpec(t *testing.T) { } return "fakePath", nil } - googleFindDefaultCredentials = func(_ context.Context, _ ...string) (*google.Credentials, error) { - if tt.findCredsErr { - return nil, errors.New("unable to find default credentials") + kindSetupGARAccess = func(_ context.Context, _ []string) error { + if tt.setupGARErr { + return errors.New("unable to setup GAR access") } - return &google.Credentials{TokenSource: &fakeTokenSource{tokenErr: tt.tokenSourceErr}}, nil + return nil } err := tt.k.Deploy(ctx) if s := errdiff.Substring(err, tt.wantErr); s != "" { @@ -670,17 +473,6 @@ func TestKindSpec(t *testing.T) { } } -type fakeTokenSource struct { - tokenErr bool -} - -func (f *fakeTokenSource) Token() (*oauth2.Token, error) { - if f.tokenErr { - return nil, errors.New("unable to generate token") - } - return &oauth2.Token{AccessToken: fakeAccessToken}, nil -} - type fakeWatch struct { e []watch.Event ch chan watch.Event diff --git a/events/events_test.go b/events/events_test.go index a0cf928b..e2358fd2 100644 --- a/events/events_test.go +++ b/events/events_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/events/status_test.go b/events/status_test.go index 89c3f743..9dbdce13 100644 --- a/events/status_test.go +++ b/events/status_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" "k8s.io/apimachinery/pkg/types" kfake "k8s.io/client-go/kubernetes/fake" ) diff --git a/exec/exec_test.go b/exec/exec_test.go index 018e2c00..68132231 100644 --- a/exec/exec_test.go +++ b/exec/exec_test.go @@ -40,7 +40,8 @@ func TestCommand(t *testing.T) { { name: "failed command with no output", cmd: "false", - err: "failed: exit status 1", + + err: "failed: exit status 1", }, { name: "successful command with output", diff --git a/exec/run/run.go b/exec/run/run.go new file mode 100644 index 00000000..0449aede --- /dev/null +++ b/exec/run/run.go @@ -0,0 +1,71 @@ +package run + +import ( + "bytes" + "io" + + kexec "github.com/openconfig/kne/exec" + "github.com/openconfig/kne/logshim" + log "k8s.io/klog/v2" +) + +var ( + logInfo = log.Info + logWarning = log.Warning +) + +// runCommand is a wrapper utility function that creates and runs a command with +// various inputs and settings. +func runCommand(writeLogs bool, in []byte, cmd string, args ...string) ([]byte, error) { + c := kexec.Command(cmd, args...) + var out bytes.Buffer + c.SetStdout(&out) + c.SetStderr(&out) + if writeLogs { + outLog := logshim.New(func(v ...interface{}) { + logInfo(append([]interface{}{"(" + cmd + "): "}, v...)...) + }) + errLog := logshim.New(func(v ...interface{}) { + logWarning(append([]interface{}{"(" + cmd + "): "}, v...)...) + }) + defer func() { + outLog.Close() + errLog.Close() + }() + c.SetStdout(io.MultiWriter(outLog, &out)) + c.SetStderr(io.MultiWriter(errLog, &out)) + } + if len(in) > 0 { + c.SetStdin(bytes.NewReader(in)) + } + err := c.Run() + return out.Bytes(), err +} + +// LogCommand runs the specified command but records standard output +// with log.Info and standard error with log.Warning. +func LogCommand(cmd string, args ...string) error { + _, err := runCommand(true, nil, cmd, args...) + return err +} + +// LogCommandWithInput runs the specified command but records standard output +// with log.Info and standard error with log.Warning. in is sent to +// the standard input of the command. +func LogCommandWithInput(in []byte, cmd string, args ...string) error { + _, err := runCommand(true, in, cmd, args...) + return err +} + +// OutLogCommand runs the specified command but records standard output +// with log.Info and standard error with log.Warning. Standard output +// and standard error are also returned. +func OutLogCommand(cmd string, args ...string) ([]byte, error) { + return runCommand(true, nil, cmd, args...) +} + +// OutCommand runs the specified command and returns any standard output +// as well as any errors. +func OutCommand(cmd string, args ...string) ([]byte, error) { + return runCommand(false, nil, cmd, args...) +} diff --git a/exec/run/run_test.go b/exec/run/run_test.go new file mode 100644 index 00000000..b57a6bc9 --- /dev/null +++ b/exec/run/run_test.go @@ -0,0 +1,129 @@ +package run + +import ( + "bytes" + "fmt" + "testing" + + "github.com/openconfig/gnmi/errdiff" + kexec "github.com/openconfig/kne/exec" + fexec "github.com/openconfig/kne/exec/fake" +) + +func TestRunCommand(t *testing.T) { + tests := []struct { + desc string + writeLogs bool + in string + cmd string + args []string + resp []fexec.Response + want string + wantInfos string + wantWarnings string + wantErr string + }{{ + desc: "log no input", + writeLogs: true, + cmd: "echo", + args: []string{"hello"}, + resp: []fexec.Response{ + {Cmd: "echo", Args: []string{"hello"}, Stdout: "hello"}, + }, + want: "hello", + wantInfos: "(echo): hello", + }, { + desc: "log no input with stderr", + writeLogs: true, + cmd: "echo", + args: []string{"hello"}, + resp: []fexec.Response{ + {Cmd: "echo", Args: []string{"hello"}, Stdout: "hello", Stderr: "err"}, + }, + want: "helloerr", + wantInfos: "(echo): hello", + wantWarnings: "(echo): err", + }, { + desc: "log with input", + writeLogs: true, + in: "echo hello", + cmd: "cat", + resp: []fexec.Response{ + {Cmd: "cat", Stdout: "hello"}, + }, + want: "hello", + wantInfos: "(cat): hello", + }, { + desc: "no log no input", + cmd: "echo", + args: []string{"hello"}, + resp: []fexec.Response{ + {Cmd: "echo", Args: []string{"hello"}, Stdout: "hello"}, + }, + want: "hello", + }, { + desc: "no log with input", + in: "echo hello", + cmd: "cat", + resp: []fexec.Response{ + {Cmd: "cat", Stdout: "hello"}, + }, + want: "hello", + }, { + desc: "failed command", + cmd: "false", + resp: []fexec.Response{ + {Cmd: "false", Err: "failure"}, + }, + wantErr: "failure", + }} + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + fexec.LogCommand = func(s string) { + t.Logf("%s: %s", tt.desc, s) + } + cmds := fexec.Commands(tt.resp) + kexec.Command = cmds.Command + defer checkCmds(t, cmds) + + origLogInfo := logInfo + defer func() { + logInfo = origLogInfo + }() + var infos bytes.Buffer + logInfo = func(args ...interface{}) { + fmt.Fprint(&infos, args...) + } + + origLogWarning := logWarning + defer func() { + logWarning = origLogWarning + }() + var warnings bytes.Buffer + logWarning = func(args ...interface{}) { + fmt.Fprint(&warnings, args...) + } + + got, err := runCommand(tt.writeLogs, []byte(tt.in), tt.cmd, tt.args...) + if s := errdiff.Substring(err, tt.wantErr); s != "" { + t.Fatalf("unexpected error: %s", s) + } + if string(got) != tt.want { + t.Errorf("runCommand() got output %v, want %v", string(got), tt.want) + } + if string(infos.Bytes()) != tt.wantInfos { + t.Errorf("runCommand() got info logs %v, want %v", string(infos.Bytes()), tt.wantInfos) + } + if string(warnings.Bytes()) != tt.wantWarnings { + t.Errorf("runCommand() got warning logs %v, want %v", string(warnings.Bytes()), tt.wantWarnings) + } + }) + } +} + +func checkCmds(t *testing.T, cmds *fexec.Command) { + t.Helper() + if err := cmds.Done(); err != nil { + t.Errorf("%v", err) + } +} diff --git a/go.mod b/go.mod index c6a5616e..55af5273 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/golang/glog v1.1.2 github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.6.0 - github.com/h-fam/errdiff v1.0.2 github.com/kr/pretty v0.3.1 github.com/networkop/meshnet-cni v0.3.1-0.20230525201116-d7c306c635cf github.com/open-traffic-generator/keng-operator v0.3.14 diff --git a/go.sum b/go.sum index 380bde15..ff569e78 100644 --- a/go.sum +++ b/go.sum @@ -1910,7 +1910,6 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go. 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.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/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= diff --git a/pods/status_test.go b/pods/status_test.go index 3967a04c..d6d61c9e 100644 --- a/pods/status_test.go +++ b/pods/status_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" "k8s.io/apimachinery/pkg/types" kfake "k8s.io/client-go/kubernetes/fake" ) diff --git a/topo/node/alpine/alpine_test.go b/topo/node/alpine/alpine_test.go index ff9b4c7e..da58646f 100644 --- a/topo/node/alpine/alpine_test.go +++ b/topo/node/alpine/alpine_test.go @@ -19,7 +19,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" apb "github.com/openconfig/kne/proto/alpine" tpb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" diff --git a/topo/node/arista/arista_test.go b/topo/node/arista/arista_test.go index 64f5f4ad..6f94b352 100644 --- a/topo/node/arista/arista_test.go +++ b/topo/node/arista/arista_test.go @@ -23,7 +23,7 @@ import ( ceosclient "github.com/aristanetworks/arista-ceoslab-operator/v2/api/v1alpha1/dynamic" fakeclient "github.com/aristanetworks/arista-ceoslab-operator/v2/api/v1alpha1/dynamic/fake" "github.com/google/go-cmp/cmp" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" ceospb "github.com/openconfig/kne/proto/ceos" topopb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" diff --git a/topo/node/cisco/cisco_test.go b/topo/node/cisco/cisco_test.go index d7f50204..e8fabe12 100644 --- a/topo/node/cisco/cisco_test.go +++ b/topo/node/cisco/cisco_test.go @@ -21,21 +21,19 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" + tpb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" + scrapliopts "github.com/scrapli/scrapligo/driver/options" + scraplitransport "github.com/scrapli/scrapligo/transport" + scrapliutil "github.com/scrapli/scrapligo/util" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/encoding/prototext" "google.golang.org/protobuf/testing/protocmp" - "k8s.io/client-go/kubernetes/fake" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - tpb "github.com/openconfig/kne/proto/topo" - scrapliopts "github.com/scrapli/scrapligo/driver/options" - scraplitransport "github.com/scrapli/scrapligo/transport" - scrapliutil "github.com/scrapli/scrapligo/util" + "k8s.io/client-go/kubernetes/fake" ) func init() { diff --git a/topo/node/gobgp/gobgp_test.go b/topo/node/gobgp/gobgp_test.go index 9c3f3e21..a18cba7b 100644 --- a/topo/node/gobgp/gobgp_test.go +++ b/topo/node/gobgp/gobgp_test.go @@ -3,12 +3,11 @@ package gobgp import ( "testing" - "google.golang.org/protobuf/encoding/prototext" - "google.golang.org/protobuf/proto" - - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" topopb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/proto" ) func TestNew(t *testing.T) { diff --git a/topo/node/host/host_test.go b/topo/node/host/host_test.go index baaf5cff..799ac332 100644 --- a/topo/node/host/host_test.go +++ b/topo/node/host/host_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" topopb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" "google.golang.org/protobuf/encoding/prototext" diff --git a/topo/node/juniper/juniper_test.go b/topo/node/juniper/juniper_test.go index 8888c4a2..a656213c 100644 --- a/topo/node/juniper/juniper_test.go +++ b/topo/node/juniper/juniper_test.go @@ -15,7 +15,7 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" tpb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" scrapliopts "github.com/scrapli/scrapligo/driver/options" diff --git a/topo/node/keysight/keysight_test.go b/topo/node/keysight/keysight_test.go index ec39d348..866a76fd 100644 --- a/topo/node/keysight/keysight_test.go +++ b/topo/node/keysight/keysight_test.go @@ -3,7 +3,7 @@ package keysight import ( "testing" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" tpb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" "google.golang.org/protobuf/encoding/prototext" diff --git a/topo/node/node_test.go b/topo/node/node_test.go index c75bc2e3..774e8a26 100644 --- a/topo/node/node_test.go +++ b/topo/node/node_test.go @@ -8,14 +8,13 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" + topopb "github.com/openconfig/kne/proto/topo" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" kfake "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/rest" - - topopb "github.com/openconfig/kne/proto/topo" ) func NewNR(impl *Impl) (Node, error) { diff --git a/topo/node/nokia/nokia_test.go b/topo/node/nokia/nokia_test.go index 82ce0ab5..f381a26a 100644 --- a/topo/node/nokia/nokia_test.go +++ b/topo/node/nokia/nokia_test.go @@ -20,7 +20,7 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" topopb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" scrapliopts "github.com/scrapli/scrapligo/driver/options" diff --git a/topo/node/openconfig/openconfig_test.go b/topo/node/openconfig/openconfig_test.go index d3feeb17..9e043722 100644 --- a/topo/node/openconfig/openconfig_test.go +++ b/topo/node/openconfig/openconfig_test.go @@ -20,7 +20,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/h-fam/errdiff" + "github.com/openconfig/gnmi/errdiff" tpb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" "github.com/openconfig/lemming/operator/api/clientset" diff --git a/topo/topo.go b/topo/topo.go index eb47a92f..5846d24d 100644 --- a/topo/topo.go +++ b/topo/topo.go @@ -27,6 +27,7 @@ import ( topologyclientv1 "github.com/networkop/meshnet-cni/api/clientset/v1beta1" topologyv1 "github.com/networkop/meshnet-cni/api/types/v1beta1" "github.com/openconfig/gnmi/errlist" + "github.com/openconfig/kne/cluster/kind" "github.com/openconfig/kne/events" "github.com/openconfig/kne/metrics" "github.com/openconfig/kne/pods" @@ -57,10 +58,15 @@ import ( _ "github.com/openconfig/kne/topo/node/openconfig" ) -var protojsonUnmarshaller = protojson.UnmarshalOptions{ - AllowPartial: true, - DiscardUnknown: false, -} +var ( + protojsonUnmarshaller = protojson.UnmarshalOptions{ + AllowPartial: true, + DiscardUnknown: false, + } + + // Stubs for testing. + kindClusterIsKind = kind.ClusterIsKind +) // Manager is a topology manager for a cluster instance. type Manager struct { @@ -245,6 +251,12 @@ func (m *Manager) Create(ctx context.Context, timeout time.Duration) (rerr error finish := m.reportCreateEvent(ctx) defer func() { finish(rerr) }() } + // Refresh cluster GAR access if needed. + if isKind, err := kindClusterIsKind(); err == nil && isKind { + if err := kind.RefreshGARAccess(ctx); err != nil { + log.Warningf("Failed to refresh GAR access, cluster may need to be re-created using `kne teardown` and `kne deploy`") + } + } ctx, cancel := context.WithCancel(ctx) // Watch the containter status of the pods so we can fail if a container fails to start running. if w, err := pods.NewWatcher(ctx, m.kClient, cancel); err != nil { diff --git a/topo/topo_test.go b/topo/topo_test.go index 685d117b..ca4d8a05 100644 --- a/topo/topo_test.go +++ b/topo/topo_test.go @@ -25,9 +25,9 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/h-fam/errdiff" tfake "github.com/networkop/meshnet-cni/api/clientset/v1beta1/fake" topologyv1 "github.com/networkop/meshnet-cni/api/types/v1beta1" + "github.com/openconfig/gnmi/errdiff" cpb "github.com/openconfig/kne/proto/controller" epb "github.com/openconfig/kne/proto/event" tpb "github.com/openconfig/kne/proto/topo" @@ -446,6 +446,14 @@ func (f *fakeMetricsReporter) ReportCreateTopologyEnd(_ context.Context, _ strin func TestCreate(t *testing.T) { ctx := context.Background() + origKindClusterIsKind := kindClusterIsKind + defer func() { + kindClusterIsKind = origKindClusterIsKind + }() + kindClusterIsKind = func() (bool, error) { + return false, nil + } + origNewMetricsReporter := newMetricsReporter defer func() { newMetricsReporter = origNewMetricsReporter From ce83887c88ce72d5210d47ebf653e761d73f0277 Mon Sep 17 00:00:00 2001 From: NehaManjunath Date: Tue, 30 Jan 2024 18:50:50 -0800 Subject: [PATCH 08/33] Support multiple services in topo proto (#486) Co-authored-by: Neha Manjunath --- proto/topo.proto | 9 ++++++++- proto/topo/topo.pb.go | 46 ++++++++++++++++++++++++++++--------------- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/proto/topo.proto b/proto/topo.proto index 659d244e..f2063f27 100644 --- a/proto/topo.proto +++ b/proto/topo.proto @@ -194,7 +194,7 @@ message SelfSignedCertCfg { // service is created KNE will fill in the outside information for the user to // access the services. // The user should specify inside port for this is the port the container will -// listen on. T +// listen on. message Service { string name = 1; // Name of the service (optional) uint32 inside = 2; // Inside port to map Node (container listening port) @@ -206,4 +206,11 @@ message Service { // Used internally by KNE. string inside_ip = 4; // Cluster IP for the service. uint32 node_port = 6; // Port on the K8s worker node used by the cluster. + + // List of service names to be mapped to the port (optional). + // If only one field out of "name" or "names" is provided in the input topo, + // the unspecified field is ignored. + // If both are provided, names in both fields are considered excluding any + // duplicate values. + repeated string names = 7; } diff --git a/proto/topo/topo.pb.go b/proto/topo/topo.pb.go index 696fef6c..3988559a 100644 --- a/proto/topo/topo.pb.go +++ b/proto/topo/topo.pb.go @@ -1119,7 +1119,7 @@ func (x *SelfSignedCertCfg) GetCommonName() string { // service is created KNE will fill in the outside information for the user to // access the services. // The user should specify inside port for this is the port the container will -// listen on. T +// listen on. type Service struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1133,6 +1133,12 @@ type Service struct { // Used internally by KNE. InsideIp string `protobuf:"bytes,4,opt,name=inside_ip,json=insideIp,proto3" json:"inside_ip,omitempty"` // Cluster IP for the service. NodePort uint32 `protobuf:"varint,6,opt,name=node_port,json=nodePort,proto3" json:"node_port,omitempty"` // Port on the K8s worker node used by the cluster. + // List of service names to be mapped to the port (optional). + // If only one field out of "name" or "names" is provided in the input topo, + // the unspecified field is ignored. + // If both are provided, names in both fields are considered excluding any + // duplicate values. + Names []string `protobuf:"bytes,7,rep,name=names,proto3" json:"names,omitempty"` } func (x *Service) Reset() { @@ -1209,6 +1215,13 @@ func (x *Service) GetNodePort() uint32 { return 0 } +func (x *Service) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + var File_topo_proto protoreflect.FileDescriptor var file_topo_proto_rawDesc = []byte{ @@ -1364,7 +1377,7 @@ var file_topo_proto_rawDesc = []byte{ 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x61, 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, @@ -1374,20 +1387,21 @@ var file_topo_proto_rawDesc = []byte{ 0x64, 0x65, 0x49, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x49, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x2a, 0x98, - 0x01, 0x0a, 0x06, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, - 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, - 0x43, 0x49, 0x53, 0x43, 0x4f, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x4a, 0x55, 0x4e, 0x49, 0x50, - 0x45, 0x52, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x45, 0x59, 0x53, 0x49, 0x47, 0x48, 0x54, - 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x52, 0x52, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x51, - 0x55, 0x41, 0x47, 0x47, 0x41, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x4f, 0x42, 0x47, 0x50, - 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4b, 0x49, 0x41, 0x10, 0x09, 0x12, 0x0e, 0x0a, - 0x0a, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x0a, 0x12, 0x0a, 0x0a, - 0x06, 0x41, 0x4c, 0x50, 0x49, 0x4e, 0x45, 0x10, 0x0b, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x6f, 0x70, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x2a, 0x98, 0x01, 0x0a, 0x06, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, + 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x10, 0x03, 0x12, 0x0b, 0x0a, + 0x07, 0x4a, 0x55, 0x4e, 0x49, 0x50, 0x45, 0x52, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x45, + 0x59, 0x53, 0x49, 0x47, 0x48, 0x54, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x52, 0x52, 0x10, + 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x41, 0x47, 0x47, 0x41, 0x10, 0x07, 0x12, 0x09, 0x0a, + 0x05, 0x47, 0x4f, 0x42, 0x47, 0x50, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4b, 0x49, + 0x41, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, + 0x47, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x4c, 0x50, 0x49, 0x4e, 0x45, 0x10, 0x0b, 0x42, + 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, + 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From e0701612ab982020de4e3b11e6c4d77abb3ba5c3 Mon Sep 17 00:00:00 2001 From: anjan-keysight <84822148+anjan-keysight@users.noreply.github.com> Date: Thu, 1 Feb 2024 23:36:37 +0530 Subject: [PATCH 09/33] Ixia-c operator upgrade (#477) * Ixia-c operator upgrade * Ixia-c operator upgrade --- go.mod | 2 +- go.sum | 4 ++-- manifests/keysight/ixiatg-configmap.yaml | 8 ++++---- manifests/keysight/ixiatg-operator.yaml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 55af5273..ed592c15 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/kr/pretty v0.3.1 github.com/networkop/meshnet-cni v0.3.1-0.20230525201116-d7c306c635cf - github.com/open-traffic-generator/keng-operator v0.3.14 + github.com/open-traffic-generator/keng-operator v0.3.15 github.com/open-traffic-generator/snappi/gosnappi v0.13.0 github.com/openconfig/gnmi v0.10.0 github.com/openconfig/gnoigo v0.0.0-20231026010722-87413fdb22e7 diff --git a/go.sum b/go.sum index ff569e78..b4579a5b 100644 --- a/go.sum +++ b/go.sum @@ -1089,8 +1089,8 @@ github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/open-traffic-generator/keng-operator v0.3.14 h1:bAtQlTcxKtcVc4x3ULNw9Nj7Ry120mzoanpb3R47kGs= -github.com/open-traffic-generator/keng-operator v0.3.14/go.mod h1:+koaOnSyrJHdzxnaye+M6k+ZbszQlWI9u3tMxSpORNA= +github.com/open-traffic-generator/keng-operator v0.3.15 h1:4qMC8MaCfV7TmmrfqI7rTusOChkHpiA8maih88aLaqY= +github.com/open-traffic-generator/keng-operator v0.3.15/go.mod h1:+koaOnSyrJHdzxnaye+M6k+ZbszQlWI9u3tMxSpORNA= github.com/open-traffic-generator/snappi/gosnappi v0.13.0 h1:RdlbT+CIlVum6xbhiFr/IzTvQee5bMa3V4oBWa79UBw= github.com/open-traffic-generator/snappi/gosnappi v0.13.0/go.mod h1:QjB939WFJqUq6V7RQqkY/LFCgRRzKrybHHFp7F7xdWA= github.com/openconfig/gnmi v0.0.0-20200414194230-1597cc0f2600/go.mod h1:M/EcuapNQgvzxo1DDXHK4tx3QpYM/uG4l591v33jG2A= diff --git a/manifests/keysight/ixiatg-configmap.yaml b/manifests/keysight/ixiatg-configmap.yaml index bad3d768..56222840 100644 --- a/manifests/keysight/ixiatg-configmap.yaml +++ b/manifests/keysight/ixiatg-configmap.yaml @@ -11,12 +11,12 @@ data: { "name": "controller", "path": "ghcr.io/open-traffic-generator/keng-controller", - "tag": "0.1.0-158" + "tag": "0.1.0-222" }, { "name": "gnmi-server", "path": "ghcr.io/open-traffic-generator/otg-gnmi-server", - "tag": "1.13.4" + "tag": "1.13.7" }, { "name": "traffic-engine", @@ -26,12 +26,12 @@ data: { "name": "protocol-engine", "path": "ghcr.io/open-traffic-generator/ixia-c-protocol-engine", - "tag": "1.00.0.348" + "tag": "1.00.0.355" }, { "name": "ixhw-server", "path": "ghcr.io/open-traffic-generator/keng-layer23-hw-server", - "tag": "0.13.4-1" + "tag": "0.13.7-1" } ] } diff --git a/manifests/keysight/ixiatg-operator.yaml b/manifests/keysight/ixiatg-operator.yaml index fffc3e0a..35a3036d 100644 --- a/manifests/keysight/ixiatg-operator.yaml +++ b/manifests/keysight/ixiatg-operator.yaml @@ -387,7 +387,7 @@ spec: - --leader-elect command: - /manager - image: ghcr.io/open-traffic-generator/keng-operator:0.3.14 + image: ghcr.io/open-traffic-generator/keng-operator:0.3.15 livenessProbe: httpGet: path: /healthz From bf42d07d71aca4842361c1024c0338bdb9dd6079 Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Thu, 1 Feb 2024 11:04:52 -0800 Subject: [PATCH 10/33] remove trailing whitespace (#487) --- proto/topo.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/topo.proto b/proto/topo.proto index f2063f27..0a4ce165 100644 --- a/proto/topo.proto +++ b/proto/topo.proto @@ -207,7 +207,7 @@ message Service { string inside_ip = 4; // Cluster IP for the service. uint32 node_port = 6; // Port on the K8s worker node used by the cluster. - // List of service names to be mapped to the port (optional). + // List of service names to be mapped to the port (optional). // If only one field out of "name" or "names" is provided in the input topo, // the unspecified field is ignored. // If both are provided, names in both fields are considered excluding any From b0e9ef553ed4fcdd39791d90cf3447247609644e Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Thu, 1 Feb 2024 11:55:04 -0800 Subject: [PATCH 11/33] Fix flaky test relying on map ordering (#490) allow unordered --- cluster/kind/kind_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cluster/kind/kind_test.go b/cluster/kind/kind_test.go index be36c10d..634ee251 100644 --- a/cluster/kind/kind_test.go +++ b/cluster/kind/kind_test.go @@ -336,8 +336,8 @@ func TestRefreshGARAccess(t *testing.T) { {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, {Cmd: "docker", Args: []string{"exec", "kne-control-plane", "cat", "/var/lib/kubelet/config.json"}, Stdout: `{"auths": {"us-west1-docker.pkg.dev": {}, "us-central1-docker.pkg.dev": {}}}`}, - {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}}, - {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-central1-docker.pkg.dev"}}, + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-west1-docker.pkg.dev"}, OutOfOrder: true}, + {Cmd: "docker", Args: []string{"login", "-u", "oauth2accesstoken", "--password-stdin", "https://us-central1-docker.pkg.dev"}, OutOfOrder: true}, {Cmd: "kubectl", Args: []string{"config", "current-context"}, Stdout: "kind-kne"}, {Cmd: "kind", Args: []string{"get", "nodes", "--name", "kne"}, Stdout: "kne-control-plane"}, {Cmd: "docker", Args: []string{"cp", ".*/config.json", "kne-control-plane:/var/lib/kubelet/config.json"}}, From dba879a7d7fdfd082bcc38cd8449662e40f408ab Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Fri, 2 Feb 2024 14:26:24 -0800 Subject: [PATCH 12/33] upgrade srl controller to v0.6.1 (#492) --- go.mod | 2 +- go.sum | 4 ++-- manifests/controllers/srlinux/manifest.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index ed592c15..de99bdaf 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.17.0 - github.com/srl-labs/srl-controller v0.6.0 + github.com/srl-labs/srl-controller v0.6.1 github.com/srl-labs/srlinux-scrapli v0.6.0 go.universe.tf/metallb v0.13.5 golang.org/x/oauth2 v0.12.0 diff --git a/go.sum b/go.sum index b4579a5b..14c62d8f 100644 --- a/go.sum +++ b/go.sum @@ -1204,8 +1204,8 @@ 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.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= -github.com/srl-labs/srl-controller v0.6.0 h1:tavIPfNRcqAdqc7cvduMCCMk9JoJbqedn6LXny856tU= -github.com/srl-labs/srl-controller v0.6.0/go.mod h1:PedxdPZPtDcC+wDOKhG6uXR4xgkHxb4JhW1cXNk/eaY= +github.com/srl-labs/srl-controller v0.6.1 h1:hHduqG41wglpeVPD85RALTwWWcS+NqvU8V1pHJMQIZo= +github.com/srl-labs/srl-controller v0.6.1/go.mod h1:PedxdPZPtDcC+wDOKhG6uXR4xgkHxb4JhW1cXNk/eaY= github.com/srl-labs/srlinux-scrapli v0.6.0 h1:YQjckD+a7f6u2M+k4SmJUrDa7BFvoOTb2mMbPe6hLZM= github.com/srl-labs/srlinux-scrapli v0.6.0/go.mod h1:8hCoel3XaSyZD8hxSs8Pij/uZqaccd57mfeHgc0oJhM= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= diff --git a/manifests/controllers/srlinux/manifest.yaml b/manifests/controllers/srlinux/manifest.yaml index 5df16a9d..28f63258 100644 --- a/manifests/controllers/srlinux/manifest.yaml +++ b/manifests/controllers/srlinux/manifest.yaml @@ -490,7 +490,7 @@ spec: - --leader-elect command: - /manager - image: ghcr.io/srl-labs/srl-controller:v0.6.0 + image: ghcr.io/srl-labs/srl-controller:v0.6.1 livenessProbe: httpGet: path: /healthz @@ -519,4 +519,4 @@ spec: securityContext: runAsNonRoot: true serviceAccountName: srlinux-controller-controller-manager - terminationGracePeriodSeconds: 10 \ No newline at end of file + terminationGracePeriodSeconds: 10 From 3bbe898e6393bfcd5afc3492e2419648ede23bef Mon Sep 17 00:00:00 2001 From: Daniel Grau Date: Fri, 2 Feb 2024 17:50:26 -0800 Subject: [PATCH 13/33] Add config support for alpine (#491) * Add config support for alpine * use ethX names * rename intf as func --- topo/node/alpine/alpine.go | 74 +++++++++++++---- topo/node/alpine/alpine_test.go | 139 ++++++++++++++++++++++++-------- 2 files changed, 165 insertions(+), 48 deletions(-) diff --git a/topo/node/alpine/alpine.go b/topo/node/alpine/alpine.go index 08058e30..e822bfd7 100644 --- a/topo/node/alpine/alpine.go +++ b/topo/node/alpine/alpine.go @@ -16,6 +16,7 @@ package alpine import ( "context" "fmt" + "strings" apb "github.com/openconfig/kne/proto/alpine" tpb "github.com/openconfig/kne/proto/topo" @@ -38,9 +39,25 @@ func New(nodeImpl *node.Impl) (node.Node, error) { n := &Node{ Impl: nodeImpl, } + n.Proto.Interfaces = renameInterfaces(nodeImpl.Proto.Interfaces) return n, nil } +func renameInterfaces(in map[string]*tpb.Interface) map[string]*tpb.Interface { + idx := 1 + intf := map[string]*tpb.Interface{} + for k, v := range in { + if strings.HasPrefix(k, "Ethernet") { + name := fmt.Sprintf("eth%d", idx) + idx++ + intf[name] = v + } else { + intf[k] = v + } + } + return intf +} + type Node struct { *node.Impl } @@ -68,20 +85,23 @@ func (n *Node) CreatePod(ctx context.Context) error { initContainerImage = node.DefaultInitContainerImage } - alpineContainers := []corev1.Container{ - { - Name: pb.Name, - Image: pb.Config.Image, - Command: pb.Config.Command, - Args: pb.Config.Args, - Env: node.ToEnvVar(pb.Config.Env), - // TODO: Update resources to the containers as per the constraints - Resources: node.ToResourceRequirements(pb.Constraints), - ImagePullPolicy: "IfNotPresent", - SecurityContext: &corev1.SecurityContext{ - Privileged: pointer.Bool(true), - }, + alpineContainers := []corev1.Container{{ + Name: pb.Name, + Image: pb.Config.Image, + Command: pb.Config.Command, + Args: pb.Config.Args, + Env: node.ToEnvVar(pb.Config.Env), + // TODO: Update resources to the containers as per the constraints + Resources: node.ToResourceRequirements(pb.Constraints), + ImagePullPolicy: "IfNotPresent", + SecurityContext: &corev1.SecurityContext{ + Privileged: pointer.Bool(true), }, + }} + + var intfMap []string + for k, v := range pb.Interfaces { + intfMap = append(intfMap, fmt.Sprintf("%s:%s", v.IntName, k)) } if vendorData := pb.Config.GetVendorData(); vendorData != nil { @@ -91,12 +111,14 @@ func (n *Node) CreatePod(ctx context.Context) error { return err } - switch len := len(alpineConfig.Containers); len { + switch numContainers := len(alpineConfig.Containers); numContainers { case 0: log.Infof("Alpine custom containers not found.") case 1: dpContainer := alpineConfig.Containers[0] - + if len(intfMap) != 0 { + dpContainer.Args = append(dpContainer.Args, "--portMap="+strings.Join(intfMap, ",")) + } alpineContainers = append(alpineContainers, corev1.Container{ Name: dpContainer.Name, @@ -114,7 +136,7 @@ func (n *Node) CreatePod(ctx context.Context) error { ) default: // Only Dataplane container is supported as the custom container - return fmt.Errorf("Alpine supports only 1 custom container, %d provided.", len) + return fmt.Errorf("Alpine supports only 1 custom container, %d provided.", numContainers) } } @@ -158,6 +180,26 @@ func (n *Node) CreatePod(ctx context.Context) error { }, }, } + + if pb.Config.ConfigData != nil { + vol, err := n.CreateConfig(ctx) + if err != nil { + return err + } + pod.Spec.Volumes = append(pod.Spec.Volumes, *vol) + vm := corev1.VolumeMount{ + Name: node.ConfigVolumeName, + MountPath: pb.Config.ConfigPath + "/" + pb.Config.ConfigFile, + ReadOnly: true, + } + if vol.VolumeSource.ConfigMap != nil { + vm.SubPath = pb.Config.ConfigFile + } + for i, c := range pod.Spec.Containers { + pod.Spec.Containers[i].VolumeMounts = append(c.VolumeMounts, vm) + pod.Spec.Containers[i].Args = append(pod.Spec.Containers[i].Args, fmt.Sprintf("--config_file=%s/%s", pb.Config.ConfigPath, pb.Config.ConfigFile)) + } + } sPod, err := n.KubeClient.CoreV1().Pods(n.Namespace).Create(ctx, pod, metav1.CreateOptions{}) if err != nil { return err diff --git a/topo/node/alpine/alpine_test.go b/topo/node/alpine/alpine_test.go index da58646f..79959607 100644 --- a/topo/node/alpine/alpine_test.go +++ b/topo/node/alpine/alpine_test.go @@ -86,8 +86,44 @@ func TestNew(t *testing.T) { }, }, }, - }, - } + }, { + desc: "with interfaces", + nImpl: &node.Impl{ + Proto: &tpb.Node{ + Config: &tpb.Config{ + Image: "alpine:latest", + Command: []string{"go", "run", "main.go"}, + }, + Interfaces: map[string]*tpb.Interface{ + "Ethernet1/1/1": { + IntName: "Ethernet1/1/1", + PeerName: "peer", + PeerIntName: "Ethernet2/2/2", + }, + }, + }, + }, + want: &tpb.Node{ + Config: &tpb.Config{ + Image: "alpine:latest", + Command: []string{"go", "run", "main.go"}, + EntryCommand: fmt.Sprintf("kubectl exec -it %s -- sh", ""), + }, + Interfaces: map[string]*tpb.Interface{ + "eth1": { + IntName: "Ethernet1/1/1", + PeerName: "peer", + PeerIntName: "Ethernet2/2/2", + }, + }, + Services: map[uint32]*tpb.Service{ + 22: { + Name: "ssh", + Inside: 22, + }, + }, + }, + }} for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { n, err := New(tt.nImpl) @@ -104,16 +140,14 @@ func TestNew(t *testing.T) { } } -func TestCreateNode(t *testing.T) { +func TestCreatePod(t *testing.T) { vendorData, err := anypb.New(&apb.AlpineConfig{ - Containers: []*apb.Container{ - { - Name: "dp", - Image: "dpImage", - Command: []string{"dpCommand"}, - Args: []string{"dpArgs"}, - }, - }, + Containers: []*apb.Container{{ + Name: "dp", + Image: "dpImage", + Command: []string{"dpCommand"}, + Args: []string{"dpArgs"}, + }}, }) if err != nil { t.Fatalf("cannot marshal AlpineConfig into \"any\" protobuf: %v", err) @@ -161,32 +195,73 @@ func TestCreateNode(t *testing.T) { Privileged: pointer.Bool(true), }, }, - }, - { - desc: "get only alpine containers", - nImpl: &node.Impl{ - Proto: &tpb.Node{ - Name: "alpine", - Config: &tpb.Config{ - Image: "alpineImage", - Command: []string{"alpineCommand"}, - Args: []string{"alpineArgs"}, + }, { + desc: "get all containers with ports", + nImpl: &node.Impl{ + Proto: &tpb.Node{ + Name: "alpine", + Config: &tpb.Config{ + Image: "alpineImage", + Command: []string{"alpineCommand"}, + Args: []string{"alpineArgs"}, + VendorData: vendorData, + }, + Interfaces: map[string]*tpb.Interface{ + "eth1": { + IntName: "Ethernet1/1/1", }, }, }, - wantAlpineCtr: corev1.Container{ - Name: "alpine", - Image: "alpineImage", - Command: []string{"alpineCommand"}, - Args: []string{"alpineArgs"}, - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{}}, - ImagePullPolicy: "IfNotPresent", - SecurityContext: &corev1.SecurityContext{ - Privileged: pointer.Bool(true), + }, + wantAlpineCtr: corev1.Container{ + Name: "alpine", + Image: "alpineImage", + Command: []string{"alpineCommand"}, + Args: []string{"alpineArgs"}, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{}}, + ImagePullPolicy: "IfNotPresent", + SecurityContext: &corev1.SecurityContext{ + Privileged: pointer.Bool(true), + }, + }, + wantDpCtr: corev1.Container{ + Name: "dp", + Image: "dpImage", + Command: []string{"dpCommand"}, + Args: []string{"dpArgs", "--portMap=Ethernet1/1/1:eth1"}, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{}}, + ImagePullPolicy: "IfNotPresent", + SecurityContext: &corev1.SecurityContext{ + Privileged: pointer.Bool(true), + }, + }, + }, { + desc: "get only alpine containers", + nImpl: &node.Impl{ + Proto: &tpb.Node{ + Name: "alpine", + Config: &tpb.Config{ + Image: "alpineImage", + Command: []string{"alpineCommand"}, + Args: []string{"alpineArgs"}, }, }, - }} + }, + wantAlpineCtr: corev1.Container{ + Name: "alpine", + Image: "alpineImage", + Command: []string{"alpineCommand"}, + Args: []string{"alpineArgs"}, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{}}, + ImagePullPolicy: "IfNotPresent", + SecurityContext: &corev1.SecurityContext{ + Privileged: pointer.Bool(true), + }, + }, + }} for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { n := &Node{ From a11070285d14ac2ae8fc616f4d1d1af7e247fe67 Mon Sep 17 00:00:00 2001 From: Daniel Grau Date: Mon, 5 Feb 2024 11:40:16 -0800 Subject: [PATCH 14/33] Fix flag name and add tests (#493) --- topo/node/alpine/alpine.go | 2 +- topo/node/alpine/alpine_test.go | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/topo/node/alpine/alpine.go b/topo/node/alpine/alpine.go index e822bfd7..6c1c1ddf 100644 --- a/topo/node/alpine/alpine.go +++ b/topo/node/alpine/alpine.go @@ -117,7 +117,7 @@ func (n *Node) CreatePod(ctx context.Context) error { case 1: dpContainer := alpineConfig.Containers[0] if len(intfMap) != 0 { - dpContainer.Args = append(dpContainer.Args, "--portMap="+strings.Join(intfMap, ",")) + dpContainer.Args = append(dpContainer.Args, "--port_map="+strings.Join(intfMap, ",")) } alpineContainers = append(alpineContainers, corev1.Container{ diff --git a/topo/node/alpine/alpine_test.go b/topo/node/alpine/alpine_test.go index 79959607..a04c424b 100644 --- a/topo/node/alpine/alpine_test.go +++ b/topo/node/alpine/alpine_test.go @@ -205,6 +205,9 @@ func TestCreatePod(t *testing.T) { Command: []string{"alpineCommand"}, Args: []string{"alpineArgs"}, VendorData: vendorData, + ConfigData: &tpb.Config_Data{Data: []byte{'h', 'i'}}, + ConfigPath: "/etc/sonic", + ConfigFile: "config_db.json", }, Interfaces: map[string]*tpb.Interface{ "eth1": { @@ -217,25 +220,37 @@ func TestCreatePod(t *testing.T) { Name: "alpine", Image: "alpineImage", Command: []string{"alpineCommand"}, - Args: []string{"alpineArgs"}, + Args: []string{"alpineArgs", "--config_file=/etc/sonic/config_db.json"}, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{}}, ImagePullPolicy: "IfNotPresent", SecurityContext: &corev1.SecurityContext{ Privileged: pointer.Bool(true), }, + VolumeMounts: []corev1.VolumeMount{{ + Name: "startup-config-volume", + ReadOnly: true, + MountPath: "/etc/sonic/config_db.json", + SubPath: "config_db.json", + }}, }, wantDpCtr: corev1.Container{ Name: "dp", Image: "dpImage", Command: []string{"dpCommand"}, - Args: []string{"dpArgs", "--portMap=Ethernet1/1/1:eth1"}, + Args: []string{"dpArgs", "--port_map=Ethernet1/1/1:eth1", "--config_file=/etc/sonic/config_db.json"}, Resources: corev1.ResourceRequirements{ Requests: corev1.ResourceList{}}, ImagePullPolicy: "IfNotPresent", SecurityContext: &corev1.SecurityContext{ Privileged: pointer.Bool(true), }, + VolumeMounts: []corev1.VolumeMount{{ + Name: "startup-config-volume", + ReadOnly: true, + MountPath: "/etc/sonic/config_db.json", + SubPath: "config_db.json", + }}, }, }, { desc: "get only alpine containers", From 543c058cadaabea7bfc49fac4c833f7474e5788f Mon Sep 17 00:00:00 2001 From: NehaManjunath Date: Mon, 12 Feb 2024 13:12:50 -0800 Subject: [PATCH 15/33] Multiple services implementation (#489) * Use names in topo proto to create Services * Add unit tests * Remove debug * Resolve comments * Add tests with empty strings * Fix issues in testing * Incorporate comments * Incorporate comments * Incorporate comments * Incorporate comments * Fix tests * Fix tests * Incorporate comments * Revert "Incorporate comments" This reverts commit 412c0e01b33b77acb750687dd8b299ccae1839b5. * Add UT --------- Co-authored-by: Neha Manjunath --- topo/node/node.go | 15 ++------ topo/node/node_test.go | 3 +- topo/topo.go | 20 +++++++++++ topo/topo_test.go | 78 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 103 insertions(+), 13 deletions(-) diff --git a/topo/node/node.go b/topo/node/node.go index 6deac6cf..6ae908c2 100644 --- a/topo/node/node.go +++ b/topo/node/node.go @@ -487,24 +487,15 @@ func (n *Impl) CreateService(ctx context.Context) error { return nil } for k, v := range n.Proto.Services { - name := v.Name - if name == "" { - name = fmt.Sprintf("port-%d", k) - } if v.Outside != 0 { log.Warningf("Outside should not be set by user. The key is used as the target external port") } sp := corev1.ServicePort{ - Name: name, Protocol: "TCP", Port: int32(k), + NodePort: int32(v.NodePort), TargetPort: intstr.FromInt(int(v.Inside)), - } - if v.NodePort != 0 { - sp.NodePort = int32(v.NodePort) - } - if v.Outside != 0 { - sp.Port = int32(v.Outside) + Name: v.Name, } servicePorts = append(servicePorts, sp) } @@ -531,7 +522,7 @@ func (n *Impl) CreateService(ctx context.Context) error { if err != nil { return err } - log.V(1).Infof("Created Service:\n%v\n", sS) + log.Infof("Created Service:\n%v\n", sS) return nil } diff --git a/topo/node/node_test.go b/topo/node/node_test.go index 774e8a26..de932aa4 100644 --- a/topo/node/node_test.go +++ b/topo/node/node_test.go @@ -320,7 +320,8 @@ func TestService(t *testing.T) { }, }), wantCreateErr: `"service-dev1" already exists`, - }} + }, + } for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { n := &Impl{ diff --git a/topo/topo.go b/topo/topo.go index 5846d24d..fd39c9e2 100644 --- a/topo/topo.go +++ b/topo/topo.go @@ -574,6 +574,9 @@ func (m *Manager) push(ctx context.Context) error { log.Infof("Creating Node Pods") for _, n := range m.nodes { + for key, service := range n.GetProto().Services { + updateServicePortName(service, key) + } if err := n.Create(ctx); err != nil { return fmt.Errorf("failed to create node %s: %w", n, err) } @@ -590,6 +593,23 @@ func (m *Manager) push(ctx context.Context) error { return nil } +func updateServicePortName(s *tpb.Service, port uint32) { + i := 0 + for _, name := range s.Names { + if name != "" { + s.Names[i] = name + i++ + } + } + s.Names = s.Names[:i] + + if s.Name == "" && len(s.Names) > 0 { + s.Name = s.Names[0] + } else if s.Name == "" { + s.Name = fmt.Sprintf("port-%d", port) + } +} + // createMeshnetTopologies creates meshnet resources for all available nodes. func (m *Manager) createMeshnetTopologies(ctx context.Context) error { log.Infof("Getting topology specs for namespace %s", m.topo.Name) diff --git a/topo/topo_test.go b/topo/topo_test.go index ca4d8a05..b319ffe4 100644 --- a/topo/topo_test.go +++ b/topo/topo_test.go @@ -1944,3 +1944,81 @@ func TestStateMap(t *testing.T) { }) } } + +func TestUpdateServicePortName(t *testing.T) { + tests := []struct { + desc string + key uint32 + svc *tpb.Service + want *tpb.Service + }{ + { + desc: "services valid names with duplicates", + svc: &tpb.Service{ + Name: "gnmi", + Names: []string{"gnmi", "gribi", "gribi"}, + Inside: 9339, + }, + want: &tpb.Service{ + Name: "gnmi", + Names: []string{"gnmi", "gribi", "gribi"}, + Inside: 9339, + }, + }, + { + desc: "services valid names with empty name", + svc: &tpb.Service{ + Names: []string{"gnmi", "gribi"}, + Inside: 9339, + }, + want: &tpb.Service{ + Name: "gnmi", + Names: []string{"gnmi", "gribi"}, + Inside: 9339, + }, + }, + { + desc: "services valid names with empty string", + svc: &tpb.Service{ + Name: "gnmi", + Names: []string{"", "gribi"}, + Inside: 9339, + }, + want: &tpb.Service{ + Name: "gnmi", + Names: []string{"gribi"}, + Inside: 9339, + }, + }, + { + desc: "services empty name and names", + svc: &tpb.Service{ + Inside: 9339, + }, + key: uint32(1000), + want: &tpb.Service{ + Name: "port-1000", + Inside: 9339, + }, + }, + { + desc: "services valid name with empty names", + svc: &tpb.Service{ + Name: "gnmi", + Inside: 9339, + }, + key: uint32(1000), + want: &tpb.Service{ + Name: "gnmi", + Inside: 9339, + }, + }, + } + + for _, tt := range tests { + updateServicePortName(tt.svc, tt.key) + if s := cmp.Diff(tt.svc, tt.want, protocmp.Transform()); s != "" { + t.Fatalf("updateServicePortName() failed: %s \n\n got: %s", s, tt.svc) + } + } +} From 3698881f26baf2cd38f90542e74164cd8f741df0 Mon Sep 17 00:00:00 2001 From: jasdeep-hundal Date: Mon, 12 Feb 2024 15:37:52 -0800 Subject: [PATCH 16/33] Update KENG versions in manifest (#495) --- manifests/keysight/ixiatg-configmap.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/keysight/ixiatg-configmap.yaml b/manifests/keysight/ixiatg-configmap.yaml index 56222840..e189a799 100644 --- a/manifests/keysight/ixiatg-configmap.yaml +++ b/manifests/keysight/ixiatg-configmap.yaml @@ -11,12 +11,12 @@ data: { "name": "controller", "path": "ghcr.io/open-traffic-generator/keng-controller", - "tag": "0.1.0-222" + "tag": "1.0.0-7" }, { "name": "gnmi-server", "path": "ghcr.io/open-traffic-generator/otg-gnmi-server", - "tag": "1.13.7" + "tag": "1.13.8" }, { "name": "traffic-engine", @@ -26,12 +26,12 @@ data: { "name": "protocol-engine", "path": "ghcr.io/open-traffic-generator/ixia-c-protocol-engine", - "tag": "1.00.0.355" + "tag": "1.00.0.358" }, { "name": "ixhw-server", "path": "ghcr.io/open-traffic-generator/keng-layer23-hw-server", - "tag": "0.13.7-1" + "tag": "1.0.0-1" } ] } From 6b835bcbc9314591b256796334e6e86b881af523 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Feb 2024 16:24:06 -0800 Subject: [PATCH 17/33] Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#474) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index de99bdaf..dcc102a7 100644 --- a/go.mod +++ b/go.mod @@ -119,13 +119,13 @@ require ( github.com/subosito/gotenv v1.6.0 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 14c62d8f..1633a0d0 100644 --- a/go.sum +++ b/go.sum @@ -1280,8 +1280,8 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1545,8 +1545,8 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1559,8 +1559,8 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= 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= @@ -1579,8 +1579,8 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 08163c7433775b8a540914f177988c65f4b01506 Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Fri, 16 Feb 2024 12:07:33 -0800 Subject: [PATCH 18/33] Revert "Bump golang.org/x/crypto from 0.14.0 to 0.17.0" (#498) Revert "Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#474)" This reverts commit 6b835bcbc9314591b256796334e6e86b881af523. --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index dcc102a7..de99bdaf 100644 --- a/go.mod +++ b/go.mod @@ -119,13 +119,13 @@ require ( github.com/subosito/gotenv v1.6.0 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.17.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 1633a0d0..14c62d8f 100644 --- a/go.sum +++ b/go.sum @@ -1280,8 +1280,8 @@ golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1545,8 +1545,8 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1559,8 +1559,8 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= 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= @@ -1579,8 +1579,8 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 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/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 1d152af996f8148cc1a700904804933e0443a1b6 Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Fri, 16 Feb 2024 14:03:47 -0800 Subject: [PATCH 19/33] Add better semver parsing (#496) * add better semver parse * go mod tidy * fix test * add more tests * fix edge case with uint wrap * lint --- deploy/deploy.go | 133 ++++++++++++++++++------------------------ deploy/deploy_test.go | 18 ++++-- go.mod | 1 + go.sum | 2 + 4 files changed, 73 insertions(+), 81 deletions(-) diff --git a/deploy/deploy.go b/deploy/deploy.go index 388a391e..d56794a3 100644 --- a/deploy/deploy.go +++ b/deploy/deploy.go @@ -10,10 +10,10 @@ import ( "os" "os/exec" "path/filepath" - "strconv" "strings" "time" + "github.com/blang/semver" dtypes "github.com/docker/docker/api/types" dclient "github.com/docker/docker/client" "github.com/openconfig/gnmi/errlist" @@ -203,33 +203,10 @@ func (d *Deployment) Deploy(ctx context.Context, kubecfg string) (rerr error) { return fmt.Errorf("failed to create k8s client: %w", err) } - log.Infof("Checking kubectl versions.") - output, err := run.OutCommand("kubectl", "version", "--output=yaml") - if err != nil { - return fmt.Errorf("failed get kubectl version: %w", err) - } - kubeYAML := kubeVersion{} - if err := yaml.Unmarshal(output, &kubeYAML); err != nil { - return fmt.Errorf("failed get kubectl version: %w", err) - } - kClientVersion, err := getVersion(kubeYAML.ClientVersion.GitVersion) - if err != nil { - return fmt.Errorf("failed to parse k8s client version: %w", err) - } - kServerVersion, err := getVersion(kubeYAML.ServerVersion.GitVersion) - if err != nil { - return fmt.Errorf("failed to parse k8s server version: %w", err) - } - origMajor := kClientVersion.Major - kClientVersion.Major -= 2 - if kServerVersion.Less(kClientVersion) { - log.Warning("Kube client and server versions are not within expected range.") - } - kClientVersion.Major = origMajor + 2 - if kClientVersion.Less(kServerVersion) { - log.Warning("Kube client and server versions are not within expected range.") + log.Infof("Validating kubectl version") + if err := validateKubectlVersion(); err != nil { + return fmt.Errorf("kubectl version outside of supported range: %v", err) } - log.V(1).Info("Found k8s versions:\n", string(output)) ctx, cancel := context.WithCancel(ctx) @@ -295,6 +272,55 @@ func (d *Deployment) Deploy(ctx context.Context, kubecfg string) (rerr error) { return nil } +func validateKubectlVersion() error { + output, err := run.OutCommand("kubectl", "version", "--output=yaml") + if err != nil { + return fmt.Errorf("failed get kubectl version: %w", err) + } + log.V(1).Info("Found k8s versions:\n", string(output)) + kubeYAML := kubeVersion{} + if err := yaml.Unmarshal(output, &kubeYAML); err != nil { + return fmt.Errorf("failed get kubectl version: %w", err) + } + kClientVersion, err := parseVersion(kubeYAML.ClientVersion.GitVersion) + if err != nil { + return fmt.Errorf("failed to parse k8s client version: %w", err) + } + kServerVersion, err := parseVersion(kubeYAML.ServerVersion.GitVersion) + if err != nil { + return fmt.Errorf("failed to parse k8s server version: %w", err) + } + origMajor := kClientVersion.Major + if kClientVersion.Major < 2 { + kClientVersion.Major = 0 + } else { + kClientVersion.Major -= 2 + } + if kServerVersion.LT(kClientVersion) { + log.Warning("Kube client and server versions are not within expected range.") + } + kClientVersion.Major = origMajor + 2 + if kClientVersion.LT(kServerVersion) { + log.Warning("Kube client and server versions are not within expected range.") + } + return nil +} + +// parseVersion takes a github semver string and parses it into a comparable struct +// with prereleases and builds stripped. +func parseVersion(s string) (semver.Version, error) { + if !strings.HasPrefix(s, "v") { + return semver.Version{}, fmt.Errorf("missing prefix on major version") + } + v, err := semver.Parse(s[1:]) + if err != nil { + return semver.Version{}, err + } + v.Pre = nil + v.Build = nil + return v, nil +} + func (d *Deployment) Delete() error { log.Infof("Deleting cluster...") if err := d.Cluster.Delete(); err != nil { @@ -397,53 +423,6 @@ type KindSpec struct { AdditionalManifests []string `yaml:"additionalManifests" kne:"yaml"` } -type version struct { - Major int - Minor int - Patch int -} - -func (v version) String() string { - return fmt.Sprintf("v%d.%d.%d", v.Major, v.Minor, v.Patch) -} - -func (v version) Less(t *version) bool { - if v.Major == t.Major { - if v.Minor == t.Minor { - return v.Patch < t.Patch - } - return v.Minor < t.Minor - } - return v.Major < t.Major -} - -// getVersion takes a git version tag string "v1.20.1" and returns a version -// comparable version struct. -func getVersion(s string) (*version, error) { - versions := strings.Split(s, ".") - if len(versions) != 3 { - return nil, fmt.Errorf("failed to get versions from: %s", s) - } - v := &version{} - var err error - if !strings.HasPrefix(versions[0], "v") { - return nil, fmt.Errorf("missing prefix on major version: %s", s) - } - v.Major, err = strconv.Atoi(versions[0][1:]) - if err != nil { - return nil, fmt.Errorf("failed to convert major version: %s", s) - } - v.Minor, err = strconv.Atoi(versions[1]) - if err != nil { - return nil, fmt.Errorf("failed to convert minor version: %s", s) - } - v.Patch, err = strconv.Atoi(versions[2]) - if err != nil { - return nil, fmt.Errorf("failed to convert patch version: %s", s) - } - return v, nil -} - func (k *KindSpec) checkDependencies() error { var errs errlist.List bins := []string{"kind"} @@ -456,7 +435,7 @@ func (k *KindSpec) checkDependencies() error { return errs.Err() } if k.Version != "" { - wantV, err := getVersion(k.Version) + wantV, err := parseVersion(k.Version) if err != nil { return fmt.Errorf("failed to parse desired kind version: %w", err) } @@ -471,11 +450,11 @@ func (k *KindSpec) checkDependencies() error { return fmt.Errorf("failed to parse kind version from: %s", stdout) } - gotV, err := getVersion(vKindFields[1]) + gotV, err := parseVersion(vKindFields[1]) if err != nil { return fmt.Errorf("kind version check failed: %w", err) } - if gotV.Less(wantV) { + if gotV.LT(wantV) { return fmt.Errorf("kind version check failed: got %s, want %s. install with `go install sigs.k8s.io/kind@%s`", gotV, wantV, wantV) } log.Infof("kind version valid: got %s want %s", gotV, wantV) diff --git a/deploy/deploy_test.go b/deploy/deploy_test.go index 683e6c4d..9b0d1a6b 100644 --- a/deploy/deploy_test.go +++ b/deploy/deploy_test.go @@ -349,28 +349,28 @@ func TestKindSpec(t *testing.T) { Name: "test", Version: "versionfoo", }, - wantErr: "failed to get versions from", + wantErr: "No Major.Minor.Patch elements found", }, { desc: "failed kind version - invalid major", k: &KindSpec{ Name: "test", Version: "vr.1.1", }, - wantErr: "failed to convert major version", + wantErr: `Invalid character(s) found in major number "r"`, }, { desc: "failed kind version - invalid minor", k: &KindSpec{ Name: "test", Version: "v0.foo.15", }, - wantErr: "failed to convert minor version", + wantErr: `Invalid character(s) found in minor number "foo"`, }, { desc: "failed kind version - invalid patch", k: &KindSpec{ Name: "test", Version: "v0.1.foo", }, - wantErr: "failed to convert patch version", + wantErr: `Invalid character(s) found in patch number "foo"`, }, { desc: "failed kind version less check", k: &KindSpec{ @@ -421,6 +421,16 @@ func TestKindSpec(t *testing.T) { {Cmd: "kind", Args: []string{"version"}, Stdout: "kind v0.15.0 go1.18.2 linux/amd64"}, {Cmd: "kind", Args: []string{"create", "cluster", "--name", "test"}}, }, + }, { + desc: "kind prerelease version pass", + k: &KindSpec{ + Name: "test", + Version: "v0.15.0", + }, + resp: []fexec.Response{ + {Cmd: "kind", Args: []string{"version"}, Stdout: "kind v0.15.0-prelease go1.18.2 linux/amd64"}, + {Cmd: "kind", Args: []string{"create", "cluster", "--name", "test"}}, + }, }, { desc: "kind version pass - major", k: &KindSpec{ diff --git a/go.mod b/go.mod index de99bdaf..6aa4b173 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.21 require ( cloud.google.com/go/pubsub v1.33.0 github.com/aristanetworks/arista-ceoslab-operator/v2 v2.0.2 + github.com/blang/semver v3.5.1+incompatible github.com/docker/docker v24.0.7+incompatible github.com/ghodss/yaml v1.0.0 github.com/golang/glog v1.1.2 diff --git a/go.sum b/go.sum index 14c62d8f..7e4680a4 100644 --- a/go.sum +++ b/go.sum @@ -756,6 +756,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= 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/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= From 39a7e78a21dbfcb20587d9264f0c819790b2d725 Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Tue, 20 Feb 2024 14:50:47 -0800 Subject: [PATCH 20/33] Work towards cptx deprecation (#497) * work towards cptx deprecation * fix test * fix vendors test * fix bad default for arista --- cloudbuild/vendors/testbed.textproto | 112 ++------- cloudbuild/vendors/topology.textproto | 213 +++------------- cloudbuild/vendors/vendors_test.go | 8 - .../multivendor/multivendor-simple.pb.txt | 232 ------------------ examples/multivendor/multivendor.pb.txt | 94 +++---- examples/multivendor/{cptx.cfg => ncptx.cfg} | 0 topo/node/arista/arista.go | 2 +- topo/node/arista/arista_test.go | 2 +- topo/node/juniper/juniper.go | 2 +- topo/node/juniper/juniper_test.go | 61 +++-- .../testdata/{cptx-config => ncptx-config} | 0 11 files changed, 114 insertions(+), 612 deletions(-) delete mode 100644 examples/multivendor/multivendor-simple.pb.txt rename examples/multivendor/{cptx.cfg => ncptx.cfg} (100%) rename topo/node/juniper/testdata/{cptx-config => ncptx-config} (100%) diff --git a/cloudbuild/vendors/testbed.textproto b/cloudbuild/vendors/testbed.textproto index f8e352f0..fe987c0c 100644 --- a/cloudbuild/vendors/testbed.textproto +++ b/cloudbuild/vendors/testbed.textproto @@ -19,40 +19,10 @@ duts { ports { id: "port6" } - ports { - id: "port7" - } -} -duts { - id: "cptx" - vendor: JUNIPER - hardware_model: "cptx" - ports { - id: "port1" - } - ports { - id: "port2" - } - ports { - id: "port3" - } - ports { - id: "port4" - } - ports { - id: "port5" - } - ports { - id: "port6" - } - ports { - id: "port7" - } } duts { id: "ncptx" vendor: JUNIPER - hardware_model: "ncptx" ports { id: "port1" } @@ -71,9 +41,6 @@ duts { ports { id: "port6" } - ports { - id: "port7" - } } duts { id: "srl" @@ -96,9 +63,6 @@ duts { ports { id: "port6" } - ports { - id: "port7" - } } duts { id: "xrd" @@ -122,9 +86,6 @@ duts { ports { id: "port6" } - ports { - id: "port7" - } } duts { id: "e8000" @@ -148,9 +109,6 @@ duts { ports { id: "port6" } - ports { - id: "port7" - } } duts { id: "lemming" @@ -173,9 +131,6 @@ duts { ports { id: "port6" } - ports { - id: "port7" - } } ates { id: "otg" @@ -198,9 +153,6 @@ ates { ports { id: "port6" } - ports { - id: "port7" - } } links { a: "otg:port1" @@ -208,110 +160,82 @@ links { } links { a: "otg:port2" - b: "cptx:port1" -} -links { - a: "otg:port3" b: "ncptx:port1" } links { - a: "otg:port4" + a: "otg:port3" b: "srl:port1" } links { - a: "otg:port5" + a: "otg:port4" b: "xrd:port1" } links { - a: "otg:port6" + a: "otg:port5" b: "e8000:port1" } links { - a: "otg:port7" + a: "otg:port6" b: "lemming:port1" } links { a: "ceos:port2" - b: "cptx:port2" -} -links { - a: "ceos:port3" b: "ncptx:port2" } links { - a: "ceos:port4" + a: "ceos:port3" b: "srl:port2" } links { - a: "ceos:port5" + a: "ceos:port4" b: "xrd:port2" } links { - a: "ceos:port6" + a: "ceos:port5" b: "e8000:port2" } links { - a: "ceos:port7" + a: "ceos:port6" b: "lemming:port2" } links { - a: "cptx:port3" - b: "ncptx:port3" -} -links { - a: "cptx:port4" + a: "ncptx:port3" b: "srl:port3" } links { - a: "cptx:port5" + a: "ncptx:port4" b: "xrd:port3" } links { - a: "cptx:port6" + a: "ncptx:port5" b: "e8000:port3" } links { - a: "cptx:port7" + a: "ncptx:port6" b: "lemming:port3" } links { - a: "ncptx:port4" - b: "srl:port4" -} -links { - a: "ncptx:port5" + a: "srl:port4" b: "xrd:port4" } links { - a: "ncptx:port6" + a: "srl:port5" b: "e8000:port4" } links { - a: "ncptx:port7" + a: "srl:port6" b: "lemming:port4" } links { - a: "srl:port5" - b: "xrd:port5" -} -links { - a: "srl:port6" + a: "xrd:port5" b: "e8000:port5" } -links { - a: "srl:port7" - b: "lemming:port5" -} links { a: "xrd:port6" - b: "e8000:port6" + b: "lemming:port5" } links { - a: "xrd:port7" + a: "e8000:port6" b: "lemming:port6" } -links { - a: "e8000:port7" - b: "lemming:port7" -} diff --git a/cloudbuild/vendors/topology.textproto b/cloudbuild/vendors/topology.textproto index 318f148f..ba31224c 100644 --- a/cloudbuild/vendors/topology.textproto +++ b/cloudbuild/vendors/topology.textproto @@ -3,99 +3,18 @@ nodes: { name: "ceos" vendor: ARISTA model: "ceos" - os: "eos" config: { image: "us-west1-docker.pkg.dev/gep-kne/arista/ceos:ga" - config_path: "/mnt/flash" - config_file: "startup-config" file: "ceos.cfg" - cert: { - self_signed: { - cert_name: "gnmiCert.pem" - key_name: "gnmiCertKey.pem" - key_size: 4096 - } - } - } -} -nodes: { - name: "cptx" - vendor: JUNIPER - model: "cptx" - os: "evo" - config: { - image: "us-west1-docker.pkg.dev/gep-kne/juniper/cptx:ga" - config_path: "/home/evo/configdisk" - config_file: "juniper.conf" - file: "juniper.cfg" - cert: { - self_signed: { - cert_name: "grpc-server-cert" - key_name: "N/A" - key_size: 4096 - } - } - } - interfaces: { - key: "eth4" - value: { - name: "et-0/0/0:0" - } - } - interfaces: { - key: "eth12" - value: { - name: "et-0/0/1:0" - } - } - interfaces: { - key: "eth20" - value: { - name: "et-0/0/2:0" - } - } - interfaces: { - key: "eth28" - value: { - name: "et-0/0/3:0" - } - } - interfaces: { - key: "eth36" - value: { - name: "et-0/0/4:0" - } - } - interfaces: { - key: "eth40" - value: { - name: "et-0/0/6:0" - } - } - interfaces: { - key: "eth44" - value: { - name: "et-0/0/8:0" - } } } nodes: { name: "ncptx" vendor: JUNIPER model: "ncptx" - os: "evo" config: { image: "us-west1-docker.pkg.dev/gep-kne/juniper/ncptx:ga" - config_path: "/home/evo/configdisk" - config_file: "juniper.conf" file: "juniper.cfg" - cert: { - self_signed: { - cert_name: "grpc-server-cert" - key_name: "N/A" - key_size: 4096 - } - } } interfaces: { key: "eth5" @@ -133,12 +52,6 @@ nodes: { name: "et-0/0/6:0" } } - interfaces: { - key: "eth45" - value: { - name: "et-0/0/8:0" - } - } } nodes: { name: "srl" @@ -147,13 +60,6 @@ nodes: { config: { image: "us-west1-docker.pkg.dev/gep-kne/nokia/srlinux:ga" file: "srl.cfg" - cert: { - self_signed: { - cert_name: "kne-profile" - key_name: "N/A" - key_size: 4096 - } - } } interfaces: { key: "e1-1" @@ -191,18 +97,11 @@ nodes: { name: "ethernet-1/6" } } - interfaces: { - key: "e1-7" - value: { - name: "ethernet-1/7" - } - } } nodes: { name: "xrd" vendor: CISCO model: "xrd" - os: "ios-xr" config: { image: "us-west1-docker.pkg.dev/gep-kne/cisco/xrd:ga" file: "cisco.cfg" @@ -243,18 +142,11 @@ nodes: { name: "GigabitEthernet0/0/0/5" } } - interfaces: { - key: "eth7" - value: { - name: "GigabitEthernet0/0/0/6" - } - } } nodes: { name: "8000e" vendor: CISCO model: "8201" - os: "ios-xr" config: { image: "us-west1-docker.pkg.dev/gep-kne/cisco/8000e:ga" file: "cisco.cfg" @@ -295,12 +187,6 @@ nodes: { name: "FourHundredGigE0/0/0/5" } } - interfaces: { - key: "eth7" - value: { - name: "FourHundredGigE0/0/0/6" - } - } } nodes: { name: "lemming" @@ -322,36 +208,30 @@ links: { links: { a_node: "otg" a_int: "eth2" - z_node: "cptx" - z_int: "eth4" -} -links: { - a_node: "otg" - a_int: "eth3" z_node: "ncptx" z_int: "eth5" } links: { a_node: "otg" - a_int: "eth4" + a_int: "eth3" z_node: "srl" z_int: "e1-1" } links: { a_node: "otg" - a_int: "eth5" + a_int: "eth4" z_node: "xrd" z_int: "eth1" } links: { a_node: "otg" - a_int: "eth6" + a_int: "eth5" z_node: "8000e" z_int: "eth1" } links: { a_node: "otg" - a_int: "eth7" + a_int: "eth6" z_node: "lemming" z_int: "eth1" } @@ -359,132 +239,95 @@ links: { links: { a_node: "ceos" a_int: "eth2" - z_node: "cptx" - z_int: "eth12" -} -links: { - a_node: "ceos" - a_int: "eth3" z_node: "ncptx" z_int: "eth13" } links: { a_node: "ceos" - a_int: "eth4" + a_int: "eth3" z_node: "srl" z_int: "e1-2" } links: { a_node: "ceos" - a_int: "eth5" + a_int: "eth4" z_node: "xrd" z_int: "eth2" } links: { a_node: "ceos" - a_int: "eth6" + a_int: "eth5" z_node: "8000e" z_int: "eth2" } links: { a_node: "ceos" - a_int: "eth7" + a_int: "eth6" z_node: "lemming" z_int: "eth2" } -# Links from cptx -links: { - a_node: "cptx" - a_int: "eth20" - z_node: "ncptx" - z_int: "eth21" -} -links: { - a_node: "cptx" - a_int: "eth28" - z_node: "srl" - z_int: "e1-3" -} -links: { - a_node: "cptx" - a_int: "eth36" - z_node: "xrd" - z_int: "eth3" -} -links: { - a_node: "cptx" - a_int: "eth40" - z_node: "8000e" - z_int: "eth3" -} -links: { - a_node: "cptx" - a_int: "eth44" - z_node: "lemming" - z_int: "eth3" -} # Links from ncptx links: { a_node: "ncptx" - a_int: "eth29" + a_int: "eth21" z_node: "srl" - z_int: "e1-4" + z_int: "e1-3" } links: { a_node: "ncptx" - a_int: "eth37" + a_int: "eth29" z_node: "xrd" - z_int: "eth4" + z_int: "eth3" } links: { a_node: "ncptx" - a_int: "eth41" + a_int: "eth37" z_node: "8000e" - z_int: "eth4" + z_int: "eth3" } links: { a_node: "ncptx" - a_int: "eth45" + a_int: "eth41" z_node: "lemming" - z_int: "eth4" + z_int: "eth3" } # Links from srl links: { a_node: "srl" - a_int: "e1-5" + a_int: "e1-4" z_node: "xrd" - z_int: "eth5" + z_int: "eth4" } links: { a_node: "srl" - a_int: "e1-6" + a_int: "e1-5" z_node: "8000e" - z_int: "eth5" + z_int: "eth4" } links: { a_node: "srl" - a_int: "e1-7" + a_int: "e1-6" z_node: "lemming" - z_int: "eth5" + z_int: "eth4" } # Links from xrd links: { a_node: "xrd" - a_int: "eth6" + a_int: "eth5" z_node: "8000e" - z_int: "eth6" + z_int: "eth5" } links: { a_node: "xrd" - a_int: "eth7" + a_int: "eth6" z_node: "lemming" - z_int: "eth6" + z_int: "eth5" } # Links from 8000e links: { a_node: "8000e" - a_int: "eth7" + a_int: "eth6" z_node: "lemming" - z_int: "eth7" + z_int: "eth6" } diff --git a/cloudbuild/vendors/vendors_test.go b/cloudbuild/vendors/vendors_test.go index 7e1dd159..ff2948bf 100644 --- a/cloudbuild/vendors/vendors_test.go +++ b/cloudbuild/vendors/vendors_test.go @@ -76,14 +76,6 @@ func TestCEOS(t *testing.T) { // testP4RT(t, dut) } -func TestCTPX(t *testing.T) { - dut := ondatra.DUT(t, "cptx") - testGNMI(t, dut) - testGRIBI(t, dut) - testGNOI(t, dut) - // testP4RT(t, dut) -} - func TestNCTPX(t *testing.T) { dut := ondatra.DUT(t, "ncptx") testGNMI(t, dut) diff --git a/examples/multivendor/multivendor-simple.pb.txt b/examples/multivendor/multivendor-simple.pb.txt deleted file mode 100644 index 711abc89..00000000 --- a/examples/multivendor/multivendor-simple.pb.txt +++ /dev/null @@ -1,232 +0,0 @@ -name: "multivendor" -nodes: { - name: "ceos" - vendor: ARISTA - config: { - file: "ceos.cfg" - } -} -nodes: { - name: "cptx" - vendor: JUNIPER - config: { - file: "cptx.cfg" - } - interfaces: { - key: "eth4" - value: { - name: "et-0/0/0" - } - } - interfaces: { - key: "eth5" - value: { - name: "et-0/0/1" - } - } - interfaces: { - key: "eth6" - value: { - name: "et-0/0/2" - } - } - interfaces: { - key: "eth7" - value: { - name: "et-0/0/3" - } - } - interfaces: { - key: "eth8" - value: { - name: "et-0/0/4" - } - } - interfaces: { - key: "eth9" - value: { - name: "et-0/0/5" - } - } - interfaces: { - key: "eth10" - value: { - name: "et-0/0/6" - } - } - interfaces: { - key: "eth11" - value: { - name: "et-0/0/7" - } - } - interfaces: { - key: "eth12" - value: { - name: "et-0/0/8" - } - } - interfaces: { - key: "eth13" - value: { - name: "et-0/0/9" - } - } -} -nodes: { - name: "srl" - vendor: NOKIA - config: { - file: "srlinux.cfg" - } -} -nodes: { - name: "xrd" - vendor: CISCO - config: { - file: "xrd.cfg" - } -} -nodes: { - name: "otg" - vendor: KEYSIGHT - version: "0.0.1-9999" -} -links: { - a_node: "ceos" - a_int: "eth1" - z_node: "xrd" - z_int: "eth1" -} -links: { - a_node: "ceos" - a_int: "eth2" - z_node: "xrd" - z_int: "eth2" -} -links: { - a_node: "ceos" - a_int: "eth3" - z_node: "xrd" - z_int: "eth3" -} -# ceos - cptx -links: { - a_node: "ceos" - a_int: "eth4" - z_node: "cptx" - z_int: "eth4" -} -links: { - a_node: "ceos" - a_int: "eth5" - z_node: "cptx" - z_int: "eth5" -} -links: { - a_node: "ceos" - a_int: "eth6" - z_node: "cptx" - z_int: "eth6" -} -# xrd - cptx -links: { - a_node: "xrd" - a_int: "eth4" - z_node: "cptx" - z_int: "eth7" -} -links: { - a_node: "xrd" - a_int: "eth5" - z_node: "cptx" - z_int: "eth8" -} -links: { - a_node: "xrd" - a_int: "eth6" - z_node: "cptx" - z_int: "eth9" -} -# otg - everything -links: { - a_node: "otg" - a_int: "eth1" - z_node: "ceos" - z_int: "eth10" -} -links: { - a_node: "otg" - a_int: "eth2" - z_node: "cptx" - z_int: "eth10" -} -links: { - a_node: "otg" - a_int: "eth3" - z_node: "srl" - z_int: "eth10" -} -links: { - a_node: "otg" - a_int: "eth4" - z_node: "xrd" - z_int: "eth10" -} -# srl - ceos -links: { - a_node: "srl" - a_int: "eth1" - z_node: "ceos" - z_int: "eth7" -} -links: { - a_node: "srl" - a_int: "eth2" - z_node: "ceos" - z_int: "eth8" -} -links: { - a_node: "srl" - a_int: "eth3" - z_node: "ceos" - z_int: "eth9" -} -# srl - xrd -links: { - a_node: "srl" - a_int: "eth4" - z_node: "xrd" - z_int: "eth7" -} -links: { - a_node: "srl" - a_int: "eth5" - z_node: "xrd" - z_int: "eth8" -} -links: { - a_node: "srl" - a_int: "eth6" - z_node: "xrd" - z_int: "eth9" -} -# srl - cptx -links: { - a_node: "srl" - a_int: "eth7" - z_node: "cptx" - z_int: "eth11" -} -links: { - a_node: "srl" - a_int: "eth8" - z_node: "cptx" - z_int: "eth12" -} -links: { - a_node: "srl" - a_int: "eth9" - z_node: "cptx" - z_int: "eth13" -} diff --git a/examples/multivendor/multivendor.pb.txt b/examples/multivendor/multivendor.pb.txt index 13f1f9c6..23d74f03 100644 --- a/examples/multivendor/multivendor.pb.txt +++ b/examples/multivendor/multivendor.pb.txt @@ -2,94 +2,72 @@ name: "multivendor" nodes: { name: "ceos" vendor: ARISTA - model: "ceos" - os: "eos" config: { - config_path: "/mnt/flash" - config_file: "startup-config" file: "ceos.cfg" - cert: { - self_signed: { - cert_name: "gnmiCert.pem" - key_name: "gnmiCertKey.pem" - key_size: 4096 - } - } } } nodes: { - name: "cptx" + name: "ncptx" vendor: JUNIPER - model: "cptx" - os: "evo" config: { - config_path: "/home/evo/configdisk" - config_file: "juniper.conf" - file: "cptx.cfg" - cert: { - self_signed: { - cert_name: "grpc-server-cert", - key_name: "N/A", - key_size: 4096, - } - } + file: "ncptx.cfg" } interfaces: { - key: "eth4" + key: "eth5" value: { name: "et-0/0/0" } } interfaces: { - key: "eth5" + key: "eth6" value: { name: "et-0/0/1" } } interfaces: { - key: "eth6" + key: "eth7" value: { name: "et-0/0/2" } } interfaces: { - key: "eth7" + key: "eth8" value: { name: "et-0/0/3" } } interfaces: { - key: "eth8" + key: "eth9" value: { name: "et-0/0/4" } } interfaces: { - key: "eth9" + key: "eth10" value: { name: "et-0/0/5" } } interfaces: { - key: "eth10" + key: "eth11" value: { name: "et-0/0/6" } } interfaces: { - key: "eth11" + key: "eth12" value: { name: "et-0/0/7" } } interfaces: { - key: "eth12" + key: "eth13" value: { name: "et-0/0/8" } } interfaces: { - key: "eth13" + key: "eth14" value: { name: "et-0/0/9" } @@ -105,8 +83,6 @@ nodes: { nodes: { name: "xrd" vendor: CISCO - model: "xrd" - os: "ios-xr" config: { file: "xrd.cfg" } @@ -135,43 +111,43 @@ links: { z_node: "xrd" z_int: "eth3" } -# ceos - cptx +# ceos - ncptx links: { a_node: "ceos" a_int: "eth4" - z_node: "cptx" - z_int: "eth4" + z_node: "ncptx" + z_int: "eth5" } links: { a_node: "ceos" a_int: "eth5" - z_node: "cptx" - z_int: "eth5" + z_node: "ncptx" + z_int: "eth6" } links: { a_node: "ceos" a_int: "eth6" - z_node: "cptx" - z_int: "eth6" + z_node: "ncptx" + z_int: "eth7" } -# xrd - cptx +# xrd - ncptx links: { a_node: "xrd" a_int: "eth4" - z_node: "cptx" - z_int: "eth7" + z_node: "ncptx" + z_int: "eth8" } links: { a_node: "xrd" a_int: "eth5" - z_node: "cptx" - z_int: "eth8" + z_node: "ncptx" + z_int: "eth9" } links: { a_node: "xrd" a_int: "eth6" - z_node: "cptx" - z_int: "eth9" + z_node: "ncptx" + z_int: "eth10" } # otg - everything links: { @@ -183,8 +159,8 @@ links: { links: { a_node: "otg" a_int: "eth2" - z_node: "cptx" - z_int: "eth10" + z_node: "ncptx" + z_int: "eth11" } links: { a_node: "otg" @@ -236,22 +212,22 @@ links: { z_node: "xrd" z_int: "eth9" } -# srl - cptx +# srl - ncptx links: { a_node: "srl" a_int: "eth7" - z_node: "cptx" - z_int: "eth11" + z_node: "ncptx" + z_int: "eth12" } links: { a_node: "srl" a_int: "eth8" - z_node: "cptx" - z_int: "eth12" + z_node: "ncptx" + z_int: "eth13" } links: { a_node: "srl" a_int: "eth9" - z_node: "cptx" - z_int: "eth13" + z_node: "ncptx" + z_int: "eth14" } diff --git a/examples/multivendor/cptx.cfg b/examples/multivendor/ncptx.cfg similarity index 100% rename from examples/multivendor/cptx.cfg rename to examples/multivendor/ncptx.cfg diff --git a/topo/node/arista/arista.go b/topo/node/arista/arista.go index 2c17a010..9c55c861 100644 --- a/topo/node/arista/arista.go +++ b/topo/node/arista/arista.go @@ -403,7 +403,7 @@ func defaults(pb *tpb.Node) *tpb.Node { Config: &tpb.CertificateCfg_SelfSigned{ SelfSigned: &tpb.SelfSignedCertCfg{ CertName: "gnmiCert.pem", - KeyName: "gnmiCertKey.key", + KeyName: "gnmiCertKey.pem", KeySize: 4096, }, }, diff --git a/topo/node/arista/arista_test.go b/topo/node/arista/arista_test.go index 6f94b352..7b9fd0d4 100644 --- a/topo/node/arista/arista_test.go +++ b/topo/node/arista/arista_test.go @@ -133,7 +133,7 @@ func TestNew(t *testing.T) { Config: &topopb.CertificateCfg_SelfSigned{ SelfSigned: &topopb.SelfSignedCertCfg{ CertName: "gnmiCert.pem", - KeyName: "gnmiCertKey.key", + KeyName: "gnmiCertKey.pem", KeySize: 4096, }, }, diff --git a/topo/node/juniper/juniper.go b/topo/node/juniper/juniper.go index 632a4c41..2d0c07fc 100644 --- a/topo/node/juniper/juniper.go +++ b/topo/node/juniper/juniper.go @@ -529,7 +529,7 @@ func defaults(pb *tpb.Node) *tpb.Node { } } if pb.Model == "" { - pb.Model = ModelCPTX + pb.Model = ModelNCPTX } if pb.Os == "" { pb.Os = "evo" diff --git a/topo/node/juniper/juniper_test.go b/topo/node/juniper/juniper_test.go index a656213c..df328840 100644 --- a/topo/node/juniper/juniper_test.go +++ b/topo/node/juniper/juniper_test.go @@ -22,7 +22,6 @@ import ( scraplilogging "github.com/scrapli/scrapligo/logging" scraplitransport "github.com/scrapli/scrapligo/transport" scrapliutil "github.com/scrapli/scrapligo/util" - "google.golang.org/protobuf/encoding/prototext" "google.golang.org/protobuf/testing/protocmp" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -263,7 +262,7 @@ func TestConfigPush(t *testing.T) { Proto: validPb, }, testFile: "testdata/config_push_success", - testConf: "testdata/cptx-config", + testConf: "testdata/ncptx-config", }, { // We encounter unexpected response -- we expect to fail @@ -275,7 +274,7 @@ func TestConfigPush(t *testing.T) { Proto: validPb, }, testFile: "testdata/config_push_failure", - testConf: "testdata/cptx-config", + testConf: "testdata/ncptx-config", }, } @@ -381,7 +380,7 @@ func TestResetCfg(t *testing.T) { nImpl, err := New(tt.ni) if err != nil { - t.Fatalf("failed creating kne juniper cptx node") + t.Fatalf("failed creating kne juniper ncptx node") } n, _ := nImpl.(*Node) @@ -438,11 +437,11 @@ func TestNew(t *testing.T) { }, want: &tpb.Node{ Name: "pod1", - Model: "cptx", + Model: "ncptx", Os: "evo", Constraints: map[string]string{ - "cpu": "8", - "memory": "8Gi", + "cpu": "4", + "memory": "4Gi", }, Services: map[uint32]*tpb.Service{ 443: { @@ -469,13 +468,13 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_JUNIPER.String(), "ondatra-role": "DUT", - "model": "cptx", + "model": "ncptx", "os": "evo", }, Config: &tpb.Config{ - Image: "cptx:latest", + Image: "ncptx:latest", Command: []string{ - "/entrypoint.sh", + "/sbin/cevoCntrEntryPoint", }, Env: map[string]string{ "JUNOS_EVOLVED_CONTAINER": "1", @@ -516,11 +515,11 @@ func TestNew(t *testing.T) { }, want: &tpb.Node{ Name: "pod1", - Model: "cptx", + Model: "ncptx", Os: "evo", Constraints: map[string]string{ - "cpu": "8", - "memory": "8Gi", + "cpu": "4", + "memory": "4Gi", }, Services: map[uint32]*tpb.Service{ 443: { @@ -547,13 +546,13 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_JUNIPER.String(), "ondatra-role": "DUT", - "model": "cptx", + "model": "ncptx", "os": "evo", }, Config: &tpb.Config{ - Image: "cptx:latest", + Image: "ncptx:latest", Command: []string{ - "/entrypoint.sh", + "/sbin/cevoCntrEntryPoint", }, Env: map[string]string{ "JUNOS_EVOLVED_CONTAINER": "1", @@ -576,13 +575,13 @@ func TestNew(t *testing.T) { }, }, }, { - desc: "full proto ncptx", + desc: "full proto cptx", ni: &node.Impl{ KubeClient: fake.NewSimpleClientset(), Namespace: "test", Proto: &tpb.Node{ Name: "pod1", - Model: "ncptx", + Model: "cptx", Config: &tpb.Config{ ConfigFile: "foo", ConfigPath: "/", @@ -595,10 +594,10 @@ func TestNew(t *testing.T) { want: &tpb.Node{ Name: "pod1", Os: "evo", - Model: "ncptx", + Model: "cptx", Constraints: map[string]string{ - "cpu": "4", - "memory": "4Gi", + "cpu": "8", + "memory": "8Gi", }, Services: map[uint32]*tpb.Service{ 443: { @@ -625,13 +624,13 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_JUNIPER.String(), "ondatra-role": "DUT", - "model": "ncptx", + "model": "cptx", "os": "evo", }, Config: &tpb.Config{ - Image: "ncptx:latest", + Image: "cptx:latest", Command: []string{ - "/sbin/cevoCntrEntryPoint", + "/entrypoint.sh", }, Env: map[string]string{ "JUNOS_EVOLVED_CONTAINER": "1", @@ -661,11 +660,11 @@ func TestNew(t *testing.T) { Proto: &tpb.Node{}, }, want: &tpb.Node{ - Model: "cptx", + Model: "ncptx", Os: "evo", Constraints: map[string]string{ - "cpu": "8", - "memory": "8Gi", + "cpu": "4", + "memory": "4Gi", }, Services: map[uint32]*tpb.Service{ 443: { @@ -692,13 +691,13 @@ func TestNew(t *testing.T) { Labels: map[string]string{ "vendor": tpb.Vendor_JUNIPER.String(), "ondatra-role": "DUT", - "model": "cptx", + "model": "ncptx", "os": "evo", }, Config: &tpb.Config{ - Image: "cptx:latest", + Image: "ncptx:latest", Command: []string{ - "/entrypoint.sh", + "/sbin/cevoCntrEntryPoint", }, Env: map[string]string{ "JUNOS_EVOLVED_CONTAINER": "1", @@ -728,7 +727,7 @@ func TestNew(t *testing.T) { return } if s := cmp.Diff(tt.want, n.GetProto(), protocmp.Transform(), protocmp.IgnoreFields(&tpb.Service{}, "node_port")); s != "" { - t.Fatalf("New() failed: diff (-want, +got): %v\nwant\n\n %s\ngot\n\n%s", s, prototext.Format(tt.want), prototext.Format(n.GetProto())) + t.Fatalf("New() failed: diff (-want, +got): \n%s", s) } err = n.Create(context.Background()) if s := errdiff.Check(err, tt.cErr); s != "" { diff --git a/topo/node/juniper/testdata/cptx-config b/topo/node/juniper/testdata/ncptx-config similarity index 100% rename from topo/node/juniper/testdata/cptx-config rename to topo/node/juniper/testdata/ncptx-config From bee4549153d569a671125001627774e01b6cef16 Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Fri, 23 Feb 2024 10:21:03 -0800 Subject: [PATCH 21/33] update vendor service defaults and add tests (#499) * update vendor service defaults and add tests * fix tests and fmt * cleanup vendors test presub to test conn only --- cloudbuild/vendors/ceos.cfg | 6 + cloudbuild/vendors/vendors_test.go | 117 ++++++------ go.mod | 64 ++++--- go.sum | 228 ++++++++++++++++++------ topo/node/arista/arista.go | 12 +- topo/node/arista/arista_test.go | 24 ++- topo/node/cisco/cisco.go | 12 +- topo/node/cisco/cisco_test.go | 85 +++------ topo/node/juniper/juniper.go | 16 +- topo/node/juniper/juniper_test.go | 64 +++---- topo/node/nokia/nokia.go | 14 +- topo/node/nokia/nokia_test.go | 28 ++- topo/node/openconfig/openconfig.go | 22 +-- topo/node/openconfig/openconfig_test.go | 81 +++------ 14 files changed, 423 insertions(+), 350 deletions(-) diff --git a/cloudbuild/vendors/ceos.cfg b/cloudbuild/vendors/ceos.cfg index 6b9d6fdd..55d864aa 100644 --- a/cloudbuild/vendors/ceos.cfg +++ b/cloudbuild/vendors/ceos.cfg @@ -51,6 +51,12 @@ management api gribi transport grpc default ssl profile octa-ssl-profile ! +p4-runtime + no shutdown + ! + transport grpc default + ssl profile octa-ssl-profile +! aaa authorization exec default local ! ip route 0.0.0.0/0 null0 diff --git a/cloudbuild/vendors/vendors_test.go b/cloudbuild/vendors/vendors_test.go index ff2948bf..51252d95 100644 --- a/cloudbuild/vendors/vendors_test.go +++ b/cloudbuild/vendors/vendors_test.go @@ -1,118 +1,136 @@ package vendors_test import ( - "context" - "io" + "fmt" "sort" "testing" "github.com/google/go-cmp/cmp" "github.com/open-traffic-generator/snappi/gosnappi" - "github.com/openconfig/gnoigo/system" - gribipb "github.com/openconfig/gribi/v1/proto/service" "github.com/openconfig/ondatra" "github.com/openconfig/ondatra/gnmi" - "github.com/openconfig/ondatra/gnoi" kinit "github.com/openconfig/ondatra/knebind/init" - p4pb "github.com/p4lang/p4runtime/go/p4/v1" ) func TestMain(m *testing.M) { ondatra.RunTests(m, kinit.Init) } -func testGNMI(t *testing.T, dut *ondatra.DUTDevice) { +func testConfigPush(t *testing.T, dut *ondatra.DUTDevice) { t.Helper() - v := gnmi.Lookup(t, dut, gnmi.OC().System().State()) - if v.IsPresent() { - t.Logf("Got gNMI system state: %v", v.String()) - } + t.Run("config push", func(t *testing.T) { + tmpl := "hostname %s" + switch dut.Vendor() { + case ondatra.JUNIPER: + // TODO(alexmasi): Figure out Juniper config. + case ondatra.NOKIA: + tmpl = "host-name %s" + } + cfg := fmt.Sprintf(tmpl, dut.Name()) + dut.Config().New().WithText(cfg).Append(t) + t.Logf("Successfully pushed config for DUT %s", dut) + }) } -func testGRIBI(t *testing.T, dut *ondatra.DUTDevice) { +func testGNMI(t *testing.T, dut *ondatra.DUTDevice) { t.Helper() - c := dut.RawAPIs().GRIBI(t) - req := &gribipb.GetRequest{ - NetworkInstance: &gribipb.GetRequest_All{}, - Aft: gribipb.AFTType_ALL, - } - stream, err := c.Get(context.Background(), req) - if err != nil { - t.Fatalf("gRIBI failure: Get request failed: %v", err) - } - for { - resp, err := stream.Recv() - if err == io.EOF { - break - } - if err != nil { - t.Fatalf("gRIBI failure: failed to recv from stream: %v", err) - } - t.Logf("Got gRIBI AFT entries: %v", resp.GetEntry()) - } + t.Run("gnmi", func(t *testing.T) { + dut.RawAPIs().GNMI(t) + t.Logf("Got GNMI client for DUT %s", dut) + }) } func testGNOI(t *testing.T, dut *ondatra.DUTDevice) { t.Helper() - systemTime := gnoi.Execute(t, dut, system.NewTimeOperation()) - t.Logf("Got gNOI system time: %v", systemTime) + t.Run("gnoi", func(t *testing.T) { + dut.RawAPIs().GNOI(t) + t.Logf("Got GNOI client for DUT %s", dut) + }) +} + +func testGNSI(t *testing.T, dut *ondatra.DUTDevice) { + t.Helper() + t.Run("gnsi", func(t *testing.T) { + dut.RawAPIs().GNSI(t) + t.Logf("Got GNSI client for DUT %s", dut) + }) +} + +func testGRIBI(t *testing.T, dut *ondatra.DUTDevice) { + t.Helper() + t.Run("gribi", func(t *testing.T) { + dut.RawAPIs().GRIBI(t) + t.Logf("Got GRIBI client for DUT %s", dut) + }) } func testP4RT(t *testing.T, dut *ondatra.DUTDevice) { t.Helper() - c := dut.RawAPIs().P4RT(t) - resp, err := c.Capabilities(context.Background(), &p4pb.CapabilitiesRequest{}) - if err != nil { - t.Fatalf("P4RT failure: Capabilities request failed: %v", err) - } - t.Logf("Got P4RT Capabilities response: %v", resp) + t.Run("p4rt", func(t *testing.T) { + dut.RawAPIs().P4RT(t) + t.Logf("Got P4RT client for DUT %s", dut) + }) } func TestCEOS(t *testing.T) { dut := ondatra.DUT(t, "ceos") + testConfigPush(t, dut) testGNMI(t, dut) + testGNOI(t, dut) + // GNSI is not yet implemented by ceos. + // testGNSI(t, dut) testGRIBI(t, dut) - // testGNOI(t, dut) - // testP4RT(t, dut) + testP4RT(t, dut) } func TestNCTPX(t *testing.T) { dut := ondatra.DUT(t, "ncptx") + // TODO(alexmasi): Figure out Juniper config. + // testConfigPush(t, dut) testGNMI(t, dut) - testGRIBI(t, dut) testGNOI(t, dut) - // testP4RT(t, dut) + testGNSI(t, dut) + testGRIBI(t, dut) + testP4RT(t, dut) } func TestSRL(t *testing.T) { dut := ondatra.DUT(t, "srl") + testConfigPush(t, dut) testGNMI(t, dut) + testGNOI(t, dut) + testGNSI(t, dut) testGRIBI(t, dut) - // testGNOI(t, dut) testP4RT(t, dut) } func TestXRD(t *testing.T) { dut := ondatra.DUT(t, "xrd") + testConfigPush(t, dut) testGNMI(t, dut) - testGRIBI(t, dut) testGNOI(t, dut) - // testP4RT(t, dut) + testGNSI(t, dut) + testGRIBI(t, dut) + testP4RT(t, dut) } func Test8000e(t *testing.T) { dut := ondatra.DUT(t, "e8000") + testConfigPush(t, dut) testGNMI(t, dut) - testGRIBI(t, dut) testGNOI(t, dut) - // testP4RT(t, dut) + testGNSI(t, dut) + testGRIBI(t, dut) + testP4RT(t, dut) } func TestLemming(t *testing.T) { dut := ondatra.DUT(t, "lemming") testGNMI(t, dut) - testGRIBI(t, dut) testGNOI(t, dut) + testGNSI(t, dut) + testGRIBI(t, dut) + // P4RT is not yet implemented by lemming. // testP4RT(t, dut) } @@ -124,7 +142,6 @@ func TestOTG(t *testing.T) { cfg.Ports().Add().SetName(name) } ate.OTG().PushConfig(t, cfg) - gotPortNames := gnmi.GetAll(t, ate.OTG(), gnmi.OTG().PortAny().Name().State()) sort.Strings(gotPortNames) if !cmp.Equal(gotPortNames, portNames) { diff --git a/go.mod b/go.mod index 6aa4b173..ebe822a2 100644 --- a/go.mod +++ b/go.mod @@ -14,27 +14,24 @@ require ( github.com/kr/pretty v0.3.1 github.com/networkop/meshnet-cni v0.3.1-0.20230525201116-d7c306c635cf github.com/open-traffic-generator/keng-operator v0.3.15 - github.com/open-traffic-generator/snappi/gosnappi v0.13.0 + github.com/open-traffic-generator/snappi/gosnappi v0.13.7 github.com/openconfig/gnmi v0.10.0 - github.com/openconfig/gnoigo v0.0.0-20231026010722-87413fdb22e7 - github.com/openconfig/gribi v1.0.0 github.com/openconfig/lemming/operator v0.2.0 - github.com/openconfig/ondatra v0.4.1 - github.com/p4lang/p4runtime v1.3.0 + github.com/openconfig/ondatra v0.5.3-0.20240221005017-ee276ff6695e github.com/pborman/uuid v1.2.1 github.com/pkg/errors v0.9.1 github.com/scrapli/scrapligo v1.1.11 github.com/scrapli/scrapligocfg v1.0.0 - github.com/spf13/cobra v1.7.0 + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.17.0 github.com/srl-labs/srl-controller v0.6.1 github.com/srl-labs/srlinux-scrapli v0.6.0 go.universe.tf/metallb v0.13.5 - golang.org/x/oauth2 v0.12.0 - google.golang.org/api v0.143.0 - google.golang.org/grpc v1.59.0 - google.golang.org/protobuf v1.31.0 + golang.org/x/oauth2 v0.13.0 + google.golang.org/api v0.149.0 + google.golang.org/grpc v1.60.1 + google.golang.org/protobuf v1.32.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.26.3 k8s.io/apimachinery v0.26.3 @@ -46,10 +43,11 @@ require ( ) require ( - cloud.google.com/go v0.110.8 // indirect - cloud.google.com/go/compute v1.23.1 // indirect + bitbucket.org/creachadair/stringset v0.0.12 // indirect + cloud.google.com/go v0.111.0 // indirect + cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.3 // indirect + cloud.google.com/go/iam v1.1.5 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -66,7 +64,8 @@ require ( github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect @@ -76,8 +75,8 @@ require ( github.com/google/gnostic v0.6.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect + github.com/google/uuid v1.4.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.14 // indirect @@ -97,13 +96,16 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/openconfig/gnoi v0.2.0 // indirect + github.com/openconfig/gnoigo v0.0.0-20231026010722-87413fdb22e7 // indirect github.com/openconfig/gnsi v1.2.3 // indirect github.com/openconfig/gocloser v0.0.0-20220310182203-c6c950ed3b0b // indirect - github.com/openconfig/goyang v1.4.3 // indirect - github.com/openconfig/ygnmi v0.9.0 // indirect - github.com/openconfig/ygot v0.29.13 // indirect + github.com/openconfig/goyang v1.4.5 // indirect + github.com/openconfig/gribi v1.0.0 // indirect + github.com/openconfig/ygnmi v0.11.1 // indirect + github.com/openconfig/ygot v0.29.18 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/p4lang/p4runtime v1.3.0 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect @@ -119,20 +121,24 @@ require ( github.com/spf13/cast v1.5.1 // indirect github.com/subosito/gotenv v1.6.0 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/sdk v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.18.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sync v0.4.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 7e4680a4..1f84da5e 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +bitbucket.org/creachadair/stringset v0.0.12 h1:APD8dIoAzGv70a6p1oasPDjPwkp+ajszdgKyWUcNqo0= +bitbucket.org/creachadair/stringset v0.0.12/go.mod h1:KtNk2s0hRO1T0r78lv9Zq/S/Lp0du2zI0Fj5j5Y4LDo= 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= @@ -38,8 +40,11 @@ cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= +cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go v0.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM= +cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= @@ -57,12 +62,15 @@ cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6l cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= cloud.google.com/go/aiplatform v1.45.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/aiplatform v1.48.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/aiplatform v1.50.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= @@ -123,14 +131,19 @@ cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3 cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= +cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA= +cloud.google.com/go/baremetalsolution v1.2.0/go.mod h1:68wi9AwPYkEWIUT4SvSGS9UJwKzNpshjHsH4lzk8iOw= cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= +cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A= +cloud.google.com/go/batch v1.4.1/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= +cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= 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= @@ -145,6 +158,8 @@ cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/bigquery v1.55.0/go.mod h1:9Y5I3PN9kQWuid6183JFhOGOW3GcirA5LpsKCUn+2ec= cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= @@ -152,12 +167,14 @@ cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOA cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= +cloud.google.com/go/billing v1.17.0/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= +cloud.google.com/go/binaryauthorization v1.7.0/go.mod h1:Zn+S6QqTMn6odcMU1zDZCJxPjU2tZPV1oDl45lWY154= cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= @@ -167,16 +184,20 @@ cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= +cloud.google.com/go/channel v1.17.0/go.mod h1:RpbhJsGi/lXWAUM1eF4IbQGbsfVlg2o8Iiy2/YLfVT0= cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/cloudbuild v1.14.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= +cloud.google.com/go/clouddms v1.7.0/go.mod h1:MW1dC6SOtI/tPNCciTsXtsGNEM0i0OccykPvv3hiYeM= cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= @@ -184,6 +205,7 @@ cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQky cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= @@ -201,9 +223,9 @@ cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/ cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= -cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= @@ -213,17 +235,21 @@ cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbT cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= cloud.google.com/go/contactcenterinsights v1.9.1/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= cloud.google.com/go/container v1.22.1/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/container v1.26.0/go.mod h1:YJCmRet6+6jnYYRS000T6k0D0xUXQgBSaJ7VwI8FBj4= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= +cloud.google.com/go/containeranalysis v0.11.0/go.mod h1:4n2e99ZwpGxpNcz+YsFT1dfOHPQFGcAC8FN2M2/ne/U= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= @@ -234,6 +260,8 @@ cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3 cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= cloud.google.com/go/datacatalog v1.14.0/go.mod h1:h0PrGtlihoutNMp/uvwhawLQ9+c63Kz65UFqh49Yo+E= cloud.google.com/go/datacatalog v1.14.1/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/datacatalog v1.16.0/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/datacatalog v1.17.1/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= @@ -257,9 +285,13 @@ cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0 cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= cloud.google.com/go/dataplex v1.8.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataplex v1.9.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= +cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= +cloud.google.com/go/dataproc/v2 v2.2.0/go.mod h1:lZR7AQtwZPvmINx5J87DSOOpTfof9LVZju6/Qo4lmcY= cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= @@ -270,6 +302,8 @@ cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= cloud.google.com/go/datastore v1.12.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= cloud.google.com/go/datastore v1.12.1/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastore v1.14.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= @@ -277,11 +311,13 @@ cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2 cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= @@ -291,6 +327,8 @@ cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHih cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= cloud.google.com/go/dialogflow v1.38.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dialogflow v1.43.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= @@ -302,6 +340,8 @@ cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= cloud.google.com/go/documentai v1.20.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/documentai v1.22.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/documentai v1.22.1/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= @@ -321,6 +361,7 @@ cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEu cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= @@ -328,6 +369,8 @@ cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466d cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/firestore v1.12.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/firestore v1.13.0/go.mod h1:QojqqOh8IntInDUSTAh0c8ZsPYAr68Ma8c5DWOy8xb8= cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= @@ -345,6 +388,8 @@ cloud.google.com/go/gaming v1.10.1/go.mod h1:XQQvtfP8Rb9Rxnxm5wFVpAp9zCQkJi2bLIb cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= +cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= +cloud.google.com/go/gkebackup v1.3.1/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= @@ -358,6 +403,7 @@ cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dP cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= +cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= @@ -376,14 +422,16 @@ cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCta cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBalRE8= cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= -cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= -cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= +cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= +cloud.google.com/go/iap v1.9.0/go.mod h1:01OFxd1R+NFrg78S+hoPV5PxEzv22HXaNqUUlmNHFuY= cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= @@ -402,20 +450,24 @@ cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63 cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= cloud.google.com/go/kms v1.11.0/go.mod h1:hwdiYC0xjnWsKQQCQQmIQnS9asjYVSK6jtXm+zFqXLM= cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= -cloud.google.com/go/kms v1.15.3 h1:RYsbxTRmk91ydKCzekI2YjryO4c5Y2M80Zwcs9/D/cI= -cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= +cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/kms v1.15.2/go.mod h1:3hopT4+7ooWRCjc2DxgnpESFxhIraaI2IpAVUEhbT/w= +cloud.google.com/go/kms v1.15.5 h1:pj1sRfut2eRbD9pFRjNnPNg/CzJPuQAzUujMIM1vVeM= +cloud.google.com/go/kms v1.15.5/go.mod h1:cU2H5jnp6G2TDpUGZyqTCoy1n16fbubHZjmVXSMtwDI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= +cloud.google.com/go/language v1.11.0/go.mod h1:uDx+pFDdAKTY8ehpWbiXyQdz8tDSYLJbQcXsCkjYyvQ= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= @@ -429,6 +481,8 @@ cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHn cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= +cloud.google.com/go/maps v1.3.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= +cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= @@ -445,11 +499,13 @@ cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSox cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= +cloud.google.com/go/monitoring v1.16.0/go.mod h1:Ptp15HgAyM1fNICAojDMoNc/wUmn67mLHQfyqbw+poY= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= @@ -457,10 +513,12 @@ cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5Mp cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= +cloud.google.com/go/networkconnectivity v1.13.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= +cloud.google.com/go/networkmanagement v1.9.0/go.mod h1:UTUaEU9YwbCAhhz3jEOHr+2/K/MrBk2XxOLS89LQzFw= cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= @@ -473,10 +531,12 @@ cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vu cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= +cloud.google.com/go/notebooks v1.10.0/go.mod h1:SOPYMZnttHxqot0SGSFSkRrwE29eqnKPBJFqgWmiK2k= cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= +cloud.google.com/go/optimization v1.5.0/go.mod h1:evo1OvTxeBRBu6ydPlrIRizKY/LJKo/drDMMRKqGEUU= cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= @@ -508,6 +568,8 @@ cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LK cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= cloud.google.com/go/policytroubleshooter v1.7.1/go.mod h1:0NaT5v3Ag1M7U5r0GfDCpUFkWd9YqpubBWsQlhanRv0= +cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcVQT7nTag2+DuH3uHmKd1HU= +cloud.google.com/go/policytroubleshooter v1.9.0/go.mod h1:+E2Lga7TycpeSTj2FsH4oXxTnrbHJGRlKhVZBLGgU64= cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= @@ -547,6 +609,7 @@ cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclC cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= +cloud.google.com/go/recommender v1.11.0/go.mod h1:kPiRQhPyTJ9kyXPCG6u/dlPLbYfFlkwHNRwdzPVAoII= cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= @@ -573,6 +636,7 @@ cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldR cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= +cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo= cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= @@ -612,6 +676,7 @@ cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UV cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= @@ -628,6 +693,7 @@ cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5 cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= +cloud.google.com/go/spanner v1.49.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= @@ -635,6 +701,7 @@ cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSy cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= 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= @@ -677,6 +744,8 @@ cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXN cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= cloud.google.com/go/translate v1.8.1/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/translate v1.9.0/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= @@ -684,6 +753,8 @@ cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1t cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= cloud.google.com/go/video v1.17.1/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/video v1.20.0/go.mod h1:U3G3FTnsvAGqglq9LxgqzOiBc/Nt8zis8S+850N2DUM= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= @@ -707,6 +778,7 @@ cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= @@ -727,6 +799,7 @@ cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vf cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= +cloud.google.com/go/workflows v1.12.0/go.mod h1:PYhSk2b6DhZ508tj8HXKaBh+OFe+xdl0dHF/tJdzPQM= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= @@ -764,6 +837,7 @@ github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx2 github.com/carlmontanari/difflibgo v0.0.0-20210718194309-31b9e131c298 h1:Y8rTum6LZ8oP/2aC+OaaP76OCjHbunKMkim81mzNCH0= github.com/carlmontanari/difflibgo v0.0.0-20210718194309-31b9e131c298/go.mod h1:+3MuSIeC3qmdSesR12cTLeb47R/Vvo+bHdB6hC5HShk= github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -792,7 +866,7 @@ github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= @@ -864,8 +938,11 @@ github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpx github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -976,15 +1053,17 @@ github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8 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/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= -github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= 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/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -1003,8 +1082,8 @@ github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56 github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= @@ -1069,6 +1148,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= @@ -1093,8 +1173,8 @@ github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= github.com/open-traffic-generator/keng-operator v0.3.15 h1:4qMC8MaCfV7TmmrfqI7rTusOChkHpiA8maih88aLaqY= github.com/open-traffic-generator/keng-operator v0.3.15/go.mod h1:+koaOnSyrJHdzxnaye+M6k+ZbszQlWI9u3tMxSpORNA= -github.com/open-traffic-generator/snappi/gosnappi v0.13.0 h1:RdlbT+CIlVum6xbhiFr/IzTvQee5bMa3V4oBWa79UBw= -github.com/open-traffic-generator/snappi/gosnappi v0.13.0/go.mod h1:QjB939WFJqUq6V7RQqkY/LFCgRRzKrybHHFp7F7xdWA= +github.com/open-traffic-generator/snappi/gosnappi v0.13.7 h1:qrisl9OcqHdhUXVIJ0BXUAO8MDWf2qraNn+Oic+b8JM= +github.com/open-traffic-generator/snappi/gosnappi v0.13.7/go.mod h1:3pBcoJfsRp2B7IEcGq1w/8BwsBs7w2u6sYVqiThabmw= github.com/openconfig/gnmi v0.0.0-20200414194230-1597cc0f2600/go.mod h1:M/EcuapNQgvzxo1DDXHK4tx3QpYM/uG4l591v33jG2A= github.com/openconfig/gnmi v0.0.0-20200508230933-d19cebf5e7be/go.mod h1:M/EcuapNQgvzxo1DDXHK4tx3QpYM/uG4l591v33jG2A= github.com/openconfig/gnmi v0.10.0 h1:kQEZ/9ek3Vp2Y5IVuV2L/ba8/77TgjdXg505QXvYmg8= @@ -1110,8 +1190,8 @@ github.com/openconfig/gocloser v0.0.0-20220310182203-c6c950ed3b0b/go.mod h1:uhC/ github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU= github.com/openconfig/goyang v0.2.2/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= github.com/openconfig/goyang v0.2.9/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= -github.com/openconfig/goyang v1.4.3 h1:9sr+l1vRbON0cMZxmogMhI8JiNqIf1uJoN8o4OdNqxI= -github.com/openconfig/goyang v1.4.3/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8= +github.com/openconfig/goyang v1.4.5 h1:+s3p3MeiPQ/QNsC5DL3MXhCp5cv4dag3vlGKCtszsRU= +github.com/openconfig/goyang v1.4.5/go.mod h1:sdNZi/wdTZyLNBNfgLzmmbi7kISm7FskMDKKzMY+x1M= github.com/openconfig/gribi v0.1.1-0.20210423184541-ce37eb4ba92f/go.mod h1:OoH46A2kV42cIXGyviYmAlGmn6cHjGduyC2+I9d/iVs= github.com/openconfig/gribi v1.0.0 h1:xMwEg0mBD+21mOxuFOw0d9dBKuIPwJEhMUUeUulZdLg= github.com/openconfig/gribi v1.0.0/go.mod h1:VFqGH2ZPFIfnKTimP4/AQB4OK0eySW5muJNFxXAwP6k= @@ -1119,17 +1199,17 @@ github.com/openconfig/grpctunnel v0.0.0-20220819142823-6f5422b8ca70 h1:t6SvvdfWC github.com/openconfig/grpctunnel v0.0.0-20220819142823-6f5422b8ca70/go.mod h1:OmTWe7RyZj2CIzIgy4ovEBzCLBJzRvWSZmn7u02U9gU= github.com/openconfig/lemming/operator v0.2.0 h1:dovZnR6lQkOHXcODli1NDOr/GVYrBY05KS5X11jxVbw= github.com/openconfig/lemming/operator v0.2.0/go.mod h1:LKgEXSR5VK2CAeh2uKijKAXFj42uQuwakrCHVPF0iII= -github.com/openconfig/ondatra v0.4.1 h1:xGjdCeYlfKuEOk4PaICXgoi5PDat17h5lqHSMu98gDU= -github.com/openconfig/ondatra v0.4.1/go.mod h1:4KjgPInULA7aGf5lDMmfwg3omBbv2Lov0Pkl+AlL6jc= +github.com/openconfig/ondatra v0.5.3-0.20240221005017-ee276ff6695e h1:VENHsjmF5wvI9OahMozpG93gmLlZ8ZG/7ZcHspbsPxc= +github.com/openconfig/ondatra v0.5.3-0.20240221005017-ee276ff6695e/go.mod h1:EXU1DeElwtxxPuigdVDg01h63aS7eCXj/VKl+wSNQOw= github.com/openconfig/testt v0.0.0-20220311054427-efbb1a32ec07 h1:X631iD/B0ximGFb5P9LY5wHju4SiedxUhc5UZEo7VSw= github.com/openconfig/testt v0.0.0-20220311054427-efbb1a32ec07/go.mod h1:bmpU0kIsCiXuncozViVuQx1HqolC3C94H7lD9KKmoTo= -github.com/openconfig/ygnmi v0.9.0 h1:u3NJNoJLJZu3c+93ZgKas65mggykNg6UT/cGEnQSTzU= -github.com/openconfig/ygnmi v0.9.0/go.mod h1:JKQ8HVkxH27Q8hHQHrb5uRj2uoyZp2CmJ6JbivXtD3g= +github.com/openconfig/ygnmi v0.11.1 h1:tIHlAinvOX+8jA2YTk4ACb7IOQe1PXsjT41Ci7E2KUk= +github.com/openconfig/ygnmi v0.11.1/go.mod h1:naCxQR+/wBItM82ilJXWgapCRkrx8bphBmUHXJmRhuQ= github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs= github.com/openconfig/ygot v0.10.4/go.mod h1:oCQNdXnv7dWc8scTDgoFkauv1wwplJn5HspHcjlxSAQ= github.com/openconfig/ygot v0.13.2/go.mod h1:kJN0yCXIH07dOXvNBEFm3XxXdnDD5NI6K99tnD5x49c= -github.com/openconfig/ygot v0.29.13 h1:2YbW/k/t0uuXIoxLy0zrvBHgd1YyUCosIGFLzt3vsYQ= -github.com/openconfig/ygot v0.29.13/go.mod h1:RKbkt2O+aFotfHPCXRbyQs4c7rmM5DuEuCnZfBSnYew= +github.com/openconfig/ygot v0.29.18 h1:vgG2r7RVwaVDXgHtpsCNW+qdSGSdxqRxUfRN2rPCy7M= +github.com/openconfig/ygot v0.29.18/go.mod h1:sp6roPPmVDcTCF2E3qTjILA+jzJMkZ9d6spC9KLMqpc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -1139,6 +1219,7 @@ github.com/p4lang/p4runtime v1.3.0/go.mod h1:voPsRsgz/TDEhcaFvBxfMbI++hSKR/QGJus github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/pborman/getopt v1.1.0/go.mod h1:FxXoW1Re00sQG/+KIkuSqRL/LwQgSkv7uyac+STFsbk= github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= @@ -1167,6 +1248,7 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a/go.mod h1:KjY0wibdYKc4DYkerHSbguaf3JeIPGhNJBp2BNiFH78= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -1200,8 +1282,8 @@ github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= 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.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= @@ -1250,6 +1332,14 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= @@ -1281,9 +1371,9 @@ golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58 golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1408,9 +1498,9 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= 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= @@ -1441,9 +1531,8 @@ golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= 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= @@ -1461,8 +1550,9 @@ golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1514,6 +1604,7 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1546,9 +1637,9 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1560,9 +1651,9 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= 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= @@ -1580,9 +1671,9 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1736,16 +1827,18 @@ google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZ google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= -google.golang.org/api v0.143.0 h1:o8cekTkqhywkbZT6p1UHJPZ9+9uuCAJs/KYomxZB8fA= -google.golang.org/api v0.143.0/go.mod h1:FoX9DO9hT7DLNn97OuoZAGSDuNAXdJRuGK98rSUgurk= +google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= +google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= +google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= 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= 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/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/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= @@ -1800,6 +1893,7 @@ google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210811021853-ddbe55d93216/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= @@ -1883,22 +1977,32 @@ google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto v0.0.0-20230821184602-ccc8af3d0e93/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:CCviP9RmpZ1mxVr8MUjCnSiY09IbAXZxhLE6EhHIdPU= +google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= +google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 h1:nz5NESFLZbJGPFxDT/HCn+V1mZ8JGNoY4nUpmW/Y2eg= +google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917/go.mod h1:pZqR+glSb11aJ+JQcczCvgf47+duRuzNSKqE8YAQnV0= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U= +google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= +google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 h1:s1w3X6gQxwrLEpxnLd/qXTVLgQE2yXwaOaoa6IlY/+o= +google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0/go.mod h1:CAny0tYF+0/9rmDB9fahA9YLzX3+AEVl1qXbv5hhj6c= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= @@ -1906,9 +2010,13 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920183334-c177e329c48b/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac h1:nUQEQmH/csSvFECKYRv6HWEyypysidKl2I6Qpsglq/0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= 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= @@ -1952,10 +2060,11 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= +google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= 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= @@ -1974,8 +2083,9 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/topo/node/arista/arista.go b/topo/node/arista/arista.go index 9c55c861..3af6477a 100644 --- a/topo/node/arista/arista.go +++ b/topo/node/arista/arista.go @@ -342,21 +342,25 @@ func defaults(pb *tpb.Node) *tpb.Node { if pb.Services == nil { pb.Services = map[uint32]*tpb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 6030: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi"}, Inside: 6030, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, Inside: 9340, }, + 9559: { + Names: []string{"p4rt"}, + Inside: 9559, + }, } } if pb.Os == "" { diff --git a/topo/node/arista/arista_test.go b/topo/node/arista/arista_test.go index 7b9fd0d4..3b206597 100644 --- a/topo/node/arista/arista_test.go +++ b/topo/node/arista/arista_test.go @@ -152,21 +152,25 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*topopb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 6030: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi"}, Inside: 6030, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, Inside: 9340, }, + 9559: { + Names: []string{"p4rt"}, + Inside: 9559, + }, }, Model: "ceos", Os: "eos", @@ -236,21 +240,25 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*topopb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 6030: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi"}, Inside: 6030, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, Inside: 9340, }, + 9559: { + Names: []string{"p4rt"}, + Inside: 9559, + }, }, }, }, diff --git a/topo/node/cisco/cisco.go b/topo/node/cisco/cisco.go index 49ee28d0..a388c67c 100644 --- a/topo/node/cisco/cisco.go +++ b/topo/node/cisco/cisco.go @@ -397,23 +397,19 @@ func defaults(pb *tpb.Node) (*tpb.Node, error) { if pb.Services == nil { pb.Services = map[uint32]*tpb.Service{ 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", - Inside: 57400, - }, - 9337: { - Name: "gnoi", + Names: []string{"gribi"}, Inside: 57400, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 57400, }, } diff --git a/topo/node/cisco/cisco_test.go b/topo/node/cisco/cisco_test.go index e8fabe12..84fb17ce 100644 --- a/topo/node/cisco/cisco_test.go +++ b/topo/node/cisco/cisco_test.go @@ -39,6 +39,7 @@ import ( func init() { skipValidation = true } + func defaultNode(pb *tpb.Node) *tpb.Node { node, _ := defaults(pb) return node @@ -113,23 +114,19 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", - Inside: 57400, - }, - 9337: { - Name: "gnoi", + Names: []string{"gribi"}, Inside: 57400, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 57400, }, }, @@ -214,23 +211,19 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", - Inside: 57400, - }, - 9337: { - Name: "gnoi", + Names: []string{"gribi"}, Inside: 57400, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 57400, }, }, @@ -319,23 +312,19 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", - Inside: 57400, - }, - 9337: { - Name: "gnoi", + Names: []string{"gribi"}, Inside: 57400, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 57400, }, }, @@ -443,23 +432,19 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", - Inside: 57400, - }, - 9337: { - Name: "gnoi", + Names: []string{"gribi"}, Inside: 57400, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 57400, }, }, @@ -574,23 +559,19 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", - Inside: 57400, - }, - 9337: { - Name: "gnoi", + Names: []string{"gribi"}, Inside: 57400, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 57400, }, }, @@ -675,23 +656,19 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", - Inside: 57400, - }, - 9337: { - Name: "gnoi", + Names: []string{"gribi"}, Inside: 57400, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 57400, }, }, @@ -806,23 +783,19 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", - Inside: 57400, - }, - 9337: { - Name: "gnoi", + Names: []string{"gribi"}, Inside: 57400, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 57400, }, }, diff --git a/topo/node/juniper/juniper.go b/topo/node/juniper/juniper.go index 2d0c07fc..4bfcd3f9 100644 --- a/topo/node/juniper/juniper.go +++ b/topo/node/juniper/juniper.go @@ -578,23 +578,23 @@ func defaults(pb *tpb.Node) *tpb.Node { if pb.Services == nil { pb.Services = map[uint32]*tpb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, - 9337: { - Name: "gnoi", - Inside: 32767, - }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 32767, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, + Inside: 32767, + }, + 9559: { + Names: []string{"p4rt"}, Inside: 32767, }, } diff --git a/topo/node/juniper/juniper_test.go b/topo/node/juniper/juniper_test.go index df328840..dec1dd50 100644 --- a/topo/node/juniper/juniper_test.go +++ b/topo/node/juniper/juniper_test.go @@ -445,23 +445,23 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, - 9337: { - Name: "gnoi", - Inside: 32767, - }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 32767, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, + Inside: 32767, + }, + 9559: { + Names: []string{"p4rt"}, Inside: 32767, }, }, @@ -523,23 +523,23 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, - 9337: { - Name: "gnoi", - Inside: 32767, - }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 32767, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, + Inside: 32767, + }, + 9559: { + Names: []string{"p4rt"}, Inside: 32767, }, }, @@ -601,23 +601,23 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, - 9337: { - Name: "gnoi", - Inside: 32767, - }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 32767, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, + Inside: 32767, + }, + 9559: { + Names: []string{"p4rt"}, Inside: 32767, }, }, @@ -668,23 +668,23 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, - 9337: { - Name: "gnoi", - Inside: 32767, - }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 32767, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, + Inside: 32767, + }, + 9559: { + Names: []string{"p4rt"}, Inside: 32767, }, }, diff --git a/topo/node/nokia/nokia.go b/topo/node/nokia/nokia.go index 338d9221..792a0453 100644 --- a/topo/node/nokia/nokia.go +++ b/topo/node/nokia/nokia.go @@ -331,27 +331,23 @@ func defaults(pb *tpb.Node) *tpb.Node { if pb.Services == nil { pb.Services = map[uint32]*tpb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, - 9337: { - Name: "gnoi", - Inside: 57400, - }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, Inside: 57401, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 9559, }, } diff --git a/topo/node/nokia/nokia_test.go b/topo/node/nokia/nokia_test.go index f381a26a..2800bce1 100644 --- a/topo/node/nokia/nokia_test.go +++ b/topo/node/nokia/nokia_test.go @@ -120,27 +120,23 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*topopb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, - 9337: { - Name: "gnoi", - Inside: 57400, - }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, Inside: 57401, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 9559, }, }, @@ -177,27 +173,23 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*topopb.Service{ 443: { - Name: "ssl", + Names: []string{"ssl"}, Inside: 443, }, 22: { - Name: "ssh", + Names: []string{"ssh"}, Inside: 22, }, - 9337: { - Name: "gnoi", - Inside: 57400, - }, 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 57400, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, Inside: 57401, }, 9559: { - Name: "p4rt", + Names: []string{"p4rt"}, Inside: 9559, }, }, diff --git a/topo/node/openconfig/openconfig.go b/topo/node/openconfig/openconfig.go index c1328f3b..554aad04 100644 --- a/topo/node/openconfig/openconfig.go +++ b/topo/node/openconfig/openconfig.go @@ -267,21 +267,13 @@ func lemmingDefaults(pb *tpb.Node) *tpb.Node { pb.Services = map[uint32]*tpb.Service{ // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=gnmi 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 9339, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, Inside: 9340, }, - 9341: { - Name: "gnsi", - Inside: 9339, - }, - 9342: { - Name: "gnoi", - Inside: 9339, - }, } } return pb @@ -316,17 +308,15 @@ func magnaDefaults(pb *tpb.Node) *tpb.Node { if _, ok := pb.Services[40051]; !ok { pb.Services[40051] = &tpb.Service{ - Name: "grpc", - Inside: 40051, - Outside: 40051, + Names: []string{"grpc"}, + Inside: 40051, } } if _, ok := pb.Services[50051]; !ok { pb.Services[50051] = &tpb.Service{ - Name: "gnmi", - Inside: 50051, - Outside: 50051, + Names: []string{"gnmi"}, + Inside: 50051, } } diff --git a/topo/node/openconfig/openconfig_test.go b/topo/node/openconfig/openconfig_test.go index 9e043722..a016c9c1 100644 --- a/topo/node/openconfig/openconfig_test.go +++ b/topo/node/openconfig/openconfig_test.go @@ -331,21 +331,13 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 9339, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, Inside: 9340, }, - 9341: { - Name: "gnsi", - Inside: 9339, - }, - 9342: { - Name: "gnoi", - Inside: 9339, - }, }, }, }, { @@ -431,14 +423,12 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 40051: { - Name: "grpc", - Inside: 40051, - Outside: 40051, + Names: []string{"grpc"}, + Inside: 40051, }, 50051: { - Name: "gnmi", - Inside: 50051, - Outside: 50051, + Names: []string{"gnmi"}, + Inside: 50051, }, }, }, @@ -452,11 +442,8 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 22: { - Name: "ssh", - Inside: 22, - Outside: 22, - InsideIp: "1.1.1.1", - OutsideIp: "10.10.10.10", + Names: []string{"ssh"}, + Inside: 22, }, }, }, @@ -474,21 +461,16 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 22: { - Name: "ssh", - Inside: 22, - Outside: 22, - InsideIp: "1.1.1.1", - OutsideIp: "10.10.10.10", + Names: []string{"ssh"}, + Inside: 22, }, 40051: { - Name: "grpc", - Inside: 40051, - Outside: 40051, + Names: []string{"grpc"}, + Inside: 40051, }, 50051: { - Name: "gnmi", - Inside: 50051, - Outside: 50051, + Names: []string{"gnmi"}, + Inside: 50051, }, }, }, @@ -515,14 +497,12 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 40051: { - Name: "grpc", - Inside: 40051, - Outside: 40051, + Names: []string{"grpc"}, + Inside: 40051, }, 50051: { - Name: "gnmi", - Inside: 50051, - Outside: 50051, + Names: []string{"gnmi"}, + Inside: 50051, }, }, }, @@ -536,9 +516,8 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 40051: { - Name: "foobar", - Inside: 40051, - Outside: 40051, + Names: []string{"foobar"}, + Inside: 40051, }, }, }, @@ -556,14 +535,12 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 40051: { - Name: "foobar", - Inside: 40051, - Outside: 40051, + Names: []string{"foobar"}, + Inside: 40051, }, 50051: { - Name: "gnmi", - Inside: 50051, - Outside: 50051, + Names: []string{"gnmi"}, + Inside: 50051, }, }, }, @@ -589,14 +566,12 @@ func TestNew(t *testing.T) { }, Services: map[uint32]*tpb.Service{ 40051: { - Name: "grpc", - Inside: 40051, - Outside: 40051, + Names: []string{"grpc"}, + Inside: 40051, }, 50051: { - Name: "gnmi", - Inside: 50051, - Outside: 50051, + Names: []string{"gnmi"}, + Inside: 50051, }, }, Labels: map[string]string{ From 1f52d966abf93918744e30f2219385a428ca9f0a Mon Sep 17 00:00:00 2001 From: Takuya Hashimoto Date: Tue, 5 Mar 2024 07:20:32 +0900 Subject: [PATCH 22/33] Fix paths to Keysight manifests in the 'Create a KNE topology' document (#501) --- docs/create_topology.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/create_topology.md b/docs/create_topology.md index f3a7026c..fa67906b 100644 --- a/docs/create_topology.md +++ b/docs/create_topology.md @@ -124,8 +124,8 @@ Field | Type | Description Field | Type | Description --------------- | ---------- | ----------- -`operator` | string | Path of the yaml file to create an IxiaTG operator in the cluster. The validated operator for use with KNE can be found [here](https://github.com/openconfig/kne/tree/main/manifests/controllers/keysight/ixiatg-operator.yaml). -`configMap` | string | Path of the yaml file to create an IxiaTG config map in the cluster. The validated config map for use with KNE can be found [here](https://github.com/openconfig/kne/tree/main/manifests/controllers/keysight/ixiatg-configmap.yaml). +`operator` | string | Path of the yaml file to create an IxiaTG operator in the cluster. The validated operator for use with KNE can be found [here](https://github.com/openconfig/kne/tree/main/manifests/keysight/ixiatg-operator.yaml). +`configMap` | string | Path of the yaml file to create an IxiaTG config map in the cluster. The validated config map for use with KNE can be found [here](https://github.com/openconfig/kne/tree/main/manifests/keysight/ixiatg-configmap.yaml). ~~`manifests`~~ | ~~string~~ | ~~Path of the directory holding the manifests to create an IxiaTG operator in the cluster. The directory is expected to contain a file with the name `ixiatg-operator.yaml`. Optionally the directory can contain a file with the name `ixiatg-configmap.yaml` to apply a config map of the desired container images used by the controller.~~ ##### SRLinux @@ -187,8 +187,8 @@ deployment](#deploy-a-cluster). `ixiatg` controller orchestrates the lifecycle of the [Ixia-c](https://ixia-c.dev) test nodes that add [Open Traffic Generator](https://otg.dev) capabilities to the KNE topology. To deploy: ```bash -kubectl apply -f manifests/controllers/keysight/ixiatg-operator.yaml -kubectl apply -f manifests/controllers/keysight/ixiatg-configmap.yaml +kubectl apply -f manifests/keysight/ixiatg-operator.yaml +kubectl apply -f manifests/keysight/ixiatg-configmap.yaml ``` With the steps above the Ixia-c nodes will operate in the [Community Edition](https://github.com/open-traffic-generator/ixia-c/blob/mkdocs/docs/licensing.md#license-editions) mode. To enable full capabilities of Ixia-c, a valid Keysight Elastic Network Generator license is required. Use the following additional step to provide the address of the Keysight Licensing Server with the license to the `ixiatg` controller: From 65b8918600733bf674984f33e490d8ad05ff0fd3 Mon Sep 17 00:00:00 2001 From: jasdeep-hundal Date: Wed, 6 Mar 2024 11:56:54 -0800 Subject: [PATCH 23/33] Update KENG config map versions and operator (#502) --- go.mod | 2 +- go.sum | 4 ++-- manifests/keysight/ixiatg-configmap.yaml | 8 ++++---- manifests/keysight/ixiatg-operator.yaml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index ebe822a2..8b2c5ab0 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/kr/pretty v0.3.1 github.com/networkop/meshnet-cni v0.3.1-0.20230525201116-d7c306c635cf - github.com/open-traffic-generator/keng-operator v0.3.15 + github.com/open-traffic-generator/keng-operator v0.3.28 github.com/open-traffic-generator/snappi/gosnappi v0.13.7 github.com/openconfig/gnmi v0.10.0 github.com/openconfig/lemming/operator v0.2.0 diff --git a/go.sum b/go.sum index 1f84da5e..d0b2f2e6 100644 --- a/go.sum +++ b/go.sum @@ -1171,8 +1171,8 @@ github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/open-traffic-generator/keng-operator v0.3.15 h1:4qMC8MaCfV7TmmrfqI7rTusOChkHpiA8maih88aLaqY= -github.com/open-traffic-generator/keng-operator v0.3.15/go.mod h1:+koaOnSyrJHdzxnaye+M6k+ZbszQlWI9u3tMxSpORNA= +github.com/open-traffic-generator/keng-operator v0.3.28 h1:FpDe1wtGODN7ByAhF2LxMIlbDqb5yVmbSE5Y49nyc28= +github.com/open-traffic-generator/keng-operator v0.3.28/go.mod h1:+koaOnSyrJHdzxnaye+M6k+ZbszQlWI9u3tMxSpORNA= github.com/open-traffic-generator/snappi/gosnappi v0.13.7 h1:qrisl9OcqHdhUXVIJ0BXUAO8MDWf2qraNn+Oic+b8JM= github.com/open-traffic-generator/snappi/gosnappi v0.13.7/go.mod h1:3pBcoJfsRp2B7IEcGq1w/8BwsBs7w2u6sYVqiThabmw= github.com/openconfig/gnmi v0.0.0-20200414194230-1597cc0f2600/go.mod h1:M/EcuapNQgvzxo1DDXHK4tx3QpYM/uG4l591v33jG2A= diff --git a/manifests/keysight/ixiatg-configmap.yaml b/manifests/keysight/ixiatg-configmap.yaml index e189a799..71416d9e 100644 --- a/manifests/keysight/ixiatg-configmap.yaml +++ b/manifests/keysight/ixiatg-configmap.yaml @@ -11,12 +11,12 @@ data: { "name": "controller", "path": "ghcr.io/open-traffic-generator/keng-controller", - "tag": "1.0.0-7" + "tag": "1.0.0-104" }, { "name": "gnmi-server", "path": "ghcr.io/open-traffic-generator/otg-gnmi-server", - "tag": "1.13.8" + "tag": "1.13.10" }, { "name": "traffic-engine", @@ -26,12 +26,12 @@ data: { "name": "protocol-engine", "path": "ghcr.io/open-traffic-generator/ixia-c-protocol-engine", - "tag": "1.00.0.358" + "tag": "1.00.0.367" }, { "name": "ixhw-server", "path": "ghcr.io/open-traffic-generator/keng-layer23-hw-server", - "tag": "1.0.0-1" + "tag": "1.0.2-4" } ] } diff --git a/manifests/keysight/ixiatg-operator.yaml b/manifests/keysight/ixiatg-operator.yaml index 35a3036d..4399cab3 100644 --- a/manifests/keysight/ixiatg-operator.yaml +++ b/manifests/keysight/ixiatg-operator.yaml @@ -387,7 +387,7 @@ spec: - --leader-elect command: - /manager - image: ghcr.io/open-traffic-generator/keng-operator:0.3.15 + image: ghcr.io/open-traffic-generator/keng-operator:0.3.28 livenessProbe: httpGet: path: /healthz From 906a32912e263afb0c94f56a644a82a23f5de8a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:48:47 -0400 Subject: [PATCH 24/33] Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#505) Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 8b2c5ab0..70902aff 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( golang.org/x/oauth2 v0.13.0 google.golang.org/api v0.149.0 google.golang.org/grpc v1.60.1 - google.golang.org/protobuf v1.32.0 + google.golang.org/protobuf v1.33.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.26.3 k8s.io/apimachinery v0.26.3 diff --git a/go.sum b/go.sum index d0b2f2e6..b3766d64 100644 --- a/go.sum +++ b/go.sum @@ -2084,8 +2084,9 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From f197e16f84e47b8eadc4263d71fafe92b28dfbd9 Mon Sep 17 00:00:00 2001 From: Alex Masi Date: Fri, 15 Mar 2024 10:20:06 -0700 Subject: [PATCH 25/33] rollforward deps to fix postsubmit (#503) * rollforward deps to fix postsubmit * fix typo * add gopath * fix --- cloudbuild/external.pkr.hcl | 32 ++++++++++++++++---------------- cloudbuild/internal.pkr.hcl | 36 ++++++++++++++++++------------------ 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/cloudbuild/external.pkr.hcl b/cloudbuild/external.pkr.hcl index 5a37d88c..bb554551 100644 --- a/cloudbuild/external.pkr.hcl +++ b/cloudbuild/external.pkr.hcl @@ -64,15 +64,15 @@ build { provisioner "shell" { inline = [ "echo Installing docker...", - "sudo apt-get -o DPkg::Lock::Timeout=60 update", - "sudo apt-get -o DPkg::Lock::Timeout=60 install apt-transport-https ca-certificates curl gnupg lsb-release -y", + "sudo apt-get update", + "sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release -y", "curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg", "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null", - "sudo apt-get -o DPkg::Lock::Timeout=60 update", - "sudo apt-get -o DPkg::Lock::Timeout=60 install docker-ce=5:24.0.7-1~debian.12~bookworm docker-ce-cli=5:24.0.7-1~debian.12~bookworm containerd.io build-essential -y", + "sudo apt-get update", + "sudo apt-get install docker-ce docker-ce-cli containerd.io build-essential -y", "sudo usermod -aG docker $USER", "sudo docker version", - "sudo apt-get -o DPkg::Lock::Timeout=60 install openvswitch-switch-dpdk -y", # install openvswitch for cisco containers + "sudo apt-get install openvswitch-switch-dpdk -y", # install openvswitch for cisco containers "echo \"fs.inotify.max_user_instances=64000\" | sudo tee -a /etc/sysctl.conf", # configure inotify for cisco xrd containers "echo \"kernel.pid_max=1048575\" | sudo tee -a /etc/sysctl.conf", # configure pid_max for cisco 8000e containers "sudo sysctl -p", @@ -82,10 +82,10 @@ build { provisioner "shell" { inline = [ "echo Installing kubectl...", - "curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg", - "echo \"deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee /etc/apt/sources.list.d/kubernetes.list", - "sudo apt-get -o DPkg::Lock::Timeout=60 update", - "sudo apt-get -o DPkg::Lock::Timeout=60 install kubelet kubeadm kubectl -y", + "curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg", + "echo \"deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /\" | sudo tee /etc/apt/sources.list.d/kubernetes.list", + "sudo apt-get update", + "sudo apt-get install kubelet kubeadm kubectl -y", "kubectl version --client", "echo 'source <(kubectl completion bash)' >> ~/.bashrc", "echo 'alias k=kubectl' >> ~/.bashrc", @@ -106,14 +106,14 @@ build { "echo Installing multinode cluster dependencies...", "git clone https://github.com/flannel-io/flannel.git", "curl --create-dirs -o third_party/licenses/flannel/LICENSE https://raw.githubusercontent.com/flannel-io/flannel/master/LICENSE", - "git clone https://github.com/Mirantis/cri-dockerd.git --branch v0.3.1", + "git clone https://github.com/Mirantis/cri-dockerd.git", "cd cri-dockerd", "PATH=$PATH:/usr/local/go/bin", "/home/$USER/go/bin/go-licenses check github.com/Mirantis/cri-dockerd", "/home/$USER/go/bin/go-licenses save github.com/Mirantis/cri-dockerd --save_path=\"../third_party/licenses/cri-dockerd\"", - "/usr/local/go/bin/go build", - "sudo cp cri-dockerd /usr/local/bin/", - "sudo cp -a packaging/systemd/* /etc/systemd/system", + "make cri-dockerd", + "sudo install -o root -g root -m 0755 cri-dockerd /usr/local/bin/cri-dockerd", + "sudo install packaging/systemd/* /etc/systemd/system", "sudo sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service", "sudo systemctl enable cri-docker.socket", ] @@ -122,7 +122,7 @@ build { provisioner "shell" { inline = [ "echo Installing kind...", - "/usr/local/go/bin/go install sigs.k8s.io/kind@v0.19.0", + "/usr/local/go/bin/go install sigs.k8s.io/kind@v0.22.0", "curl --create-dirs -o third_party/licenses/kind/LICENSE https://raw.githubusercontent.com/kubernetes-sigs/kind/main/LICENSE", "sudo cp /home/$USER/go/bin/kind /usr/local/bin/", "/home/$USER/go/bin/kind version", @@ -132,7 +132,7 @@ build { provisioner "shell" { inline = [ "echo Cloning openconfig/kne github repo...", - "sudo apt-get -o DPkg::Lock::Timeout=60 install git -y", + "sudo apt-get install git -y", "git clone -b ${var.branch_name} https://github.com/openconfig/kne.git", "cd kne", "PATH=$PATH:/usr/local/go/bin", @@ -160,7 +160,7 @@ build { provisioner "shell" { inline = [ "echo Installing openconfig tools...", - "sudo apt-get -o DPkg::Lock::Timeout=60 install tree -y", + "sudo apt-get install tree -y", "bash -c \"$(curl -sL https://get-gnmic.openconfig.net)\"", "bash -c \"$(curl -sL https://get-gribic.kmrd.dev)\"", "bash -c \"$(curl -sL https://get-gnoic.kmrd.dev)\"", diff --git a/cloudbuild/internal.pkr.hcl b/cloudbuild/internal.pkr.hcl index 3c54a89f..d71bc107 100644 --- a/cloudbuild/internal.pkr.hcl +++ b/cloudbuild/internal.pkr.hcl @@ -64,15 +64,15 @@ build { provisioner "shell" { inline = [ "echo Installing docker...", - "sudo apt-get -o DPkg::Lock::Timeout=60 update", - "sudo apt-get -o DPkg::Lock::Timeout=60 install apt-transport-https ca-certificates curl gnupg lsb-release -y", + "sudo apt-get update", + "sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release -y", "curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg", "echo \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable\" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null", - "sudo apt-get -o DPkg::Lock::Timeout=60 update", - "sudo apt-get -o DPkg::Lock::Timeout=60 install docker-ce=5:24.0.7-1~debian.12~bookworm docker-ce-cli=5:24.0.7-1~debian.12~bookworm containerd.io build-essential -y", + "sudo apt-get update", + "sudo apt-get install docker-ce docker-ce-cli containerd.io build-essential -y", "sudo usermod -aG docker $USER", "sudo docker version", - "sudo apt-get -o DPkg::Lock::Timeout=60 install openvswitch-switch-dpdk -y", # install openvswitch for cisco containers + "sudo apt-get install openvswitch-switch-dpdk -y", # install openvswitch for cisco containers "echo \"fs.inotify.max_user_instances=64000\" | sudo tee -a /etc/sysctl.conf", # configure inotify for cisco xrd containers "echo \"kernel.pid_max=1048575\" | sudo tee -a /etc/sysctl.conf", # configure pid_max for cisco 8000e containers "sudo sysctl -p", @@ -82,7 +82,6 @@ build { "sudo docker pull us-west1-docker.pkg.dev/gep-kne/arista/ceos:ga", "sudo docker pull us-west1-docker.pkg.dev/gep-kne/cisco/xrd:ga", "sudo docker pull us-west1-docker.pkg.dev/gep-kne/cisco/8000e:ga", - "sudo docker pull us-west1-docker.pkg.dev/gep-kne/juniper/cptx:ga", "sudo docker pull us-west1-docker.pkg.dev/gep-kne/juniper/ncptx:ga", "sudo docker pull us-west1-docker.pkg.dev/gep-kne/nokia/srlinux:ga", ] @@ -91,10 +90,10 @@ build { provisioner "shell" { inline = [ "echo Installing kubectl...", - "curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg", - "echo \"deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee /etc/apt/sources.list.d/kubernetes.list", - "sudo apt-get -o DPkg::Lock::Timeout=60 update", - "sudo apt-get -o DPkg::Lock::Timeout=60 install kubelet kubeadm kubectl -y", + "curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg", + "echo \"deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /\" | sudo tee /etc/apt/sources.list.d/kubernetes.list", + "sudo apt-get update", + "sudo apt-get install kubelet kubeadm kubectl -y", "kubectl version --client", "echo 'source <(kubectl completion bash)' >> ~/.bashrc", "echo 'alias k=kubectl' >> ~/.bashrc", @@ -106,11 +105,12 @@ build { inline = [ "echo Installing multinode cluster dependencies...", "git clone https://github.com/flannel-io/flannel.git", - "git clone https://github.com/Mirantis/cri-dockerd.git --branch v0.3.1", + "git clone https://github.com/Mirantis/cri-dockerd.git", "cd cri-dockerd", - "/usr/local/go/bin/go build", - "sudo cp cri-dockerd /usr/local/bin/", - "sudo cp -a packaging/systemd/* /etc/systemd/system", + "PATH=$PATH:/usr/local/go/bin", + "make cri-dockerd", + "sudo install -o root -g root -m 0755 cri-dockerd /usr/local/bin/cri-dockerd", + "sudo install packaging/systemd/* /etc/systemd/system", "sudo sed -i -e 's,/usr/bin/cri-dockerd,/usr/local/bin/cri-dockerd,' /etc/systemd/system/cri-docker.service", "sudo systemctl enable cri-docker.socket", ] @@ -119,7 +119,7 @@ build { provisioner "shell" { inline = [ "echo Installing kind...", - "/usr/local/go/bin/go install sigs.k8s.io/kind@v0.19.0", + "/usr/local/go/bin/go install sigs.k8s.io/kind@v0.22.0", "sudo cp /home/$USER/go/bin/kind /usr/local/bin/", "/home/$USER/go/bin/kind version", ] @@ -128,7 +128,7 @@ build { provisioner "shell" { inline = [ "echo Cloning openconfig/kne github repo...", - "sudo apt-get -o DPkg::Lock::Timeout=60 install git -y", + "sudo apt-get install git -y", "git clone -b ${var.branch_name} https://github.com/openconfig/kne.git", "cd kne/kne_cli", "/usr/local/go/bin/go build -o kne", @@ -164,7 +164,7 @@ build { provisioner "shell" { inline = [ "echo Installing openconfig tools...", - "sudo apt-get -o DPkg::Lock::Timeout=60 install tree -y", + "sudo apt-get install tree -y", "bash -c \"$(curl -sL https://get-gnmic.openconfig.net)\"", "bash -c \"$(curl -sL https://get-gribic.kmrd.dev)\"", "bash -c \"$(curl -sL https://get-gnoic.kmrd.dev)\"", @@ -183,7 +183,7 @@ build { provisioner "shell" { inline = [ "echo Installing network diagnosis tools...", - "sudo apt-get -o DPkg::Lock::Timeout=60 install net-tools iptables nftables -y", + "sudo apt-get install net-tools iptables nftables -y", ] } } From 98293cb698081021cc0b13d99b5feab953527ff8 Mon Sep 17 00:00:00 2001 From: David Avnerson <85820962+davnerson-dn@users.noreply.github.com> Date: Sun, 31 Dec 2023 15:06:56 +0200 Subject: [PATCH 26/33] Adding Drivenets Vendor support --- README.md | 2 +- deploy/deploy.go | 53 ++ deploy/kne/external-multinode.yaml | 3 + deploy/kne/kind-bridge.yaml | 3 + docs/create_topology.md | 19 +- examples/drivenets/cdnos.pb.txt | 29 + examples/drivenets/cdnos1.cfg | 8 + examples/drivenets/cdnos2.cfg | 8 + .../drivenets/multivendor-drivenets.pb.txt | 35 + examples/drivenets/srlinux.cfg | 1 + manifests/controllers/cdnos/manifest.yaml | 608 ++++++++++++++ proto/controller.proto | 7 + proto/controller/controller.pb.go | 792 ++++++++++-------- proto/event.proto | 1 + proto/event/event.pb.go | 36 +- proto/topo.proto | 2 + topo/node/drivenets/drivenets.go | 391 +++++++++ topo/topo.go | 1 + 18 files changed, 1634 insertions(+), 365 deletions(-) create mode 100644 examples/drivenets/cdnos.pb.txt create mode 100644 examples/drivenets/cdnos1.cfg create mode 100644 examples/drivenets/cdnos2.cfg create mode 100644 examples/drivenets/multivendor-drivenets.pb.txt create mode 120000 examples/drivenets/srlinux.cfg create mode 100644 manifests/controllers/cdnos/manifest.yaml create mode 100644 topo/node/drivenets/drivenets.go diff --git a/README.md b/README.md index d4981a24..930e5222 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This is not an officially supported Google product. ## Goal For network emulation, there are many approaches using VM's for emulation of a -hardware router. Arista, Cisco, Juniper, and Nokia have multiple implementations +hardware router. Arista, Cisco, Juniper, Drivenets, and Nokia have multiple implementations of their network operating system and various generations of hardware emulation. These systems are very good for most validation of vendor control plane implementations and data plane for limited certifications. The idea of this diff --git a/deploy/deploy.go b/deploy/deploy.go index d56794a3..908eca72 100644 --- a/deploy/deploy.go +++ b/deploy/deploy.go @@ -152,6 +152,8 @@ func (d *Deployment) event() *epb.Cluster { c.Controllers = append(c.Controllers, epb.Cluster_CONTROLLER_TYPE_SRLINUX) case *LemmingSpec: c.Controllers = append(c.Controllers, epb.Cluster_CONTROLLER_TYPE_LEMMING) + case *CdnosSpec: + c.Controllers = append(c.Controllers, epb.Cluster_CONTROLLER_TYPE_CDNOS) } } return c @@ -1130,6 +1132,57 @@ func (i *IxiaTGSpec) Healthy(ctx context.Context) error { return deploymentHealthy(ctx, i.kClient, "ixiatg-op-system") } + +func init() { + load.Register("Cdnos", &load.Spec{ + Type: CdnosSpec{}, + Tag: "controllers", + }) +} + +type CdnosSpec struct { + ManifestDir string `yaml:"manifests"` + Operator string `yaml:"operator" kne:"yaml"` + OperatorData []byte + kClient kubernetes.Interface +} + +func (l *CdnosSpec) SetKClient(k kubernetes.Interface) { + l.kClient = k +} + +func (l *CdnosSpec) Deploy(ctx context.Context) error { + if l.OperatorData != nil { + f, err := os.CreateTemp("", "cdnos-operator-*.yaml") + if err != nil { + return err + } + defer os.Remove(f.Name()) + if _, err := f.Write(l.OperatorData); err != nil { + return err + } + if err := f.Close(); err != nil { + return err + } + l.Operator = f.Name() + } + if l.Operator == "" && l.ManifestDir != "" { + log.Errorf("Deploying Cdnos controller using the directory 'manifests' field (%v) is deprecated, instead provide the filepath of the operator file directly using the 'operator' field going forward", l.ManifestDir) + l.Operator = filepath.Join(l.ManifestDir, "manifest.yaml") + } + log.Infof("Deploying Cdnos controller from: %s", l.Operator) + if err := logCommand("kubectl", "apply", "-f", l.Operator); err != nil { + return fmt.Errorf("failed to deploy cdnos operator: %w", err) + } + log.Infof("Cdnos controller deployed") + return nil +} + +func (l *CdnosSpec) Healthy(ctx context.Context) error { + return deploymentHealthy(ctx, l.kClient, "cdnos-controller-system") +} + + func deploymentHealthy(ctx context.Context, c kubernetes.Interface, name string) error { log.Infof("Waiting on deployment %q to be healthy", name) w, err := c.AppsV1().Deployments(name).Watch(ctx, metav1.ListOptions{}) diff --git a/deploy/kne/external-multinode.yaml b/deploy/kne/external-multinode.yaml index 56665504..256496eb 100644 --- a/deploy/kne/external-multinode.yaml +++ b/deploy/kne/external-multinode.yaml @@ -28,3 +28,6 @@ controllers: - kind: Lemming spec: operator: ../../manifests/controllers/lemming/manifest.yaml + - kind: Cdnos + spec: + operator: ../../manifests/controllers/cdnos/manifest.yaml diff --git a/deploy/kne/kind-bridge.yaml b/deploy/kne/kind-bridge.yaml index 2ee89fa1..2199bdc2 100644 --- a/deploy/kne/kind-bridge.yaml +++ b/deploy/kne/kind-bridge.yaml @@ -34,3 +34,6 @@ controllers: - kind: Lemming spec: operator: ../../manifests/controllers/lemming/manifest.yaml + - kind: Cdnos + spec: + operator: ../../manifests/controllers/cdnos/manifest.yaml \ No newline at end of file diff --git a/docs/create_topology.md b/docs/create_topology.md index fa67906b..79dc817e 100644 --- a/docs/create_topology.md +++ b/docs/create_topology.md @@ -117,9 +117,16 @@ Field | Type | Description Field | Type | Description ------ | --------- | ---------------------------------------------------- -`kind` | string | Name of the controller type. The current options currently are `IxiaTG`, `SRLinux`, `CEOSLab`, and `Lemming`. +`kind` | string | Name of the controller type. The current options currently are `Cdnos`, `IxiaTG`, `SRLinux`, `CEOSLab`, and `Lemming`. `spec` | yaml.Node | Fields that set the options for the controller type. +##### Cdnos + +Field | Type | Description +--------------- | ---------- | ----------- +`operator` | string | Path of the yaml file to create a Cdnos operator in the cluster. The validated operator for use with KNE can be found [here](https://github.com/openconfig/kne/tree/main/manifests/controllers/cdnos/manifest.yaml). +~~`manifests`~~ | ~~string~~ | ~~Path of the directory holding the manifests to create a CEOSLab operator in the cluster. The directory is expected to contain a file with the name `manifest.yaml`.~~ + ##### IxiaTG Field | Type | Description @@ -177,6 +184,7 @@ following vendors use a controller: - Keysight: `ixiatg` - Nokia: `srlinux` - Arista: `ceoslab` +- Drivenets: `cdnos` - OpenConfig: `lemming` These controllers can be deployed as part of [cluster @@ -224,6 +232,15 @@ kubectl apply -f manifests/controllers/ceoslab/manifest.yaml See more on the [arista-ceoslab-operator GitHub repo](https://github.com/aristanetworks/arista-ceoslab-operator). +### Cdnos Controller + +```bash +kubectl apply -f manifests/controllers/cdnos/manifest.yaml +``` + +See more on the +[cdnos-controller GitHub repo](https://github.com/drivenets/cdnos-controller). + #### lemming To manually apply the controller run the following command: diff --git a/examples/drivenets/cdnos.pb.txt b/examples/drivenets/cdnos.pb.txt new file mode 100644 index 00000000..905488b6 --- /dev/null +++ b/examples/drivenets/cdnos.pb.txt @@ -0,0 +1,29 @@ +name: "cdnos-demo" +nodes: { + name: "cdnos1" + vendor: DRIVENETS + config: { + config_file: "default" + config_path: "/config_load" + file: "cdnos1.cfg" + image: "registry.dev.drivenets.net/devops/cdnos_dev_v19_1:19.1.0.101_dev.dev_v19_1" + } + model: "CDNOS" +} +nodes: { + name: "cdnos2" + vendor: DRIVENETS + config: { + config_file: "default" + config_path: "/config_load" + file: "cdnos2.cfg" + image: "registry.dev.drivenets.net/devops/cdnos_dev_v19_1:19.1.0.101_dev.dev_v19_1" + } + model: "CDNOS" +} +links: { + a_node: "cdnos1" + a_int: "eno0" + z_node: "cdnos2" + z_int: "eno0" +} diff --git a/examples/drivenets/cdnos1.cfg b/examples/drivenets/cdnos1.cfg new file mode 100644 index 00000000..8c3c194c --- /dev/null +++ b/examples/drivenets/cdnos1.cfg @@ -0,0 +1,8 @@ +configure + interfaces + ge10-0/0/0 + ipv4-address 1.1.1.1/24 + admin-state enabled + ! + ! +commit \ No newline at end of file diff --git a/examples/drivenets/cdnos2.cfg b/examples/drivenets/cdnos2.cfg new file mode 100644 index 00000000..cd90cee8 --- /dev/null +++ b/examples/drivenets/cdnos2.cfg @@ -0,0 +1,8 @@ +configure + interfaces + ge10-0/0/0 + ipv4-address 1.1.1.2/24 + admin-state enabled + ! + ! +commit \ No newline at end of file diff --git a/examples/drivenets/multivendor-drivenets.pb.txt b/examples/drivenets/multivendor-drivenets.pb.txt new file mode 100644 index 00000000..2d04aec0 --- /dev/null +++ b/examples/drivenets/multivendor-drivenets.pb.txt @@ -0,0 +1,35 @@ +name: "cdnos-multivendor-demo" +nodes: { + name: "srl1" + vendor: NOKIA + model: "ixr6e" + config:{ + # when `image` is not specified under `config`, the "ghcr.io/nokia/srlinux:latest" container image is used by default + # SR Linux can accept both complete config files in JSON format, or partial/full config snippets in the CLI format. + # nodes are configured with a partial config snippet in CLI format that adds configuration relevant for this example lab. + file: "srlinux.cfg" + } + interfaces: { + key: "e1-1" + value: { + name: "ethernet-1/1" + } + } +} +nodes: { + name: "cdnos1" + vendor: DRIVENETS + config: { + config_path: "/config_load" + config_file: "default" + file: "cdnos2.cfg" + image: "registry.dev.drivenets.net/devops/cdnos_dev_v19_1:19.1.0.101_dev.dev_v19_1" + } + model: "CDNOS" +} +links: { + a_node: "srl1" + a_int: "e1-1" + z_node: "cdnos1" + z_int: "eno0" +} diff --git a/examples/drivenets/srlinux.cfg b/examples/drivenets/srlinux.cfg new file mode 120000 index 00000000..2e162531 --- /dev/null +++ b/examples/drivenets/srlinux.cfg @@ -0,0 +1 @@ +../multivendor/srlinux.cfg \ No newline at end of file diff --git a/manifests/controllers/cdnos/manifest.yaml b/manifests/controllers/cdnos/manifest.yaml new file mode 100644 index 00000000..a31edf12 --- /dev/null +++ b/manifests/controllers/cdnos/manifest.yaml @@ -0,0 +1,608 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + app.kubernetes.io/component: manager + app.kubernetes.io/created-by: cdnos-controller + app.kubernetes.io/instance: system + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: namespace + app.kubernetes.io/part-of: cdnos-controller + control-plane: controller-manager + name: cdnos-controller-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: cdnoss.cdnos.dev.drivenets.net +spec: + group: cdnos.dev.drivenets.net + names: + kind: Cdnos + listKind: CdnosList + plural: cdnoss + singular: cdnos + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + description: Cdnos is the Schema for the cdnoss API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: CdnosSpec defines the desired state of Cdnos + properties: + args: + description: Args are the args to pass to the command. + items: + type: string + type: array + command: + description: Command is the name of the executable to run. + type: string + configFile: + description: ConfigFile is the default configuration file name for + the pod. + type: string + configPath: + description: ConfigPath is the mount point for configuration inside + the pod. + type: string + env: + description: Env are the environment variables to set for the container. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + image: + description: Image to use for the CDNOS container + type: string + initImage: + description: InitImage is the docker image to use as an init container + for the pod. + type: string + initSleep: + description: InitSleep is the time sleep in the init container + type: integer + interfaceCount: + description: InterfaceCount is number of interfaces to be attached + to the pod. + type: integer + ports: + additionalProperties: + description: ServicePort describes an external L4 port on the device. + properties: + innerPort: + description: InnerPort is port on the container to expose. + format: int32 + type: integer + outerPort: + description: OuterPort is port on the container to expose. + format: int32 + type: integer + required: + - innerPort + - outerPort + type: object + description: Ports are ports to create on the service. + type: object + resources: + description: Resources are the K8s resources to allocate to cdnos + container. + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be set + for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + tls: + description: TLS is the configuration the key/certs to use for management. + properties: + selfSigned: + description: SelfSigned generates a new self signed certificate. + properties: + commonName: + description: / Common name to set in the cert. + type: string + keySize: + description: RSA keysize to use for key generation. + type: integer + required: + - commonName + - keySize + type: object + type: object + type: object + status: + description: CdnosStatus defines the observed state of Cdnos + properties: + message: + description: Message describes why the Cdnos is in the current phase. + type: string + phase: + description: Phase is the overall status of the Cdnos. + type: string + required: + - message + - phase + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: cdnos-controller + app.kubernetes.io/instance: controller-manager-sa + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: serviceaccount + app.kubernetes.io/part-of: cdnos-controller + name: cdnos-controller-controller-manager + namespace: cdnos-controller-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: cdnos-controller + app.kubernetes.io/instance: leader-election-role + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: role + app.kubernetes.io/part-of: cdnos-controller + name: cdnos-controller-leader-election-role + namespace: cdnos-controller-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: cdnos-controller-manager-role +rules: +- apiGroups: + - cdnos.dev.drivenets.net + resources: + - cdnoss + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - cdnos.dev.drivenets.net + resources: + - cdnoss/finalizers + verbs: + - update +- apiGroups: + - cdnos.dev.drivenets.net + resources: + - cdnoss/status + verbs: + - get + - patch + - update +- apiGroups: + - "" + resources: + - pods + - secrets + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: cdnos-controller + app.kubernetes.io/instance: metrics-reader + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: clusterrole + app.kubernetes.io/part-of: cdnos-controller + name: cdnos-controller-metrics-reader +rules: +- nonResourceURLs: + - /metrics + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: cdnos-controller + app.kubernetes.io/instance: proxy-role + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: clusterrole + app.kubernetes.io/part-of: cdnos-controller + name: cdnos-controller-proxy-role +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: cdnos-controller + app.kubernetes.io/instance: leader-election-rolebinding + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: rolebinding + app.kubernetes.io/part-of: cdnos-controller + name: cdnos-controller-leader-election-rolebinding + namespace: cdnos-controller-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: cdnos-controller-leader-election-role +subjects: +- kind: ServiceAccount + name: cdnos-controller-controller-manager + namespace: cdnos-controller-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: cdnos-controller + app.kubernetes.io/instance: manager-rolebinding + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: clusterrolebinding + app.kubernetes.io/part-of: cdnos-controller + name: cdnos-controller-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cdnos-controller-manager-role +subjects: +- kind: ServiceAccount + name: cdnos-controller-controller-manager + namespace: cdnos-controller-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: cdnos-controller + app.kubernetes.io/instance: proxy-rolebinding + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: clusterrolebinding + app.kubernetes.io/part-of: cdnos-controller + name: cdnos-controller-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cdnos-controller-proxy-role +subjects: +- kind: ServiceAccount + name: cdnos-controller-controller-manager + namespace: cdnos-controller-system +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: kube-rbac-proxy + app.kubernetes.io/created-by: cdnos-controller + app.kubernetes.io/instance: controller-manager-metrics-service + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: service + app.kubernetes.io/part-of: cdnos-controller + control-plane: controller-manager + name: cdnos-controller-controller-manager-metrics-service + namespace: cdnos-controller-system +spec: + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: https + selector: + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: manager + app.kubernetes.io/created-by: cdnos-controller + app.kubernetes.io/instance: controller-manager + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: deployment + app.kubernetes.io/part-of: cdnos-controller + control-plane: controller-manager + name: cdnos-controller-controller-manager + namespace: cdnos-controller-system +spec: + replicas: 1 + selector: + matchLabels: + control-plane: controller-manager + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: manager + labels: + control-plane: controller-manager + spec: + containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.15.0 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + - args: + - --health-probe-bind-address=:8081 + - --metrics-bind-address=127.0.0.1:8080 + - --leader-elect + command: + - /manager + image: public.ecr.aws/dn/cdnos-controller:1.4 + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + securityContext: + runAsNonRoot: true + serviceAccountName: cdnos-controller-controller-manager + terminationGracePeriodSeconds: 10 diff --git a/proto/controller.proto b/proto/controller.proto index a7661e39..d1c8b644 100644 --- a/proto/controller.proto +++ b/proto/controller.proto @@ -88,6 +88,7 @@ message ControllerSpec { SRLinuxSpec srlinux = 2; CEOSLabSpec ceoslab = 3; LemmingSpec lemming = 4; + CdnosSpec cdnos = 5; } } @@ -130,6 +131,12 @@ message LemmingSpec { Manifest operator = 2; } +// CdnosSpec specifications +message CdnosSpec { + string manifest_dir = 1 [deprecated = true]; + Manifest operator = 2; +} + message Manifest { oneof manifest_data { // Byte data for the manifest. diff --git a/proto/controller/controller.pb.go b/proto/controller/controller.pb.go index 22c05581..aeecb597 100644 --- a/proto/controller/controller.pb.go +++ b/proto/controller/controller.pb.go @@ -453,6 +453,7 @@ type ControllerSpec struct { // *ControllerSpec_Srlinux // *ControllerSpec_Ceoslab // *ControllerSpec_Lemming + // *ControllerSpec_Cdnos Spec isControllerSpec_Spec `protobuf_oneof:"spec"` } @@ -523,6 +524,13 @@ func (x *ControllerSpec) GetLemming() *LemmingSpec { return nil } +func (x *ControllerSpec) GetCdnos() *CdnosSpec { + if x, ok := x.GetSpec().(*ControllerSpec_Cdnos); ok { + return x.Cdnos + } + return nil +} + type isControllerSpec_Spec interface { isControllerSpec_Spec() } @@ -543,6 +551,10 @@ type ControllerSpec_Lemming struct { Lemming *LemmingSpec `protobuf:"bytes,4,opt,name=lemming,proto3,oneof"` } +type ControllerSpec_Cdnos struct { + Cdnos *CdnosSpec `protobuf:"bytes,5,opt,name=cdnos,proto3,oneof"` +} + func (*ControllerSpec_Ixiatg) isControllerSpec_Spec() {} func (*ControllerSpec_Srlinux) isControllerSpec_Spec() {} @@ -551,6 +563,8 @@ func (*ControllerSpec_Ceoslab) isControllerSpec_Spec() {} func (*ControllerSpec_Lemming) isControllerSpec_Spec() {} +func (*ControllerSpec_Cdnos) isControllerSpec_Spec() {} + // IxiaTG specifications type IxiaTGSpec struct { state protoimpl.MessageState @@ -921,6 +935,64 @@ func (x *LemmingSpec) GetOperator() *Manifest { return nil } +// CdnosSpec specifications +type CdnosSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated: Do not use. + ManifestDir string `protobuf:"bytes,1,opt,name=manifest_dir,json=manifestDir,proto3" json:"manifest_dir,omitempty"` + Operator *Manifest `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` +} + +func (x *CdnosSpec) Reset() { + *x = CdnosSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CdnosSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CdnosSpec) ProtoMessage() {} + +func (x *CdnosSpec) ProtoReflect() protoreflect.Message { + mi := &file_controller_proto_msgTypes[11] + 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) +} + +// Deprecated: Use CdnosSpec.ProtoReflect.Descriptor instead. +func (*CdnosSpec) Descriptor() ([]byte, []int) { + return file_controller_proto_rawDescGZIP(), []int{11} +} + +// Deprecated: Do not use. +func (x *CdnosSpec) GetManifestDir() string { + if x != nil { + return x.ManifestDir + } + return "" +} + +func (x *CdnosSpec) GetOperator() *Manifest { + if x != nil { + return x.Operator + } + return nil +} + type Manifest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -936,7 +1008,7 @@ type Manifest struct { func (x *Manifest) Reset() { *x = Manifest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[11] + mi := &file_controller_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -949,7 +1021,7 @@ func (x *Manifest) String() string { func (*Manifest) ProtoMessage() {} func (x *Manifest) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[11] + mi := &file_controller_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -962,7 +1034,7 @@ func (x *Manifest) ProtoReflect() protoreflect.Message { // Deprecated: Use Manifest.ProtoReflect.Descriptor instead. func (*Manifest) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{11} + return file_controller_proto_rawDescGZIP(), []int{12} } func (m *Manifest) GetManifestData() isManifest_ManifestData { @@ -1029,7 +1101,7 @@ type CreateClusterRequest struct { func (x *CreateClusterRequest) Reset() { *x = CreateClusterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[12] + mi := &file_controller_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1042,7 +1114,7 @@ func (x *CreateClusterRequest) String() string { func (*CreateClusterRequest) ProtoMessage() {} func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[12] + mi := &file_controller_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1055,7 +1127,7 @@ func (x *CreateClusterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateClusterRequest.ProtoReflect.Descriptor instead. func (*CreateClusterRequest) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{12} + return file_controller_proto_rawDescGZIP(), []int{13} } func (m *CreateClusterRequest) GetClusterSpec() isCreateClusterRequest_ClusterSpec { @@ -1163,7 +1235,7 @@ type CreateClusterResponse struct { func (x *CreateClusterResponse) Reset() { *x = CreateClusterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[13] + mi := &file_controller_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1176,7 +1248,7 @@ func (x *CreateClusterResponse) String() string { func (*CreateClusterResponse) ProtoMessage() {} func (x *CreateClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[13] + mi := &file_controller_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1189,7 +1261,7 @@ func (x *CreateClusterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateClusterResponse.ProtoReflect.Descriptor instead. func (*CreateClusterResponse) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{13} + return file_controller_proto_rawDescGZIP(), []int{14} } func (x *CreateClusterResponse) GetName() string { @@ -1218,7 +1290,7 @@ type DeleteClusterRequest struct { func (x *DeleteClusterRequest) Reset() { *x = DeleteClusterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[14] + mi := &file_controller_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1231,7 +1303,7 @@ func (x *DeleteClusterRequest) String() string { func (*DeleteClusterRequest) ProtoMessage() {} func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[14] + mi := &file_controller_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1244,7 +1316,7 @@ func (x *DeleteClusterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteClusterRequest.ProtoReflect.Descriptor instead. func (*DeleteClusterRequest) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{14} + return file_controller_proto_rawDescGZIP(), []int{15} } func (x *DeleteClusterRequest) GetName() string { @@ -1264,7 +1336,7 @@ type DeleteClusterResponse struct { func (x *DeleteClusterResponse) Reset() { *x = DeleteClusterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[15] + mi := &file_controller_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1277,7 +1349,7 @@ func (x *DeleteClusterResponse) String() string { func (*DeleteClusterResponse) ProtoMessage() {} func (x *DeleteClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[15] + mi := &file_controller_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1290,7 +1362,7 @@ func (x *DeleteClusterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteClusterResponse.ProtoReflect.Descriptor instead. func (*DeleteClusterResponse) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{15} + return file_controller_proto_rawDescGZIP(), []int{16} } // Request message to show cluster by name. @@ -1305,7 +1377,7 @@ type ShowClusterRequest struct { func (x *ShowClusterRequest) Reset() { *x = ShowClusterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[16] + mi := &file_controller_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1318,7 +1390,7 @@ func (x *ShowClusterRequest) String() string { func (*ShowClusterRequest) ProtoMessage() {} func (x *ShowClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[16] + mi := &file_controller_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1331,7 +1403,7 @@ func (x *ShowClusterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ShowClusterRequest.ProtoReflect.Descriptor instead. func (*ShowClusterRequest) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{16} + return file_controller_proto_rawDescGZIP(), []int{17} } func (x *ShowClusterRequest) GetName() string { @@ -1354,7 +1426,7 @@ type ShowClusterResponse struct { func (x *ShowClusterResponse) Reset() { *x = ShowClusterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[17] + mi := &file_controller_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1367,7 +1439,7 @@ func (x *ShowClusterResponse) String() string { func (*ShowClusterResponse) ProtoMessage() {} func (x *ShowClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[17] + mi := &file_controller_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1380,7 +1452,7 @@ func (x *ShowClusterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ShowClusterResponse.ProtoReflect.Descriptor instead. func (*ShowClusterResponse) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{17} + return file_controller_proto_rawDescGZIP(), []int{18} } func (x *ShowClusterResponse) GetState() ClusterState { @@ -1410,7 +1482,7 @@ type CreateTopologyRequest struct { func (x *CreateTopologyRequest) Reset() { *x = CreateTopologyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[18] + mi := &file_controller_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1423,7 +1495,7 @@ func (x *CreateTopologyRequest) String() string { func (*CreateTopologyRequest) ProtoMessage() {} func (x *CreateTopologyRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[18] + mi := &file_controller_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1436,7 +1508,7 @@ func (x *CreateTopologyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateTopologyRequest.ProtoReflect.Descriptor instead. func (*CreateTopologyRequest) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{18} + return file_controller_proto_rawDescGZIP(), []int{19} } func (x *CreateTopologyRequest) GetTopology() *topo.Topology { @@ -1466,7 +1538,7 @@ type CreateTopologyResponse struct { func (x *CreateTopologyResponse) Reset() { *x = CreateTopologyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[19] + mi := &file_controller_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1479,7 +1551,7 @@ func (x *CreateTopologyResponse) String() string { func (*CreateTopologyResponse) ProtoMessage() {} func (x *CreateTopologyResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[19] + mi := &file_controller_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1492,7 +1564,7 @@ func (x *CreateTopologyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateTopologyResponse.ProtoReflect.Descriptor instead. func (*CreateTopologyResponse) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{19} + return file_controller_proto_rawDescGZIP(), []int{20} } func (x *CreateTopologyResponse) GetTopologyName() string { @@ -1521,7 +1593,7 @@ type DeleteTopologyRequest struct { func (x *DeleteTopologyRequest) Reset() { *x = DeleteTopologyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[20] + mi := &file_controller_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1534,7 +1606,7 @@ func (x *DeleteTopologyRequest) String() string { func (*DeleteTopologyRequest) ProtoMessage() {} func (x *DeleteTopologyRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[20] + mi := &file_controller_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1547,7 +1619,7 @@ func (x *DeleteTopologyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteTopologyRequest.ProtoReflect.Descriptor instead. func (*DeleteTopologyRequest) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{20} + return file_controller_proto_rawDescGZIP(), []int{21} } func (x *DeleteTopologyRequest) GetTopologyName() string { @@ -1567,7 +1639,7 @@ type DeleteTopologyResponse struct { func (x *DeleteTopologyResponse) Reset() { *x = DeleteTopologyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[21] + mi := &file_controller_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1580,7 +1652,7 @@ func (x *DeleteTopologyResponse) String() string { func (*DeleteTopologyResponse) ProtoMessage() {} func (x *DeleteTopologyResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[21] + mi := &file_controller_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1593,7 +1665,7 @@ func (x *DeleteTopologyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteTopologyResponse.ProtoReflect.Descriptor instead. func (*DeleteTopologyResponse) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{21} + return file_controller_proto_rawDescGZIP(), []int{22} } // Request message to view topology info. @@ -1608,7 +1680,7 @@ type ShowTopologyRequest struct { func (x *ShowTopologyRequest) Reset() { *x = ShowTopologyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[22] + mi := &file_controller_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1621,7 +1693,7 @@ func (x *ShowTopologyRequest) String() string { func (*ShowTopologyRequest) ProtoMessage() {} func (x *ShowTopologyRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[22] + mi := &file_controller_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1634,7 +1706,7 @@ func (x *ShowTopologyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ShowTopologyRequest.ProtoReflect.Descriptor instead. func (*ShowTopologyRequest) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{22} + return file_controller_proto_rawDescGZIP(), []int{23} } func (x *ShowTopologyRequest) GetTopologyName() string { @@ -1657,7 +1729,7 @@ type ShowTopologyResponse struct { func (x *ShowTopologyResponse) Reset() { *x = ShowTopologyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[23] + mi := &file_controller_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1670,7 +1742,7 @@ func (x *ShowTopologyResponse) String() string { func (*ShowTopologyResponse) ProtoMessage() {} func (x *ShowTopologyResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[23] + mi := &file_controller_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1683,7 +1755,7 @@ func (x *ShowTopologyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ShowTopologyResponse.ProtoReflect.Descriptor instead. func (*ShowTopologyResponse) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{23} + return file_controller_proto_rawDescGZIP(), []int{24} } func (x *ShowTopologyResponse) GetState() TopologyState { @@ -1714,7 +1786,7 @@ type PushConfigRequest struct { func (x *PushConfigRequest) Reset() { *x = PushConfigRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[24] + mi := &file_controller_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1727,7 +1799,7 @@ func (x *PushConfigRequest) String() string { func (*PushConfigRequest) ProtoMessage() {} func (x *PushConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[24] + mi := &file_controller_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1740,7 +1812,7 @@ func (x *PushConfigRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PushConfigRequest.ProtoReflect.Descriptor instead. func (*PushConfigRequest) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{24} + return file_controller_proto_rawDescGZIP(), []int{25} } func (x *PushConfigRequest) GetTopologyName() string { @@ -1774,7 +1846,7 @@ type PushConfigResponse struct { func (x *PushConfigResponse) Reset() { *x = PushConfigResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[25] + mi := &file_controller_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1787,7 +1859,7 @@ func (x *PushConfigResponse) String() string { func (*PushConfigResponse) ProtoMessage() {} func (x *PushConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[25] + mi := &file_controller_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1800,7 +1872,7 @@ func (x *PushConfigResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PushConfigResponse.ProtoReflect.Descriptor instead. func (*PushConfigResponse) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{25} + return file_controller_proto_rawDescGZIP(), []int{26} } // Request message to reset config. @@ -1816,7 +1888,7 @@ type ResetConfigRequest struct { func (x *ResetConfigRequest) Reset() { *x = ResetConfigRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[26] + mi := &file_controller_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1829,7 +1901,7 @@ func (x *ResetConfigRequest) String() string { func (*ResetConfigRequest) ProtoMessage() {} func (x *ResetConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[26] + mi := &file_controller_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1842,7 +1914,7 @@ func (x *ResetConfigRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ResetConfigRequest.ProtoReflect.Descriptor instead. func (*ResetConfigRequest) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{26} + return file_controller_proto_rawDescGZIP(), []int{27} } func (x *ResetConfigRequest) GetTopologyName() string { @@ -1869,7 +1941,7 @@ type ResetConfigResponse struct { func (x *ResetConfigResponse) Reset() { *x = ResetConfigResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[27] + mi := &file_controller_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1882,7 +1954,7 @@ func (x *ResetConfigResponse) String() string { func (*ResetConfigResponse) ProtoMessage() {} func (x *ResetConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[27] + mi := &file_controller_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1895,7 +1967,7 @@ func (x *ResetConfigResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ResetConfigResponse.ProtoReflect.Descriptor instead. func (*ResetConfigResponse) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{27} + return file_controller_proto_rawDescGZIP(), []int{28} } // Request message to apply kubeyaml to a cluster. @@ -1911,7 +1983,7 @@ type ApplyClusterRequest struct { func (x *ApplyClusterRequest) Reset() { *x = ApplyClusterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[28] + mi := &file_controller_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1924,7 +1996,7 @@ func (x *ApplyClusterRequest) String() string { func (*ApplyClusterRequest) ProtoMessage() {} func (x *ApplyClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[28] + mi := &file_controller_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1937,7 +2009,7 @@ func (x *ApplyClusterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyClusterRequest.ProtoReflect.Descriptor instead. func (*ApplyClusterRequest) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{28} + return file_controller_proto_rawDescGZIP(), []int{29} } func (x *ApplyClusterRequest) GetName() string { @@ -1964,7 +2036,7 @@ type ApplyClusterResponse struct { func (x *ApplyClusterResponse) Reset() { *x = ApplyClusterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_controller_proto_msgTypes[29] + mi := &file_controller_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1977,7 +2049,7 @@ func (x *ApplyClusterResponse) String() string { func (*ApplyClusterResponse) ProtoMessage() {} func (x *ApplyClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_controller_proto_msgTypes[29] + mi := &file_controller_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1990,7 +2062,7 @@ func (x *ApplyClusterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyClusterResponse.ProtoReflect.Descriptor instead. func (*ApplyClusterResponse) Descriptor() ([]byte, []int) { - return file_controller_proto_rawDescGZIP(), []int{29} + return file_controller_proto_rawDescGZIP(), []int{30} } var File_controller_proto protoreflect.FileDescriptor @@ -2044,7 +2116,7 @@ var file_controller_proto_rawDesc = []byte{ 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x22, 0xe9, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, + 0x22, 0x98, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x30, 0x0a, 0x06, 0x69, 0x78, 0x69, 0x61, 0x74, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x49, 0x78, 0x69, 0x61, 0x54, 0x47, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x06, 0x69, @@ -2058,216 +2130,226 @@ var file_controller_proto_rawDesc = []byte{ 0x33, 0x0a, 0x07, 0x6c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x07, 0x6c, 0x65, 0x6d, - 0x6d, 0x69, 0x6e, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xd4, 0x01, 0x0a, - 0x0a, 0x49, 0x78, 0x69, 0x61, 0x54, 0x47, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0c, 0x6d, - 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x44, - 0x69, 0x72, 0x12, 0x3e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x49, 0x78, 0x69, 0x61, 0x54, 0x47, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x4d, 0x61, 0x70, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, - 0x61, 0x70, 0x12, 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, + 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x05, 0x63, 0x64, 0x6e, 0x6f, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2e, 0x43, 0x64, 0x6e, 0x6f, 0x73, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x05, 0x63, 0x64, + 0x6e, 0x6f, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xd4, 0x01, 0x0a, 0x0a, + 0x49, 0x78, 0x69, 0x61, 0x54, 0x47, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0c, 0x6d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x44, 0x69, + 0x72, 0x12, 0x3e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x49, 0x78, 0x69, 0x61, 0x54, 0x47, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, + 0x61, 0x70, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, + 0x70, 0x12, 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x66, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x66, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x06, 0x63, 0x66, 0x67, - 0x4d, 0x61, 0x70, 0x22, 0x5c, 0x0a, 0x0f, 0x49, 0x78, 0x69, 0x61, 0x54, 0x47, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, - 0x12, 0x2f, 0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x49, 0x78, - 0x69, 0x61, 0x54, 0x47, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x73, 0x22, 0x47, 0x0a, 0x0b, 0x49, 0x78, 0x69, 0x61, 0x54, 0x47, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x66, 0x0a, 0x0b, 0x53, 0x52, - 0x4c, 0x69, 0x6e, 0x75, 0x78, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, - 0x12, 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x22, 0x66, 0x0a, 0x0b, 0x43, 0x45, 0x4f, 0x53, 0x4c, 0x61, 0x62, 0x53, 0x70, 0x65, - 0x63, 0x12, 0x25, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, - 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x66, 0x0a, 0x0b, 0x4c, 0x65, - 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, - 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, - 0x12, 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x14, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x66, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x6d, 0x61, - 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd7, 0x02, 0x0a, 0x14, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x12, 0x36, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x08, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x61, - 0x6c, 0x6c, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x6c, 0x62, 0x53, 0x70, - 0x65, 0x63, 0x48, 0x01, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x6c, 0x62, 0x12, 0x33, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x68, - 0x6e, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x68, 0x6e, - 0x65, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x42, 0x0e, 0x0a, 0x0c, 0x69, 0x6e, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x42, 0x0a, 0x0a, 0x08, 0x63, 0x6e, 0x69, - 0x5f, 0x73, 0x70, 0x65, 0x63, 0x22, 0x5b, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, - 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x77, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x6c, 0x0a, 0x13, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, - 0x5d, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x08, 0x74, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x66, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x66, 0x67, 0x22, 0x6e, - 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, - 0x67, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3c, - 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, - 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x18, 0x0a, 0x16, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x13, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, - 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, + 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x06, 0x63, 0x66, 0x67, 0x4d, + 0x61, 0x70, 0x22, 0x5c, 0x0a, 0x0f, 0x49, 0x78, 0x69, 0x61, 0x54, 0x47, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x4d, 0x61, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, + 0x2f, 0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x49, 0x78, 0x69, + 0x61, 0x54, 0x47, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, + 0x22, 0x47, 0x0a, 0x0b, 0x49, 0x78, 0x69, 0x61, 0x54, 0x47, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x66, 0x0a, 0x0b, 0x53, 0x52, 0x4c, + 0x69, 0x6e, 0x75, 0x78, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x12, + 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x22, 0x66, 0x0a, 0x0b, 0x43, 0x45, 0x4f, 0x53, 0x4c, 0x61, 0x62, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x25, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, + 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x66, 0x0a, 0x0b, 0x4c, 0x65, 0x6d, + 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x12, + 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, + 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x22, 0x64, 0x0a, 0x09, 0x43, 0x64, 0x6e, 0x6f, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, + 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, + 0x73, 0x74, 0x44, 0x69, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, + 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x04, 0x66, 0x69, 0x6c, + 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x42, + 0x0f, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x22, 0xd7, 0x02, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x70, 0x65, + 0x63, 0x48, 0x00, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x33, 0x0a, + 0x07, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x6c, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x6c, 0x6c, 0x62, 0x53, 0x70, 0x65, 0x63, 0x48, 0x01, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x6c, + 0x6c, 0x62, 0x12, 0x33, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x02, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x73, 0x42, 0x0e, + 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x42, 0x0e, + 0x0a, 0x0c, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x42, 0x0a, + 0x0a, 0x08, 0x63, 0x6e, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x22, 0x5b, 0x0a, 0x15, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x12, + 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x6c, 0x0a, 0x13, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, + 0x0e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, + 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, + 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x75, 0x62, + 0x65, 0x63, 0x66, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x75, 0x62, 0x65, + 0x63, 0x66, 0x67, 0x22, 0x6e, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x22, 0x73, 0x0a, 0x14, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, - 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x74, - 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x08, 0x74, - 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x22, 0x71, 0x0a, 0x11, 0x50, 0x75, 0x73, 0x68, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, + 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, + 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x22, 0x3c, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x75, - 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x5a, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, - 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, - 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, - 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x15, 0x0a, 0x13, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x41, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x7d, - 0x0a, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, - 0x0a, 0x19, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, - 0x16, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, - 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4c, 0x55, - 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, - 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x2a, 0x82, 0x01, - 0x0a, 0x0d, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x1e, 0x0a, 0x1a, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x1b, 0x0a, 0x17, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, - 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, - 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x4f, 0x50, 0x4f, - 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x03, 0x32, 0x94, 0x06, 0x0a, 0x0f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, + 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x13, 0x53, + 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, + 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x73, 0x0a, 0x14, 0x53, 0x68, 0x6f, 0x77, 0x54, + 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x70, 0x6f, + 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x2a, 0x0a, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x22, 0x71, 0x0a, 0x11, + 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0x14, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, + 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, + 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x16, 0x0a, 0x14, 0x41, + 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2a, 0x7d, 0x0a, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x19, + 0x0a, 0x15, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x55, + 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x10, 0x03, 0x2a, 0x82, 0x01, 0x0a, 0x0d, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x18, 0x0a, + 0x14, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0x94, 0x06, 0x0a, 0x0f, 0x54, 0x6f, 0x70, 0x6f, + 0x6c, 0x6f, 0x67, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x21, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x59, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, - 0x6f, 0x67, 0x79, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, - 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, - 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x1f, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, - 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x54, - 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x56, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0d, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x50, 0x0a, 0x0b, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x68, - 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x68, - 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x50, - 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x75, - 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, + 0x79, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, + 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, + 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0b, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x41, 0x70, 0x70, + 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, + 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, + 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2283,7 +2365,7 @@ func file_controller_proto_rawDescGZIP() []byte { } var file_controller_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_controller_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_controller_proto_msgTypes = make([]protoimpl.MessageInfo, 32) var file_controller_proto_goTypes = []interface{}{ (ClusterState)(0), // 0: controller.ClusterState (TopologyState)(0), // 1: controller.TopologyState @@ -2298,77 +2380,80 @@ var file_controller_proto_goTypes = []interface{}{ (*SRLinuxSpec)(nil), // 10: controller.SRLinuxSpec (*CEOSLabSpec)(nil), // 11: controller.CEOSLabSpec (*LemmingSpec)(nil), // 12: controller.LemmingSpec - (*Manifest)(nil), // 13: controller.Manifest - (*CreateClusterRequest)(nil), // 14: controller.CreateClusterRequest - (*CreateClusterResponse)(nil), // 15: controller.CreateClusterResponse - (*DeleteClusterRequest)(nil), // 16: controller.DeleteClusterRequest - (*DeleteClusterResponse)(nil), // 17: controller.DeleteClusterResponse - (*ShowClusterRequest)(nil), // 18: controller.ShowClusterRequest - (*ShowClusterResponse)(nil), // 19: controller.ShowClusterResponse - (*CreateTopologyRequest)(nil), // 20: controller.CreateTopologyRequest - (*CreateTopologyResponse)(nil), // 21: controller.CreateTopologyResponse - (*DeleteTopologyRequest)(nil), // 22: controller.DeleteTopologyRequest - (*DeleteTopologyResponse)(nil), // 23: controller.DeleteTopologyResponse - (*ShowTopologyRequest)(nil), // 24: controller.ShowTopologyRequest - (*ShowTopologyResponse)(nil), // 25: controller.ShowTopologyResponse - (*PushConfigRequest)(nil), // 26: controller.PushConfigRequest - (*PushConfigResponse)(nil), // 27: controller.PushConfigResponse - (*ResetConfigRequest)(nil), // 28: controller.ResetConfigRequest - (*ResetConfigResponse)(nil), // 29: controller.ResetConfigResponse - (*ApplyClusterRequest)(nil), // 30: controller.ApplyClusterRequest - (*ApplyClusterResponse)(nil), // 31: controller.ApplyClusterResponse - nil, // 32: controller.KindSpec.ContainerImagesEntry - (*topo.Topology)(nil), // 33: topo.Topology + (*CdnosSpec)(nil), // 13: controller.CdnosSpec + (*Manifest)(nil), // 14: controller.Manifest + (*CreateClusterRequest)(nil), // 15: controller.CreateClusterRequest + (*CreateClusterResponse)(nil), // 16: controller.CreateClusterResponse + (*DeleteClusterRequest)(nil), // 17: controller.DeleteClusterRequest + (*DeleteClusterResponse)(nil), // 18: controller.DeleteClusterResponse + (*ShowClusterRequest)(nil), // 19: controller.ShowClusterRequest + (*ShowClusterResponse)(nil), // 20: controller.ShowClusterResponse + (*CreateTopologyRequest)(nil), // 21: controller.CreateTopologyRequest + (*CreateTopologyResponse)(nil), // 22: controller.CreateTopologyResponse + (*DeleteTopologyRequest)(nil), // 23: controller.DeleteTopologyRequest + (*DeleteTopologyResponse)(nil), // 24: controller.DeleteTopologyResponse + (*ShowTopologyRequest)(nil), // 25: controller.ShowTopologyRequest + (*ShowTopologyResponse)(nil), // 26: controller.ShowTopologyResponse + (*PushConfigRequest)(nil), // 27: controller.PushConfigRequest + (*PushConfigResponse)(nil), // 28: controller.PushConfigResponse + (*ResetConfigRequest)(nil), // 29: controller.ResetConfigRequest + (*ResetConfigResponse)(nil), // 30: controller.ResetConfigResponse + (*ApplyClusterRequest)(nil), // 31: controller.ApplyClusterRequest + (*ApplyClusterResponse)(nil), // 32: controller.ApplyClusterResponse + nil, // 33: controller.KindSpec.ContainerImagesEntry + (*topo.Topology)(nil), // 34: topo.Topology } var file_controller_proto_depIdxs = []int32{ - 32, // 0: controller.KindSpec.container_images:type_name -> controller.KindSpec.ContainerImagesEntry - 13, // 1: controller.MetallbSpec.manifest:type_name -> controller.Manifest - 13, // 2: controller.MeshnetSpec.manifest:type_name -> controller.Manifest + 33, // 0: controller.KindSpec.container_images:type_name -> controller.KindSpec.ContainerImagesEntry + 14, // 1: controller.MetallbSpec.manifest:type_name -> controller.Manifest + 14, // 2: controller.MeshnetSpec.manifest:type_name -> controller.Manifest 7, // 3: controller.ControllerSpec.ixiatg:type_name -> controller.IxiaTGSpec 10, // 4: controller.ControllerSpec.srlinux:type_name -> controller.SRLinuxSpec 11, // 5: controller.ControllerSpec.ceoslab:type_name -> controller.CEOSLabSpec 12, // 6: controller.ControllerSpec.lemming:type_name -> controller.LemmingSpec - 8, // 7: controller.IxiaTGSpec.config_map:type_name -> controller.IxiaTGConfigMap - 13, // 8: controller.IxiaTGSpec.operator:type_name -> controller.Manifest - 13, // 9: controller.IxiaTGSpec.cfg_map:type_name -> controller.Manifest - 9, // 10: controller.IxiaTGConfigMap.images:type_name -> controller.IxiaTGImage - 13, // 11: controller.SRLinuxSpec.operator:type_name -> controller.Manifest - 13, // 12: controller.CEOSLabSpec.operator:type_name -> controller.Manifest - 13, // 13: controller.LemmingSpec.operator:type_name -> controller.Manifest - 2, // 14: controller.CreateClusterRequest.kind:type_name -> controller.KindSpec - 3, // 15: controller.CreateClusterRequest.external:type_name -> controller.ExternalSpec - 4, // 16: controller.CreateClusterRequest.metallb:type_name -> controller.MetallbSpec - 5, // 17: controller.CreateClusterRequest.meshnet:type_name -> controller.MeshnetSpec - 6, // 18: controller.CreateClusterRequest.controller_specs:type_name -> controller.ControllerSpec - 0, // 19: controller.CreateClusterResponse.state:type_name -> controller.ClusterState - 0, // 20: controller.ShowClusterResponse.state:type_name -> controller.ClusterState - 33, // 21: controller.CreateTopologyRequest.topology:type_name -> topo.Topology - 1, // 22: controller.CreateTopologyResponse.state:type_name -> controller.TopologyState - 1, // 23: controller.ShowTopologyResponse.state:type_name -> controller.TopologyState - 33, // 24: controller.ShowTopologyResponse.topology:type_name -> topo.Topology - 20, // 25: controller.TopologyManager.CreateTopology:input_type -> controller.CreateTopologyRequest - 22, // 26: controller.TopologyManager.DeleteTopology:input_type -> controller.DeleteTopologyRequest - 24, // 27: controller.TopologyManager.ShowTopology:input_type -> controller.ShowTopologyRequest - 14, // 28: controller.TopologyManager.CreateCluster:input_type -> controller.CreateClusterRequest - 16, // 29: controller.TopologyManager.DeleteCluster:input_type -> controller.DeleteClusterRequest - 18, // 30: controller.TopologyManager.ShowCluster:input_type -> controller.ShowClusterRequest - 26, // 31: controller.TopologyManager.PushConfig:input_type -> controller.PushConfigRequest - 28, // 32: controller.TopologyManager.ResetConfig:input_type -> controller.ResetConfigRequest - 30, // 33: controller.TopologyManager.ApplyCluster:input_type -> controller.ApplyClusterRequest - 21, // 34: controller.TopologyManager.CreateTopology:output_type -> controller.CreateTopologyResponse - 23, // 35: controller.TopologyManager.DeleteTopology:output_type -> controller.DeleteTopologyResponse - 25, // 36: controller.TopologyManager.ShowTopology:output_type -> controller.ShowTopologyResponse - 15, // 37: controller.TopologyManager.CreateCluster:output_type -> controller.CreateClusterResponse - 17, // 38: controller.TopologyManager.DeleteCluster:output_type -> controller.DeleteClusterResponse - 19, // 39: controller.TopologyManager.ShowCluster:output_type -> controller.ShowClusterResponse - 27, // 40: controller.TopologyManager.PushConfig:output_type -> controller.PushConfigResponse - 29, // 41: controller.TopologyManager.ResetConfig:output_type -> controller.ResetConfigResponse - 31, // 42: controller.TopologyManager.ApplyCluster:output_type -> controller.ApplyClusterResponse - 34, // [34:43] is the sub-list for method output_type - 25, // [25:34] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 13, // 7: controller.ControllerSpec.cdnos:type_name -> controller.CdnosSpec + 8, // 8: controller.IxiaTGSpec.config_map:type_name -> controller.IxiaTGConfigMap + 14, // 9: controller.IxiaTGSpec.operator:type_name -> controller.Manifest + 14, // 10: controller.IxiaTGSpec.cfg_map:type_name -> controller.Manifest + 9, // 11: controller.IxiaTGConfigMap.images:type_name -> controller.IxiaTGImage + 14, // 12: controller.SRLinuxSpec.operator:type_name -> controller.Manifest + 14, // 13: controller.CEOSLabSpec.operator:type_name -> controller.Manifest + 14, // 14: controller.LemmingSpec.operator:type_name -> controller.Manifest + 14, // 15: controller.CdnosSpec.operator:type_name -> controller.Manifest + 2, // 16: controller.CreateClusterRequest.kind:type_name -> controller.KindSpec + 3, // 17: controller.CreateClusterRequest.external:type_name -> controller.ExternalSpec + 4, // 18: controller.CreateClusterRequest.metallb:type_name -> controller.MetallbSpec + 5, // 19: controller.CreateClusterRequest.meshnet:type_name -> controller.MeshnetSpec + 6, // 20: controller.CreateClusterRequest.controller_specs:type_name -> controller.ControllerSpec + 0, // 21: controller.CreateClusterResponse.state:type_name -> controller.ClusterState + 0, // 22: controller.ShowClusterResponse.state:type_name -> controller.ClusterState + 34, // 23: controller.CreateTopologyRequest.topology:type_name -> topo.Topology + 1, // 24: controller.CreateTopologyResponse.state:type_name -> controller.TopologyState + 1, // 25: controller.ShowTopologyResponse.state:type_name -> controller.TopologyState + 34, // 26: controller.ShowTopologyResponse.topology:type_name -> topo.Topology + 21, // 27: controller.TopologyManager.CreateTopology:input_type -> controller.CreateTopologyRequest + 23, // 28: controller.TopologyManager.DeleteTopology:input_type -> controller.DeleteTopologyRequest + 25, // 29: controller.TopologyManager.ShowTopology:input_type -> controller.ShowTopologyRequest + 15, // 30: controller.TopologyManager.CreateCluster:input_type -> controller.CreateClusterRequest + 17, // 31: controller.TopologyManager.DeleteCluster:input_type -> controller.DeleteClusterRequest + 19, // 32: controller.TopologyManager.ShowCluster:input_type -> controller.ShowClusterRequest + 27, // 33: controller.TopologyManager.PushConfig:input_type -> controller.PushConfigRequest + 29, // 34: controller.TopologyManager.ResetConfig:input_type -> controller.ResetConfigRequest + 31, // 35: controller.TopologyManager.ApplyCluster:input_type -> controller.ApplyClusterRequest + 22, // 36: controller.TopologyManager.CreateTopology:output_type -> controller.CreateTopologyResponse + 24, // 37: controller.TopologyManager.DeleteTopology:output_type -> controller.DeleteTopologyResponse + 26, // 38: controller.TopologyManager.ShowTopology:output_type -> controller.ShowTopologyResponse + 16, // 39: controller.TopologyManager.CreateCluster:output_type -> controller.CreateClusterResponse + 18, // 40: controller.TopologyManager.DeleteCluster:output_type -> controller.DeleteClusterResponse + 20, // 41: controller.TopologyManager.ShowCluster:output_type -> controller.ShowClusterResponse + 28, // 42: controller.TopologyManager.PushConfig:output_type -> controller.PushConfigResponse + 30, // 43: controller.TopologyManager.ResetConfig:output_type -> controller.ResetConfigResponse + 32, // 44: controller.TopologyManager.ApplyCluster:output_type -> controller.ApplyClusterResponse + 36, // [36:45] is the sub-list for method output_type + 27, // [27:36] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name } func init() { file_controller_proto_init() } @@ -2510,7 +2595,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Manifest); i { + switch v := v.(*CdnosSpec); i { case 0: return &v.state case 1: @@ -2522,7 +2607,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateClusterRequest); i { + switch v := v.(*Manifest); i { case 0: return &v.state case 1: @@ -2534,7 +2619,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateClusterResponse); i { + switch v := v.(*CreateClusterRequest); i { case 0: return &v.state case 1: @@ -2546,7 +2631,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteClusterRequest); i { + switch v := v.(*CreateClusterResponse); i { case 0: return &v.state case 1: @@ -2558,7 +2643,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteClusterResponse); i { + switch v := v.(*DeleteClusterRequest); i { case 0: return &v.state case 1: @@ -2570,7 +2655,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShowClusterRequest); i { + switch v := v.(*DeleteClusterResponse); i { case 0: return &v.state case 1: @@ -2582,7 +2667,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShowClusterResponse); i { + switch v := v.(*ShowClusterRequest); i { case 0: return &v.state case 1: @@ -2594,7 +2679,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTopologyRequest); i { + switch v := v.(*ShowClusterResponse); i { case 0: return &v.state case 1: @@ -2606,7 +2691,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTopologyResponse); i { + switch v := v.(*CreateTopologyRequest); i { case 0: return &v.state case 1: @@ -2618,7 +2703,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteTopologyRequest); i { + switch v := v.(*CreateTopologyResponse); i { case 0: return &v.state case 1: @@ -2630,7 +2715,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteTopologyResponse); i { + switch v := v.(*DeleteTopologyRequest); i { case 0: return &v.state case 1: @@ -2642,7 +2727,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShowTopologyRequest); i { + switch v := v.(*DeleteTopologyResponse); i { case 0: return &v.state case 1: @@ -2654,7 +2739,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ShowTopologyResponse); i { + switch v := v.(*ShowTopologyRequest); i { case 0: return &v.state case 1: @@ -2666,7 +2751,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushConfigRequest); i { + switch v := v.(*ShowTopologyResponse); i { case 0: return &v.state case 1: @@ -2678,7 +2763,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushConfigResponse); i { + switch v := v.(*PushConfigRequest); i { case 0: return &v.state case 1: @@ -2690,7 +2775,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResetConfigRequest); i { + switch v := v.(*PushConfigResponse); i { case 0: return &v.state case 1: @@ -2702,7 +2787,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResetConfigResponse); i { + switch v := v.(*ResetConfigRequest); i { case 0: return &v.state case 1: @@ -2714,7 +2799,7 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyClusterRequest); i { + switch v := v.(*ResetConfigResponse); i { case 0: return &v.state case 1: @@ -2726,6 +2811,18 @@ func file_controller_proto_init() { } } file_controller_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplyClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ApplyClusterResponse); i { case 0: return &v.state @@ -2743,12 +2840,13 @@ func file_controller_proto_init() { (*ControllerSpec_Srlinux)(nil), (*ControllerSpec_Ceoslab)(nil), (*ControllerSpec_Lemming)(nil), + (*ControllerSpec_Cdnos)(nil), } - file_controller_proto_msgTypes[11].OneofWrappers = []interface{}{ + file_controller_proto_msgTypes[12].OneofWrappers = []interface{}{ (*Manifest_Data)(nil), (*Manifest_File)(nil), } - file_controller_proto_msgTypes[12].OneofWrappers = []interface{}{ + file_controller_proto_msgTypes[13].OneofWrappers = []interface{}{ (*CreateClusterRequest_Kind)(nil), (*CreateClusterRequest_External)(nil), (*CreateClusterRequest_Metallb)(nil), @@ -2760,7 +2858,7 @@ func file_controller_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_controller_proto_rawDesc, NumEnums: 2, - NumMessages: 31, + NumMessages: 32, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/event.proto b/proto/event.proto index cc64a2fc..b7ff48d6 100644 --- a/proto/event.proto +++ b/proto/event.proto @@ -81,6 +81,7 @@ message Cluster { CONTROLLER_TYPE_SRLINUX = 2; CONTROLLER_TYPE_CEOSLAB = 3; CONTROLLER_TYPE_LEMMING = 4; + CONTROLLER_TYPE_CDNOS = 5; } repeated ControllerType controllers = 4; } diff --git a/proto/event/event.pb.go b/proto/event/event.pb.go index 3aaee516..614bb712 100644 --- a/proto/event/event.pb.go +++ b/proto/event/event.pb.go @@ -185,6 +185,7 @@ const ( Cluster_CONTROLLER_TYPE_SRLINUX Cluster_ControllerType = 2 Cluster_CONTROLLER_TYPE_CEOSLAB Cluster_ControllerType = 3 Cluster_CONTROLLER_TYPE_LEMMING Cluster_ControllerType = 4 + Cluster_CONTROLLER_TYPE_CDNOS Cluster_ControllerType = 5 ) // Enum value maps for Cluster_ControllerType. @@ -195,6 +196,7 @@ var ( 2: "CONTROLLER_TYPE_SRLINUX", 3: "CONTROLLER_TYPE_CEOSLAB", 4: "CONTROLLER_TYPE_LEMMING", + 5: "CONTROLLER_TYPE_CDNOS", } Cluster_ControllerType_value = map[string]int32{ "CONTROLLER_TYPE_UNSPECIFIED": 0, @@ -202,6 +204,7 @@ var ( "CONTROLLER_TYPE_SRLINUX": 2, "CONTROLLER_TYPE_CEOSLAB": 3, "CONTROLLER_TYPE_LEMMING": 4, + "CONTROLLER_TYPE_CDNOS": 5, } ) @@ -794,7 +797,7 @@ var file_event_proto_rawDesc = []byte{ 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x22, 0x29, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x45, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x22, 0xe8, 0x04, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x72, 0x72, 0x6f, 0x72, 0x22, 0x83, 0x05, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x63, @@ -822,7 +825,7 @@ var file_event_proto_rawDesc = []byte{ 0x07, 0x43, 0x4e, 0x49, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4e, 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4e, 0x49, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, - 0x45, 0x53, 0x48, 0x4e, 0x45, 0x54, 0x10, 0x01, 0x22, 0xa4, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, + 0x45, 0x53, 0x48, 0x4e, 0x45, 0x54, 0x10, 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x4c, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, @@ -832,20 +835,21 @@ var file_event_proto_rawDesc = []byte{ 0x4e, 0x55, 0x58, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x4c, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x45, 0x4f, 0x53, 0x4c, 0x41, 0x42, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x4c, 0x45, 0x52, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x4d, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x22, - 0x4c, 0x0a, 0x08, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x6e, - 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1d, - 0x0a, 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x42, 0x0a, - 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x56, 0x65, 0x6e, - 0x64, 0x6f, 0x72, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x4d, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, + 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x4c, 0x45, 0x52, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x43, 0x44, 0x4e, 0x4f, 0x53, 0x10, 0x05, 0x22, 0x4c, 0x0a, 0x08, 0x54, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x69, 0x6e, + 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, + 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x42, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x24, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0c, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x52, 0x06, + 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x27, 0x5a, 0x25, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/topo.proto b/proto/topo.proto index 0a4ce165..166c7c62 100644 --- a/proto/topo.proto +++ b/proto/topo.proto @@ -42,6 +42,7 @@ enum Vendor { NOKIA = 9; OPENCONFIG = 10; ALPINE = 11; + DRIVENETS = 12; } // Node is a single container inside the topology @@ -63,6 +64,7 @@ message Node { CISCO_XRD = 12; CISCO_E8000 = 13; LEMMING = 14; + CDNOS = 15; } string name = 1; // Name of the node in the topology. Must be unique. Type type = 2 [deprecated = true]; diff --git a/topo/node/drivenets/drivenets.go b/topo/node/drivenets/drivenets.go new file mode 100644 index 00000000..a5503853 --- /dev/null +++ b/topo/node/drivenets/drivenets.go @@ -0,0 +1,391 @@ +/* +Copyright 2023 nhadar-dn. + +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 drivenets implmements node definitions for nodes from the +// Drivenets vendor. It implements both a device (model: cdnos) and +// an ATE (model: magna). +package drivenets + +import ( + "context" + "fmt" + "io" + "os" + "path/filepath" + + cdnosv1 "github.com/drivenets/cdnos-controller/api/v1" + "github.com/drivenets/cdnos-controller/api/v1/clientset" + tpb "github.com/openconfig/kne/proto/topo" + "github.com/openconfig/kne/topo/node" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/rest" + log "k8s.io/klog/v2" +) + +const ( + // modelMagna is a string used in the topology to specify that a magna (github.com/openconfig/magna) + // ATE instance should be created. + modelMagna string = "MAGNA" + // modelCdnos is a string used in the topology to specify that a cdnos + // device instance should be created. + modelCdnos string = "CDNOS" +) + +// New creates a new instance of a node based on the specified model. +func New(nodeImpl *node.Impl) (node.Node, error) { + if nodeImpl == nil { + return nil, fmt.Errorf("nodeImpl cannot be nil") + } + if nodeImpl.Proto == nil { + return nil, fmt.Errorf("nodeImpl.Proto cannot be nil") + } + + var cfg *tpb.Node + switch nodeImpl.Proto.Model { + case modelCdnos: + cfg = cdnosDefaults(nodeImpl.Proto) + case modelMagna: + cfg = magnaDefaults(nodeImpl.Proto) + default: + return nil, fmt.Errorf("a model must be specified") + } + + nodeImpl.Proto = cfg + n := &Node{ + Impl: nodeImpl, + } + return n, nil +} + +type Node struct { + *node.Impl +} + +// Add validations for interfaces the node provides +var ( + _ node.Certer = (*Node)(nil) + _ node.ConfigPusher = (*Node)(nil) + _ node.Resetter = (*Node)(nil) +) + +var clientFn = func(c *rest.Config) (clientset.Interface, error) { + return clientset.NewForConfig(c) +} + +func (n *Node) Create(ctx context.Context) error { + switch n.Impl.Proto.Model { + case modelCdnos: + return n.cdnosCreate(ctx) + case modelMagna: + // magna uses the standard pod creation as though it were a host. + return n.Impl.Create(ctx) + default: + return fmt.Errorf("cannot create an instance of an unknown model") + } +} + +// cdnosCreate implements the Create function for the cdnos model devices. +func (n *Node) cdnosCreate(ctx context.Context) error { + log.Infof("Creating Cdnos node resource %s", n.Name()) + + if _, err := n.CreateConfig(ctx); err != nil { + return fmt.Errorf("node %s failed to create config-map %w", n.Name(), err) + } + log.Infof("Created Cdnos %s configmap", n.Name()) + + nodeSpec := n.GetProto() + config := nodeSpec.GetConfig() + log.Infof("create cdnos %q", nodeSpec.Name) + + ports := map[string]cdnosv1.ServicePort{} + + for k, v := range n.Proto.Services { + ports[v.Name] = cdnosv1.ServicePort{ + InnerPort: int32(v.Inside), + OuterPort: int32(k), + } + } + + dut := &cdnosv1.Cdnos{ + ObjectMeta: metav1.ObjectMeta{ + Name: nodeSpec.Name, + Namespace: n.Namespace, + Labels: nodeSpec.Labels, + }, + Spec: cdnosv1.CdnosSpec{ + Image: config.Image, + Command: config.Command[0], + Args: config.Args, + Env: node.ToEnvVar(config.Env), + ConfigPath: config.ConfigPath, + ConfigFile: config.ConfigFile, + InitImage: config.InitImage, + Ports: ports, + InterfaceCount: len(nodeSpec.Interfaces) + 1, + InitSleep: int(config.Sleep), + Resources: node.ToResourceRequirements(nodeSpec.Constraints), + Labels: nodeSpec.Labels, + }, + } + if config.Cert != nil { + switch tls := config.Cert.Config.(type) { + case *tpb.CertificateCfg_SelfSigned: + dut.Spec.TLS = &cdnosv1.TLSSpec{ + SelfSigned: &cdnosv1.SelfSignedSpec{ + CommonName: tls.SelfSigned.CommonName, + KeySize: int(tls.SelfSigned.KeySize), + }, + } + } + } + + cs, err := clientFn(n.RestConfig) + if err != nil { + return fmt.Errorf("failed to get kubernetes client: %v", err) + } + if _, err := cs.CdnosV1alpha1().Cdnoss(n.Namespace).Create(ctx, dut, metav1.CreateOptions{}); err != nil { + return fmt.Errorf("failed to create cdnos: %v", err) + } + return nil +} + +func (n *Node) Status(ctx context.Context) (node.Status, error) { + switch n.Impl.Proto.Model { + case modelMagna: + // magna's status uses the standard underlying node implementation. + return n.Impl.Status(ctx) + case modelCdnos: + return n.cdnosStatus(ctx) + default: + return node.StatusUnknown, fmt.Errorf("invalid model specified.") + } +} + +func (n *Node) cdnosStatus(ctx context.Context) (node.Status, error) { + cs, err := clientFn(n.RestConfig) + if err != nil { + return node.StatusUnknown, err + } + got, err := cs.CdnosV1alpha1().Cdnoss(n.Namespace).Get(ctx, n.Name(), metav1.GetOptions{}) + if err != nil { + return node.StatusUnknown, err + } + switch got.Status.Phase { + case cdnosv1.Running: + return node.StatusRunning, nil + case cdnosv1.Failed: + return node.StatusFailed, nil + case cdnosv1.Pending: + return node.StatusPending, nil + default: + return node.StatusUnknown, nil + } +} + +func (n *Node) Delete(ctx context.Context) error { + switch n.Impl.Proto.Model { + case modelMagna: + // magna's implementation uses the standard underlying node implementation. + return n.Impl.Delete(ctx) + case modelCdnos: + return n.cdnosDelete(ctx) + default: + return fmt.Errorf("unknown model") + } +} + +func (n *Node) cdnosDelete(ctx context.Context) error { + cs, err := clientFn(n.RestConfig) + if err != nil { + return err + } + return cs.CdnosV1alpha1().Cdnoss(n.Namespace).Delete(ctx, n.Name(), metav1.DeleteOptions{}) +} + +func (n *Node) ResetCfg(ctx context.Context) error { + log.Info("ResetCfg is a noop.") + return nil +} + +func (n *Node) ConfigPush(context.Context, io.Reader) error { + return status.Errorf(codes.Unimplemented, "config push is not implemented using gNMI to configure device") +} + +func (n *Node) GenerateSelfSigned(context.Context) error { + return status.Errorf(codes.Unimplemented, "certificate generation is not supported") +} + +func cdnosDefaults(pb *tpb.Node) *tpb.Node { + if pb.Config == nil { + pb.Config = &tpb.Config{} + } + if pb.Config.Image == "" { + pb.Config.Image = "pr-registry.dev.drivenets.net/cdnos_pr_61485:19.1.0.1_priv.61485.1ca7037408b5f7a975949e0912d743498b1f49b5" + } + if pb.Config.InitImage == "" { + pb.Config.InitImage = node.DefaultInitContainerImage + } + if len(pb.GetConfig().GetCommand()) == 0 { + pb.Config.Command = []string{"/define_notif_net.sh"} + } + if pb.Config.EntryCommand == "" { + pb.Config.EntryCommand = fmt.Sprintf("kubectl exec -it %s -- /bin/bash", pb.Name) + } + if pb.Config.Cert == nil { + pb.Config.Cert = &tpb.CertificateCfg{ + Config: &tpb.CertificateCfg_SelfSigned{ + SelfSigned: &tpb.SelfSignedCertCfg{ + CommonName: pb.Name, + KeySize: 2048, + }, + }, + } + } + if pb.Constraints == nil { + pb.Constraints = map[string]string{} + } + if pb.Constraints["cpu"] == "" { + pb.Constraints["cpu"] = "0.5" + } + if pb.Constraints["memory"] == "" { + pb.Constraints["memory"] = "1Gi" + } + if pb.Labels == nil { + pb.Labels = map[string]string{} + } + if pb.Labels["vendor"] == "" { + pb.Labels["vendor"] = tpb.Vendor_DRIVENETS.String() + } + + // Always explicitly specify that cdnos is a DUT, this cannot be overridden by the user. + pb.Labels[node.OndatraRoleLabel] = node.OndatraRoleDUT + + if pb.Services == nil { + pb.Services = map[uint32]*tpb.Service{ + // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=gnmi + 9339: { + Name: "gnmi", + Inside: 9339, + }, + 9340: { + Name: "gribi", + Inside: 9340, + }, + 9341: { + Name: "gnsi", + Inside: 9339, + }, + 9342: { + Name: "gnoi", + Inside: 9339, + }, + } + } + return pb +} + +func magnaDefaults(pb *tpb.Node) *tpb.Node { + if pb.Config == nil { + pb.Config = &tpb.Config{} + } + if pb.Services == nil { + pb.Services = map[uint32]*tpb.Service{} + } + if len(pb.GetConfig().GetCommand()) == 0 { + pb.Config.Command = []string{ + "/app/magna", + "-v=2", + "-alsologtostderr", + "-port=40051", + "-telemetry_port=50051", + "-certfile=/data/cert.pem", + "-keyfile=/data/key.pem", + } + } + if pb.Config.EntryCommand == "" { + pb.Config.EntryCommand = fmt.Sprintf("kubectl exec -it %s -- sh", pb.Name) + } + if pb.Config.Image == "" { + // TODO(robjs): add public container location once the first iteration is pushed. + // Currently, this image can be built from github.com/openconfig/magna. + pb.Config.Image = "magna:latest" + } + + if _, ok := pb.Services[40051]; !ok { + pb.Services[40051] = &tpb.Service{ + Name: "grpc", + Inside: 40051, + Outside: 40051, + } + } + + if _, ok := pb.Services[50051]; !ok { + pb.Services[50051] = &tpb.Service{ + Name: "gnmi", + Inside: 50051, + Outside: 50051, + } + } + + if pb.Labels == nil { + pb.Labels = map[string]string{ + "vendor": tpb.Vendor_DRIVENETS.String(), + } + } + + // Always explicitly specify that magna nodes are ATEs, this cannot be overridden by the user. + pb.Labels[node.OndatraRoleLabel] = node.OndatraRoleATE + + return pb +} + +func init() { + node.Vendor(tpb.Vendor_DRIVENETS, New) +} + +func (n *Node) CreateConfig(ctx context.Context) (*corev1.Volume, error) { + pb := n.Proto + var data []byte + switch v := pb.Config.GetConfigData().(type) { + case *tpb.Config_File: + var err error + data, err = os.ReadFile(filepath.Join(n.BasePath, v.File)) + if err != nil { + return nil, err + } + case *tpb.Config_Data: + data = v.Data + } + if data != nil { + cm := &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("%s-config", pb.Name), + }, + Data: map[string]string{ + pb.Config.ConfigFile: string(data), + }, + } + sCM, err := n.KubeClient.CoreV1().ConfigMaps(n.Namespace).Create(ctx, cm, metav1.CreateOptions{}) + if err != nil { + return nil, err + } + log.V(1).Infof("Server Config Map:\n%v\n", sCM) + } + return nil, nil +} diff --git a/topo/topo.go b/topo/topo.go index fd39c9e2..37258d78 100644 --- a/topo/topo.go +++ b/topo/topo.go @@ -50,6 +50,7 @@ import ( _ "github.com/openconfig/kne/topo/node/alpine" _ "github.com/openconfig/kne/topo/node/arista" _ "github.com/openconfig/kne/topo/node/cisco" + _ "github.com/openconfig/kne/topo/node/drivenets" _ "github.com/openconfig/kne/topo/node/gobgp" _ "github.com/openconfig/kne/topo/node/host" _ "github.com/openconfig/kne/topo/node/juniper" From 6220356372c67b38fd26a080e4ac15d8d1e0236b Mon Sep 17 00:00:00 2001 From: David Avnerson <85820962+davnerson-dn@users.noreply.github.com> Date: Sun, 31 Dec 2023 15:06:56 +0200 Subject: [PATCH 27/33] Adding Drivenets Vendor support --- deploy/deploy.go | 26 +-- go.mod | 1 + go.sum | 2 + manifests/controllers/cdnos/manifest.yaml | 2 +- proto/topo/topo.pb.go | 224 +++++++++++----------- topo/node/drivenets/drivenets.go | 104 ++-------- topo/node/drivenets/drivenets_test.go | 117 +++++++++++ 7 files changed, 262 insertions(+), 214 deletions(-) create mode 100644 topo/node/drivenets/drivenets_test.go diff --git a/deploy/deploy.go b/deploy/deploy.go index 908eca72..a113930a 100644 --- a/deploy/deploy.go +++ b/deploy/deploy.go @@ -1147,39 +1147,39 @@ type CdnosSpec struct { kClient kubernetes.Interface } -func (l *CdnosSpec) SetKClient(k kubernetes.Interface) { - l.kClient = k +func (c *CdnosSpec) SetKClient(k kubernetes.Interface) { + c.kClient = k } -func (l *CdnosSpec) Deploy(ctx context.Context) error { - if l.OperatorData != nil { +func (c *CdnosSpec) Deploy(ctx context.Context) error { + if c.OperatorData != nil { f, err := os.CreateTemp("", "cdnos-operator-*.yaml") if err != nil { return err } defer os.Remove(f.Name()) - if _, err := f.Write(l.OperatorData); err != nil { + if _, err := f.Write(c.OperatorData); err != nil { return err } if err := f.Close(); err != nil { return err } - l.Operator = f.Name() + c.Operator = f.Name() } - if l.Operator == "" && l.ManifestDir != "" { - log.Errorf("Deploying Cdnos controller using the directory 'manifests' field (%v) is deprecated, instead provide the filepath of the operator file directly using the 'operator' field going forward", l.ManifestDir) - l.Operator = filepath.Join(l.ManifestDir, "manifest.yaml") + if c.Operator == "" && c.ManifestDir != "" { + log.Errorf("Deploying Cdnos controller using the directory 'manifests' field (%v) is deprecated, instead provide the filepath of the operator file directly using the 'operator' field going forward", c.ManifestDir) + c.Operator = filepath.Join(c.ManifestDir, "manifest.yaml") } - log.Infof("Deploying Cdnos controller from: %s", l.Operator) - if err := logCommand("kubectl", "apply", "-f", l.Operator); err != nil { + log.Infof("Deploying Cdnos controller from: %s", c.Operator) + if err := run.LogCommand("kubectl", "apply", "-f", c.Operator); err != nil { return fmt.Errorf("failed to deploy cdnos operator: %w", err) } log.Infof("Cdnos controller deployed") return nil } -func (l *CdnosSpec) Healthy(ctx context.Context) error { - return deploymentHealthy(ctx, l.kClient, "cdnos-controller-system") +func (c *CdnosSpec) Healthy(ctx context.Context) error { + return deploymentHealthy(ctx, c.kClient, "cdnos-controller-system") } diff --git a/go.mod b/go.mod index 70902aff..95c294d3 100644 --- a/go.mod +++ b/go.mod @@ -58,6 +58,7 @@ require ( github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect + github.com/drivenets/cdnos-controller v1.7.0 github.com/emicklei/go-restful/v3 v3.10.2 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect diff --git a/go.sum b/go.sum index b3766d64..b59a057b 100644 --- a/go.sum +++ b/go.sum @@ -883,6 +883,8 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh 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/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/drivenets/cdnos-controller v1.7.0 h1:mQ52+q3+1ZkzwXmg+jhZR47FMopZSfh60v5Q3+2vKZM= +github.com/drivenets/cdnos-controller v1.7.0/go.mod h1:s+rGGwx3UZ8TECpeC3htXJv+3sF+VK7fFiYgesxD0vA= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= diff --git a/manifests/controllers/cdnos/manifest.yaml b/manifests/controllers/cdnos/manifest.yaml index a31edf12..e1de3663 100644 --- a/manifests/controllers/cdnos/manifest.yaml +++ b/manifests/controllers/cdnos/manifest.yaml @@ -576,7 +576,7 @@ spec: - --leader-elect command: - /manager - image: public.ecr.aws/dn/cdnos-controller:1.4 + image: public.ecr.aws/dn/cdnos-controller:1.7.3 livenessProbe: httpGet: path: /healthz diff --git a/proto/topo/topo.pb.go b/proto/topo/topo.pb.go index 3988559a..d72e0e83 100644 --- a/proto/topo/topo.pb.go +++ b/proto/topo/topo.pb.go @@ -52,6 +52,7 @@ const ( Vendor_NOKIA Vendor = 9 Vendor_OPENCONFIG Vendor = 10 Vendor_ALPINE Vendor = 11 + Vendor_DRIVENETS Vendor = 12 ) // Enum value maps for Vendor. @@ -69,6 +70,7 @@ var ( 9: "NOKIA", 10: "OPENCONFIG", 11: "ALPINE", + 12: "DRIVENETS", } Vendor_value = map[string]int32{ "UNKNOWN": 0, @@ -83,6 +85,7 @@ var ( "NOKIA": 9, "OPENCONFIG": 10, "ALPINE": 11, + "DRIVENETS": 12, } ) @@ -131,6 +134,7 @@ const ( Node_CISCO_XRD Node_Type = 12 Node_CISCO_E8000 Node_Type = 13 Node_LEMMING Node_Type = 14 + Node_CDNOS Node_Type = 15 ) // Enum value maps for Node_Type. @@ -151,6 +155,7 @@ var ( 12: "CISCO_XRD", 13: "CISCO_E8000", 14: "LEMMING", + 15: "CDNOS", } Node_Type_value = map[string]int32{ "UNKNOWN": 0, @@ -168,6 +173,7 @@ var ( "CISCO_XRD": 12, "CISCO_E8000": 13, "LEMMING": 14, + "CDNOS": 15, } ) @@ -1234,7 +1240,7 @@ var file_topo_proto_rawDesc = []byte{ 0x6f, 0x70, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, - 0x73, 0x22, 0xe9, 0x07, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x73, 0x22, 0xf4, 0x07, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x02, 0x18, @@ -1282,7 +1288,7 @@ var file_topo_proto_rawDesc = []byte{ 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd8, 0x01, 0x0a, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe3, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, 0x5f, 0x43, 0x45, 0x4f, 0x53, 0x10, 0x02, 0x12, 0x10, 0x0a, @@ -1296,112 +1302,114 @@ var file_topo_proto_rawDesc = []byte{ 0x09, 0x0a, 0x05, 0x47, 0x4f, 0x42, 0x47, 0x50, 0x10, 0x0b, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x5f, 0x58, 0x52, 0x44, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x5f, 0x45, 0x38, 0x30, 0x30, 0x30, 0x10, 0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x45, - 0x4d, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x0e, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x60, 0x0a, - 0x0e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, - 0x40, 0x0a, 0x11, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x2e, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x48, 0x00, 0x52, - 0x10, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, - 0x74, 0x0a, 0x0b, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x65, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4a, 0x0a, 0x0e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, - 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0xb5, 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, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6d, 0x74, 0x75, - 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, - 0x0d, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x5e, 0x0a, 0x04, 0x4c, 0x69, 0x6e, - 0x6b, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x61, 0x5f, 0x69, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x49, 0x6e, 0x74, 0x12, 0x15, 0x0a, - 0x06, 0x7a, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x7a, - 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x7a, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x49, 0x6e, 0x74, 0x22, 0xe5, 0x03, 0x0a, 0x06, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, - 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, - 0x76, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x65, 0x65, - 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x12, 0x28, - 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, - 0x6f, 0x70, 0x6f, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, - 0x66, 0x67, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x65, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, - 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, - 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x49, 0x6d, - 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, - 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, - 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x22, 0x56, 0x0a, 0x0e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x43, 0x66, 0x67, 0x12, 0x3a, 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, - 0x53, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, - 0x67, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, - 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x87, 0x01, 0x0a, 0x11, 0x53, 0x65, - 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, 0x67, 0x12, - 0x1b, 0x0a, 0x09, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x63, 0x65, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x73, - 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x06, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, - 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6f, 0x75, - 0x74, 0x73, 0x69, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, - 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x73, 0x69, - 0x64, 0x65, 0x49, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, - 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x49, - 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x2a, 0x98, 0x01, 0x0a, 0x06, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, - 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, - 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x10, 0x03, 0x12, 0x0b, 0x0a, - 0x07, 0x4a, 0x55, 0x4e, 0x49, 0x50, 0x45, 0x52, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x45, - 0x59, 0x53, 0x49, 0x47, 0x48, 0x54, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x52, 0x52, 0x10, - 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x41, 0x47, 0x47, 0x41, 0x10, 0x07, 0x12, 0x09, 0x0a, - 0x05, 0x47, 0x4f, 0x42, 0x47, 0x50, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4b, 0x49, - 0x41, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, - 0x47, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x4c, 0x50, 0x49, 0x4e, 0x45, 0x10, 0x0b, 0x42, - 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, - 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x0e, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x44, 0x4e, 0x4f, 0x53, + 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x60, 0x0a, 0x0e, 0x48, 0x6f, 0x73, 0x74, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x11, 0x6b, 0x65, + 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x4b, 0x65, 0x72, + 0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x10, 0x6b, 0x65, 0x72, 0x6e, + 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x42, 0x0c, 0x0a, 0x0a, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, 0x74, 0x0a, 0x0b, 0x4b, 0x65, + 0x72, 0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, + 0x0f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x42, 0x6f, + 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x42, 0x10, + 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x4a, 0x0a, 0x0e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 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, 0x19, + 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x69, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x74, 0x75, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x12, 0x1b, 0x0a, 0x09, 0x70, + 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, + 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x70, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x22, 0x5e, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x15, 0x0a, 0x06, + 0x61, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x61, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x61, 0x49, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x7a, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x7a, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x13, 0x0a, 0x05, 0x7a, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x7a, 0x49, 0x6e, 0x74, 0x22, 0xe5, 0x03, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, + 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x23, 0x0a, 0x0d, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x69, 0x6c, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, + 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x05, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x65, 0x72, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x66, 0x67, 0x52, 0x04, 0x63, + 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x04, 0x66, 0x69, 0x6c, + 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x35, + 0x0a, 0x0b, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, 0x76, 0x65, 0x6e, 0x64, 0x6f, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0d, 0x0a, + 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x0e, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x66, 0x67, 0x12, 0x3a, + 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, 0x67, 0x48, 0x00, 0x52, 0x0a, + 0x73, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x87, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x65, + 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, + 0x65, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xbe, + 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, + 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x49, 0x70, 0x12, + 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x49, 0x70, 0x12, 0x1b, 0x0a, 0x09, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2a, + 0xa7, 0x01, 0x0a, 0x06, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x53, 0x54, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, 0x10, 0x02, 0x12, 0x09, 0x0a, + 0x05, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x4a, 0x55, 0x4e, 0x49, + 0x50, 0x45, 0x52, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x45, 0x59, 0x53, 0x49, 0x47, 0x48, + 0x54, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x52, 0x52, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, + 0x51, 0x55, 0x41, 0x47, 0x47, 0x41, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x4f, 0x42, 0x47, + 0x50, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4b, 0x49, 0x41, 0x10, 0x09, 0x12, 0x0e, + 0x0a, 0x0a, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x0a, 0x12, 0x0a, + 0x0a, 0x06, 0x41, 0x4c, 0x50, 0x49, 0x4e, 0x45, 0x10, 0x0b, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x52, + 0x49, 0x56, 0x45, 0x4e, 0x45, 0x54, 0x53, 0x10, 0x0c, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x6f, 0x70, + 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/topo/node/drivenets/drivenets.go b/topo/node/drivenets/drivenets.go index a5503853..e6907bd4 100644 --- a/topo/node/drivenets/drivenets.go +++ b/topo/node/drivenets/drivenets.go @@ -15,8 +15,7 @@ limitations under the License. */ // Package drivenets implmements node definitions for nodes from the -// Drivenets vendor. It implements both a device (model: cdnos) and -// an ATE (model: magna). +// Drivenets vendor. It implements a device from model cdnos package drivenets import ( @@ -39,9 +38,6 @@ import ( ) const ( - // modelMagna is a string used in the topology to specify that a magna (github.com/openconfig/magna) - // ATE instance should be created. - modelMagna string = "MAGNA" // modelCdnos is a string used in the topology to specify that a cdnos // device instance should be created. modelCdnos string = "CDNOS" @@ -56,17 +52,11 @@ func New(nodeImpl *node.Impl) (node.Node, error) { return nil, fmt.Errorf("nodeImpl.Proto cannot be nil") } - var cfg *tpb.Node - switch nodeImpl.Proto.Model { - case modelCdnos: - cfg = cdnosDefaults(nodeImpl.Proto) - case modelMagna: - cfg = magnaDefaults(nodeImpl.Proto) - default: - return nil, fmt.Errorf("a model must be specified") + if nodeImpl.Proto.Model != modelCdnos { + return nil, fmt.Errorf("unknown model") } - nodeImpl.Proto = cfg + nodeImpl.Proto = cdnosDefaults(nodeImpl.Proto) n := &Node{ Impl: nodeImpl, } @@ -89,15 +79,10 @@ var clientFn = func(c *rest.Config) (clientset.Interface, error) { } func (n *Node) Create(ctx context.Context) error { - switch n.Impl.Proto.Model { - case modelCdnos: - return n.cdnosCreate(ctx) - case modelMagna: - // magna uses the standard pod creation as though it were a host. - return n.Impl.Create(ctx) - default: + if n.Impl.Proto.Model != modelCdnos { return fmt.Errorf("cannot create an instance of an unknown model") } + return n.cdnosCreate(ctx) } // cdnosCreate implements the Create function for the cdnos model devices. @@ -166,15 +151,10 @@ func (n *Node) cdnosCreate(ctx context.Context) error { } func (n *Node) Status(ctx context.Context) (node.Status, error) { - switch n.Impl.Proto.Model { - case modelMagna: - // magna's status uses the standard underlying node implementation. - return n.Impl.Status(ctx) - case modelCdnos: - return n.cdnosStatus(ctx) - default: + if n.Impl.Proto.Model != modelCdnos { return node.StatusUnknown, fmt.Errorf("invalid model specified.") } + return n.cdnosStatus(ctx) } func (n *Node) cdnosStatus(ctx context.Context) (node.Status, error) { @@ -199,15 +179,10 @@ func (n *Node) cdnosStatus(ctx context.Context) (node.Status, error) { } func (n *Node) Delete(ctx context.Context) error { - switch n.Impl.Proto.Model { - case modelMagna: - // magna's implementation uses the standard underlying node implementation. - return n.Impl.Delete(ctx) - case modelCdnos: - return n.cdnosDelete(ctx) - default: - return fmt.Errorf("unknown model") + if n.Impl.Proto.Model != modelCdnos { + return fmt.Errorf("Unknown model") } + return n.cdnosDelete(ctx) } func (n *Node) cdnosDelete(ctx context.Context) error { @@ -300,61 +275,6 @@ func cdnosDefaults(pb *tpb.Node) *tpb.Node { return pb } -func magnaDefaults(pb *tpb.Node) *tpb.Node { - if pb.Config == nil { - pb.Config = &tpb.Config{} - } - if pb.Services == nil { - pb.Services = map[uint32]*tpb.Service{} - } - if len(pb.GetConfig().GetCommand()) == 0 { - pb.Config.Command = []string{ - "/app/magna", - "-v=2", - "-alsologtostderr", - "-port=40051", - "-telemetry_port=50051", - "-certfile=/data/cert.pem", - "-keyfile=/data/key.pem", - } - } - if pb.Config.EntryCommand == "" { - pb.Config.EntryCommand = fmt.Sprintf("kubectl exec -it %s -- sh", pb.Name) - } - if pb.Config.Image == "" { - // TODO(robjs): add public container location once the first iteration is pushed. - // Currently, this image can be built from github.com/openconfig/magna. - pb.Config.Image = "magna:latest" - } - - if _, ok := pb.Services[40051]; !ok { - pb.Services[40051] = &tpb.Service{ - Name: "grpc", - Inside: 40051, - Outside: 40051, - } - } - - if _, ok := pb.Services[50051]; !ok { - pb.Services[50051] = &tpb.Service{ - Name: "gnmi", - Inside: 50051, - Outside: 50051, - } - } - - if pb.Labels == nil { - pb.Labels = map[string]string{ - "vendor": tpb.Vendor_DRIVENETS.String(), - } - } - - // Always explicitly specify that magna nodes are ATEs, this cannot be overridden by the user. - pb.Labels[node.OndatraRoleLabel] = node.OndatraRoleATE - - return pb -} - func init() { node.Vendor(tpb.Vendor_DRIVENETS, New) } @@ -388,4 +308,4 @@ func (n *Node) CreateConfig(ctx context.Context) (*corev1.Volume, error) { log.V(1).Infof("Server Config Map:\n%v\n", sCM) } return nil, nil -} +} \ No newline at end of file diff --git a/topo/node/drivenets/drivenets_test.go b/topo/node/drivenets/drivenets_test.go new file mode 100644 index 00000000..cca83d1d --- /dev/null +++ b/topo/node/drivenets/drivenets_test.go @@ -0,0 +1,117 @@ +package drivenets + +import ( + "testing" + + tpb "github.com/openconfig/kne/proto/topo" + "github.com/openconfig/kne/topo/node" +) + +func TestNew(t *testing.T) { + tests := []struct { + name string + nodeImpl *node.Impl + wantErr bool + errString string + }{ + { + name: "nil nodeImpl", + nodeImpl: nil, + wantErr: true, + errString: "nodeImpl cannot be nil", + }, + { + name: "nil Proto", + nodeImpl: &node.Impl{ + Proto: nil, + }, + wantErr: true, + errString: "nodeImpl.Proto cannot be nil", + }, + { + name: "no model specified", + nodeImpl: &node.Impl{ + Proto: &tpb.Node{}, + }, + wantErr: true, + errString: "unknown model", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, err := New(tt.nodeImpl) + if tt.wantErr { + if err == nil { + t.Errorf("New() error = nil, wantErr %v", tt.wantErr) + return + } + if err.Error() != tt.errString { + t.Errorf("New() error = %v, wantErr %v", err, tt.errString) + } + } else if err != nil { + t.Errorf("New() unexpected error = %v", err) + } + }) + } +} + +func TestCdnosDefaults(t *testing.T) { + pb := &tpb.Node{ + Name: "testNode", + } + + pb = cdnosDefaults(pb) + + if pb.Config == nil { + t.Errorf("Config is nil") + } + + if pb.Config.Image == "" { + t.Errorf("Image is empty") + } + + if pb.Config.InitImage == "" { + t.Errorf("InitImage is empty") + } + + if len(pb.GetConfig().GetCommand()) == 0 { + t.Errorf("Command is empty") + } + + if pb.Config.EntryCommand == "" { + t.Errorf("EntryCommand is empty") + } + + if pb.Config.Cert == nil { + t.Errorf("Cert is nil") + } + + if pb.Constraints == nil { + t.Errorf("Constraints is nil") + } + + if pb.Constraints["cpu"] == "" { + t.Errorf("CPU constraint is empty") + } + + if pb.Constraints["memory"] == "" { + t.Errorf("Memory constraint is empty") + } + + if pb.Labels == nil { + t.Errorf("Labels is nil") + } + + if pb.Labels["vendor"] == "" { + t.Errorf("Vendor label is empty") + } + + if pb.Labels[node.OndatraRoleLabel] != node.OndatraRoleDUT { + t.Errorf("OndatraRoleLabel is not DUT") + } + + if pb.Services == nil { + t.Errorf("Services is nil") + } +} \ No newline at end of file From be4ea3a0fbd0d67e5742a375a4daa4f1e3428994 Mon Sep 17 00:00:00 2001 From: David Avnerson Date: Mon, 11 Mar 2024 15:15:38 +0200 Subject: [PATCH 28/33] update vendor service defaults --- topo/node/drivenets/drivenets.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/topo/node/drivenets/drivenets.go b/topo/node/drivenets/drivenets.go index e6907bd4..dd38129d 100644 --- a/topo/node/drivenets/drivenets.go +++ b/topo/node/drivenets/drivenets.go @@ -152,7 +152,7 @@ func (n *Node) cdnosCreate(ctx context.Context) error { func (n *Node) Status(ctx context.Context) (node.Status, error) { if n.Impl.Proto.Model != modelCdnos { - return node.StatusUnknown, fmt.Errorf("invalid model specified.") + return node.StatusUnknown, fmt.Errorf("invalid model specified") } return n.cdnosStatus(ctx) } @@ -180,7 +180,7 @@ func (n *Node) cdnosStatus(ctx context.Context) (node.Status, error) { func (n *Node) Delete(ctx context.Context) error { if n.Impl.Proto.Model != modelCdnos { - return fmt.Errorf("Unknown model") + return fmt.Errorf("unknown model") } return n.cdnosDelete(ctx) } @@ -255,21 +255,13 @@ func cdnosDefaults(pb *tpb.Node) *tpb.Node { pb.Services = map[uint32]*tpb.Service{ // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=gnmi 9339: { - Name: "gnmi", + Names: []string{"gnmi", "gnoi", "gnsi"}, Inside: 9339, }, 9340: { - Name: "gribi", + Names: []string{"gribi"}, Inside: 9340, }, - 9341: { - Name: "gnsi", - Inside: 9339, - }, - 9342: { - Name: "gnoi", - Inside: 9339, - }, } } return pb From c40b7b070c4d4f23c91262069a739c5809821c45 Mon Sep 17 00:00:00 2001 From: David Avnerson Date: Sun, 17 Mar 2024 17:33:03 +0200 Subject: [PATCH 29/33] modified after review --- deploy/deploy.go | 5 - deploy/deploy_test.go | 167 ++++++++++ deploy/kne/external-multinode-cdnos.yaml | 33 ++ deploy/kne/external-multinode.yaml | 3 - deploy/kne/kind-bridge-cdnos.yaml | 39 +++ deploy/kne/kind-bridge.yaml | 3 - docs/create_topology.md | 9 +- examples/drivenets/srlinux.cfg | 109 ++++++- proto/controller.proto | 1 - proto/controller/controller.pb.go | 381 +++++++++++------------ proto/topo.proto | 1 - proto/topo/topo.pb.go | 222 +++++++------ topo/node/drivenets/drivenets.go | 6 +- 13 files changed, 646 insertions(+), 333 deletions(-) create mode 100644 deploy/kne/external-multinode-cdnos.yaml create mode 100644 deploy/kne/kind-bridge-cdnos.yaml mode change 120000 => 100644 examples/drivenets/srlinux.cfg diff --git a/deploy/deploy.go b/deploy/deploy.go index a113930a..9e2911cd 100644 --- a/deploy/deploy.go +++ b/deploy/deploy.go @@ -1141,7 +1141,6 @@ func init() { } type CdnosSpec struct { - ManifestDir string `yaml:"manifests"` Operator string `yaml:"operator" kne:"yaml"` OperatorData []byte kClient kubernetes.Interface @@ -1166,10 +1165,6 @@ func (c *CdnosSpec) Deploy(ctx context.Context) error { } c.Operator = f.Name() } - if c.Operator == "" && c.ManifestDir != "" { - log.Errorf("Deploying Cdnos controller using the directory 'manifests' field (%v) is deprecated, instead provide the filepath of the operator file directly using the 'operator' field going forward", c.ManifestDir) - c.Operator = filepath.Join(c.ManifestDir, "manifest.yaml") - } log.Infof("Deploying Cdnos controller from: %s", c.Operator) if err := run.LogCommand("kubectl", "apply", "-f", c.Operator); err != nil { return fmt.Errorf("failed to deploy cdnos operator: %w", err) diff --git a/deploy/deploy_test.go b/deploy/deploy_test.go index 9b0d1a6b..7f9e1070 100644 --- a/deploy/deploy_test.go +++ b/deploy/deploy_test.go @@ -1843,6 +1843,173 @@ func TestLemmingSpec(t *testing.T) { } } +func TestCdnosSpec(t *testing.T) { + canceledCtx, cancel := context.WithCancel(context.Background()) + cancel() + deploymentName := "foo" + deploymentNS := "cdnos-operator" + var replicas int32 = 2 + d := &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: deploymentName, + Namespace: deploymentNS, + }, + } + tests := []struct { + desc string + cdnos *CdnosSpec + resp []fexec.Response + dErr string + hErr string + ctx context.Context + mockKClient func(*fake.Clientset) + }{{ + desc: "1 replica", + cdnos: &CdnosSpec{}, + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"apply", "-f", ""}}, + }, + + mockKClient: func(k *fake.Clientset) { + reaction := func(action ktest.Action) (handled bool, ret watch.Interface, err error) { + f := newFakeWatch([]watch.Event{{ + Type: watch.Added, + Object: &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: deploymentName, + Namespace: deploymentNS, + }, + Status: appsv1.DeploymentStatus{ + AvailableReplicas: 0, + ReadyReplicas: 0, + Replicas: 0, + UnavailableReplicas: 1, + UpdatedReplicas: 0, + }, + }, + }, { + Type: watch.Modified, + Object: &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: deploymentName, + Namespace: deploymentNS, + }, + Status: appsv1.DeploymentStatus{ + AvailableReplicas: 1, + ReadyReplicas: 1, + Replicas: 1, + UnavailableReplicas: 0, + UpdatedReplicas: 1, + }, + }, + }}) + return true, f, nil + } + k.PrependWatchReactor("deployments", reaction) + }, + }, { + desc: "2 replicas - data over file", + cdnos: &CdnosSpec{ + OperatorData: []byte("some fake data"), + }, + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"apply", "-f", ".*.yaml"}}, + }, + mockKClient: func(k *fake.Clientset) { + reaction := func(action ktest.Action) (handled bool, ret watch.Interface, err error) { + f := newFakeWatch([]watch.Event{{ + Type: watch.Added, + Object: &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: deploymentName, + Namespace: deploymentNS, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: &replicas, + }, + Status: appsv1.DeploymentStatus{ + AvailableReplicas: 0, + ReadyReplicas: 0, + Replicas: 0, + UnavailableReplicas: replicas, + UpdatedReplicas: 0, + }, + }, + }, { + Type: watch.Modified, + Object: &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: deploymentName, + Namespace: deploymentNS, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: &replicas, + }, + Status: appsv1.DeploymentStatus{ + AvailableReplicas: replicas, + ReadyReplicas: replicas, + Replicas: replicas, + UnavailableReplicas: 0, + UpdatedReplicas: replicas, + }, + }, + }}) + return true, f, nil + } + k.PrependWatchReactor("deployments", reaction) + }, + }, { + desc: "operator deploy error", + cdnos: &CdnosSpec{}, + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"apply", "-f", ""}, Err: "failed to apply operator"}, + }, + + dErr: "failed to apply operator", + }, { + desc: "context canceled", + cdnos: &CdnosSpec{}, + resp: []fexec.Response{ + {Cmd: "kubectl", Args: []string{"apply", "-f", ""}}, + }, + + ctx: canceledCtx, + hErr: "context canceled", + }} + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + if verbose { + fexec.LogCommand = func(s string) { + t.Logf("%s: %s", tt.desc, s) + } + } + cmds := fexec.Commands(tt.resp) + kexec.Command = cmds.Command + defer checkCmds(t, cmds) + + ki := fake.NewSimpleClientset(d) + if tt.mockKClient != nil { + tt.mockKClient(ki) + } + tt.cdnos.SetKClient(ki) + err := tt.cdnos.Deploy(context.Background()) + if s := errdiff.Substring(err, tt.dErr); s != "" { + t.Fatalf("unexpected error: %s", s) + } + if err != nil { + return + } + if tt.ctx == nil { + tt.ctx = context.Background() + } + err = tt.cdnos.Healthy(tt.ctx) + if s := errdiff.Substring(err, tt.hErr); s != "" { + t.Fatalf("unexpected error: %s", s) + } + }) + } +} + func checkCmds(t *testing.T, cmds *fexec.Command) { t.Helper() if err := cmds.Done(); err != nil { diff --git a/deploy/kne/external-multinode-cdnos.yaml b/deploy/kne/external-multinode-cdnos.yaml new file mode 100644 index 00000000..256496eb --- /dev/null +++ b/deploy/kne/external-multinode-cdnos.yaml @@ -0,0 +1,33 @@ +# external-multinode.yaml cluster config file sets up ingress, cni, and controllers in an existing k8 cluster. +# This spec instructs Metallb to use a docker network named multinode. +# The "external" cluster lifecycle is not managed by the KNE deployment. +cluster: + kind: External + spec: + network: multinode +ingress: + kind: MetalLB + spec: + manifest: ../../manifests/metallb/manifest.yaml + ip_count: 200 +cni: + kind: Meshnet + spec: + manifest: ../../manifests/meshnet/grpc/manifest.yaml +controllers: + - kind: IxiaTG + spec: + operator: ../../manifests/keysight/ixiatg-operator.yaml + configMap: ../../manifests/keysight/ixiatg-configmap.yaml + - kind: SRLinux + spec: + operator: ../../manifests/controllers/srlinux/manifest.yaml + - kind: CEOSLab + spec: + operator: ../../manifests/controllers/ceoslab/manifest.yaml + - kind: Lemming + spec: + operator: ../../manifests/controllers/lemming/manifest.yaml + - kind: Cdnos + spec: + operator: ../../manifests/controllers/cdnos/manifest.yaml diff --git a/deploy/kne/external-multinode.yaml b/deploy/kne/external-multinode.yaml index 256496eb..56665504 100644 --- a/deploy/kne/external-multinode.yaml +++ b/deploy/kne/external-multinode.yaml @@ -28,6 +28,3 @@ controllers: - kind: Lemming spec: operator: ../../manifests/controllers/lemming/manifest.yaml - - kind: Cdnos - spec: - operator: ../../manifests/controllers/cdnos/manifest.yaml diff --git a/deploy/kne/kind-bridge-cdnos.yaml b/deploy/kne/kind-bridge-cdnos.yaml new file mode 100644 index 00000000..2199bdc2 --- /dev/null +++ b/deploy/kne/kind-bridge-cdnos.yaml @@ -0,0 +1,39 @@ +# kind-bridge.yaml cluster config file sets up a kind cluster where default PTP CNI plugin +# is swapped with the Bridge CNI plugin. +# Bridge CNI plugin is required by some Network OSes to operate. +cluster: + kind: Kind + spec: + name: kne + recycle: True + version: v0.17.0 + image: kindest/node:v1.26.0 + config: ../../manifests/kind/config.yaml + additionalManifests: + - ../../manifests/kind/bridge.yaml +ingress: + kind: MetalLB + spec: + manifest: ../../manifests/metallb/manifest.yaml + ip_count: 100 +cni: + kind: Meshnet + spec: + manifest: ../../manifests/meshnet/grpc/manifest.yaml +controllers: + - kind: IxiaTG + spec: + operator: ../../manifests/keysight/ixiatg-operator.yaml + configMap: ../../manifests/keysight/ixiatg-configmap.yaml + - kind: SRLinux + spec: + operator: ../../manifests/controllers/srlinux/manifest.yaml + - kind: CEOSLab + spec: + operator: ../../manifests/controllers/ceoslab/manifest.yaml + - kind: Lemming + spec: + operator: ../../manifests/controllers/lemming/manifest.yaml + - kind: Cdnos + spec: + operator: ../../manifests/controllers/cdnos/manifest.yaml \ No newline at end of file diff --git a/deploy/kne/kind-bridge.yaml b/deploy/kne/kind-bridge.yaml index 2199bdc2..2ee89fa1 100644 --- a/deploy/kne/kind-bridge.yaml +++ b/deploy/kne/kind-bridge.yaml @@ -34,6 +34,3 @@ controllers: - kind: Lemming spec: operator: ../../manifests/controllers/lemming/manifest.yaml - - kind: Cdnos - spec: - operator: ../../manifests/controllers/cdnos/manifest.yaml \ No newline at end of file diff --git a/docs/create_topology.md b/docs/create_topology.md index 79dc817e..00dd641b 100644 --- a/docs/create_topology.md +++ b/docs/create_topology.md @@ -117,16 +117,9 @@ Field | Type | Description Field | Type | Description ------ | --------- | ---------------------------------------------------- -`kind` | string | Name of the controller type. The current options currently are `Cdnos`, `IxiaTG`, `SRLinux`, `CEOSLab`, and `Lemming`. +`kind` | string | Name of the controller type. The current options currently are `IxiaTG`, `SRLinux`, `CEOSLab`, and `Lemming`. `spec` | yaml.Node | Fields that set the options for the controller type. -##### Cdnos - -Field | Type | Description ---------------- | ---------- | ----------- -`operator` | string | Path of the yaml file to create a Cdnos operator in the cluster. The validated operator for use with KNE can be found [here](https://github.com/openconfig/kne/tree/main/manifests/controllers/cdnos/manifest.yaml). -~~`manifests`~~ | ~~string~~ | ~~Path of the directory holding the manifests to create a CEOSLab operator in the cluster. The directory is expected to contain a file with the name `manifest.yaml`.~~ - ##### IxiaTG Field | Type | Description diff --git a/examples/drivenets/srlinux.cfg b/examples/drivenets/srlinux.cfg deleted file mode 120000 index 2e162531..00000000 --- a/examples/drivenets/srlinux.cfg +++ /dev/null @@ -1 +0,0 @@ -../multivendor/srlinux.cfg \ No newline at end of file diff --git a/examples/drivenets/srlinux.cfg b/examples/drivenets/srlinux.cfg new file mode 100644 index 00000000..1494b3d3 --- /dev/null +++ b/examples/drivenets/srlinux.cfg @@ -0,0 +1,108 @@ +system { + management { + openconfig { + admin-state enable + } + } + lldp { + admin-state enable + } + gnmi-server { + admin-state enable + rate-limit 65000 + trace-options [ + request + response + common + ] + network-instance mgmt { + admin-state enable + yang-models openconfig + tls-profile kne-profile + } + unix-socket { + admin-state enable + } + } + tls { + server-profile kne-profile { + key $aes$02OxmuD5O2kk=$Q0YPJBvN4gDeW3S47G6PSlbMAQw6hsaboZxyHEcxh2SW6WuG8x+wLBqrlYIhwUFFPQMFJXfqj2oCEB7fbBCdWF0qZYnqd5KJqqgR6M4qSAo+k9iqJa2Aw+faxJ6Q5Xd87woxSwmhdsixOz4XMoEKYjNMwepYKy44Hx7RakEGkr9Tk+tqPvMAOhQM6hW4pLydwXi/jN4RG6edvBiWwFDTmmhfOAy45yOmP/bblVwgXAV+n5QS00JDtkC6mf/ckcGd0Q8jWrQQ8TvOisQg7938wpgCKe4GiDbpPNsL9M7CHppkkIwKCD4fYcdRIUP0B/RRRrMW89FC7N1mrEvf9ej/9qL2NWYOuqTUBsWohU9frN5KxTw9J6krdtUXl8l6lK8t4BmVzMwkS1fA4R2wyaw/y1Yw+cQ9B84CHNZi8l4/L5ocOKQjoBmeuORQEdZ1S0AYYCJDqb0cpXX5Pz4uy5SI2yxjVOTGywciCpwfeaLznxkV+IchHuci8YEni33675cBNIJhsYrf9FE0OwlpdTD91u+52CFJ8TqjiYLSYnHDtqnoqvs+timV4kGzp4YguPihoACB0HTf4gBHT+qCJJGMmMKkN8Ik/PM7wj6+x3wDmDCMzNu10BdqmpCI6uMessJqYErRvsNKFjOrFxzqJobsQwEVp6ShploHqwwOOF3ySKRJm2lFUZl7H4BabdHa6Gp/e7cCGlk+lml1FWtacHsLtwE+ycfuOcN6bi22UamD1+DVdrOF7tbbTQLVfUvGt2rRiro4o8aFI+XRWuJhbwKmWJqqW69KneJwlTqnL2Nl5uIJ9k1Pk537wKsXmb9R6RvgwA2zrFMCq6ahpNm2qTlQ2Q5lIZMX4wK1AJ3USdaEkD0WhHY2f7v8CW4mC+Uv65B6zswk/HrxqyMO2qHqt2crfm/dDn4nm1GaF9z3gpBGEGUEEnvlu4CzPRnM5SNRm12OIXtmoxA9FXwJYLFcY9rfm846ldgOiGgqkLOlIFfSEMw0JPjoM3pPRRnx7vPFpoYwV/b4BArVsB85odg8zYjfyJDmGTOhFk2pX5H4P9K/pBXW2YSlYyXRWVaL+m/Fchi8K2hY8zZHWr2XOiMBy9MwXUZU8FEEF1y9FOz3zufw4lw8b8NeWGt4v1CAlgAA7CvJ1AO678Z9J4DJ8W2lUzRH9huMHJdvJpdmtDNBkF3wgYR6gh+L8sNRaxEeJq4iExUtTNahGUt51S2Z92UNK8NrSLzTmR0OKz0wZIouS5euWZROOjUAVOjhDhMoRXQ4tHrNmD+P72vbs948Y3MOXeHtYKksHzf1xF9s8ojW/4ondupvF8uHLf6GnEMJDPfjUn7SN6jTfJYk4KSe+/E3jrCIOqJrMKgxmJzMBnLdAuQbYmIjtd/sf/KPQUktezvrXlAlaLmasiEA1FBwGgErOZVdSrKqLzyhkAP5mqetngOEHQuG0QiJzyaEgPu39/1FYOdwxzCpuyit5XRQnOSdVgCByUmi03YdfCe5VkDxmBuKEjUubcEDImXPpuAarthiYpjCkOtNiNtqIgDNeelA9qIYPFdVF0oBqXZvLSFKpU3saxCvfxUKqocmO6rOxc9AFgMpnGA/0+2ppuIGvuOCFHFwx/qMMZDyXXdgFlR+Tyto6f3wjhebrF3W/xYrSjBaYh03taj2bRO+FjkrZWEY3fxNhaFZOq0bbTJFVDPc5ufUPyaRo25DQLgTTpUM1paH2TdMFaEzbeLWhnhNzLuIzaPDSzriEp6Vjsqj3fK3c3wOs1m9NQJV4Umnb7gdGNEsEcPM/3zgVavmbXFmaSSI1YrePCu41LCAkrS2k/rnEAQ6D3ub96s8AaWxsD6JosRDY7KhmUiBjG3SEX5Vpxd1GSP12suE4p6udTDlviOQul/hJcjo3lkLFOWkDrksTH1XQrDfq3BQomiqR7EvpgNbD/CA8FufKSY2hXSbysZex0gX4zGdgCf8NVEmfzre17SGAt+enwMztgm73PsCI15Y4360bYdi7zbIqlLwiCXsTjsMEpziT9GZVuDqFdE7TOVrsgOvr1eQ+i9n1fxGv/FZu0SuWA2/3gNv4fExLrquAioA5hMTnmkDmcSKPdN7xQW6iMf3Q2aeZhajPEmGbt+u3VpyC2tdlGBitAsxQCEeWOt0PttN1JIbTPIRF160Ww8k7Mm71K/0J9WZbVf7LpynONCVOBQoqU2nmcXzZFM3h1ZZTypHDLGUR4E1uTkpiAfQVwmk + certificate "-----BEGIN CERTIFICATE----- +MIIDoTCCAomgAwIBAgIUXlOp1PeztJmBG2MsGPBkJG5M05swDQYJKoZIhvcNAQEL +BQAwMDEVMBMGA1UEChMMY29udGFpbmVybGFiMRcwFQYDVQQDEw5rbmUtc3JsIGxh +YiBDQTAeFw0yMzAzMTIwOTI3MDBaFw0yNDAzMTEwOTI3MDBaMDAxFTATBgNVBAoT +DGNvbnRhaW5lcmxhYjEXMBUGA1UEAxMOc3JsLmtuZS1zcmwuaW8wggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCnLZqbmeM82O3cPFTzJ/QIQwNScpKujVbM +pdRNvbxmSfridFxLn+/eCTN6HNE8TOdaJEzX1pRbY3DcpDr10Md4DiKCb/QKuYuE +cvF1ruhneVrqKZhHwMwGpBTi4h9rYdLfBCxYxi4ptXupbiQAfk6clPsPXlkhZKRJ +50GqrisQEi+oYC0TG7YtMTscrfY8Pxg8lngRzH7a8eiWdSMnX0ljja1K4bgZ6jdh +wvsT0NJKs1ao01OLt51rndgywqs+xb7V6S2EbUmMCCF4lTxEqUhu/a05XgpeqL+v +snmbfuh7MuK5BwQ0FbC8EHXohYPZ1vrzMUaw0Wh+fk1vlN90/uTfAgMBAAGjgbIw +ga8wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcD +AjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBTJ0a23nACfVfQLARYwQ0ufzL+0+DAf +BgNVHSMEGDAWgBQMZiIkEzdwrX0L+0N+ISOX47DhvDAwBgNVHREEKTAnggNzcmyC +EGNsYWIta25lLXNybC1zcmyCDnNybC5rbmUtc3JsLmlvMA0GCSqGSIb3DQEBCwUA +A4IBAQAMG2mSg1STaFKpOet7tAK0sMV/HSeSNYyKrf8SN76+7D0RHredVTFMRX+K +EvwKtxGGG/0E/w3DGpS1t+QAZUJz9EoJC/e3AXBRf84jPRoiAy3cmkw4uXDaW4ud +ZU9TnrWJl5hxDyyWfkDZiZ1muQPf+ZUNvV8Qn9G57jv8Wacpkx+2EeFLH7GeTZsF +9ICindYy3VjJuGIZuAkYqlKMW2RPJLRkAOnQfXRizB0wKXQ6X2OcqRDzd/jLj4W1 +wqzCZrqq3V1A8CpmUWL8P63EFO5W8s2h620KDLRwEmfisQiEP46kn9mCX/F2SqEs +ufJifhmpItpy3mkUCLEJ33ex2AA6 +-----END CERTIFICATE----- +" + } + } + gribi-server { + admin-state enable + network-instance mgmt { + admin-state enable + tls-profile kne-profile + } + } + json-rpc-server { + admin-state enable + network-instance mgmt { + http { + admin-state enable + } + https { + admin-state enable + tls-profile kne-profile + } + } + } + banner { + login-banner "................................................................ +: Welcome to Nokia SR Linux! : +: Open Network OS for the NetOps era. : +: : +: This is a freely distributed official container image. : +: Use it - Share it : +: : +: Get started: https://learn.srlinux.dev : +: Container: https://go.srlinux.dev/container-image : +: Docs: https://doc.srlinux.dev/22-11 : +: Rel. notes: https://doc.srlinux.dev/rn22-11-2 : +: YANG: https://yang.srlinux.dev/v22.11.2 : +: Discord: https://go.srlinux.dev/discord : +: Contact: https://go.srlinux.dev/contact-sales : +................................................................ +" + } + p4rt-server { + admin-state enable + network-instance mgmt { + admin-state enable + tls-profile kne-profile + } + } +} +network-instance DEFAULT { +} +network-instance mgmt { + protocols { + gribi { + admin-state enable + } + } +} diff --git a/proto/controller.proto b/proto/controller.proto index d1c8b644..8d3c77c3 100644 --- a/proto/controller.proto +++ b/proto/controller.proto @@ -133,7 +133,6 @@ message LemmingSpec { // CdnosSpec specifications message CdnosSpec { - string manifest_dir = 1 [deprecated = true]; Manifest operator = 2; } diff --git a/proto/controller/controller.pb.go b/proto/controller/controller.pb.go index aeecb597..bdfbd910 100644 --- a/proto/controller/controller.pb.go +++ b/proto/controller/controller.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.31.0 // protoc v3.21.12 // source: controller.proto @@ -323,7 +323,7 @@ type MetallbSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in controller.proto. ManifestDir string `protobuf:"bytes,1,opt,name=manifest_dir,json=manifestDir,proto3" json:"manifest_dir,omitempty"` IpCount int32 `protobuf:"varint,2,opt,name=ip_count,json=ipCount,proto3" json:"ip_count,omitempty"` Manifest *Manifest `protobuf:"bytes,3,opt,name=manifest,proto3" json:"manifest,omitempty"` @@ -361,7 +361,7 @@ func (*MetallbSpec) Descriptor() ([]byte, []int) { return file_controller_proto_rawDescGZIP(), []int{2} } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in controller.proto. func (x *MetallbSpec) GetManifestDir() string { if x != nil { return x.ManifestDir @@ -389,7 +389,7 @@ type MeshnetSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in controller.proto. ManifestDir string `protobuf:"bytes,1,opt,name=manifest_dir,json=manifestDir,proto3" json:"manifest_dir,omitempty"` Manifest *Manifest `protobuf:"bytes,2,opt,name=manifest,proto3" json:"manifest,omitempty"` } @@ -426,7 +426,7 @@ func (*MeshnetSpec) Descriptor() ([]byte, []int) { return file_controller_proto_rawDescGZIP(), []int{3} } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in controller.proto. func (x *MeshnetSpec) GetManifestDir() string { if x != nil { return x.ManifestDir @@ -571,9 +571,9 @@ type IxiaTGSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in controller.proto. ManifestDir string `protobuf:"bytes,1,opt,name=manifest_dir,json=manifestDir,proto3" json:"manifest_dir,omitempty"` - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in controller.proto. ConfigMap *IxiaTGConfigMap `protobuf:"bytes,2,opt,name=config_map,json=configMap,proto3" json:"config_map,omitempty"` Operator *Manifest `protobuf:"bytes,3,opt,name=operator,proto3" json:"operator,omitempty"` CfgMap *Manifest `protobuf:"bytes,4,opt,name=cfg_map,json=cfgMap,proto3" json:"cfg_map,omitempty"` @@ -611,7 +611,7 @@ func (*IxiaTGSpec) Descriptor() ([]byte, []int) { return file_controller_proto_rawDescGZIP(), []int{5} } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in controller.proto. func (x *IxiaTGSpec) GetManifestDir() string { if x != nil { return x.ManifestDir @@ -619,7 +619,7 @@ func (x *IxiaTGSpec) GetManifestDir() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in controller.proto. func (x *IxiaTGSpec) GetConfigMap() *IxiaTGConfigMap { if x != nil { return x.ConfigMap @@ -767,7 +767,7 @@ type SRLinuxSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in controller.proto. ManifestDir string `protobuf:"bytes,1,opt,name=manifest_dir,json=manifestDir,proto3" json:"manifest_dir,omitempty"` Operator *Manifest `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` } @@ -804,7 +804,7 @@ func (*SRLinuxSpec) Descriptor() ([]byte, []int) { return file_controller_proto_rawDescGZIP(), []int{8} } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in controller.proto. func (x *SRLinuxSpec) GetManifestDir() string { if x != nil { return x.ManifestDir @@ -825,7 +825,7 @@ type CEOSLabSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in controller.proto. ManifestDir string `protobuf:"bytes,1,opt,name=manifest_dir,json=manifestDir,proto3" json:"manifest_dir,omitempty"` Operator *Manifest `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` } @@ -862,7 +862,7 @@ func (*CEOSLabSpec) Descriptor() ([]byte, []int) { return file_controller_proto_rawDescGZIP(), []int{9} } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in controller.proto. func (x *CEOSLabSpec) GetManifestDir() string { if x != nil { return x.ManifestDir @@ -883,7 +883,7 @@ type LemmingSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in controller.proto. ManifestDir string `protobuf:"bytes,1,opt,name=manifest_dir,json=manifestDir,proto3" json:"manifest_dir,omitempty"` Operator *Manifest `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` } @@ -920,7 +920,7 @@ func (*LemmingSpec) Descriptor() ([]byte, []int) { return file_controller_proto_rawDescGZIP(), []int{10} } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in controller.proto. func (x *LemmingSpec) GetManifestDir() string { if x != nil { return x.ManifestDir @@ -941,9 +941,7 @@ type CdnosSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: Do not use. - ManifestDir string `protobuf:"bytes,1,opt,name=manifest_dir,json=manifestDir,proto3" json:"manifest_dir,omitempty"` - Operator *Manifest `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` + Operator *Manifest `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` } func (x *CdnosSpec) Reset() { @@ -978,14 +976,6 @@ func (*CdnosSpec) Descriptor() ([]byte, []int) { return file_controller_proto_rawDescGZIP(), []int{11} } -// Deprecated: Do not use. -func (x *CdnosSpec) GetManifestDir() string { - if x != nil { - return x.ManifestDir - } - return "" -} - func (x *CdnosSpec) GetOperator() *Manifest { if x != nil { return x.Operator @@ -2177,179 +2167,176 @@ var file_controller_proto_rawDesc = []byte{ 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x22, 0x64, 0x0a, 0x09, 0x43, 0x64, 0x6e, 0x6f, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x25, - 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, - 0x73, 0x74, 0x44, 0x69, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, - 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, 0x28, - 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x04, 0x66, 0x69, 0x6c, - 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x42, - 0x0f, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x22, 0xd7, 0x02, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x6b, 0x69, 0x6e, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x70, 0x65, - 0x63, 0x48, 0x00, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x33, 0x0a, - 0x07, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x6c, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x6c, 0x6c, 0x62, 0x53, 0x70, 0x65, 0x63, 0x48, 0x01, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x6c, - 0x6c, 0x62, 0x12, 0x33, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x02, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0f, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x73, 0x42, 0x0e, - 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x42, 0x0e, - 0x0a, 0x0c, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x42, 0x0a, - 0x0a, 0x08, 0x63, 0x6e, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x22, 0x5b, 0x0a, 0x15, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x12, - 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x6c, 0x0a, 0x13, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, - 0x0e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x22, 0x5d, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, - 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, - 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, - 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x75, 0x62, - 0x65, 0x63, 0x66, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x75, 0x62, 0x65, - 0x63, 0x66, 0x67, 0x22, 0x6e, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, - 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, - 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, - 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x22, 0x3c, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, - 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, - 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, - 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x13, 0x53, - 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, - 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x73, 0x0a, 0x14, 0x53, 0x68, 0x6f, 0x77, 0x54, - 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, - 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x2a, 0x0a, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, - 0x67, 0x79, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x22, 0x71, 0x0a, 0x11, - 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, - 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, - 0x14, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, + 0x72, 0x22, 0x3d, 0x0a, 0x09, 0x43, 0x64, 0x6e, 0x6f, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x30, + 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x61, + 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x22, 0x47, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x14, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x69, + 0x66, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0xd7, 0x02, 0x0a, 0x14, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4b, 0x69, + 0x6e, 0x64, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x36, + 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x08, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x6c, + 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x6c, 0x6c, 0x62, 0x53, 0x70, 0x65, 0x63, + 0x48, 0x01, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x6c, 0x62, 0x12, 0x33, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x68, 0x6e, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x6e, 0x65, + 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x02, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x68, 0x6e, 0x65, 0x74, + 0x12, 0x45, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x42, 0x0e, 0x0a, 0x0c, 0x69, 0x6e, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x42, 0x0a, 0x0a, 0x08, 0x63, 0x6e, 0x69, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x22, 0x5b, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x22, 0x2a, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x12, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x6c, 0x0a, 0x13, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, + 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x5d, 0x0a, + 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, + 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x08, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x66, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x66, 0x67, 0x22, 0x6e, 0x0a, 0x16, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, + 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3c, 0x0a, 0x15, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x13, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, + 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, - 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x16, 0x0a, 0x14, 0x41, - 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2a, 0x7d, 0x0a, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x19, - 0x0a, 0x15, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x55, - 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x10, 0x03, 0x2a, 0x82, 0x01, 0x0a, 0x0d, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, - 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x18, 0x0a, - 0x14, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0x94, 0x06, 0x0a, 0x0f, 0x54, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x21, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, - 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, - 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, - 0x79, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, - 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, - 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, - 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0b, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, - 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, - 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x73, 0x0a, 0x14, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x74, 0x6f, 0x70, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x08, 0x74, 0x6f, 0x70, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x22, 0x71, 0x0a, 0x11, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x14, 0x0a, 0x12, 0x50, 0x75, 0x73, 0x68, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, + 0x0a, 0x12, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x6f, 0x70, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, + 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x41, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x7d, 0x0a, 0x0c, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x19, + 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x43, + 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, + 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4c, 0x55, 0x53, 0x54, + 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, + 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x2a, 0x82, 0x01, 0x0a, 0x0d, + 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, + 0x1a, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, + 0x17, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x4f, + 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, + 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, + 0x47, 0x59, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, + 0x32, 0x94, 0x06, 0x0a, 0x0f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x70, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x59, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, + 0x79, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x68, + 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, 0x6f, + 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x6f, 0x70, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x56, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x50, 0x0a, 0x0b, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1e, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x68, 0x6f, 0x77, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x68, 0x6f, 0x77, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x4d, 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x1d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x73, + 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x75, 0x73, 0x68, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x50, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/topo.proto b/proto/topo.proto index 166c7c62..0712a029 100644 --- a/proto/topo.proto +++ b/proto/topo.proto @@ -64,7 +64,6 @@ message Node { CISCO_XRD = 12; CISCO_E8000 = 13; LEMMING = 14; - CDNOS = 15; } string name = 1; // Name of the node in the topology. Must be unique. Type type = 2 [deprecated = true]; diff --git a/proto/topo/topo.pb.go b/proto/topo/topo.pb.go index d72e0e83..767df1e6 100644 --- a/proto/topo/topo.pb.go +++ b/proto/topo/topo.pb.go @@ -134,7 +134,6 @@ const ( Node_CISCO_XRD Node_Type = 12 Node_CISCO_E8000 Node_Type = 13 Node_LEMMING Node_Type = 14 - Node_CDNOS Node_Type = 15 ) // Enum value maps for Node_Type. @@ -155,7 +154,6 @@ var ( 12: "CISCO_XRD", 13: "CISCO_E8000", 14: "LEMMING", - 15: "CDNOS", } Node_Type_value = map[string]int32{ "UNKNOWN": 0, @@ -173,7 +171,6 @@ var ( "CISCO_XRD": 12, "CISCO_E8000": 13, "LEMMING": 14, - "CDNOS": 15, } ) @@ -1240,7 +1237,7 @@ var file_topo_proto_rawDesc = []byte{ 0x6f, 0x70, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, - 0x73, 0x22, 0xf4, 0x07, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x73, 0x22, 0xe9, 0x07, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x02, 0x18, @@ -1288,7 +1285,7 @@ var file_topo_proto_rawDesc = []byte{ 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe3, 0x01, 0x0a, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd8, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, 0x5f, 0x43, 0x45, 0x4f, 0x53, 0x10, 0x02, 0x12, 0x10, 0x0a, @@ -1302,114 +1299,113 @@ var file_topo_proto_rawDesc = []byte{ 0x09, 0x0a, 0x05, 0x47, 0x4f, 0x42, 0x47, 0x50, 0x10, 0x0b, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x5f, 0x58, 0x52, 0x44, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x5f, 0x45, 0x38, 0x30, 0x30, 0x30, 0x10, 0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x45, - 0x4d, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x0e, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x44, 0x4e, 0x4f, 0x53, - 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x60, 0x0a, 0x0e, 0x48, 0x6f, 0x73, 0x74, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x11, 0x6b, 0x65, - 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x4b, 0x65, 0x72, - 0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x10, 0x6b, 0x65, 0x72, 0x6e, - 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x42, 0x0c, 0x0a, 0x0a, - 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, 0x74, 0x0a, 0x0b, 0x4b, 0x65, - 0x72, 0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, - 0x0f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x42, 0x6f, - 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x42, 0x10, - 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x4a, 0x0a, 0x0e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 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, 0x19, - 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x69, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x74, 0x75, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x12, 0x1b, 0x0a, 0x09, 0x70, - 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, - 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x70, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x22, 0x5e, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x15, 0x0a, 0x06, - 0x61, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x4e, - 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x61, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x61, 0x49, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x7a, 0x5f, 0x6e, 0x6f, - 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x7a, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x13, 0x0a, 0x05, 0x7a, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x7a, 0x49, 0x6e, 0x74, 0x22, 0xe5, 0x03, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, - 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x23, 0x0a, 0x0d, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x69, 0x6c, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, - 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x05, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x65, 0x72, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x66, 0x67, 0x52, 0x04, 0x63, - 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, 0x28, - 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x04, 0x66, 0x69, 0x6c, - 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x35, - 0x0a, 0x0b, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, 0x76, 0x65, 0x6e, 0x64, 0x6f, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0d, 0x0a, - 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x0e, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x66, 0x67, 0x12, 0x3a, - 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x53, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, 0x67, 0x48, 0x00, 0x52, 0x0a, - 0x73, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x22, 0x87, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x65, - 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, - 0x65, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xbe, - 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, - 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x49, 0x70, 0x12, - 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x49, 0x70, 0x12, 0x1b, 0x0a, 0x09, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2a, - 0xa7, 0x01, 0x0a, 0x06, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x53, 0x54, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, 0x10, 0x02, 0x12, 0x09, 0x0a, - 0x05, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x4a, 0x55, 0x4e, 0x49, - 0x50, 0x45, 0x52, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x45, 0x59, 0x53, 0x49, 0x47, 0x48, - 0x54, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x52, 0x52, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, - 0x51, 0x55, 0x41, 0x47, 0x47, 0x41, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x4f, 0x42, 0x47, - 0x50, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4b, 0x49, 0x41, 0x10, 0x09, 0x12, 0x0e, - 0x0a, 0x0a, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x0a, 0x12, 0x0a, - 0x0a, 0x06, 0x41, 0x4c, 0x50, 0x49, 0x4e, 0x45, 0x10, 0x0b, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x52, - 0x49, 0x56, 0x45, 0x4e, 0x45, 0x54, 0x53, 0x10, 0x0c, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x6f, 0x70, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x0e, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x60, 0x0a, + 0x0e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, + 0x40, 0x0a, 0x11, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x2e, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x48, 0x00, 0x52, + 0x10, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, + 0x74, 0x0a, 0x0b, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x65, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4a, 0x0a, 0x0e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0xb5, 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, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6d, 0x74, 0x75, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, + 0x0d, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x5e, 0x0a, 0x04, 0x4c, 0x69, 0x6e, + 0x6b, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x61, 0x5f, 0x69, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x49, 0x6e, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x7a, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x7a, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x7a, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x49, 0x6e, 0x74, 0x22, 0xe5, 0x03, 0x0a, 0x06, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, + 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, + 0x76, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x65, 0x65, + 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x12, 0x28, + 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, + 0x6f, 0x70, 0x6f, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, + 0x66, 0x67, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x65, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, + 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x49, 0x6d, + 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, + 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, + 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x22, 0x56, 0x0a, 0x0e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x43, 0x66, 0x67, 0x12, 0x3a, 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, + 0x53, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, + 0x67, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, + 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x87, 0x01, 0x0a, 0x11, 0x53, 0x65, + 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, 0x67, 0x12, + 0x1b, 0x0a, 0x09, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x65, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, + 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, + 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6f, 0x75, + 0x74, 0x73, 0x69, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, + 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x73, 0x69, + 0x64, 0x65, 0x49, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, + 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x49, + 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x2a, 0xa7, 0x01, 0x0a, 0x06, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, + 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x10, 0x03, 0x12, 0x0b, 0x0a, + 0x07, 0x4a, 0x55, 0x4e, 0x49, 0x50, 0x45, 0x52, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x45, + 0x59, 0x53, 0x49, 0x47, 0x48, 0x54, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x52, 0x52, 0x10, + 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x41, 0x47, 0x47, 0x41, 0x10, 0x07, 0x12, 0x09, 0x0a, + 0x05, 0x47, 0x4f, 0x42, 0x47, 0x50, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4b, 0x49, + 0x41, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, + 0x47, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x4c, 0x50, 0x49, 0x4e, 0x45, 0x10, 0x0b, 0x12, + 0x0d, 0x0a, 0x09, 0x44, 0x52, 0x49, 0x56, 0x45, 0x4e, 0x45, 0x54, 0x53, 0x10, 0x0c, 0x42, 0x26, + 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, + 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/topo/node/drivenets/drivenets.go b/topo/node/drivenets/drivenets.go index dd38129d..a5e31012 100644 --- a/topo/node/drivenets/drivenets.go +++ b/topo/node/drivenets/drivenets.go @@ -211,7 +211,7 @@ func cdnosDefaults(pb *tpb.Node) *tpb.Node { pb.Config = &tpb.Config{} } if pb.Config.Image == "" { - pb.Config.Image = "pr-registry.dev.drivenets.net/cdnos_pr_61485:19.1.0.1_priv.61485.1ca7037408b5f7a975949e0912d743498b1f49b5" + pb.Config.Image = "registry.dev.drivenets.net/devops/cdnos:latest" } if pb.Config.InitImage == "" { pb.Config.InitImage = node.DefaultInitContainerImage @@ -262,6 +262,10 @@ func cdnosDefaults(pb *tpb.Node) *tpb.Node { Names: []string{"gribi"}, Inside: 9340, }, + 830: { + Names: []string{"netconf"}, + Inside: 830, + }, } } return pb From e0487833a9174b87ae2120be410ac6c7f8553e31 Mon Sep 17 00:00:00 2001 From: David Avnerson Date: Tue, 19 Mar 2024 16:54:37 +0200 Subject: [PATCH 30/33] go mod tidy + go fmt --- deploy/deploy.go | 2 - deploy/deploy_test.go | 8 +- go.sum | 19 +-- topo/node/drivenets/drivenets.go | 6 +- topo/node/drivenets/drivenets_test.go | 176 +++++++++++++------------- 5 files changed, 106 insertions(+), 105 deletions(-) diff --git a/deploy/deploy.go b/deploy/deploy.go index 9e2911cd..81842488 100644 --- a/deploy/deploy.go +++ b/deploy/deploy.go @@ -1132,7 +1132,6 @@ func (i *IxiaTGSpec) Healthy(ctx context.Context) error { return deploymentHealthy(ctx, i.kClient, "ixiatg-op-system") } - func init() { load.Register("Cdnos", &load.Spec{ Type: CdnosSpec{}, @@ -1177,7 +1176,6 @@ func (c *CdnosSpec) Healthy(ctx context.Context) error { return deploymentHealthy(ctx, c.kClient, "cdnos-controller-system") } - func deploymentHealthy(ctx context.Context, c kubernetes.Interface, name string) error { log.Infof("Waiting on deployment %q to be healthy", name) w, err := c.AppsV1().Deployments(name).Watch(ctx, metav1.ListOptions{}) diff --git a/deploy/deploy_test.go b/deploy/deploy_test.go index 7f9e1070..b7ab0ad5 100644 --- a/deploy/deploy_test.go +++ b/deploy/deploy_test.go @@ -1857,14 +1857,14 @@ func TestCdnosSpec(t *testing.T) { } tests := []struct { desc string - cdnos *CdnosSpec + cdnos *CdnosSpec resp []fexec.Response dErr string hErr string ctx context.Context mockKClient func(*fake.Clientset) }{{ - desc: "1 replica", + desc: "1 replica", cdnos: &CdnosSpec{}, resp: []fexec.Response{ {Cmd: "kubectl", Args: []string{"apply", "-f", ""}}, @@ -1959,7 +1959,7 @@ func TestCdnosSpec(t *testing.T) { k.PrependWatchReactor("deployments", reaction) }, }, { - desc: "operator deploy error", + desc: "operator deploy error", cdnos: &CdnosSpec{}, resp: []fexec.Response{ {Cmd: "kubectl", Args: []string{"apply", "-f", ""}, Err: "failed to apply operator"}, @@ -1967,7 +1967,7 @@ func TestCdnosSpec(t *testing.T) { dErr: "failed to apply operator", }, { - desc: "context canceled", + desc: "context canceled", cdnos: &CdnosSpec{}, resp: []fexec.Response{ {Cmd: "kubectl", Args: []string{"apply", "-f", ""}}, diff --git a/go.sum b/go.sum index b59a057b..5116e4e5 100644 --- a/go.sum +++ b/go.sum @@ -955,6 +955,8 @@ github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -1044,6 +1046,7 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe 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/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/protobuf v3.11.4+incompatible/go.mod h1:lUQ9D1ePzbH2PrIS7ob/bjm9HXyH5WHB0Akwh7URreM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -1169,10 +1172,10 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/networkop/meshnet-cni v0.3.1-0.20230525201116-d7c306c635cf h1:9Pe9L0QCovb9o82inAVQitCo3IRnG9u45lRRm8QvgbU= github.com/networkop/meshnet-cni v0.3.1-0.20230525201116-d7c306c635cf/go.mod h1:VMkJl7N6e14GTWS0AnCDrnvJOT67hwOFVUcxTzt/EtE= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= -github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= +github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= +github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= github.com/open-traffic-generator/keng-operator v0.3.28 h1:FpDe1wtGODN7ByAhF2LxMIlbDqb5yVmbSE5Y49nyc28= github.com/open-traffic-generator/keng-operator v0.3.28/go.mod h1:+koaOnSyrJHdzxnaye+M6k+ZbszQlWI9u3tMxSpORNA= github.com/open-traffic-generator/snappi/gosnappi v0.13.7 h1:qrisl9OcqHdhUXVIJ0BXUAO8MDWf2qraNn+Oic+b8JM= @@ -1345,14 +1348,12 @@ go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmY go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= go.universe.tf/metallb v0.13.5 h1:SYaiJDn5tNRUeM7VFwA6zdb8KvYaTf7pGFwdq2lhuGs= go.universe.tf/metallb v0.13.5/go.mod h1:IWUTqjEK60WJMr50EqeD6AmhT1x3p2Ondt96yTGvtuU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -1749,6 +1750,8 @@ golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= 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= diff --git a/topo/node/drivenets/drivenets.go b/topo/node/drivenets/drivenets.go index a5e31012..1ebe0cf2 100644 --- a/topo/node/drivenets/drivenets.go +++ b/topo/node/drivenets/drivenets.go @@ -125,7 +125,7 @@ func (n *Node) cdnosCreate(ctx context.Context) error { InterfaceCount: len(nodeSpec.Interfaces) + 1, InitSleep: int(config.Sleep), Resources: node.ToResourceRequirements(nodeSpec.Constraints), - Labels: nodeSpec.Labels, + Labels: nodeSpec.Labels, }, } if config.Cert != nil { @@ -151,7 +151,7 @@ func (n *Node) cdnosCreate(ctx context.Context) error { } func (n *Node) Status(ctx context.Context) (node.Status, error) { - if n.Impl.Proto.Model != modelCdnos { + if n.Impl.Proto.Model != modelCdnos { return node.StatusUnknown, fmt.Errorf("invalid model specified") } return n.cdnosStatus(ctx) @@ -304,4 +304,4 @@ func (n *Node) CreateConfig(ctx context.Context) (*corev1.Volume, error) { log.V(1).Infof("Server Config Map:\n%v\n", sCM) } return nil, nil -} \ No newline at end of file +} diff --git a/topo/node/drivenets/drivenets_test.go b/topo/node/drivenets/drivenets_test.go index cca83d1d..38a64c57 100644 --- a/topo/node/drivenets/drivenets_test.go +++ b/topo/node/drivenets/drivenets_test.go @@ -8,110 +8,110 @@ import ( ) func TestNew(t *testing.T) { - tests := []struct { - name string - nodeImpl *node.Impl - wantErr bool - errString string - }{ - { - name: "nil nodeImpl", - nodeImpl: nil, - wantErr: true, - errString: "nodeImpl cannot be nil", - }, - { - name: "nil Proto", - nodeImpl: &node.Impl{ - Proto: nil, - }, - wantErr: true, - errString: "nodeImpl.Proto cannot be nil", - }, - { - name: "no model specified", - nodeImpl: &node.Impl{ - Proto: &tpb.Node{}, - }, - wantErr: true, - errString: "unknown model", - }, - } + tests := []struct { + name string + nodeImpl *node.Impl + wantErr bool + errString string + }{ + { + name: "nil nodeImpl", + nodeImpl: nil, + wantErr: true, + errString: "nodeImpl cannot be nil", + }, + { + name: "nil Proto", + nodeImpl: &node.Impl{ + Proto: nil, + }, + wantErr: true, + errString: "nodeImpl.Proto cannot be nil", + }, + { + name: "no model specified", + nodeImpl: &node.Impl{ + Proto: &tpb.Node{}, + }, + wantErr: true, + errString: "unknown model", + }, + } for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - _, err := New(tt.nodeImpl) - if tt.wantErr { - if err == nil { - t.Errorf("New() error = nil, wantErr %v", tt.wantErr) - return - } - if err.Error() != tt.errString { - t.Errorf("New() error = %v, wantErr %v", err, tt.errString) - } - } else if err != nil { - t.Errorf("New() unexpected error = %v", err) - } - }) - } + t.Run(tt.name, func(t *testing.T) { + _, err := New(tt.nodeImpl) + if tt.wantErr { + if err == nil { + t.Errorf("New() error = nil, wantErr %v", tt.wantErr) + return + } + if err.Error() != tt.errString { + t.Errorf("New() error = %v, wantErr %v", err, tt.errString) + } + } else if err != nil { + t.Errorf("New() unexpected error = %v", err) + } + }) + } } func TestCdnosDefaults(t *testing.T) { - pb := &tpb.Node{ - Name: "testNode", - } + pb := &tpb.Node{ + Name: "testNode", + } - pb = cdnosDefaults(pb) + pb = cdnosDefaults(pb) - if pb.Config == nil { - t.Errorf("Config is nil") - } + if pb.Config == nil { + t.Errorf("Config is nil") + } - if pb.Config.Image == "" { - t.Errorf("Image is empty") - } + if pb.Config.Image == "" { + t.Errorf("Image is empty") + } - if pb.Config.InitImage == "" { - t.Errorf("InitImage is empty") - } + if pb.Config.InitImage == "" { + t.Errorf("InitImage is empty") + } - if len(pb.GetConfig().GetCommand()) == 0 { - t.Errorf("Command is empty") - } + if len(pb.GetConfig().GetCommand()) == 0 { + t.Errorf("Command is empty") + } - if pb.Config.EntryCommand == "" { - t.Errorf("EntryCommand is empty") - } + if pb.Config.EntryCommand == "" { + t.Errorf("EntryCommand is empty") + } - if pb.Config.Cert == nil { - t.Errorf("Cert is nil") - } + if pb.Config.Cert == nil { + t.Errorf("Cert is nil") + } - if pb.Constraints == nil { - t.Errorf("Constraints is nil") - } + if pb.Constraints == nil { + t.Errorf("Constraints is nil") + } - if pb.Constraints["cpu"] == "" { - t.Errorf("CPU constraint is empty") - } + if pb.Constraints["cpu"] == "" { + t.Errorf("CPU constraint is empty") + } - if pb.Constraints["memory"] == "" { - t.Errorf("Memory constraint is empty") - } + if pb.Constraints["memory"] == "" { + t.Errorf("Memory constraint is empty") + } - if pb.Labels == nil { - t.Errorf("Labels is nil") - } + if pb.Labels == nil { + t.Errorf("Labels is nil") + } - if pb.Labels["vendor"] == "" { - t.Errorf("Vendor label is empty") - } + if pb.Labels["vendor"] == "" { + t.Errorf("Vendor label is empty") + } - if pb.Labels[node.OndatraRoleLabel] != node.OndatraRoleDUT { - t.Errorf("OndatraRoleLabel is not DUT") - } + if pb.Labels[node.OndatraRoleLabel] != node.OndatraRoleDUT { + t.Errorf("OndatraRoleLabel is not DUT") + } - if pb.Services == nil { - t.Errorf("Services is nil") - } -} \ No newline at end of file + if pb.Services == nil { + t.Errorf("Services is nil") + } +} From 95b46e7e8a0860840ab4967e3beea9467c4c377c Mon Sep 17 00:00:00 2001 From: David Avnerson Date: Wed, 20 Mar 2024 10:54:09 +0200 Subject: [PATCH 31/33] create Volume based on configMap --- topo/node/drivenets/drivenets.go | 39 ++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/topo/node/drivenets/drivenets.go b/topo/node/drivenets/drivenets.go index 1ebe0cf2..b41f2f4d 100644 --- a/topo/node/drivenets/drivenets.go +++ b/topo/node/drivenets/drivenets.go @@ -288,20 +288,31 @@ func (n *Node) CreateConfig(ctx context.Context) (*corev1.Volume, error) { case *tpb.Config_Data: data = v.Data } - if data != nil { - cm := &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%s-config", pb.Name), - }, - Data: map[string]string{ - pb.Config.ConfigFile: string(data), + if data == nil { + return nil, nil + } + cm := &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("%s-config", pb.Name), + }, + Data: map[string]string{ + pb.Config.ConfigFile: string(data), + }, + } + sCM, err := n.KubeClient.CoreV1().ConfigMaps(n.Namespace).Create(ctx, cm, metav1.CreateOptions{}) + if err != nil { + return nil, err + } + log.V(1).Infof("Server Config Map:\n%v\n", sCM) + volume := &corev1.Volume{ + Name: fmt.Sprintf("%s-config-volume", pb.Name), + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: sCM.Name, // reference to your ConfigMap + }, }, - } - sCM, err := n.KubeClient.CoreV1().ConfigMaps(n.Namespace).Create(ctx, cm, metav1.CreateOptions{}) - if err != nil { - return nil, err - } - log.V(1).Infof("Server Config Map:\n%v\n", sCM) + }, } - return nil, nil + return volume, nil } From 8de628460f4ea90761658b2c90d2cab69e9a79b0 Mon Sep 17 00:00:00 2001 From: David Avnerson Date: Wed, 20 Mar 2024 11:28:05 +0200 Subject: [PATCH 32/33] use errdif for unit test and modified controller.proto --- proto/controller.proto | 2 +- proto/controller/controller.pb.go | 4 ++-- topo/node/drivenets/drivenets.go | 2 +- topo/node/drivenets/drivenets_test.go | 14 +++----------- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/proto/controller.proto b/proto/controller.proto index 8d3c77c3..ecfad52f 100644 --- a/proto/controller.proto +++ b/proto/controller.proto @@ -133,7 +133,7 @@ message LemmingSpec { // CdnosSpec specifications message CdnosSpec { - Manifest operator = 2; + Manifest operator = 1; } message Manifest { diff --git a/proto/controller/controller.pb.go b/proto/controller/controller.pb.go index bdfbd910..8b682553 100644 --- a/proto/controller/controller.pb.go +++ b/proto/controller/controller.pb.go @@ -941,7 +941,7 @@ type CdnosSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Operator *Manifest `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` + Operator *Manifest `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` } func (x *CdnosSpec) Reset() { @@ -2168,7 +2168,7 @@ var file_controller_proto_rawDesc = []byte{ 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3d, 0x0a, 0x09, 0x43, 0x64, 0x6e, 0x6f, 0x73, 0x53, 0x70, 0x65, 0x63, 0x12, 0x30, - 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x04, diff --git a/topo/node/drivenets/drivenets.go b/topo/node/drivenets/drivenets.go index b41f2f4d..2e25fba9 100644 --- a/topo/node/drivenets/drivenets.go +++ b/topo/node/drivenets/drivenets.go @@ -309,7 +309,7 @@ func (n *Node) CreateConfig(ctx context.Context) (*corev1.Volume, error) { VolumeSource: corev1.VolumeSource{ ConfigMap: &corev1.ConfigMapVolumeSource{ LocalObjectReference: corev1.LocalObjectReference{ - Name: sCM.Name, // reference to your ConfigMap + Name: sCM.Name, }, }, }, diff --git a/topo/node/drivenets/drivenets_test.go b/topo/node/drivenets/drivenets_test.go index 38a64c57..83e911c0 100644 --- a/topo/node/drivenets/drivenets_test.go +++ b/topo/node/drivenets/drivenets_test.go @@ -3,6 +3,7 @@ package drivenets import ( "testing" + "github.com/openconfig/gnmi/errdiff" tpb "github.com/openconfig/kne/proto/topo" "github.com/openconfig/kne/topo/node" ) @@ -37,20 +38,11 @@ func TestNew(t *testing.T) { errString: "unknown model", }, } - for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { _, err := New(tt.nodeImpl) - if tt.wantErr { - if err == nil { - t.Errorf("New() error = nil, wantErr %v", tt.wantErr) - return - } - if err.Error() != tt.errString { - t.Errorf("New() error = %v, wantErr %v", err, tt.errString) - } - } else if err != nil { - t.Errorf("New() unexpected error = %v", err) + if diff := errdiff.Substring(err, tt.errString); diff != "" { + t.Errorf("New() %v", diff) } }) } From 079b92bba2324b38c3024977a64f874e40a52a6e Mon Sep 17 00:00:00 2001 From: David Avnerson Date: Wed, 20 Mar 2024 12:09:49 +0200 Subject: [PATCH 33/33] added default config file and path --- examples/drivenets/cdnos.pb.txt | 4 ---- examples/drivenets/multivendor-drivenets.pb.txt | 2 -- topo/node/drivenets/drivenets.go | 6 ++++++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/drivenets/cdnos.pb.txt b/examples/drivenets/cdnos.pb.txt index 905488b6..2f074111 100644 --- a/examples/drivenets/cdnos.pb.txt +++ b/examples/drivenets/cdnos.pb.txt @@ -3,8 +3,6 @@ nodes: { name: "cdnos1" vendor: DRIVENETS config: { - config_file: "default" - config_path: "/config_load" file: "cdnos1.cfg" image: "registry.dev.drivenets.net/devops/cdnos_dev_v19_1:19.1.0.101_dev.dev_v19_1" } @@ -14,8 +12,6 @@ nodes: { name: "cdnos2" vendor: DRIVENETS config: { - config_file: "default" - config_path: "/config_load" file: "cdnos2.cfg" image: "registry.dev.drivenets.net/devops/cdnos_dev_v19_1:19.1.0.101_dev.dev_v19_1" } diff --git a/examples/drivenets/multivendor-drivenets.pb.txt b/examples/drivenets/multivendor-drivenets.pb.txt index 2d04aec0..065c9737 100644 --- a/examples/drivenets/multivendor-drivenets.pb.txt +++ b/examples/drivenets/multivendor-drivenets.pb.txt @@ -20,8 +20,6 @@ nodes: { name: "cdnos1" vendor: DRIVENETS config: { - config_path: "/config_load" - config_file: "default" file: "cdnos2.cfg" image: "registry.dev.drivenets.net/devops/cdnos_dev_v19_1:19.1.0.101_dev.dev_v19_1" } diff --git a/topo/node/drivenets/drivenets.go b/topo/node/drivenets/drivenets.go index 2e25fba9..a1159dd3 100644 --- a/topo/node/drivenets/drivenets.go +++ b/topo/node/drivenets/drivenets.go @@ -210,6 +210,12 @@ func cdnosDefaults(pb *tpb.Node) *tpb.Node { if pb.Config == nil { pb.Config = &tpb.Config{} } + if pb.Config.ConfigFile == "" { + pb.Config.ConfigFile = "default" + } + if pb.Config.ConfigPath == "" { + pb.Config.ConfigPath = "/config_load" + } if pb.Config.Image == "" { pb.Config.Image = "registry.dev.drivenets.net/devops/cdnos:latest" }