From 5473f2ef722ee45c3f26eee3f4a44a7d827e3575 Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 8 Jun 2023 23:17:34 +0000 Subject: [PATCH] Project import generated by Copybara. FolderOrigin-RevId: /usr/local/google/home/dloher/copybara/temp/folder-destination8715988503357732150/. --- cache/cache.go | 13 + cache/cache_test.go | 19 ++ manager/manager.go | 124 ++++--- manager/manager_test.go | 137 +++++++- manager/meta.go | 8 + metadata/metadata.go | 21 +- metadata/metadata_test.go | 12 + metadata/yang/gnmi-collector-metadata.yang | 11 +- proto/collector/collector.pb.go | 4 +- proto/collector/collector_grpc.pb.go | 10 +- proto/collector/collector_pb2.py | 24 +- proto/gnmi/gnmi.pb.go | 364 +++++++++++---------- proto/gnmi/gnmi.proto | 14 +- proto/gnmi/gnmi_grpc.pb.go | 12 +- proto/gnmi/gnmi_pb2.py | 273 ++-------------- proto/gnmi_ext/gnmi_ext.pb.go | 6 +- proto/gnmi_ext/gnmi_ext_pb2.py | 68 +--- proto/target/target.pb.go | 4 +- proto/target/target_pb2.py | 67 +--- testing/fake/proto/fake.pb.go | 12 +- testing/fake/proto/fake_grpc.pb.go | 10 +- testing/fake/proto/fake_pb2.py | 191 +---------- 22 files changed, 557 insertions(+), 847 deletions(-) diff --git a/cache/cache.go b/cache/cache.go index 45b594d..a59f637 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -75,6 +75,7 @@ type options struct { // calculated and exported as metadata. latencyWindows []time.Duration avgLatencyPrecision time.Duration + serverName string } // Option defines the function prototype to set options for creating a Cache. @@ -105,6 +106,14 @@ func WithAvgLatencyPrecision(avgLatencyPrecision time.Duration) Option { } } +// WithServerName returns an Option to set a name that can identify the Cache +// server. +func WithServerName(serverName string) Option { + return func(o *options) { + o.serverName = serverName + } +} + // Cache is a structure holding state information for multiple targets. type Cache struct { opts options @@ -126,6 +135,9 @@ func New(targets []string, opts ...Option) *Cache { } } metadata.RegisterLatencyMetadata(c.opts.latencyWindows) + if c.opts.serverName != "" { + metadata.RegisterServerNameMetadata() + } for _, t := range targets { c.Add(t) @@ -249,6 +261,7 @@ func (c *Cache) Add(target string) *Target { client: c.client, lat: latency.New(c.opts.latencyWindows, latOpts), } + t.meta.SetStr(metadata.ServerName, c.opts.serverName) c.targets[target] = t return t } diff --git a/cache/cache_test.go b/cache/cache_test.go index 223e459..9e266f7 100644 --- a/cache/cache_test.go +++ b/cache/cache_test.go @@ -279,6 +279,25 @@ func TestUpdateMetadata(t *testing.T) { } } +func TestUpdateServerNameMetadata(t *testing.T) { + serverName := "server-address" + c := New([]string{"dev1"}, WithServerName(serverName)) + c.UpdateMetadata() + var got [][]string + c.Query("dev1", []string{metadata.Root, metadata.ServerName}, func(path []string, _ *ctree.Leaf, v any) error { + got = append(got, path) + val := v.(*pb.Notification).Update[0].Val.GetStringVal() + if !reflect.DeepEqual(val, serverName) { + t.Errorf("got serverName update value: %q, want: %q", val, serverName) + } + return nil + }) + want := [][]string{{metadata.Root, metadata.ServerName}} + if !reflect.DeepEqual(got, want) { + t.Errorf("got update paths: %q\n want: %q", got, want) + } +} + func TestUpdateSize(t *testing.T) { c := New([]string{"dev1"}) c.GnmiUpdate(gnmiNotification("dev1", nil, []string{"a", "1"}, 0, string(make([]byte, 1000)), false)) diff --git a/manager/manager.go b/manager/manager.go index d04bacf..cfbaa08 100644 --- a/manager/manager.go +++ b/manager/manager.go @@ -35,8 +35,11 @@ import ( tpb "github.com/openconfig/gnmi/proto/target" ) -// AddrSeparator delimits the chain of addresses used to connect to a target. -const AddrSeparator = ";" +const ( + // AddrSeparator delimits the chain of addresses used to connect to a target. + AddrSeparator = ";" + metaReceiveTimeout = "receive_timeout" +) var ( // ErrPending indicates a pending subscription attempt for the target exists. @@ -81,13 +84,14 @@ type Config struct { } type target struct { - name string - t *tpb.Target - sr *gpb.SubscribeRequest - cancel func() - finished chan struct{} - mu sync.Mutex - reconnect func() + name string + t *tpb.Target + sr *gpb.SubscribeRequest + cancel func() + finished chan struct{} + mu sync.Mutex + reconnect func() + receiveTimeout time.Duration } // Manager provides functionality for making gNMI subscriptions to targets and @@ -167,54 +171,58 @@ func (m *Manager) handleGNMIUpdate(name string, resp *gpb.SubscribeResponse) err return nil } -func addrChains(addrs []string) [][]string { - ac := make([][]string, len(addrs)) - for idx, addrLine := range addrs { - ac[idx] = strings.Split(addrLine, AddrSeparator) +func uniqueNextHops(addrs []string) map[string]struct{} { + nhs := map[string]struct{}{} + for _, addrLine := range addrs { + nhs[strings.Split(addrLine, AddrSeparator)[0]] = struct{}{} } - return ac + return nhs } func (m *Manager) createConn(ctx context.Context, name string, t *tpb.Target) (conn *grpc.ClientConn, done func(), err error) { - nhs := addrChains(t.GetAddresses()) + nhs := uniqueNextHops(t.GetAddresses()) if len(nhs) == 0 { return nil, func() {}, errors.New("target has no addresses for next hop connection") } - // A single next-hop dial is assumed. - nh := nhs[0][0] - select { - case <-ctx.Done(): - return nil, func() {}, ctx.Err() - default: - connCtx := ctx - if m.timeout > 0 { - c, cancel := context.WithTimeout(ctx, m.timeout) - connCtx = c - defer cancel() + for nh := range nhs { + select { + case <-ctx.Done(): + return nil, func() {}, ctx.Err() + default: + connCtx := ctx + if m.timeout > 0 { + c, cancel := context.WithTimeout(ctx, m.timeout) + connCtx = c + defer cancel() + } + conn, done, err = m.connectionManager.Connection(connCtx, nh, t.GetDialer()) + if err == nil { + return + } } - return m.connectionManager.Connection(connCtx, nh, t.GetDialer()) } + return } -func (m *Manager) handleUpdates(ctx context.Context, name string, sc gpb.GNMI_SubscribeClient) error { +func (m *Manager) handleUpdates(ctx context.Context, ta *target, sc gpb.GNMI_SubscribeClient) error { defer m.testSync() connected := false var recvTimer *time.Timer - if m.receiveTimeout.Nanoseconds() > 0 { - recvTimer = time.NewTimer(m.receiveTimeout) + if ta.receiveTimeout.Nanoseconds() > 0 { + recvTimer = time.NewTimer(ta.receiveTimeout) recvTimer.Stop() go func() { select { case <-ctx.Done(): case <-recvTimer.C: - log.Errorf("Timed out waiting to receive from %q after %v", name, m.receiveTimeout) - m.Reconnect(name) + log.Errorf("Timed out waiting to receive from %q after %v", ta.name, ta.receiveTimeout) + m.Reconnect(ta.name) } }() } for { if recvTimer != nil { - recvTimer.Reset(m.receiveTimeout) + recvTimer.Reset(ta.receiveTimeout) } resp, err := sc.Recv() if recvTimer != nil { @@ -222,19 +230,19 @@ func (m *Manager) handleUpdates(ctx context.Context, name string, sc gpb.GNMI_Su } if err != nil { if m.reset != nil { - m.reset(name) + m.reset(ta.name) } return err } if !connected { if m.connect != nil { - m.connect(name) + m.connect(ta.name) } connected = true - log.Infof("Target %q successfully subscribed", name) + log.Infof("Target %q successfully subscribed", ta.name) } - if err := m.handleGNMIUpdate(name, resp); err != nil { - log.Errorf("Error processing request %v for target %q: %v", resp, name, err) + if err := m.handleGNMIUpdate(ta.name, resp); err != nil { + log.Errorf("Error processing request %v for target %q: %v", resp, ta.name, err) } m.testSync() } @@ -245,25 +253,25 @@ var subscribeClient = func(ctx context.Context, conn *grpc.ClientConn) (gpb.GNMI return gpb.NewGNMIClient(conn).Subscribe(ctx) } -func (m *Manager) subscribe(ctx context.Context, name string, conn *grpc.ClientConn, sr *gpb.SubscribeRequest) error { +func (m *Manager) subscribe(ctx context.Context, ta *target, conn *grpc.ClientConn) error { select { case <-ctx.Done(): return ctx.Err() default: } - log.Infof("Attempting to open stream to target %q", name) + log.Infof("Attempting to open stream to target %q", ta.name) sc, err := subscribeClient(ctx, conn) if err != nil { - return fmt.Errorf("error opening stream to target %q: %v", name, err) + return fmt.Errorf("error opening stream to target %q: %v", ta.name, err) } - cr := customizeRequest(name, sr) - log.V(2).Infof("Sending subscription request to target %q: %v", name, cr) + cr := customizeRequest(ta.name, ta.sr) + log.V(2).Infof("Sending subscription request to target %q: %v", ta.name, cr) if err := sc.Send(cr); err != nil { - return fmt.Errorf("error sending subscription request to target %q: %v", name, err) + return fmt.Errorf("error sending subscription request to target %q: %v", ta.name, err) } - if err = m.handleUpdates(ctx, name, sc); err != nil { - return fmt.Errorf("stream failed for target %q: %v", name, err) + if err = m.handleUpdates(ctx, ta, sc); err != nil { + return fmt.Errorf("stream failed for target %q: %v", ta.name, err) } return nil } @@ -337,8 +345,18 @@ func (m *Manager) monitor(ctx context.Context, ta *target) (err error) { return } defer done() - return m.subscribe(sCtx, ta.name, conn, ta.sr) + return m.subscribe(sCtx, ta, conn) +} +func (m *Manager) targetRecvTimeout(name string, t *tpb.Target) time.Duration { + if timeout := t.GetMeta()[metaReceiveTimeout]; timeout != "" { + recvTimeout, err := time.ParseDuration(timeout) + if err == nil { + return recvTimeout + } + log.Warningf("Wrong receive_timeout %q specified for %q: %v", timeout, name, err) + } + return m.receiveTimeout } // Add adds the target to Manager and starts a streaming subscription that @@ -363,13 +381,15 @@ func (m *Manager) Add(name string, t *tpb.Target, sr *gpb.SubscribeRequest) erro if len(t.GetAddresses()) == 0 { return fmt.Errorf("no addresses for target %q", name) } + ctx, cancel := context.WithCancel(context.Background()) ta := &target{ - name: name, - t: t, - sr: sr, - cancel: cancel, - finished: make(chan struct{}), + name: name, + t: t, + sr: sr, + cancel: cancel, + finished: make(chan struct{}), + receiveTimeout: m.targetRecvTimeout(name, t), } m.targets[name] = ta go m.retryMonitor(ctx, ta) diff --git a/manager/manager_test.go b/manager/manager_test.go index 7922cc5..f9cadb1 100644 --- a/manager/manager_test.go +++ b/manager/manager_test.go @@ -417,6 +417,9 @@ func (f *fakeConnection) Connection(ctx context.Context, addr, dialer string) (c f.failNext = false return nil, func() {}, errors.New("could not connect") } + if addr == "bad address" { + return nil, func() {}, errors.New("bad address") + } return f.m.Connection(ctx, addr, dialer) } @@ -573,10 +576,11 @@ func TestReceiveTimeout(t *testing.T) { } r := record{} + defaultRecvTimeout := 2 * time.Second m, err := NewManager(Config{ Credentials: &fakeCreds{}, Timeout: time.Minute, - ReceiveTimeout: 2 * time.Second, + ReceiveTimeout: defaultRecvTimeout, Connect: func(s string) { r.connects = append(r.connects, s) }, @@ -612,10 +616,13 @@ func TestReceiveTimeout(t *testing.T) { } defer m.Remove(name) - _, ok := m.targets[name] + ta, ok := m.targets[name] if !ok { t.Fatalf("missing internal target") } + if ta.receiveTimeout != defaultRecvTimeout { + t.Errorf("receiveTime out for %q: got %v, want %v", name, ta.receiveTimeout, defaultRecvTimeout) + } <-handleUpdateDoneOnce // receive has timed out <-handleUpdateCalled @@ -635,6 +642,80 @@ func TestReceiveTimeout(t *testing.T) { assertTargets(t, m, 1) } +func TestReceiveTimeoutOverride(t *testing.T) { + f := newFakeConnection(t) + addr, stop := newDevice(t, &fakeServer{}) + defer stop() + + origSubscribeClient := subscribeClient + defer func() { subscribeClient = origSubscribeClient }() + fc := newFakeSubscribeClient() + subscribeClient = func(ctx context.Context, conn *grpc.ClientConn) (gpb.GNMI_SubscribeClient, error) { + return fc, nil + } + + for _, tc := range []struct { + desc string + defTimeout time.Duration + metaTimeout string + want time.Duration + }{{ + desc: "wrong receive timeout specified - use non-zero default", + defTimeout: 5 * time.Minute, + metaTimeout: "1x", + want: 5 * time.Minute, + }, { + desc: "wrong receive timeout specified - use zero default", + defTimeout: 0, + metaTimeout: "zz", + want: 0, + }, { + desc: "override to disable non-zero default", + defTimeout: 5 * time.Minute, + metaTimeout: "0", + want: 0, + }, { + desc: "override non-zero default", + defTimeout: 5 * time.Minute, + metaTimeout: "2m", + want: 2 * time.Minute, + }, { + desc: "override zero default", + defTimeout: 0, + metaTimeout: "10m", + want: 10 * time.Minute, + }} { + name := "device1" + t.Run(tc.desc, func(t *testing.T) { + m, err := NewManager(Config{ + Credentials: &fakeCreds{}, + Timeout: time.Minute, + ConnectionManager: f, + ReceiveTimeout: tc.defTimeout, + }) + if err != nil { + t.Fatal("could not initialize Manager") + } + err = m.Add(name, &tpb.Target{ + Addresses: []string{addr}, + Meta: map[string]string{metaReceiveTimeout: tc.metaTimeout}, + }, validSubscribeRequest) + if err != nil { + t.Fatalf("got error adding: %v, want no error", err) + } + defer m.Remove(name) + + ta, ok := m.targets[name] + if !ok { + t.Fatalf("missing internal target") + } + if ta.receiveTimeout != tc.want { + t.Errorf("receiveTime out for %q: got %v, want %v", name, ta.receiveTimeout, tc.want) + } + }) + } +} + func TestRemoveDuringBackoff(t *testing.T) { origBaseDelay, origMaxDelay := RetryBaseDelay, RetryMaxDelay defer func() { RetryBaseDelay, RetryMaxDelay = origBaseDelay, origMaxDelay }() @@ -711,7 +792,7 @@ func TestCancelSubscribe(t *testing.T) { t.Fatalf("error creating connection: %v", err) } defer done() - if err := m.subscribe(cCtx, "device", conn, &gpb.SubscribeRequest{}); err == nil { + if err := m.subscribe(cCtx, &target{name: "device", sr: &gpb.SubscribeRequest{}}, conn); err == nil { t.Fatalf("got no error, want error") } } @@ -827,6 +908,7 @@ func TestCustomizeRequest(t *testing.T) { func TestCreateConn(t *testing.T) { addr, stop := newDevice(t, &fakeServer{}) + badAddr := "bad address" defer stop() tests := []struct { @@ -856,7 +938,7 @@ func TestCreateConn(t *testing.T) { wantErr: true, }, { - desc: "valid", + desc: "single valid address", ta: &tpb.Target{ Addresses: []string{addr}, }, @@ -864,6 +946,53 @@ func TestCreateConn(t *testing.T) { return context.Background() }, }, + { + desc: "duplicate valid address", + ta: &tpb.Target{ + Addresses: []string{addr, addr}, + }, + makeCtx: func() context.Context { + return context.Background() + }, + }, + { + desc: "first valid address", + ta: &tpb.Target{ + Addresses: []string{addr, badAddr}, + }, + makeCtx: func() context.Context { + return context.Background() + }, + }, + { + desc: "second valid address", + ta: &tpb.Target{ + Addresses: []string{badAddr, addr}, + }, + makeCtx: func() context.Context { + return context.Background() + }, + }, + { + desc: "bad address", + ta: &tpb.Target{ + Addresses: []string{badAddr}, + }, + makeCtx: func() context.Context { + return context.Background() + }, + wantErr: true, + }, + { + desc: "multiple bad addresses", + ta: &tpb.Target{ + Addresses: []string{badAddr, badAddr}, + }, + makeCtx: func() context.Context { + return context.Background() + }, + wantErr: true, + }, } for _, tt := range tests { diff --git a/manager/meta.go b/manager/meta.go index ff84d25..581faef 100644 --- a/manager/meta.go +++ b/manager/meta.go @@ -38,6 +38,14 @@ const ( Username = "username" ) +func addrChains(addrs []string) [][]string { + ac := make([][]string, len(addrs)) + for idx, addrLine := range addrs { + ac[idx] = strings.Split(addrLine, AddrSeparator) + } + return ac +} + func gRPCMeta(ctx context.Context, name string, t *tpb.Target, cred CredentialsClient) (metadata.MD, error) { meta := metadata.MD{} c := t.GetCredentials() diff --git a/metadata/metadata.go b/metadata/metadata.go index 865889f..103e902 100644 --- a/metadata/metadata.go +++ b/metadata/metadata.go @@ -64,6 +64,8 @@ const ( LatestTimestamp = "latestTimestamp" // ConnectError is the error related to connection failure. ConnectError = "connectError" + // ServerName is an optional metadata used to identify the server to clients. + ServerName = "serverName" ) // IntValue contains the path and other options for an int64 metadata. @@ -85,10 +87,14 @@ func UnregisterIntValue(name string) { // StrValue contains the valid and the option to reset to emptry string. type StrValue struct { - Valid bool InitEmptyStr bool // Whether to initiate to "". } +// RegisterStrValue registers a string type metadata. +func RegisterStrValue(name string, val *StrValue) { + TargetStrValues[name] = val +} + var ( // TargetBoolValues is the list of all bool metadata fields. TargetBoolValues = map[string]bool{ @@ -111,8 +117,8 @@ var ( // TargetStrValues is the list of all string metadata fields. TargetStrValues = map[string]*StrValue{ - ConnectedAddr: {Valid: true, InitEmptyStr: true}, - ConnectError: {Valid: true, InitEmptyStr: false}, + ConnectedAddr: {InitEmptyStr: true}, + ConnectError: {InitEmptyStr: false}, } ) @@ -132,7 +138,7 @@ func Path(value string) []string { if TargetBoolValues[value] { return []string{Root, value} } - if val, ok := TargetStrValues[value]; ok && val.Valid { + if val := TargetStrValues[value]; val != nil { return []string{Root, value} } @@ -174,7 +180,7 @@ func validBool(value string) error { } func validStr(value string) error { - if valid, ok := TargetStrValues[value]; !ok || !valid.Valid { + if val := TargetStrValues[value]; val == nil { return ErrInvalidValue } return nil @@ -334,3 +340,8 @@ func RegisterLatencyMetadata(windowSizes []time.Duration) { } } } + +// RegisterServerNameMetadata registers the serverName metadata. +func RegisterServerNameMetadata() { + RegisterStrValue(ServerName, &StrValue{InitEmptyStr: false}) +} diff --git a/metadata/metadata_test.go b/metadata/metadata_test.go index 4b82baa..3f0d9b5 100644 --- a/metadata/metadata_test.go +++ b/metadata/metadata_test.go @@ -323,3 +323,15 @@ func TestRegisterLatencyMetadata(t *testing.T) { } } } + +func TestRegisterServerNameMetadata(t *testing.T) { + if path := Path(ServerName); path != nil { + t.Fatalf("Path(%q) returned %v for invalid value.", ServerName, path) + } + RegisterServerNameMetadata() + path := Path(ServerName) + want := []string{Root, ServerName} + if diff := cmp.Diff(want, path); diff != "" { + t.Fatalf("Path(%q) returned diff (+got-want): %v", ServerName, diff) + } +} diff --git a/metadata/yang/gnmi-collector-metadata.yang b/metadata/yang/gnmi-collector-metadata.yang index 5b08d76..bcda132 100644 --- a/metadata/yang/gnmi-collector-metadata.yang +++ b/metadata/yang/gnmi-collector-metadata.yang @@ -184,12 +184,21 @@ module gnmi-collector-metadata { periodically so it may lag behind the actual target updates."; } - leaf connectError { + leaf connectError { type string; description "connectError is the error related to connection failure."; } + leaf serverName { + type string; + description + "serverName is an optional string metadata used to identify the server + hosting the cache to the clients. It is useful in situations where a + client is connected to a cache server behind a frontend system or a + load-balancing system and the client wants to know exactly which cache + server it is connected to"; + } } grouping meta-latency-window-state { diff --git a/proto/collector/collector.pb.go b/proto/collector/collector.pb.go index 77f2345..439397e 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.27.1 -// protoc v3.21.1 +// protoc-gen-go v1.28.1 +// 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 49f8166..de0dbf0 100644 --- a/proto/collector/collector_pb2.py +++ b/proto/collector/collector_pb2.py @@ -2,10 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/collector/collector.proto """Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -16,25 +15,8 @@ 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') - - -_RECONNECTREQUEST = DESCRIPTOR.message_types_by_name['ReconnectRequest'] -_NIL = DESCRIPTOR.message_types_by_name['Nil'] -ReconnectRequest = _reflection.GeneratedProtocolMessageType('ReconnectRequest', (_message.Message,), { - 'DESCRIPTOR' : _RECONNECTREQUEST, - '__module__' : 'proto.collector.collector_pb2' - # @@protoc_insertion_point(class_scope:gnmi.ReconnectRequest) - }) -_sym_db.RegisterMessage(ReconnectRequest) - -Nil = _reflection.GeneratedProtocolMessageType('Nil', (_message.Message,), { - 'DESCRIPTOR' : _NIL, - '__module__' : 'proto.collector.collector_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Nil) - }) -_sym_db.RegisterMessage(Nil) - -_COLLECTOR = DESCRIPTOR.services_by_name['Collector'] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.collector.collector_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/proto/gnmi/gnmi.pb.go b/proto/gnmi/gnmi.pb.go index 12f42d3..de58de3 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.27.1 -// protoc v3.21.1 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: proto/gnmi/gnmi.proto // Package gNMI defines a service specification for the gRPC Network Management @@ -214,10 +214,11 @@ func (SubscriptionList_Mode) EnumDescriptor() ([]byte, []int) { type UpdateResult_Operation int32 const ( - UpdateResult_INVALID UpdateResult_Operation = 0 - UpdateResult_DELETE UpdateResult_Operation = 1 // The result relates to a delete of Path. - UpdateResult_REPLACE UpdateResult_Operation = 2 // The result relates to a replace of Path. - UpdateResult_UPDATE UpdateResult_Operation = 3 // The result relates to an update of Path. + UpdateResult_INVALID UpdateResult_Operation = 0 + UpdateResult_DELETE UpdateResult_Operation = 1 // The result relates to a delete of Path. + UpdateResult_REPLACE UpdateResult_Operation = 2 // The result relates to a replace of Path. + UpdateResult_UPDATE UpdateResult_Operation = 3 // The result relates to an update of Path. + UpdateResult_UNION_REPLACE UpdateResult_Operation = 4 // The result of a union_replace of Path or CLI origin. ) // Enum value maps for UpdateResult_Operation. @@ -227,12 +228,14 @@ var ( 1: "DELETE", 2: "REPLACE", 3: "UPDATE", + 4: "UNION_REPLACE", } UpdateResult_Operation_value = map[string]int32{ - "INVALID": 0, - "DELETE": 1, - "REPLACE": 2, - "UPDATE": 3, + "INVALID": 0, + "DELETE": 1, + "REPLACE": 2, + "UPDATE": 3, + "UNION_REPLACE": 4, } ) @@ -322,10 +325,11 @@ func (GetRequest_DataType) EnumDescriptor() ([]byte, []int) { // Notification is a re-usable message that is used to encode data from the // target to the client. A Notification carries two types of changes to the data // tree: -// - Deleted values (delete) - a set of paths that have been removed from the -// data tree. -// - Updated values (update) - a set of path-value pairs indicating the path -// whose value has changed in the data tree. +// - Deleted values (delete) - a set of paths that have been removed from the +// data tree. +// - Updated values (update) - a set of path-value pairs indicating the path +// whose value has changed in the data tree. +// // Reference: gNMI Specification Section 2.1 type Notification struct { state protoimpl.MessageState @@ -498,6 +502,7 @@ type TypedValue struct { // field is used to store the value (e.g., json_val). // // Types that are assignable to Value: + // // *TypedValue_StringVal // *TypedValue_IntVal // *TypedValue_UintVal @@ -1139,6 +1144,7 @@ type SubscribeRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Request: + // // *SubscribeRequest_Subscribe // *SubscribeRequest_Poll Request isSubscribeRequest_Request `protobuf_oneof:"request"` @@ -1277,6 +1283,7 @@ type SubscribeResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Response: + // // *SubscribeResponse_Update // *SubscribeResponse_SyncResponse // *SubscribeResponse_Error @@ -1655,6 +1662,11 @@ type SetRequest struct { Delete []*Path `protobuf:"bytes,2,rep,name=delete,proto3" json:"delete,omitempty"` // Paths to be deleted from the data tree. Replace []*Update `protobuf:"bytes,3,rep,name=replace,proto3" json:"replace,omitempty"` // Updates specifying elements to be replaced. Update []*Update `protobuf:"bytes,4,rep,name=update,proto3" json:"update,omitempty"` // Updates specifying elements to updated. + // Updates specifying elements to union and then replace the data tree. + // See the gNMI specification at + // https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md + // for details. + UnionReplace []*Update `protobuf:"bytes,6,rep,name=union_replace,json=unionReplace,proto3" json:"union_replace,omitempty"` // Extension messages associated with the SetRequest. See the // gNMI extension specification for further definition. Extension []*gnmi_ext.Extension `protobuf:"bytes,5,rep,name=extension,proto3" json:"extension,omitempty"` @@ -1720,6 +1732,13 @@ func (x *SetRequest) GetUpdate() []*Update { return nil } +func (x *SetRequest) GetUnionReplace() []*Update { + if x != nil { + return x.UnionReplace + } + return nil +} + func (x *SetRequest) GetExtension() []*gnmi_ext.Extension { if x != nil { return x.Extension @@ -2454,7 +2473,7 @@ var file_proto_gnmi_gnmi_proto_rawDesc = []byte{ 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x26, 0x0a, 0x0a, 0x51, 0x4f, 0x53, 0x4d, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6d, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x22, - 0xd5, 0x01, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, + 0x88, 0x02, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x22, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x03, @@ -2464,128 +2483,132 @@ var file_proto_gnmi_gnmi_proto_rawDesc = []byte{ 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x06, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, - 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xdd, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x0d, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x67, 0x6e, + 0x6d, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x75, 0x6e, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, + 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xdd, 0x01, 0x0a, 0x0b, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, + 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x2e, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x02, 0x18, 0x01, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, + 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfb, 0x01, 0x0a, 0x0c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1e, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, + 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x29, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x70, 0x22, 0x50, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, + 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, + 0x52, 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, + 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x49, 0x4f, 0x4e, 0x5f, 0x52, + 0x45, 0x50, 0x4c, 0x41, 0x43, 0x45, 0x10, 0x04, 0x22, 0xcb, 0x02, 0x0a, 0x0a, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, - 0x61, 0x74, 0x68, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x2e, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x67, - 0x6e, 0x6d, 0x69, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, - 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xe8, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, - 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x29, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x67, 0x6e, - 0x6d, 0x69, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x02, 0x6f, 0x70, 0x22, 0x3d, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, - 0x4c, 0x41, 0x43, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, - 0x10, 0x03, 0x22, 0xcb, 0x02, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x22, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x06, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1e, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x45, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, - 0x12, 0x2e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x75, 0x73, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, - 0x12, 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4e, 0x46, - 0x49, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, - 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x03, - 0x22, 0x9f, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x36, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, - 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x11, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, + 0x61, 0x74, 0x68, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1e, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x67, 0x6e, 0x6d, 0x69, + 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x6e, 0x6d, 0x69, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x67, + 0x6e, 0x6d, 0x69, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2e, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x6e, 0x6d, + 0x69, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x75, 0x73, 0x65, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x12, 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, 0x69, + 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x08, 0x44, 0x61, 0x74, + 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x0a, + 0x0a, 0x06, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x03, 0x22, 0x9f, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, + 0x6e, 0x6d, 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, + 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x11, 0x43, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, + 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0xe7, 0x01, 0x0a, 0x12, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x0f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, + 0x65, 0x6c, 0x73, 0x12, 0x3f, 0x0a, 0x13, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x0e, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x52, 0x12, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x4e, 0x4d, 0x49, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x4e, 0x4d, 0x49, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xe7, 0x01, 0x0a, 0x12, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3a, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x6e, - 0x6d, 0x69, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x73, 0x75, - 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x12, 0x3f, 0x0a, - 0x13, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, - 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x67, 0x6e, 0x6d, - 0x69, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x73, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x67, 0x4e, 0x4d, 0x49, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x4e, 0x4d, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x31, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x65, 0x78, 0x74, 0x2e, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x09, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x2a, 0x44, 0x0a, 0x08, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, - 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x59, 0x54, - 0x45, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x10, 0x02, 0x12, - 0x09, 0x0a, 0x05, 0x41, 0x53, 0x43, 0x49, 0x49, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, - 0x4f, 0x4e, 0x5f, 0x49, 0x45, 0x54, 0x46, 0x10, 0x04, 0x2a, 0x41, 0x0a, 0x10, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, - 0x0e, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x4e, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x01, - 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x10, 0x02, 0x32, 0xe3, 0x01, 0x0a, - 0x04, 0x67, 0x4e, 0x4d, 0x49, 0x12, 0x41, 0x0a, 0x0c, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x17, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x43, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, - 0x10, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x10, 0x2e, 0x67, 0x6e, - 0x6d, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, - 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x40, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x16, 0x2e, - 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, - 0x30, 0x01, 0x3a, 0x40, 0x0a, 0x0c, 0x67, 0x6e, 0x6d, 0x69, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x6e, 0x6d, 0x69, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x42, 0x53, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x09, 0x47, - 0x6e, 0x6d, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, - 0x69, 0xca, 0x3e, 0x05, 0x30, 0x2e, 0x39, 0x2e, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x09, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x44, 0x0a, 0x08, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x00, 0x12, + 0x09, 0x0a, 0x05, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, + 0x4f, 0x54, 0x4f, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x53, 0x43, 0x49, 0x49, 0x10, 0x03, + 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x45, 0x54, 0x46, 0x10, 0x04, 0x2a, + 0x41, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x44, 0x45, + 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x4e, 0x5f, 0x43, 0x48, + 0x41, 0x4e, 0x47, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x41, 0x4d, 0x50, 0x4c, 0x45, + 0x10, 0x02, 0x32, 0xe3, 0x01, 0x0a, 0x04, 0x67, 0x4e, 0x4d, 0x49, 0x12, 0x41, 0x0a, 0x0c, 0x43, + 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x17, 0x2e, 0x67, 0x6e, + 0x6d, 0x69, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x43, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, + 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x10, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x53, 0x65, + 0x74, 0x12, 0x10, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x6e, + 0x6d, 0x69, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x3a, 0x40, 0x0a, 0x0c, 0x67, 0x6e, 0x6d, 0x69, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, + 0x6e, 0x6d, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x54, 0x0a, 0x15, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x67, 0x6e, 0x6d, 0x69, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x42, 0x09, 0x47, 0x6e, 0x6d, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, + 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6e, 0x6d, 0x69, 0xca, 0x3e, 0x06, 0x30, 0x2e, 0x31, 0x30, 0x2e, 0x30, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2669,41 +2692,42 @@ var file_proto_gnmi_gnmi_proto_depIdxs = []int32{ 8, // 29: gnmi.SetRequest.delete:type_name -> gnmi.Path 6, // 30: gnmi.SetRequest.replace:type_name -> gnmi.Update 6, // 31: gnmi.SetRequest.update:type_name -> gnmi.Update - 30, // 32: gnmi.SetRequest.extension:type_name -> gnmi_ext.Extension - 8, // 33: gnmi.SetResponse.prefix:type_name -> gnmi.Path - 22, // 34: gnmi.SetResponse.response:type_name -> gnmi.UpdateResult - 11, // 35: gnmi.SetResponse.message:type_name -> gnmi.Error - 30, // 36: gnmi.SetResponse.extension:type_name -> gnmi_ext.Extension - 8, // 37: gnmi.UpdateResult.path:type_name -> gnmi.Path - 11, // 38: gnmi.UpdateResult.message:type_name -> gnmi.Error - 3, // 39: gnmi.UpdateResult.op:type_name -> gnmi.UpdateResult.Operation - 8, // 40: gnmi.GetRequest.prefix:type_name -> gnmi.Path - 8, // 41: gnmi.GetRequest.path:type_name -> gnmi.Path - 4, // 42: gnmi.GetRequest.type:type_name -> gnmi.GetRequest.DataType - 0, // 43: gnmi.GetRequest.encoding:type_name -> gnmi.Encoding - 27, // 44: gnmi.GetRequest.use_models:type_name -> gnmi.ModelData - 30, // 45: gnmi.GetRequest.extension:type_name -> gnmi_ext.Extension - 5, // 46: gnmi.GetResponse.notification:type_name -> gnmi.Notification - 11, // 47: gnmi.GetResponse.error:type_name -> gnmi.Error - 30, // 48: gnmi.GetResponse.extension:type_name -> gnmi_ext.Extension - 30, // 49: gnmi.CapabilityRequest.extension:type_name -> gnmi_ext.Extension - 27, // 50: gnmi.CapabilityResponse.supported_models:type_name -> gnmi.ModelData - 0, // 51: gnmi.CapabilityResponse.supported_encodings:type_name -> gnmi.Encoding - 30, // 52: gnmi.CapabilityResponse.extension:type_name -> gnmi_ext.Extension - 31, // 53: gnmi.gnmi_service:extendee -> google.protobuf.FileOptions - 25, // 54: gnmi.gNMI.Capabilities:input_type -> gnmi.CapabilityRequest - 23, // 55: gnmi.gNMI.Get:input_type -> gnmi.GetRequest - 20, // 56: gnmi.gNMI.Set:input_type -> gnmi.SetRequest - 14, // 57: gnmi.gNMI.Subscribe:input_type -> gnmi.SubscribeRequest - 26, // 58: gnmi.gNMI.Capabilities:output_type -> gnmi.CapabilityResponse - 24, // 59: gnmi.gNMI.Get:output_type -> gnmi.GetResponse - 21, // 60: gnmi.gNMI.Set:output_type -> gnmi.SetResponse - 16, // 61: gnmi.gNMI.Subscribe:output_type -> gnmi.SubscribeResponse - 58, // [58:62] is the sub-list for method output_type - 54, // [54:58] is the sub-list for method input_type - 54, // [54:54] is the sub-list for extension type_name - 53, // [53:54] is the sub-list for extension extendee - 0, // [0:53] is the sub-list for field type_name + 6, // 32: gnmi.SetRequest.union_replace:type_name -> gnmi.Update + 30, // 33: gnmi.SetRequest.extension:type_name -> gnmi_ext.Extension + 8, // 34: gnmi.SetResponse.prefix:type_name -> gnmi.Path + 22, // 35: gnmi.SetResponse.response:type_name -> gnmi.UpdateResult + 11, // 36: gnmi.SetResponse.message:type_name -> gnmi.Error + 30, // 37: gnmi.SetResponse.extension:type_name -> gnmi_ext.Extension + 8, // 38: gnmi.UpdateResult.path:type_name -> gnmi.Path + 11, // 39: gnmi.UpdateResult.message:type_name -> gnmi.Error + 3, // 40: gnmi.UpdateResult.op:type_name -> gnmi.UpdateResult.Operation + 8, // 41: gnmi.GetRequest.prefix:type_name -> gnmi.Path + 8, // 42: gnmi.GetRequest.path:type_name -> gnmi.Path + 4, // 43: gnmi.GetRequest.type:type_name -> gnmi.GetRequest.DataType + 0, // 44: gnmi.GetRequest.encoding:type_name -> gnmi.Encoding + 27, // 45: gnmi.GetRequest.use_models:type_name -> gnmi.ModelData + 30, // 46: gnmi.GetRequest.extension:type_name -> gnmi_ext.Extension + 5, // 47: gnmi.GetResponse.notification:type_name -> gnmi.Notification + 11, // 48: gnmi.GetResponse.error:type_name -> gnmi.Error + 30, // 49: gnmi.GetResponse.extension:type_name -> gnmi_ext.Extension + 30, // 50: gnmi.CapabilityRequest.extension:type_name -> gnmi_ext.Extension + 27, // 51: gnmi.CapabilityResponse.supported_models:type_name -> gnmi.ModelData + 0, // 52: gnmi.CapabilityResponse.supported_encodings:type_name -> gnmi.Encoding + 30, // 53: gnmi.CapabilityResponse.extension:type_name -> gnmi_ext.Extension + 31, // 54: gnmi.gnmi_service:extendee -> google.protobuf.FileOptions + 25, // 55: gnmi.gNMI.Capabilities:input_type -> gnmi.CapabilityRequest + 23, // 56: gnmi.gNMI.Get:input_type -> gnmi.GetRequest + 20, // 57: gnmi.gNMI.Set:input_type -> gnmi.SetRequest + 14, // 58: gnmi.gNMI.Subscribe:input_type -> gnmi.SubscribeRequest + 26, // 59: gnmi.gNMI.Capabilities:output_type -> gnmi.CapabilityResponse + 24, // 60: gnmi.gNMI.Get:output_type -> gnmi.GetResponse + 21, // 61: gnmi.gNMI.Set:output_type -> gnmi.SetResponse + 16, // 62: gnmi.gNMI.Subscribe:output_type -> gnmi.SubscribeResponse + 59, // [59:63] is the sub-list for method output_type + 55, // [55:59] is the sub-list for method input_type + 55, // [55:55] is the sub-list for extension type_name + 54, // [54:55] is the sub-list for extension extendee + 0, // [0:54] is the sub-list for field type_name } func init() { file_proto_gnmi_gnmi_proto_init() } diff --git a/proto/gnmi/gnmi.proto b/proto/gnmi/gnmi.proto index ba94072..c50394f 100644 --- a/proto/gnmi/gnmi.proto +++ b/proto/gnmi/gnmi.proto @@ -37,7 +37,7 @@ extend google.protobuf.FileOptions { // gNMI_service is the current version of the gNMI service, returned through // the Capabilities RPC. -option (gnmi_service) = "0.9.0"; +option (gnmi_service) = "0.10.0"; option go_package = "github.com/openconfig/gnmi/proto/gnmi"; option java_multiple_files = true; @@ -337,6 +337,11 @@ message SetRequest { repeated Path delete = 2; // Paths to be deleted from the data tree. repeated Update replace = 3; // Updates specifying elements to be replaced. repeated Update update = 4; // Updates specifying elements to updated. + // Updates specifying elements to union and then replace the data tree. + // See the gNMI specification at + // https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md + // for details. + repeated Update union_replace = 6; // Extension messages associated with the SetRequest. See the // gNMI extension specification for further definition. repeated gnmi_ext.Extension extension = 5; @@ -369,9 +374,10 @@ message UpdateResult { // The operation that was associated with the Path specified. enum Operation { INVALID = 0; - DELETE = 1; // The result relates to a delete of Path. - REPLACE = 2; // The result relates to a replace of Path. - UPDATE = 3; // The result relates to an update of Path. + DELETE = 1; // The result relates to a delete of Path. + REPLACE = 2; // The result relates to a replace of Path. + UPDATE = 3; // The result relates to an update of Path. + UNION_REPLACE = 4; // The result of a union_replace of Path or CLI origin. } // Deprecated timestamp for the UpdateResult, this field has been // replaced by the timestamp within the SetResponse message, since 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 8d165c9..d0f77c4 100644 --- a/proto/gnmi/gnmi_pb2.py +++ b/proto/gnmi/gnmi_pb2.py @@ -2,11 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/gnmi/gnmi.proto """Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -18,226 +16,15 @@ 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_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\"\xa9\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\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\"\xca\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\"=\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\"\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(\tBS\n\x15\x63om.github.gnmi.protoB\tGnmiProtoP\x01Z%github.com/openconfig/gnmi/proto/gnmi\xca>\x05\x30.9.0b\x06proto3') +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') -_ENCODING = DESCRIPTOR.enum_types_by_name['Encoding'] -Encoding = enum_type_wrapper.EnumTypeWrapper(_ENCODING) -_SUBSCRIPTIONMODE = DESCRIPTOR.enum_types_by_name['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.extensions_by_name['gnmi_service'] - -_NOTIFICATION = DESCRIPTOR.message_types_by_name['Notification'] -_UPDATE = DESCRIPTOR.message_types_by_name['Update'] -_TYPEDVALUE = DESCRIPTOR.message_types_by_name['TypedValue'] -_PATH = DESCRIPTOR.message_types_by_name['Path'] -_PATHELEM = DESCRIPTOR.message_types_by_name['PathElem'] -_PATHELEM_KEYENTRY = _PATHELEM.nested_types_by_name['KeyEntry'] -_VALUE = DESCRIPTOR.message_types_by_name['Value'] -_ERROR = DESCRIPTOR.message_types_by_name['Error'] -_DECIMAL64 = DESCRIPTOR.message_types_by_name['Decimal64'] -_SCALARARRAY = DESCRIPTOR.message_types_by_name['ScalarArray'] -_SUBSCRIBEREQUEST = DESCRIPTOR.message_types_by_name['SubscribeRequest'] -_POLL = DESCRIPTOR.message_types_by_name['Poll'] -_SUBSCRIBERESPONSE = DESCRIPTOR.message_types_by_name['SubscribeResponse'] -_SUBSCRIPTIONLIST = DESCRIPTOR.message_types_by_name['SubscriptionList'] -_SUBSCRIPTION = DESCRIPTOR.message_types_by_name['Subscription'] -_QOSMARKING = DESCRIPTOR.message_types_by_name['QOSMarking'] -_SETREQUEST = DESCRIPTOR.message_types_by_name['SetRequest'] -_SETRESPONSE = DESCRIPTOR.message_types_by_name['SetResponse'] -_UPDATERESULT = DESCRIPTOR.message_types_by_name['UpdateResult'] -_GETREQUEST = DESCRIPTOR.message_types_by_name['GetRequest'] -_GETRESPONSE = DESCRIPTOR.message_types_by_name['GetResponse'] -_CAPABILITYREQUEST = DESCRIPTOR.message_types_by_name['CapabilityRequest'] -_CAPABILITYRESPONSE = DESCRIPTOR.message_types_by_name['CapabilityResponse'] -_MODELDATA = DESCRIPTOR.message_types_by_name['ModelData'] -_SUBSCRIPTIONLIST_MODE = _SUBSCRIPTIONLIST.enum_types_by_name['Mode'] -_UPDATERESULT_OPERATION = _UPDATERESULT.enum_types_by_name['Operation'] -_GETREQUEST_DATATYPE = _GETREQUEST.enum_types_by_name['DataType'] -Notification = _reflection.GeneratedProtocolMessageType('Notification', (_message.Message,), { - 'DESCRIPTOR' : _NOTIFICATION, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Notification) - }) -_sym_db.RegisterMessage(Notification) - -Update = _reflection.GeneratedProtocolMessageType('Update', (_message.Message,), { - 'DESCRIPTOR' : _UPDATE, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Update) - }) -_sym_db.RegisterMessage(Update) - -TypedValue = _reflection.GeneratedProtocolMessageType('TypedValue', (_message.Message,), { - 'DESCRIPTOR' : _TYPEDVALUE, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.TypedValue) - }) -_sym_db.RegisterMessage(TypedValue) - -Path = _reflection.GeneratedProtocolMessageType('Path', (_message.Message,), { - 'DESCRIPTOR' : _PATH, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Path) - }) -_sym_db.RegisterMessage(Path) - -PathElem = _reflection.GeneratedProtocolMessageType('PathElem', (_message.Message,), { - - 'KeyEntry' : _reflection.GeneratedProtocolMessageType('KeyEntry', (_message.Message,), { - '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,), { - 'DESCRIPTOR' : _VALUE, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Value) - }) -_sym_db.RegisterMessage(Value) - -Error = _reflection.GeneratedProtocolMessageType('Error', (_message.Message,), { - 'DESCRIPTOR' : _ERROR, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Error) - }) -_sym_db.RegisterMessage(Error) - -Decimal64 = _reflection.GeneratedProtocolMessageType('Decimal64', (_message.Message,), { - 'DESCRIPTOR' : _DECIMAL64, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Decimal64) - }) -_sym_db.RegisterMessage(Decimal64) - -ScalarArray = _reflection.GeneratedProtocolMessageType('ScalarArray', (_message.Message,), { - 'DESCRIPTOR' : _SCALARARRAY, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.ScalarArray) - }) -_sym_db.RegisterMessage(ScalarArray) - -SubscribeRequest = _reflection.GeneratedProtocolMessageType('SubscribeRequest', (_message.Message,), { - 'DESCRIPTOR' : _SUBSCRIBEREQUEST, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SubscribeRequest) - }) -_sym_db.RegisterMessage(SubscribeRequest) - -Poll = _reflection.GeneratedProtocolMessageType('Poll', (_message.Message,), { - 'DESCRIPTOR' : _POLL, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Poll) - }) -_sym_db.RegisterMessage(Poll) - -SubscribeResponse = _reflection.GeneratedProtocolMessageType('SubscribeResponse', (_message.Message,), { - 'DESCRIPTOR' : _SUBSCRIBERESPONSE, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SubscribeResponse) - }) -_sym_db.RegisterMessage(SubscribeResponse) - -SubscriptionList = _reflection.GeneratedProtocolMessageType('SubscriptionList', (_message.Message,), { - 'DESCRIPTOR' : _SUBSCRIPTIONLIST, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SubscriptionList) - }) -_sym_db.RegisterMessage(SubscriptionList) - -Subscription = _reflection.GeneratedProtocolMessageType('Subscription', (_message.Message,), { - 'DESCRIPTOR' : _SUBSCRIPTION, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Subscription) - }) -_sym_db.RegisterMessage(Subscription) - -QOSMarking = _reflection.GeneratedProtocolMessageType('QOSMarking', (_message.Message,), { - 'DESCRIPTOR' : _QOSMARKING, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.QOSMarking) - }) -_sym_db.RegisterMessage(QOSMarking) - -SetRequest = _reflection.GeneratedProtocolMessageType('SetRequest', (_message.Message,), { - 'DESCRIPTOR' : _SETREQUEST, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SetRequest) - }) -_sym_db.RegisterMessage(SetRequest) - -SetResponse = _reflection.GeneratedProtocolMessageType('SetResponse', (_message.Message,), { - 'DESCRIPTOR' : _SETRESPONSE, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SetResponse) - }) -_sym_db.RegisterMessage(SetResponse) - -UpdateResult = _reflection.GeneratedProtocolMessageType('UpdateResult', (_message.Message,), { - 'DESCRIPTOR' : _UPDATERESULT, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.UpdateResult) - }) -_sym_db.RegisterMessage(UpdateResult) - -GetRequest = _reflection.GeneratedProtocolMessageType('GetRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETREQUEST, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.GetRequest) - }) -_sym_db.RegisterMessage(GetRequest) - -GetResponse = _reflection.GeneratedProtocolMessageType('GetResponse', (_message.Message,), { - 'DESCRIPTOR' : _GETRESPONSE, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.GetResponse) - }) -_sym_db.RegisterMessage(GetResponse) - -CapabilityRequest = _reflection.GeneratedProtocolMessageType('CapabilityRequest', (_message.Message,), { - 'DESCRIPTOR' : _CAPABILITYREQUEST, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.CapabilityRequest) - }) -_sym_db.RegisterMessage(CapabilityRequest) - -CapabilityResponse = _reflection.GeneratedProtocolMessageType('CapabilityResponse', (_message.Message,), { - 'DESCRIPTOR' : _CAPABILITYRESPONSE, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.CapabilityResponse) - }) -_sym_db.RegisterMessage(CapabilityResponse) - -ModelData = _reflection.GeneratedProtocolMessageType('ModelData', (_message.Message,), { - 'DESCRIPTOR' : _MODELDATA, - '__module__' : 'proto.gnmi.gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.ModelData) - }) -_sym_db.RegisterMessage(ModelData) - -_GNMI = DESCRIPTOR.services_by_name['gNMI'] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.gnmi.gnmi_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: google_dot_protobuf_dot_descriptor__pb2.FileOptions.RegisterExtension(gnmi_service) DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\025com.github.gnmi.protoB\tGnmiProtoP\001Z%github.com/openconfig/gnmi/proto/gnmi\312>\0050.9.0' + DESCRIPTOR._serialized_options = b'\n\025com.github.gnmi.protoB\tGnmiProtoP\001Z%github.com/openconfig/gnmi/proto/gnmi\312>\0060.10.0' _UPDATE.fields_by_name['value']._options = None _UPDATE.fields_by_name['value']._serialized_options = b'\030\001' _TYPEDVALUE.fields_by_name['float_val']._options = None @@ -264,10 +51,10 @@ _UPDATERESULT.fields_by_name['message']._serialized_options = b'\030\001' _GETRESPONSE.fields_by_name['error']._options = None _GETRESPONSE.fields_by_name['error']._serialized_options = b'\030\001' - _ENCODING._serialized_start=3388 - _ENCODING._serialized_end=3456 - _SUBSCRIPTIONMODE._serialized_start=3458 - _SUBSCRIPTIONMODE._serialized_end=3523 + _ENCODING._serialized_start=3444 + _ENCODING._serialized_end=3512 + _SUBSCRIPTIONMODE._serialized_start=3514 + _SUBSCRIPTIONMODE._serialized_end=3579 _NOTIFICATION._serialized_start=151 _NOTIFICATION._serialized_end=299 _UPDATE._serialized_start=301 @@ -303,25 +90,25 @@ _QOSMARKING._serialized_start=2094 _QOSMARKING._serialized_end=2123 _SETREQUEST._serialized_start=2126 - _SETREQUEST._serialized_end=2295 - _SETRESPONSE._serialized_start=2298 - _SETRESPONSE._serialized_end=2470 - _UPDATERESULT._serialized_start=2473 - _UPDATERESULT._serialized_end=2675 - _UPDATERESULT_OPERATION._serialized_start=2614 - _UPDATERESULT_OPERATION._serialized_end=2675 - _GETREQUEST._serialized_start=2678 - _GETREQUEST._serialized_end=2957 - _GETREQUEST_DATATYPE._serialized_start=2898 - _GETREQUEST_DATATYPE._serialized_end=2957 - _GETRESPONSE._serialized_start=2959 - _GETRESPONSE._serialized_end=3086 - _CAPABILITYREQUEST._serialized_start=3088 - _CAPABILITYREQUEST._serialized_end=3147 - _CAPABILITYRESPONSE._serialized_start=3150 - _CAPABILITYRESPONSE._serialized_end=3320 - _MODELDATA._serialized_start=3322 - _MODELDATA._serialized_end=3386 - _GNMI._serialized_start=3526 - _GNMI._serialized_end=3753 + _SETREQUEST._serialized_end=2332 + _SETRESPONSE._serialized_start=2335 + _SETRESPONSE._serialized_end=2507 + _UPDATERESULT._serialized_start=2510 + _UPDATERESULT._serialized_end=2731 + _UPDATERESULT_OPERATION._serialized_start=2651 + _UPDATERESULT_OPERATION._serialized_end=2731 + _GETREQUEST._serialized_start=2734 + _GETREQUEST._serialized_end=3013 + _GETREQUEST_DATATYPE._serialized_start=2954 + _GETREQUEST_DATATYPE._serialized_end=3013 + _GETRESPONSE._serialized_start=3015 + _GETRESPONSE._serialized_end=3142 + _CAPABILITYREQUEST._serialized_start=3144 + _CAPABILITYREQUEST._serialized_end=3203 + _CAPABILITYRESPONSE._serialized_start=3206 + _CAPABILITYRESPONSE._serialized_end=3376 + _MODELDATA._serialized_start=3378 + _MODELDATA._serialized_end=3442 + _GNMI._serialized_start=3582 + _GNMI._serialized_end=3809 # @@protoc_insertion_point(module_scope) diff --git a/proto/gnmi_ext/gnmi_ext.pb.go b/proto/gnmi_ext/gnmi_ext.pb.go index ec6fc4d..54ce20c 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.27.1 -// protoc v3.21.1 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: proto/gnmi_ext/gnmi_ext.proto // Package gnmi_ext defines a set of extensions messages which can be optionally @@ -98,6 +98,7 @@ type Extension struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Ext: + // // *Extension_RegisteredExt // *Extension_MasterArbitration // *Extension_History @@ -417,6 +418,7 @@ type History struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Request: + // // *History_SnapshotTime // *History_Range Request isHistory_Request `protobuf_oneof:"request"` diff --git a/proto/gnmi_ext/gnmi_ext_pb2.py b/proto/gnmi_ext/gnmi_ext_pb2.py index 83c64dc..5d0fd9a 100644 --- a/proto/gnmi_ext/gnmi_ext_pb2.py +++ b/proto/gnmi_ext/gnmi_ext_pb2.py @@ -2,11 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/gnmi_ext/gnmi_ext.proto """Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -17,68 +15,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dproto/gnmi_ext/gnmi_ext.proto\x12\x08gnmi_ext\"\xac\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\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*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') -_EXTENSIONID = DESCRIPTOR.enum_types_by_name['ExtensionID'] -ExtensionID = enum_type_wrapper.EnumTypeWrapper(_EXTENSIONID) -EID_UNSET = 0 -EID_EXPERIMENTAL = 999 - - -_EXTENSION = DESCRIPTOR.message_types_by_name['Extension'] -_REGISTEREDEXTENSION = DESCRIPTOR.message_types_by_name['RegisteredExtension'] -_MASTERARBITRATION = DESCRIPTOR.message_types_by_name['MasterArbitration'] -_UINT128 = DESCRIPTOR.message_types_by_name['Uint128'] -_ROLE = DESCRIPTOR.message_types_by_name['Role'] -_HISTORY = DESCRIPTOR.message_types_by_name['History'] -_TIMERANGE = DESCRIPTOR.message_types_by_name['TimeRange'] -Extension = _reflection.GeneratedProtocolMessageType('Extension', (_message.Message,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - 'DESCRIPTOR' : _TIMERANGE, - '__module__' : 'proto.gnmi_ext.gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.TimeRange) - }) -_sym_db.RegisterMessage(TimeRange) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.gnmi_ext.gnmi_ext_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/proto/target/target.pb.go b/proto/target/target.pb.go index 94cffbf..af59a15 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.27.1 -// protoc v3.21.1 +// protoc-gen-go v1.28.1 +// 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_pb2.py b/proto/target/target_pb2.py index 50541e7..33adf4a 100644 --- a/proto/target/target_pb2.py +++ b/proto/target/target_pb2.py @@ -2,10 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/target/target.proto """Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -17,68 +16,8 @@ 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') - - -_CONFIGURATION = DESCRIPTOR.message_types_by_name['Configuration'] -_CONFIGURATION_REQUESTENTRY = _CONFIGURATION.nested_types_by_name['RequestEntry'] -_CONFIGURATION_TARGETENTRY = _CONFIGURATION.nested_types_by_name['TargetEntry'] -_CONFIGURATION_METAENTRY = _CONFIGURATION.nested_types_by_name['MetaEntry'] -_TARGET = DESCRIPTOR.message_types_by_name['Target'] -_TARGET_METAENTRY = _TARGET.nested_types_by_name['MetaEntry'] -_CREDENTIALS = DESCRIPTOR.message_types_by_name['Credentials'] -Configuration = _reflection.GeneratedProtocolMessageType('Configuration', (_message.Message,), { - - 'RequestEntry' : _reflection.GeneratedProtocolMessageType('RequestEntry', (_message.Message,), { - 'DESCRIPTOR' : _CONFIGURATION_REQUESTENTRY, - '__module__' : 'proto.target.target_pb2' - # @@protoc_insertion_point(class_scope:target.Configuration.RequestEntry) - }) - , - - 'TargetEntry' : _reflection.GeneratedProtocolMessageType('TargetEntry', (_message.Message,), { - 'DESCRIPTOR' : _CONFIGURATION_TARGETENTRY, - '__module__' : 'proto.target.target_pb2' - # @@protoc_insertion_point(class_scope:target.Configuration.TargetEntry) - }) - , - - 'MetaEntry' : _reflection.GeneratedProtocolMessageType('MetaEntry', (_message.Message,), { - '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,), { - - 'MetaEntry' : _reflection.GeneratedProtocolMessageType('MetaEntry', (_message.Message,), { - '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,), { - 'DESCRIPTOR' : _CREDENTIALS, - '__module__' : 'proto.target.target_pb2' - # @@protoc_insertion_point(class_scope:target.Credentials) - }) -_sym_db.RegisterMessage(Credentials) - +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.target.target_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None diff --git a/testing/fake/proto/fake.pb.go b/testing/fake/proto/fake.pb.go index b7dae25..fa4234e 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.27.1 -// protoc v3.21.1 +// protoc-gen-go v1.28.1 +// protoc v3.21.12 // source: testing/fake/proto/fake.proto package gnmi_fake @@ -289,6 +289,7 @@ type Config struct { // Generator for value series for the target. // // Types that are assignable to Generator: + // // *Config_Custom // *Config_Random // *Config_Fixed @@ -632,6 +633,7 @@ type Value struct { // value will mutate for subsequent updates. // // Types that are assignable to Value: + // // *Value_IntValue // *Value_DoubleValue // *Value_StringValue @@ -901,6 +903,7 @@ type IntValue struct { // update. Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // Types that are assignable to Distribution: + // // *IntValue_Range // *IntValue_List Distribution isIntValue_Distribution `protobuf_oneof:"distribution"` @@ -1130,6 +1133,7 @@ type DoubleValue struct { // update. Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` // Types that are assignable to Distribution: + // // *DoubleValue_Range // *DoubleValue_List Distribution isDoubleValue_Distribution `protobuf_oneof:"distribution"` @@ -1356,6 +1360,7 @@ type StringValue struct { // update. Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // Types that are assignable to Distribution: + // // *StringValue_List Distribution isStringValue_Distribution `protobuf_oneof:"distribution"` } @@ -1492,6 +1497,7 @@ type StringListValue struct { // update. Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // Types that are assignable to Distribution: + // // *StringListValue_List Distribution isStringListValue_Distribution `protobuf_oneof:"distribution"` } @@ -1570,6 +1576,7 @@ type BoolValue struct { // update. Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // Types that are assignable to Distribution: + // // *BoolValue_List Distribution isBoolValue_Distribution `protobuf_oneof:"distribution"` } @@ -1708,6 +1715,7 @@ type UintValue struct { // update. Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // Types that are assignable to Distribution: + // // *UintValue_Range // *UintValue_List Distribution isUintValue_Distribution `protobuf_oneof:"distribution"` 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 444cc5c..a119557 100644 --- a/testing/fake/proto/fake_pb2.py +++ b/testing/fake/proto/fake_pb2.py @@ -2,11 +2,9 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: testing/fake/proto/fake.proto """Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper +from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) @@ -19,191 +17,8 @@ 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') -_STATE = DESCRIPTOR.enum_types_by_name['State'] -State = enum_type_wrapper.EnumTypeWrapper(_STATE) -STOPPED = 0 -INIT = 1 -RUNNING = 2 - - -_CONFIGURATION = DESCRIPTOR.message_types_by_name['Configuration'] -_CREDENTIALS = DESCRIPTOR.message_types_by_name['Credentials'] -_CONFIG = DESCRIPTOR.message_types_by_name['Config'] -_FIXEDGENERATOR = DESCRIPTOR.message_types_by_name['FixedGenerator'] -_RANDOMGENERATOR = DESCRIPTOR.message_types_by_name['RandomGenerator'] -_DELETEVALUE = DESCRIPTOR.message_types_by_name['DeleteValue'] -_VALUE = DESCRIPTOR.message_types_by_name['Value'] -_TIMESTAMP = DESCRIPTOR.message_types_by_name['Timestamp'] -_INTVALUE = DESCRIPTOR.message_types_by_name['IntValue'] -_INTRANGE = DESCRIPTOR.message_types_by_name['IntRange'] -_INTLIST = DESCRIPTOR.message_types_by_name['IntList'] -_DOUBLEVALUE = DESCRIPTOR.message_types_by_name['DoubleValue'] -_DOUBLERANGE = DESCRIPTOR.message_types_by_name['DoubleRange'] -_DOUBLELIST = DESCRIPTOR.message_types_by_name['DoubleList'] -_STRINGVALUE = DESCRIPTOR.message_types_by_name['StringValue'] -_STRINGLIST = DESCRIPTOR.message_types_by_name['StringList'] -_STRINGLISTVALUE = DESCRIPTOR.message_types_by_name['StringListValue'] -_BOOLVALUE = DESCRIPTOR.message_types_by_name['BoolValue'] -_BOOLLIST = DESCRIPTOR.message_types_by_name['BoolList'] -_UINTVALUE = DESCRIPTOR.message_types_by_name['UintValue'] -_UINTRANGE = DESCRIPTOR.message_types_by_name['UintRange'] -_UINTLIST = DESCRIPTOR.message_types_by_name['UintList'] -_CONFIG_CLIENTTYPE = _CONFIG.enum_types_by_name['ClientType'] -Configuration = _reflection.GeneratedProtocolMessageType('Configuration', (_message.Message,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - '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,), { - 'DESCRIPTOR' : _UINTLIST, - '__module__' : 'testing.fake.proto.fake_pb2' - # @@protoc_insertion_point(class_scope:gnmi.fake.UintList) - }) -_sym_db.RegisterMessage(UintList) - -_AGENTMANAGER = DESCRIPTOR.services_by_name['AgentManager'] +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'testing.fake.proto.fake_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None