diff --git a/cache/cache.go b/cache/cache.go index 81cee86..0b974f1 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -67,6 +67,7 @@ type Target struct { ts time.Time // latest timestamp for an update excludedMeta stringset.Set // set of metadata not to generate update for futureThreshold time.Duration // how far in the future an update can be accepted + eventDriven bool // whether to emulate event driven } // Name returns the name of the target. @@ -83,6 +84,7 @@ type options struct { serverName string excludedUpdateMeta stringset.Set futureThreshold time.Duration + DisableEventDriven bool } // Option defines the function prototype to set options for creating a Cache. @@ -139,6 +141,16 @@ func WithFutureThreshold(futureThreshold time.Duration) Option { } } +// DisableEventDrivenEmulation returns an Option to disable event-driven +// emulation. Note that it only disables event-driven emulation. If the +// input data to Cache is already event-driven, this won't be able to +// disable the event-driven nature of the original data. +func DisableEventDrivenEmulation() Option { + return func(o *options) { + o.DisableEventDriven = true + } +} + // Cache is a structure holding state information for multiple targets. type Cache struct { opts options @@ -287,6 +299,7 @@ func (c *Cache) Add(target string) *Target { lat: latency.New(c.opts.latencyWindows, latOpts), excludedMeta: c.opts.excludedUpdateMeta, futureThreshold: c.opts.futureThreshold, + eventDriven: !c.opts.DisableEventDriven, } t.meta.SetStr(metadata.ServerName, c.opts.serverName) c.targets[target] = t @@ -556,7 +569,7 @@ func (t *Target) gnmiUpdate(n *pb.Notification) (*ctree.Leaf, error) { } oldval.Update(n) // Simulate event-driven for all non-atomic updates. - if !n.Atomic && value.Equal(old.Update[0].Val, n.Update[0].Val) { + if !n.Atomic && value.Equal(old.Update[0].Val, n.Update[0].Val) && t.eventDriven { t.meta.AddInt(metadata.SuppressedCount, 1) return nil, nil } diff --git a/cache/cache_test.go b/cache/cache_test.go index ce9245d..bd05173 100644 --- a/cache/cache_test.go +++ b/cache/cache_test.go @@ -216,6 +216,54 @@ func TestMetadataSuppressed(t *testing.T) { } } +func TestMetadataSuppressedWithEventDrivenDisabled(t *testing.T) { + c := New([]string{"dev1"}, DisableEventDrivenEmulation()) + // Unique values not suppressed. + for i := 0; i < 10; i++ { + c.GnmiUpdate(gnmiNotification("dev1", []string{"prefix", "path"}, []string{"update", "path"}, int64(i), strconv.Itoa(i), false)) + c.GetTarget("dev1").updateMeta(nil) + path := metadata.Path(metadata.SuppressedCount) + c.Query("dev1", path, func(_ []string, _ *ctree.Leaf, v any) error { + suppressedCount := v.(*pb.Notification).Update[0].Val.GetIntVal() + if suppressedCount != 0 { + t.Errorf("got suppressedCount = %d, want 0", suppressedCount) + } + return nil + }) + path = metadata.Path(metadata.UpdateCount) + c.Query("dev1", path, func(_ []string, _ *ctree.Leaf, v any) error { + updates := v.(*pb.Notification).Update[0].Val.GetIntVal() + if updates != int64(i+1) { + t.Errorf("got updates %d, want %d", updates, i+1) + } + return nil + }) + } + c.Reset("dev1") + + // Duplicate values also not suppressed. + for i := 0; i < 10; i++ { + c.GnmiUpdate(gnmiNotification("dev1", []string{"prefix", "path"}, []string{"update", "path"}, int64(i), "same value", false)) + c.GetTarget("dev1").updateMeta(nil) + path := metadata.Path(metadata.SuppressedCount) + c.Query("dev1", path, func(_ []string, _ *ctree.Leaf, v any) error { + suppressedCount := v.(*pb.Notification).Update[0].Val.GetIntVal() + if suppressedCount != 0 { + t.Errorf("got suppressedCount = %d, want 0", suppressedCount) + } + return nil + }) + path = metadata.Path(metadata.UpdateCount) + c.Query("dev1", path, func(_ []string, _ *ctree.Leaf, v any) error { + updates := v.(*pb.Notification).Update[0].Val.GetIntVal() + if updates != int64(i+1) { + t.Errorf("got updates %d, want %d", updates, i+1) + } + return nil + }) + } +} + func TestMetadataLatency(t *testing.T) { window := 2 * time.Second opt, _ := WithLatencyWindows([]string{"2s"}, 2*time.Second) diff --git a/cli/cli.go b/cli/cli.go index 0d3c4d6..222955f 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -47,6 +47,8 @@ var ( "p": "PROTO", "proto": "PROTO", "PROTO": "PROTO", "sp": "SHORTPROTO", "shortproto": "SHORTPROTO", "SHORTPROTO": "SHORTPROTO", } + // Stub for testing. + since = time.Since ) // Config is a type to hold parameters that affect how the cli sends and @@ -66,11 +68,14 @@ type Config struct { // on - human readable timestamp according to layout // raw - int64 nanos since epoch // - human readable timestamp according to - Timestamp string // Formatting of timestamp in result output. - DisplaySize bool - Latency bool // Show latency to client - ClientTypes []string // List of client types to try. - Location *time.Location // Location that time formatting uses in lieu of the local time zone. + Timestamp string // Formatting of timestamp in result output. + DisplaySize bool + Latency bool // Show latency to client. For single DisplayType only. + ClientTypes []string // List of client types to try. + Location *time.Location // Location that time formatting uses in lieu of the local time zone. + FilterDeletes bool // Filter out delete results. For single DisplayType only. + FilterUpdates bool // Filter out update results. For single DisplayType only. + FilterMinLatency time.Duration // Filter out results not meeting minimum latency. For single DisplayType only. } // QueryType returns a client query type for t after trying aliases for the @@ -160,6 +165,13 @@ func genHandler(cfg *Config) client.NotificationHandler { var buf bytes.Buffer // Reuse the same buffer in either case. iDisplay := func(p client.Path, v interface{}, ts time.Time) { buf.Reset() + var latency time.Duration + if cfg.Latency || cfg.FilterMinLatency > 0 { + latency = since(ts) + } + if cfg.FilterMinLatency > 0 && latency < cfg.FilterMinLatency { + return + } buf.WriteString(strings.Join(p, cfg.Delimiter)) buf.WriteString(fmt.Sprintf(", %v", v)) t := formatTime(ts, cfg) @@ -167,7 +179,7 @@ func genHandler(cfg *Config) client.NotificationHandler { buf.WriteString(fmt.Sprintf(", %v", t)) } if cfg.Latency { - buf.WriteString(fmt.Sprintf(", %s", time.Since(ts))) + buf.WriteString(fmt.Sprintf(", %s", latency)) } cfg.Display(buf.Bytes()) } @@ -176,9 +188,13 @@ func genHandler(cfg *Config) client.NotificationHandler { default: return fmt.Errorf("invalid type: %#v", v) case client.Update: - iDisplay(v.Path, v.Val, v.TS) + if !cfg.FilterUpdates { + iDisplay(v.Path, v.Val, v.TS) + } case client.Delete: - iDisplay(v.Path, v.Val, v.TS) + if !cfg.FilterDeletes { + iDisplay(v.Path, v.Val, v.TS) + } case client.Sync, client.Connected: case client.Error: return v diff --git a/cli/cli_test.go b/cli/cli_test.go index 66fcf89..25c26f2 100644 --- a/cli/cli_test.go +++ b/cli/cli_test.go @@ -71,6 +71,7 @@ func TestSendQueryAndDisplay(t *testing.T) { display := func(b []byte) { displayOut += string(b) + "\n" } + now := time.Unix(300, 0) tests := []struct { desc string updates []*fpb.Value @@ -78,6 +79,7 @@ func TestSendQueryAndDisplay(t *testing.T) { cfg Config want string sort bool + since func(time.Time) time.Duration }{{ desc: "single target single output with provided layout", updates: []*fpb.Value{ @@ -271,6 +273,84 @@ func TestSendQueryAndDisplay(t *testing.T) { want: `dev1/a/b, 5 dev1/a/c, 5 dev1/a/c, +`, + }, { + desc: "single target single output with FilterMinLatency", + updates: []*fpb.Value{ + {Path: []string{"a", "b"}, Value: &fpb.Value_IntValue{IntValue: &fpb.IntValue{Value: 5}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: now.Add(-62 * time.Second).UnixNano()}}, + {Path: []string{"a", "c"}, Value: &fpb.Value_IntValue{IntValue: &fpb.IntValue{Value: 5}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: now.Add(-59 * time.Second).UnixNano()}}, + {Path: []string{"a", "d"}, Value: &fpb.Value_IntValue{IntValue: &fpb.IntValue{Value: 7}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: now.Add(-61 * time.Second).UnixNano()}}, + {Path: []string{"a", "e"}, Value: &fpb.Value_Delete{Delete: &fpb.DeleteValue{}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: now.Add(-60 * time.Second).UnixNano()}}, + {Path: []string{"a", "f"}, Value: &fpb.Value_Delete{Delete: &fpb.DeleteValue{}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: now.Add(-59 * time.Second).UnixNano()}}, + {Value: &fpb.Value_Sync{Sync: 1}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: now.Add(-59 * time.Second).UnixNano()}}, + }, + query: client.Query{ + Target: "dev1", + Queries: []client.Path{{"a"}}, + Type: client.Once, + TLS: &tls.Config{InsecureSkipVerify: true}, + }, + cfg: Config{ + Delimiter: "/", + Display: display, + DisplayPrefix: "", + DisplayIndent: " ", + DisplayType: "single", + FilterMinLatency: time.Minute, + }, + since: func(ts time.Time) time.Duration { return now.Sub(ts) }, + want: `dev1/a/b, 5 +dev1/a/d, 7 +dev1/a/e, +`, + }, { + desc: "single target single output with FilterDeletes", + updates: []*fpb.Value{ + {Path: []string{"a", "b"}, Value: &fpb.Value_IntValue{IntValue: &fpb.IntValue{Value: 5}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: 100}}, + {Path: []string{"a", "c"}, Value: &fpb.Value_Delete{Delete: &fpb.DeleteValue{}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: 101}}, + {Path: []string{"a", "d"}, Value: &fpb.Value_IntValue{IntValue: &fpb.IntValue{Value: 7}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: 102}}, + {Value: &fpb.Value_Sync{Sync: 1}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: 103}}, + }, + query: client.Query{ + Target: "dev1", + Queries: []client.Path{{"a"}}, + Type: client.Once, + TLS: &tls.Config{InsecureSkipVerify: true}, + }, + cfg: Config{ + Delimiter: "/", + Display: display, + DisplayPrefix: "", + DisplayIndent: " ", + DisplayType: "single", + FilterDeletes: true, + }, + want: `dev1/a/b, 5 +dev1/a/d, 7 +`, + }, { + desc: "single target single output with FilterUpdates", + updates: []*fpb.Value{ + {Path: []string{"a", "b"}, Value: &fpb.Value_IntValue{IntValue: &fpb.IntValue{Value: 5}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: 100}}, + {Path: []string{"a", "c"}, Value: &fpb.Value_Delete{Delete: &fpb.DeleteValue{}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: 101}}, + {Path: []string{"a", "d"}, Value: &fpb.Value_IntValue{IntValue: &fpb.IntValue{Value: 7}}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: 102}}, + {Value: &fpb.Value_Sync{Sync: 1}, Repeat: 1, Timestamp: &fpb.Timestamp{Timestamp: 103}}, + }, + query: client.Query{ + Target: "dev1", + Queries: []client.Path{{"a"}}, + Type: client.Once, + TLS: &tls.Config{InsecureSkipVerify: true}, + }, + cfg: Config{ + Delimiter: "/", + Display: display, + DisplayPrefix: "", + DisplayIndent: " ", + DisplayType: "single", + FilterUpdates: true, + }, + want: `dev1/a/c, `, }, { desc: "single target multiple paths", @@ -717,6 +797,10 @@ sync_response: true } for _, tt := range tests { t.Run(tt.desc, func(t *testing.T) { + if tt.since != nil { + since = tt.since + defer func() { since = time.Since }() + } displayOut = "" s, err := gnmi.New( &fpb.Config{ diff --git a/cmd/gnmi_cli/gnmi_cli.go b/cmd/gnmi_cli/gnmi_cli.go index d9065e6..c20044e 100644 --- a/cmd/gnmi_cli/gnmi_cli.go +++ b/cmd/gnmi_cli/gnmi_cli.go @@ -101,6 +101,9 @@ func init() { flag.StringVar(&cfg.Timestamp, "timestamp", "", "Specify timestamp formatting in output. One of (, on, raw, ) where is disabled, on is human readable, raw is int64 nanos since epoch, and is according to golang time.Format()") flag.BoolVar(&cfg.DisplaySize, "display_size", false, "Display the total size of query response.") flag.BoolVar(&cfg.Latency, "latency", false, "Display the latency for receiving each update (Now - update timestamp).") + flag.DurationVar(&cfg.FilterMinLatency, "filter_min_latency", 0, "Filter out results with latency < the specified minium latency. No filtering if 0. Works with single display type only.") + flag.BoolVar(&cfg.FilterDeletes, "filter_deletes", false, "Filter out delete results. Works with single display type only.") + flag.BoolVar(&cfg.FilterUpdates, "filter_updates", false, "Filter out update results. Works with single display type only.") flag.StringVar(&q.TLS.ServerName, "server_name", "", "When set, CLI will use this hostname to verify server certificate during TLS handshake.") flag.BoolVar(&q.TLS.InsecureSkipVerify, "tls_skip_verify", false, "When set, CLI will not verify the server certificate during TLS handshake.") @@ -118,6 +121,9 @@ func init() { flag.DurationVar(&cfg.PollingInterval, "pi", cfg.PollingInterval, "Short for polling_interval.") flag.BoolVar(&cfg.DisplaySize, "ds", cfg.DisplaySize, "Short for display_size.") flag.BoolVar(&cfg.Latency, "l", cfg.Latency, "Short for latency.") + flag.DurationVar(&cfg.FilterMinLatency, "flml", 0, "Short for filter_min_latency.") + flag.BoolVar(&cfg.FilterDeletes, "fld", false, "Short for filter_deletes.") + flag.BoolVar(&cfg.FilterUpdates, "flu", false, "Short for filter_updates.") flag.StringVar(reqProto, "p", *reqProto, "Short for request proto.") } diff --git a/go.mod b/go.mod index 12f8b6a..8353af3 100644 --- a/go.mod +++ b/go.mod @@ -1,30 +1,28 @@ module github.com/openconfig/gnmi -go 1.21 - -toolchain go1.22.5 +go 1.22.0 require ( bitbucket.org/creachadair/stringset v0.0.14 - github.com/cenkalti/backoff/v4 v4.1.1 - github.com/golang/glog v1.2.1 + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/golang/glog v1.2.2 github.com/google/go-cmp v0.6.0 github.com/kylelemons/godebug v1.1.0 - github.com/openconfig/grpctunnel v0.0.0-20220819142823-6f5422b8ca70 - github.com/openconfig/ygot v0.6.0 - github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a - golang.org/x/crypto v0.26.0 - golang.org/x/net v0.28.0 - google.golang.org/grpc v1.66.0 - google.golang.org/protobuf v1.34.2 + github.com/openconfig/grpctunnel v0.1.0 + github.com/openconfig/ygot v0.29.20 + github.com/protocolbuffers/txtpbfmt v0.0.0-20240823084532-8e6b51fa9bef + golang.org/x/crypto v0.28.0 + golang.org/x/net v0.30.0 + google.golang.org/grpc v1.67.1 + google.golang.org/protobuf v1.35.1 ) require ( - github.com/golang/protobuf v1.5.4 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea // indirect - golang.org/x/sys v0.24.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect + github.com/openconfig/goyang v1.6.0 // indirect + golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/text v0.19.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect ) diff --git a/go.sum b/go.sum index b071fd4..020756d 100644 --- a/go.sum +++ b/go.sum @@ -5,8 +5,9 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -22,8 +23,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= -github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -38,8 +39,6 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -51,22 +50,34 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea h1:5MyIz4bN4vpH6aHDN339bkWXAjTkhg1ZKMhR4aIi5Rk= +github.com/openconfig/gnmi v0.10.0/go.mod h1:Y9os75GmSkhHw2wX8sMsxfI7qRGAEcDh8NTa5a8vj6E= github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU= -github.com/openconfig/grpctunnel v0.0.0-20220819142823-6f5422b8ca70 h1:t6SvvdfWCMlw0XPlsdxO8EgO+q/fXnTevDjdYREKFwU= +github.com/openconfig/goyang v1.6.0 h1:JjnPbLY1/y28VyTO67LsEV0TaLWNiZyDcsppGq4F4is= +github.com/openconfig/goyang v1.6.0/go.mod h1:sdNZi/wdTZyLNBNfgLzmmbi7kISm7FskMDKKzMY+x1M= github.com/openconfig/grpctunnel v0.0.0-20220819142823-6f5422b8ca70/go.mod h1:OmTWe7RyZj2CIzIgy4ovEBzCLBJzRvWSZmn7u02U9gU= -github.com/openconfig/ygot v0.6.0 h1:kJJFPBrczC6TDnz/HMlFTJEdW2CuyUftV13XveIukg0= +github.com/openconfig/grpctunnel v0.1.0 h1:EN99qtlExZczgQgp5ANnHRC/Rs62cAG+Tz2BQ5m/maM= +github.com/openconfig/grpctunnel v0.1.0/go.mod h1:G04Pdu0pml98tdvXrvLaU+EBo3PxYfI9MYqpvdaEHLo= github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs= +github.com/openconfig/ygot v0.29.20 h1:XHLpwCN91QuKc2LAvnEqtCmH8OuxgLlErDhrdl2mJw8= +github.com/openconfig/ygot v0.29.20/go.mod h1:K8HbrPm/v8/emtGQ9+RsJXx6UPKC5JzS/FqK7pN+tMo= +github.com/pborman/getopt v1.1.0/go.mod h1:FxXoW1Re00sQG/+KIkuSqRL/LwQgSkv7uyac+STFsbk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a h1:AKJY61V2SQtJ2a2PdeswKk0NM1qF77X+julRNYRxPOk= github.com/protocolbuffers/txtpbfmt v0.0.0-20220608084003-fc78c767cd6a/go.mod h1:KjY0wibdYKc4DYkerHSbguaf3JeIPGhNJBp2BNiFH78= +github.com/protocolbuffers/txtpbfmt v0.0.0-20240823084532-8e6b51fa9bef h1:ej+64jiny5VETZTqcc1GFVAPEtaSk6U1D0kKC2MS5Yc= +github.com/protocolbuffers/txtpbfmt v0.0.0-20240823084532-8e6b51fa9bef/go.mod h1:jgxiZysxFPM+iWKwQwPR+y+Jvo54ARd4EisXxKYpB5c= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -75,9 +86,11 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY= +golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -94,8 +107,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -112,18 +125,18 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.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.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -143,8 +156,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210811021853-ddbe55d93216/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed h1:J6izYgfBXAI3xTKLgxzTmUltdYaLsuBxFCgDHWJ/eXg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -153,8 +166,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= -google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= 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= @@ -168,8 +181,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/metadata/metadata.go b/metadata/metadata.go index d9a6859..8465652 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -71,6 +71,20 @@ const ( ServerName = "serverName" ) +// ResetAction indicates which action to take for a metadata field when Reset +// is called. +type ResetAction int + +const ( + // DefaultValue will initialize the field's value to the default value of that + // type on Reset. + DefaultValue ResetAction = iota + // Delete will delete the field on Reset. + Delete + // Keep will leave the field's value as is on Reset. + Keep +) + // IntValue contains the path and other options for an int64 metadata. type IntValue struct { Path []string // Path of the int64 metadata @@ -90,7 +104,7 @@ func UnregisterIntValue(name string) { // StrValue contains the valid and the option to reset to emptry string. type StrValue struct { - InitEmptyStr bool // Whether to initiate to "". + ResetAction ResetAction } // RegisterStrValue registers a string type metadata. @@ -126,8 +140,8 @@ var ( // TargetStrValues is the list of all string metadata fields. TargetStrValues = map[string]*StrValue{ - ConnectedAddr: {InitEmptyStr: true}, - ConnectError: {InitEmptyStr: false}, + ConnectedAddr: {ResetAction: DefaultValue}, + ConnectError: {ResetAction: Delete}, } ) @@ -217,9 +231,9 @@ func (m *Metadata) ResetEntry(entry string) error { if validStr(entry) == nil { val := TargetStrValues[entry] - if val.InitEmptyStr { + if val.ResetAction == DefaultValue { m.SetStr(entry, "") - } else { + } else if val.ResetAction == Delete { m.mu.Lock() delete(m.valuesStr, entry) m.mu.Unlock() @@ -352,7 +366,10 @@ func RegisterLatencyMetadata(windowSizes []time.Duration) { // RegisterServerNameMetadata registers the serverName metadata. func RegisterServerNameMetadata() { - RegisterStrValue(ServerName, &StrValue{InitEmptyStr: false}) + // We don't want the serverName to be deleted or initialized to an empty + // string on clear, because it won't be reset automatically. The serverName + // should not change, so it will not be cleared (i.e., no action). + RegisterStrValue(ServerName, &StrValue{ResetAction: Keep}) } // UnregisterServerNameMetadata registers the serverName metadata. diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index 3f0d9b5..c1301d2 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -74,7 +74,7 @@ func TestGetBool(t *testing.T) { func TestGetStr(t *testing.T) { m := New() for k, val := range TargetStrValues { - if !val.InitEmptyStr { + if val.ResetAction == Delete { m.SetStr(k, "") } v, err := m.GetStr(k) @@ -225,7 +225,7 @@ func TestResetEntry(t *testing.T) { m.ResetEntry(k) v, err := m.GetStr(k) - if !val.InitEmptyStr { + if val.ResetAction == Delete { if err == nil { t.Errorf("ResetEntry for %q failed. Expect not exist, but found.", k) } @@ -240,6 +240,16 @@ func TestResetEntry(t *testing.T) { } + RegisterServerNameMetadata() + m.SetStr(ServerName, "yy") + m.ResetEntry(ServerName) + if n, err := m.GetStr(ServerName); err != nil { + t.Errorf("ResetEntry for %q failed with error: %v", ServerName, err) + } else if n != "yy" { + t.Errorf("ResetEntry for %q failed. got %q, want %q", ServerName, n, "yy") + } + UnregisterServerNameMetadata() + if err := m.ResetEntry("unsupported"); err == nil { t.Errorf("ResetEntry expected error, but got nil") } @@ -278,7 +288,7 @@ func TestClear(t *testing.T) { for k, val := range TargetStrValues { v, err := m.GetStr(k) - if !val.InitEmptyStr { + if val.ResetAction == Delete { if err == nil { t.Errorf("ResetEntry for %q failed. Expect not exist, but found.", k) } @@ -334,4 +344,8 @@ func TestRegisterServerNameMetadata(t *testing.T) { if diff := cmp.Diff(want, path); diff != "" { t.Fatalf("Path(%q) returned diff (+got-want): %v", ServerName, diff) } + strVal := TargetStrValues[ServerName] + if strVal.ResetAction != Keep { + t.Fatalf("The serverName's TargetStrValues[%q] = %v, want noAction", ServerName, TargetStrValues[ServerName]) + } } diff --git a/proto/collector/collector.pb.go b/proto/collector/collector.pb.go index ef858ca..2a17186 100644 --- a/proto/collector/collector.pb.go +++ b/proto/collector/collector.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.0 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: proto/collector/collector.proto package gnmi diff --git a/proto/collector/collector_grpc.pb.go b/proto/collector/collector_grpc.pb.go index 806013f..4fbaddf 100644 --- a/proto/collector/collector_grpc.pb.go +++ b/proto/collector/collector_grpc.pb.go @@ -11,7 +11,6 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // CollectorClient is the client API for Collector service. @@ -64,8 +63,8 @@ type UnsafeCollectorServer interface { mustEmbedUnimplementedCollectorServer() } -func RegisterCollectorServer(s grpc.ServiceRegistrar, srv CollectorServer) { - s.RegisterService(&Collector_ServiceDesc, srv) +func RegisterCollectorServer(s *grpc.Server, srv CollectorServer) { + s.RegisterService(&_Collector_serviceDesc, srv) } func _Collector_Reconnect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -86,10 +85,7 @@ func _Collector_Reconnect_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -// Collector_ServiceDesc is the grpc.ServiceDesc for Collector service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Collector_ServiceDesc = grpc.ServiceDesc{ +var _Collector_serviceDesc = grpc.ServiceDesc{ ServiceName: "gnmi.Collector", HandlerType: (*CollectorServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/proto/collector/collector_pb2.py b/proto/collector/collector_pb2.py index b696ad3..7d2b3f8 100644 --- a/proto/collector/collector_pb2.py +++ b/proto/collector/collector_pb2.py @@ -1,13 +1,22 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: proto/collector/collector.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +# Protobuf Python Version: 5.27.2 +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'proto/collector/collector.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,113 +24,18 @@ -DESCRIPTOR = _descriptor.FileDescriptor( - name='proto/collector/collector.proto', - package='gnmi', - syntax='proto3', - serialized_pb=_b('\n\x1fproto/collector/collector.proto\x12\x04gnmi\"\"\n\x10ReconnectRequest\x12\x0e\n\x06target\x18\x01 \x03(\t\"\x05\n\x03Nil2=\n\tCollector\x12\x30\n\tReconnect\x12\x16.gnmi.ReconnectRequest\x1a\t.gnmi.Nil\"\x00\x42\x31Z/github.com/openconfig/gnmi/proto/collector;gnmib\x06proto3') -) - - - - -_RECONNECTREQUEST = _descriptor.Descriptor( - name='ReconnectRequest', - full_name='gnmi.ReconnectRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='target', full_name='gnmi.ReconnectRequest.target', index=0, - number=1, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=41, - serialized_end=75, -) - - -_NIL = _descriptor.Descriptor( - name='Nil', - full_name='gnmi.Nil', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=77, - serialized_end=82, -) - -DESCRIPTOR.message_types_by_name['ReconnectRequest'] = _RECONNECTREQUEST -DESCRIPTOR.message_types_by_name['Nil'] = _NIL -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -ReconnectRequest = _reflection.GeneratedProtocolMessageType('ReconnectRequest', (_message.Message,), dict( - DESCRIPTOR = _RECONNECTREQUEST, - __module__ = 'proto.collector.collector_pb2' - # @@protoc_insertion_point(class_scope:gnmi.ReconnectRequest) - )) -_sym_db.RegisterMessage(ReconnectRequest) - -Nil = _reflection.GeneratedProtocolMessageType('Nil', (_message.Message,), dict( - DESCRIPTOR = _NIL, - __module__ = 'proto.collector.collector_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Nil) - )) -_sym_db.RegisterMessage(Nil) - - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z/github.com/openconfig/gnmi/proto/collector;gnmi')) - -_COLLECTOR = _descriptor.ServiceDescriptor( - name='Collector', - full_name='gnmi.Collector', - file=DESCRIPTOR, - index=0, - options=None, - serialized_start=84, - serialized_end=145, - methods=[ - _descriptor.MethodDescriptor( - name='Reconnect', - full_name='gnmi.Collector.Reconnect', - index=0, - containing_service=None, - input_type=_RECONNECTREQUEST, - output_type=_NIL, - options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_COLLECTOR) - -DESCRIPTOR.services_by_name['Collector'] = _COLLECTOR +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fproto/collector/collector.proto\x12\x04gnmi\"\"\n\x10ReconnectRequest\x12\x0e\n\x06target\x18\x01 \x03(\t\"\x05\n\x03Nil2=\n\tCollector\x12\x30\n\tReconnect\x12\x16.gnmi.ReconnectRequest\x1a\t.gnmi.Nil\"\x00\x42\x31Z/github.com/openconfig/gnmi/proto/collector;gnmib\x06proto3') +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.collector.collector_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'Z/github.com/openconfig/gnmi/proto/collector;gnmi' + _globals['_RECONNECTREQUEST']._serialized_start=41 + _globals['_RECONNECTREQUEST']._serialized_end=75 + _globals['_NIL']._serialized_start=77 + _globals['_NIL']._serialized_end=82 + _globals['_COLLECTOR']._serialized_start=84 + _globals['_COLLECTOR']._serialized_end=145 # @@protoc_insertion_point(module_scope) diff --git a/proto/collector/collector_pb2_grpc.py b/proto/collector/collector_pb2_grpc.py index f623a4e..b1f303e 100644 --- a/proto/collector/collector_pb2_grpc.py +++ b/proto/collector/collector_pb2_grpc.py @@ -1,47 +1,99 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings from proto.collector import collector_pb2 as proto_dot_collector_dot_collector__pb2 +GRPC_GENERATED_VERSION = '1.66.2' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in proto/collector/collector_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + class CollectorStub(object): - # missing associated documentation comment in .proto file - pass + """Missing associated documentation comment in .proto file.""" - def __init__(self, channel): - """Constructor. + def __init__(self, channel): + """Constructor. - Args: - channel: A grpc.Channel. - """ - self.Reconnect = channel.unary_unary( - '/gnmi.Collector/Reconnect', - request_serializer=proto_dot_collector_dot_collector__pb2.ReconnectRequest.SerializeToString, - response_deserializer=proto_dot_collector_dot_collector__pb2.Nil.FromString, - ) + Args: + channel: A grpc.Channel. + """ + self.Reconnect = channel.unary_unary( + '/gnmi.Collector/Reconnect', + request_serializer=proto_dot_collector_dot_collector__pb2.ReconnectRequest.SerializeToString, + response_deserializer=proto_dot_collector_dot_collector__pb2.Nil.FromString, + _registered_method=True) class CollectorServicer(object): - # missing associated documentation comment in .proto file - pass + """Missing associated documentation comment in .proto file.""" - def Reconnect(self, request, context): - """Reconnect requests that the existing connections for one or more specified - targets will be stopped and new connections established. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + def Reconnect(self, request, context): + """Reconnect requests that the existing connections for one or more specified + targets will be stopped and new connections established. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_CollectorServicer_to_server(servicer, server): - rpc_method_handlers = { - 'Reconnect': grpc.unary_unary_rpc_method_handler( - servicer.Reconnect, - request_deserializer=proto_dot_collector_dot_collector__pb2.ReconnectRequest.FromString, - response_serializer=proto_dot_collector_dot_collector__pb2.Nil.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'gnmi.Collector', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) + rpc_method_handlers = { + 'Reconnect': grpc.unary_unary_rpc_method_handler( + servicer.Reconnect, + request_deserializer=proto_dot_collector_dot_collector__pb2.ReconnectRequest.FromString, + response_serializer=proto_dot_collector_dot_collector__pb2.Nil.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'gnmi.Collector', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('gnmi.Collector', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class Collector(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Reconnect(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/gnmi.Collector/Reconnect', + proto_dot_collector_dot_collector__pb2.ReconnectRequest.SerializeToString, + proto_dot_collector_dot_collector__pb2.Nil.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/proto/gnmi/gnmi.pb.go b/proto/gnmi/gnmi.pb.go index e9e67c8..22e43c0 100644 --- a/proto/gnmi/gnmi.pb.go +++ b/proto/gnmi/gnmi.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.0 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: proto/gnmi/gnmi.proto // Package gNMI defines a service specification for the gRPC Network Management diff --git a/proto/gnmi/gnmi_grpc.pb.go b/proto/gnmi/gnmi_grpc.pb.go index b597cad..7a3d1ac 100644 --- a/proto/gnmi/gnmi_grpc.pb.go +++ b/proto/gnmi/gnmi_grpc.pb.go @@ -11,7 +11,6 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // GNMIClient is the client API for GNMI service. @@ -80,7 +79,7 @@ func (c *gNMIClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallO } func (c *gNMIClient) Subscribe(ctx context.Context, opts ...grpc.CallOption) (GNMI_SubscribeClient, error) { - stream, err := c.cc.NewStream(ctx, &GNMI_ServiceDesc.Streams[0], "/gnmi.gNMI/Subscribe", opts...) + stream, err := c.cc.NewStream(ctx, &_GNMI_serviceDesc.Streams[0], "/gnmi.gNMI/Subscribe", opts...) if err != nil { return nil, err } @@ -164,8 +163,8 @@ type UnsafeGNMIServer interface { mustEmbedUnimplementedGNMIServer() } -func RegisterGNMIServer(s grpc.ServiceRegistrar, srv GNMIServer) { - s.RegisterService(&GNMI_ServiceDesc, srv) +func RegisterGNMIServer(s *grpc.Server, srv GNMIServer) { + s.RegisterService(&_GNMI_serviceDesc, srv) } func _GNMI_Capabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -248,10 +247,7 @@ func (x *gNMISubscribeServer) Recv() (*SubscribeRequest, error) { return m, nil } -// GNMI_ServiceDesc is the grpc.ServiceDesc for GNMI service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var GNMI_ServiceDesc = grpc.ServiceDesc{ +var _GNMI_serviceDesc = grpc.ServiceDesc{ ServiceName: "gnmi.gNMI", HandlerType: (*GNMIServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/proto/gnmi/gnmi_pb2.py b/proto/gnmi/gnmi_pb2.py index 7fbf5be..518c800 100644 --- a/proto/gnmi/gnmi_pb2.py +++ b/proto/gnmi/gnmi_pb2.py @@ -1,14 +1,22 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: proto/gnmi/gnmi.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper +# Protobuf Python Version: 5.27.2 +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'proto/gnmi/gnmi.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,1806 +27,98 @@ from github.com.openconfig.gnmi.proto.gnmi_ext import gnmi_ext_pb2 as github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi__ext_dot_gnmi__ext__pb2 -DESCRIPTOR = _descriptor.FileDescriptor( - name='proto/gnmi/gnmi.proto', - package='gnmi', - syntax='proto3', - serialized_pb=_b('\n\x15proto/gnmi/gnmi.proto\x12\x04gnmi\x1a\x19google/protobuf/any.proto\x1a google/protobuf/descriptor.proto\x1a\x38github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto\"\x94\x01\n\x0cNotification\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\x1a\n\x06prefix\x18\x02 \x01(\x0b\x32\n.gnmi.Path\x12\x1c\n\x06update\x18\x04 \x03(\x0b\x32\x0c.gnmi.Update\x12\x1a\n\x06\x64\x65lete\x18\x05 \x03(\x0b\x32\n.gnmi.Path\x12\x0e\n\x06\x61tomic\x18\x06 \x01(\x08J\x04\x08\x03\x10\x04R\x05\x61lias\"u\n\x06Update\x12\x18\n\x04path\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0b.gnmi.ValueB\x02\x18\x01\x12\x1d\n\x03val\x18\x03 \x01(\x0b\x32\x10.gnmi.TypedValue\x12\x12\n\nduplicates\x18\x04 \x01(\r\"\x83\x03\n\nTypedValue\x12\x14\n\nstring_val\x18\x01 \x01(\tH\x00\x12\x11\n\x07int_val\x18\x02 \x01(\x03H\x00\x12\x12\n\x08uint_val\x18\x03 \x01(\x04H\x00\x12\x12\n\x08\x62ool_val\x18\x04 \x01(\x08H\x00\x12\x13\n\tbytes_val\x18\x05 \x01(\x0cH\x00\x12\x17\n\tfloat_val\x18\x06 \x01(\x02\x42\x02\x18\x01H\x00\x12\x14\n\ndouble_val\x18\x0e \x01(\x01H\x00\x12*\n\x0b\x64\x65\x63imal_val\x18\x07 \x01(\x0b\x32\x0f.gnmi.Decimal64B\x02\x18\x01H\x00\x12)\n\x0cleaflist_val\x18\x08 \x01(\x0b\x32\x11.gnmi.ScalarArrayH\x00\x12\'\n\x07\x61ny_val\x18\t \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x12\n\x08json_val\x18\n \x01(\x0cH\x00\x12\x17\n\rjson_ietf_val\x18\x0b \x01(\x0cH\x00\x12\x13\n\tascii_val\x18\x0c \x01(\tH\x00\x12\x15\n\x0bproto_bytes\x18\r \x01(\x0cH\x00\x42\x07\n\x05value\"Y\n\x04Path\x12\x13\n\x07\x65lement\x18\x01 \x03(\tB\x02\x18\x01\x12\x0e\n\x06origin\x18\x02 \x01(\t\x12\x1c\n\x04\x65lem\x18\x03 \x03(\x0b\x32\x0e.gnmi.PathElem\x12\x0e\n\x06target\x18\x04 \x01(\t\"j\n\x08PathElem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x03key\x18\x02 \x03(\x0b\x32\x17.gnmi.PathElem.KeyEntry\x1a*\n\x08KeyEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"8\n\x05Value\x12\r\n\x05value\x18\x01 \x01(\x0c\x12\x1c\n\x04type\x18\x02 \x01(\x0e\x32\x0e.gnmi.Encoding:\x02\x18\x01\"N\n\x05\x45rror\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\"\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x18\x01\"2\n\tDecimal64\x12\x0e\n\x06\x64igits\x18\x01 \x01(\x03\x12\x11\n\tprecision\x18\x02 \x01(\r:\x02\x18\x01\"0\n\x0bScalarArray\x12!\n\x07\x65lement\x18\x01 \x03(\x0b\x32\x10.gnmi.TypedValue\"\x9d\x01\n\x10SubscribeRequest\x12+\n\tsubscribe\x18\x01 \x01(\x0b\x32\x16.gnmi.SubscriptionListH\x00\x12\x1a\n\x04poll\x18\x03 \x01(\x0b\x32\n.gnmi.PollH\x00\x12&\n\textension\x18\x05 \x03(\x0b\x32\x13.gnmi_ext.ExtensionB\t\n\x07requestJ\x04\x08\x04\x10\x05R\x07\x61liases\"\x06\n\x04Poll\"\xa8\x01\n\x11SubscribeResponse\x12$\n\x06update\x18\x01 \x01(\x0b\x32\x12.gnmi.NotificationH\x00\x12\x17\n\rsync_response\x18\x03 \x01(\x08H\x00\x12 \n\x05\x65rror\x18\x04 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01H\x00\x12&\n\textension\x18\x05 \x03(\x0b\x32\x13.gnmi_ext.ExtensionB\n\n\x08response\"\xd5\x02\n\x10SubscriptionList\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12(\n\x0csubscription\x18\x02 \x03(\x0b\x32\x12.gnmi.Subscription\x12\x1d\n\x03qos\x18\x04 \x01(\x0b\x32\x10.gnmi.QOSMarking\x12)\n\x04mode\x18\x05 \x01(\x0e\x32\x1b.gnmi.SubscriptionList.Mode\x12\x19\n\x11\x61llow_aggregation\x18\x06 \x01(\x08\x12#\n\nuse_models\x18\x07 \x03(\x0b\x32\x0f.gnmi.ModelData\x12 \n\x08\x65ncoding\x18\x08 \x01(\x0e\x32\x0e.gnmi.Encoding\x12\x14\n\x0cupdates_only\x18\t \x01(\x08\"&\n\x04Mode\x12\n\n\x06STREAM\x10\x00\x12\x08\n\x04ONCE\x10\x01\x12\x08\n\x04POLL\x10\x02J\x04\x08\x03\x10\x04R\x0buse_aliases\"\x9f\x01\n\x0cSubscription\x12\x18\n\x04path\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12$\n\x04mode\x18\x02 \x01(\x0e\x32\x16.gnmi.SubscriptionMode\x12\x17\n\x0fsample_interval\x18\x03 \x01(\x04\x12\x1a\n\x12suppress_redundant\x18\x04 \x01(\x08\x12\x1a\n\x12heartbeat_interval\x18\x05 \x01(\x04\"\x1d\n\nQOSMarking\x12\x0f\n\x07marking\x18\x01 \x01(\r\"\xce\x01\n\nSetRequest\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x1a\n\x06\x64\x65lete\x18\x02 \x03(\x0b\x32\n.gnmi.Path\x12\x1d\n\x07replace\x18\x03 \x03(\x0b\x32\x0c.gnmi.Update\x12\x1c\n\x06update\x18\x04 \x03(\x0b\x32\x0c.gnmi.Update\x12#\n\runion_replace\x18\x06 \x03(\x0b\x32\x0c.gnmi.Update\x12&\n\textension\x18\x05 \x03(\x0b\x32\x13.gnmi_ext.Extension\"\xac\x01\n\x0bSetResponse\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12$\n\x08response\x18\x02 \x03(\x0b\x32\x12.gnmi.UpdateResult\x12 \n\x07message\x18\x03 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12\x11\n\ttimestamp\x18\x04 \x01(\x03\x12&\n\textension\x18\x05 \x03(\x0b\x32\x13.gnmi_ext.Extension\"\xdd\x01\n\x0cUpdateResult\x12\x15\n\ttimestamp\x18\x01 \x01(\x03\x42\x02\x18\x01\x12\x18\n\x04path\x18\x02 \x01(\x0b\x32\n.gnmi.Path\x12 \n\x07message\x18\x03 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12(\n\x02op\x18\x04 \x01(\x0e\x32\x1c.gnmi.UpdateResult.Operation\"P\n\tOperation\x12\x0b\n\x07INVALID\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x0b\n\x07REPLACE\x10\x02\x12\n\n\x06UPDATE\x10\x03\x12\x11\n\rUNION_REPLACE\x10\x04\"\x97\x02\n\nGetRequest\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x18\n\x04path\x18\x02 \x03(\x0b\x32\n.gnmi.Path\x12\'\n\x04type\x18\x03 \x01(\x0e\x32\x19.gnmi.GetRequest.DataType\x12 \n\x08\x65ncoding\x18\x05 \x01(\x0e\x32\x0e.gnmi.Encoding\x12#\n\nuse_models\x18\x06 \x03(\x0b\x32\x0f.gnmi.ModelData\x12&\n\textension\x18\x07 \x03(\x0b\x32\x13.gnmi_ext.Extension\";\n\x08\x44\x61taType\x12\x07\n\x03\x41LL\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\t\n\x05STATE\x10\x02\x12\x0f\n\x0bOPERATIONAL\x10\x03\"\x7f\n\x0bGetResponse\x12(\n\x0cnotification\x18\x01 \x03(\x0b\x32\x12.gnmi.Notification\x12\x1e\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12&\n\textension\x18\x03 \x03(\x0b\x32\x13.gnmi_ext.Extension\";\n\x11\x43\x61pabilityRequest\x12&\n\textension\x18\x01 \x03(\x0b\x32\x13.gnmi_ext.Extension\"\xaa\x01\n\x12\x43\x61pabilityResponse\x12)\n\x10supported_models\x18\x01 \x03(\x0b\x32\x0f.gnmi.ModelData\x12+\n\x13supported_encodings\x18\x02 \x03(\x0e\x32\x0e.gnmi.Encoding\x12\x14\n\x0cgNMI_version\x18\x03 \x01(\t\x12&\n\textension\x18\x04 \x03(\x0b\x32\x13.gnmi_ext.Extension\"@\n\tModelData\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0corganization\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t*D\n\x08\x45ncoding\x12\x08\n\x04JSON\x10\x00\x12\t\n\x05\x42YTES\x10\x01\x12\t\n\x05PROTO\x10\x02\x12\t\n\x05\x41SCII\x10\x03\x12\r\n\tJSON_IETF\x10\x04*A\n\x10SubscriptionMode\x12\x12\n\x0eTARGET_DEFINED\x10\x00\x12\r\n\tON_CHANGE\x10\x01\x12\n\n\x06SAMPLE\x10\x02\x32\xe3\x01\n\x04gNMI\x12\x41\n\x0c\x43\x61pabilities\x12\x17.gnmi.CapabilityRequest\x1a\x18.gnmi.CapabilityResponse\x12*\n\x03Get\x12\x10.gnmi.GetRequest\x1a\x11.gnmi.GetResponse\x12*\n\x03Set\x12\x10.gnmi.SetRequest\x1a\x11.gnmi.SetResponse\x12@\n\tSubscribe\x12\x16.gnmi.SubscribeRequest\x1a\x17.gnmi.SubscribeResponse(\x01\x30\x01:3\n\x0cgnmi_service\x12\x1c.google.protobuf.FileOptions\x18\xe9\x07 \x01(\tBT\n\x15\x63om.github.gnmi.protoB\tGnmiProtoP\x01Z%github.com/openconfig/gnmi/proto/gnmi\xca>\x06\x30.10.0b\x06proto3') - , - dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,google_dot_protobuf_dot_descriptor__pb2.DESCRIPTOR,github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi__ext_dot_gnmi__ext__pb2.DESCRIPTOR,]) - -_ENCODING = _descriptor.EnumDescriptor( - name='Encoding', - full_name='gnmi.Encoding', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='JSON', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='BYTES', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='PROTO', index=2, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='ASCII', index=3, number=3, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='JSON_IETF', index=4, number=4, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=3444, - serialized_end=3512, -) -_sym_db.RegisterEnumDescriptor(_ENCODING) - -Encoding = enum_type_wrapper.EnumTypeWrapper(_ENCODING) -_SUBSCRIPTIONMODE = _descriptor.EnumDescriptor( - name='SubscriptionMode', - full_name='gnmi.SubscriptionMode', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='TARGET_DEFINED', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='ON_CHANGE', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='SAMPLE', index=2, number=2, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=3514, - serialized_end=3579, -) -_sym_db.RegisterEnumDescriptor(_SUBSCRIPTIONMODE) - -SubscriptionMode = enum_type_wrapper.EnumTypeWrapper(_SUBSCRIPTIONMODE) -JSON = 0 -BYTES = 1 -PROTO = 2 -ASCII = 3 -JSON_IETF = 4 -TARGET_DEFINED = 0 -ON_CHANGE = 1 -SAMPLE = 2 - -GNMI_SERVICE_FIELD_NUMBER = 1001 -gnmi_service = _descriptor.FieldDescriptor( - name='gnmi_service', full_name='gnmi.gnmi_service', index=0, - number=1001, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=True, extension_scope=None, - options=None, file=DESCRIPTOR) - -_SUBSCRIPTIONLIST_MODE = _descriptor.EnumDescriptor( - name='Mode', - full_name='gnmi.SubscriptionList.Mode', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='STREAM', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='ONCE', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='POLL', index=2, number=2, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=1873, - serialized_end=1911, -) -_sym_db.RegisterEnumDescriptor(_SUBSCRIPTIONLIST_MODE) - -_UPDATERESULT_OPERATION = _descriptor.EnumDescriptor( - name='Operation', - full_name='gnmi.UpdateResult.Operation', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='INVALID', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DELETE', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='REPLACE', index=2, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='UPDATE', index=3, number=3, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='UNION_REPLACE', index=4, number=4, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=2651, - serialized_end=2731, -) -_sym_db.RegisterEnumDescriptor(_UPDATERESULT_OPERATION) - -_GETREQUEST_DATATYPE = _descriptor.EnumDescriptor( - name='DataType', - full_name='gnmi.GetRequest.DataType', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='ALL', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='CONFIG', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='STATE', index=2, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='OPERATIONAL', index=3, number=3, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=2954, - serialized_end=3013, -) -_sym_db.RegisterEnumDescriptor(_GETREQUEST_DATATYPE) - - -_NOTIFICATION = _descriptor.Descriptor( - name='Notification', - full_name='gnmi.Notification', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='timestamp', full_name='gnmi.Notification.timestamp', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='prefix', full_name='gnmi.Notification.prefix', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='update', full_name='gnmi.Notification.update', index=2, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delete', full_name='gnmi.Notification.delete', index=3, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='atomic', full_name='gnmi.Notification.atomic', index=4, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=151, - serialized_end=299, -) - - -_UPDATE = _descriptor.Descriptor( - name='Update', - full_name='gnmi.Update', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='path', full_name='gnmi.Update.path', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='gnmi.Update.value', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='val', full_name='gnmi.Update.val', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='duplicates', full_name='gnmi.Update.duplicates', index=3, - number=4, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=301, - serialized_end=418, -) - - -_TYPEDVALUE = _descriptor.Descriptor( - name='TypedValue', - full_name='gnmi.TypedValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='string_val', full_name='gnmi.TypedValue.string_val', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='int_val', full_name='gnmi.TypedValue.int_val', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='uint_val', full_name='gnmi.TypedValue.uint_val', index=2, - number=3, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='bool_val', full_name='gnmi.TypedValue.bool_val', index=3, - number=4, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='bytes_val', full_name='gnmi.TypedValue.bytes_val', index=4, - number=5, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='float_val', full_name='gnmi.TypedValue.float_val', index=5, - number=6, type=2, cpp_type=6, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='double_val', full_name='gnmi.TypedValue.double_val', index=6, - number=14, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='decimal_val', full_name='gnmi.TypedValue.decimal_val', index=7, - number=7, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='leaflist_val', full_name='gnmi.TypedValue.leaflist_val', index=8, - number=8, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='any_val', full_name='gnmi.TypedValue.any_val', index=9, - number=9, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='json_val', full_name='gnmi.TypedValue.json_val', index=10, - number=10, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='json_ietf_val', full_name='gnmi.TypedValue.json_ietf_val', index=11, - number=11, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ascii_val', full_name='gnmi.TypedValue.ascii_val', index=12, - number=12, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='proto_bytes', full_name='gnmi.TypedValue.proto_bytes', index=13, - number=13, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='value', full_name='gnmi.TypedValue.value', - index=0, containing_type=None, fields=[]), - ], - serialized_start=421, - serialized_end=808, -) - - -_PATH = _descriptor.Descriptor( - name='Path', - full_name='gnmi.Path', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='element', full_name='gnmi.Path.element', index=0, - number=1, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='origin', full_name='gnmi.Path.origin', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='elem', full_name='gnmi.Path.elem', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='target', full_name='gnmi.Path.target', index=3, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=810, - serialized_end=899, -) - - -_PATHELEM_KEYENTRY = _descriptor.Descriptor( - name='KeyEntry', - full_name='gnmi.PathElem.KeyEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='gnmi.PathElem.KeyEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='gnmi.PathElem.KeyEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=965, - serialized_end=1007, -) - -_PATHELEM = _descriptor.Descriptor( - name='PathElem', - full_name='gnmi.PathElem', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='gnmi.PathElem.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='key', full_name='gnmi.PathElem.key', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_PATHELEM_KEYENTRY, ], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=901, - serialized_end=1007, -) - - -_VALUE = _descriptor.Descriptor( - name='Value', - full_name='gnmi.Value', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='gnmi.Value.value', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='type', full_name='gnmi.Value.type', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\030\001')), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1009, - serialized_end=1065, -) - - -_ERROR = _descriptor.Descriptor( - name='Error', - full_name='gnmi.Error', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='code', full_name='gnmi.Error.code', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='message', full_name='gnmi.Error.message', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='data', full_name='gnmi.Error.data', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\030\001')), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1067, - serialized_end=1145, -) - - -_DECIMAL64 = _descriptor.Descriptor( - name='Decimal64', - full_name='gnmi.Decimal64', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='digits', full_name='gnmi.Decimal64.digits', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='precision', full_name='gnmi.Decimal64.precision', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\030\001')), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1147, - serialized_end=1197, -) - - -_SCALARARRAY = _descriptor.Descriptor( - name='ScalarArray', - full_name='gnmi.ScalarArray', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='element', full_name='gnmi.ScalarArray.element', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1199, - serialized_end=1247, -) - - -_SUBSCRIBEREQUEST = _descriptor.Descriptor( - name='SubscribeRequest', - full_name='gnmi.SubscribeRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='subscribe', full_name='gnmi.SubscribeRequest.subscribe', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='poll', full_name='gnmi.SubscribeRequest.poll', index=1, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='extension', full_name='gnmi.SubscribeRequest.extension', index=2, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='request', full_name='gnmi.SubscribeRequest.request', - index=0, containing_type=None, fields=[]), - ], - serialized_start=1250, - serialized_end=1407, -) - - -_POLL = _descriptor.Descriptor( - name='Poll', - full_name='gnmi.Poll', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1409, - serialized_end=1415, -) - - -_SUBSCRIBERESPONSE = _descriptor.Descriptor( - name='SubscribeResponse', - full_name='gnmi.SubscribeResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='update', full_name='gnmi.SubscribeResponse.update', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sync_response', full_name='gnmi.SubscribeResponse.sync_response', index=1, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='error', full_name='gnmi.SubscribeResponse.error', index=2, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='extension', full_name='gnmi.SubscribeResponse.extension', index=3, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='response', full_name='gnmi.SubscribeResponse.response', - index=0, containing_type=None, fields=[]), - ], - serialized_start=1418, - serialized_end=1586, -) - - -_SUBSCRIPTIONLIST = _descriptor.Descriptor( - name='SubscriptionList', - full_name='gnmi.SubscriptionList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='prefix', full_name='gnmi.SubscriptionList.prefix', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='subscription', full_name='gnmi.SubscriptionList.subscription', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='qos', full_name='gnmi.SubscriptionList.qos', index=2, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='mode', full_name='gnmi.SubscriptionList.mode', index=3, - number=5, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='allow_aggregation', full_name='gnmi.SubscriptionList.allow_aggregation', index=4, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='use_models', full_name='gnmi.SubscriptionList.use_models', index=5, - number=7, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='encoding', full_name='gnmi.SubscriptionList.encoding', index=6, - number=8, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='updates_only', full_name='gnmi.SubscriptionList.updates_only', index=7, - number=9, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _SUBSCRIPTIONLIST_MODE, - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1589, - serialized_end=1930, -) - - -_SUBSCRIPTION = _descriptor.Descriptor( - name='Subscription', - full_name='gnmi.Subscription', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='path', full_name='gnmi.Subscription.path', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='mode', full_name='gnmi.Subscription.mode', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sample_interval', full_name='gnmi.Subscription.sample_interval', index=2, - number=3, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='suppress_redundant', full_name='gnmi.Subscription.suppress_redundant', index=3, - number=4, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='heartbeat_interval', full_name='gnmi.Subscription.heartbeat_interval', index=4, - number=5, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1933, - serialized_end=2092, -) - - -_QOSMARKING = _descriptor.Descriptor( - name='QOSMarking', - full_name='gnmi.QOSMarking', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='marking', full_name='gnmi.QOSMarking.marking', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2094, - serialized_end=2123, -) - - -_SETREQUEST = _descriptor.Descriptor( - name='SetRequest', - full_name='gnmi.SetRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='prefix', full_name='gnmi.SetRequest.prefix', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delete', full_name='gnmi.SetRequest.delete', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='replace', full_name='gnmi.SetRequest.replace', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='update', full_name='gnmi.SetRequest.update', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='union_replace', full_name='gnmi.SetRequest.union_replace', index=4, - number=6, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='extension', full_name='gnmi.SetRequest.extension', index=5, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2126, - serialized_end=2332, -) - - -_SETRESPONSE = _descriptor.Descriptor( - name='SetResponse', - full_name='gnmi.SetResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='prefix', full_name='gnmi.SetResponse.prefix', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='response', full_name='gnmi.SetResponse.response', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='message', full_name='gnmi.SetResponse.message', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='timestamp', full_name='gnmi.SetResponse.timestamp', index=3, - number=4, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='extension', full_name='gnmi.SetResponse.extension', index=4, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2335, - serialized_end=2507, -) - - -_UPDATERESULT = _descriptor.Descriptor( - name='UpdateResult', - full_name='gnmi.UpdateResult', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='timestamp', full_name='gnmi.UpdateResult.timestamp', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='path', full_name='gnmi.UpdateResult.path', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='message', full_name='gnmi.UpdateResult.message', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='op', full_name='gnmi.UpdateResult.op', index=3, - number=4, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _UPDATERESULT_OPERATION, - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2510, - serialized_end=2731, -) - - -_GETREQUEST = _descriptor.Descriptor( - name='GetRequest', - full_name='gnmi.GetRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='prefix', full_name='gnmi.GetRequest.prefix', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='path', full_name='gnmi.GetRequest.path', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='type', full_name='gnmi.GetRequest.type', index=2, - number=3, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='encoding', full_name='gnmi.GetRequest.encoding', index=3, - number=5, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='use_models', full_name='gnmi.GetRequest.use_models', index=4, - number=6, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='extension', full_name='gnmi.GetRequest.extension', index=5, - number=7, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _GETREQUEST_DATATYPE, - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2734, - serialized_end=3013, -) - - -_GETRESPONSE = _descriptor.Descriptor( - name='GetResponse', - full_name='gnmi.GetResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='notification', full_name='gnmi.GetResponse.notification', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='error', full_name='gnmi.GetResponse.error', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='extension', full_name='gnmi.GetResponse.extension', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3015, - serialized_end=3142, -) - - -_CAPABILITYREQUEST = _descriptor.Descriptor( - name='CapabilityRequest', - full_name='gnmi.CapabilityRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='extension', full_name='gnmi.CapabilityRequest.extension', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3144, - serialized_end=3203, -) - - -_CAPABILITYRESPONSE = _descriptor.Descriptor( - name='CapabilityResponse', - full_name='gnmi.CapabilityResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='supported_models', full_name='gnmi.CapabilityResponse.supported_models', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='supported_encodings', full_name='gnmi.CapabilityResponse.supported_encodings', index=1, - number=2, type=14, cpp_type=8, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='gNMI_version', full_name='gnmi.CapabilityResponse.gNMI_version', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='extension', full_name='gnmi.CapabilityResponse.extension', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3206, - serialized_end=3376, -) - - -_MODELDATA = _descriptor.Descriptor( - name='ModelData', - full_name='gnmi.ModelData', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='gnmi.ModelData.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='organization', full_name='gnmi.ModelData.organization', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='version', full_name='gnmi.ModelData.version', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3378, - serialized_end=3442, -) - -_NOTIFICATION.fields_by_name['prefix'].message_type = _PATH -_NOTIFICATION.fields_by_name['update'].message_type = _UPDATE -_NOTIFICATION.fields_by_name['delete'].message_type = _PATH -_UPDATE.fields_by_name['path'].message_type = _PATH -_UPDATE.fields_by_name['value'].message_type = _VALUE -_UPDATE.fields_by_name['val'].message_type = _TYPEDVALUE -_TYPEDVALUE.fields_by_name['decimal_val'].message_type = _DECIMAL64 -_TYPEDVALUE.fields_by_name['leaflist_val'].message_type = _SCALARARRAY -_TYPEDVALUE.fields_by_name['any_val'].message_type = google_dot_protobuf_dot_any__pb2._ANY -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['string_val']) -_TYPEDVALUE.fields_by_name['string_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['int_val']) -_TYPEDVALUE.fields_by_name['int_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['uint_val']) -_TYPEDVALUE.fields_by_name['uint_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['bool_val']) -_TYPEDVALUE.fields_by_name['bool_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['bytes_val']) -_TYPEDVALUE.fields_by_name['bytes_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['float_val']) -_TYPEDVALUE.fields_by_name['float_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['double_val']) -_TYPEDVALUE.fields_by_name['double_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['decimal_val']) -_TYPEDVALUE.fields_by_name['decimal_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['leaflist_val']) -_TYPEDVALUE.fields_by_name['leaflist_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['any_val']) -_TYPEDVALUE.fields_by_name['any_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['json_val']) -_TYPEDVALUE.fields_by_name['json_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['json_ietf_val']) -_TYPEDVALUE.fields_by_name['json_ietf_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['ascii_val']) -_TYPEDVALUE.fields_by_name['ascii_val'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_TYPEDVALUE.oneofs_by_name['value'].fields.append( - _TYPEDVALUE.fields_by_name['proto_bytes']) -_TYPEDVALUE.fields_by_name['proto_bytes'].containing_oneof = _TYPEDVALUE.oneofs_by_name['value'] -_PATH.fields_by_name['elem'].message_type = _PATHELEM -_PATHELEM_KEYENTRY.containing_type = _PATHELEM -_PATHELEM.fields_by_name['key'].message_type = _PATHELEM_KEYENTRY -_VALUE.fields_by_name['type'].enum_type = _ENCODING -_ERROR.fields_by_name['data'].message_type = google_dot_protobuf_dot_any__pb2._ANY -_SCALARARRAY.fields_by_name['element'].message_type = _TYPEDVALUE -_SUBSCRIBEREQUEST.fields_by_name['subscribe'].message_type = _SUBSCRIPTIONLIST -_SUBSCRIBEREQUEST.fields_by_name['poll'].message_type = _POLL -_SUBSCRIBEREQUEST.fields_by_name['extension'].message_type = github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi__ext_dot_gnmi__ext__pb2._EXTENSION -_SUBSCRIBEREQUEST.oneofs_by_name['request'].fields.append( - _SUBSCRIBEREQUEST.fields_by_name['subscribe']) -_SUBSCRIBEREQUEST.fields_by_name['subscribe'].containing_oneof = _SUBSCRIBEREQUEST.oneofs_by_name['request'] -_SUBSCRIBEREQUEST.oneofs_by_name['request'].fields.append( - _SUBSCRIBEREQUEST.fields_by_name['poll']) -_SUBSCRIBEREQUEST.fields_by_name['poll'].containing_oneof = _SUBSCRIBEREQUEST.oneofs_by_name['request'] -_SUBSCRIBERESPONSE.fields_by_name['update'].message_type = _NOTIFICATION -_SUBSCRIBERESPONSE.fields_by_name['error'].message_type = _ERROR -_SUBSCRIBERESPONSE.fields_by_name['extension'].message_type = github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi__ext_dot_gnmi__ext__pb2._EXTENSION -_SUBSCRIBERESPONSE.oneofs_by_name['response'].fields.append( - _SUBSCRIBERESPONSE.fields_by_name['update']) -_SUBSCRIBERESPONSE.fields_by_name['update'].containing_oneof = _SUBSCRIBERESPONSE.oneofs_by_name['response'] -_SUBSCRIBERESPONSE.oneofs_by_name['response'].fields.append( - _SUBSCRIBERESPONSE.fields_by_name['sync_response']) -_SUBSCRIBERESPONSE.fields_by_name['sync_response'].containing_oneof = _SUBSCRIBERESPONSE.oneofs_by_name['response'] -_SUBSCRIBERESPONSE.oneofs_by_name['response'].fields.append( - _SUBSCRIBERESPONSE.fields_by_name['error']) -_SUBSCRIBERESPONSE.fields_by_name['error'].containing_oneof = _SUBSCRIBERESPONSE.oneofs_by_name['response'] -_SUBSCRIPTIONLIST.fields_by_name['prefix'].message_type = _PATH -_SUBSCRIPTIONLIST.fields_by_name['subscription'].message_type = _SUBSCRIPTION -_SUBSCRIPTIONLIST.fields_by_name['qos'].message_type = _QOSMARKING -_SUBSCRIPTIONLIST.fields_by_name['mode'].enum_type = _SUBSCRIPTIONLIST_MODE -_SUBSCRIPTIONLIST.fields_by_name['use_models'].message_type = _MODELDATA -_SUBSCRIPTIONLIST.fields_by_name['encoding'].enum_type = _ENCODING -_SUBSCRIPTIONLIST_MODE.containing_type = _SUBSCRIPTIONLIST -_SUBSCRIPTION.fields_by_name['path'].message_type = _PATH -_SUBSCRIPTION.fields_by_name['mode'].enum_type = _SUBSCRIPTIONMODE -_SETREQUEST.fields_by_name['prefix'].message_type = _PATH -_SETREQUEST.fields_by_name['delete'].message_type = _PATH -_SETREQUEST.fields_by_name['replace'].message_type = _UPDATE -_SETREQUEST.fields_by_name['update'].message_type = _UPDATE -_SETREQUEST.fields_by_name['union_replace'].message_type = _UPDATE -_SETREQUEST.fields_by_name['extension'].message_type = github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi__ext_dot_gnmi__ext__pb2._EXTENSION -_SETRESPONSE.fields_by_name['prefix'].message_type = _PATH -_SETRESPONSE.fields_by_name['response'].message_type = _UPDATERESULT -_SETRESPONSE.fields_by_name['message'].message_type = _ERROR -_SETRESPONSE.fields_by_name['extension'].message_type = github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi__ext_dot_gnmi__ext__pb2._EXTENSION -_UPDATERESULT.fields_by_name['path'].message_type = _PATH -_UPDATERESULT.fields_by_name['message'].message_type = _ERROR -_UPDATERESULT.fields_by_name['op'].enum_type = _UPDATERESULT_OPERATION -_UPDATERESULT_OPERATION.containing_type = _UPDATERESULT -_GETREQUEST.fields_by_name['prefix'].message_type = _PATH -_GETREQUEST.fields_by_name['path'].message_type = _PATH -_GETREQUEST.fields_by_name['type'].enum_type = _GETREQUEST_DATATYPE -_GETREQUEST.fields_by_name['encoding'].enum_type = _ENCODING -_GETREQUEST.fields_by_name['use_models'].message_type = _MODELDATA -_GETREQUEST.fields_by_name['extension'].message_type = github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi__ext_dot_gnmi__ext__pb2._EXTENSION -_GETREQUEST_DATATYPE.containing_type = _GETREQUEST -_GETRESPONSE.fields_by_name['notification'].message_type = _NOTIFICATION -_GETRESPONSE.fields_by_name['error'].message_type = _ERROR -_GETRESPONSE.fields_by_name['extension'].message_type = github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi__ext_dot_gnmi__ext__pb2._EXTENSION -_CAPABILITYREQUEST.fields_by_name['extension'].message_type = github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi__ext_dot_gnmi__ext__pb2._EXTENSION -_CAPABILITYRESPONSE.fields_by_name['supported_models'].message_type = _MODELDATA -_CAPABILITYRESPONSE.fields_by_name['supported_encodings'].enum_type = _ENCODING -_CAPABILITYRESPONSE.fields_by_name['extension'].message_type = github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi__ext_dot_gnmi__ext__pb2._EXTENSION -DESCRIPTOR.message_types_by_name['Notification'] = _NOTIFICATION -DESCRIPTOR.message_types_by_name['Update'] = _UPDATE -DESCRIPTOR.message_types_by_name['TypedValue'] = _TYPEDVALUE -DESCRIPTOR.message_types_by_name['Path'] = _PATH -DESCRIPTOR.message_types_by_name['PathElem'] = _PATHELEM -DESCRIPTOR.message_types_by_name['Value'] = _VALUE -DESCRIPTOR.message_types_by_name['Error'] = _ERROR -DESCRIPTOR.message_types_by_name['Decimal64'] = _DECIMAL64 -DESCRIPTOR.message_types_by_name['ScalarArray'] = _SCALARARRAY -DESCRIPTOR.message_types_by_name['SubscribeRequest'] = _SUBSCRIBEREQUEST -DESCRIPTOR.message_types_by_name['Poll'] = _POLL -DESCRIPTOR.message_types_by_name['SubscribeResponse'] = _SUBSCRIBERESPONSE -DESCRIPTOR.message_types_by_name['SubscriptionList'] = _SUBSCRIPTIONLIST -DESCRIPTOR.message_types_by_name['Subscription'] = _SUBSCRIPTION -DESCRIPTOR.message_types_by_name['QOSMarking'] = _QOSMARKING -DESCRIPTOR.message_types_by_name['SetRequest'] = _SETREQUEST -DESCRIPTOR.message_types_by_name['SetResponse'] = _SETRESPONSE -DESCRIPTOR.message_types_by_name['UpdateResult'] = _UPDATERESULT -DESCRIPTOR.message_types_by_name['GetRequest'] = _GETREQUEST -DESCRIPTOR.message_types_by_name['GetResponse'] = _GETRESPONSE -DESCRIPTOR.message_types_by_name['CapabilityRequest'] = _CAPABILITYREQUEST -DESCRIPTOR.message_types_by_name['CapabilityResponse'] = _CAPABILITYRESPONSE -DESCRIPTOR.message_types_by_name['ModelData'] = _MODELDATA -DESCRIPTOR.enum_types_by_name['Encoding'] = _ENCODING -DESCRIPTOR.enum_types_by_name['SubscriptionMode'] = _SUBSCRIPTIONMODE -DESCRIPTOR.extensions_by_name['gnmi_service'] = gnmi_service -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Notification = _reflection.GeneratedProtocolMessageType('Notification', (_message.Message,), dict( - DESCRIPTOR = _NOTIFICATION, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Notification) - )) -_sym_db.RegisterMessage(Notification) - -Update = _reflection.GeneratedProtocolMessageType('Update', (_message.Message,), dict( - DESCRIPTOR = _UPDATE, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Update) - )) -_sym_db.RegisterMessage(Update) - -TypedValue = _reflection.GeneratedProtocolMessageType('TypedValue', (_message.Message,), dict( - DESCRIPTOR = _TYPEDVALUE, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.TypedValue) - )) -_sym_db.RegisterMessage(TypedValue) - -Path = _reflection.GeneratedProtocolMessageType('Path', (_message.Message,), dict( - DESCRIPTOR = _PATH, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Path) - )) -_sym_db.RegisterMessage(Path) - -PathElem = _reflection.GeneratedProtocolMessageType('PathElem', (_message.Message,), dict( - - KeyEntry = _reflection.GeneratedProtocolMessageType('KeyEntry', (_message.Message,), dict( - DESCRIPTOR = _PATHELEM_KEYENTRY, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.PathElem.KeyEntry) - )) - , - DESCRIPTOR = _PATHELEM, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.PathElem) - )) -_sym_db.RegisterMessage(PathElem) -_sym_db.RegisterMessage(PathElem.KeyEntry) - -Value = _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), dict( - DESCRIPTOR = _VALUE, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Value) - )) -_sym_db.RegisterMessage(Value) - -Error = _reflection.GeneratedProtocolMessageType('Error', (_message.Message,), dict( - DESCRIPTOR = _ERROR, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Error) - )) -_sym_db.RegisterMessage(Error) - -Decimal64 = _reflection.GeneratedProtocolMessageType('Decimal64', (_message.Message,), dict( - DESCRIPTOR = _DECIMAL64, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Decimal64) - )) -_sym_db.RegisterMessage(Decimal64) - -ScalarArray = _reflection.GeneratedProtocolMessageType('ScalarArray', (_message.Message,), dict( - DESCRIPTOR = _SCALARARRAY, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.ScalarArray) - )) -_sym_db.RegisterMessage(ScalarArray) - -SubscribeRequest = _reflection.GeneratedProtocolMessageType('SubscribeRequest', (_message.Message,), dict( - DESCRIPTOR = _SUBSCRIBEREQUEST, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SubscribeRequest) - )) -_sym_db.RegisterMessage(SubscribeRequest) - -Poll = _reflection.GeneratedProtocolMessageType('Poll', (_message.Message,), dict( - DESCRIPTOR = _POLL, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Poll) - )) -_sym_db.RegisterMessage(Poll) - -SubscribeResponse = _reflection.GeneratedProtocolMessageType('SubscribeResponse', (_message.Message,), dict( - DESCRIPTOR = _SUBSCRIBERESPONSE, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SubscribeResponse) - )) -_sym_db.RegisterMessage(SubscribeResponse) - -SubscriptionList = _reflection.GeneratedProtocolMessageType('SubscriptionList', (_message.Message,), dict( - DESCRIPTOR = _SUBSCRIPTIONLIST, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SubscriptionList) - )) -_sym_db.RegisterMessage(SubscriptionList) - -Subscription = _reflection.GeneratedProtocolMessageType('Subscription', (_message.Message,), dict( - DESCRIPTOR = _SUBSCRIPTION, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Subscription) - )) -_sym_db.RegisterMessage(Subscription) - -QOSMarking = _reflection.GeneratedProtocolMessageType('QOSMarking', (_message.Message,), dict( - DESCRIPTOR = _QOSMARKING, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.QOSMarking) - )) -_sym_db.RegisterMessage(QOSMarking) - -SetRequest = _reflection.GeneratedProtocolMessageType('SetRequest', (_message.Message,), dict( - DESCRIPTOR = _SETREQUEST, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SetRequest) - )) -_sym_db.RegisterMessage(SetRequest) - -SetResponse = _reflection.GeneratedProtocolMessageType('SetResponse', (_message.Message,), dict( - DESCRIPTOR = _SETRESPONSE, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SetResponse) - )) -_sym_db.RegisterMessage(SetResponse) - -UpdateResult = _reflection.GeneratedProtocolMessageType('UpdateResult', (_message.Message,), dict( - DESCRIPTOR = _UPDATERESULT, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.UpdateResult) - )) -_sym_db.RegisterMessage(UpdateResult) - -GetRequest = _reflection.GeneratedProtocolMessageType('GetRequest', (_message.Message,), dict( - DESCRIPTOR = _GETREQUEST, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.GetRequest) - )) -_sym_db.RegisterMessage(GetRequest) - -GetResponse = _reflection.GeneratedProtocolMessageType('GetResponse', (_message.Message,), dict( - DESCRIPTOR = _GETRESPONSE, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.GetResponse) - )) -_sym_db.RegisterMessage(GetResponse) - -CapabilityRequest = _reflection.GeneratedProtocolMessageType('CapabilityRequest', (_message.Message,), dict( - DESCRIPTOR = _CAPABILITYREQUEST, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.CapabilityRequest) - )) -_sym_db.RegisterMessage(CapabilityRequest) - -CapabilityResponse = _reflection.GeneratedProtocolMessageType('CapabilityResponse', (_message.Message,), dict( - DESCRIPTOR = _CAPABILITYRESPONSE, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.CapabilityResponse) - )) -_sym_db.RegisterMessage(CapabilityResponse) - -ModelData = _reflection.GeneratedProtocolMessageType('ModelData', (_message.Message,), dict( - DESCRIPTOR = _MODELDATA, - __module__ = 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.ModelData) - )) -_sym_db.RegisterMessage(ModelData) - -google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(gnmi_service) - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\025com.github.gnmi.protoB\tGnmiProtoP\001Z%github.com/openconfig/gnmi/proto/gnmi\312>\0060.10.0')) -_UPDATE.fields_by_name['value'].has_options = True -_UPDATE.fields_by_name['value']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) -_TYPEDVALUE.fields_by_name['float_val'].has_options = True -_TYPEDVALUE.fields_by_name['float_val']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) -_TYPEDVALUE.fields_by_name['decimal_val'].has_options = True -_TYPEDVALUE.fields_by_name['decimal_val']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) -_PATH.fields_by_name['element'].has_options = True -_PATH.fields_by_name['element']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) -_PATHELEM_KEYENTRY.has_options = True -_PATHELEM_KEYENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -_VALUE.has_options = True -_VALUE._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\030\001')) -_ERROR.has_options = True -_ERROR._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\030\001')) -_DECIMAL64.has_options = True -_DECIMAL64._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('\030\001')) -_SUBSCRIBERESPONSE.fields_by_name['error'].has_options = True -_SUBSCRIBERESPONSE.fields_by_name['error']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) -_SETRESPONSE.fields_by_name['message'].has_options = True -_SETRESPONSE.fields_by_name['message']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) -_UPDATERESULT.fields_by_name['timestamp'].has_options = True -_UPDATERESULT.fields_by_name['timestamp']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) -_UPDATERESULT.fields_by_name['message'].has_options = True -_UPDATERESULT.fields_by_name['message']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) -_GETRESPONSE.fields_by_name['error'].has_options = True -_GETRESPONSE.fields_by_name['error']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) - -_GNMI = _descriptor.ServiceDescriptor( - name='gNMI', - full_name='gnmi.gNMI', - file=DESCRIPTOR, - index=0, - options=None, - serialized_start=3582, - serialized_end=3809, - methods=[ - _descriptor.MethodDescriptor( - name='Capabilities', - full_name='gnmi.gNMI.Capabilities', - index=0, - containing_service=None, - input_type=_CAPABILITYREQUEST, - output_type=_CAPABILITYRESPONSE, - options=None, - ), - _descriptor.MethodDescriptor( - name='Get', - full_name='gnmi.gNMI.Get', - index=1, - containing_service=None, - input_type=_GETREQUEST, - output_type=_GETRESPONSE, - options=None, - ), - _descriptor.MethodDescriptor( - name='Set', - full_name='gnmi.gNMI.Set', - index=2, - containing_service=None, - input_type=_SETREQUEST, - output_type=_SETRESPONSE, - options=None, - ), - _descriptor.MethodDescriptor( - name='Subscribe', - full_name='gnmi.gNMI.Subscribe', - index=3, - containing_service=None, - input_type=_SUBSCRIBEREQUEST, - output_type=_SUBSCRIBERESPONSE, - options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_GNMI) - -DESCRIPTOR.services_by_name['gNMI'] = _GNMI - +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15proto/gnmi/gnmi.proto\x12\x04gnmi\x1a\x19google/protobuf/any.proto\x1a google/protobuf/descriptor.proto\x1a\x38github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto\"\x94\x01\n\x0cNotification\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\x1a\n\x06prefix\x18\x02 \x01(\x0b\x32\n.gnmi.Path\x12\x1c\n\x06update\x18\x04 \x03(\x0b\x32\x0c.gnmi.Update\x12\x1a\n\x06\x64\x65lete\x18\x05 \x03(\x0b\x32\n.gnmi.Path\x12\x0e\n\x06\x61tomic\x18\x06 \x01(\x08J\x04\x08\x03\x10\x04R\x05\x61lias\"u\n\x06Update\x12\x18\n\x04path\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0b.gnmi.ValueB\x02\x18\x01\x12\x1d\n\x03val\x18\x03 \x01(\x0b\x32\x10.gnmi.TypedValue\x12\x12\n\nduplicates\x18\x04 \x01(\r\"\x83\x03\n\nTypedValue\x12\x14\n\nstring_val\x18\x01 \x01(\tH\x00\x12\x11\n\x07int_val\x18\x02 \x01(\x03H\x00\x12\x12\n\x08uint_val\x18\x03 \x01(\x04H\x00\x12\x12\n\x08\x62ool_val\x18\x04 \x01(\x08H\x00\x12\x13\n\tbytes_val\x18\x05 \x01(\x0cH\x00\x12\x17\n\tfloat_val\x18\x06 \x01(\x02\x42\x02\x18\x01H\x00\x12\x14\n\ndouble_val\x18\x0e \x01(\x01H\x00\x12*\n\x0b\x64\x65\x63imal_val\x18\x07 \x01(\x0b\x32\x0f.gnmi.Decimal64B\x02\x18\x01H\x00\x12)\n\x0cleaflist_val\x18\x08 \x01(\x0b\x32\x11.gnmi.ScalarArrayH\x00\x12\'\n\x07\x61ny_val\x18\t \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x12\n\x08json_val\x18\n \x01(\x0cH\x00\x12\x17\n\rjson_ietf_val\x18\x0b \x01(\x0cH\x00\x12\x13\n\tascii_val\x18\x0c \x01(\tH\x00\x12\x15\n\x0bproto_bytes\x18\r \x01(\x0cH\x00\x42\x07\n\x05value\"Y\n\x04Path\x12\x13\n\x07\x65lement\x18\x01 \x03(\tB\x02\x18\x01\x12\x0e\n\x06origin\x18\x02 \x01(\t\x12\x1c\n\x04\x65lem\x18\x03 \x03(\x0b\x32\x0e.gnmi.PathElem\x12\x0e\n\x06target\x18\x04 \x01(\t\"j\n\x08PathElem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x03key\x18\x02 \x03(\x0b\x32\x17.gnmi.PathElem.KeyEntry\x1a*\n\x08KeyEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"8\n\x05Value\x12\r\n\x05value\x18\x01 \x01(\x0c\x12\x1c\n\x04type\x18\x02 \x01(\x0e\x32\x0e.gnmi.Encoding:\x02\x18\x01\"N\n\x05\x45rror\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\"\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x18\x01\"2\n\tDecimal64\x12\x0e\n\x06\x64igits\x18\x01 \x01(\x03\x12\x11\n\tprecision\x18\x02 \x01(\r:\x02\x18\x01\"0\n\x0bScalarArray\x12!\n\x07\x65lement\x18\x01 \x03(\x0b\x32\x10.gnmi.TypedValue\"\x9d\x01\n\x10SubscribeRequest\x12+\n\tsubscribe\x18\x01 \x01(\x0b\x32\x16.gnmi.SubscriptionListH\x00\x12\x1a\n\x04poll\x18\x03 \x01(\x0b\x32\n.gnmi.PollH\x00\x12&\n\textension\x18\x05 \x03(\x0b\x32\x13.gnmi_ext.ExtensionB\t\n\x07requestJ\x04\x08\x04\x10\x05R\x07\x61liases\"\x06\n\x04Poll\"\xa8\x01\n\x11SubscribeResponse\x12$\n\x06update\x18\x01 \x01(\x0b\x32\x12.gnmi.NotificationH\x00\x12\x17\n\rsync_response\x18\x03 \x01(\x08H\x00\x12 \n\x05\x65rror\x18\x04 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01H\x00\x12&\n\textension\x18\x05 \x03(\x0b\x32\x13.gnmi_ext.ExtensionB\n\n\x08response\"\xd5\x02\n\x10SubscriptionList\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12(\n\x0csubscription\x18\x02 \x03(\x0b\x32\x12.gnmi.Subscription\x12\x1d\n\x03qos\x18\x04 \x01(\x0b\x32\x10.gnmi.QOSMarking\x12)\n\x04mode\x18\x05 \x01(\x0e\x32\x1b.gnmi.SubscriptionList.Mode\x12\x19\n\x11\x61llow_aggregation\x18\x06 \x01(\x08\x12#\n\nuse_models\x18\x07 \x03(\x0b\x32\x0f.gnmi.ModelData\x12 \n\x08\x65ncoding\x18\x08 \x01(\x0e\x32\x0e.gnmi.Encoding\x12\x14\n\x0cupdates_only\x18\t \x01(\x08\"&\n\x04Mode\x12\n\n\x06STREAM\x10\x00\x12\x08\n\x04ONCE\x10\x01\x12\x08\n\x04POLL\x10\x02J\x04\x08\x03\x10\x04R\x0buse_aliases\"\x9f\x01\n\x0cSubscription\x12\x18\n\x04path\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12$\n\x04mode\x18\x02 \x01(\x0e\x32\x16.gnmi.SubscriptionMode\x12\x17\n\x0fsample_interval\x18\x03 \x01(\x04\x12\x1a\n\x12suppress_redundant\x18\x04 \x01(\x08\x12\x1a\n\x12heartbeat_interval\x18\x05 \x01(\x04\"\x1d\n\nQOSMarking\x12\x0f\n\x07marking\x18\x01 \x01(\r\"\xce\x01\n\nSetRequest\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x1a\n\x06\x64\x65lete\x18\x02 \x03(\x0b\x32\n.gnmi.Path\x12\x1d\n\x07replace\x18\x03 \x03(\x0b\x32\x0c.gnmi.Update\x12\x1c\n\x06update\x18\x04 \x03(\x0b\x32\x0c.gnmi.Update\x12#\n\runion_replace\x18\x06 \x03(\x0b\x32\x0c.gnmi.Update\x12&\n\textension\x18\x05 \x03(\x0b\x32\x13.gnmi_ext.Extension\"\xac\x01\n\x0bSetResponse\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12$\n\x08response\x18\x02 \x03(\x0b\x32\x12.gnmi.UpdateResult\x12 \n\x07message\x18\x03 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12\x11\n\ttimestamp\x18\x04 \x01(\x03\x12&\n\textension\x18\x05 \x03(\x0b\x32\x13.gnmi_ext.Extension\"\xdd\x01\n\x0cUpdateResult\x12\x15\n\ttimestamp\x18\x01 \x01(\x03\x42\x02\x18\x01\x12\x18\n\x04path\x18\x02 \x01(\x0b\x32\n.gnmi.Path\x12 \n\x07message\x18\x03 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12(\n\x02op\x18\x04 \x01(\x0e\x32\x1c.gnmi.UpdateResult.Operation\"P\n\tOperation\x12\x0b\n\x07INVALID\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\x0b\n\x07REPLACE\x10\x02\x12\n\n\x06UPDATE\x10\x03\x12\x11\n\rUNION_REPLACE\x10\x04\"\x97\x02\n\nGetRequest\x12\x1a\n\x06prefix\x18\x01 \x01(\x0b\x32\n.gnmi.Path\x12\x18\n\x04path\x18\x02 \x03(\x0b\x32\n.gnmi.Path\x12\'\n\x04type\x18\x03 \x01(\x0e\x32\x19.gnmi.GetRequest.DataType\x12 \n\x08\x65ncoding\x18\x05 \x01(\x0e\x32\x0e.gnmi.Encoding\x12#\n\nuse_models\x18\x06 \x03(\x0b\x32\x0f.gnmi.ModelData\x12&\n\textension\x18\x07 \x03(\x0b\x32\x13.gnmi_ext.Extension\";\n\x08\x44\x61taType\x12\x07\n\x03\x41LL\x10\x00\x12\n\n\x06\x43ONFIG\x10\x01\x12\t\n\x05STATE\x10\x02\x12\x0f\n\x0bOPERATIONAL\x10\x03\"\x7f\n\x0bGetResponse\x12(\n\x0cnotification\x18\x01 \x03(\x0b\x32\x12.gnmi.Notification\x12\x1e\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0b.gnmi.ErrorB\x02\x18\x01\x12&\n\textension\x18\x03 \x03(\x0b\x32\x13.gnmi_ext.Extension\";\n\x11\x43\x61pabilityRequest\x12&\n\textension\x18\x01 \x03(\x0b\x32\x13.gnmi_ext.Extension\"\xaa\x01\n\x12\x43\x61pabilityResponse\x12)\n\x10supported_models\x18\x01 \x03(\x0b\x32\x0f.gnmi.ModelData\x12+\n\x13supported_encodings\x18\x02 \x03(\x0e\x32\x0e.gnmi.Encoding\x12\x14\n\x0cgNMI_version\x18\x03 \x01(\t\x12&\n\textension\x18\x04 \x03(\x0b\x32\x13.gnmi_ext.Extension\"@\n\tModelData\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0corganization\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t*D\n\x08\x45ncoding\x12\x08\n\x04JSON\x10\x00\x12\t\n\x05\x42YTES\x10\x01\x12\t\n\x05PROTO\x10\x02\x12\t\n\x05\x41SCII\x10\x03\x12\r\n\tJSON_IETF\x10\x04*A\n\x10SubscriptionMode\x12\x12\n\x0eTARGET_DEFINED\x10\x00\x12\r\n\tON_CHANGE\x10\x01\x12\n\n\x06SAMPLE\x10\x02\x32\xe3\x01\n\x04gNMI\x12\x41\n\x0c\x43\x61pabilities\x12\x17.gnmi.CapabilityRequest\x1a\x18.gnmi.CapabilityResponse\x12*\n\x03Get\x12\x10.gnmi.GetRequest\x1a\x11.gnmi.GetResponse\x12*\n\x03Set\x12\x10.gnmi.SetRequest\x1a\x11.gnmi.SetResponse\x12@\n\tSubscribe\x12\x16.gnmi.SubscribeRequest\x1a\x17.gnmi.SubscribeResponse(\x01\x30\x01:3\n\x0cgnmi_service\x12\x1c.google.protobuf.FileOptions\x18\xe9\x07 \x01(\tBT\n\x15\x63om.github.gnmi.protoB\tGnmiProtoP\x01Z%github.com/openconfig/gnmi/proto/gnmi\xca>\x06\x30.10.0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.gnmi.gnmi_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\025com.github.gnmi.protoB\tGnmiProtoP\001Z%github.com/openconfig/gnmi/proto/gnmi\312>\0060.10.0' + _globals['_UPDATE'].fields_by_name['value']._loaded_options = None + _globals['_UPDATE'].fields_by_name['value']._serialized_options = b'\030\001' + _globals['_TYPEDVALUE'].fields_by_name['float_val']._loaded_options = None + _globals['_TYPEDVALUE'].fields_by_name['float_val']._serialized_options = b'\030\001' + _globals['_TYPEDVALUE'].fields_by_name['decimal_val']._loaded_options = None + _globals['_TYPEDVALUE'].fields_by_name['decimal_val']._serialized_options = b'\030\001' + _globals['_PATH'].fields_by_name['element']._loaded_options = None + _globals['_PATH'].fields_by_name['element']._serialized_options = b'\030\001' + _globals['_PATHELEM_KEYENTRY']._loaded_options = None + _globals['_PATHELEM_KEYENTRY']._serialized_options = b'8\001' + _globals['_VALUE']._loaded_options = None + _globals['_VALUE']._serialized_options = b'\030\001' + _globals['_ERROR']._loaded_options = None + _globals['_ERROR']._serialized_options = b'\030\001' + _globals['_DECIMAL64']._loaded_options = None + _globals['_DECIMAL64']._serialized_options = b'\030\001' + _globals['_SUBSCRIBERESPONSE'].fields_by_name['error']._loaded_options = None + _globals['_SUBSCRIBERESPONSE'].fields_by_name['error']._serialized_options = b'\030\001' + _globals['_SETRESPONSE'].fields_by_name['message']._loaded_options = None + _globals['_SETRESPONSE'].fields_by_name['message']._serialized_options = b'\030\001' + _globals['_UPDATERESULT'].fields_by_name['timestamp']._loaded_options = None + _globals['_UPDATERESULT'].fields_by_name['timestamp']._serialized_options = b'\030\001' + _globals['_UPDATERESULT'].fields_by_name['message']._loaded_options = None + _globals['_UPDATERESULT'].fields_by_name['message']._serialized_options = b'\030\001' + _globals['_GETRESPONSE'].fields_by_name['error']._loaded_options = None + _globals['_GETRESPONSE'].fields_by_name['error']._serialized_options = b'\030\001' + _globals['_ENCODING']._serialized_start=3444 + _globals['_ENCODING']._serialized_end=3512 + _globals['_SUBSCRIPTIONMODE']._serialized_start=3514 + _globals['_SUBSCRIPTIONMODE']._serialized_end=3579 + _globals['_NOTIFICATION']._serialized_start=151 + _globals['_NOTIFICATION']._serialized_end=299 + _globals['_UPDATE']._serialized_start=301 + _globals['_UPDATE']._serialized_end=418 + _globals['_TYPEDVALUE']._serialized_start=421 + _globals['_TYPEDVALUE']._serialized_end=808 + _globals['_PATH']._serialized_start=810 + _globals['_PATH']._serialized_end=899 + _globals['_PATHELEM']._serialized_start=901 + _globals['_PATHELEM']._serialized_end=1007 + _globals['_PATHELEM_KEYENTRY']._serialized_start=965 + _globals['_PATHELEM_KEYENTRY']._serialized_end=1007 + _globals['_VALUE']._serialized_start=1009 + _globals['_VALUE']._serialized_end=1065 + _globals['_ERROR']._serialized_start=1067 + _globals['_ERROR']._serialized_end=1145 + _globals['_DECIMAL64']._serialized_start=1147 + _globals['_DECIMAL64']._serialized_end=1197 + _globals['_SCALARARRAY']._serialized_start=1199 + _globals['_SCALARARRAY']._serialized_end=1247 + _globals['_SUBSCRIBEREQUEST']._serialized_start=1250 + _globals['_SUBSCRIBEREQUEST']._serialized_end=1407 + _globals['_POLL']._serialized_start=1409 + _globals['_POLL']._serialized_end=1415 + _globals['_SUBSCRIBERESPONSE']._serialized_start=1418 + _globals['_SUBSCRIBERESPONSE']._serialized_end=1586 + _globals['_SUBSCRIPTIONLIST']._serialized_start=1589 + _globals['_SUBSCRIPTIONLIST']._serialized_end=1930 + _globals['_SUBSCRIPTIONLIST_MODE']._serialized_start=1873 + _globals['_SUBSCRIPTIONLIST_MODE']._serialized_end=1911 + _globals['_SUBSCRIPTION']._serialized_start=1933 + _globals['_SUBSCRIPTION']._serialized_end=2092 + _globals['_QOSMARKING']._serialized_start=2094 + _globals['_QOSMARKING']._serialized_end=2123 + _globals['_SETREQUEST']._serialized_start=2126 + _globals['_SETREQUEST']._serialized_end=2332 + _globals['_SETRESPONSE']._serialized_start=2335 + _globals['_SETRESPONSE']._serialized_end=2507 + _globals['_UPDATERESULT']._serialized_start=2510 + _globals['_UPDATERESULT']._serialized_end=2731 + _globals['_UPDATERESULT_OPERATION']._serialized_start=2651 + _globals['_UPDATERESULT_OPERATION']._serialized_end=2731 + _globals['_GETREQUEST']._serialized_start=2734 + _globals['_GETREQUEST']._serialized_end=3013 + _globals['_GETREQUEST_DATATYPE']._serialized_start=2954 + _globals['_GETREQUEST_DATATYPE']._serialized_end=3013 + _globals['_GETRESPONSE']._serialized_start=3015 + _globals['_GETRESPONSE']._serialized_end=3142 + _globals['_CAPABILITYREQUEST']._serialized_start=3144 + _globals['_CAPABILITYREQUEST']._serialized_end=3203 + _globals['_CAPABILITYRESPONSE']._serialized_start=3206 + _globals['_CAPABILITYRESPONSE']._serialized_end=3376 + _globals['_MODELDATA']._serialized_start=3378 + _globals['_MODELDATA']._serialized_end=3442 + _globals['_GNMI']._serialized_start=3582 + _globals['_GNMI']._serialized_end=3809 # @@protoc_insertion_point(module_scope) diff --git a/proto/gnmi/gnmi_pb2_grpc.py b/proto/gnmi/gnmi_pb2_grpc.py index 7bf9433..2abf29e 100644 --- a/proto/gnmi/gnmi_pb2_grpc.py +++ b/proto/gnmi/gnmi_pb2_grpc.py @@ -1,113 +1,246 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings from proto.gnmi import gnmi_pb2 as proto_dot_gnmi_dot_gnmi__pb2 +GRPC_GENERATED_VERSION = '1.66.2' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in proto/gnmi/gnmi_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + class gNMIStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.Capabilities = channel.unary_unary( - '/gnmi.gNMI/Capabilities', - request_serializer=proto_dot_gnmi_dot_gnmi__pb2.CapabilityRequest.SerializeToString, - response_deserializer=proto_dot_gnmi_dot_gnmi__pb2.CapabilityResponse.FromString, - ) - self.Get = channel.unary_unary( - '/gnmi.gNMI/Get', - request_serializer=proto_dot_gnmi_dot_gnmi__pb2.GetRequest.SerializeToString, - response_deserializer=proto_dot_gnmi_dot_gnmi__pb2.GetResponse.FromString, - ) - self.Set = channel.unary_unary( - '/gnmi.gNMI/Set', - request_serializer=proto_dot_gnmi_dot_gnmi__pb2.SetRequest.SerializeToString, - response_deserializer=proto_dot_gnmi_dot_gnmi__pb2.SetResponse.FromString, - ) - self.Subscribe = channel.stream_stream( - '/gnmi.gNMI/Subscribe', - request_serializer=proto_dot_gnmi_dot_gnmi__pb2.SubscribeRequest.SerializeToString, - response_deserializer=proto_dot_gnmi_dot_gnmi__pb2.SubscribeResponse.FromString, - ) + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Capabilities = channel.unary_unary( + '/gnmi.gNMI/Capabilities', + request_serializer=proto_dot_gnmi_dot_gnmi__pb2.CapabilityRequest.SerializeToString, + response_deserializer=proto_dot_gnmi_dot_gnmi__pb2.CapabilityResponse.FromString, + _registered_method=True) + self.Get = channel.unary_unary( + '/gnmi.gNMI/Get', + request_serializer=proto_dot_gnmi_dot_gnmi__pb2.GetRequest.SerializeToString, + response_deserializer=proto_dot_gnmi_dot_gnmi__pb2.GetResponse.FromString, + _registered_method=True) + self.Set = channel.unary_unary( + '/gnmi.gNMI/Set', + request_serializer=proto_dot_gnmi_dot_gnmi__pb2.SetRequest.SerializeToString, + response_deserializer=proto_dot_gnmi_dot_gnmi__pb2.SetResponse.FromString, + _registered_method=True) + self.Subscribe = channel.stream_stream( + '/gnmi.gNMI/Subscribe', + request_serializer=proto_dot_gnmi_dot_gnmi__pb2.SubscribeRequest.SerializeToString, + response_deserializer=proto_dot_gnmi_dot_gnmi__pb2.SubscribeResponse.FromString, + _registered_method=True) class gNMIServicer(object): - # missing associated documentation comment in .proto file - pass - - def Capabilities(self, request, context): - """Capabilities allows the client to retrieve the set of capabilities that - is supported by the target. This allows the target to validate the - service version that is implemented and retrieve the set of models that - the target supports. The models can then be specified in subsequent RPCs - to restrict the set of data that is utilized. - Reference: gNMI Specification Section 3.2 - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Get(self, request, context): - """Retrieve a snapshot of data from the target. A Get RPC requests that the - target snapshots a subset of the data tree as specified by the paths - included in the message and serializes this to be returned to the - client using the specified encoding. - Reference: gNMI Specification Section 3.3 - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Set(self, request, context): - """Set allows the client to modify the state of data on the target. The - paths to modified along with the new values that the client wishes - to set the value to. - Reference: gNMI Specification Section 3.4 - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Subscribe(self, request_iterator, context): - """Subscribe allows a client to request the target to send it values - of particular paths within the data tree. These values may be streamed - at a particular cadence (STREAM), sent one off on a long-lived channel - (POLL), or sent as a one-off retrieval (ONCE). - Reference: gNMI Specification Section 3.5 - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + """Missing associated documentation comment in .proto file.""" + + def Capabilities(self, request, context): + """Capabilities allows the client to retrieve the set of capabilities that + is supported by the target. This allows the target to validate the + service version that is implemented and retrieve the set of models that + the target supports. The models can then be specified in subsequent RPCs + to restrict the set of data that is utilized. + Reference: gNMI Specification Section 3.2 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Retrieve a snapshot of data from the target. A Get RPC requests that the + target snapshots a subset of the data tree as specified by the paths + included in the message and serializes this to be returned to the + client using the specified encoding. + Reference: gNMI Specification Section 3.3 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Set(self, request, context): + """Set allows the client to modify the state of data on the target. The + paths to modified along with the new values that the client wishes + to set the value to. + Reference: gNMI Specification Section 3.4 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Subscribe(self, request_iterator, context): + """Subscribe allows a client to request the target to send it values + of particular paths within the data tree. These values may be streamed + at a particular cadence (STREAM), sent one off on a long-lived channel + (POLL), or sent as a one-off retrieval (ONCE). + Reference: gNMI Specification Section 3.5 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_gNMIServicer_to_server(servicer, server): - rpc_method_handlers = { - 'Capabilities': grpc.unary_unary_rpc_method_handler( - servicer.Capabilities, - request_deserializer=proto_dot_gnmi_dot_gnmi__pb2.CapabilityRequest.FromString, - response_serializer=proto_dot_gnmi_dot_gnmi__pb2.CapabilityResponse.SerializeToString, - ), - 'Get': grpc.unary_unary_rpc_method_handler( - servicer.Get, - request_deserializer=proto_dot_gnmi_dot_gnmi__pb2.GetRequest.FromString, - response_serializer=proto_dot_gnmi_dot_gnmi__pb2.GetResponse.SerializeToString, - ), - 'Set': grpc.unary_unary_rpc_method_handler( - servicer.Set, - request_deserializer=proto_dot_gnmi_dot_gnmi__pb2.SetRequest.FromString, - response_serializer=proto_dot_gnmi_dot_gnmi__pb2.SetResponse.SerializeToString, - ), - 'Subscribe': grpc.stream_stream_rpc_method_handler( - servicer.Subscribe, - request_deserializer=proto_dot_gnmi_dot_gnmi__pb2.SubscribeRequest.FromString, - response_serializer=proto_dot_gnmi_dot_gnmi__pb2.SubscribeResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'gnmi.gNMI', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) + rpc_method_handlers = { + 'Capabilities': grpc.unary_unary_rpc_method_handler( + servicer.Capabilities, + request_deserializer=proto_dot_gnmi_dot_gnmi__pb2.CapabilityRequest.FromString, + response_serializer=proto_dot_gnmi_dot_gnmi__pb2.CapabilityResponse.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=proto_dot_gnmi_dot_gnmi__pb2.GetRequest.FromString, + response_serializer=proto_dot_gnmi_dot_gnmi__pb2.GetResponse.SerializeToString, + ), + 'Set': grpc.unary_unary_rpc_method_handler( + servicer.Set, + request_deserializer=proto_dot_gnmi_dot_gnmi__pb2.SetRequest.FromString, + response_serializer=proto_dot_gnmi_dot_gnmi__pb2.SetResponse.SerializeToString, + ), + 'Subscribe': grpc.stream_stream_rpc_method_handler( + servicer.Subscribe, + request_deserializer=proto_dot_gnmi_dot_gnmi__pb2.SubscribeRequest.FromString, + response_serializer=proto_dot_gnmi_dot_gnmi__pb2.SubscribeResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'gnmi.gNMI', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('gnmi.gNMI', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class gNMI(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Capabilities(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/gnmi.gNMI/Capabilities', + proto_dot_gnmi_dot_gnmi__pb2.CapabilityRequest.SerializeToString, + proto_dot_gnmi_dot_gnmi__pb2.CapabilityResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Get(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/gnmi.gNMI/Get', + proto_dot_gnmi_dot_gnmi__pb2.GetRequest.SerializeToString, + proto_dot_gnmi_dot_gnmi__pb2.GetResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Set(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/gnmi.gNMI/Set', + proto_dot_gnmi_dot_gnmi__pb2.SetRequest.SerializeToString, + proto_dot_gnmi_dot_gnmi__pb2.SetResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Subscribe(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream( + request_iterator, + target, + '/gnmi.gNMI/Subscribe', + proto_dot_gnmi_dot_gnmi__pb2.SubscribeRequest.SerializeToString, + proto_dot_gnmi_dot_gnmi__pb2.SubscribeResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/proto/gnmi_ext/gnmi_ext.pb.go b/proto/gnmi_ext/gnmi_ext.pb.go index 0386611..da30053 100644 --- a/proto/gnmi_ext/gnmi_ext.pb.go +++ b/proto/gnmi_ext/gnmi_ext.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.0 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: proto/gnmi_ext/gnmi_ext.proto // Package gnmi_ext defines a set of extensions messages which can be optionally diff --git a/proto/gnmi_ext/gnmi_ext_pb2.py b/proto/gnmi_ext/gnmi_ext_pb2.py index a22be86..487c077 100644 --- a/proto/gnmi_ext/gnmi_ext_pb2.py +++ b/proto/gnmi_ext/gnmi_ext_pb2.py @@ -1,14 +1,22 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: proto/gnmi_ext/gnmi_ext.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper +# Protobuf Python Version: 5.27.2 +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'proto/gnmi_ext/gnmi_ext.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -17,686 +25,40 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 -DESCRIPTOR = _descriptor.FileDescriptor( - name='proto/gnmi_ext/gnmi_ext.proto', - package='gnmi_ext', - syntax='proto3', - serialized_pb=_b('\n\x1dproto/gnmi_ext/gnmi_ext.proto\x12\x08gnmi_ext\x1a\x1egoogle/protobuf/duration.proto\"\xf2\x01\n\tExtension\x12\x37\n\x0eregistered_ext\x18\x01 \x01(\x0b\x32\x1d.gnmi_ext.RegisteredExtensionH\x00\x12\x39\n\x12master_arbitration\x18\x02 \x01(\x0b\x32\x1b.gnmi_ext.MasterArbitrationH\x00\x12$\n\x07history\x18\x03 \x01(\x0b\x32\x11.gnmi_ext.HistoryH\x00\x12\"\n\x06\x63ommit\x18\x04 \x01(\x0b\x32\x10.gnmi_ext.CommitH\x00\x12 \n\x05\x64\x65pth\x18\x05 \x01(\x0b\x32\x0f.gnmi_ext.DepthH\x00\x42\x05\n\x03\x65xt\"E\n\x13RegisteredExtension\x12!\n\x02id\x18\x01 \x01(\x0e\x32\x15.gnmi_ext.ExtensionID\x12\x0b\n\x03msg\x18\x02 \x01(\x0c\"Y\n\x11MasterArbitration\x12\x1c\n\x04role\x18\x01 \x01(\x0b\x32\x0e.gnmi_ext.Role\x12&\n\x0b\x65lection_id\x18\x02 \x01(\x0b\x32\x11.gnmi_ext.Uint128\"$\n\x07Uint128\x12\x0c\n\x04high\x18\x01 \x01(\x04\x12\x0b\n\x03low\x18\x02 \x01(\x04\"\x12\n\x04Role\x12\n\n\x02id\x18\x01 \x01(\t\"S\n\x07History\x12\x17\n\rsnapshot_time\x18\x01 \x01(\x03H\x00\x12$\n\x05range\x18\x02 \x01(\x0b\x32\x13.gnmi_ext.TimeRangeH\x00\x42\t\n\x07request\"\'\n\tTimeRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"\xe5\x01\n\x06\x43ommit\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x06\x63ommit\x18\x02 \x01(\x0b\x32\x17.gnmi_ext.CommitRequestH\x00\x12*\n\x07\x63onfirm\x18\x03 \x01(\x0b\x32\x17.gnmi_ext.CommitConfirmH\x00\x12(\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x16.gnmi_ext.CommitCancelH\x00\x12\x44\n\x15set_rollback_duration\x18\x05 \x01(\x0b\x32#.gnmi_ext.CommitSetRollbackDurationH\x00\x42\x08\n\x06\x61\x63tion\"E\n\rCommitRequest\x12\x34\n\x11rollback_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x0f\n\rCommitConfirm\"\x0e\n\x0c\x43ommitCancel\"Q\n\x19\x43ommitSetRollbackDuration\x12\x34\n\x11rollback_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x16\n\x05\x44\x65pth\x12\r\n\x05level\x18\x01 \x01(\r*3\n\x0b\x45xtensionID\x12\r\n\tEID_UNSET\x10\x00\x12\x15\n\x10\x45ID_EXPERIMENTAL\x10\xe7\x07\x42+Z)github.com/openconfig/gnmi/proto/gnmi_extb\x06proto3') - , - dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,]) - -_EXTENSIONID = _descriptor.EnumDescriptor( - name='ExtensionID', - full_name='gnmi_ext.ExtensionID', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='EID_UNSET', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='EID_EXPERIMENTAL', index=1, number=999, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=1109, - serialized_end=1160, -) -_sym_db.RegisterEnumDescriptor(_EXTENSIONID) - -ExtensionID = enum_type_wrapper.EnumTypeWrapper(_EXTENSIONID) -EID_UNSET = 0 -EID_EXPERIMENTAL = 999 - - - -_EXTENSION = _descriptor.Descriptor( - name='Extension', - full_name='gnmi_ext.Extension', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='registered_ext', full_name='gnmi_ext.Extension.registered_ext', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='master_arbitration', full_name='gnmi_ext.Extension.master_arbitration', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='history', full_name='gnmi_ext.Extension.history', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='commit', full_name='gnmi_ext.Extension.commit', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='depth', full_name='gnmi_ext.Extension.depth', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='ext', full_name='gnmi_ext.Extension.ext', - index=0, containing_type=None, fields=[]), - ], - serialized_start=76, - serialized_end=318, -) - - -_REGISTEREDEXTENSION = _descriptor.Descriptor( - name='RegisteredExtension', - full_name='gnmi_ext.RegisteredExtension', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='gnmi_ext.RegisteredExtension.id', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='msg', full_name='gnmi_ext.RegisteredExtension.msg', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=320, - serialized_end=389, -) - - -_MASTERARBITRATION = _descriptor.Descriptor( - name='MasterArbitration', - full_name='gnmi_ext.MasterArbitration', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='role', full_name='gnmi_ext.MasterArbitration.role', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='election_id', full_name='gnmi_ext.MasterArbitration.election_id', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=391, - serialized_end=480, -) - - -_UINT128 = _descriptor.Descriptor( - name='Uint128', - full_name='gnmi_ext.Uint128', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='high', full_name='gnmi_ext.Uint128.high', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='low', full_name='gnmi_ext.Uint128.low', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=482, - serialized_end=518, -) - - -_ROLE = _descriptor.Descriptor( - name='Role', - full_name='gnmi_ext.Role', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='gnmi_ext.Role.id', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=520, - serialized_end=538, -) - - -_HISTORY = _descriptor.Descriptor( - name='History', - full_name='gnmi_ext.History', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='snapshot_time', full_name='gnmi_ext.History.snapshot_time', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='range', full_name='gnmi_ext.History.range', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='request', full_name='gnmi_ext.History.request', - index=0, containing_type=None, fields=[]), - ], - serialized_start=540, - serialized_end=623, -) - - -_TIMERANGE = _descriptor.Descriptor( - name='TimeRange', - full_name='gnmi_ext.TimeRange', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='start', full_name='gnmi_ext.TimeRange.start', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='end', full_name='gnmi_ext.TimeRange.end', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=625, - serialized_end=664, -) - - -_COMMIT = _descriptor.Descriptor( - name='Commit', - full_name='gnmi_ext.Commit', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='gnmi_ext.Commit.id', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='commit', full_name='gnmi_ext.Commit.commit', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='confirm', full_name='gnmi_ext.Commit.confirm', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='cancel', full_name='gnmi_ext.Commit.cancel', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='set_rollback_duration', full_name='gnmi_ext.Commit.set_rollback_duration', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='action', full_name='gnmi_ext.Commit.action', - index=0, containing_type=None, fields=[]), - ], - serialized_start=667, - serialized_end=896, -) - - -_COMMITREQUEST = _descriptor.Descriptor( - name='CommitRequest', - full_name='gnmi_ext.CommitRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='rollback_duration', full_name='gnmi_ext.CommitRequest.rollback_duration', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=898, - serialized_end=967, -) - - -_COMMITCONFIRM = _descriptor.Descriptor( - name='CommitConfirm', - full_name='gnmi_ext.CommitConfirm', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=969, - serialized_end=984, -) - - -_COMMITCANCEL = _descriptor.Descriptor( - name='CommitCancel', - full_name='gnmi_ext.CommitCancel', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=986, - serialized_end=1000, -) - - -_COMMITSETROLLBACKDURATION = _descriptor.Descriptor( - name='CommitSetRollbackDuration', - full_name='gnmi_ext.CommitSetRollbackDuration', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='rollback_duration', full_name='gnmi_ext.CommitSetRollbackDuration.rollback_duration', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1002, - serialized_end=1083, -) - - -_DEPTH = _descriptor.Descriptor( - name='Depth', - full_name='gnmi_ext.Depth', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='level', full_name='gnmi_ext.Depth.level', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1085, - serialized_end=1107, -) - -_EXTENSION.fields_by_name['registered_ext'].message_type = _REGISTEREDEXTENSION -_EXTENSION.fields_by_name['master_arbitration'].message_type = _MASTERARBITRATION -_EXTENSION.fields_by_name['history'].message_type = _HISTORY -_EXTENSION.fields_by_name['commit'].message_type = _COMMIT -_EXTENSION.fields_by_name['depth'].message_type = _DEPTH -_EXTENSION.oneofs_by_name['ext'].fields.append( - _EXTENSION.fields_by_name['registered_ext']) -_EXTENSION.fields_by_name['registered_ext'].containing_oneof = _EXTENSION.oneofs_by_name['ext'] -_EXTENSION.oneofs_by_name['ext'].fields.append( - _EXTENSION.fields_by_name['master_arbitration']) -_EXTENSION.fields_by_name['master_arbitration'].containing_oneof = _EXTENSION.oneofs_by_name['ext'] -_EXTENSION.oneofs_by_name['ext'].fields.append( - _EXTENSION.fields_by_name['history']) -_EXTENSION.fields_by_name['history'].containing_oneof = _EXTENSION.oneofs_by_name['ext'] -_EXTENSION.oneofs_by_name['ext'].fields.append( - _EXTENSION.fields_by_name['commit']) -_EXTENSION.fields_by_name['commit'].containing_oneof = _EXTENSION.oneofs_by_name['ext'] -_EXTENSION.oneofs_by_name['ext'].fields.append( - _EXTENSION.fields_by_name['depth']) -_EXTENSION.fields_by_name['depth'].containing_oneof = _EXTENSION.oneofs_by_name['ext'] -_REGISTEREDEXTENSION.fields_by_name['id'].enum_type = _EXTENSIONID -_MASTERARBITRATION.fields_by_name['role'].message_type = _ROLE -_MASTERARBITRATION.fields_by_name['election_id'].message_type = _UINT128 -_HISTORY.fields_by_name['range'].message_type = _TIMERANGE -_HISTORY.oneofs_by_name['request'].fields.append( - _HISTORY.fields_by_name['snapshot_time']) -_HISTORY.fields_by_name['snapshot_time'].containing_oneof = _HISTORY.oneofs_by_name['request'] -_HISTORY.oneofs_by_name['request'].fields.append( - _HISTORY.fields_by_name['range']) -_HISTORY.fields_by_name['range'].containing_oneof = _HISTORY.oneofs_by_name['request'] -_COMMIT.fields_by_name['commit'].message_type = _COMMITREQUEST -_COMMIT.fields_by_name['confirm'].message_type = _COMMITCONFIRM -_COMMIT.fields_by_name['cancel'].message_type = _COMMITCANCEL -_COMMIT.fields_by_name['set_rollback_duration'].message_type = _COMMITSETROLLBACKDURATION -_COMMIT.oneofs_by_name['action'].fields.append( - _COMMIT.fields_by_name['commit']) -_COMMIT.fields_by_name['commit'].containing_oneof = _COMMIT.oneofs_by_name['action'] -_COMMIT.oneofs_by_name['action'].fields.append( - _COMMIT.fields_by_name['confirm']) -_COMMIT.fields_by_name['confirm'].containing_oneof = _COMMIT.oneofs_by_name['action'] -_COMMIT.oneofs_by_name['action'].fields.append( - _COMMIT.fields_by_name['cancel']) -_COMMIT.fields_by_name['cancel'].containing_oneof = _COMMIT.oneofs_by_name['action'] -_COMMIT.oneofs_by_name['action'].fields.append( - _COMMIT.fields_by_name['set_rollback_duration']) -_COMMIT.fields_by_name['set_rollback_duration'].containing_oneof = _COMMIT.oneofs_by_name['action'] -_COMMITREQUEST.fields_by_name['rollback_duration'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION -_COMMITSETROLLBACKDURATION.fields_by_name['rollback_duration'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION -DESCRIPTOR.message_types_by_name['Extension'] = _EXTENSION -DESCRIPTOR.message_types_by_name['RegisteredExtension'] = _REGISTEREDEXTENSION -DESCRIPTOR.message_types_by_name['MasterArbitration'] = _MASTERARBITRATION -DESCRIPTOR.message_types_by_name['Uint128'] = _UINT128 -DESCRIPTOR.message_types_by_name['Role'] = _ROLE -DESCRIPTOR.message_types_by_name['History'] = _HISTORY -DESCRIPTOR.message_types_by_name['TimeRange'] = _TIMERANGE -DESCRIPTOR.message_types_by_name['Commit'] = _COMMIT -DESCRIPTOR.message_types_by_name['CommitRequest'] = _COMMITREQUEST -DESCRIPTOR.message_types_by_name['CommitConfirm'] = _COMMITCONFIRM -DESCRIPTOR.message_types_by_name['CommitCancel'] = _COMMITCANCEL -DESCRIPTOR.message_types_by_name['CommitSetRollbackDuration'] = _COMMITSETROLLBACKDURATION -DESCRIPTOR.message_types_by_name['Depth'] = _DEPTH -DESCRIPTOR.enum_types_by_name['ExtensionID'] = _EXTENSIONID -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Extension = _reflection.GeneratedProtocolMessageType('Extension', (_message.Message,), dict( - DESCRIPTOR = _EXTENSION, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.Extension) - )) -_sym_db.RegisterMessage(Extension) - -RegisteredExtension = _reflection.GeneratedProtocolMessageType('RegisteredExtension', (_message.Message,), dict( - DESCRIPTOR = _REGISTEREDEXTENSION, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.RegisteredExtension) - )) -_sym_db.RegisterMessage(RegisteredExtension) - -MasterArbitration = _reflection.GeneratedProtocolMessageType('MasterArbitration', (_message.Message,), dict( - DESCRIPTOR = _MASTERARBITRATION, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.MasterArbitration) - )) -_sym_db.RegisterMessage(MasterArbitration) - -Uint128 = _reflection.GeneratedProtocolMessageType('Uint128', (_message.Message,), dict( - DESCRIPTOR = _UINT128, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.Uint128) - )) -_sym_db.RegisterMessage(Uint128) - -Role = _reflection.GeneratedProtocolMessageType('Role', (_message.Message,), dict( - DESCRIPTOR = _ROLE, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.Role) - )) -_sym_db.RegisterMessage(Role) - -History = _reflection.GeneratedProtocolMessageType('History', (_message.Message,), dict( - DESCRIPTOR = _HISTORY, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.History) - )) -_sym_db.RegisterMessage(History) - -TimeRange = _reflection.GeneratedProtocolMessageType('TimeRange', (_message.Message,), dict( - DESCRIPTOR = _TIMERANGE, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.TimeRange) - )) -_sym_db.RegisterMessage(TimeRange) - -Commit = _reflection.GeneratedProtocolMessageType('Commit', (_message.Message,), dict( - DESCRIPTOR = _COMMIT, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.Commit) - )) -_sym_db.RegisterMessage(Commit) - -CommitRequest = _reflection.GeneratedProtocolMessageType('CommitRequest', (_message.Message,), dict( - DESCRIPTOR = _COMMITREQUEST, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.CommitRequest) - )) -_sym_db.RegisterMessage(CommitRequest) - -CommitConfirm = _reflection.GeneratedProtocolMessageType('CommitConfirm', (_message.Message,), dict( - DESCRIPTOR = _COMMITCONFIRM, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.CommitConfirm) - )) -_sym_db.RegisterMessage(CommitConfirm) - -CommitCancel = _reflection.GeneratedProtocolMessageType('CommitCancel', (_message.Message,), dict( - DESCRIPTOR = _COMMITCANCEL, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.CommitCancel) - )) -_sym_db.RegisterMessage(CommitCancel) - -CommitSetRollbackDuration = _reflection.GeneratedProtocolMessageType('CommitSetRollbackDuration', (_message.Message,), dict( - DESCRIPTOR = _COMMITSETROLLBACKDURATION, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.CommitSetRollbackDuration) - )) -_sym_db.RegisterMessage(CommitSetRollbackDuration) - -Depth = _reflection.GeneratedProtocolMessageType('Depth', (_message.Message,), dict( - DESCRIPTOR = _DEPTH, - __module__ = 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.Depth) - )) -_sym_db.RegisterMessage(Depth) - - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z)github.com/openconfig/gnmi/proto/gnmi_ext')) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/gnmi_ext/gnmi_ext.proto\x12\x08gnmi_ext\x1a\x1egoogle/protobuf/duration.proto\"\xf2\x01\n\tExtension\x12\x37\n\x0eregistered_ext\x18\x01 \x01(\x0b\x32\x1d.gnmi_ext.RegisteredExtensionH\x00\x12\x39\n\x12master_arbitration\x18\x02 \x01(\x0b\x32\x1b.gnmi_ext.MasterArbitrationH\x00\x12$\n\x07history\x18\x03 \x01(\x0b\x32\x11.gnmi_ext.HistoryH\x00\x12\"\n\x06\x63ommit\x18\x04 \x01(\x0b\x32\x10.gnmi_ext.CommitH\x00\x12 \n\x05\x64\x65pth\x18\x05 \x01(\x0b\x32\x0f.gnmi_ext.DepthH\x00\x42\x05\n\x03\x65xt\"E\n\x13RegisteredExtension\x12!\n\x02id\x18\x01 \x01(\x0e\x32\x15.gnmi_ext.ExtensionID\x12\x0b\n\x03msg\x18\x02 \x01(\x0c\"Y\n\x11MasterArbitration\x12\x1c\n\x04role\x18\x01 \x01(\x0b\x32\x0e.gnmi_ext.Role\x12&\n\x0b\x65lection_id\x18\x02 \x01(\x0b\x32\x11.gnmi_ext.Uint128\"$\n\x07Uint128\x12\x0c\n\x04high\x18\x01 \x01(\x04\x12\x0b\n\x03low\x18\x02 \x01(\x04\"\x12\n\x04Role\x12\n\n\x02id\x18\x01 \x01(\t\"S\n\x07History\x12\x17\n\rsnapshot_time\x18\x01 \x01(\x03H\x00\x12$\n\x05range\x18\x02 \x01(\x0b\x32\x13.gnmi_ext.TimeRangeH\x00\x42\t\n\x07request\"\'\n\tTimeRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"\xe5\x01\n\x06\x43ommit\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x06\x63ommit\x18\x02 \x01(\x0b\x32\x17.gnmi_ext.CommitRequestH\x00\x12*\n\x07\x63onfirm\x18\x03 \x01(\x0b\x32\x17.gnmi_ext.CommitConfirmH\x00\x12(\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x16.gnmi_ext.CommitCancelH\x00\x12\x44\n\x15set_rollback_duration\x18\x05 \x01(\x0b\x32#.gnmi_ext.CommitSetRollbackDurationH\x00\x42\x08\n\x06\x61\x63tion\"E\n\rCommitRequest\x12\x34\n\x11rollback_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x0f\n\rCommitConfirm\"\x0e\n\x0c\x43ommitCancel\"Q\n\x19\x43ommitSetRollbackDuration\x12\x34\n\x11rollback_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x16\n\x05\x44\x65pth\x12\r\n\x05level\x18\x01 \x01(\r*3\n\x0b\x45xtensionID\x12\r\n\tEID_UNSET\x10\x00\x12\x15\n\x10\x45ID_EXPERIMENTAL\x10\xe7\x07\x42+Z)github.com/openconfig/gnmi/proto/gnmi_extb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.gnmi_ext.gnmi_ext_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'Z)github.com/openconfig/gnmi/proto/gnmi_ext' + _globals['_EXTENSIONID']._serialized_start=1109 + _globals['_EXTENSIONID']._serialized_end=1160 + _globals['_EXTENSION']._serialized_start=76 + _globals['_EXTENSION']._serialized_end=318 + _globals['_REGISTEREDEXTENSION']._serialized_start=320 + _globals['_REGISTEREDEXTENSION']._serialized_end=389 + _globals['_MASTERARBITRATION']._serialized_start=391 + _globals['_MASTERARBITRATION']._serialized_end=480 + _globals['_UINT128']._serialized_start=482 + _globals['_UINT128']._serialized_end=518 + _globals['_ROLE']._serialized_start=520 + _globals['_ROLE']._serialized_end=538 + _globals['_HISTORY']._serialized_start=540 + _globals['_HISTORY']._serialized_end=623 + _globals['_TIMERANGE']._serialized_start=625 + _globals['_TIMERANGE']._serialized_end=664 + _globals['_COMMIT']._serialized_start=667 + _globals['_COMMIT']._serialized_end=896 + _globals['_COMMITREQUEST']._serialized_start=898 + _globals['_COMMITREQUEST']._serialized_end=967 + _globals['_COMMITCONFIRM']._serialized_start=969 + _globals['_COMMITCONFIRM']._serialized_end=984 + _globals['_COMMITCANCEL']._serialized_start=986 + _globals['_COMMITCANCEL']._serialized_end=1000 + _globals['_COMMITSETROLLBACKDURATION']._serialized_start=1002 + _globals['_COMMITSETROLLBACKDURATION']._serialized_end=1083 + _globals['_DEPTH']._serialized_start=1085 + _globals['_DEPTH']._serialized_end=1107 # @@protoc_insertion_point(module_scope) diff --git a/proto/gnmi_ext/gnmi_ext_pb2_grpc.py b/proto/gnmi_ext/gnmi_ext_pb2_grpc.py index a894352..ee38944 100644 --- a/proto/gnmi_ext/gnmi_ext_pb2_grpc.py +++ b/proto/gnmi_ext/gnmi_ext_pb2_grpc.py @@ -1,3 +1,24 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings + +GRPC_GENERATED_VERSION = '1.66.2' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in proto/gnmi_ext/gnmi_ext_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/proto/target/target.pb.go b/proto/target/target.pb.go index 8e0d3c6..31070f7 100644 --- a/proto/target/target.pb.go +++ b/proto/target/target.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.0 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: proto/target/target.proto // Package target contains messages for defining a configuration of a caching diff --git a/proto/target/target.proto b/proto/target/target.proto index 768f964..ea1372d 100644 --- a/proto/target/target.proto +++ b/proto/target/target.proto @@ -47,7 +47,6 @@ message Configuration { // guarantee. Consumers should account for atomicity constraints of their // environment and any custom encoding. int64 revision = 536870911; - } // Target is the information necessary to establish a single gNMI Subscribe RPC diff --git a/proto/target/target_pb2.py b/proto/target/target_pb2.py index fecdf25..cedc075 100644 --- a/proto/target/target_pb2.py +++ b/proto/target/target_pb2.py @@ -1,13 +1,22 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: proto/target/target.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +# Protobuf Python Version: 5.27.2 +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'proto/target/target.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,405 +25,34 @@ from github.com.openconfig.gnmi.proto.gnmi import gnmi_pb2 as github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi_dot_gnmi__pb2 -DESCRIPTOR = _descriptor.FileDescriptor( - name='proto/target/target.proto', - package='target', - syntax='proto3', - serialized_pb=_b('\n\x19proto/target/target.proto\x12\x06target\x1a\x30github.com/openconfig/gnmi/proto/gnmi/gnmi.proto\"\x85\x03\n\rConfiguration\x12\x33\n\x07request\x18\x01 \x03(\x0b\x32\".target.Configuration.RequestEntry\x12\x31\n\x06target\x18\x02 \x03(\x0b\x32!.target.Configuration.TargetEntry\x12\x13\n\x0binstance_id\x18\x03 \x01(\t\x12-\n\x04meta\x18\x04 \x03(\x0b\x32\x1f.target.Configuration.MetaEntry\x12\x14\n\x08revision\x18\xff\xff\xff\xff\x01 \x01(\x03\x1a\x46\n\x0cRequestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.gnmi.SubscribeRequest:\x02\x38\x01\x1a=\n\x0bTargetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.target.Target:\x02\x38\x01\x1a+\n\tMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbb\x01\n\x06Target\x12\x11\n\taddresses\x18\x01 \x03(\t\x12(\n\x0b\x63redentials\x18\x02 \x01(\x0b\x32\x13.target.Credentials\x12\x0f\n\x07request\x18\x03 \x01(\t\x12&\n\x04meta\x18\x04 \x03(\x0b\x32\x18.target.Target.MetaEntry\x12\x0e\n\x06\x64ialer\x18\x05 \x01(\t\x1a+\n\tMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x0b\x43redentials\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\x12\x13\n\x0bpassword_id\x18\x03 \x01(\tB)Z\'github.com/openconfig/gnmi/proto/targetb\x06proto3') - , - dependencies=[github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi_dot_gnmi__pb2.DESCRIPTOR,]) - - - - -_CONFIGURATION_REQUESTENTRY = _descriptor.Descriptor( - name='RequestEntry', - full_name='target.Configuration.RequestEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='target.Configuration.RequestEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='target.Configuration.RequestEntry.value', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=299, - serialized_end=369, -) - -_CONFIGURATION_TARGETENTRY = _descriptor.Descriptor( - name='TargetEntry', - full_name='target.Configuration.TargetEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='target.Configuration.TargetEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='target.Configuration.TargetEntry.value', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=371, - serialized_end=432, -) - -_CONFIGURATION_METAENTRY = _descriptor.Descriptor( - name='MetaEntry', - full_name='target.Configuration.MetaEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='target.Configuration.MetaEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='target.Configuration.MetaEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=434, - serialized_end=477, -) - -_CONFIGURATION = _descriptor.Descriptor( - name='Configuration', - full_name='target.Configuration', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='request', full_name='target.Configuration.request', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='target', full_name='target.Configuration.target', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='instance_id', full_name='target.Configuration.instance_id', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='meta', full_name='target.Configuration.meta', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='revision', full_name='target.Configuration.revision', index=4, - number=536870911, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_CONFIGURATION_REQUESTENTRY, _CONFIGURATION_TARGETENTRY, _CONFIGURATION_METAENTRY, ], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=88, - serialized_end=477, -) - - -_TARGET_METAENTRY = _descriptor.Descriptor( - name='MetaEntry', - full_name='target.Target.MetaEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='target.Target.MetaEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='target.Target.MetaEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=434, - serialized_end=477, -) - -_TARGET = _descriptor.Descriptor( - name='Target', - full_name='target.Target', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='addresses', full_name='target.Target.addresses', index=0, - number=1, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='credentials', full_name='target.Target.credentials', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='request', full_name='target.Target.request', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='meta', full_name='target.Target.meta', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='dialer', full_name='target.Target.dialer', index=4, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_TARGET_METAENTRY, ], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=480, - serialized_end=667, -) - - -_CREDENTIALS = _descriptor.Descriptor( - name='Credentials', - full_name='target.Credentials', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='username', full_name='target.Credentials.username', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='password', full_name='target.Credentials.password', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='password_id', full_name='target.Credentials.password_id', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=669, - serialized_end=739, -) - -_CONFIGURATION_REQUESTENTRY.fields_by_name['value'].message_type = github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi_dot_gnmi__pb2._SUBSCRIBEREQUEST -_CONFIGURATION_REQUESTENTRY.containing_type = _CONFIGURATION -_CONFIGURATION_TARGETENTRY.fields_by_name['value'].message_type = _TARGET -_CONFIGURATION_TARGETENTRY.containing_type = _CONFIGURATION -_CONFIGURATION_METAENTRY.containing_type = _CONFIGURATION -_CONFIGURATION.fields_by_name['request'].message_type = _CONFIGURATION_REQUESTENTRY -_CONFIGURATION.fields_by_name['target'].message_type = _CONFIGURATION_TARGETENTRY -_CONFIGURATION.fields_by_name['meta'].message_type = _CONFIGURATION_METAENTRY -_TARGET_METAENTRY.containing_type = _TARGET -_TARGET.fields_by_name['credentials'].message_type = _CREDENTIALS -_TARGET.fields_by_name['meta'].message_type = _TARGET_METAENTRY -DESCRIPTOR.message_types_by_name['Configuration'] = _CONFIGURATION -DESCRIPTOR.message_types_by_name['Target'] = _TARGET -DESCRIPTOR.message_types_by_name['Credentials'] = _CREDENTIALS -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Configuration = _reflection.GeneratedProtocolMessageType('Configuration', (_message.Message,), dict( - - RequestEntry = _reflection.GeneratedProtocolMessageType('RequestEntry', (_message.Message,), dict( - DESCRIPTOR = _CONFIGURATION_REQUESTENTRY, - __module__ = 'proto.target.target_pb2' - # @@protoc_insertion_point(class_scope:target.Configuration.RequestEntry) - )) - , - - TargetEntry = _reflection.GeneratedProtocolMessageType('TargetEntry', (_message.Message,), dict( - DESCRIPTOR = _CONFIGURATION_TARGETENTRY, - __module__ = 'proto.target.target_pb2' - # @@protoc_insertion_point(class_scope:target.Configuration.TargetEntry) - )) - , - - MetaEntry = _reflection.GeneratedProtocolMessageType('MetaEntry', (_message.Message,), dict( - DESCRIPTOR = _CONFIGURATION_METAENTRY, - __module__ = 'proto.target.target_pb2' - # @@protoc_insertion_point(class_scope:target.Configuration.MetaEntry) - )) - , - DESCRIPTOR = _CONFIGURATION, - __module__ = 'proto.target.target_pb2' - # @@protoc_insertion_point(class_scope:target.Configuration) - )) -_sym_db.RegisterMessage(Configuration) -_sym_db.RegisterMessage(Configuration.RequestEntry) -_sym_db.RegisterMessage(Configuration.TargetEntry) -_sym_db.RegisterMessage(Configuration.MetaEntry) - -Target = _reflection.GeneratedProtocolMessageType('Target', (_message.Message,), dict( - - MetaEntry = _reflection.GeneratedProtocolMessageType('MetaEntry', (_message.Message,), dict( - DESCRIPTOR = _TARGET_METAENTRY, - __module__ = 'proto.target.target_pb2' - # @@protoc_insertion_point(class_scope:target.Target.MetaEntry) - )) - , - DESCRIPTOR = _TARGET, - __module__ = 'proto.target.target_pb2' - # @@protoc_insertion_point(class_scope:target.Target) - )) -_sym_db.RegisterMessage(Target) -_sym_db.RegisterMessage(Target.MetaEntry) - -Credentials = _reflection.GeneratedProtocolMessageType('Credentials', (_message.Message,), dict( - DESCRIPTOR = _CREDENTIALS, - __module__ = 'proto.target.target_pb2' - # @@protoc_insertion_point(class_scope:target.Credentials) - )) -_sym_db.RegisterMessage(Credentials) - - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z\'github.com/openconfig/gnmi/proto/target')) -_CONFIGURATION_REQUESTENTRY.has_options = True -_CONFIGURATION_REQUESTENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -_CONFIGURATION_TARGETENTRY.has_options = True -_CONFIGURATION_TARGETENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -_CONFIGURATION_METAENTRY.has_options = True -_CONFIGURATION_METAENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) -_TARGET_METAENTRY.has_options = True -_TARGET_METAENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19proto/target/target.proto\x12\x06target\x1a\x30github.com/openconfig/gnmi/proto/gnmi/gnmi.proto\"\x85\x03\n\rConfiguration\x12\x33\n\x07request\x18\x01 \x03(\x0b\x32\".target.Configuration.RequestEntry\x12\x31\n\x06target\x18\x02 \x03(\x0b\x32!.target.Configuration.TargetEntry\x12\x13\n\x0binstance_id\x18\x03 \x01(\t\x12-\n\x04meta\x18\x04 \x03(\x0b\x32\x1f.target.Configuration.MetaEntry\x12\x14\n\x08revision\x18\xff\xff\xff\xff\x01 \x01(\x03\x1a\x46\n\x0cRequestEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.gnmi.SubscribeRequest:\x02\x38\x01\x1a=\n\x0bTargetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.target.Target:\x02\x38\x01\x1a+\n\tMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xbb\x01\n\x06Target\x12\x11\n\taddresses\x18\x01 \x03(\t\x12(\n\x0b\x63redentials\x18\x02 \x01(\x0b\x32\x13.target.Credentials\x12\x0f\n\x07request\x18\x03 \x01(\t\x12&\n\x04meta\x18\x04 \x03(\x0b\x32\x18.target.Target.MetaEntry\x12\x0e\n\x06\x64ialer\x18\x05 \x01(\t\x1a+\n\tMetaEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x0b\x43redentials\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\x12\x13\n\x0bpassword_id\x18\x03 \x01(\tB)Z\'github.com/openconfig/gnmi/proto/targetb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.target.target_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'Z\'github.com/openconfig/gnmi/proto/target' + _globals['_CONFIGURATION_REQUESTENTRY']._loaded_options = None + _globals['_CONFIGURATION_REQUESTENTRY']._serialized_options = b'8\001' + _globals['_CONFIGURATION_TARGETENTRY']._loaded_options = None + _globals['_CONFIGURATION_TARGETENTRY']._serialized_options = b'8\001' + _globals['_CONFIGURATION_METAENTRY']._loaded_options = None + _globals['_CONFIGURATION_METAENTRY']._serialized_options = b'8\001' + _globals['_TARGET_METAENTRY']._loaded_options = None + _globals['_TARGET_METAENTRY']._serialized_options = b'8\001' + _globals['_CONFIGURATION']._serialized_start=88 + _globals['_CONFIGURATION']._serialized_end=477 + _globals['_CONFIGURATION_REQUESTENTRY']._serialized_start=299 + _globals['_CONFIGURATION_REQUESTENTRY']._serialized_end=369 + _globals['_CONFIGURATION_TARGETENTRY']._serialized_start=371 + _globals['_CONFIGURATION_TARGETENTRY']._serialized_end=432 + _globals['_CONFIGURATION_METAENTRY']._serialized_start=434 + _globals['_CONFIGURATION_METAENTRY']._serialized_end=477 + _globals['_TARGET']._serialized_start=480 + _globals['_TARGET']._serialized_end=667 + _globals['_TARGET_METAENTRY']._serialized_start=434 + _globals['_TARGET_METAENTRY']._serialized_end=477 + _globals['_CREDENTIALS']._serialized_start=669 + _globals['_CREDENTIALS']._serialized_end=739 # @@protoc_insertion_point(module_scope) diff --git a/proto/target/target_pb2_grpc.py b/proto/target/target_pb2_grpc.py index a894352..4bf0ab1 100644 --- a/proto/target/target_pb2_grpc.py +++ b/proto/target/target_pb2_grpc.py @@ -1,3 +1,24 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings + +GRPC_GENERATED_VERSION = '1.66.2' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in proto/target/target_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/testing/fake/gnmi/agent.go b/testing/fake/gnmi/agent.go index 034a5f8..326e764 100644 --- a/testing/fake/gnmi/agent.go +++ b/testing/fake/gnmi/agent.go @@ -205,5 +205,8 @@ func (a *Agent) Subscribe(stream gnmipb.GNMI_SubscribeServer) error { func (a *Agent) Requests() []*gnmipb.SubscribeRequest { a.cMu.Lock() defer a.cMu.Unlock() - return a.client.requests + if a.client == nil { + return nil + } + return a.client.Requests() } diff --git a/testing/fake/gnmi/client.go b/testing/fake/gnmi/client.go index 98c62b6..da33502 100644 --- a/testing/fake/gnmi/client.go +++ b/testing/fake/gnmi/client.go @@ -25,6 +25,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc" "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/proto" "github.com/openconfig/gnmi/testing/fake/queue" gpb "github.com/openconfig/gnmi/proto/gnmi" @@ -34,14 +35,19 @@ import ( // Client contains information about a client that has connected to the fake. type Client struct { errors int64 - config *fpb.Config + subscribe *gpb.SubscriptionList polled chan struct{} - mu sync.RWMutex - canceled bool canceledCh chan struct{} - q queue.Queue - subscribe *gpb.SubscriptionList - requests []*gpb.SubscribeRequest + + mu sync.RWMutex // mutex for read/write access to config and canceled values + config *fpb.Config + canceled bool + + qMu sync.Mutex // mutex for accessing the queue + q queue.Queue + + rMu sync.Mutex // mutex for accessing requests + requests []*gpb.SubscribeRequest } // NewClient returns a new initialized client. @@ -58,6 +64,13 @@ func (c *Client) String() string { return c.config.Target } +// addRequest adds a subscribe request to the list of requests received by the client. +func (c *Client) addRequest(req *gpb.SubscribeRequest) { + c.rMu.Lock() + defer c.rMu.Unlock() + c.requests = append(c.requests, req) +} + // Run starts the client. The first message received must be a // SubscriptionList. Once the client is started, it will run until the stream // is closed or the schedule completes. For Poll queries the Run will block @@ -86,7 +99,7 @@ func (c *Client) Run(stream gpb.GNMI_SubscribeServer) (err error) { } return grpc.Errorf(grpc.Code(err), "received error from client") } - c.requests = append(c.requests, query) + c.addRequest(query) log.V(1).Infof("Client %s received initial query: %v", c, query) c.subscribe = query.GetSubscribe() @@ -109,7 +122,7 @@ func (c *Client) Run(stream gpb.GNMI_SubscribeServer) (err error) { func (c *Client) Close() { c.mu.Lock() defer c.mu.Unlock() - if c.config.DisableEof { + if c.config != nil && c.config.DisableEof { // If the cancel signal has already been sent by a previous close, then we // do not need to resend it. select { @@ -143,7 +156,7 @@ func (c *Client) recv(stream gpb.GNMI_SubscribeServer) { log.V(1).Infof("Client %s received io.EOF", c) return case nil: - c.requests = append(c.requests, event) + c.addRequest(event) } if c.subscribe.Mode == gpb.SubscriptionList_POLL { log.V(1).Infof("Client %s received Poll event: %v", c, event) @@ -163,29 +176,55 @@ func (c *Client) recv(stream gpb.GNMI_SubscribeServer) { } } +// Requests returns the subscribe requests received by the client. +func (c *Client) Requests() []*gpb.SubscribeRequest { + c.rMu.Lock() + defer c.rMu.Unlock() + return c.requests +} + +// isCanceled returned whether the client has canceled. +func (c *Client) isCanceled() bool { + c.mu.RLock() + defer c.mu.RUnlock() + return c.canceled +} + +// setQueue sets the client's queue to the provided value. +func (c *Client) setQueue(q queue.Queue) { + c.qMu.Lock() + defer c.qMu.Unlock() + c.q = q +} + +// nextInQueue returns the next event in the client's queue, unless the client is canceled. +func (c *Client) nextInQueue() (any, error) { + c.qMu.Lock() + defer c.qMu.Unlock() + if c.q == nil { + return nil, fmt.Errorf("nil client queue: nothing to do") + } + if c.isCanceled() { + return nil, fmt.Errorf("client canceled") + } + n, err := c.q.Next() + if err != nil { + c.errors++ + return nil, fmt.Errorf("unexpected queue Next(): %v", err) + } + return n, nil +} + // processQueue makes a copy of q then will process values in the queue until // the queue is complete or an error. Each value is converted into a gNMI // notification and sent on stream. func (c *Client) processQueue(stream gpb.GNMI_SubscribeServer) error { - c.mu.RLock() - q := c.q - c.mu.RUnlock() - if q == nil { - return fmt.Errorf("nil client queue nothing to do") - } for { - c.mu.RLock() - canceled := c.canceled - c.mu.RUnlock() - if canceled { - return fmt.Errorf("client canceled") - } - - event, err := q.Next() + event, err := c.nextInQueue() if err != nil { - c.errors++ - return fmt.Errorf("unexpected queue Next(): %v", err) + return err } + if event == nil { switch { case c.subscribe.Mode == gpb.SubscriptionList_POLL: @@ -207,7 +246,8 @@ func (c *Client) processQueue(stream gpb.GNMI_SubscribeServer) error { return err } case *gpb.SubscribeResponse: - resp = v + // Copy into resp to not modify the original. + resp = proto.Clone(v).(*gpb.SubscribeResponse) } // If the subscription request specified a target explicitly... if sp := c.subscribe.GetPrefix(); sp != nil { @@ -271,14 +311,14 @@ func (c *Client) reset() error { Value: &fpb.Value_Sync{uint64(1)}, }) } - c.q = q + c.setQueue(q) case c.config.GetFixed() != nil: q := queue.NewFixed(c.config.GetFixed().Responses, c.config.EnableDelay) // Inject sync message after latest provided update in the config. if !c.config.DisableSync { q.Add(syncResp) } - c.q = q + c.setQueue(q) } return nil } diff --git a/testing/fake/gnmi/gnmi_test.go b/testing/fake/gnmi/gnmi_test.go index b29efc5..7032ae6 100644 --- a/testing/fake/gnmi/gnmi_test.go +++ b/testing/fake/gnmi/gnmi_test.go @@ -26,10 +26,12 @@ import ( "sync" "testing" + "github.com/google/go-cmp/cmp" "github.com/kylelemons/godebug/pretty" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc" + "google.golang.org/protobuf/testing/protocmp" "github.com/openconfig/gnmi/testing/fake/testing/grpc/config" gnmipb "github.com/openconfig/gnmi/proto/gnmi" @@ -443,6 +445,83 @@ func TestNewAgent(t *testing.T) { if got, want := a.State(), fpb.State_STOPPED; got != want { t.Errorf("New(%q).Close() failed: got %q, want %q", tc.config, got, want) } + gotSubscribeRequests := a.Requests() + if len(gotSubscribeRequests) != 1 { + t.Errorf("New(%q).Requests() failed: got %q, want %q", tc.config, gotSubscribeRequests, []*gnmipb.SubscribeRequest{sub}) + } }) } } + +func TestAddRequest(t *testing.T) { + t.Run("add requests client", func(t *testing.T) { + c := NewClient(&fpb.Config{}) + wantSR := &gnmipb.SubscribeRequest{ + Request: &gnmipb.SubscribeRequest_Subscribe{ + Subscribe: &gnmipb.SubscriptionList{}, + }, + } + c.addRequest(wantSR) + if got, want := len(c.Requests()), 1; got != want { + t.Errorf("addRequest() failed: got %d, want %d", got, want) + } + gotReq := c.Requests()[0] + if diff := cmp.Diff(gotReq, wantSR, protocmp.Transform()); diff != "" { + t.Errorf("addRequest() failed: got %v, want %v, diff %s", gotReq, wantSR, diff) + } + }) + t.Run("nil client, agent requests", func(t *testing.T) { + config := &fpb.Config{} + a, err := New(config, nil) + if err != nil { + t.Fatalf("New() returned unexpected error: %v", err) + } + requests := a.Requests() + if requests != nil { + t.Errorf("Received non-nil return from agent requests: %v, want nil", requests) + } + }) +} + +type fakeQueue struct { + val any + err error +} + +func (f *fakeQueue) Next() (any, error) { + return f.val, f.err +} + +func TestClientQueue(t *testing.T) { + t.Run("nil queue client", func(t *testing.T) { + c := NewClient(nil) + if _, err := c.nextInQueue(); err == nil { + t.Errorf("expected error from nextInQueue, but received nil") + } + }) + + t.Run("queue request after cancelled", func(t *testing.T) { + c := NewClient(nil) + f := &fakeQueue{} + c.setQueue(f) + if _, err := c.nextInQueue(); err != nil { + t.Fatalf("unexpected error from nextInQueue: %v", err) + } + c.Close() + if _, err := c.nextInQueue(); err == nil { + t.Errorf("nextInQueue processed, despite client being canceled") + } + }) + + t.Run("queue next unexpected err", func(t *testing.T) { + c := NewClient(nil) + f := &fakeQueue{err: fmt.Errorf("unexpected err")} + c.setQueue(f) + if _, err := c.nextInQueue(); err == nil { + t.Errorf("error not returned from nextInQueue, despite queue.Next() returning err") + } + if c.errors == 0 { + t.Errorf("expected error count to increment, but got 0") + } + }) +} diff --git a/testing/fake/proto/fake.pb.go b/testing/fake/proto/fake.pb.go index d8c541c..572f776 100644 --- a/testing/fake/proto/fake.pb.go +++ b/testing/fake/proto/fake.pb.go @@ -19,8 +19,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.0 +// protoc-gen-go v1.33.0 +// protoc v3.21.12 // source: testing/fake/proto/fake.proto package gnmi_fake diff --git a/testing/fake/proto/fake_grpc.pb.go b/testing/fake/proto/fake_grpc.pb.go index 63c433b..8690388 100644 --- a/testing/fake/proto/fake_grpc.pb.go +++ b/testing/fake/proto/fake_grpc.pb.go @@ -11,7 +11,6 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // AgentManagerClient is the client API for AgentManager service. @@ -94,8 +93,8 @@ type UnsafeAgentManagerServer interface { mustEmbedUnimplementedAgentManagerServer() } -func RegisterAgentManagerServer(s grpc.ServiceRegistrar, srv AgentManagerServer) { - s.RegisterService(&AgentManager_ServiceDesc, srv) +func RegisterAgentManagerServer(s *grpc.Server, srv AgentManagerServer) { + s.RegisterService(&_AgentManager_serviceDesc, srv) } func _AgentManager_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -152,10 +151,7 @@ func _AgentManager_Status_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -// AgentManager_ServiceDesc is the grpc.ServiceDesc for AgentManager service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var AgentManager_ServiceDesc = grpc.ServiceDesc{ +var _AgentManager_serviceDesc = grpc.ServiceDesc{ ServiceName: "gnmi.fake.AgentManager", HandlerType: (*AgentManagerServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/testing/fake/proto/fake_pb2.py b/testing/fake/proto/fake_pb2.py index effe388..dd56892 100644 --- a/testing/fake/proto/fake_pb2.py +++ b/testing/fake/proto/fake_pb2.py @@ -1,14 +1,22 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: testing/fake/proto/fake.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper +# Protobuf Python Version: 5.27.2 +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'testing/fake/proto/fake.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -18,1453 +26,66 @@ from github.com.openconfig.gnmi.proto.gnmi import gnmi_pb2 as github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi_dot_gnmi__pb2 -DESCRIPTOR = _descriptor.FileDescriptor( - name='testing/fake/proto/fake.proto', - package='gnmi.fake', - syntax='proto3', - serialized_pb=_b('\n\x1dtesting/fake/proto/fake.proto\x12\tgnmi.fake\x1a\x19google/protobuf/any.proto\x1a\x30github.com/openconfig/gnmi/proto/gnmi/gnmi.proto\"2\n\rConfiguration\x12!\n\x06\x63onfig\x18\x01 \x03(\x0b\x32\x11.gnmi.fake.Config\"1\n\x0b\x43redentials\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\x8c\x04\n\x06\x43onfig\x12\x0e\n\x06target\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x10\n\x04seed\x18\x06 \x01(\x03\x42\x02\x18\x01\x12$\n\x06values\x18\x03 \x03(\x0b\x32\x10.gnmi.fake.ValueB\x02\x18\x01\x12\x14\n\x0c\x64isable_sync\x18\x04 \x01(\x08\x12\x31\n\x0b\x63lient_type\x18\x05 \x01(\x0e\x32\x1c.gnmi.fake.Config.ClientType\x12\x13\n\x0b\x64isable_eof\x18\x07 \x01(\x08\x12+\n\x0b\x63redentials\x18\x08 \x01(\x0b\x32\x16.gnmi.fake.Credentials\x12\x0c\n\x04\x63\x65rt\x18\t \x01(\x0c\x12\x14\n\x0c\x65nable_delay\x18\n \x01(\x08\x12&\n\x06\x63ustom\x18\x64 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12,\n\x06random\x18\x65 \x01(\x0b\x32\x1a.gnmi.fake.RandomGeneratorH\x00\x12*\n\x05\x66ixed\x18\x66 \x01(\x0b\x32\x19.gnmi.fake.FixedGeneratorH\x00\x12\x13\n\x0btunnel_addr\x18\x0b \x01(\t\x12\x12\n\ntunnel_crt\x18\x0c \x01(\t\"E\n\nClientType\x12\x08\n\x04GRPC\x10\x00\x12\n\n\x06STUBBY\x10\x01\x12\r\n\tGRPC_GNMI\x10\x02\x12\x12\n\x0eGRPC_GNMI_PROD\x10\x03\x42\x0b\n\tgenerator\"<\n\x0e\x46ixedGenerator\x12*\n\tresponses\x18\x01 \x03(\x0b\x32\x17.gnmi.SubscribeResponse\"A\n\x0fRandomGenerator\x12\x0c\n\x04seed\x18\x01 \x01(\x03\x12 \n\x06values\x18\x02 \x03(\x0b\x32\x10.gnmi.fake.Value\"\r\n\x0b\x44\x65leteValue\"\xba\x03\n\x05Value\x12\x0c\n\x04path\x18\x01 \x03(\t\x12\'\n\ttimestamp\x18\x02 \x01(\x0b\x32\x14.gnmi.fake.Timestamp\x12\x0e\n\x06repeat\x18\x06 \x01(\x05\x12\x0c\n\x04seed\x18\x07 \x01(\x03\x12(\n\tint_value\x18\x64 \x01(\x0b\x32\x13.gnmi.fake.IntValueH\x00\x12.\n\x0c\x64ouble_value\x18\x65 \x01(\x0b\x32\x16.gnmi.fake.DoubleValueH\x00\x12.\n\x0cstring_value\x18\x66 \x01(\x0b\x32\x16.gnmi.fake.StringValueH\x00\x12\x0e\n\x04sync\x18g \x01(\x04H\x00\x12(\n\x06\x64\x65lete\x18h \x01(\x0b\x32\x16.gnmi.fake.DeleteValueH\x00\x12*\n\nbool_value\x18i \x01(\x0b\x32\x14.gnmi.fake.BoolValueH\x00\x12*\n\nuint_value\x18j \x01(\x0b\x32\x14.gnmi.fake.UintValueH\x00\x12\x37\n\x11string_list_value\x18k \x01(\x0b\x32\x1a.gnmi.fake.StringListValueH\x00\x42\x07\n\x05value\"D\n\tTimestamp\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\x11\n\tdelta_min\x18\x02 \x01(\x03\x12\x11\n\tdelta_max\x18\x03 \x01(\x03\"s\n\x08IntValue\x12\r\n\x05value\x18\x01 \x01(\x03\x12$\n\x05range\x18\x02 \x01(\x0b\x32\x13.gnmi.fake.IntRangeH\x00\x12\"\n\x04list\x18\x03 \x01(\x0b\x32\x12.gnmi.fake.IntListH\x00\x42\x0e\n\x0c\x64istribution\"R\n\x08IntRange\x12\x0f\n\x07minimum\x18\x01 \x01(\x03\x12\x0f\n\x07maximum\x18\x02 \x01(\x03\x12\x11\n\tdelta_min\x18\x03 \x01(\x03\x12\x11\n\tdelta_max\x18\x04 \x01(\x03\"*\n\x07IntList\x12\x0f\n\x07options\x18\x01 \x03(\x03\x12\x0e\n\x06random\x18\x02 \x01(\x08\"|\n\x0b\x44oubleValue\x12\r\n\x05value\x18\x01 \x01(\x01\x12\'\n\x05range\x18\x02 \x01(\x0b\x32\x16.gnmi.fake.DoubleRangeH\x00\x12%\n\x04list\x18\x03 \x01(\x0b\x32\x15.gnmi.fake.DoubleListH\x00\x42\x0e\n\x0c\x64istribution\"U\n\x0b\x44oubleRange\x12\x0f\n\x07minimum\x18\x01 \x01(\x01\x12\x0f\n\x07maximum\x18\x02 \x01(\x01\x12\x11\n\tdelta_min\x18\x03 \x01(\x01\x12\x11\n\tdelta_max\x18\x04 \x01(\x01\"-\n\nDoubleList\x12\x0f\n\x07options\x18\x01 \x03(\x01\x12\x0e\n\x06random\x18\x02 \x01(\x08\"S\n\x0bStringValue\x12\r\n\x05value\x18\x01 \x01(\t\x12%\n\x04list\x18\x02 \x01(\x0b\x32\x15.gnmi.fake.StringListH\x00\x42\x0e\n\x0c\x64istribution\"-\n\nStringList\x12\x0f\n\x07options\x18\x01 \x03(\t\x12\x0e\n\x06random\x18\x02 \x01(\x08\"W\n\x0fStringListValue\x12\r\n\x05value\x18\x01 \x03(\t\x12%\n\x04list\x18\x02 \x01(\x0b\x32\x15.gnmi.fake.StringListH\x00\x42\x0e\n\x0c\x64istribution\"O\n\tBoolValue\x12\r\n\x05value\x18\x01 \x01(\x08\x12#\n\x04list\x18\x02 \x01(\x0b\x32\x13.gnmi.fake.BoolListH\x00\x42\x0e\n\x0c\x64istribution\"+\n\x08\x42oolList\x12\x0f\n\x07options\x18\x01 \x03(\x08\x12\x0e\n\x06random\x18\x02 \x01(\x08\"v\n\tUintValue\x12\r\n\x05value\x18\x01 \x01(\x04\x12%\n\x05range\x18\x02 \x01(\x0b\x32\x14.gnmi.fake.UintRangeH\x00\x12#\n\x04list\x18\x03 \x01(\x0b\x32\x13.gnmi.fake.UintListH\x00\x42\x0e\n\x0c\x64istribution\"S\n\tUintRange\x12\x0f\n\x07minimum\x18\x01 \x01(\x04\x12\x0f\n\x07maximum\x18\x02 \x01(\x04\x12\x11\n\tdelta_min\x18\x03 \x01(\x03\x12\x11\n\tdelta_max\x18\x04 \x01(\x03\"+\n\x08UintList\x12\x0f\n\x07options\x18\x01 \x03(\x04\x12\x0e\n\x06random\x18\x02 \x01(\x08*+\n\x05State\x12\x0b\n\x07STOPPED\x10\x00\x12\x08\n\x04INIT\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x32\x9b\x01\n\x0c\x41gentManager\x12+\n\x03\x41\x64\x64\x12\x11.gnmi.fake.Config\x1a\x11.gnmi.fake.Config\x12.\n\x06Remove\x12\x11.gnmi.fake.Config\x1a\x11.gnmi.fake.Config\x12.\n\x06Status\x12\x11.gnmi.fake.Config\x1a\x11.gnmi.fake.ConfigB9Z7github.com/openconfig/gnmi/testing/fake/proto;gnmi_fakeb\x06proto3') - , - dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi_dot_gnmi__pb2.DESCRIPTOR,]) - -_STATE = _descriptor.EnumDescriptor( - name='State', - full_name='gnmi.fake.State', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='STOPPED', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='INIT', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='RUNNING', index=2, number=2, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=2512, - serialized_end=2555, -) -_sym_db.RegisterEnumDescriptor(_STATE) - -State = enum_type_wrapper.EnumTypeWrapper(_STATE) -STOPPED = 0 -INIT = 1 -RUNNING = 2 - - -_CONFIG_CLIENTTYPE = _descriptor.EnumDescriptor( - name='ClientType', - full_name='gnmi.fake.Config.ClientType', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='GRPC', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='STUBBY', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='GRPC_GNMI', index=2, number=2, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='GRPC_GNMI_PROD', index=3, number=3, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=667, - serialized_end=736, -) -_sym_db.RegisterEnumDescriptor(_CONFIG_CLIENTTYPE) - - -_CONFIGURATION = _descriptor.Descriptor( - name='Configuration', - full_name='gnmi.fake.Configuration', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='config', full_name='gnmi.fake.Configuration.config', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=121, - serialized_end=171, -) - - -_CREDENTIALS = _descriptor.Descriptor( - name='Credentials', - full_name='gnmi.fake.Credentials', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='username', full_name='gnmi.fake.Credentials.username', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='password', full_name='gnmi.fake.Credentials.password', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=173, - serialized_end=222, -) - - -_CONFIG = _descriptor.Descriptor( - name='Config', - full_name='gnmi.fake.Config', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='target', full_name='gnmi.fake.Config.target', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='port', full_name='gnmi.fake.Config.port', index=1, - number=2, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='seed', full_name='gnmi.fake.Config.seed', index=2, - number=6, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='values', full_name='gnmi.fake.Config.values', index=3, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='disable_sync', full_name='gnmi.fake.Config.disable_sync', index=4, - number=4, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='client_type', full_name='gnmi.fake.Config.client_type', index=5, - number=5, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='disable_eof', full_name='gnmi.fake.Config.disable_eof', index=6, - number=7, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='credentials', full_name='gnmi.fake.Config.credentials', index=7, - number=8, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='cert', full_name='gnmi.fake.Config.cert', index=8, - number=9, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='enable_delay', full_name='gnmi.fake.Config.enable_delay', index=9, - number=10, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='custom', full_name='gnmi.fake.Config.custom', index=10, - number=100, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='random', full_name='gnmi.fake.Config.random', index=11, - number=101, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='fixed', full_name='gnmi.fake.Config.fixed', index=12, - number=102, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='tunnel_addr', full_name='gnmi.fake.Config.tunnel_addr', index=13, - number=11, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='tunnel_crt', full_name='gnmi.fake.Config.tunnel_crt', index=14, - number=12, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _CONFIG_CLIENTTYPE, - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='generator', full_name='gnmi.fake.Config.generator', - index=0, containing_type=None, fields=[]), - ], - serialized_start=225, - serialized_end=749, -) - - -_FIXEDGENERATOR = _descriptor.Descriptor( - name='FixedGenerator', - full_name='gnmi.fake.FixedGenerator', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='responses', full_name='gnmi.fake.FixedGenerator.responses', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=751, - serialized_end=811, -) - - -_RANDOMGENERATOR = _descriptor.Descriptor( - name='RandomGenerator', - full_name='gnmi.fake.RandomGenerator', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='seed', full_name='gnmi.fake.RandomGenerator.seed', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='values', full_name='gnmi.fake.RandomGenerator.values', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=813, - serialized_end=878, -) - - -_DELETEVALUE = _descriptor.Descriptor( - name='DeleteValue', - full_name='gnmi.fake.DeleteValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=880, - serialized_end=893, -) - - -_VALUE = _descriptor.Descriptor( - name='Value', - full_name='gnmi.fake.Value', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='path', full_name='gnmi.fake.Value.path', index=0, - number=1, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='timestamp', full_name='gnmi.fake.Value.timestamp', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='repeat', full_name='gnmi.fake.Value.repeat', index=2, - number=6, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='seed', full_name='gnmi.fake.Value.seed', index=3, - number=7, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='int_value', full_name='gnmi.fake.Value.int_value', index=4, - number=100, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='double_value', full_name='gnmi.fake.Value.double_value', index=5, - number=101, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='string_value', full_name='gnmi.fake.Value.string_value', index=6, - number=102, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sync', full_name='gnmi.fake.Value.sync', index=7, - number=103, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delete', full_name='gnmi.fake.Value.delete', index=8, - number=104, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='bool_value', full_name='gnmi.fake.Value.bool_value', index=9, - number=105, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='uint_value', full_name='gnmi.fake.Value.uint_value', index=10, - number=106, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='string_list_value', full_name='gnmi.fake.Value.string_list_value', index=11, - number=107, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='value', full_name='gnmi.fake.Value.value', - index=0, containing_type=None, fields=[]), - ], - serialized_start=896, - serialized_end=1338, -) - - -_TIMESTAMP = _descriptor.Descriptor( - name='Timestamp', - full_name='gnmi.fake.Timestamp', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='timestamp', full_name='gnmi.fake.Timestamp.timestamp', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delta_min', full_name='gnmi.fake.Timestamp.delta_min', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delta_max', full_name='gnmi.fake.Timestamp.delta_max', index=2, - number=3, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1340, - serialized_end=1408, -) - - -_INTVALUE = _descriptor.Descriptor( - name='IntValue', - full_name='gnmi.fake.IntValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='gnmi.fake.IntValue.value', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='range', full_name='gnmi.fake.IntValue.range', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='list', full_name='gnmi.fake.IntValue.list', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='distribution', full_name='gnmi.fake.IntValue.distribution', - index=0, containing_type=None, fields=[]), - ], - serialized_start=1410, - serialized_end=1525, -) - - -_INTRANGE = _descriptor.Descriptor( - name='IntRange', - full_name='gnmi.fake.IntRange', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='minimum', full_name='gnmi.fake.IntRange.minimum', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maximum', full_name='gnmi.fake.IntRange.maximum', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delta_min', full_name='gnmi.fake.IntRange.delta_min', index=2, - number=3, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delta_max', full_name='gnmi.fake.IntRange.delta_max', index=3, - number=4, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1527, - serialized_end=1609, -) - - -_INTLIST = _descriptor.Descriptor( - name='IntList', - full_name='gnmi.fake.IntList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='options', full_name='gnmi.fake.IntList.options', index=0, - number=1, type=3, cpp_type=2, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='random', full_name='gnmi.fake.IntList.random', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1611, - serialized_end=1653, -) - - -_DOUBLEVALUE = _descriptor.Descriptor( - name='DoubleValue', - full_name='gnmi.fake.DoubleValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='gnmi.fake.DoubleValue.value', index=0, - number=1, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='range', full_name='gnmi.fake.DoubleValue.range', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='list', full_name='gnmi.fake.DoubleValue.list', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='distribution', full_name='gnmi.fake.DoubleValue.distribution', - index=0, containing_type=None, fields=[]), - ], - serialized_start=1655, - serialized_end=1779, -) - - -_DOUBLERANGE = _descriptor.Descriptor( - name='DoubleRange', - full_name='gnmi.fake.DoubleRange', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='minimum', full_name='gnmi.fake.DoubleRange.minimum', index=0, - number=1, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maximum', full_name='gnmi.fake.DoubleRange.maximum', index=1, - number=2, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delta_min', full_name='gnmi.fake.DoubleRange.delta_min', index=2, - number=3, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delta_max', full_name='gnmi.fake.DoubleRange.delta_max', index=3, - number=4, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1781, - serialized_end=1866, -) - - -_DOUBLELIST = _descriptor.Descriptor( - name='DoubleList', - full_name='gnmi.fake.DoubleList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='options', full_name='gnmi.fake.DoubleList.options', index=0, - number=1, type=1, cpp_type=5, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='random', full_name='gnmi.fake.DoubleList.random', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1868, - serialized_end=1913, -) - - -_STRINGVALUE = _descriptor.Descriptor( - name='StringValue', - full_name='gnmi.fake.StringValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='gnmi.fake.StringValue.value', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='list', full_name='gnmi.fake.StringValue.list', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='distribution', full_name='gnmi.fake.StringValue.distribution', - index=0, containing_type=None, fields=[]), - ], - serialized_start=1915, - serialized_end=1998, -) - - -_STRINGLIST = _descriptor.Descriptor( - name='StringList', - full_name='gnmi.fake.StringList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='options', full_name='gnmi.fake.StringList.options', index=0, - number=1, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='random', full_name='gnmi.fake.StringList.random', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2000, - serialized_end=2045, -) - - -_STRINGLISTVALUE = _descriptor.Descriptor( - name='StringListValue', - full_name='gnmi.fake.StringListValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='gnmi.fake.StringListValue.value', index=0, - number=1, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='list', full_name='gnmi.fake.StringListValue.list', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='distribution', full_name='gnmi.fake.StringListValue.distribution', - index=0, containing_type=None, fields=[]), - ], - serialized_start=2047, - serialized_end=2134, -) - - -_BOOLVALUE = _descriptor.Descriptor( - name='BoolValue', - full_name='gnmi.fake.BoolValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='gnmi.fake.BoolValue.value', index=0, - number=1, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='list', full_name='gnmi.fake.BoolValue.list', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='distribution', full_name='gnmi.fake.BoolValue.distribution', - index=0, containing_type=None, fields=[]), - ], - serialized_start=2136, - serialized_end=2215, -) - - -_BOOLLIST = _descriptor.Descriptor( - name='BoolList', - full_name='gnmi.fake.BoolList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='options', full_name='gnmi.fake.BoolList.options', index=0, - number=1, type=8, cpp_type=7, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='random', full_name='gnmi.fake.BoolList.random', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2217, - serialized_end=2260, -) - - -_UINTVALUE = _descriptor.Descriptor( - name='UintValue', - full_name='gnmi.fake.UintValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='gnmi.fake.UintValue.value', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='range', full_name='gnmi.fake.UintValue.range', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='list', full_name='gnmi.fake.UintValue.list', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='distribution', full_name='gnmi.fake.UintValue.distribution', - index=0, containing_type=None, fields=[]), - ], - serialized_start=2262, - serialized_end=2380, -) - - -_UINTRANGE = _descriptor.Descriptor( - name='UintRange', - full_name='gnmi.fake.UintRange', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='minimum', full_name='gnmi.fake.UintRange.minimum', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maximum', full_name='gnmi.fake.UintRange.maximum', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delta_min', full_name='gnmi.fake.UintRange.delta_min', index=2, - number=3, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delta_max', full_name='gnmi.fake.UintRange.delta_max', index=3, - number=4, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2382, - serialized_end=2465, -) - - -_UINTLIST = _descriptor.Descriptor( - name='UintList', - full_name='gnmi.fake.UintList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='options', full_name='gnmi.fake.UintList.options', index=0, - number=1, type=4, cpp_type=4, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='random', full_name='gnmi.fake.UintList.random', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2467, - serialized_end=2510, -) - -_CONFIGURATION.fields_by_name['config'].message_type = _CONFIG -_CONFIG.fields_by_name['values'].message_type = _VALUE -_CONFIG.fields_by_name['client_type'].enum_type = _CONFIG_CLIENTTYPE -_CONFIG.fields_by_name['credentials'].message_type = _CREDENTIALS -_CONFIG.fields_by_name['custom'].message_type = google_dot_protobuf_dot_any__pb2._ANY -_CONFIG.fields_by_name['random'].message_type = _RANDOMGENERATOR -_CONFIG.fields_by_name['fixed'].message_type = _FIXEDGENERATOR -_CONFIG_CLIENTTYPE.containing_type = _CONFIG -_CONFIG.oneofs_by_name['generator'].fields.append( - _CONFIG.fields_by_name['custom']) -_CONFIG.fields_by_name['custom'].containing_oneof = _CONFIG.oneofs_by_name['generator'] -_CONFIG.oneofs_by_name['generator'].fields.append( - _CONFIG.fields_by_name['random']) -_CONFIG.fields_by_name['random'].containing_oneof = _CONFIG.oneofs_by_name['generator'] -_CONFIG.oneofs_by_name['generator'].fields.append( - _CONFIG.fields_by_name['fixed']) -_CONFIG.fields_by_name['fixed'].containing_oneof = _CONFIG.oneofs_by_name['generator'] -_FIXEDGENERATOR.fields_by_name['responses'].message_type = github_dot_com_dot_openconfig_dot_gnmi_dot_proto_dot_gnmi_dot_gnmi__pb2._SUBSCRIBERESPONSE -_RANDOMGENERATOR.fields_by_name['values'].message_type = _VALUE -_VALUE.fields_by_name['timestamp'].message_type = _TIMESTAMP -_VALUE.fields_by_name['int_value'].message_type = _INTVALUE -_VALUE.fields_by_name['double_value'].message_type = _DOUBLEVALUE -_VALUE.fields_by_name['string_value'].message_type = _STRINGVALUE -_VALUE.fields_by_name['delete'].message_type = _DELETEVALUE -_VALUE.fields_by_name['bool_value'].message_type = _BOOLVALUE -_VALUE.fields_by_name['uint_value'].message_type = _UINTVALUE -_VALUE.fields_by_name['string_list_value'].message_type = _STRINGLISTVALUE -_VALUE.oneofs_by_name['value'].fields.append( - _VALUE.fields_by_name['int_value']) -_VALUE.fields_by_name['int_value'].containing_oneof = _VALUE.oneofs_by_name['value'] -_VALUE.oneofs_by_name['value'].fields.append( - _VALUE.fields_by_name['double_value']) -_VALUE.fields_by_name['double_value'].containing_oneof = _VALUE.oneofs_by_name['value'] -_VALUE.oneofs_by_name['value'].fields.append( - _VALUE.fields_by_name['string_value']) -_VALUE.fields_by_name['string_value'].containing_oneof = _VALUE.oneofs_by_name['value'] -_VALUE.oneofs_by_name['value'].fields.append( - _VALUE.fields_by_name['sync']) -_VALUE.fields_by_name['sync'].containing_oneof = _VALUE.oneofs_by_name['value'] -_VALUE.oneofs_by_name['value'].fields.append( - _VALUE.fields_by_name['delete']) -_VALUE.fields_by_name['delete'].containing_oneof = _VALUE.oneofs_by_name['value'] -_VALUE.oneofs_by_name['value'].fields.append( - _VALUE.fields_by_name['bool_value']) -_VALUE.fields_by_name['bool_value'].containing_oneof = _VALUE.oneofs_by_name['value'] -_VALUE.oneofs_by_name['value'].fields.append( - _VALUE.fields_by_name['uint_value']) -_VALUE.fields_by_name['uint_value'].containing_oneof = _VALUE.oneofs_by_name['value'] -_VALUE.oneofs_by_name['value'].fields.append( - _VALUE.fields_by_name['string_list_value']) -_VALUE.fields_by_name['string_list_value'].containing_oneof = _VALUE.oneofs_by_name['value'] -_INTVALUE.fields_by_name['range'].message_type = _INTRANGE -_INTVALUE.fields_by_name['list'].message_type = _INTLIST -_INTVALUE.oneofs_by_name['distribution'].fields.append( - _INTVALUE.fields_by_name['range']) -_INTVALUE.fields_by_name['range'].containing_oneof = _INTVALUE.oneofs_by_name['distribution'] -_INTVALUE.oneofs_by_name['distribution'].fields.append( - _INTVALUE.fields_by_name['list']) -_INTVALUE.fields_by_name['list'].containing_oneof = _INTVALUE.oneofs_by_name['distribution'] -_DOUBLEVALUE.fields_by_name['range'].message_type = _DOUBLERANGE -_DOUBLEVALUE.fields_by_name['list'].message_type = _DOUBLELIST -_DOUBLEVALUE.oneofs_by_name['distribution'].fields.append( - _DOUBLEVALUE.fields_by_name['range']) -_DOUBLEVALUE.fields_by_name['range'].containing_oneof = _DOUBLEVALUE.oneofs_by_name['distribution'] -_DOUBLEVALUE.oneofs_by_name['distribution'].fields.append( - _DOUBLEVALUE.fields_by_name['list']) -_DOUBLEVALUE.fields_by_name['list'].containing_oneof = _DOUBLEVALUE.oneofs_by_name['distribution'] -_STRINGVALUE.fields_by_name['list'].message_type = _STRINGLIST -_STRINGVALUE.oneofs_by_name['distribution'].fields.append( - _STRINGVALUE.fields_by_name['list']) -_STRINGVALUE.fields_by_name['list'].containing_oneof = _STRINGVALUE.oneofs_by_name['distribution'] -_STRINGLISTVALUE.fields_by_name['list'].message_type = _STRINGLIST -_STRINGLISTVALUE.oneofs_by_name['distribution'].fields.append( - _STRINGLISTVALUE.fields_by_name['list']) -_STRINGLISTVALUE.fields_by_name['list'].containing_oneof = _STRINGLISTVALUE.oneofs_by_name['distribution'] -_BOOLVALUE.fields_by_name['list'].message_type = _BOOLLIST -_BOOLVALUE.oneofs_by_name['distribution'].fields.append( - _BOOLVALUE.fields_by_name['list']) -_BOOLVALUE.fields_by_name['list'].containing_oneof = _BOOLVALUE.oneofs_by_name['distribution'] -_UINTVALUE.fields_by_name['range'].message_type = _UINTRANGE -_UINTVALUE.fields_by_name['list'].message_type = _UINTLIST -_UINTVALUE.oneofs_by_name['distribution'].fields.append( - _UINTVALUE.fields_by_name['range']) -_UINTVALUE.fields_by_name['range'].containing_oneof = _UINTVALUE.oneofs_by_name['distribution'] -_UINTVALUE.oneofs_by_name['distribution'].fields.append( - _UINTVALUE.fields_by_name['list']) -_UINTVALUE.fields_by_name['list'].containing_oneof = _UINTVALUE.oneofs_by_name['distribution'] -DESCRIPTOR.message_types_by_name['Configuration'] = _CONFIGURATION -DESCRIPTOR.message_types_by_name['Credentials'] = _CREDENTIALS -DESCRIPTOR.message_types_by_name['Config'] = _CONFIG -DESCRIPTOR.message_types_by_name['FixedGenerator'] = _FIXEDGENERATOR -DESCRIPTOR.message_types_by_name['RandomGenerator'] = _RANDOMGENERATOR -DESCRIPTOR.message_types_by_name['DeleteValue'] = _DELETEVALUE -DESCRIPTOR.message_types_by_name['Value'] = _VALUE -DESCRIPTOR.message_types_by_name['Timestamp'] = _TIMESTAMP -DESCRIPTOR.message_types_by_name['IntValue'] = _INTVALUE -DESCRIPTOR.message_types_by_name['IntRange'] = _INTRANGE -DESCRIPTOR.message_types_by_name['IntList'] = _INTLIST -DESCRIPTOR.message_types_by_name['DoubleValue'] = _DOUBLEVALUE -DESCRIPTOR.message_types_by_name['DoubleRange'] = _DOUBLERANGE -DESCRIPTOR.message_types_by_name['DoubleList'] = _DOUBLELIST -DESCRIPTOR.message_types_by_name['StringValue'] = _STRINGVALUE -DESCRIPTOR.message_types_by_name['StringList'] = _STRINGLIST -DESCRIPTOR.message_types_by_name['StringListValue'] = _STRINGLISTVALUE -DESCRIPTOR.message_types_by_name['BoolValue'] = _BOOLVALUE -DESCRIPTOR.message_types_by_name['BoolList'] = _BOOLLIST -DESCRIPTOR.message_types_by_name['UintValue'] = _UINTVALUE -DESCRIPTOR.message_types_by_name['UintRange'] = _UINTRANGE -DESCRIPTOR.message_types_by_name['UintList'] = _UINTLIST -DESCRIPTOR.enum_types_by_name['State'] = _STATE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Configuration = _reflection.GeneratedProtocolMessageType('Configuration', (_message.Message,), dict( - DESCRIPTOR = _CONFIGURATION, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.Configuration) - )) -_sym_db.RegisterMessage(Configuration) - -Credentials = _reflection.GeneratedProtocolMessageType('Credentials', (_message.Message,), dict( - DESCRIPTOR = _CREDENTIALS, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.Credentials) - )) -_sym_db.RegisterMessage(Credentials) - -Config = _reflection.GeneratedProtocolMessageType('Config', (_message.Message,), dict( - DESCRIPTOR = _CONFIG, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.Config) - )) -_sym_db.RegisterMessage(Config) - -FixedGenerator = _reflection.GeneratedProtocolMessageType('FixedGenerator', (_message.Message,), dict( - DESCRIPTOR = _FIXEDGENERATOR, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.FixedGenerator) - )) -_sym_db.RegisterMessage(FixedGenerator) - -RandomGenerator = _reflection.GeneratedProtocolMessageType('RandomGenerator', (_message.Message,), dict( - DESCRIPTOR = _RANDOMGENERATOR, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.RandomGenerator) - )) -_sym_db.RegisterMessage(RandomGenerator) - -DeleteValue = _reflection.GeneratedProtocolMessageType('DeleteValue', (_message.Message,), dict( - DESCRIPTOR = _DELETEVALUE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.DeleteValue) - )) -_sym_db.RegisterMessage(DeleteValue) - -Value = _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), dict( - DESCRIPTOR = _VALUE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.Value) - )) -_sym_db.RegisterMessage(Value) - -Timestamp = _reflection.GeneratedProtocolMessageType('Timestamp', (_message.Message,), dict( - DESCRIPTOR = _TIMESTAMP, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.Timestamp) - )) -_sym_db.RegisterMessage(Timestamp) - -IntValue = _reflection.GeneratedProtocolMessageType('IntValue', (_message.Message,), dict( - DESCRIPTOR = _INTVALUE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.IntValue) - )) -_sym_db.RegisterMessage(IntValue) - -IntRange = _reflection.GeneratedProtocolMessageType('IntRange', (_message.Message,), dict( - DESCRIPTOR = _INTRANGE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.IntRange) - )) -_sym_db.RegisterMessage(IntRange) - -IntList = _reflection.GeneratedProtocolMessageType('IntList', (_message.Message,), dict( - DESCRIPTOR = _INTLIST, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.IntList) - )) -_sym_db.RegisterMessage(IntList) - -DoubleValue = _reflection.GeneratedProtocolMessageType('DoubleValue', (_message.Message,), dict( - DESCRIPTOR = _DOUBLEVALUE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.DoubleValue) - )) -_sym_db.RegisterMessage(DoubleValue) - -DoubleRange = _reflection.GeneratedProtocolMessageType('DoubleRange', (_message.Message,), dict( - DESCRIPTOR = _DOUBLERANGE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.DoubleRange) - )) -_sym_db.RegisterMessage(DoubleRange) - -DoubleList = _reflection.GeneratedProtocolMessageType('DoubleList', (_message.Message,), dict( - DESCRIPTOR = _DOUBLELIST, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.DoubleList) - )) -_sym_db.RegisterMessage(DoubleList) - -StringValue = _reflection.GeneratedProtocolMessageType('StringValue', (_message.Message,), dict( - DESCRIPTOR = _STRINGVALUE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.StringValue) - )) -_sym_db.RegisterMessage(StringValue) - -StringList = _reflection.GeneratedProtocolMessageType('StringList', (_message.Message,), dict( - DESCRIPTOR = _STRINGLIST, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.StringList) - )) -_sym_db.RegisterMessage(StringList) - -StringListValue = _reflection.GeneratedProtocolMessageType('StringListValue', (_message.Message,), dict( - DESCRIPTOR = _STRINGLISTVALUE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.StringListValue) - )) -_sym_db.RegisterMessage(StringListValue) - -BoolValue = _reflection.GeneratedProtocolMessageType('BoolValue', (_message.Message,), dict( - DESCRIPTOR = _BOOLVALUE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.BoolValue) - )) -_sym_db.RegisterMessage(BoolValue) - -BoolList = _reflection.GeneratedProtocolMessageType('BoolList', (_message.Message,), dict( - DESCRIPTOR = _BOOLLIST, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.BoolList) - )) -_sym_db.RegisterMessage(BoolList) - -UintValue = _reflection.GeneratedProtocolMessageType('UintValue', (_message.Message,), dict( - DESCRIPTOR = _UINTVALUE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.UintValue) - )) -_sym_db.RegisterMessage(UintValue) - -UintRange = _reflection.GeneratedProtocolMessageType('UintRange', (_message.Message,), dict( - DESCRIPTOR = _UINTRANGE, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.UintRange) - )) -_sym_db.RegisterMessage(UintRange) - -UintList = _reflection.GeneratedProtocolMessageType('UintList', (_message.Message,), dict( - DESCRIPTOR = _UINTLIST, - __module__ = 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.UintList) - )) -_sym_db.RegisterMessage(UintList) - - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('Z7github.com/openconfig/gnmi/testing/fake/proto;gnmi_fake')) -_CONFIG.fields_by_name['seed'].has_options = True -_CONFIG.fields_by_name['seed']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) -_CONFIG.fields_by_name['values'].has_options = True -_CONFIG.fields_by_name['values']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')) - -_AGENTMANAGER = _descriptor.ServiceDescriptor( - name='AgentManager', - full_name='gnmi.fake.AgentManager', - file=DESCRIPTOR, - index=0, - options=None, - serialized_start=2558, - serialized_end=2713, - methods=[ - _descriptor.MethodDescriptor( - name='Add', - full_name='gnmi.fake.AgentManager.Add', - index=0, - containing_service=None, - input_type=_CONFIG, - output_type=_CONFIG, - options=None, - ), - _descriptor.MethodDescriptor( - name='Remove', - full_name='gnmi.fake.AgentManager.Remove', - index=1, - containing_service=None, - input_type=_CONFIG, - output_type=_CONFIG, - options=None, - ), - _descriptor.MethodDescriptor( - name='Status', - full_name='gnmi.fake.AgentManager.Status', - index=2, - containing_service=None, - input_type=_CONFIG, - output_type=_CONFIG, - options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_AGENTMANAGER) - -DESCRIPTOR.services_by_name['AgentManager'] = _AGENTMANAGER - +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dtesting/fake/proto/fake.proto\x12\tgnmi.fake\x1a\x19google/protobuf/any.proto\x1a\x30github.com/openconfig/gnmi/proto/gnmi/gnmi.proto\"2\n\rConfiguration\x12!\n\x06\x63onfig\x18\x01 \x03(\x0b\x32\x11.gnmi.fake.Config\"1\n\x0b\x43redentials\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\"\x8c\x04\n\x06\x43onfig\x12\x0e\n\x06target\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x10\n\x04seed\x18\x06 \x01(\x03\x42\x02\x18\x01\x12$\n\x06values\x18\x03 \x03(\x0b\x32\x10.gnmi.fake.ValueB\x02\x18\x01\x12\x14\n\x0c\x64isable_sync\x18\x04 \x01(\x08\x12\x31\n\x0b\x63lient_type\x18\x05 \x01(\x0e\x32\x1c.gnmi.fake.Config.ClientType\x12\x13\n\x0b\x64isable_eof\x18\x07 \x01(\x08\x12+\n\x0b\x63redentials\x18\x08 \x01(\x0b\x32\x16.gnmi.fake.Credentials\x12\x0c\n\x04\x63\x65rt\x18\t \x01(\x0c\x12\x14\n\x0c\x65nable_delay\x18\n \x01(\x08\x12&\n\x06\x63ustom\x18\x64 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12,\n\x06random\x18\x65 \x01(\x0b\x32\x1a.gnmi.fake.RandomGeneratorH\x00\x12*\n\x05\x66ixed\x18\x66 \x01(\x0b\x32\x19.gnmi.fake.FixedGeneratorH\x00\x12\x13\n\x0btunnel_addr\x18\x0b \x01(\t\x12\x12\n\ntunnel_crt\x18\x0c \x01(\t\"E\n\nClientType\x12\x08\n\x04GRPC\x10\x00\x12\n\n\x06STUBBY\x10\x01\x12\r\n\tGRPC_GNMI\x10\x02\x12\x12\n\x0eGRPC_GNMI_PROD\x10\x03\x42\x0b\n\tgenerator\"<\n\x0e\x46ixedGenerator\x12*\n\tresponses\x18\x01 \x03(\x0b\x32\x17.gnmi.SubscribeResponse\"A\n\x0fRandomGenerator\x12\x0c\n\x04seed\x18\x01 \x01(\x03\x12 \n\x06values\x18\x02 \x03(\x0b\x32\x10.gnmi.fake.Value\"\r\n\x0b\x44\x65leteValue\"\xba\x03\n\x05Value\x12\x0c\n\x04path\x18\x01 \x03(\t\x12\'\n\ttimestamp\x18\x02 \x01(\x0b\x32\x14.gnmi.fake.Timestamp\x12\x0e\n\x06repeat\x18\x06 \x01(\x05\x12\x0c\n\x04seed\x18\x07 \x01(\x03\x12(\n\tint_value\x18\x64 \x01(\x0b\x32\x13.gnmi.fake.IntValueH\x00\x12.\n\x0c\x64ouble_value\x18\x65 \x01(\x0b\x32\x16.gnmi.fake.DoubleValueH\x00\x12.\n\x0cstring_value\x18\x66 \x01(\x0b\x32\x16.gnmi.fake.StringValueH\x00\x12\x0e\n\x04sync\x18g \x01(\x04H\x00\x12(\n\x06\x64\x65lete\x18h \x01(\x0b\x32\x16.gnmi.fake.DeleteValueH\x00\x12*\n\nbool_value\x18i \x01(\x0b\x32\x14.gnmi.fake.BoolValueH\x00\x12*\n\nuint_value\x18j \x01(\x0b\x32\x14.gnmi.fake.UintValueH\x00\x12\x37\n\x11string_list_value\x18k \x01(\x0b\x32\x1a.gnmi.fake.StringListValueH\x00\x42\x07\n\x05value\"D\n\tTimestamp\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\x11\n\tdelta_min\x18\x02 \x01(\x03\x12\x11\n\tdelta_max\x18\x03 \x01(\x03\"s\n\x08IntValue\x12\r\n\x05value\x18\x01 \x01(\x03\x12$\n\x05range\x18\x02 \x01(\x0b\x32\x13.gnmi.fake.IntRangeH\x00\x12\"\n\x04list\x18\x03 \x01(\x0b\x32\x12.gnmi.fake.IntListH\x00\x42\x0e\n\x0c\x64istribution\"R\n\x08IntRange\x12\x0f\n\x07minimum\x18\x01 \x01(\x03\x12\x0f\n\x07maximum\x18\x02 \x01(\x03\x12\x11\n\tdelta_min\x18\x03 \x01(\x03\x12\x11\n\tdelta_max\x18\x04 \x01(\x03\"*\n\x07IntList\x12\x0f\n\x07options\x18\x01 \x03(\x03\x12\x0e\n\x06random\x18\x02 \x01(\x08\"|\n\x0b\x44oubleValue\x12\r\n\x05value\x18\x01 \x01(\x01\x12\'\n\x05range\x18\x02 \x01(\x0b\x32\x16.gnmi.fake.DoubleRangeH\x00\x12%\n\x04list\x18\x03 \x01(\x0b\x32\x15.gnmi.fake.DoubleListH\x00\x42\x0e\n\x0c\x64istribution\"U\n\x0b\x44oubleRange\x12\x0f\n\x07minimum\x18\x01 \x01(\x01\x12\x0f\n\x07maximum\x18\x02 \x01(\x01\x12\x11\n\tdelta_min\x18\x03 \x01(\x01\x12\x11\n\tdelta_max\x18\x04 \x01(\x01\"-\n\nDoubleList\x12\x0f\n\x07options\x18\x01 \x03(\x01\x12\x0e\n\x06random\x18\x02 \x01(\x08\"S\n\x0bStringValue\x12\r\n\x05value\x18\x01 \x01(\t\x12%\n\x04list\x18\x02 \x01(\x0b\x32\x15.gnmi.fake.StringListH\x00\x42\x0e\n\x0c\x64istribution\"-\n\nStringList\x12\x0f\n\x07options\x18\x01 \x03(\t\x12\x0e\n\x06random\x18\x02 \x01(\x08\"W\n\x0fStringListValue\x12\r\n\x05value\x18\x01 \x03(\t\x12%\n\x04list\x18\x02 \x01(\x0b\x32\x15.gnmi.fake.StringListH\x00\x42\x0e\n\x0c\x64istribution\"O\n\tBoolValue\x12\r\n\x05value\x18\x01 \x01(\x08\x12#\n\x04list\x18\x02 \x01(\x0b\x32\x13.gnmi.fake.BoolListH\x00\x42\x0e\n\x0c\x64istribution\"+\n\x08\x42oolList\x12\x0f\n\x07options\x18\x01 \x03(\x08\x12\x0e\n\x06random\x18\x02 \x01(\x08\"v\n\tUintValue\x12\r\n\x05value\x18\x01 \x01(\x04\x12%\n\x05range\x18\x02 \x01(\x0b\x32\x14.gnmi.fake.UintRangeH\x00\x12#\n\x04list\x18\x03 \x01(\x0b\x32\x13.gnmi.fake.UintListH\x00\x42\x0e\n\x0c\x64istribution\"S\n\tUintRange\x12\x0f\n\x07minimum\x18\x01 \x01(\x04\x12\x0f\n\x07maximum\x18\x02 \x01(\x04\x12\x11\n\tdelta_min\x18\x03 \x01(\x03\x12\x11\n\tdelta_max\x18\x04 \x01(\x03\"+\n\x08UintList\x12\x0f\n\x07options\x18\x01 \x03(\x04\x12\x0e\n\x06random\x18\x02 \x01(\x08*+\n\x05State\x12\x0b\n\x07STOPPED\x10\x00\x12\x08\n\x04INIT\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x32\x9b\x01\n\x0c\x41gentManager\x12+\n\x03\x41\x64\x64\x12\x11.gnmi.fake.Config\x1a\x11.gnmi.fake.Config\x12.\n\x06Remove\x12\x11.gnmi.fake.Config\x1a\x11.gnmi.fake.Config\x12.\n\x06Status\x12\x11.gnmi.fake.Config\x1a\x11.gnmi.fake.ConfigB9Z7github.com/openconfig/gnmi/testing/fake/proto;gnmi_fakeb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'testing.fake.proto.fake_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'Z7github.com/openconfig/gnmi/testing/fake/proto;gnmi_fake' + _globals['_CONFIG'].fields_by_name['seed']._loaded_options = None + _globals['_CONFIG'].fields_by_name['seed']._serialized_options = b'\030\001' + _globals['_CONFIG'].fields_by_name['values']._loaded_options = None + _globals['_CONFIG'].fields_by_name['values']._serialized_options = b'\030\001' + _globals['_STATE']._serialized_start=2512 + _globals['_STATE']._serialized_end=2555 + _globals['_CONFIGURATION']._serialized_start=121 + _globals['_CONFIGURATION']._serialized_end=171 + _globals['_CREDENTIALS']._serialized_start=173 + _globals['_CREDENTIALS']._serialized_end=222 + _globals['_CONFIG']._serialized_start=225 + _globals['_CONFIG']._serialized_end=749 + _globals['_CONFIG_CLIENTTYPE']._serialized_start=667 + _globals['_CONFIG_CLIENTTYPE']._serialized_end=736 + _globals['_FIXEDGENERATOR']._serialized_start=751 + _globals['_FIXEDGENERATOR']._serialized_end=811 + _globals['_RANDOMGENERATOR']._serialized_start=813 + _globals['_RANDOMGENERATOR']._serialized_end=878 + _globals['_DELETEVALUE']._serialized_start=880 + _globals['_DELETEVALUE']._serialized_end=893 + _globals['_VALUE']._serialized_start=896 + _globals['_VALUE']._serialized_end=1338 + _globals['_TIMESTAMP']._serialized_start=1340 + _globals['_TIMESTAMP']._serialized_end=1408 + _globals['_INTVALUE']._serialized_start=1410 + _globals['_INTVALUE']._serialized_end=1525 + _globals['_INTRANGE']._serialized_start=1527 + _globals['_INTRANGE']._serialized_end=1609 + _globals['_INTLIST']._serialized_start=1611 + _globals['_INTLIST']._serialized_end=1653 + _globals['_DOUBLEVALUE']._serialized_start=1655 + _globals['_DOUBLEVALUE']._serialized_end=1779 + _globals['_DOUBLERANGE']._serialized_start=1781 + _globals['_DOUBLERANGE']._serialized_end=1866 + _globals['_DOUBLELIST']._serialized_start=1868 + _globals['_DOUBLELIST']._serialized_end=1913 + _globals['_STRINGVALUE']._serialized_start=1915 + _globals['_STRINGVALUE']._serialized_end=1998 + _globals['_STRINGLIST']._serialized_start=2000 + _globals['_STRINGLIST']._serialized_end=2045 + _globals['_STRINGLISTVALUE']._serialized_start=2047 + _globals['_STRINGLISTVALUE']._serialized_end=2134 + _globals['_BOOLVALUE']._serialized_start=2136 + _globals['_BOOLVALUE']._serialized_end=2215 + _globals['_BOOLLIST']._serialized_start=2217 + _globals['_BOOLLIST']._serialized_end=2260 + _globals['_UINTVALUE']._serialized_start=2262 + _globals['_UINTVALUE']._serialized_end=2380 + _globals['_UINTRANGE']._serialized_start=2382 + _globals['_UINTRANGE']._serialized_end=2465 + _globals['_UINTLIST']._serialized_start=2467 + _globals['_UINTLIST']._serialized_end=2510 + _globals['_AGENTMANAGER']._serialized_start=2558 + _globals['_AGENTMANAGER']._serialized_end=2713 # @@protoc_insertion_point(module_scope) diff --git a/testing/fake/proto/fake_pb2_grpc.py b/testing/fake/proto/fake_pb2_grpc.py index e644a3c..0121684 100644 --- a/testing/fake/proto/fake_pb2_grpc.py +++ b/testing/fake/proto/fake_pb2_grpc.py @@ -1,80 +1,186 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings from testing.fake.proto import fake_pb2 as testing_dot_fake_dot_proto_dot_fake__pb2 +GRPC_GENERATED_VERSION = '1.66.2' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in testing/fake/proto/fake_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + class AgentManagerStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.Add = channel.unary_unary( - '/gnmi.fake.AgentManager/Add', - request_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, - response_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, - ) - self.Remove = channel.unary_unary( - '/gnmi.fake.AgentManager/Remove', - request_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, - response_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, - ) - self.Status = channel.unary_unary( - '/gnmi.fake.AgentManager/Status', - request_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, - response_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, - ) + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Add = channel.unary_unary( + '/gnmi.fake.AgentManager/Add', + request_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, + response_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, + _registered_method=True) + self.Remove = channel.unary_unary( + '/gnmi.fake.AgentManager/Remove', + request_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, + response_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, + _registered_method=True) + self.Status = channel.unary_unary( + '/gnmi.fake.AgentManager/Status', + request_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, + response_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, + _registered_method=True) class AgentManagerServicer(object): - # missing associated documentation comment in .proto file - pass - - def Add(self, request, context): - """Add adds an agent to the server. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Remove(self, request, context): - """Remove removes an agent from the server. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Status(self, request, context): - """Status returns the current status of an agent on the server. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + """Missing associated documentation comment in .proto file.""" + + def Add(self, request, context): + """Add adds an agent to the server. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Remove(self, request, context): + """Remove removes an agent from the server. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Status(self, request, context): + """Status returns the current status of an agent on the server. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_AgentManagerServicer_to_server(servicer, server): - rpc_method_handlers = { - 'Add': grpc.unary_unary_rpc_method_handler( - servicer.Add, - request_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, - response_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, - ), - 'Remove': grpc.unary_unary_rpc_method_handler( - servicer.Remove, - request_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, - response_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, - ), - 'Status': grpc.unary_unary_rpc_method_handler( - servicer.Status, - request_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, - response_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'gnmi.fake.AgentManager', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) + rpc_method_handlers = { + 'Add': grpc.unary_unary_rpc_method_handler( + servicer.Add, + request_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, + response_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, + ), + 'Remove': grpc.unary_unary_rpc_method_handler( + servicer.Remove, + request_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, + response_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, + ), + 'Status': grpc.unary_unary_rpc_method_handler( + servicer.Status, + request_deserializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, + response_serializer=testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'gnmi.fake.AgentManager', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('gnmi.fake.AgentManager', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class AgentManager(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Add(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/gnmi.fake.AgentManager/Add', + testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, + testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Remove(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/gnmi.fake.AgentManager/Remove', + testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, + testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Status(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/gnmi.fake.AgentManager/Status', + testing_dot_fake_dot_proto_dot_fake__pb2.Config.SerializeToString, + testing_dot_fake_dot_proto_dot_fake__pb2.Config.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True)