From 8c93f8df01c42353ffa49eac49ae4e1b864e97eb Mon Sep 17 00:00:00 2001 From: Sowmya D N Date: Fri, 15 May 2026 12:06:35 +0530 Subject: [PATCH 1/5] Update gnmi_ext.proto with Commit, Depth, and ConfigSubscription extensions --- .../src/yang/connector/proto/gnmi_ext_pb2.py | 127 +++++++++++++++--- .../connector/proto/protofiles/gnmi_ext.proto | 101 ++++++++++++++ 2 files changed, 210 insertions(+), 18 deletions(-) diff --git a/connector/src/yang/connector/proto/gnmi_ext_pb2.py b/connector/src/yang/connector/proto/gnmi_ext_pb2.py index 713e35fe..a1728fae 100644 --- a/connector/src/yang/connector/proto/gnmi_ext_pb2.py +++ b/connector/src/yang/connector/proto/gnmi_ext_pb2.py @@ -13,9 +13,10 @@ _sym_db = _symbol_database.Default() +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0egnmi_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') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0egnmi_ext.proto\x12\x08gnmi_ext\x1a\x1egoogle/protobuf/duration.proto\"\xaf\x02\n\tExtension\x12\x37\n\x0eregistered_ext\x18\x01 \x01(\x0b\x32\x1d.gnmi_ext.RegisteredExtensionH\x00\x12\x39\n\x12master_arbitration\x18\x02 \x01(\x0b\x32\x1b.gnmi_ext.MasterArbitrationH\x00\x12$\n\x07history\x18\x03 \x01(\x0b\x32\x11.gnmi_ext.HistoryH\x00\x12\"\n\x06\x63ommit\x18\x04 \x01(\x0b\x32\x10.gnmi_ext.CommitH\x00\x12 \n\x05\x64\x65pth\x18\x05 \x01(\x0b\x32\x0f.gnmi_ext.DepthH\x00\x12;\n\x13\x63onfig_subscription\x18\x06 \x01(\x0b\x32\x1c.gnmi_ext.ConfigSubscriptionH\x00\x42\x05\n\x03\x65xt\"E\n\x13RegisteredExtension\x12!\n\x02id\x18\x01 \x01(\x0e\x32\x15.gnmi_ext.ExtensionID\x12\x0b\n\x03msg\x18\x02 \x01(\x0c\"Y\n\x11MasterArbitration\x12\x1c\n\x04role\x18\x01 \x01(\x0b\x32\x0e.gnmi_ext.Role\x12&\n\x0b\x65lection_id\x18\x02 \x01(\x0b\x32\x11.gnmi_ext.Uint128\"$\n\x07Uint128\x12\x0c\n\x04high\x18\x01 \x01(\x04\x12\x0b\n\x03low\x18\x02 \x01(\x04\"\x12\n\x04Role\x12\n\n\x02id\x18\x01 \x01(\t\"S\n\x07History\x12\x17\n\rsnapshot_time\x18\x01 \x01(\x03H\x00\x12$\n\x05range\x18\x02 \x01(\x0b\x32\x13.gnmi_ext.TimeRangeH\x00\x42\t\n\x07request\"\'\n\tTimeRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"\xe5\x01\n\x06\x43ommit\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x06\x63ommit\x18\x02 \x01(\x0b\x32\x17.gnmi_ext.CommitRequestH\x00\x12*\n\x07\x63onfirm\x18\x03 \x01(\x0b\x32\x17.gnmi_ext.CommitConfirmH\x00\x12(\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x16.gnmi_ext.CommitCancelH\x00\x12\x44\n\x15set_rollback_duration\x18\x05 \x01(\x0b\x32#.gnmi_ext.CommitSetRollbackDurationH\x00\x42\x08\n\x06\x61\x63tion\"E\n\rCommitRequest\x12\x34\n\x11rollback_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x0f\n\rCommitConfirm\"\x0e\n\x0c\x43ommitCancel\"Q\n\x19\x43ommitSetRollbackDuration\x12\x34\n\x11rollback_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x16\n\x05\x44\x65pth\x12\r\n\x05level\x18\x01 \x01(\r\"\x8d\x01\n\x12\x43onfigSubscription\x12\x32\n\x05start\x18\x01 \x01(\x0b\x32!.gnmi_ext.ConfigSubscriptionStartH\x00\x12\x39\n\tsync_done\x18\x02 \x01(\x0b\x32$.gnmi_ext.ConfigSubscriptionSyncDoneH\x00\x42\x08\n\x06\x61\x63tion\"\x19\n\x17\x43onfigSubscriptionStart\"_\n\x1a\x43onfigSubscriptionSyncDone\x12\x19\n\x11\x63ommit_confirm_id\x18\x01 \x01(\t\x12\x18\n\x10server_commit_id\x18\x02 \x01(\t\x12\x0c\n\x04\x64one\x18\x03 \x01(\x08*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) @@ -30,6 +31,15 @@ _ROLE = DESCRIPTOR.message_types_by_name['Role'] _HISTORY = DESCRIPTOR.message_types_by_name['History'] _TIMERANGE = DESCRIPTOR.message_types_by_name['TimeRange'] +_COMMIT = DESCRIPTOR.message_types_by_name['Commit'] +_COMMITREQUEST = DESCRIPTOR.message_types_by_name['CommitRequest'] +_COMMITCONFIRM = DESCRIPTOR.message_types_by_name['CommitConfirm'] +_COMMITCANCEL = DESCRIPTOR.message_types_by_name['CommitCancel'] +_COMMITSETROLLBACKDURATION = DESCRIPTOR.message_types_by_name['CommitSetRollbackDuration'] +_DEPTH = DESCRIPTOR.message_types_by_name['Depth'] +_CONFIGSUBSCRIPTION = DESCRIPTOR.message_types_by_name['ConfigSubscription'] +_CONFIGSUBSCRIPTIONSTART = DESCRIPTOR.message_types_by_name['ConfigSubscriptionStart'] +_CONFIGSUBSCRIPTIONSYNCDONE = DESCRIPTOR.message_types_by_name['ConfigSubscriptionSyncDone'] Extension = _reflection.GeneratedProtocolMessageType('Extension', (_message.Message,), { 'DESCRIPTOR' : _EXTENSION, '__module__' : 'gnmi_ext_pb2' @@ -79,24 +89,105 @@ }) _sym_db.RegisterMessage(TimeRange) +Commit = _reflection.GeneratedProtocolMessageType('Commit', (_message.Message,), { + 'DESCRIPTOR' : _COMMIT, + '__module__' : 'gnmi_ext_pb2' + # @@protoc_insertion_point(class_scope:gnmi_ext.Commit) + }) +_sym_db.RegisterMessage(Commit) + +CommitRequest = _reflection.GeneratedProtocolMessageType('CommitRequest', (_message.Message,), { + 'DESCRIPTOR' : _COMMITREQUEST, + '__module__' : 'gnmi_ext_pb2' + # @@protoc_insertion_point(class_scope:gnmi_ext.CommitRequest) + }) +_sym_db.RegisterMessage(CommitRequest) + +CommitConfirm = _reflection.GeneratedProtocolMessageType('CommitConfirm', (_message.Message,), { + 'DESCRIPTOR' : _COMMITCONFIRM, + '__module__' : 'gnmi_ext_pb2' + # @@protoc_insertion_point(class_scope:gnmi_ext.CommitConfirm) + }) +_sym_db.RegisterMessage(CommitConfirm) + +CommitCancel = _reflection.GeneratedProtocolMessageType('CommitCancel', (_message.Message,), { + 'DESCRIPTOR' : _COMMITCANCEL, + '__module__' : 'gnmi_ext_pb2' + # @@protoc_insertion_point(class_scope:gnmi_ext.CommitCancel) + }) +_sym_db.RegisterMessage(CommitCancel) + +CommitSetRollbackDuration = _reflection.GeneratedProtocolMessageType('CommitSetRollbackDuration', (_message.Message,), { + 'DESCRIPTOR' : _COMMITSETROLLBACKDURATION, + '__module__' : 'gnmi_ext_pb2' + # @@protoc_insertion_point(class_scope:gnmi_ext.CommitSetRollbackDuration) + }) +_sym_db.RegisterMessage(CommitSetRollbackDuration) + +Depth = _reflection.GeneratedProtocolMessageType('Depth', (_message.Message,), { + 'DESCRIPTOR' : _DEPTH, + '__module__' : 'gnmi_ext_pb2' + # @@protoc_insertion_point(class_scope:gnmi_ext.Depth) + }) +_sym_db.RegisterMessage(Depth) + +ConfigSubscription = _reflection.GeneratedProtocolMessageType('ConfigSubscription', (_message.Message,), { + 'DESCRIPTOR' : _CONFIGSUBSCRIPTION, + '__module__' : 'gnmi_ext_pb2' + # @@protoc_insertion_point(class_scope:gnmi_ext.ConfigSubscription) + }) +_sym_db.RegisterMessage(ConfigSubscription) + +ConfigSubscriptionStart = _reflection.GeneratedProtocolMessageType('ConfigSubscriptionStart', (_message.Message,), { + 'DESCRIPTOR' : _CONFIGSUBSCRIPTIONSTART, + '__module__' : 'gnmi_ext_pb2' + # @@protoc_insertion_point(class_scope:gnmi_ext.ConfigSubscriptionStart) + }) +_sym_db.RegisterMessage(ConfigSubscriptionStart) + +ConfigSubscriptionSyncDone = _reflection.GeneratedProtocolMessageType('ConfigSubscriptionSyncDone', (_message.Message,), { + 'DESCRIPTOR' : _CONFIGSUBSCRIPTIONSYNCDONE, + '__module__' : 'gnmi_ext_pb2' + # @@protoc_insertion_point(class_scope:gnmi_ext.ConfigSubscriptionSyncDone) + }) +_sym_db.RegisterMessage(ConfigSubscriptionSyncDone) + if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'Z)github.com/openconfig/gnmi/proto/gnmi_ext' - _EXTENSIONID._serialized_start=549 - _EXTENSIONID._serialized_end=600 - _EXTENSION._serialized_start=29 - _EXTENSION._serialized_end=201 - _REGISTEREDEXTENSION._serialized_start=203 - _REGISTEREDEXTENSION._serialized_end=272 - _MASTERARBITRATION._serialized_start=274 - _MASTERARBITRATION._serialized_end=363 - _UINT128._serialized_start=365 - _UINT128._serialized_end=401 - _ROLE._serialized_start=403 - _ROLE._serialized_end=421 - _HISTORY._serialized_start=423 - _HISTORY._serialized_end=506 - _TIMERANGE._serialized_start=508 - _TIMERANGE._serialized_end=547 -# @@protoc_insertion_point(module_scope) \ No newline at end of file + _EXTENSIONID._serialized_start=1423 + _EXTENSIONID._serialized_end=1474 + _EXTENSION._serialized_start=61 + _EXTENSION._serialized_end=364 + _REGISTEREDEXTENSION._serialized_start=366 + _REGISTEREDEXTENSION._serialized_end=435 + _MASTERARBITRATION._serialized_start=437 + _MASTERARBITRATION._serialized_end=526 + _UINT128._serialized_start=528 + _UINT128._serialized_end=564 + _ROLE._serialized_start=566 + _ROLE._serialized_end=584 + _HISTORY._serialized_start=586 + _HISTORY._serialized_end=669 + _TIMERANGE._serialized_start=671 + _TIMERANGE._serialized_end=710 + _COMMIT._serialized_start=713 + _COMMIT._serialized_end=942 + _COMMITREQUEST._serialized_start=944 + _COMMITREQUEST._serialized_end=1013 + _COMMITCONFIRM._serialized_start=1015 + _COMMITCONFIRM._serialized_end=1030 + _COMMITCANCEL._serialized_start=1032 + _COMMITCANCEL._serialized_end=1046 + _COMMITSETROLLBACKDURATION._serialized_start=1048 + _COMMITSETROLLBACKDURATION._serialized_end=1129 + _DEPTH._serialized_start=1131 + _DEPTH._serialized_end=1153 + _CONFIGSUBSCRIPTION._serialized_start=1156 + _CONFIGSUBSCRIPTION._serialized_end=1297 + _CONFIGSUBSCRIPTIONSTART._serialized_start=1299 + _CONFIGSUBSCRIPTIONSTART._serialized_end=1324 + _CONFIGSUBSCRIPTIONSYNCDONE._serialized_start=1326 + _CONFIGSUBSCRIPTIONSYNCDONE._serialized_end=1421 +# @@protoc_insertion_point(module_scope) diff --git a/connector/src/yang/connector/proto/protofiles/gnmi_ext.proto b/connector/src/yang/connector/proto/protofiles/gnmi_ext.proto index 142fe1d2..37153122 100644 --- a/connector/src/yang/connector/proto/protofiles/gnmi_ext.proto +++ b/connector/src/yang/connector/proto/protofiles/gnmi_ext.proto @@ -15,6 +15,8 @@ // syntax = "proto3"; +import "google/protobuf/duration.proto"; + // Package gnmi_ext defines a set of extensions messages which can be optionally // included with the request and response messages of gNMI RPCs. A set of // well-known extensions are defined within this file, along with a registry for @@ -30,6 +32,9 @@ message Extension { // Well known extensions. MasterArbitration master_arbitration = 2; // Master arbitration extension. History history = 3; // History extension. + Commit commit = 4; // Commit confirmed extension. + Depth depth = 5; // Depth extension. + ConfigSubscription config_subscription = 6; // Config Subscription extension. } } @@ -89,3 +94,99 @@ message TimeRange { int64 start = 1; // Nanoseconds since the epoch int64 end = 2; // Nanoseconds since the epoch } + +// Commit confirmed extension allows automated revert of the configuration after +// certain duration if an explicit confirmation is not issued. It allows +// explicit cancellation of the commit during the rollback window. There cannot +// be more than one commit active at a given time. The document about gNMI +// commit confirmed can be found at +// https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-commit-confirmed.md +message Commit { + // ID is provided by the client during the commit request. During confirm and + // cancel actions the provided ID should match the ID provided during commit. + // If ID is not passed in any actions server shall return error. + // Required. + string id = 1; + oneof action { + // commit action creates a new commit. If a commit is on-going, server + // returns error. + CommitRequest commit = 2; + // confirm action will confirm an on-going commit, the ID provided during + // confirm should match the on-going commit ID. + CommitConfirm confirm = 3; + // cancel action will cancel an on-going commit, the ID provided during + // cancel should match the on-going commit ID. + CommitCancel cancel = 4; + // set rollback duration action sets the rollback duration of an on-going commit + // to a new value. + // The ID provided with the Commit message should match the on-going commit ID. + CommitSetRollbackDuration set_rollback_duration = 5; + } +} + +// CommitRequest is used to create a new confirmed commit. It hold additional +// parameter required for commit action. +message CommitRequest { + // Maximum duration to wait for a confirmaton before reverting the commit. + google.protobuf.Duration rollback_duration = 1; +} + +// CommitConfirm is used to confirm an on-going commit. It hold additional +// parameter required for confirm action. +message CommitConfirm {} + +// CommitCancel is used to cancel an on-going commit. It hold additional +// parameter required for cancel action. +message CommitCancel {} + +// CommitSetRollbackDuration is used to set the existing rollback duration value +// of an on-going commit to a new desired value. +message CommitSetRollbackDuration { + // Maximum duration to wait for a confirmaton before reverting the commit. + google.protobuf.Duration rollback_duration = 1; +} + +// Depth allows clients to specify the depth of the subtree to be returned in +// the response. The depth is specified as the number of levels below the +// specified path. +// The depth is applied to all paths in the Get or Subscribe request. +// The document about gNMI depth can be found at +// https://github.com/openconfig/reference/tree/master/rpc/gnmi/gnmi-depth.md +message Depth { + // The level of the subtree to be returned in the response. + // Value of 0 means no depth limit and behaves the same as if the extension + // was not specified. + // Value of 1 means only the specified path and its direct children will be + // returned. + uint32 level = 1; +} + +// ConfigSubscription extension allows clients to subscribe to configuration +// schema nodes only. +message ConfigSubscription { + oneof action { + // ConfigSubscriptionStart is sent by the client in the SubscribeRequest + ConfigSubscriptionStart start = 1; + // ConfigSubscriptionSyncDone is sent by the server in the SubscribeResponse + ConfigSubscriptionSyncDone sync_done = 2; + } +} + +// ConfigSubscriptionStart is used to indicate to a target that for a given set +// of paths in the SubscribeRequest, the client wishes to receive updates +// for the configuration schema nodes only. +message ConfigSubscriptionStart {} + +// ConfigSubscriptionSyncDone is sent by the server in the SubscribeResponse +// after all the updates for the configuration schema nodes have been sent. +message ConfigSubscriptionSyncDone { + // ID of a commit confirm operation as assigned by the client + // see Commit Confirm extension for more details. + string commit_confirm_id = 1; + // ID of a commit as might be assigned by the server + // when registering a commit operation. + string server_commit_id = 2; + // If true indicates that the server is done processing the updates related to the + // commit_confirm_id and/or server_commit_id. + bool done = 3; +} From 94d3f9f7cde49390dcc4f189560150e2d213724f Mon Sep 17 00:00:00 2001 From: Sowmya D N Date: Fri, 15 May 2026 12:54:42 +0530 Subject: [PATCH 2/5] Updated --- connector/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connector/requirements.txt b/connector/requirements.txt index 052856a2..1db4f741 100644 --- a/connector/requirements.txt +++ b/connector/requirements.txt @@ -1,3 +1,3 @@ paramiko >= 1.15.1 -lxml >= 3.3.0, <5.0.0 +lxml >= 3.3.0 ncclient >= 0.6.6 \ No newline at end of file From 06edfcacedd1d3ebec0cfc38472c8501dac30c95 Mon Sep 17 00:00:00 2001 From: Sowmya D N Date: Mon, 25 May 2026 12:15:59 +0530 Subject: [PATCH 3/5] Added changelog --- .../changelog_sodn_yang_connector_proto_202605251206.rst | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 connector/docs/changelog/undistributed/changelog_sodn_yang_connector_proto_202605251206.rst diff --git a/connector/docs/changelog/undistributed/changelog_sodn_yang_connector_proto_202605251206.rst b/connector/docs/changelog/undistributed/changelog_sodn_yang_connector_proto_202605251206.rst new file mode 100644 index 00000000..e8534f4b --- /dev/null +++ b/connector/docs/changelog/undistributed/changelog_sodn_yang_connector_proto_202605251206.rst @@ -0,0 +1,6 @@ +-------------------------------------------------------------------------------- + New +-------------------------------------------------------------------------------- +* gnmi + * Modified Gnmi + * Added support for commit and rollback operations \ No newline at end of file From f121e7851b718e2504fb5228456ef0b869beef13 Mon Sep 17 00:00:00 2001 From: Sowmya D N Date: Tue, 26 May 2026 18:56:03 +0530 Subject: [PATCH 4/5] Updated the packages --- connector/setup.py | 12 +- .../src/yang/connector/proto/gnmi_ext_pb2.py | 227 +++------- .../yang/connector/proto/gnmi_ext_pb2_grpc.py | 21 + .../src/yang/connector/proto/gnmi_pb2.py | 409 +++++------------- .../src/yang/connector/proto/gnmi_pb2_grpc.py | 37 +- .../connector/proto/protofiles/gnmi.proto | 14 +- 6 files changed, 220 insertions(+), 500 deletions(-) diff --git a/connector/setup.py b/connector/setup.py index 619bf969..e146e95c 100755 --- a/connector/setup.py +++ b/connector/setup.py @@ -176,11 +176,13 @@ def find_version(*paths): # package dependencies install_requires = [ - 'paramiko >= 1.15.1', - 'lxml >= 3.3.0', - 'ncclient >= 0.6.6', - 'grpcio', - 'protobuf' + 'paramiko >= 3.5.1', + 'lxml >= 4.9.4, <5.4.0', + 'ncclient >= 0.6.19', + 'grpcio >= 1.71.0', + 'grpcio-tools >= 1.71.0', + 'googleapis-common-protos >= 1.70.0', + 'protobuf >= 6.30.2' ], # any additional groups of dependencies. diff --git a/connector/src/yang/connector/proto/gnmi_ext_pb2.py b/connector/src/yang/connector/proto/gnmi_ext_pb2.py index a1728fae..2fea059a 100644 --- a/connector/src/yang/connector/proto/gnmi_ext_pb2.py +++ b/connector/src/yang/connector/proto/gnmi_ext_pb2.py @@ -2,12 +2,20 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: gnmi_ext.proto """Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper 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 runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'gnmi_ext.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -18,176 +26,45 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0egnmi_ext.proto\x12\x08gnmi_ext\x1a\x1egoogle/protobuf/duration.proto\"\xaf\x02\n\tExtension\x12\x37\n\x0eregistered_ext\x18\x01 \x01(\x0b\x32\x1d.gnmi_ext.RegisteredExtensionH\x00\x12\x39\n\x12master_arbitration\x18\x02 \x01(\x0b\x32\x1b.gnmi_ext.MasterArbitrationH\x00\x12$\n\x07history\x18\x03 \x01(\x0b\x32\x11.gnmi_ext.HistoryH\x00\x12\"\n\x06\x63ommit\x18\x04 \x01(\x0b\x32\x10.gnmi_ext.CommitH\x00\x12 \n\x05\x64\x65pth\x18\x05 \x01(\x0b\x32\x0f.gnmi_ext.DepthH\x00\x12;\n\x13\x63onfig_subscription\x18\x06 \x01(\x0b\x32\x1c.gnmi_ext.ConfigSubscriptionH\x00\x42\x05\n\x03\x65xt\"E\n\x13RegisteredExtension\x12!\n\x02id\x18\x01 \x01(\x0e\x32\x15.gnmi_ext.ExtensionID\x12\x0b\n\x03msg\x18\x02 \x01(\x0c\"Y\n\x11MasterArbitration\x12\x1c\n\x04role\x18\x01 \x01(\x0b\x32\x0e.gnmi_ext.Role\x12&\n\x0b\x65lection_id\x18\x02 \x01(\x0b\x32\x11.gnmi_ext.Uint128\"$\n\x07Uint128\x12\x0c\n\x04high\x18\x01 \x01(\x04\x12\x0b\n\x03low\x18\x02 \x01(\x04\"\x12\n\x04Role\x12\n\n\x02id\x18\x01 \x01(\t\"S\n\x07History\x12\x17\n\rsnapshot_time\x18\x01 \x01(\x03H\x00\x12$\n\x05range\x18\x02 \x01(\x0b\x32\x13.gnmi_ext.TimeRangeH\x00\x42\t\n\x07request\"\'\n\tTimeRange\x12\r\n\x05start\x18\x01 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x03\"\xe5\x01\n\x06\x43ommit\x12\n\n\x02id\x18\x01 \x01(\t\x12)\n\x06\x63ommit\x18\x02 \x01(\x0b\x32\x17.gnmi_ext.CommitRequestH\x00\x12*\n\x07\x63onfirm\x18\x03 \x01(\x0b\x32\x17.gnmi_ext.CommitConfirmH\x00\x12(\n\x06\x63\x61ncel\x18\x04 \x01(\x0b\x32\x16.gnmi_ext.CommitCancelH\x00\x12\x44\n\x15set_rollback_duration\x18\x05 \x01(\x0b\x32#.gnmi_ext.CommitSetRollbackDurationH\x00\x42\x08\n\x06\x61\x63tion\"E\n\rCommitRequest\x12\x34\n\x11rollback_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x0f\n\rCommitConfirm\"\x0e\n\x0c\x43ommitCancel\"Q\n\x19\x43ommitSetRollbackDuration\x12\x34\n\x11rollback_duration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x16\n\x05\x44\x65pth\x12\r\n\x05level\x18\x01 \x01(\r\"\x8d\x01\n\x12\x43onfigSubscription\x12\x32\n\x05start\x18\x01 \x01(\x0b\x32!.gnmi_ext.ConfigSubscriptionStartH\x00\x12\x39\n\tsync_done\x18\x02 \x01(\x0b\x32$.gnmi_ext.ConfigSubscriptionSyncDoneH\x00\x42\x08\n\x06\x61\x63tion\"\x19\n\x17\x43onfigSubscriptionStart\"_\n\x1a\x43onfigSubscriptionSyncDone\x12\x19\n\x11\x63ommit_confirm_id\x18\x01 \x01(\t\x12\x18\n\x10server_commit_id\x18\x02 \x01(\t\x12\x0c\n\x04\x64one\x18\x03 \x01(\x08*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'] -_COMMIT = DESCRIPTOR.message_types_by_name['Commit'] -_COMMITREQUEST = DESCRIPTOR.message_types_by_name['CommitRequest'] -_COMMITCONFIRM = DESCRIPTOR.message_types_by_name['CommitConfirm'] -_COMMITCANCEL = DESCRIPTOR.message_types_by_name['CommitCancel'] -_COMMITSETROLLBACKDURATION = DESCRIPTOR.message_types_by_name['CommitSetRollbackDuration'] -_DEPTH = DESCRIPTOR.message_types_by_name['Depth'] -_CONFIGSUBSCRIPTION = DESCRIPTOR.message_types_by_name['ConfigSubscription'] -_CONFIGSUBSCRIPTIONSTART = DESCRIPTOR.message_types_by_name['ConfigSubscriptionStart'] -_CONFIGSUBSCRIPTIONSYNCDONE = DESCRIPTOR.message_types_by_name['ConfigSubscriptionSyncDone'] -Extension = _reflection.GeneratedProtocolMessageType('Extension', (_message.Message,), { - 'DESCRIPTOR' : _EXTENSION, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.Extension) - }) -_sym_db.RegisterMessage(Extension) - -RegisteredExtension = _reflection.GeneratedProtocolMessageType('RegisteredExtension', (_message.Message,), { - 'DESCRIPTOR' : _REGISTEREDEXTENSION, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.RegisteredExtension) - }) -_sym_db.RegisterMessage(RegisteredExtension) - -MasterArbitration = _reflection.GeneratedProtocolMessageType('MasterArbitration', (_message.Message,), { - 'DESCRIPTOR' : _MASTERARBITRATION, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.MasterArbitration) - }) -_sym_db.RegisterMessage(MasterArbitration) - -Uint128 = _reflection.GeneratedProtocolMessageType('Uint128', (_message.Message,), { - 'DESCRIPTOR' : _UINT128, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.Uint128) - }) -_sym_db.RegisterMessage(Uint128) - -Role = _reflection.GeneratedProtocolMessageType('Role', (_message.Message,), { - 'DESCRIPTOR' : _ROLE, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.Role) - }) -_sym_db.RegisterMessage(Role) - -History = _reflection.GeneratedProtocolMessageType('History', (_message.Message,), { - 'DESCRIPTOR' : _HISTORY, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.History) - }) -_sym_db.RegisterMessage(History) - -TimeRange = _reflection.GeneratedProtocolMessageType('TimeRange', (_message.Message,), { - 'DESCRIPTOR' : _TIMERANGE, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.TimeRange) - }) -_sym_db.RegisterMessage(TimeRange) - -Commit = _reflection.GeneratedProtocolMessageType('Commit', (_message.Message,), { - 'DESCRIPTOR' : _COMMIT, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.Commit) - }) -_sym_db.RegisterMessage(Commit) - -CommitRequest = _reflection.GeneratedProtocolMessageType('CommitRequest', (_message.Message,), { - 'DESCRIPTOR' : _COMMITREQUEST, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.CommitRequest) - }) -_sym_db.RegisterMessage(CommitRequest) - -CommitConfirm = _reflection.GeneratedProtocolMessageType('CommitConfirm', (_message.Message,), { - 'DESCRIPTOR' : _COMMITCONFIRM, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.CommitConfirm) - }) -_sym_db.RegisterMessage(CommitConfirm) - -CommitCancel = _reflection.GeneratedProtocolMessageType('CommitCancel', (_message.Message,), { - 'DESCRIPTOR' : _COMMITCANCEL, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.CommitCancel) - }) -_sym_db.RegisterMessage(CommitCancel) - -CommitSetRollbackDuration = _reflection.GeneratedProtocolMessageType('CommitSetRollbackDuration', (_message.Message,), { - 'DESCRIPTOR' : _COMMITSETROLLBACKDURATION, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.CommitSetRollbackDuration) - }) -_sym_db.RegisterMessage(CommitSetRollbackDuration) - -Depth = _reflection.GeneratedProtocolMessageType('Depth', (_message.Message,), { - 'DESCRIPTOR' : _DEPTH, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.Depth) - }) -_sym_db.RegisterMessage(Depth) - -ConfigSubscription = _reflection.GeneratedProtocolMessageType('ConfigSubscription', (_message.Message,), { - 'DESCRIPTOR' : _CONFIGSUBSCRIPTION, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.ConfigSubscription) - }) -_sym_db.RegisterMessage(ConfigSubscription) - -ConfigSubscriptionStart = _reflection.GeneratedProtocolMessageType('ConfigSubscriptionStart', (_message.Message,), { - 'DESCRIPTOR' : _CONFIGSUBSCRIPTIONSTART, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.ConfigSubscriptionStart) - }) -_sym_db.RegisterMessage(ConfigSubscriptionStart) - -ConfigSubscriptionSyncDone = _reflection.GeneratedProtocolMessageType('ConfigSubscriptionSyncDone', (_message.Message,), { - 'DESCRIPTOR' : _CONFIGSUBSCRIPTIONSYNCDONE, - '__module__' : 'gnmi_ext_pb2' - # @@protoc_insertion_point(class_scope:gnmi_ext.ConfigSubscriptionSyncDone) - }) -_sym_db.RegisterMessage(ConfigSubscriptionSyncDone) - -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'Z)github.com/openconfig/gnmi/proto/gnmi_ext' - _EXTENSIONID._serialized_start=1423 - _EXTENSIONID._serialized_end=1474 - _EXTENSION._serialized_start=61 - _EXTENSION._serialized_end=364 - _REGISTEREDEXTENSION._serialized_start=366 - _REGISTEREDEXTENSION._serialized_end=435 - _MASTERARBITRATION._serialized_start=437 - _MASTERARBITRATION._serialized_end=526 - _UINT128._serialized_start=528 - _UINT128._serialized_end=564 - _ROLE._serialized_start=566 - _ROLE._serialized_end=584 - _HISTORY._serialized_start=586 - _HISTORY._serialized_end=669 - _TIMERANGE._serialized_start=671 - _TIMERANGE._serialized_end=710 - _COMMIT._serialized_start=713 - _COMMIT._serialized_end=942 - _COMMITREQUEST._serialized_start=944 - _COMMITREQUEST._serialized_end=1013 - _COMMITCONFIRM._serialized_start=1015 - _COMMITCONFIRM._serialized_end=1030 - _COMMITCANCEL._serialized_start=1032 - _COMMITCANCEL._serialized_end=1046 - _COMMITSETROLLBACKDURATION._serialized_start=1048 - _COMMITSETROLLBACKDURATION._serialized_end=1129 - _DEPTH._serialized_start=1131 - _DEPTH._serialized_end=1153 - _CONFIGSUBSCRIPTION._serialized_start=1156 - _CONFIGSUBSCRIPTION._serialized_end=1297 - _CONFIGSUBSCRIPTIONSTART._serialized_start=1299 - _CONFIGSUBSCRIPTIONSTART._serialized_end=1324 - _CONFIGSUBSCRIPTIONSYNCDONE._serialized_start=1326 - _CONFIGSUBSCRIPTIONSYNCDONE._serialized_end=1421 +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'gnmi_ext_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'Z)github.com/openconfig/gnmi/proto/gnmi_ext' + _globals['_EXTENSIONID']._serialized_start=1423 + _globals['_EXTENSIONID']._serialized_end=1474 + _globals['_EXTENSION']._serialized_start=61 + _globals['_EXTENSION']._serialized_end=364 + _globals['_REGISTEREDEXTENSION']._serialized_start=366 + _globals['_REGISTEREDEXTENSION']._serialized_end=435 + _globals['_MASTERARBITRATION']._serialized_start=437 + _globals['_MASTERARBITRATION']._serialized_end=526 + _globals['_UINT128']._serialized_start=528 + _globals['_UINT128']._serialized_end=564 + _globals['_ROLE']._serialized_start=566 + _globals['_ROLE']._serialized_end=584 + _globals['_HISTORY']._serialized_start=586 + _globals['_HISTORY']._serialized_end=669 + _globals['_TIMERANGE']._serialized_start=671 + _globals['_TIMERANGE']._serialized_end=710 + _globals['_COMMIT']._serialized_start=713 + _globals['_COMMIT']._serialized_end=942 + _globals['_COMMITREQUEST']._serialized_start=944 + _globals['_COMMITREQUEST']._serialized_end=1013 + _globals['_COMMITCONFIRM']._serialized_start=1015 + _globals['_COMMITCONFIRM']._serialized_end=1030 + _globals['_COMMITCANCEL']._serialized_start=1032 + _globals['_COMMITCANCEL']._serialized_end=1046 + _globals['_COMMITSETROLLBACKDURATION']._serialized_start=1048 + _globals['_COMMITSETROLLBACKDURATION']._serialized_end=1129 + _globals['_DEPTH']._serialized_start=1131 + _globals['_DEPTH']._serialized_end=1153 + _globals['_CONFIGSUBSCRIPTION']._serialized_start=1156 + _globals['_CONFIGSUBSCRIPTION']._serialized_end=1297 + _globals['_CONFIGSUBSCRIPTIONSTART']._serialized_start=1299 + _globals['_CONFIGSUBSCRIPTIONSTART']._serialized_end=1324 + _globals['_CONFIGSUBSCRIPTIONSYNCDONE']._serialized_start=1326 + _globals['_CONFIGSUBSCRIPTIONSYNCDONE']._serialized_end=1421 # @@protoc_insertion_point(module_scope) diff --git a/connector/src/yang/connector/proto/gnmi_ext_pb2_grpc.py b/connector/src/yang/connector/proto/gnmi_ext_pb2_grpc.py index 8a939394..0b2bbb93 100644 --- a/connector/src/yang/connector/proto/gnmi_ext_pb2_grpc.py +++ b/connector/src/yang/connector/proto/gnmi_ext_pb2_grpc.py @@ -1,3 +1,24 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.67.1' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in gnmi_ext_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) \ No newline at end of file diff --git a/connector/src/yang/connector/proto/gnmi_pb2.py b/connector/src/yang/connector/proto/gnmi_pb2.py index e7542008..02c0902a 100644 --- a/connector/src/yang/connector/proto/gnmi_pb2.py +++ b/connector/src/yang/connector/proto/gnmi_pb2.py @@ -2,12 +2,19 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: gnmi.proto """Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper 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 runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'gnmi.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,308 +27,96 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\ngnmi.proto\x12\x04gnmi\x1a\x19google/protobuf/any.proto\x1a google/protobuf/descriptor.proto\x1a\x0egnmi_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__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Notification) - }) -_sym_db.RegisterMessage(Notification) - -Update = _reflection.GeneratedProtocolMessageType('Update', (_message.Message,), { - 'DESCRIPTOR' : _UPDATE, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Update) - }) -_sym_db.RegisterMessage(Update) - -TypedValue = _reflection.GeneratedProtocolMessageType('TypedValue', (_message.Message,), { - 'DESCRIPTOR' : _TYPEDVALUE, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.TypedValue) - }) -_sym_db.RegisterMessage(TypedValue) - -Path = _reflection.GeneratedProtocolMessageType('Path', (_message.Message,), { - 'DESCRIPTOR' : _PATH, - '__module__' : '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__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.PathElem.KeyEntry) - }) - , - 'DESCRIPTOR' : _PATHELEM, - '__module__' : '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__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Value) - }) -_sym_db.RegisterMessage(Value) - -Error = _reflection.GeneratedProtocolMessageType('Error', (_message.Message,), { - 'DESCRIPTOR' : _ERROR, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Error) - }) -_sym_db.RegisterMessage(Error) - -Decimal64 = _reflection.GeneratedProtocolMessageType('Decimal64', (_message.Message,), { - 'DESCRIPTOR' : _DECIMAL64, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Decimal64) - }) -_sym_db.RegisterMessage(Decimal64) - -ScalarArray = _reflection.GeneratedProtocolMessageType('ScalarArray', (_message.Message,), { - 'DESCRIPTOR' : _SCALARARRAY, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.ScalarArray) - }) -_sym_db.RegisterMessage(ScalarArray) - -SubscribeRequest = _reflection.GeneratedProtocolMessageType('SubscribeRequest', (_message.Message,), { - 'DESCRIPTOR' : _SUBSCRIBEREQUEST, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SubscribeRequest) - }) -_sym_db.RegisterMessage(SubscribeRequest) - -Poll = _reflection.GeneratedProtocolMessageType('Poll', (_message.Message,), { - 'DESCRIPTOR' : _POLL, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Poll) - }) -_sym_db.RegisterMessage(Poll) - -SubscribeResponse = _reflection.GeneratedProtocolMessageType('SubscribeResponse', (_message.Message,), { - 'DESCRIPTOR' : _SUBSCRIBERESPONSE, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SubscribeResponse) - }) -_sym_db.RegisterMessage(SubscribeResponse) - -SubscriptionList = _reflection.GeneratedProtocolMessageType('SubscriptionList', (_message.Message,), { - 'DESCRIPTOR' : _SUBSCRIPTIONLIST, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SubscriptionList) - }) -_sym_db.RegisterMessage(SubscriptionList) - -Subscription = _reflection.GeneratedProtocolMessageType('Subscription', (_message.Message,), { - 'DESCRIPTOR' : _SUBSCRIPTION, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.Subscription) - }) -_sym_db.RegisterMessage(Subscription) - -QOSMarking = _reflection.GeneratedProtocolMessageType('QOSMarking', (_message.Message,), { - 'DESCRIPTOR' : _QOSMARKING, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.QOSMarking) - }) -_sym_db.RegisterMessage(QOSMarking) - -SetRequest = _reflection.GeneratedProtocolMessageType('SetRequest', (_message.Message,), { - 'DESCRIPTOR' : _SETREQUEST, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SetRequest) - }) -_sym_db.RegisterMessage(SetRequest) - -SetResponse = _reflection.GeneratedProtocolMessageType('SetResponse', (_message.Message,), { - 'DESCRIPTOR' : _SETRESPONSE, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.SetResponse) - }) -_sym_db.RegisterMessage(SetResponse) - -UpdateResult = _reflection.GeneratedProtocolMessageType('UpdateResult', (_message.Message,), { - 'DESCRIPTOR' : _UPDATERESULT, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.UpdateResult) - }) -_sym_db.RegisterMessage(UpdateResult) - -GetRequest = _reflection.GeneratedProtocolMessageType('GetRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETREQUEST, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.GetRequest) - }) -_sym_db.RegisterMessage(GetRequest) - -GetResponse = _reflection.GeneratedProtocolMessageType('GetResponse', (_message.Message,), { - 'DESCRIPTOR' : _GETRESPONSE, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.GetResponse) - }) -_sym_db.RegisterMessage(GetResponse) - -CapabilityRequest = _reflection.GeneratedProtocolMessageType('CapabilityRequest', (_message.Message,), { - 'DESCRIPTOR' : _CAPABILITYREQUEST, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.CapabilityRequest) - }) -_sym_db.RegisterMessage(CapabilityRequest) - -CapabilityResponse = _reflection.GeneratedProtocolMessageType('CapabilityResponse', (_message.Message,), { - 'DESCRIPTOR' : _CAPABILITYRESPONSE, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.CapabilityResponse) - }) -_sym_db.RegisterMessage(CapabilityResponse) - -ModelData = _reflection.GeneratedProtocolMessageType('ModelData', (_message.Message,), { - 'DESCRIPTOR' : _MODELDATA, - '__module__' : 'gnmi_pb2' - # @@protoc_insertion_point(class_scope:gnmi.ModelData) - }) -_sym_db.RegisterMessage(ModelData) - -_GNMI = DESCRIPTOR.services_by_name['gNMI'] -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>\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 - _TYPEDVALUE.fields_by_name['float_val']._serialized_options = b'\030\001' - _TYPEDVALUE.fields_by_name['decimal_val']._options = None - _TYPEDVALUE.fields_by_name['decimal_val']._serialized_options = b'\030\001' - _PATH.fields_by_name['element']._options = None - _PATH.fields_by_name['element']._serialized_options = b'\030\001' - _PATHELEM_KEYENTRY._options = None - _PATHELEM_KEYENTRY._serialized_options = b'8\001' - _VALUE._options = None - _VALUE._serialized_options = b'\030\001' - _ERROR._options = None - _ERROR._serialized_options = b'\030\001' - _DECIMAL64._options = None - _DECIMAL64._serialized_options = b'\030\001' - _SUBSCRIBERESPONSE.fields_by_name['error']._options = None - _SUBSCRIBERESPONSE.fields_by_name['error']._serialized_options = b'\030\001' - _SETRESPONSE.fields_by_name['message']._options = None - _SETRESPONSE.fields_by_name['message']._serialized_options = b'\030\001' - _UPDATERESULT.fields_by_name['timestamp']._options = None - _UPDATERESULT.fields_by_name['timestamp']._serialized_options = b'\030\001' - _UPDATERESULT.fields_by_name['message']._options = None - _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=3391 - _ENCODING._serialized_end=3459 - _SUBSCRIPTIONMODE._serialized_start=3461 - _SUBSCRIPTIONMODE._serialized_end=3526 - _NOTIFICATION._serialized_start=98 - _NOTIFICATION._serialized_end=246 - _UPDATE._serialized_start=248 - _UPDATE._serialized_end=365 - _TYPEDVALUE._serialized_start=368 - _TYPEDVALUE._serialized_end=755 - _PATH._serialized_start=757 - _PATH._serialized_end=846 - _PATHELEM._serialized_start=848 - _PATHELEM._serialized_end=954 - _PATHELEM_KEYENTRY._serialized_start=912 - _PATHELEM_KEYENTRY._serialized_end=954 - _VALUE._serialized_start=956 - _VALUE._serialized_end=1012 - _ERROR._serialized_start=1014 - _ERROR._serialized_end=1092 - _DECIMAL64._serialized_start=1094 - _DECIMAL64._serialized_end=1144 - _SCALARARRAY._serialized_start=1146 - _SCALARARRAY._serialized_end=1194 - _SUBSCRIBEREQUEST._serialized_start=1197 - _SUBSCRIBEREQUEST._serialized_end=1354 - _POLL._serialized_start=1356 - _POLL._serialized_end=1362 - _SUBSCRIBERESPONSE._serialized_start=1365 - _SUBSCRIBERESPONSE._serialized_end=1533 - _SUBSCRIPTIONLIST._serialized_start=1536 - _SUBSCRIPTIONLIST._serialized_end=1877 - _SUBSCRIPTIONLIST_MODE._serialized_start=1820 - _SUBSCRIPTIONLIST_MODE._serialized_end=1858 - _SUBSCRIPTION._serialized_start=1880 - _SUBSCRIPTION._serialized_end=2039 - _QOSMARKING._serialized_start=2041 - _QOSMARKING._serialized_end=2070 - _SETREQUEST._serialized_start=2073 - _SETREQUEST._serialized_end=2279 - _SETRESPONSE._serialized_start=2282 - _SETRESPONSE._serialized_end=2454 - _UPDATERESULT._serialized_start=2457 - _UPDATERESULT._serialized_end=2678 - _UPDATERESULT_OPERATION._serialized_start=2598 - _UPDATERESULT_OPERATION._serialized_end=2678 - _GETREQUEST._serialized_start=2681 - _GETREQUEST._serialized_end=2960 - _GETREQUEST_DATATYPE._serialized_start=2901 - _GETREQUEST_DATATYPE._serialized_end=2960 - _GETRESPONSE._serialized_start=2962 - _GETRESPONSE._serialized_end=3089 - _CAPABILITYREQUEST._serialized_start=3091 - _CAPABILITYREQUEST._serialized_end=3150 - _CAPABILITYRESPONSE._serialized_start=3153 - _CAPABILITYRESPONSE._serialized_end=3323 - _MODELDATA._serialized_start=3325 - _MODELDATA._serialized_end=3389 - _GNMI._serialized_start=3529 - _GNMI._serialized_end=3756 +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'gnmi_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\025com.github.gnmi.protoB\tGnmiProtoP\001Z%github.com/openconfig/gnmi/proto/gnmi\312>\0060.10.0' + _globals['_UPDATE'].fields_by_name['value']._options = None + _globals['_UPDATE'].fields_by_name['value']._serialized_options = b'\030\001' + _globals['_TYPEDVALUE'].fields_by_name['float_val']._options = None + _globals['_TYPEDVALUE'].fields_by_name['float_val']._serialized_options = b'\030\001' + _globals['_TYPEDVALUE'].fields_by_name['decimal_val']._options = None + _globals['_TYPEDVALUE'].fields_by_name['decimal_val']._serialized_options = b'\030\001' + _globals['_PATH'].fields_by_name['element']._options = None + _globals['_PATH'].fields_by_name['element']._serialized_options = b'\030\001' + _globals['_PATHELEM_KEYENTRY']._options = None + _globals['_PATHELEM_KEYENTRY']._serialized_options = b'8\001' + _globals['_VALUE']._options = None + _globals['_VALUE']._serialized_options = b'\030\001' + _globals['_ERROR']._options = None + _globals['_ERROR']._serialized_options = b'\030\001' + _globals['_DECIMAL64']._options = None + _globals['_DECIMAL64']._serialized_options = b'\030\001' + _globals['_SUBSCRIBERESPONSE'].fields_by_name['error']._options = None + _globals['_SUBSCRIBERESPONSE'].fields_by_name['error']._serialized_options = b'\030\001' + _globals['_SETRESPONSE'].fields_by_name['message']._options = None + _globals['_SETRESPONSE'].fields_by_name['message']._serialized_options = b'\030\001' + _globals['_UPDATERESULT'].fields_by_name['timestamp']._options = None + _globals['_UPDATERESULT'].fields_by_name['timestamp']._serialized_options = b'\030\001' + _globals['_UPDATERESULT'].fields_by_name['message']._options = None + _globals['_UPDATERESULT'].fields_by_name['message']._serialized_options = b'\030\001' + _globals['_GETRESPONSE'].fields_by_name['error']._options = None + _globals['_GETRESPONSE'].fields_by_name['error']._serialized_options = b'\030\001' + _globals['_ENCODING']._serialized_start=3391 + _globals['_ENCODING']._serialized_end=3459 + _globals['_SUBSCRIPTIONMODE']._serialized_start=3461 + _globals['_SUBSCRIPTIONMODE']._serialized_end=3526 + _globals['_NOTIFICATION']._serialized_start=98 + _globals['_NOTIFICATION']._serialized_end=246 + _globals['_UPDATE']._serialized_start=248 + _globals['_UPDATE']._serialized_end=365 + _globals['_TYPEDVALUE']._serialized_start=368 + _globals['_TYPEDVALUE']._serialized_end=755 + _globals['_PATH']._serialized_start=757 + _globals['_PATH']._serialized_end=846 + _globals['_PATHELEM']._serialized_start=848 + _globals['_PATHELEM']._serialized_end=954 + _globals['_PATHELEM_KEYENTRY']._serialized_start=912 + _globals['_PATHELEM_KEYENTRY']._serialized_end=954 + _globals['_VALUE']._serialized_start=956 + _globals['_VALUE']._serialized_end=1012 + _globals['_ERROR']._serialized_start=1014 + _globals['_ERROR']._serialized_end=1092 + _globals['_DECIMAL64']._serialized_start=1094 + _globals['_DECIMAL64']._serialized_end=1144 + _globals['_SCALARARRAY']._serialized_start=1146 + _globals['_SCALARARRAY']._serialized_end=1194 + _globals['_SUBSCRIBEREQUEST']._serialized_start=1197 + _globals['_SUBSCRIBEREQUEST']._serialized_end=1354 + _globals['_POLL']._serialized_start=1356 + _globals['_POLL']._serialized_end=1362 + _globals['_SUBSCRIBERESPONSE']._serialized_start=1365 + _globals['_SUBSCRIBERESPONSE']._serialized_end=1533 + _globals['_SUBSCRIPTIONLIST']._serialized_start=1536 + _globals['_SUBSCRIPTIONLIST']._serialized_end=1877 + _globals['_SUBSCRIPTIONLIST_MODE']._serialized_start=1820 + _globals['_SUBSCRIPTIONLIST_MODE']._serialized_end=1858 + _globals['_SUBSCRIPTION']._serialized_start=1880 + _globals['_SUBSCRIPTION']._serialized_end=2039 + _globals['_QOSMARKING']._serialized_start=2041 + _globals['_QOSMARKING']._serialized_end=2070 + _globals['_SETREQUEST']._serialized_start=2073 + _globals['_SETREQUEST']._serialized_end=2279 + _globals['_SETRESPONSE']._serialized_start=2282 + _globals['_SETRESPONSE']._serialized_end=2454 + _globals['_UPDATERESULT']._serialized_start=2457 + _globals['_UPDATERESULT']._serialized_end=2678 + _globals['_UPDATERESULT_OPERATION']._serialized_start=2598 + _globals['_UPDATERESULT_OPERATION']._serialized_end=2678 + _globals['_GETREQUEST']._serialized_start=2681 + _globals['_GETREQUEST']._serialized_end=2960 + _globals['_GETREQUEST_DATATYPE']._serialized_start=2901 + _globals['_GETREQUEST_DATATYPE']._serialized_end=2960 + _globals['_GETRESPONSE']._serialized_start=2962 + _globals['_GETRESPONSE']._serialized_end=3089 + _globals['_CAPABILITYREQUEST']._serialized_start=3091 + _globals['_CAPABILITYREQUEST']._serialized_end=3150 + _globals['_CAPABILITYRESPONSE']._serialized_start=3153 + _globals['_CAPABILITYRESPONSE']._serialized_end=3323 + _globals['_MODELDATA']._serialized_start=3325 + _globals['_MODELDATA']._serialized_end=3389 + _globals['_GNMI']._serialized_start=3529 + _globals['_GNMI']._serialized_end=3756 # @@protoc_insertion_point(module_scope) \ No newline at end of file diff --git a/connector/src/yang/connector/proto/gnmi_pb2_grpc.py b/connector/src/yang/connector/proto/gnmi_pb2_grpc.py index d725c032..5e1b4105 100644 --- a/connector/src/yang/connector/proto/gnmi_pb2_grpc.py +++ b/connector/src/yang/connector/proto/gnmi_pb2_grpc.py @@ -1,9 +1,27 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc - +import warnings from . import gnmi_pb2 as gnmi__pb2 +GRPC_GENERATED_VERSION = '1.67.1' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in gnmi_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) class gNMIStub(object): """Missing associated documentation comment in .proto file.""" @@ -18,22 +36,22 @@ def __init__(self, channel): '/gnmi.gNMI/Capabilities', request_serializer=gnmi__pb2.CapabilityRequest.SerializeToString, response_deserializer=gnmi__pb2.CapabilityResponse.FromString, - ) + _registered_method=True) self.Get = channel.unary_unary( '/gnmi.gNMI/Get', request_serializer=gnmi__pb2.GetRequest.SerializeToString, response_deserializer=gnmi__pb2.GetResponse.FromString, - ) + _registered_method=True) self.Set = channel.unary_unary( '/gnmi.gNMI/Set', request_serializer=gnmi__pb2.SetRequest.SerializeToString, response_deserializer=gnmi__pb2.SetResponse.FromString, - ) + _registered_method=True) self.Subscribe = channel.stream_stream( '/gnmi.gNMI/Subscribe', request_serializer=gnmi__pb2.SubscribeRequest.SerializeToString, response_deserializer=gnmi__pb2.SubscribeResponse.FromString, - ) + _registered_method=True) class gNMIServicer(object): @@ -110,6 +128,7 @@ def add_gNMIServicer_to_server(servicer, server): generic_handler = grpc.method_handlers_generic_handler( 'gnmi.gNMI', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('gnmi.gNMI', rpc_method_handlers) # This class is part of an EXPERIMENTAL API. @@ -131,7 +150,7 @@ def Capabilities(request, gnmi__pb2.CapabilityRequest.SerializeToString, gnmi__pb2.CapabilityResponse.FromString, options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + insecure, call_credentials, compression, wait_for_ready, timeout, metadata, _registered_method=True) @staticmethod def Get(request, @@ -148,7 +167,7 @@ def Get(request, gnmi__pb2.GetRequest.SerializeToString, gnmi__pb2.GetResponse.FromString, options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + insecure, call_credentials, compression, wait_for_ready, timeout, metadata, _registered_method=True) @staticmethod def Set(request, @@ -165,7 +184,7 @@ def Set(request, gnmi__pb2.SetRequest.SerializeToString, gnmi__pb2.SetResponse.FromString, options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + insecure, call_credentials, compression, wait_for_ready, timeout, metadata, _registered_method=True) @staticmethod def Subscribe(request_iterator, @@ -182,4 +201,4 @@ def Subscribe(request_iterator, gnmi__pb2.SubscribeRequest.SerializeToString, gnmi__pb2.SubscribeResponse.FromString, options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) \ No newline at end of file + insecure, call_credentials, compression, wait_for_ready, timeout, metadata, _registered_method=True) \ No newline at end of file diff --git a/connector/src/yang/connector/proto/protofiles/gnmi.proto b/connector/src/yang/connector/proto/protofiles/gnmi.proto index c50394fb..a0c03b31 100644 --- a/connector/src/yang/connector/proto/protofiles/gnmi.proto +++ b/connector/src/yang/connector/proto/protofiles/gnmi.proto @@ -17,7 +17,7 @@ syntax = "proto3"; import "google/protobuf/any.proto"; import "google/protobuf/descriptor.proto"; -import "github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto"; +import "gnmi_ext.proto"; // Package gNMI defines a service specification for the gRPC Network Management // Interface. This interface is defined to be a standard interface via which @@ -303,9 +303,15 @@ message Subscription { // Indicates whether values that have not changed should be sent in a SAMPLE // subscription. bool suppress_redundant = 4; - // Specifies the maximum allowable silent period in nanoseconds when - // suppress_redundant is in use. The target should send a value at least once - // in the period specified. + // 1. A heartbeat interval MAY be specified along with an “on change” + // subscription - in this case, the value of the data item(s) MUST be re-sent + // once per heartbeat interval regardless of whether the value has changed or + // not. + // 2. A heartbeat_interval MAY be specified to modify the behavior of + // suppress_redundant in a sampled subscription. In this case, the + // target MUST generate one telemetry update per heartbeat interval, + // regardless of whether the suppress_redundant flag is set to true. + // This value is specified as an unsigned 64-bit integer in nanoseconds uint64 heartbeat_interval = 5; } From fe4ebcaae55f2772a817e731e5a2fc54110209ae Mon Sep 17 00:00:00 2001 From: Sowmya D N Date: Tue, 26 May 2026 19:05:20 +0530 Subject: [PATCH 5/5] Package updated --- connector/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connector/setup.py b/connector/setup.py index e146e95c..84877bc9 100755 --- a/connector/setup.py +++ b/connector/setup.py @@ -177,7 +177,7 @@ def find_version(*paths): # package dependencies install_requires = [ 'paramiko >= 3.5.1', - 'lxml >= 4.9.4, <5.4.0', + 'lxml >= 4.9.4, <6.0.4', 'ncclient >= 0.6.19', 'grpcio >= 1.71.0', 'grpcio-tools >= 1.71.0',