diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:03:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:03:42 +0000 |
commit | 66cec45960ce1d9c794e9399de15c138acb18aed (patch) | |
tree | 59cd19d69e9d56b7989b080da7c20ef1a3fe2a5a /ansible_collections/cisco/iosxr/plugins/sub_plugins | |
parent | Initial commit. (diff) | |
download | ansible-upstream.tar.xz ansible-upstream.zip |
Adding upstream version 7.3.0+dfsg.upstream/7.3.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/cisco/iosxr/plugins/sub_plugins')
4 files changed, 2550 insertions, 0 deletions
diff --git a/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/__init__.py b/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/__init__.py diff --git a/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/iosxr.py b/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/iosxr.py new file mode 100644 index 00000000..0bcfd0e7 --- /dev/null +++ b/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/iosxr.py @@ -0,0 +1,200 @@ +# (c) 2019 Ansible Project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# +from __future__ import absolute_import, division, print_function + + +__metaclass__ = type + +DOCUMENTATION = """ +--- +author: Ansible Networking Team +grpc : iosxr +short_description: gRPC Plugin for IOS XR devices +description: + - This gRPC plugin provides methods to connect and talk to Cisco IOS XR + devices over gRPC protocol. +version_added: "" +""" +import json +import os +import sys + +from ansible_collections.ansible.netcommon.plugins.sub_plugins.grpc.base import ( + GrpcBase, + ensure_connect, +) + + +class Grpc(GrpcBase): + def __init__(self, connection): + super(Grpc, self).__init__(connection) + module_name = "ems_grpc_pb2" + module_path = os.path.join( + os.path.dirname(os.path.realpath(__file__)), + "pb/ems_grpc_pb2.py", + ) + if sys.version_info[0] == 3 and sys.version_info[1] >= 5: + import importlib.util + + spec = importlib.util.spec_from_file_location(module_name, module_path) + self._ems_grpc_pb2 = importlib.util.module_from_spec(spec) + spec.loader.exec_module(self._ems_grpc_pb2) + elif sys.version_info[0] == 3 and sys.version_info[1] < 5: + import importlib.machinery + + loader = importlib.machinery.SourceFileLoader(module_name, module_path) + self._ems_grpc_pb2 = loader.load_module() + elif sys.version_info[0] == 2: + import imp + + self._ems_grpc_pb2 = imp.load_source(module_name, module_path) + + def get_config(self, section=None): + stub = self._ems_grpc_pb2.beta_create_gRPCConfigOper_stub( + self._connection._channel, + ) + message = self._ems_grpc_pb2.ConfigGetArgs(yangpathjson=section) + responses = stub.GetConfig( + message, + self._connection._timeout, + metadata=self._connection._login_credentials, + ) + output = {"response": "", "error": ""} + for response in responses: + output["response"] += response.yangjson + output["error"] += response.errors + return output + + def get(self, section=None): + stub = self._ems_grpc_pb2.beta_create_gRPCConfigOper_stub( + self._connection._channel, + ) + message = self._ems_grpc_pb2.GetOperArgs(yangpathjson=section) + responses = stub.GetOper( + message, + self._connection._timeout, + metadata=self._connection._login_credentials, + ) + output = {"response": "", "error": ""} + for response in responses: + output["response"] += response.yangjson + output["error"] += response.errors + return output + + @ensure_connect + def merge_config(self, path): + """Merge grpc call equivalent of PATCH RESTconf call + :param data: JSON + :type data: str + :return: Return the response object + :rtype: Response object + """ + path = json.dumps(path) + stub = self._ems_grpc_pb2.beta_create_gRPCConfigOper_stub( + self._connection._channel, + ) + message = self._ems_grpc_pb2.ConfigArgs(yangjson=path) + response = stub.MergeConfig( + message, + self._connection._timeout, + metadata=self._connection._login_credentials, + ) + if response: + return response.errors + else: + return None + + @ensure_connect + def replace_config(self, path): + """Replace grpc call equivalent of PATCH RESTconf call + :param data: JSON + :type data: str + :return: Return the response object + :rtype: Response object + """ + path = json.dumps(path) + stub = self._ems_grpc_pb2.beta_create_gRPCConfigOper_stub( + self._connection._channel, + ) + message = self._ems_grpc_pb2.ConfigArgs(yangjson=path) + response = stub.ReplaceConfig( + message, + self._connection._timeout, + metadata=self._connection._login_credentials, + ) + if response: + return response.errors + else: + return None + + @ensure_connect + def delete_config(self, path): + """Delete grpc call equivalent of PATCH RESTconf call + :param data: JSON + :type data: str + :return: Return the response object + :rtype: Response object + """ + path = json.dumps(path) + stub = self._ems_grpc_pb2.beta_create_gRPCConfigOper_stub( + self._connection._channel, + ) + message = self._ems_grpc_pb2.ConfigArgs(yangjson=path) + response = stub.DeleteConfig( + message, + self._connection._timeout, + metadata=self._connection._login_credentials, + ) + if response: + return response.errors + else: + return None + + @ensure_connect + def run_cli(self, command=None, display=None): + if command is None: + raise ValueError("command value must be provided") + + output = {"response": "", "error": ""} + stub = self._ems_grpc_pb2.beta_create_gRPCExec_stub( + self._connection._channel, + ) + + message = self._ems_grpc_pb2.ShowCmdArgs(cli=command) + if display == "text": + responses = stub.ShowCmdTextOutput( + message, + self._connection._timeout, + metadata=self._connection._login_credentials, + ) + for response in responses: + output["response"] += response.output + output["error"] += response.errors + else: + responses = stub.ShowCmdJSONOutput( + message, + self._connection._timeout, + metadata=self._connection._login_credentials, + ) + for response in responses: + output["response"] += response.jsonoutput + output["error"] += response.errors + return output + + @property + def server_capabilities(self): + capability = dict() + capability["display"] = ["json", "text"] + capability["data_type"] = ["config", "oper"] + capability["supports_commit"] = True + capability["supports_cli_command"] = True + return capability + + @ensure_connect + def get_capabilities(self): + result = dict() + result["rpc"] = self.__rpc__ + ["commit", "discard_changes"] + result["network_api"] = "ansible.netcommon.grpc" + result["server_capabilities"] = self.server_capabilities + return result diff --git a/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/pb/__init__.py b/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/pb/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/pb/__init__.py diff --git a/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/pb/ems_grpc_pb2.py b/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/pb/ems_grpc_pb2.py new file mode 100644 index 00000000..e16c305b --- /dev/null +++ b/ansible_collections/cisco/iosxr/plugins/sub_plugins/grpc/pb/ems_grpc_pb2.py @@ -0,0 +1,2350 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ems_grpc.proto +from __future__ import absolute_import, division, print_function + + +__metaclass__ = type + +import sys + + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pb2 # noqa: F401 +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import enum_type_wrapper + + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor.FileDescriptor( + name="ems_grpc.proto", + package="IOSXRExtensibleManagabilityService", + syntax="proto3", + serialized_pb=_b( + '\n\x0e\x65ms_grpc.proto\x12"IOSXRExtensibleManagabilityService"4\n\rConfigGetArgs\x12\r\n\x05ReqId\x18\x01 \x01(\x03\x12\x14\n\x0cyangpathjson\x18\x02 \x01(\t"D\n\x0e\x43onfigGetReply\x12\x10\n\x08ResReqId\x18\x01 \x01(\x03\x12\x10\n\x08yangjson\x18\x02 \x01(\t\x12\x0e\n\x06\x65rrors\x18\x03 \x01(\t"2\n\x0bGetOperArgs\x12\r\n\x05ReqId\x18\x01 \x01(\x03\x12\x14\n\x0cyangpathjson\x18\x02 \x01(\t"B\n\x0cGetOperReply\x12\x10\n\x08ResReqId\x18\x01 \x01(\x03\x12\x10\n\x08yangjson\x18\x02 \x01(\t\x12\x0e\n\x06\x65rrors\x18\x03 \x01(\t"-\n\nConfigArgs\x12\r\n\x05ReqId\x18\x01 \x01(\x03\x12\x10\n\x08yangjson\x18\x02 \x01(\t"/\n\x0b\x43onfigReply\x12\x10\n\x08ResReqId\x18\x01 \x01(\x03\x12\x0e\n\x06\x65rrors\x18\x02 \x01(\t"+\n\rCliConfigArgs\x12\r\n\x05ReqId\x18\x01 \x01(\x03\x12\x0b\n\x03\x63li\x18\x02 \x01(\t"2\n\x0e\x43liConfigReply\x12\x10\n\x08ResReqId\x18\x01 \x01(\x03\x12\x0e\n\x06\x65rrors\x18\x02 \x01(\t"A\n\x11\x43ommitReplaceArgs\x12\r\n\x05ReqId\x18\x01 \x01(\x03\x12\x0b\n\x03\x63li\x18\x02 \x01(\t\x12\x10\n\x08yangjson\x18\x03 \x01(\t"6\n\x12\x43ommitReplaceReply\x12\x10\n\x08ResReqId\x18\x01 \x01(\x03\x12\x0e\n\x06\x65rrors\x18\x02 \x01(\t"+\n\tCommitMsg\x12\r\n\x05label\x18\x01 \x01(\t\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t"W\n\nCommitArgs\x12:\n\x03msg\x18\x01 \x01(\x0b\x32-.IOSXRExtensibleManagabilityService.CommitMsg\x12\r\n\x05ReqId\x18\x02 \x01(\x03"q\n\x0b\x43ommitReply\x12@\n\x06result\x18\x01 \x01(\x0e\x32\x30.IOSXRExtensibleManagabilityService.CommitResult\x12\x10\n\x08ResReqId\x18\x02 \x01(\x03\x12\x0e\n\x06\x65rrors\x18\x03 \x01(\t"#\n\x12\x44iscardChangesArgs\x12\r\n\x05ReqId\x18\x01 \x01(\x03"7\n\x13\x44iscardChangesReply\x12\x10\n\x08ResReqId\x18\x01 \x01(\x03\x12\x0e\n\x06\x65rrors\x18\x02 \x01(\t")\n\x0bShowCmdArgs\x12\r\n\x05ReqId\x18\x01 \x01(\x03\x12\x0b\n\x03\x63li\x18\x02 \x01(\t"D\n\x10ShowCmdTextReply\x12\x10\n\x08ResReqId\x18\x01 \x01(\x03\x12\x0e\n\x06output\x18\x02 \x01(\t\x12\x0e\n\x06\x65rrors\x18\x03 \x01(\t"H\n\x10ShowCmdJSONReply\x12\x10\n\x08ResReqId\x18\x01 \x01(\x03\x12\x12\n\njsonoutput\x18\x02 \x01(\t\x12\x0e\n\x06\x65rrors\x18\x03 \x01(\t"A\n\x0e\x43reateSubsArgs\x12\r\n\x05ReqId\x18\x01 \x01(\x03\x12\x0e\n\x06\x65ncode\x18\x02 \x01(\x03\x12\x10\n\x08subidstr\x18\x03 \x01(\t"A\n\x0f\x43reateSubsReply\x12\x10\n\x08ResReqId\x18\x01 \x01(\x03\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x0e\n\x06\x65rrors\x18\x03 \x01(\t*3\n\x0c\x43ommitResult\x12\n\n\x06\x43HANGE\x10\x00\x12\r\n\tNO_CHANGE\x10\x01\x12\x08\n\x04\x46\x41IL\x10\x02\x32\xc6\t\n\x0egRPCConfigOper\x12v\n\tGetConfig\x12\x31.IOSXRExtensibleManagabilityService.ConfigGetArgs\x1a\x32.IOSXRExtensibleManagabilityService.ConfigGetReply"\x00\x30\x01\x12p\n\x0bMergeConfig\x12..IOSXRExtensibleManagabilityService.ConfigArgs\x1a/.IOSXRExtensibleManagabilityService.ConfigReply"\x00\x12q\n\x0c\x44\x65leteConfig\x12..IOSXRExtensibleManagabilityService.ConfigArgs\x1a/.IOSXRExtensibleManagabilityService.ConfigReply"\x00\x12r\n\rReplaceConfig\x12..IOSXRExtensibleManagabilityService.ConfigArgs\x1a/.IOSXRExtensibleManagabilityService.ConfigReply"\x00\x12t\n\tCliConfig\x12\x31.IOSXRExtensibleManagabilityService.CliConfigArgs\x1a\x32.IOSXRExtensibleManagabilityService.CliConfigReply"\x00\x12\x80\x01\n\rCommitReplace\x12\x35.IOSXRExtensibleManagabilityService.CommitReplaceArgs\x1a\x36.IOSXRExtensibleManagabilityService.CommitReplaceReply"\x00\x12q\n\x0c\x43ommitConfig\x12..IOSXRExtensibleManagabilityService.CommitArgs\x1a/.IOSXRExtensibleManagabilityService.CommitReply"\x00\x12\x89\x01\n\x14\x43onfigDiscardChanges\x12\x36.IOSXRExtensibleManagabilityService.DiscardChangesArgs\x1a\x37.IOSXRExtensibleManagabilityService.DiscardChangesReply"\x00\x12p\n\x07GetOper\x12/.IOSXRExtensibleManagabilityService.GetOperArgs\x1a\x30.IOSXRExtensibleManagabilityService.GetOperReply"\x00\x30\x01\x12y\n\nCreateSubs\x12\x32.IOSXRExtensibleManagabilityService.CreateSubsArgs\x1a\x33.IOSXRExtensibleManagabilityService.CreateSubsReply"\x00\x30\x01\x32\x8a\x02\n\x08gRPCExec\x12~\n\x11ShowCmdTextOutput\x12/.IOSXRExtensibleManagabilityService.ShowCmdArgs\x1a\x34.IOSXRExtensibleManagabilityService.ShowCmdTextReply"\x00\x30\x01\x12~\n\x11ShowCmdJSONOutput\x12/.IOSXRExtensibleManagabilityService.ShowCmdArgs\x1a\x34.IOSXRExtensibleManagabilityService.ShowCmdJSONReply"\x00\x30\x01\x62\x06proto3', # noqa: E501 + ), +) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +_COMMITRESULT = _descriptor.EnumDescriptor( + name="CommitResult", + full_name="IOSXRExtensibleManagabilityService.CommitResult", + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name="CHANGE", + index=0, + number=0, + options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="NO_CHANGE", + index=1, + number=1, + options=None, + type=None, + ), + _descriptor.EnumValueDescriptor( + name="FAIL", + index=2, + number=2, + options=None, + type=None, + ), + ], + containing_type=None, + options=None, + serialized_start=1278, + serialized_end=1329, +) +_sym_db.RegisterEnumDescriptor(_COMMITRESULT) + +CommitResult = enum_type_wrapper.EnumTypeWrapper(_COMMITRESULT) +CHANGE = 0 +NO_CHANGE = 1 +FAIL = 2 + + +_CONFIGGETARGS = _descriptor.Descriptor( + name="ConfigGetArgs", + full_name="IOSXRExtensibleManagabilityService.ConfigGetArgs", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ReqId", + full_name="IOSXRExtensibleManagabilityService.ConfigGetArgs.ReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="yangpathjson", + full_name="IOSXRExtensibleManagabilityService.ConfigGetArgs.yangpathjson", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=54, + serialized_end=106, +) + + +_CONFIGGETREPLY = _descriptor.Descriptor( + name="ConfigGetReply", + full_name="IOSXRExtensibleManagabilityService.ConfigGetReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ResReqId", + full_name="IOSXRExtensibleManagabilityService.ConfigGetReply.ResReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="yangjson", + full_name="IOSXRExtensibleManagabilityService.ConfigGetReply.yangjson", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="errors", + full_name="IOSXRExtensibleManagabilityService.ConfigGetReply.errors", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=108, + serialized_end=176, +) + + +_GETOPERARGS = _descriptor.Descriptor( + name="GetOperArgs", + full_name="IOSXRExtensibleManagabilityService.GetOperArgs", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ReqId", + full_name="IOSXRExtensibleManagabilityService.GetOperArgs.ReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="yangpathjson", + full_name="IOSXRExtensibleManagabilityService.GetOperArgs.yangpathjson", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=178, + serialized_end=228, +) + + +_GETOPERREPLY = _descriptor.Descriptor( + name="GetOperReply", + full_name="IOSXRExtensibleManagabilityService.GetOperReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ResReqId", + full_name="IOSXRExtensibleManagabilityService.GetOperReply.ResReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="yangjson", + full_name="IOSXRExtensibleManagabilityService.GetOperReply.yangjson", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="errors", + full_name="IOSXRExtensibleManagabilityService.GetOperReply.errors", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=230, + serialized_end=296, +) + + +_CONFIGARGS = _descriptor.Descriptor( + name="ConfigArgs", + full_name="IOSXRExtensibleManagabilityService.ConfigArgs", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ReqId", + full_name="IOSXRExtensibleManagabilityService.ConfigArgs.ReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="yangjson", + full_name="IOSXRExtensibleManagabilityService.ConfigArgs.yangjson", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=298, + serialized_end=343, +) + + +_CONFIGREPLY = _descriptor.Descriptor( + name="ConfigReply", + full_name="IOSXRExtensibleManagabilityService.ConfigReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ResReqId", + full_name="IOSXRExtensibleManagabilityService.ConfigReply.ResReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="errors", + full_name="IOSXRExtensibleManagabilityService.ConfigReply.errors", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=345, + serialized_end=392, +) + + +_CLICONFIGARGS = _descriptor.Descriptor( + name="CliConfigArgs", + full_name="IOSXRExtensibleManagabilityService.CliConfigArgs", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ReqId", + full_name="IOSXRExtensibleManagabilityService.CliConfigArgs.ReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="cli", + full_name="IOSXRExtensibleManagabilityService.CliConfigArgs.cli", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=394, + serialized_end=437, +) + + +_CLICONFIGREPLY = _descriptor.Descriptor( + name="CliConfigReply", + full_name="IOSXRExtensibleManagabilityService.CliConfigReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ResReqId", + full_name="IOSXRExtensibleManagabilityService.CliConfigReply.ResReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="errors", + full_name="IOSXRExtensibleManagabilityService.CliConfigReply.errors", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=439, + serialized_end=489, +) + + +_COMMITREPLACEARGS = _descriptor.Descriptor( + name="CommitReplaceArgs", + full_name="IOSXRExtensibleManagabilityService.CommitReplaceArgs", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ReqId", + full_name="IOSXRExtensibleManagabilityService.CommitReplaceArgs.ReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="cli", + full_name="IOSXRExtensibleManagabilityService.CommitReplaceArgs.cli", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="yangjson", + full_name="IOSXRExtensibleManagabilityService.CommitReplaceArgs.yangjson", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=491, + serialized_end=556, +) + + +_COMMITREPLACEREPLY = _descriptor.Descriptor( + name="CommitReplaceReply", + full_name="IOSXRExtensibleManagabilityService.CommitReplaceReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ResReqId", + full_name="IOSXRExtensibleManagabilityService.CommitReplaceReply.ResReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="errors", + full_name="IOSXRExtensibleManagabilityService.CommitReplaceReply.errors", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=558, + serialized_end=612, +) + + +_COMMITMSG = _descriptor.Descriptor( + name="CommitMsg", + full_name="IOSXRExtensibleManagabilityService.CommitMsg", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="label", + full_name="IOSXRExtensibleManagabilityService.CommitMsg.label", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="comment", + full_name="IOSXRExtensibleManagabilityService.CommitMsg.comment", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=614, + serialized_end=657, +) + + +_COMMITARGS = _descriptor.Descriptor( + name="CommitArgs", + full_name="IOSXRExtensibleManagabilityService.CommitArgs", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="msg", + full_name="IOSXRExtensibleManagabilityService.CommitArgs.msg", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="ReqId", + full_name="IOSXRExtensibleManagabilityService.CommitArgs.ReqId", + index=1, + number=2, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=659, + serialized_end=746, +) + + +_COMMITREPLY = _descriptor.Descriptor( + name="CommitReply", + full_name="IOSXRExtensibleManagabilityService.CommitReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="result", + full_name="IOSXRExtensibleManagabilityService.CommitReply.result", + index=0, + number=1, + type=14, + cpp_type=8, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="ResReqId", + full_name="IOSXRExtensibleManagabilityService.CommitReply.ResReqId", + index=1, + number=2, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="errors", + full_name="IOSXRExtensibleManagabilityService.CommitReply.errors", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=748, + serialized_end=861, +) + + +_DISCARDCHANGESARGS = _descriptor.Descriptor( + name="DiscardChangesArgs", + full_name="IOSXRExtensibleManagabilityService.DiscardChangesArgs", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ReqId", + full_name="IOSXRExtensibleManagabilityService.DiscardChangesArgs.ReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=863, + serialized_end=898, +) + + +_DISCARDCHANGESREPLY = _descriptor.Descriptor( + name="DiscardChangesReply", + full_name="IOSXRExtensibleManagabilityService.DiscardChangesReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ResReqId", + full_name="IOSXRExtensibleManagabilityService.DiscardChangesReply.ResReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="errors", + full_name="IOSXRExtensibleManagabilityService.DiscardChangesReply.errors", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=900, + serialized_end=955, +) + + +_SHOWCMDARGS = _descriptor.Descriptor( + name="ShowCmdArgs", + full_name="IOSXRExtensibleManagabilityService.ShowCmdArgs", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ReqId", + full_name="IOSXRExtensibleManagabilityService.ShowCmdArgs.ReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="cli", + full_name="IOSXRExtensibleManagabilityService.ShowCmdArgs.cli", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=957, + serialized_end=998, +) + + +_SHOWCMDTEXTREPLY = _descriptor.Descriptor( + name="ShowCmdTextReply", + full_name="IOSXRExtensibleManagabilityService.ShowCmdTextReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ResReqId", + full_name="IOSXRExtensibleManagabilityService.ShowCmdTextReply.ResReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="output", + full_name="IOSXRExtensibleManagabilityService.ShowCmdTextReply.output", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="errors", + full_name="IOSXRExtensibleManagabilityService.ShowCmdTextReply.errors", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1000, + serialized_end=1068, +) + + +_SHOWCMDJSONREPLY = _descriptor.Descriptor( + name="ShowCmdJSONReply", + full_name="IOSXRExtensibleManagabilityService.ShowCmdJSONReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ResReqId", + full_name="IOSXRExtensibleManagabilityService.ShowCmdJSONReply.ResReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="jsonoutput", + full_name="IOSXRExtensibleManagabilityService.ShowCmdJSONReply.jsonoutput", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="errors", + full_name="IOSXRExtensibleManagabilityService.ShowCmdJSONReply.errors", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1070, + serialized_end=1142, +) + + +_CREATESUBSARGS = _descriptor.Descriptor( + name="CreateSubsArgs", + full_name="IOSXRExtensibleManagabilityService.CreateSubsArgs", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ReqId", + full_name="IOSXRExtensibleManagabilityService.CreateSubsArgs.ReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="encode", + full_name="IOSXRExtensibleManagabilityService.CreateSubsArgs.encode", + index=1, + number=2, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="subidstr", + full_name="IOSXRExtensibleManagabilityService.CreateSubsArgs.subidstr", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1144, + serialized_end=1209, +) + + +_CREATESUBSREPLY = _descriptor.Descriptor( + name="CreateSubsReply", + full_name="IOSXRExtensibleManagabilityService.CreateSubsReply", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="ResReqId", + full_name="IOSXRExtensibleManagabilityService.CreateSubsReply.ResReqId", + index=0, + number=1, + type=3, + cpp_type=2, + label=1, + has_default_value=False, + default_value=0, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="data", + full_name="IOSXRExtensibleManagabilityService.CreateSubsReply.data", + index=1, + number=2, + type=12, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b(""), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + _descriptor.FieldDescriptor( + name="errors", + full_name="IOSXRExtensibleManagabilityService.CreateSubsReply.errors", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + options=None, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=1211, + serialized_end=1276, +) + +_COMMITARGS.fields_by_name["msg"].message_type = _COMMITMSG +_COMMITREPLY.fields_by_name["result"].enum_type = _COMMITRESULT +DESCRIPTOR.message_types_by_name["ConfigGetArgs"] = _CONFIGGETARGS +DESCRIPTOR.message_types_by_name["ConfigGetReply"] = _CONFIGGETREPLY +DESCRIPTOR.message_types_by_name["GetOperArgs"] = _GETOPERARGS +DESCRIPTOR.message_types_by_name["GetOperReply"] = _GETOPERREPLY +DESCRIPTOR.message_types_by_name["ConfigArgs"] = _CONFIGARGS +DESCRIPTOR.message_types_by_name["ConfigReply"] = _CONFIGREPLY +DESCRIPTOR.message_types_by_name["CliConfigArgs"] = _CLICONFIGARGS +DESCRIPTOR.message_types_by_name["CliConfigReply"] = _CLICONFIGREPLY +DESCRIPTOR.message_types_by_name["CommitReplaceArgs"] = _COMMITREPLACEARGS +DESCRIPTOR.message_types_by_name["CommitReplaceReply"] = _COMMITREPLACEREPLY +DESCRIPTOR.message_types_by_name["CommitMsg"] = _COMMITMSG +DESCRIPTOR.message_types_by_name["CommitArgs"] = _COMMITARGS +DESCRIPTOR.message_types_by_name["CommitReply"] = _COMMITREPLY +DESCRIPTOR.message_types_by_name["DiscardChangesArgs"] = _DISCARDCHANGESARGS +DESCRIPTOR.message_types_by_name["DiscardChangesReply"] = _DISCARDCHANGESREPLY +DESCRIPTOR.message_types_by_name["ShowCmdArgs"] = _SHOWCMDARGS +DESCRIPTOR.message_types_by_name["ShowCmdTextReply"] = _SHOWCMDTEXTREPLY +DESCRIPTOR.message_types_by_name["ShowCmdJSONReply"] = _SHOWCMDJSONREPLY +DESCRIPTOR.message_types_by_name["CreateSubsArgs"] = _CREATESUBSARGS +DESCRIPTOR.message_types_by_name["CreateSubsReply"] = _CREATESUBSREPLY +DESCRIPTOR.enum_types_by_name["CommitResult"] = _COMMITRESULT + +ConfigGetArgs = _reflection.GeneratedProtocolMessageType( + "ConfigGetArgs", + (_message.Message,), + dict( + DESCRIPTOR=_CONFIGGETARGS, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.ConfigGetArgs) + ), +) +_sym_db.RegisterMessage(ConfigGetArgs) + +ConfigGetReply = _reflection.GeneratedProtocolMessageType( + "ConfigGetReply", + (_message.Message,), + dict( + DESCRIPTOR=_CONFIGGETREPLY, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.ConfigGetReply) + ), +) +_sym_db.RegisterMessage(ConfigGetReply) + +GetOperArgs = _reflection.GeneratedProtocolMessageType( + "GetOperArgs", + (_message.Message,), + dict( + DESCRIPTOR=_GETOPERARGS, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.GetOperArgs) + ), +) +_sym_db.RegisterMessage(GetOperArgs) + +GetOperReply = _reflection.GeneratedProtocolMessageType( + "GetOperReply", + (_message.Message,), + dict( + DESCRIPTOR=_GETOPERREPLY, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.GetOperReply) + ), +) +_sym_db.RegisterMessage(GetOperReply) + +ConfigArgs = _reflection.GeneratedProtocolMessageType( + "ConfigArgs", + (_message.Message,), + dict( + DESCRIPTOR=_CONFIGARGS, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.ConfigArgs) + ), +) +_sym_db.RegisterMessage(ConfigArgs) + +ConfigReply = _reflection.GeneratedProtocolMessageType( + "ConfigReply", + (_message.Message,), + dict( + DESCRIPTOR=_CONFIGREPLY, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.ConfigReply) + ), +) +_sym_db.RegisterMessage(ConfigReply) + +CliConfigArgs = _reflection.GeneratedProtocolMessageType( + "CliConfigArgs", + (_message.Message,), + dict( + DESCRIPTOR=_CLICONFIGARGS, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.CliConfigArgs) + ), +) +_sym_db.RegisterMessage(CliConfigArgs) + +CliConfigReply = _reflection.GeneratedProtocolMessageType( + "CliConfigReply", + (_message.Message,), + dict( + DESCRIPTOR=_CLICONFIGREPLY, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.CliConfigReply) + ), +) +_sym_db.RegisterMessage(CliConfigReply) + +CommitReplaceArgs = _reflection.GeneratedProtocolMessageType( + "CommitReplaceArgs", + (_message.Message,), + dict( + DESCRIPTOR=_COMMITREPLACEARGS, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.CommitReplaceArgs) + ), +) +_sym_db.RegisterMessage(CommitReplaceArgs) + +CommitReplaceReply = _reflection.GeneratedProtocolMessageType( + "CommitReplaceReply", + (_message.Message,), + dict( + DESCRIPTOR=_COMMITREPLACEREPLY, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.CommitReplaceReply) + ), +) +_sym_db.RegisterMessage(CommitReplaceReply) + +CommitMsg = _reflection.GeneratedProtocolMessageType( + "CommitMsg", + (_message.Message,), + dict( + DESCRIPTOR=_COMMITMSG, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.CommitMsg) + ), +) +_sym_db.RegisterMessage(CommitMsg) + +CommitArgs = _reflection.GeneratedProtocolMessageType( + "CommitArgs", + (_message.Message,), + dict( + DESCRIPTOR=_COMMITARGS, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.CommitArgs) + ), +) +_sym_db.RegisterMessage(CommitArgs) + +CommitReply = _reflection.GeneratedProtocolMessageType( + "CommitReply", + (_message.Message,), + dict( + DESCRIPTOR=_COMMITREPLY, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.CommitReply) + ), +) +_sym_db.RegisterMessage(CommitReply) + +DiscardChangesArgs = _reflection.GeneratedProtocolMessageType( + "DiscardChangesArgs", + (_message.Message,), + dict( + DESCRIPTOR=_DISCARDCHANGESARGS, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.DiscardChangesArgs) + ), +) +_sym_db.RegisterMessage(DiscardChangesArgs) + +DiscardChangesReply = _reflection.GeneratedProtocolMessageType( + "DiscardChangesReply", + (_message.Message,), + dict( + DESCRIPTOR=_DISCARDCHANGESREPLY, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.DiscardChangesReply) + ), +) +_sym_db.RegisterMessage(DiscardChangesReply) + +ShowCmdArgs = _reflection.GeneratedProtocolMessageType( + "ShowCmdArgs", + (_message.Message,), + dict( + DESCRIPTOR=_SHOWCMDARGS, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.ShowCmdArgs) + ), +) +_sym_db.RegisterMessage(ShowCmdArgs) + +ShowCmdTextReply = _reflection.GeneratedProtocolMessageType( + "ShowCmdTextReply", + (_message.Message,), + dict( + DESCRIPTOR=_SHOWCMDTEXTREPLY, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.ShowCmdTextReply) + ), +) +_sym_db.RegisterMessage(ShowCmdTextReply) + +ShowCmdJSONReply = _reflection.GeneratedProtocolMessageType( + "ShowCmdJSONReply", + (_message.Message,), + dict( + DESCRIPTOR=_SHOWCMDJSONREPLY, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.ShowCmdJSONReply) + ), +) +_sym_db.RegisterMessage(ShowCmdJSONReply) + +CreateSubsArgs = _reflection.GeneratedProtocolMessageType( + "CreateSubsArgs", + (_message.Message,), + dict( + DESCRIPTOR=_CREATESUBSARGS, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.CreateSubsArgs) + ), +) +_sym_db.RegisterMessage(CreateSubsArgs) + +CreateSubsReply = _reflection.GeneratedProtocolMessageType( + "CreateSubsReply", + (_message.Message,), + dict( + DESCRIPTOR=_CREATESUBSREPLY, + __module__="ems_grpc_pb2", + # @@protoc_insertion_point(class_scope:IOSXRExtensibleManagabilityService.CreateSubsReply) + ), +) +_sym_db.RegisterMessage(CreateSubsReply) + + +import grpc + +from grpc.beta import implementations as beta_implementations +from grpc.beta import interfaces as beta_interfaces +from grpc.framework.common import cardinality +from grpc.framework.interfaces.face import utilities as face_utilities + + +class gRPCConfigOperStub(object): + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetConfig = channel.unary_stream( + "/IOSXRExtensibleManagabilityService.gRPCConfigOper/GetConfig", + request_serializer=ConfigGetArgs.SerializeToString, + response_deserializer=ConfigGetReply.FromString, + ) + self.MergeConfig = channel.unary_unary( + "/IOSXRExtensibleManagabilityService.gRPCConfigOper/MergeConfig", + request_serializer=ConfigArgs.SerializeToString, + response_deserializer=ConfigReply.FromString, + ) + self.DeleteConfig = channel.unary_unary( + "/IOSXRExtensibleManagabilityService.gRPCConfigOper/DeleteConfig", + request_serializer=ConfigArgs.SerializeToString, + response_deserializer=ConfigReply.FromString, + ) + self.ReplaceConfig = channel.unary_unary( + "/IOSXRExtensibleManagabilityService.gRPCConfigOper/ReplaceConfig", + request_serializer=ConfigArgs.SerializeToString, + response_deserializer=ConfigReply.FromString, + ) + self.CliConfig = channel.unary_unary( + "/IOSXRExtensibleManagabilityService.gRPCConfigOper/CliConfig", + request_serializer=CliConfigArgs.SerializeToString, + response_deserializer=CliConfigReply.FromString, + ) + self.CommitReplace = channel.unary_unary( + "/IOSXRExtensibleManagabilityService.gRPCConfigOper/CommitReplace", + request_serializer=CommitReplaceArgs.SerializeToString, + response_deserializer=CommitReplaceReply.FromString, + ) + self.CommitConfig = channel.unary_unary( + "/IOSXRExtensibleManagabilityService.gRPCConfigOper/CommitConfig", + request_serializer=CommitArgs.SerializeToString, + response_deserializer=CommitReply.FromString, + ) + self.ConfigDiscardChanges = channel.unary_unary( + "/IOSXRExtensibleManagabilityService.gRPCConfigOper/ConfigDiscardChanges", + request_serializer=DiscardChangesArgs.SerializeToString, + response_deserializer=DiscardChangesReply.FromString, + ) + self.GetOper = channel.unary_stream( + "/IOSXRExtensibleManagabilityService.gRPCConfigOper/GetOper", + request_serializer=GetOperArgs.SerializeToString, + response_deserializer=GetOperReply.FromString, + ) + self.CreateSubs = channel.unary_stream( + "/IOSXRExtensibleManagabilityService.gRPCConfigOper/CreateSubs", + request_serializer=CreateSubsArgs.SerializeToString, + response_deserializer=CreateSubsReply.FromString, + ) + + +class gRPCConfigOperServicer(object): + def GetConfig(self, request, context): + """Configuration related commands""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def MergeConfig(self, request, context): + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def DeleteConfig(self, request, context): + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ReplaceConfig(self, request, context): + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CliConfig(self, request, context): + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CommitReplace(self, request, context): + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CommitConfig(self, request, context): + """Do we need implicit or explicit commit""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ConfigDiscardChanges(self, request, context): + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def GetOper(self, request, context): + """Get only returns oper data""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def CreateSubs(self, request, context): + """Get Telemetry Data""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_gRPCConfigOperServicer_to_server(servicer, server): + rpc_method_handlers = { + "GetConfig": grpc.unary_stream_rpc_method_handler( + servicer.GetConfig, + request_deserializer=ConfigGetArgs.FromString, + response_serializer=ConfigGetReply.SerializeToString, + ), + "MergeConfig": grpc.unary_unary_rpc_method_handler( + servicer.MergeConfig, + request_deserializer=ConfigArgs.FromString, + response_serializer=ConfigReply.SerializeToString, + ), + "DeleteConfig": grpc.unary_unary_rpc_method_handler( + servicer.DeleteConfig, + request_deserializer=ConfigArgs.FromString, + response_serializer=ConfigReply.SerializeToString, + ), + "ReplaceConfig": grpc.unary_unary_rpc_method_handler( + servicer.ReplaceConfig, + request_deserializer=ConfigArgs.FromString, + response_serializer=ConfigReply.SerializeToString, + ), + "CliConfig": grpc.unary_unary_rpc_method_handler( + servicer.CliConfig, + request_deserializer=CliConfigArgs.FromString, + response_serializer=CliConfigReply.SerializeToString, + ), + "CommitReplace": grpc.unary_unary_rpc_method_handler( + servicer.CommitReplace, + request_deserializer=CommitReplaceArgs.FromString, + response_serializer=CommitReplaceReply.SerializeToString, + ), + "CommitConfig": grpc.unary_unary_rpc_method_handler( + servicer.CommitConfig, + request_deserializer=CommitArgs.FromString, + response_serializer=CommitReply.SerializeToString, + ), + "ConfigDiscardChanges": grpc.unary_unary_rpc_method_handler( + servicer.ConfigDiscardChanges, + request_deserializer=DiscardChangesArgs.FromString, + response_serializer=DiscardChangesReply.SerializeToString, + ), + "GetOper": grpc.unary_stream_rpc_method_handler( + servicer.GetOper, + request_deserializer=GetOperArgs.FromString, + response_serializer=GetOperReply.SerializeToString, + ), + "CreateSubs": grpc.unary_stream_rpc_method_handler( + servicer.CreateSubs, + request_deserializer=CreateSubsArgs.FromString, + response_serializer=CreateSubsReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + rpc_method_handlers, + ) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetagRPCConfigOperServicer(object): + def GetConfig(self, request, context): + """Configuration related commands""" + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + def MergeConfig(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + def DeleteConfig(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + def ReplaceConfig(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + def CliConfig(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + def CommitReplace(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + def CommitConfig(self, request, context): + """Do we need implicit or explicit commit""" + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + def ConfigDiscardChanges(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + def GetOper(self, request, context): + """Get only returns oper data""" + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + def CreateSubs(self, request, context): + """Get Telemetry Data""" + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + +class BetagRPCConfigOperStub(object): + def GetConfig( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + """Configuration related commands""" + raise NotImplementedError() + + def MergeConfig( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + raise NotImplementedError() + + MergeConfig.future = None + + def DeleteConfig( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + raise NotImplementedError() + + DeleteConfig.future = None + + def ReplaceConfig( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + raise NotImplementedError() + + ReplaceConfig.future = None + + def CliConfig( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + raise NotImplementedError() + + CliConfig.future = None + + def CommitReplace( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + raise NotImplementedError() + + CommitReplace.future = None + + def CommitConfig( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + """Do we need implicit or explicit commit""" + raise NotImplementedError() + + CommitConfig.future = None + + def ConfigDiscardChanges( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + raise NotImplementedError() + + ConfigDiscardChanges.future = None + + def GetOper( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + """Get only returns oper data""" + raise NotImplementedError() + + def CreateSubs( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + """Get Telemetry Data""" + raise NotImplementedError() + + +def beta_create_gRPCConfigOper_server( + servicer, + pool=None, + pool_size=None, + default_timeout=None, + maximum_timeout=None, +): + request_deserializers = { + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CliConfig", + ): CliConfigArgs.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CommitConfig", + ): CommitArgs.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CommitReplace", + ): CommitReplaceArgs.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "ConfigDiscardChanges", + ): DiscardChangesArgs.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CreateSubs", + ): CreateSubsArgs.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "DeleteConfig", + ): ConfigArgs.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "GetConfig", + ): ConfigGetArgs.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "GetOper", + ): GetOperArgs.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "MergeConfig", + ): ConfigArgs.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "ReplaceConfig", + ): ConfigArgs.FromString, + } + response_serializers = { + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CliConfig", + ): CliConfigReply.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CommitConfig", + ): CommitReply.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CommitReplace", + ): CommitReplaceReply.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "ConfigDiscardChanges", + ): DiscardChangesReply.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CreateSubs", + ): CreateSubsReply.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "DeleteConfig", + ): ConfigReply.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "GetConfig", + ): ConfigGetReply.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "GetOper", + ): GetOperReply.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "MergeConfig", + ): ConfigReply.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "ReplaceConfig", + ): ConfigReply.SerializeToString, + } + method_implementations = { + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CliConfig", + ): face_utilities.unary_unary_inline(servicer.CliConfig), + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CommitConfig", + ): face_utilities.unary_unary_inline(servicer.CommitConfig), + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CommitReplace", + ): face_utilities.unary_unary_inline(servicer.CommitReplace), + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "ConfigDiscardChanges", + ): face_utilities.unary_unary_inline(servicer.ConfigDiscardChanges), + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CreateSubs", + ): face_utilities.unary_stream_inline(servicer.CreateSubs), + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "DeleteConfig", + ): face_utilities.unary_unary_inline(servicer.DeleteConfig), + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "GetConfig", + ): face_utilities.unary_stream_inline(servicer.GetConfig), + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "GetOper", + ): face_utilities.unary_stream_inline(servicer.GetOper), + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "MergeConfig", + ): face_utilities.unary_unary_inline(servicer.MergeConfig), + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "ReplaceConfig", + ): face_utilities.unary_unary_inline(servicer.ReplaceConfig), + } + server_options = beta_implementations.server_options( + request_deserializers=request_deserializers, + response_serializers=response_serializers, + thread_pool=pool, + thread_pool_size=pool_size, + default_timeout=default_timeout, + maximum_timeout=maximum_timeout, + ) + return beta_implementations.server( + method_implementations, + options=server_options, + ) + + +def beta_create_gRPCConfigOper_stub( + channel, + host=None, + metadata_transformer=None, + pool=None, + pool_size=None, +): + request_serializers = { + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CliConfig", + ): CliConfigArgs.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CommitConfig", + ): CommitArgs.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CommitReplace", + ): CommitReplaceArgs.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "ConfigDiscardChanges", + ): DiscardChangesArgs.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CreateSubs", + ): CreateSubsArgs.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "DeleteConfig", + ): ConfigArgs.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "GetConfig", + ): ConfigGetArgs.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "GetOper", + ): GetOperArgs.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "MergeConfig", + ): ConfigArgs.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "ReplaceConfig", + ): ConfigArgs.SerializeToString, + } + response_deserializers = { + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CliConfig", + ): CliConfigReply.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CommitConfig", + ): CommitReply.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CommitReplace", + ): CommitReplaceReply.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "ConfigDiscardChanges", + ): DiscardChangesReply.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "CreateSubs", + ): CreateSubsReply.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "DeleteConfig", + ): ConfigReply.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "GetConfig", + ): ConfigGetReply.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "GetOper", + ): GetOperReply.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "MergeConfig", + ): ConfigReply.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + "ReplaceConfig", + ): ConfigReply.FromString, + } + cardinalities = { + "CliConfig": cardinality.Cardinality.UNARY_UNARY, + "CommitConfig": cardinality.Cardinality.UNARY_UNARY, + "CommitReplace": cardinality.Cardinality.UNARY_UNARY, + "ConfigDiscardChanges": cardinality.Cardinality.UNARY_UNARY, + "CreateSubs": cardinality.Cardinality.UNARY_STREAM, + "DeleteConfig": cardinality.Cardinality.UNARY_UNARY, + "GetConfig": cardinality.Cardinality.UNARY_STREAM, + "GetOper": cardinality.Cardinality.UNARY_STREAM, + "MergeConfig": cardinality.Cardinality.UNARY_UNARY, + "ReplaceConfig": cardinality.Cardinality.UNARY_UNARY, + } + stub_options = beta_implementations.stub_options( + host=host, + metadata_transformer=metadata_transformer, + request_serializers=request_serializers, + response_deserializers=response_deserializers, + thread_pool=pool, + thread_pool_size=pool_size, + ) + return beta_implementations.dynamic_stub( + channel, + "IOSXRExtensibleManagabilityService.gRPCConfigOper", + cardinalities, + options=stub_options, + ) + + +class gRPCExecStub(object): + """ + Should we seperate Exec from Config/Oper? + + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ShowCmdTextOutput = channel.unary_stream( + "/IOSXRExtensibleManagabilityService.gRPCExec/ShowCmdTextOutput", + request_serializer=ShowCmdArgs.SerializeToString, + response_deserializer=ShowCmdTextReply.FromString, + ) + self.ShowCmdJSONOutput = channel.unary_stream( + "/IOSXRExtensibleManagabilityService.gRPCExec/ShowCmdJSONOutput", + request_serializer=ShowCmdArgs.SerializeToString, + response_deserializer=ShowCmdJSONReply.FromString, + ) + + +class gRPCExecServicer(object): + """ + Should we seperate Exec from Config/Oper? + + + """ + + def ShowCmdTextOutput(self, request, context): + """Exec commands""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + def ShowCmdJSONOutput(self, request, context): + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + + +def add_gRPCExecServicer_to_server(servicer, server): + rpc_method_handlers = { + "ShowCmdTextOutput": grpc.unary_stream_rpc_method_handler( + servicer.ShowCmdTextOutput, + request_deserializer=ShowCmdArgs.FromString, + response_serializer=ShowCmdTextReply.SerializeToString, + ), + "ShowCmdJSONOutput": grpc.unary_stream_rpc_method_handler( + servicer.ShowCmdJSONOutput, + request_deserializer=ShowCmdArgs.FromString, + response_serializer=ShowCmdJSONReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + "IOSXRExtensibleManagabilityService.gRPCExec", + rpc_method_handlers, + ) + server.add_generic_rpc_handlers((generic_handler,)) + + +class BetagRPCExecServicer(object): + """ + Should we seperate Exec from Config/Oper? + + + """ + + def ShowCmdTextOutput(self, request, context): + """Exec commands""" + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + def ShowCmdJSONOutput(self, request, context): + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) + + +class BetagRPCExecStub(object): + """ + Should we seperate Exec from Config/Oper? + + + """ + + def ShowCmdTextOutput( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + """Exec commands""" + raise NotImplementedError() + + def ShowCmdJSONOutput( + self, + request, + timeout, + metadata=None, + with_call=False, + protocol_options=None, + ): + raise NotImplementedError() + + +def beta_create_gRPCExec_server( + servicer, + pool=None, + pool_size=None, + default_timeout=None, + maximum_timeout=None, +): + request_deserializers = { + ( + "IOSXRExtensibleManagabilityService.gRPCExec", + "ShowCmdJSONOutput", + ): ShowCmdArgs.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCExec", + "ShowCmdTextOutput", + ): ShowCmdArgs.FromString, + } + response_serializers = { + ( + "IOSXRExtensibleManagabilityService.gRPCExec", + "ShowCmdJSONOutput", + ): ShowCmdJSONReply.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCExec", + "ShowCmdTextOutput", + ): ShowCmdTextReply.SerializeToString, + } + method_implementations = { + ( + "IOSXRExtensibleManagabilityService.gRPCExec", + "ShowCmdJSONOutput", + ): face_utilities.unary_stream_inline(servicer.ShowCmdJSONOutput), + ( + "IOSXRExtensibleManagabilityService.gRPCExec", + "ShowCmdTextOutput", + ): face_utilities.unary_stream_inline(servicer.ShowCmdTextOutput), + } + server_options = beta_implementations.server_options( + request_deserializers=request_deserializers, + response_serializers=response_serializers, + thread_pool=pool, + thread_pool_size=pool_size, + default_timeout=default_timeout, + maximum_timeout=maximum_timeout, + ) + return beta_implementations.server( + method_implementations, + options=server_options, + ) + + +def beta_create_gRPCExec_stub( + channel, + host=None, + metadata_transformer=None, + pool=None, + pool_size=None, +): + request_serializers = { + ( + "IOSXRExtensibleManagabilityService.gRPCExec", + "ShowCmdJSONOutput", + ): ShowCmdArgs.SerializeToString, + ( + "IOSXRExtensibleManagabilityService.gRPCExec", + "ShowCmdTextOutput", + ): ShowCmdArgs.SerializeToString, + } + response_deserializers = { + ( + "IOSXRExtensibleManagabilityService.gRPCExec", + "ShowCmdJSONOutput", + ): ShowCmdJSONReply.FromString, + ( + "IOSXRExtensibleManagabilityService.gRPCExec", + "ShowCmdTextOutput", + ): ShowCmdTextReply.FromString, + } + cardinalities = { + "ShowCmdJSONOutput": cardinality.Cardinality.UNARY_STREAM, + "ShowCmdTextOutput": cardinality.Cardinality.UNARY_STREAM, + } + stub_options = beta_implementations.stub_options( + host=host, + metadata_transformer=metadata_transformer, + request_serializers=request_serializers, + response_deserializers=response_deserializers, + thread_pool=pool, + thread_pool_size=pool_size, + ) + return beta_implementations.dynamic_stub( + channel, + "IOSXRExtensibleManagabilityService.gRPCExec", + cardinalities, + options=stub_options, + ) + + +# @@protoc_insertion_point(module_scope) |