diff --git a/common_requirements.in b/common_requirements.in index 3aa30e174f43d6f8758f49b3104a20cc8580a7ff..6ba2a90544f2465a79a8b001582b1243584c94de 100644 --- a/common_requirements.in +++ b/common_requirements.in @@ -24,3 +24,6 @@ pytest==6.2.5 pytest-benchmark==3.4.1 python-dateutil==2.8.2 pytest-depends==1.0.1 +sqlalchemy +sqlalchemy_cockroachdb + diff --git a/my_deploy.sh b/my_deploy.sh index 6c087f1c87b95a836521a4154f6818a2ecc3b38f..9182e3701379f4c86ea71cc8479258ab667de4ab 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -20,7 +20,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" +export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator qos_profile" # Uncomment to activate Monitoring (old) #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" diff --git a/proto/acl_pb2.py b/proto/acl_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..92a9275578acf5206e71a3f76b0c34a9437819bc --- /dev/null +++ b/proto/acl_pb2.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: acl.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tacl.proto\x12\x03\x61\x63l\"\xbd\x01\n\x08\x41\x63lMatch\x12\x0c\n\x04\x64scp\x18\x01 \x01(\r\x12\x10\n\x08protocol\x18\x02 \x01(\r\x12\x13\n\x0bsrc_address\x18\x03 \x01(\t\x12\x13\n\x0b\x64st_address\x18\x04 \x01(\t\x12\x10\n\x08src_port\x18\x05 \x01(\r\x12\x10\n\x08\x64st_port\x18\x06 \x01(\r\x12\x18\n\x10start_mpls_label\x18\x07 \x01(\r\x12\x16\n\x0e\x65nd_mpls_label\x18\x08 \x01(\r\x12\x11\n\ttcp_flags\x18\t \x01(\t\"i\n\tAclAction\x12\x31\n\x0e\x66orward_action\x18\x01 \x01(\x0e\x32\x19.acl.AclForwardActionEnum\x12)\n\nlog_action\x18\x02 \x01(\x0e\x32\x15.acl.AclLogActionEnum\"r\n\x08\x41\x63lEntry\x12\x13\n\x0bsequence_id\x18\x01 \x01(\r\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1c\n\x05match\x18\x03 \x01(\x0b\x32\r.acl.AclMatch\x12\x1e\n\x06\x61\x63tion\x18\x04 \x01(\x0b\x32\x0e.acl.AclAction\"\x84\x01\n\nAclRuleSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\"\n\x04type\x18\x02 \x01(\x0e\x32\x14.acl.AclRuleTypeEnum\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0f\n\x07user_id\x18\x04 \x01(\t\x12\x1e\n\x07\x65ntries\x18\x05 \x03(\x0b\x32\r.acl.AclEntry*\x99\x01\n\x0f\x41\x63lRuleTypeEnum\x12\x19\n\x15\x41\x43LRULETYPE_UNDEFINED\x10\x00\x12\x14\n\x10\x41\x43LRULETYPE_IPV4\x10\x01\x12\x14\n\x10\x41\x43LRULETYPE_IPV6\x10\x02\x12\x12\n\x0e\x41\x43LRULETYPE_L2\x10\x03\x12\x14\n\x10\x41\x43LRULETYPE_MPLS\x10\x04\x12\x15\n\x11\x41\x43LRULETYPE_MIXED\x10\x05*\x97\x01\n\x14\x41\x63lForwardActionEnum\x12!\n\x1d\x41\x43LFORWARDINGACTION_UNDEFINED\x10\x00\x12\x1c\n\x18\x41\x43LFORWARDINGACTION_DROP\x10\x01\x12\x1e\n\x1a\x41\x43LFORWARDINGACTION_ACCEPT\x10\x02\x12\x1e\n\x1a\x41\x43LFORWARDINGACTION_REJECT\x10\x03*_\n\x10\x41\x63lLogActionEnum\x12\x1a\n\x16\x41\x43LLOGACTION_UNDEFINED\x10\x00\x12\x16\n\x12\x41\x43LLOGACTION_NOLOG\x10\x01\x12\x17\n\x13\x41\x43LLOGACTION_SYSLOG\x10\x02\x62\x06proto3') + +_ACLRULETYPEENUM = DESCRIPTOR.enum_types_by_name['AclRuleTypeEnum'] +AclRuleTypeEnum = enum_type_wrapper.EnumTypeWrapper(_ACLRULETYPEENUM) +_ACLFORWARDACTIONENUM = DESCRIPTOR.enum_types_by_name['AclForwardActionEnum'] +AclForwardActionEnum = enum_type_wrapper.EnumTypeWrapper(_ACLFORWARDACTIONENUM) +_ACLLOGACTIONENUM = DESCRIPTOR.enum_types_by_name['AclLogActionEnum'] +AclLogActionEnum = enum_type_wrapper.EnumTypeWrapper(_ACLLOGACTIONENUM) +ACLRULETYPE_UNDEFINED = 0 +ACLRULETYPE_IPV4 = 1 +ACLRULETYPE_IPV6 = 2 +ACLRULETYPE_L2 = 3 +ACLRULETYPE_MPLS = 4 +ACLRULETYPE_MIXED = 5 +ACLFORWARDINGACTION_UNDEFINED = 0 +ACLFORWARDINGACTION_DROP = 1 +ACLFORWARDINGACTION_ACCEPT = 2 +ACLFORWARDINGACTION_REJECT = 3 +ACLLOGACTION_UNDEFINED = 0 +ACLLOGACTION_NOLOG = 1 +ACLLOGACTION_SYSLOG = 2 + + +_ACLMATCH = DESCRIPTOR.message_types_by_name['AclMatch'] +_ACLACTION = DESCRIPTOR.message_types_by_name['AclAction'] +_ACLENTRY = DESCRIPTOR.message_types_by_name['AclEntry'] +_ACLRULESET = DESCRIPTOR.message_types_by_name['AclRuleSet'] +AclMatch = _reflection.GeneratedProtocolMessageType('AclMatch', (_message.Message,), { + 'DESCRIPTOR' : _ACLMATCH, + '__module__' : 'acl_pb2' + # @@protoc_insertion_point(class_scope:acl.AclMatch) + }) +_sym_db.RegisterMessage(AclMatch) + +AclAction = _reflection.GeneratedProtocolMessageType('AclAction', (_message.Message,), { + 'DESCRIPTOR' : _ACLACTION, + '__module__' : 'acl_pb2' + # @@protoc_insertion_point(class_scope:acl.AclAction) + }) +_sym_db.RegisterMessage(AclAction) + +AclEntry = _reflection.GeneratedProtocolMessageType('AclEntry', (_message.Message,), { + 'DESCRIPTOR' : _ACLENTRY, + '__module__' : 'acl_pb2' + # @@protoc_insertion_point(class_scope:acl.AclEntry) + }) +_sym_db.RegisterMessage(AclEntry) + +AclRuleSet = _reflection.GeneratedProtocolMessageType('AclRuleSet', (_message.Message,), { + 'DESCRIPTOR' : _ACLRULESET, + '__module__' : 'acl_pb2' + # @@protoc_insertion_point(class_scope:acl.AclRuleSet) + }) +_sym_db.RegisterMessage(AclRuleSet) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _ACLRULETYPEENUM._serialized_start=569 + _ACLRULETYPEENUM._serialized_end=722 + _ACLFORWARDACTIONENUM._serialized_start=725 + _ACLFORWARDACTIONENUM._serialized_end=876 + _ACLLOGACTIONENUM._serialized_start=878 + _ACLLOGACTIONENUM._serialized_end=973 + _ACLMATCH._serialized_start=19 + _ACLMATCH._serialized_end=208 + _ACLACTION._serialized_start=210 + _ACLACTION._serialized_end=315 + _ACLENTRY._serialized_start=317 + _ACLENTRY._serialized_end=431 + _ACLRULESET._serialized_start=434 + _ACLRULESET._serialized_end=566 +# @@protoc_insertion_point(module_scope) diff --git a/proto/acl_pb2_grpc.py b/proto/acl_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/proto/acl_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/proto/analytics_frontend_pb2.py b/proto/analytics_frontend_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..4579e186bf8236e2d14cefedd9f840459262a9e3 --- /dev/null +++ b/proto/analytics_frontend_pb2.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: analytics_frontend.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import kpi_manager_pb2 as kpi__manager__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x61nalytics_frontend.proto\x12\x12\x61nalytics_frontend\x1a\rcontext.proto\x1a\x11kpi_manager.proto\"0\n\nAnalyzerId\x12\"\n\x0b\x61nalyzer_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"\xa8\x02\n\x08\x41nalyzer\x12\x16\n\x0e\x61lgorithm_name\x18\x01 \x01(\t\x12)\n\rinput_kpi_ids\x18\x02 \x03(\x0b\x32\x12.kpi_manager.KpiId\x12*\n\x0eoutput_kpi_ids\x18\x03 \x03(\x0b\x32\x12.kpi_manager.KpiId\x12\x41\n\x0eoperation_mode\x18\x04 \x01(\x0e\x32).analytics_frontend.AnalyzerOperationMode\x12\x1c\n\x14\x62\x61tch_min_duration_s\x18\x05 \x01(\x02\x12\x1c\n\x14\x62\x61tch_max_duration_s\x18\x06 \x01(\x02\x12\x16\n\x0e\x62\x61tch_min_size\x18\x07 \x01(\x04\x12\x16\n\x0e\x62\x61tch_max_size\x18\x08 \x01(\x04\"\xb5\x01\n\x0e\x41nalyzerFilter\x12\x33\n\x0b\x61nalyzer_id\x18\x01 \x03(\x0b\x32\x1e.analytics_frontend.AnalyzerId\x12\x17\n\x0f\x61lgorithm_names\x18\x02 \x03(\t\x12)\n\rinput_kpi_ids\x18\x03 \x03(\x0b\x32\x12.kpi_manager.KpiId\x12*\n\x0eoutput_kpi_ids\x18\x04 \x03(\x0b\x32\x12.kpi_manager.KpiId\"C\n\x0c\x41nalyzerList\x12\x33\n\ranalyzer_list\x18\x01 \x03(\x0b\x32\x1c.analytics_frontend.Analyzer*]\n\x15\x41nalyzerOperationMode\x12\x1f\n\x1b\x41NALYZEROPERATIONMODE_BATCH\x10\x00\x12#\n\x1f\x41NALYZEROPERATIONMODE_STREAMING\x10\x01\x32\x88\x02\n\x18\x41nalyticsFrontendService\x12O\n\rStartAnalyzer\x12\x1c.analytics_frontend.Analyzer\x1a\x1e.analytics_frontend.AnalyzerId\"\x00\x12@\n\x0cStopAnalyzer\x12\x1e.analytics_frontend.AnalyzerId\x1a\x0e.context.Empty\"\x00\x12Y\n\x0fSelectAnalyzers\x12\".analytics_frontend.AnalyzerFilter\x1a .analytics_frontend.AnalyzerList\"\x00\x62\x06proto3') + +_ANALYZEROPERATIONMODE = DESCRIPTOR.enum_types_by_name['AnalyzerOperationMode'] +AnalyzerOperationMode = enum_type_wrapper.EnumTypeWrapper(_ANALYZEROPERATIONMODE) +ANALYZEROPERATIONMODE_BATCH = 0 +ANALYZEROPERATIONMODE_STREAMING = 1 + + +_ANALYZERID = DESCRIPTOR.message_types_by_name['AnalyzerId'] +_ANALYZER = DESCRIPTOR.message_types_by_name['Analyzer'] +_ANALYZERFILTER = DESCRIPTOR.message_types_by_name['AnalyzerFilter'] +_ANALYZERLIST = DESCRIPTOR.message_types_by_name['AnalyzerList'] +AnalyzerId = _reflection.GeneratedProtocolMessageType('AnalyzerId', (_message.Message,), { + 'DESCRIPTOR' : _ANALYZERID, + '__module__' : 'analytics_frontend_pb2' + # @@protoc_insertion_point(class_scope:analytics_frontend.AnalyzerId) + }) +_sym_db.RegisterMessage(AnalyzerId) + +Analyzer = _reflection.GeneratedProtocolMessageType('Analyzer', (_message.Message,), { + 'DESCRIPTOR' : _ANALYZER, + '__module__' : 'analytics_frontend_pb2' + # @@protoc_insertion_point(class_scope:analytics_frontend.Analyzer) + }) +_sym_db.RegisterMessage(Analyzer) + +AnalyzerFilter = _reflection.GeneratedProtocolMessageType('AnalyzerFilter', (_message.Message,), { + 'DESCRIPTOR' : _ANALYZERFILTER, + '__module__' : 'analytics_frontend_pb2' + # @@protoc_insertion_point(class_scope:analytics_frontend.AnalyzerFilter) + }) +_sym_db.RegisterMessage(AnalyzerFilter) + +AnalyzerList = _reflection.GeneratedProtocolMessageType('AnalyzerList', (_message.Message,), { + 'DESCRIPTOR' : _ANALYZERLIST, + '__module__' : 'analytics_frontend_pb2' + # @@protoc_insertion_point(class_scope:analytics_frontend.AnalyzerList) + }) +_sym_db.RegisterMessage(AnalyzerList) + +_ANALYTICSFRONTENDSERVICE = DESCRIPTOR.services_by_name['AnalyticsFrontendService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _ANALYZEROPERATIONMODE._serialized_start=684 + _ANALYZEROPERATIONMODE._serialized_end=777 + _ANALYZERID._serialized_start=82 + _ANALYZERID._serialized_end=130 + _ANALYZER._serialized_start=133 + _ANALYZER._serialized_end=429 + _ANALYZERFILTER._serialized_start=432 + _ANALYZERFILTER._serialized_end=613 + _ANALYZERLIST._serialized_start=615 + _ANALYZERLIST._serialized_end=682 + _ANALYTICSFRONTENDSERVICE._serialized_start=780 + _ANALYTICSFRONTENDSERVICE._serialized_end=1044 +# @@protoc_insertion_point(module_scope) diff --git a/proto/analytics_frontend_pb2_grpc.py b/proto/analytics_frontend_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..9241ac7a4e239f5eb93cfdd6c0b06f2ba77fe5f0 --- /dev/null +++ b/proto/analytics_frontend_pb2_grpc.py @@ -0,0 +1,133 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import analytics_frontend_pb2 as analytics__frontend__pb2 +import context_pb2 as context__pb2 + + +class AnalyticsFrontendServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.StartAnalyzer = channel.unary_unary( + '/analytics_frontend.AnalyticsFrontendService/StartAnalyzer', + request_serializer=analytics__frontend__pb2.Analyzer.SerializeToString, + response_deserializer=analytics__frontend__pb2.AnalyzerId.FromString, + ) + self.StopAnalyzer = channel.unary_unary( + '/analytics_frontend.AnalyticsFrontendService/StopAnalyzer', + request_serializer=analytics__frontend__pb2.AnalyzerId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.SelectAnalyzers = channel.unary_unary( + '/analytics_frontend.AnalyticsFrontendService/SelectAnalyzers', + request_serializer=analytics__frontend__pb2.AnalyzerFilter.SerializeToString, + response_deserializer=analytics__frontend__pb2.AnalyzerList.FromString, + ) + + +class AnalyticsFrontendServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def StartAnalyzer(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def StopAnalyzer(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SelectAnalyzers(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_AnalyticsFrontendServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'StartAnalyzer': grpc.unary_unary_rpc_method_handler( + servicer.StartAnalyzer, + request_deserializer=analytics__frontend__pb2.Analyzer.FromString, + response_serializer=analytics__frontend__pb2.AnalyzerId.SerializeToString, + ), + 'StopAnalyzer': grpc.unary_unary_rpc_method_handler( + servicer.StopAnalyzer, + request_deserializer=analytics__frontend__pb2.AnalyzerId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'SelectAnalyzers': grpc.unary_unary_rpc_method_handler( + servicer.SelectAnalyzers, + request_deserializer=analytics__frontend__pb2.AnalyzerFilter.FromString, + response_serializer=analytics__frontend__pb2.AnalyzerList.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'analytics_frontend.AnalyticsFrontendService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class AnalyticsFrontendService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def StartAnalyzer(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/analytics_frontend.AnalyticsFrontendService/StartAnalyzer', + analytics__frontend__pb2.Analyzer.SerializeToString, + analytics__frontend__pb2.AnalyzerId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def StopAnalyzer(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/analytics_frontend.AnalyticsFrontendService/StopAnalyzer', + analytics__frontend__pb2.AnalyzerId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SelectAnalyzers(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/analytics_frontend.AnalyticsFrontendService/SelectAnalyzers', + analytics__frontend__pb2.AnalyzerFilter.SerializeToString, + analytics__frontend__pb2.AnalyzerList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/attack_mitigator_pb2.py b/proto/attack_mitigator_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..dd80fa31f3dfc9df55c2918faea474083f5322e4 --- /dev/null +++ b/proto/attack_mitigator_pb2.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: attack_mitigator.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x61ttack_mitigator.proto\x12\x10\x61ttack_mitigator\x1a\rcontext.proto\"t\n\x11\x41ttackDescription\x12\x1c\n\x05\x63s_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\x12\x11\n\tattack_id\x18\x02 \x01(\x05\x12\x12\n\nconfidence\x18\x03 \x01(\x02\x12\x1a\n\x12\x61ttack_description\x18\x04 \x01(\t\"\xa2\x01\n\x0e\x41ttackResponse\x12\x1c\n\x05\x63s_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\x12\x11\n\tattack_id\x18\x02 \x01(\x05\x12\x1a\n\x12\x61ttack_description\x18\x03 \x01(\t\x12\x1c\n\x14response_strategy_id\x18\x04 \x01(\x05\x12%\n\x1dresponse_strategy_description\x18\x05 \x01(\t2j\n\x0f\x41ttackMitigator\x12W\n\x0cNotifyAttack\x12#.attack_mitigator.AttackDescription\x1a .attack_mitigator.AttackResponse\"\x00\x62\x06proto3') + + + +_ATTACKDESCRIPTION = DESCRIPTOR.message_types_by_name['AttackDescription'] +_ATTACKRESPONSE = DESCRIPTOR.message_types_by_name['AttackResponse'] +AttackDescription = _reflection.GeneratedProtocolMessageType('AttackDescription', (_message.Message,), { + 'DESCRIPTOR' : _ATTACKDESCRIPTION, + '__module__' : 'attack_mitigator_pb2' + # @@protoc_insertion_point(class_scope:attack_mitigator.AttackDescription) + }) +_sym_db.RegisterMessage(AttackDescription) + +AttackResponse = _reflection.GeneratedProtocolMessageType('AttackResponse', (_message.Message,), { + 'DESCRIPTOR' : _ATTACKRESPONSE, + '__module__' : 'attack_mitigator_pb2' + # @@protoc_insertion_point(class_scope:attack_mitigator.AttackResponse) + }) +_sym_db.RegisterMessage(AttackResponse) + +_ATTACKMITIGATOR = DESCRIPTOR.services_by_name['AttackMitigator'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _ATTACKDESCRIPTION._serialized_start=59 + _ATTACKDESCRIPTION._serialized_end=175 + _ATTACKRESPONSE._serialized_start=178 + _ATTACKRESPONSE._serialized_end=340 + _ATTACKMITIGATOR._serialized_start=342 + _ATTACKMITIGATOR._serialized_end=448 +# @@protoc_insertion_point(module_scope) diff --git a/proto/attack_mitigator_pb2_grpc.py b/proto/attack_mitigator_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..e045402c78edb162007e5b7bc45cc9660ee058cc --- /dev/null +++ b/proto/attack_mitigator_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import attack_mitigator_pb2 as attack__mitigator__pb2 + + +class AttackMitigatorStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.NotifyAttack = channel.unary_unary( + '/attack_mitigator.AttackMitigator/NotifyAttack', + request_serializer=attack__mitigator__pb2.AttackDescription.SerializeToString, + response_deserializer=attack__mitigator__pb2.AttackResponse.FromString, + ) + + +class AttackMitigatorServicer(object): + """Missing associated documentation comment in .proto file.""" + + def NotifyAttack(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_AttackMitigatorServicer_to_server(servicer, server): + rpc_method_handlers = { + 'NotifyAttack': grpc.unary_unary_rpc_method_handler( + servicer.NotifyAttack, + request_deserializer=attack__mitigator__pb2.AttackDescription.FromString, + response_serializer=attack__mitigator__pb2.AttackResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'attack_mitigator.AttackMitigator', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class AttackMitigator(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def NotifyAttack(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/attack_mitigator.AttackMitigator/NotifyAttack', + attack__mitigator__pb2.AttackDescription.SerializeToString, + attack__mitigator__pb2.AttackResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/bgpls_pb2.py b/proto/bgpls_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..5559366fc1d2b7d6dc4ff3d9f3f481d47b9a5bea --- /dev/null +++ b/proto/bgpls_pb2.py @@ -0,0 +1,108 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: bgpls.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x62gpls.proto\x12\x05\x62gpls\x1a\rcontext.proto\"S\n\x10\x44iscoveredDevice\x12\x10\n\x08nodeName\x18\x01 \x01(\t\x12\n\n\x02ip\x18\x02 \x01(\t\x12\r\n\x05igpID\x18\x03 \x01(\t\x12\x12\n\nlearntFrom\x18\x04 \x01(\t\"J\n\x14\x44iscoveredDeviceList\x12\x32\n\x11\x64iscovereddevices\x18\x01 \x03(\x0b\x32\x17.bgpls.DiscoveredDevice\"D\n\x12\x44iscoveredLinkList\x12.\n\x0f\x64iscoveredlinks\x18\x01 \x03(\x0b\x32\x15.bgpls.DiscoveredLink\"\x9c\x01\n\x0e\x44iscoveredLink\x12%\n\x05local\x18\x01 \x01(\x0b\x32\x16.bgpls.NodeDescriptors\x12&\n\x06remote\x18\x02 \x01(\x0b\x32\x16.bgpls.NodeDescriptors\x12\x12\n\nlearntFrom\x18\x03 \x01(\t\x12\x12\n\nlocal_ipv4\x18\x04 \x01(\t\x12\x13\n\x0bremote_ipv4\x18\x05 \x01(\t\"E\n\x0fNodeDescriptors\x12\x10\n\x08\x61sNumber\x18\x01 \x01(\t\x12\x0e\n\x06igp_id\x18\x02 \x01(\t\x12\x10\n\x08nodeName\x18\x03 \x01(\t\"?\n\x0c\x42gplsSpeaker\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x0c\n\x04port\x18\x02 \x01(\t\x12\x10\n\x08\x61sNumber\x18\x03 \x01(\t\"\x1c\n\x0e\x42gplsSpeakerId\x12\n\n\x02id\x18\x01 \x01(\r\";\n\x10\x42gplsSpeakerList\x12\'\n\x08speakers\x18\x01 \x03(\x0b\x32\x15.bgpls.BgplsSpeakerId2\xe5\x03\n\x0c\x42gplsService\x12\x46\n\x15ListDiscoveredDevices\x12\x0e.context.Empty\x1a\x1b.bgpls.DiscoveredDeviceList\"\x00\x12\x42\n\x13ListDiscoveredLinks\x12\x0e.context.Empty\x1a\x19.bgpls.DiscoveredLinkList\"\x00\x12?\n\x0f\x41\x64\x64\x42gplsSpeaker\x12\x13.bgpls.BgplsSpeaker\x1a\x15.bgpls.BgplsSpeakerId\"\x00\x12>\n\x11ListBgplsSpeakers\x12\x0e.context.Empty\x1a\x17.bgpls.BgplsSpeakerList\"\x00\x12>\n\x15\x44isconnectFromSpeaker\x12\x13.bgpls.BgplsSpeaker\x1a\x0e.context.Empty\"\x00\x12\x44\n\x14GetSpeakerInfoFromId\x12\x15.bgpls.BgplsSpeakerId\x1a\x13.bgpls.BgplsSpeaker\"\x00\x12\x42\n\x16NotifyAddNodeToContext\x12\x16.bgpls.NodeDescriptors\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_DISCOVEREDDEVICE = DESCRIPTOR.message_types_by_name['DiscoveredDevice'] +_DISCOVEREDDEVICELIST = DESCRIPTOR.message_types_by_name['DiscoveredDeviceList'] +_DISCOVEREDLINKLIST = DESCRIPTOR.message_types_by_name['DiscoveredLinkList'] +_DISCOVEREDLINK = DESCRIPTOR.message_types_by_name['DiscoveredLink'] +_NODEDESCRIPTORS = DESCRIPTOR.message_types_by_name['NodeDescriptors'] +_BGPLSSPEAKER = DESCRIPTOR.message_types_by_name['BgplsSpeaker'] +_BGPLSSPEAKERID = DESCRIPTOR.message_types_by_name['BgplsSpeakerId'] +_BGPLSSPEAKERLIST = DESCRIPTOR.message_types_by_name['BgplsSpeakerList'] +DiscoveredDevice = _reflection.GeneratedProtocolMessageType('DiscoveredDevice', (_message.Message,), { + 'DESCRIPTOR' : _DISCOVEREDDEVICE, + '__module__' : 'bgpls_pb2' + # @@protoc_insertion_point(class_scope:bgpls.DiscoveredDevice) + }) +_sym_db.RegisterMessage(DiscoveredDevice) + +DiscoveredDeviceList = _reflection.GeneratedProtocolMessageType('DiscoveredDeviceList', (_message.Message,), { + 'DESCRIPTOR' : _DISCOVEREDDEVICELIST, + '__module__' : 'bgpls_pb2' + # @@protoc_insertion_point(class_scope:bgpls.DiscoveredDeviceList) + }) +_sym_db.RegisterMessage(DiscoveredDeviceList) + +DiscoveredLinkList = _reflection.GeneratedProtocolMessageType('DiscoveredLinkList', (_message.Message,), { + 'DESCRIPTOR' : _DISCOVEREDLINKLIST, + '__module__' : 'bgpls_pb2' + # @@protoc_insertion_point(class_scope:bgpls.DiscoveredLinkList) + }) +_sym_db.RegisterMessage(DiscoveredLinkList) + +DiscoveredLink = _reflection.GeneratedProtocolMessageType('DiscoveredLink', (_message.Message,), { + 'DESCRIPTOR' : _DISCOVEREDLINK, + '__module__' : 'bgpls_pb2' + # @@protoc_insertion_point(class_scope:bgpls.DiscoveredLink) + }) +_sym_db.RegisterMessage(DiscoveredLink) + +NodeDescriptors = _reflection.GeneratedProtocolMessageType('NodeDescriptors', (_message.Message,), { + 'DESCRIPTOR' : _NODEDESCRIPTORS, + '__module__' : 'bgpls_pb2' + # @@protoc_insertion_point(class_scope:bgpls.NodeDescriptors) + }) +_sym_db.RegisterMessage(NodeDescriptors) + +BgplsSpeaker = _reflection.GeneratedProtocolMessageType('BgplsSpeaker', (_message.Message,), { + 'DESCRIPTOR' : _BGPLSSPEAKER, + '__module__' : 'bgpls_pb2' + # @@protoc_insertion_point(class_scope:bgpls.BgplsSpeaker) + }) +_sym_db.RegisterMessage(BgplsSpeaker) + +BgplsSpeakerId = _reflection.GeneratedProtocolMessageType('BgplsSpeakerId', (_message.Message,), { + 'DESCRIPTOR' : _BGPLSSPEAKERID, + '__module__' : 'bgpls_pb2' + # @@protoc_insertion_point(class_scope:bgpls.BgplsSpeakerId) + }) +_sym_db.RegisterMessage(BgplsSpeakerId) + +BgplsSpeakerList = _reflection.GeneratedProtocolMessageType('BgplsSpeakerList', (_message.Message,), { + 'DESCRIPTOR' : _BGPLSSPEAKERLIST, + '__module__' : 'bgpls_pb2' + # @@protoc_insertion_point(class_scope:bgpls.BgplsSpeakerList) + }) +_sym_db.RegisterMessage(BgplsSpeakerList) + +_BGPLSSERVICE = DESCRIPTOR.services_by_name['BgplsService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _DISCOVEREDDEVICE._serialized_start=37 + _DISCOVEREDDEVICE._serialized_end=120 + _DISCOVEREDDEVICELIST._serialized_start=122 + _DISCOVEREDDEVICELIST._serialized_end=196 + _DISCOVEREDLINKLIST._serialized_start=198 + _DISCOVEREDLINKLIST._serialized_end=266 + _DISCOVEREDLINK._serialized_start=269 + _DISCOVEREDLINK._serialized_end=425 + _NODEDESCRIPTORS._serialized_start=427 + _NODEDESCRIPTORS._serialized_end=496 + _BGPLSSPEAKER._serialized_start=498 + _BGPLSSPEAKER._serialized_end=561 + _BGPLSSPEAKERID._serialized_start=563 + _BGPLSSPEAKERID._serialized_end=591 + _BGPLSSPEAKERLIST._serialized_start=593 + _BGPLSSPEAKERLIST._serialized_end=652 + _BGPLSSERVICE._serialized_start=655 + _BGPLSSERVICE._serialized_end=1140 +# @@protoc_insertion_point(module_scope) diff --git a/proto/bgpls_pb2_grpc.py b/proto/bgpls_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..85bbe4aa5fa5ca2951382b6e77cf4277915ba64a --- /dev/null +++ b/proto/bgpls_pb2_grpc.py @@ -0,0 +1,265 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import bgpls_pb2 as bgpls__pb2 +import context_pb2 as context__pb2 + + +class BgplsServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListDiscoveredDevices = channel.unary_unary( + '/bgpls.BgplsService/ListDiscoveredDevices', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=bgpls__pb2.DiscoveredDeviceList.FromString, + ) + self.ListDiscoveredLinks = channel.unary_unary( + '/bgpls.BgplsService/ListDiscoveredLinks', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=bgpls__pb2.DiscoveredLinkList.FromString, + ) + self.AddBgplsSpeaker = channel.unary_unary( + '/bgpls.BgplsService/AddBgplsSpeaker', + request_serializer=bgpls__pb2.BgplsSpeaker.SerializeToString, + response_deserializer=bgpls__pb2.BgplsSpeakerId.FromString, + ) + self.ListBgplsSpeakers = channel.unary_unary( + '/bgpls.BgplsService/ListBgplsSpeakers', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=bgpls__pb2.BgplsSpeakerList.FromString, + ) + self.DisconnectFromSpeaker = channel.unary_unary( + '/bgpls.BgplsService/DisconnectFromSpeaker', + request_serializer=bgpls__pb2.BgplsSpeaker.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetSpeakerInfoFromId = channel.unary_unary( + '/bgpls.BgplsService/GetSpeakerInfoFromId', + request_serializer=bgpls__pb2.BgplsSpeakerId.SerializeToString, + response_deserializer=bgpls__pb2.BgplsSpeaker.FromString, + ) + self.NotifyAddNodeToContext = channel.unary_unary( + '/bgpls.BgplsService/NotifyAddNodeToContext', + request_serializer=bgpls__pb2.NodeDescriptors.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class BgplsServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ListDiscoveredDevices(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListDiscoveredLinks(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AddBgplsSpeaker(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListBgplsSpeakers(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DisconnectFromSpeaker(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetSpeakerInfoFromId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def NotifyAddNodeToContext(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BgplsServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ListDiscoveredDevices': grpc.unary_unary_rpc_method_handler( + servicer.ListDiscoveredDevices, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=bgpls__pb2.DiscoveredDeviceList.SerializeToString, + ), + 'ListDiscoveredLinks': grpc.unary_unary_rpc_method_handler( + servicer.ListDiscoveredLinks, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=bgpls__pb2.DiscoveredLinkList.SerializeToString, + ), + 'AddBgplsSpeaker': grpc.unary_unary_rpc_method_handler( + servicer.AddBgplsSpeaker, + request_deserializer=bgpls__pb2.BgplsSpeaker.FromString, + response_serializer=bgpls__pb2.BgplsSpeakerId.SerializeToString, + ), + 'ListBgplsSpeakers': grpc.unary_unary_rpc_method_handler( + servicer.ListBgplsSpeakers, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=bgpls__pb2.BgplsSpeakerList.SerializeToString, + ), + 'DisconnectFromSpeaker': grpc.unary_unary_rpc_method_handler( + servicer.DisconnectFromSpeaker, + request_deserializer=bgpls__pb2.BgplsSpeaker.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetSpeakerInfoFromId': grpc.unary_unary_rpc_method_handler( + servicer.GetSpeakerInfoFromId, + request_deserializer=bgpls__pb2.BgplsSpeakerId.FromString, + response_serializer=bgpls__pb2.BgplsSpeaker.SerializeToString, + ), + 'NotifyAddNodeToContext': grpc.unary_unary_rpc_method_handler( + servicer.NotifyAddNodeToContext, + request_deserializer=bgpls__pb2.NodeDescriptors.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'bgpls.BgplsService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class BgplsService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ListDiscoveredDevices(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/bgpls.BgplsService/ListDiscoveredDevices', + context__pb2.Empty.SerializeToString, + bgpls__pb2.DiscoveredDeviceList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListDiscoveredLinks(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/bgpls.BgplsService/ListDiscoveredLinks', + context__pb2.Empty.SerializeToString, + bgpls__pb2.DiscoveredLinkList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AddBgplsSpeaker(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/bgpls.BgplsService/AddBgplsSpeaker', + bgpls__pb2.BgplsSpeaker.SerializeToString, + bgpls__pb2.BgplsSpeakerId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListBgplsSpeakers(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/bgpls.BgplsService/ListBgplsSpeakers', + context__pb2.Empty.SerializeToString, + bgpls__pb2.BgplsSpeakerList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DisconnectFromSpeaker(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/bgpls.BgplsService/DisconnectFromSpeaker', + bgpls__pb2.BgplsSpeaker.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetSpeakerInfoFromId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/bgpls.BgplsService/GetSpeakerInfoFromId', + bgpls__pb2.BgplsSpeakerId.SerializeToString, + bgpls__pb2.BgplsSpeaker.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def NotifyAddNodeToContext(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/bgpls.BgplsService/NotifyAddNodeToContext', + bgpls__pb2.NodeDescriptors.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/context_pb2.py b/proto/context_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..9773976c38f8050cc6fef177c7fff966caca01e4 --- /dev/null +++ b/proto/context_pb2.py @@ -0,0 +1,1022 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: context.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import acl_pb2 as acl__pb2 +import kpi_sample_types_pb2 as kpi__sample__types__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rcontext.proto\x12\x07\x63ontext\x1a\tacl.proto\x1a\x16kpi_sample_types.proto\"\x07\n\x05\x45mpty\"\x14\n\x04Uuid\x12\x0c\n\x04uuid\x18\x01 \x01(\t\"\x1e\n\tTimestamp\x12\x11\n\ttimestamp\x18\x01 \x01(\x01\"Z\n\x05\x45vent\x12%\n\ttimestamp\x18\x01 \x01(\x0b\x32\x12.context.Timestamp\x12*\n\nevent_type\x18\x02 \x01(\x0e\x32\x16.context.EventTypeEnum\"0\n\tContextId\x12#\n\x0c\x63ontext_uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\"\xe9\x01\n\x07\x43ontext\x12&\n\ncontext_id\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12)\n\x0ctopology_ids\x18\x03 \x03(\x0b\x32\x13.context.TopologyId\x12\'\n\x0bservice_ids\x18\x04 \x03(\x0b\x32\x12.context.ServiceId\x12#\n\tslice_ids\x18\x05 \x03(\x0b\x32\x10.context.SliceId\x12/\n\ncontroller\x18\x06 \x01(\x0b\x32\x1b.context.TeraFlowController\"8\n\rContextIdList\x12\'\n\x0b\x63ontext_ids\x18\x01 \x03(\x0b\x32\x12.context.ContextId\"1\n\x0b\x43ontextList\x12\"\n\x08\x63ontexts\x18\x01 \x03(\x0b\x32\x10.context.Context\"U\n\x0c\x43ontextEvent\x12\x1d\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0e.context.Event\x12&\n\ncontext_id\x18\x02 \x01(\x0b\x32\x12.context.ContextId\"Z\n\nTopologyId\x12&\n\ncontext_id\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12$\n\rtopology_uuid\x18\x02 \x01(\x0b\x32\r.context.Uuid\"\x8c\x01\n\x08Topology\x12(\n\x0btopology_id\x18\x01 \x01(\x0b\x32\x13.context.TopologyId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12%\n\ndevice_ids\x18\x03 \x03(\x0b\x32\x11.context.DeviceId\x12!\n\x08link_ids\x18\x04 \x03(\x0b\x32\x0f.context.LinkId\"\x89\x01\n\x0fTopologyDetails\x12(\n\x0btopology_id\x18\x01 \x01(\x0b\x32\x13.context.TopologyId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12 \n\x07\x64\x65vices\x18\x03 \x03(\x0b\x32\x0f.context.Device\x12\x1c\n\x05links\x18\x04 \x03(\x0b\x32\r.context.Link\";\n\x0eTopologyIdList\x12)\n\x0ctopology_ids\x18\x01 \x03(\x0b\x32\x13.context.TopologyId\"5\n\x0cTopologyList\x12%\n\ntopologies\x18\x01 \x03(\x0b\x32\x11.context.Topology\"X\n\rTopologyEvent\x12\x1d\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0e.context.Event\x12(\n\x0btopology_id\x18\x02 \x01(\x0b\x32\x13.context.TopologyId\".\n\x08\x44\x65viceId\x12\"\n\x0b\x64\x65vice_uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\"\xfa\x02\n\x06\x44\x65vice\x12$\n\tdevice_id\x18\x01 \x01(\x0b\x32\x11.context.DeviceId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65vice_type\x18\x03 \x01(\t\x12,\n\rdevice_config\x18\x04 \x01(\x0b\x32\x15.context.DeviceConfig\x12G\n\x19\x64\x65vice_operational_status\x18\x05 \x01(\x0e\x32$.context.DeviceOperationalStatusEnum\x12\x31\n\x0e\x64\x65vice_drivers\x18\x06 \x03(\x0e\x32\x19.context.DeviceDriverEnum\x12+\n\x10\x64\x65vice_endpoints\x18\x07 \x03(\x0b\x32\x11.context.EndPoint\x12&\n\ncomponents\x18\x08 \x03(\x0b\x32\x12.context.Component\x12(\n\rcontroller_id\x18\t \x01(\x0b\x32\x11.context.DeviceId\"\xc9\x01\n\tComponent\x12%\n\x0e\x63omponent_uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x36\n\nattributes\x18\x04 \x03(\x0b\x32\".context.Component.AttributesEntry\x12\x0e\n\x06parent\x18\x05 \x01(\t\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"9\n\x0c\x44\x65viceConfig\x12)\n\x0c\x63onfig_rules\x18\x01 \x03(\x0b\x32\x13.context.ConfigRule\"5\n\x0c\x44\x65viceIdList\x12%\n\ndevice_ids\x18\x01 \x03(\x0b\x32\x11.context.DeviceId\".\n\nDeviceList\x12 \n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x0f.context.Device\"\x8e\x01\n\x0c\x44\x65viceFilter\x12)\n\ndevice_ids\x18\x01 \x01(\x0b\x32\x15.context.DeviceIdList\x12\x19\n\x11include_endpoints\x18\x02 \x01(\x08\x12\x1c\n\x14include_config_rules\x18\x03 \x01(\x08\x12\x1a\n\x12include_components\x18\x04 \x01(\x08\"\x80\x01\n\x0b\x44\x65viceEvent\x12\x1d\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0e.context.Event\x12$\n\tdevice_id\x18\x02 \x01(\x0b\x32\x11.context.DeviceId\x12,\n\rdevice_config\x18\x03 \x01(\x0b\x32\x15.context.DeviceConfig\"*\n\x06LinkId\x12 \n\tlink_uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\"I\n\x0eLinkAttributes\x12\x1b\n\x13total_capacity_gbps\x18\x01 \x01(\x02\x12\x1a\n\x12used_capacity_gbps\x18\x02 \x01(\x02\"\x93\x01\n\x04Link\x12 \n\x07link_id\x18\x01 \x01(\x0b\x32\x0f.context.LinkId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12.\n\x11link_endpoint_ids\x18\x03 \x03(\x0b\x32\x13.context.EndPointId\x12+\n\nattributes\x18\x04 \x01(\x0b\x32\x17.context.LinkAttributes\"/\n\nLinkIdList\x12!\n\x08link_ids\x18\x01 \x03(\x0b\x32\x0f.context.LinkId\"(\n\x08LinkList\x12\x1c\n\x05links\x18\x01 \x03(\x0b\x32\r.context.Link\"L\n\tLinkEvent\x12\x1d\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0e.context.Event\x12 \n\x07link_id\x18\x02 \x01(\x0b\x32\x0f.context.LinkId\"X\n\tServiceId\x12&\n\ncontext_id\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12#\n\x0cservice_uuid\x18\x02 \x01(\x0b\x32\r.context.Uuid\"\xdb\x02\n\x07Service\x12&\n\nservice_id\x18\x01 \x01(\x0b\x32\x12.context.ServiceId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12.\n\x0cservice_type\x18\x03 \x01(\x0e\x32\x18.context.ServiceTypeEnum\x12\x31\n\x14service_endpoint_ids\x18\x04 \x03(\x0b\x32\x13.context.EndPointId\x12\x30\n\x13service_constraints\x18\x05 \x03(\x0b\x32\x13.context.Constraint\x12.\n\x0eservice_status\x18\x06 \x01(\x0b\x32\x16.context.ServiceStatus\x12.\n\x0eservice_config\x18\x07 \x01(\x0b\x32\x16.context.ServiceConfig\x12%\n\ttimestamp\x18\x08 \x01(\x0b\x32\x12.context.Timestamp\"C\n\rServiceStatus\x12\x32\n\x0eservice_status\x18\x01 \x01(\x0e\x32\x1a.context.ServiceStatusEnum\":\n\rServiceConfig\x12)\n\x0c\x63onfig_rules\x18\x01 \x03(\x0b\x32\x13.context.ConfigRule\"8\n\rServiceIdList\x12\'\n\x0bservice_ids\x18\x01 \x03(\x0b\x32\x12.context.ServiceId\"1\n\x0bServiceList\x12\"\n\x08services\x18\x01 \x03(\x0b\x32\x10.context.Service\"\x95\x01\n\rServiceFilter\x12+\n\x0bservice_ids\x18\x01 \x01(\x0b\x32\x16.context.ServiceIdList\x12\x1c\n\x14include_endpoint_ids\x18\x02 \x01(\x08\x12\x1b\n\x13include_constraints\x18\x03 \x01(\x08\x12\x1c\n\x14include_config_rules\x18\x04 \x01(\x08\"U\n\x0cServiceEvent\x12\x1d\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0e.context.Event\x12&\n\nservice_id\x18\x02 \x01(\x0b\x32\x12.context.ServiceId\"T\n\x07SliceId\x12&\n\ncontext_id\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12!\n\nslice_uuid\x18\x02 \x01(\x0b\x32\r.context.Uuid\"\xa0\x03\n\x05Slice\x12\"\n\x08slice_id\x18\x01 \x01(\x0b\x32\x10.context.SliceId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12/\n\x12slice_endpoint_ids\x18\x03 \x03(\x0b\x32\x13.context.EndPointId\x12.\n\x11slice_constraints\x18\x04 \x03(\x0b\x32\x13.context.Constraint\x12-\n\x11slice_service_ids\x18\x05 \x03(\x0b\x32\x12.context.ServiceId\x12,\n\x12slice_subslice_ids\x18\x06 \x03(\x0b\x32\x10.context.SliceId\x12*\n\x0cslice_status\x18\x07 \x01(\x0b\x32\x14.context.SliceStatus\x12*\n\x0cslice_config\x18\x08 \x01(\x0b\x32\x14.context.SliceConfig\x12(\n\x0bslice_owner\x18\t \x01(\x0b\x32\x13.context.SliceOwner\x12%\n\ttimestamp\x18\n \x01(\x0b\x32\x12.context.Timestamp\"E\n\nSliceOwner\x12!\n\nowner_uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\x12\x14\n\x0cowner_string\x18\x02 \x01(\t\"=\n\x0bSliceStatus\x12.\n\x0cslice_status\x18\x01 \x01(\x0e\x32\x18.context.SliceStatusEnum\"8\n\x0bSliceConfig\x12)\n\x0c\x63onfig_rules\x18\x01 \x03(\x0b\x32\x13.context.ConfigRule\"2\n\x0bSliceIdList\x12#\n\tslice_ids\x18\x01 \x03(\x0b\x32\x10.context.SliceId\"+\n\tSliceList\x12\x1e\n\x06slices\x18\x01 \x03(\x0b\x32\x0e.context.Slice\"\xca\x01\n\x0bSliceFilter\x12\'\n\tslice_ids\x18\x01 \x01(\x0b\x32\x14.context.SliceIdList\x12\x1c\n\x14include_endpoint_ids\x18\x02 \x01(\x08\x12\x1b\n\x13include_constraints\x18\x03 \x01(\x08\x12\x1b\n\x13include_service_ids\x18\x04 \x01(\x08\x12\x1c\n\x14include_subslice_ids\x18\x05 \x01(\x08\x12\x1c\n\x14include_config_rules\x18\x06 \x01(\x08\"O\n\nSliceEvent\x12\x1d\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0e.context.Event\x12\"\n\x08slice_id\x18\x02 \x01(\x0b\x32\x10.context.SliceId\"5\n\x0cQoSProfileId\x12%\n\x0eqos_profile_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"6\n\x17QoSProfileValueUnitPair\x12\r\n\x05value\x18\x01 \x01(\x05\x12\x0c\n\x04unit\x18\x02 \x01(\t\"\xf8\x05\n\nQoSProfile\x12-\n\x0eqos_profile_id\x18\x01 \x01(\x0b\x32\x15.context.QoSProfileId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0e\n\x06status\x18\x04 \x01(\t\x12?\n\x15targetMinUpstreamRate\x18\x05 \x01(\x0b\x32 .context.QoSProfileValueUnitPair\x12\x39\n\x0fmaxUpstreamRate\x18\x06 \x01(\x0b\x32 .context.QoSProfileValueUnitPair\x12>\n\x14maxUpstreamBurstRate\x18\x07 \x01(\x0b\x32 .context.QoSProfileValueUnitPair\x12\x41\n\x17targetMinDownstreamRate\x18\x08 \x01(\x0b\x32 .context.QoSProfileValueUnitPair\x12;\n\x11maxDownstreamRate\x18\t \x01(\x0b\x32 .context.QoSProfileValueUnitPair\x12@\n\x16maxDownstreamBurstRate\x18\n \x01(\x0b\x32 .context.QoSProfileValueUnitPair\x12\x35\n\x0bminDuration\x18\x0b \x01(\x0b\x32 .context.QoSProfileValueUnitPair\x12\x35\n\x0bmaxDuration\x18\x0c \x01(\x0b\x32 .context.QoSProfileValueUnitPair\x12\x10\n\x08priority\x18\r \x01(\x05\x12;\n\x11packetDelayBudget\x18\x0e \x01(\x0b\x32 .context.QoSProfileValueUnitPair\x12\x30\n\x06jitter\x18\x0f \x01(\x0b\x32 .context.QoSProfileValueUnitPair\x12\x1b\n\x13packetErrorLossRate\x18\x10 \x01(\x05\"6\n\x0c\x43onnectionId\x12&\n\x0f\x63onnection_uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\"2\n\x15\x43onnectionSettings_L0\x12\x19\n\x11lsp_symbolic_name\x18\x01 \x01(\t\"\x9e\x01\n\x15\x43onnectionSettings_L2\x12\x17\n\x0fsrc_mac_address\x18\x01 \x01(\t\x12\x17\n\x0f\x64st_mac_address\x18\x02 \x01(\t\x12\x12\n\nether_type\x18\x03 \x01(\r\x12\x0f\n\x07vlan_id\x18\x04 \x01(\r\x12\x12\n\nmpls_label\x18\x05 \x01(\r\x12\x1a\n\x12mpls_traffic_class\x18\x06 \x01(\r\"t\n\x15\x43onnectionSettings_L3\x12\x16\n\x0esrc_ip_address\x18\x01 \x01(\t\x12\x16\n\x0e\x64st_ip_address\x18\x02 \x01(\t\x12\x0c\n\x04\x64scp\x18\x03 \x01(\r\x12\x10\n\x08protocol\x18\x04 \x01(\r\x12\x0b\n\x03ttl\x18\x05 \x01(\r\"[\n\x15\x43onnectionSettings_L4\x12\x10\n\x08src_port\x18\x01 \x01(\r\x12\x10\n\x08\x64st_port\x18\x02 \x01(\r\x12\x11\n\ttcp_flags\x18\x03 \x01(\r\x12\x0b\n\x03ttl\x18\x04 \x01(\r\"\xc4\x01\n\x12\x43onnectionSettings\x12*\n\x02l0\x18\x01 \x01(\x0b\x32\x1e.context.ConnectionSettings_L0\x12*\n\x02l2\x18\x02 \x01(\x0b\x32\x1e.context.ConnectionSettings_L2\x12*\n\x02l3\x18\x03 \x01(\x0b\x32\x1e.context.ConnectionSettings_L3\x12*\n\x02l4\x18\x04 \x01(\x0b\x32\x1e.context.ConnectionSettings_L4\"\xf3\x01\n\nConnection\x12,\n\rconnection_id\x18\x01 \x01(\x0b\x32\x15.context.ConnectionId\x12&\n\nservice_id\x18\x02 \x01(\x0b\x32\x12.context.ServiceId\x12\x33\n\x16path_hops_endpoint_ids\x18\x03 \x03(\x0b\x32\x13.context.EndPointId\x12+\n\x0fsub_service_ids\x18\x04 \x03(\x0b\x32\x12.context.ServiceId\x12-\n\x08settings\x18\x05 \x01(\x0b\x32\x1b.context.ConnectionSettings\"A\n\x10\x43onnectionIdList\x12-\n\x0e\x63onnection_ids\x18\x01 \x03(\x0b\x32\x15.context.ConnectionId\":\n\x0e\x43onnectionList\x12(\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32\x13.context.Connection\"^\n\x0f\x43onnectionEvent\x12\x1d\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0e.context.Event\x12,\n\rconnection_id\x18\x02 \x01(\x0b\x32\x15.context.ConnectionId\"\x82\x01\n\nEndPointId\x12(\n\x0btopology_id\x18\x01 \x01(\x0b\x32\x13.context.TopologyId\x12$\n\tdevice_id\x18\x02 \x01(\x0b\x32\x11.context.DeviceId\x12$\n\rendpoint_uuid\x18\x03 \x01(\x0b\x32\r.context.Uuid\"\xc2\x01\n\x08\x45ndPoint\x12(\n\x0b\x65ndpoint_id\x18\x01 \x01(\x0b\x32\x13.context.EndPointId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x15\n\rendpoint_type\x18\x03 \x01(\t\x12\x39\n\x10kpi_sample_types\x18\x04 \x03(\x0e\x32\x1f.kpi_sample_types.KpiSampleType\x12,\n\x11\x65ndpoint_location\x18\x05 \x01(\x0b\x32\x11.context.Location\"{\n\x0c\x45ndPointName\x12(\n\x0b\x65ndpoint_id\x18\x01 \x01(\x0b\x32\x13.context.EndPointId\x12\x13\n\x0b\x64\x65vice_name\x18\x02 \x01(\t\x12\x15\n\rendpoint_name\x18\x03 \x01(\t\x12\x15\n\rendpoint_type\x18\x04 \x01(\t\";\n\x0e\x45ndPointIdList\x12)\n\x0c\x65ndpoint_ids\x18\x01 \x03(\x0b\x32\x13.context.EndPointId\"A\n\x10\x45ndPointNameList\x12-\n\x0e\x65ndpoint_names\x18\x01 \x03(\x0b\x32\x15.context.EndPointName\"A\n\x11\x43onfigRule_Custom\x12\x14\n\x0cresource_key\x18\x01 \x01(\t\x12\x16\n\x0eresource_value\x18\x02 \x01(\t\"]\n\x0e\x43onfigRule_ACL\x12(\n\x0b\x65ndpoint_id\x18\x01 \x01(\x0b\x32\x13.context.EndPointId\x12!\n\x08rule_set\x18\x02 \x01(\x0b\x32\x0f.acl.AclRuleSet\"\x9c\x01\n\nConfigRule\x12)\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x19.context.ConfigActionEnum\x12,\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x1a.context.ConfigRule_CustomH\x00\x12&\n\x03\x61\x63l\x18\x03 \x01(\x0b\x32\x17.context.ConfigRule_ACLH\x00\x42\r\n\x0b\x63onfig_rule\"F\n\x11\x43onstraint_Custom\x12\x17\n\x0f\x63onstraint_type\x18\x01 \x01(\t\x12\x18\n\x10\x63onstraint_value\x18\x02 \x01(\t\"E\n\x13\x43onstraint_Schedule\x12\x17\n\x0fstart_timestamp\x18\x01 \x01(\x02\x12\x15\n\rduration_days\x18\x02 \x01(\x02\"3\n\x0cGPS_Position\x12\x10\n\x08latitude\x18\x01 \x01(\x02\x12\x11\n\tlongitude\x18\x02 \x01(\x02\"W\n\x08Location\x12\x10\n\x06region\x18\x01 \x01(\tH\x00\x12-\n\x0cgps_position\x18\x02 \x01(\x0b\x32\x15.context.GPS_PositionH\x00\x42\n\n\x08location\"l\n\x1b\x43onstraint_EndPointLocation\x12(\n\x0b\x65ndpoint_id\x18\x01 \x01(\x0b\x32\x13.context.EndPointId\x12#\n\x08location\x18\x02 \x01(\x0b\x32\x11.context.Location\"Y\n\x1b\x43onstraint_EndPointPriority\x12(\n\x0b\x65ndpoint_id\x18\x01 \x01(\x0b\x32\x13.context.EndPointId\x12\x10\n\x08priority\x18\x02 \x01(\r\"0\n\x16\x43onstraint_SLA_Latency\x12\x16\n\x0e\x65\x32\x65_latency_ms\x18\x01 \x01(\x02\"0\n\x17\x43onstraint_SLA_Capacity\x12\x15\n\rcapacity_gbps\x18\x01 \x01(\x02\"c\n\x1b\x43onstraint_SLA_Availability\x12\x1a\n\x12num_disjoint_paths\x18\x01 \x01(\r\x12\x12\n\nall_active\x18\x02 \x01(\x08\x12\x14\n\x0c\x61vailability\x18\x03 \x01(\x02\"V\n\x1e\x43onstraint_SLA_Isolation_level\x12\x34\n\x0fisolation_level\x18\x01 \x03(\x0e\x32\x1b.context.IsolationLevelEnum\"\xa2\x01\n\x15\x43onstraint_Exclusions\x12\x14\n\x0cis_permanent\x18\x01 \x01(\x08\x12%\n\ndevice_ids\x18\x02 \x03(\x0b\x32\x11.context.DeviceId\x12)\n\x0c\x65ndpoint_ids\x18\x03 \x03(\x0b\x32\x13.context.EndPointId\x12!\n\x08link_ids\x18\x04 \x03(\x0b\x32\x0f.context.LinkId\"\xdb\x04\n\nConstraint\x12-\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x1d.context.ConstraintActionEnum\x12,\n\x06\x63ustom\x18\x02 \x01(\x0b\x32\x1a.context.Constraint_CustomH\x00\x12\x30\n\x08schedule\x18\x03 \x01(\x0b\x32\x1c.context.Constraint_ScheduleH\x00\x12\x41\n\x11\x65ndpoint_location\x18\x04 \x01(\x0b\x32$.context.Constraint_EndPointLocationH\x00\x12\x41\n\x11\x65ndpoint_priority\x18\x05 \x01(\x0b\x32$.context.Constraint_EndPointPriorityH\x00\x12\x38\n\x0csla_capacity\x18\x06 \x01(\x0b\x32 .context.Constraint_SLA_CapacityH\x00\x12\x36\n\x0bsla_latency\x18\x07 \x01(\x0b\x32\x1f.context.Constraint_SLA_LatencyH\x00\x12@\n\x10sla_availability\x18\x08 \x01(\x0b\x32$.context.Constraint_SLA_AvailabilityH\x00\x12@\n\rsla_isolation\x18\t \x01(\x0b\x32\'.context.Constraint_SLA_Isolation_levelH\x00\x12\x34\n\nexclusions\x18\n \x01(\x0b\x32\x1e.context.Constraint_ExclusionsH\x00\x42\x0c\n\nconstraint\"^\n\x12TeraFlowController\x12&\n\ncontext_id\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x12\n\nip_address\x18\x02 \x01(\t\x12\x0c\n\x04port\x18\x03 \x01(\r\"U\n\x14\x41uthenticationResult\x12&\n\ncontext_id\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x15\n\rauthenticated\x18\x02 \x01(\x08\"-\n\x0fOpticalConfigId\x12\x1a\n\x12opticalconfig_uuid\x18\x01 \x01(\t\"S\n\rOpticalConfig\x12\x32\n\x10opticalconfig_id\x18\x01 \x01(\x0b\x32\x18.context.OpticalConfigId\x12\x0e\n\x06\x63onfig\x18\x02 \x01(\t\"C\n\x11OpticalConfigList\x12.\n\x0eopticalconfigs\x18\x01 \x03(\x0b\x32\x16.context.OpticalConfig\"9\n\rOpticalLinkId\x12(\n\x11optical_link_uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\",\n\x07\x46iberId\x12!\n\nfiber_uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\"\xe1\x01\n\x05\x46iber\x12\n\n\x02ID\x18\n \x01(\t\x12\x10\n\x08src_port\x18\x01 \x01(\t\x12\x10\n\x08\x64st_port\x18\x02 \x01(\t\x12\x17\n\x0flocal_peer_port\x18\x03 \x01(\t\x12\x18\n\x10remote_peer_port\x18\x04 \x01(\t\x12\x0f\n\x07\x63_slots\x18\x05 \x03(\x05\x12\x0f\n\x07l_slots\x18\x06 \x03(\x05\x12\x0f\n\x07s_slots\x18\x07 \x03(\x05\x12\x0e\n\x06length\x18\x08 \x01(\x02\x12\x0c\n\x04used\x18\t \x01(\x08\x12$\n\nfiber_uuid\x18\x0b \x01(\x0b\x32\x10.context.FiberId\"d\n\x12OpticalLinkDetails\x12\x0e\n\x06length\x18\x01 \x01(\x02\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x1e\n\x06\x66ibers\x18\x04 \x03(\x0b\x32\x0e.context.Fiber\"|\n\x0bOpticalLink\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32\x1b.context.OpticalLinkDetails\x12\x31\n\x11optical_link_uuid\x18\x03 \x01(\x0b\x32\x16.context.OpticalLinkId*j\n\rEventTypeEnum\x12\x17\n\x13\x45VENTTYPE_UNDEFINED\x10\x00\x12\x14\n\x10\x45VENTTYPE_CREATE\x10\x01\x12\x14\n\x10\x45VENTTYPE_UPDATE\x10\x02\x12\x14\n\x10\x45VENTTYPE_REMOVE\x10\x03*\xe8\x02\n\x10\x44\x65viceDriverEnum\x12\x1a\n\x16\x44\x45VICEDRIVER_UNDEFINED\x10\x00\x12\x1b\n\x17\x44\x45VICEDRIVER_OPENCONFIG\x10\x01\x12\x1e\n\x1a\x44\x45VICEDRIVER_TRANSPORT_API\x10\x02\x12\x13\n\x0f\x44\x45VICEDRIVER_P4\x10\x03\x12&\n\"DEVICEDRIVER_IETF_NETWORK_TOPOLOGY\x10\x04\x12\x1b\n\x17\x44\x45VICEDRIVER_ONF_TR_532\x10\x05\x12\x13\n\x0f\x44\x45VICEDRIVER_XR\x10\x06\x12\x1b\n\x17\x44\x45VICEDRIVER_IETF_L2VPN\x10\x07\x12 \n\x1c\x44\x45VICEDRIVER_GNMI_OPENCONFIG\x10\x08\x12\x1c\n\x18\x44\x45VICEDRIVER_OPTICAL_TFS\x10\t\x12\x1a\n\x16\x44\x45VICEDRIVER_IETF_ACTN\x10\n\x12\x13\n\x0f\x44\x45VICEDRIVER_OC\x10\x0b*\x8f\x01\n\x1b\x44\x65viceOperationalStatusEnum\x12%\n!DEVICEOPERATIONALSTATUS_UNDEFINED\x10\x00\x12$\n DEVICEOPERATIONALSTATUS_DISABLED\x10\x01\x12#\n\x1f\x44\x45VICEOPERATIONALSTATUS_ENABLED\x10\x02*\xd0\x01\n\x0fServiceTypeEnum\x12\x17\n\x13SERVICETYPE_UNKNOWN\x10\x00\x12\x14\n\x10SERVICETYPE_L3NM\x10\x01\x12\x14\n\x10SERVICETYPE_L2NM\x10\x02\x12)\n%SERVICETYPE_TAPI_CONNECTIVITY_SERVICE\x10\x03\x12\x12\n\x0eSERVICETYPE_TE\x10\x04\x12\x13\n\x0fSERVICETYPE_E2E\x10\x05\x12$\n SERVICETYPE_OPTICAL_CONNECTIVITY\x10\x06*\xc4\x01\n\x11ServiceStatusEnum\x12\x1b\n\x17SERVICESTATUS_UNDEFINED\x10\x00\x12\x19\n\x15SERVICESTATUS_PLANNED\x10\x01\x12\x18\n\x14SERVICESTATUS_ACTIVE\x10\x02\x12\x1a\n\x16SERVICESTATUS_UPDATING\x10\x03\x12!\n\x1dSERVICESTATUS_PENDING_REMOVAL\x10\x04\x12\x1e\n\x1aSERVICESTATUS_SLA_VIOLATED\x10\x05*\xa9\x01\n\x0fSliceStatusEnum\x12\x19\n\x15SLICESTATUS_UNDEFINED\x10\x00\x12\x17\n\x13SLICESTATUS_PLANNED\x10\x01\x12\x14\n\x10SLICESTATUS_INIT\x10\x02\x12\x16\n\x12SLICESTATUS_ACTIVE\x10\x03\x12\x16\n\x12SLICESTATUS_DEINIT\x10\x04\x12\x1c\n\x18SLICESTATUS_SLA_VIOLATED\x10\x05*]\n\x10\x43onfigActionEnum\x12\x1a\n\x16\x43ONFIGACTION_UNDEFINED\x10\x00\x12\x14\n\x10\x43ONFIGACTION_SET\x10\x01\x12\x17\n\x13\x43ONFIGACTION_DELETE\x10\x02*m\n\x14\x43onstraintActionEnum\x12\x1e\n\x1a\x43ONSTRAINTACTION_UNDEFINED\x10\x00\x12\x18\n\x14\x43ONSTRAINTACTION_SET\x10\x01\x12\x1b\n\x17\x43ONSTRAINTACTION_DELETE\x10\x02*\x83\x02\n\x12IsolationLevelEnum\x12\x10\n\x0cNO_ISOLATION\x10\x00\x12\x16\n\x12PHYSICAL_ISOLATION\x10\x01\x12\x15\n\x11LOGICAL_ISOLATION\x10\x02\x12\x15\n\x11PROCESS_ISOLATION\x10\x03\x12\x1d\n\x19PHYSICAL_MEMORY_ISOLATION\x10\x04\x12\x1e\n\x1aPHYSICAL_NETWORK_ISOLATION\x10\x05\x12\x1e\n\x1aVIRTUAL_RESOURCE_ISOLATION\x10\x06\x12\x1f\n\x1bNETWORK_FUNCTIONS_ISOLATION\x10\x07\x12\x15\n\x11SERVICE_ISOLATION\x10\x08\x32\xdd\x1b\n\x0e\x43ontextService\x12:\n\x0eListContextIds\x12\x0e.context.Empty\x1a\x16.context.ContextIdList\"\x00\x12\x36\n\x0cListContexts\x12\x0e.context.Empty\x1a\x14.context.ContextList\"\x00\x12\x34\n\nGetContext\x12\x12.context.ContextId\x1a\x10.context.Context\"\x00\x12\x34\n\nSetContext\x12\x10.context.Context\x1a\x12.context.ContextId\"\x00\x12\x35\n\rRemoveContext\x12\x12.context.ContextId\x1a\x0e.context.Empty\"\x00\x12=\n\x10GetContextEvents\x12\x0e.context.Empty\x1a\x15.context.ContextEvent\"\x00\x30\x01\x12@\n\x0fListTopologyIds\x12\x12.context.ContextId\x1a\x17.context.TopologyIdList\"\x00\x12=\n\x0eListTopologies\x12\x12.context.ContextId\x1a\x15.context.TopologyList\"\x00\x12\x37\n\x0bGetTopology\x12\x13.context.TopologyId\x1a\x11.context.Topology\"\x00\x12\x45\n\x12GetTopologyDetails\x12\x13.context.TopologyId\x1a\x18.context.TopologyDetails\"\x00\x12\x37\n\x0bSetTopology\x12\x11.context.Topology\x1a\x13.context.TopologyId\"\x00\x12\x37\n\x0eRemoveTopology\x12\x13.context.TopologyId\x1a\x0e.context.Empty\"\x00\x12?\n\x11GetTopologyEvents\x12\x0e.context.Empty\x1a\x16.context.TopologyEvent\"\x00\x30\x01\x12\x38\n\rListDeviceIds\x12\x0e.context.Empty\x1a\x15.context.DeviceIdList\"\x00\x12\x34\n\x0bListDevices\x12\x0e.context.Empty\x1a\x13.context.DeviceList\"\x00\x12\x31\n\tGetDevice\x12\x11.context.DeviceId\x1a\x0f.context.Device\"\x00\x12\x31\n\tSetDevice\x12\x0f.context.Device\x1a\x11.context.DeviceId\"\x00\x12\x33\n\x0cRemoveDevice\x12\x11.context.DeviceId\x1a\x0e.context.Empty\"\x00\x12;\n\x0fGetDeviceEvents\x12\x0e.context.Empty\x1a\x14.context.DeviceEvent\"\x00\x30\x01\x12<\n\x0cSelectDevice\x12\x15.context.DeviceFilter\x1a\x13.context.DeviceList\"\x00\x12I\n\x11ListEndPointNames\x12\x17.context.EndPointIdList\x1a\x19.context.EndPointNameList\"\x00\x12\x34\n\x0bListLinkIds\x12\x0e.context.Empty\x1a\x13.context.LinkIdList\"\x00\x12\x30\n\tListLinks\x12\x0e.context.Empty\x1a\x11.context.LinkList\"\x00\x12+\n\x07GetLink\x12\x0f.context.LinkId\x1a\r.context.Link\"\x00\x12+\n\x07SetLink\x12\r.context.Link\x1a\x0f.context.LinkId\"\x00\x12/\n\nRemoveLink\x12\x0f.context.LinkId\x1a\x0e.context.Empty\"\x00\x12\x37\n\rGetLinkEvents\x12\x0e.context.Empty\x1a\x12.context.LinkEvent\"\x00\x30\x01\x12>\n\x0eListServiceIds\x12\x12.context.ContextId\x1a\x16.context.ServiceIdList\"\x00\x12:\n\x0cListServices\x12\x12.context.ContextId\x1a\x14.context.ServiceList\"\x00\x12\x34\n\nGetService\x12\x12.context.ServiceId\x1a\x10.context.Service\"\x00\x12\x34\n\nSetService\x12\x10.context.Service\x1a\x12.context.ServiceId\"\x00\x12\x36\n\x0cUnsetService\x12\x10.context.Service\x1a\x12.context.ServiceId\"\x00\x12\x35\n\rRemoveService\x12\x12.context.ServiceId\x1a\x0e.context.Empty\"\x00\x12=\n\x10GetServiceEvents\x12\x0e.context.Empty\x1a\x15.context.ServiceEvent\"\x00\x30\x01\x12?\n\rSelectService\x12\x16.context.ServiceFilter\x1a\x14.context.ServiceList\"\x00\x12:\n\x0cListSliceIds\x12\x12.context.ContextId\x1a\x14.context.SliceIdList\"\x00\x12\x36\n\nListSlices\x12\x12.context.ContextId\x1a\x12.context.SliceList\"\x00\x12.\n\x08GetSlice\x12\x10.context.SliceId\x1a\x0e.context.Slice\"\x00\x12.\n\x08SetSlice\x12\x0e.context.Slice\x1a\x10.context.SliceId\"\x00\x12\x30\n\nUnsetSlice\x12\x0e.context.Slice\x1a\x10.context.SliceId\"\x00\x12\x31\n\x0bRemoveSlice\x12\x10.context.SliceId\x1a\x0e.context.Empty\"\x00\x12\x39\n\x0eGetSliceEvents\x12\x0e.context.Empty\x1a\x13.context.SliceEvent\"\x00\x30\x01\x12\x39\n\x0bSelectSlice\x12\x14.context.SliceFilter\x1a\x12.context.SliceList\"\x00\x12>\n\x10\x43reateQoSProfile\x12\x13.context.QoSProfile\x1a\x13.context.QoSProfile\"\x00\x12>\n\x10UpdateQoSProfile\x12\x13.context.QoSProfile\x1a\x13.context.QoSProfile\"\x00\x12;\n\x10\x44\x65leteQoSProfile\x12\x15.context.QoSProfileId\x1a\x0e.context.Empty\"\x00\x12=\n\rGetQoSProfile\x12\x15.context.QoSProfileId\x1a\x13.context.QoSProfile\"\x00\x12\x39\n\x0eGetQoSProfiles\x12\x0e.context.Empty\x1a\x13.context.QoSProfile\"\x00\x30\x01\x12\x44\n\x11ListConnectionIds\x12\x12.context.ServiceId\x1a\x19.context.ConnectionIdList\"\x00\x12@\n\x0fListConnections\x12\x12.context.ServiceId\x1a\x17.context.ConnectionList\"\x00\x12=\n\rGetConnection\x12\x15.context.ConnectionId\x1a\x13.context.Connection\"\x00\x12=\n\rSetConnection\x12\x13.context.Connection\x1a\x15.context.ConnectionId\"\x00\x12;\n\x10RemoveConnection\x12\x15.context.ConnectionId\x1a\x0e.context.Empty\"\x00\x12\x43\n\x13GetConnectionEvents\x12\x0e.context.Empty\x1a\x18.context.ConnectionEvent\"\x00\x30\x01\x12@\n\x10GetOpticalConfig\x12\x0e.context.Empty\x1a\x1a.context.OpticalConfigList\"\x00\x12\x46\n\x10SetOpticalConfig\x12\x16.context.OpticalConfig\x1a\x18.context.OpticalConfigId\"\x00\x12I\n\x13SelectOpticalConfig\x12\x18.context.OpticalConfigId\x1a\x16.context.OpticalConfig\"\x00\x12\x38\n\x0eSetOpticalLink\x12\x14.context.OpticalLink\x1a\x0e.context.Empty\"\x00\x12@\n\x0eGetOpticalLink\x12\x16.context.OpticalLinkId\x1a\x14.context.OpticalLink\"\x00\x12.\n\x08GetFiber\x12\x10.context.FiberId\x1a\x0e.context.Fiber\"\x00\x62\x06proto3') + +_EVENTTYPEENUM = DESCRIPTOR.enum_types_by_name['EventTypeEnum'] +EventTypeEnum = enum_type_wrapper.EnumTypeWrapper(_EVENTTYPEENUM) +_DEVICEDRIVERENUM = DESCRIPTOR.enum_types_by_name['DeviceDriverEnum'] +DeviceDriverEnum = enum_type_wrapper.EnumTypeWrapper(_DEVICEDRIVERENUM) +_DEVICEOPERATIONALSTATUSENUM = DESCRIPTOR.enum_types_by_name['DeviceOperationalStatusEnum'] +DeviceOperationalStatusEnum = enum_type_wrapper.EnumTypeWrapper(_DEVICEOPERATIONALSTATUSENUM) +_SERVICETYPEENUM = DESCRIPTOR.enum_types_by_name['ServiceTypeEnum'] +ServiceTypeEnum = enum_type_wrapper.EnumTypeWrapper(_SERVICETYPEENUM) +_SERVICESTATUSENUM = DESCRIPTOR.enum_types_by_name['ServiceStatusEnum'] +ServiceStatusEnum = enum_type_wrapper.EnumTypeWrapper(_SERVICESTATUSENUM) +_SLICESTATUSENUM = DESCRIPTOR.enum_types_by_name['SliceStatusEnum'] +SliceStatusEnum = enum_type_wrapper.EnumTypeWrapper(_SLICESTATUSENUM) +_CONFIGACTIONENUM = DESCRIPTOR.enum_types_by_name['ConfigActionEnum'] +ConfigActionEnum = enum_type_wrapper.EnumTypeWrapper(_CONFIGACTIONENUM) +_CONSTRAINTACTIONENUM = DESCRIPTOR.enum_types_by_name['ConstraintActionEnum'] +ConstraintActionEnum = enum_type_wrapper.EnumTypeWrapper(_CONSTRAINTACTIONENUM) +_ISOLATIONLEVELENUM = DESCRIPTOR.enum_types_by_name['IsolationLevelEnum'] +IsolationLevelEnum = enum_type_wrapper.EnumTypeWrapper(_ISOLATIONLEVELENUM) +EVENTTYPE_UNDEFINED = 0 +EVENTTYPE_CREATE = 1 +EVENTTYPE_UPDATE = 2 +EVENTTYPE_REMOVE = 3 +DEVICEDRIVER_UNDEFINED = 0 +DEVICEDRIVER_OPENCONFIG = 1 +DEVICEDRIVER_TRANSPORT_API = 2 +DEVICEDRIVER_P4 = 3 +DEVICEDRIVER_IETF_NETWORK_TOPOLOGY = 4 +DEVICEDRIVER_ONF_TR_532 = 5 +DEVICEDRIVER_XR = 6 +DEVICEDRIVER_IETF_L2VPN = 7 +DEVICEDRIVER_GNMI_OPENCONFIG = 8 +DEVICEDRIVER_OPTICAL_TFS = 9 +DEVICEDRIVER_IETF_ACTN = 10 +DEVICEDRIVER_OC = 11 +DEVICEOPERATIONALSTATUS_UNDEFINED = 0 +DEVICEOPERATIONALSTATUS_DISABLED = 1 +DEVICEOPERATIONALSTATUS_ENABLED = 2 +SERVICETYPE_UNKNOWN = 0 +SERVICETYPE_L3NM = 1 +SERVICETYPE_L2NM = 2 +SERVICETYPE_TAPI_CONNECTIVITY_SERVICE = 3 +SERVICETYPE_TE = 4 +SERVICETYPE_E2E = 5 +SERVICETYPE_OPTICAL_CONNECTIVITY = 6 +SERVICESTATUS_UNDEFINED = 0 +SERVICESTATUS_PLANNED = 1 +SERVICESTATUS_ACTIVE = 2 +SERVICESTATUS_UPDATING = 3 +SERVICESTATUS_PENDING_REMOVAL = 4 +SERVICESTATUS_SLA_VIOLATED = 5 +SLICESTATUS_UNDEFINED = 0 +SLICESTATUS_PLANNED = 1 +SLICESTATUS_INIT = 2 +SLICESTATUS_ACTIVE = 3 +SLICESTATUS_DEINIT = 4 +SLICESTATUS_SLA_VIOLATED = 5 +CONFIGACTION_UNDEFINED = 0 +CONFIGACTION_SET = 1 +CONFIGACTION_DELETE = 2 +CONSTRAINTACTION_UNDEFINED = 0 +CONSTRAINTACTION_SET = 1 +CONSTRAINTACTION_DELETE = 2 +NO_ISOLATION = 0 +PHYSICAL_ISOLATION = 1 +LOGICAL_ISOLATION = 2 +PROCESS_ISOLATION = 3 +PHYSICAL_MEMORY_ISOLATION = 4 +PHYSICAL_NETWORK_ISOLATION = 5 +VIRTUAL_RESOURCE_ISOLATION = 6 +NETWORK_FUNCTIONS_ISOLATION = 7 +SERVICE_ISOLATION = 8 + + +_EMPTY = DESCRIPTOR.message_types_by_name['Empty'] +_UUID = DESCRIPTOR.message_types_by_name['Uuid'] +_TIMESTAMP = DESCRIPTOR.message_types_by_name['Timestamp'] +_EVENT = DESCRIPTOR.message_types_by_name['Event'] +_CONTEXTID = DESCRIPTOR.message_types_by_name['ContextId'] +_CONTEXT = DESCRIPTOR.message_types_by_name['Context'] +_CONTEXTIDLIST = DESCRIPTOR.message_types_by_name['ContextIdList'] +_CONTEXTLIST = DESCRIPTOR.message_types_by_name['ContextList'] +_CONTEXTEVENT = DESCRIPTOR.message_types_by_name['ContextEvent'] +_TOPOLOGYID = DESCRIPTOR.message_types_by_name['TopologyId'] +_TOPOLOGY = DESCRIPTOR.message_types_by_name['Topology'] +_TOPOLOGYDETAILS = DESCRIPTOR.message_types_by_name['TopologyDetails'] +_TOPOLOGYIDLIST = DESCRIPTOR.message_types_by_name['TopologyIdList'] +_TOPOLOGYLIST = DESCRIPTOR.message_types_by_name['TopologyList'] +_TOPOLOGYEVENT = DESCRIPTOR.message_types_by_name['TopologyEvent'] +_DEVICEID = DESCRIPTOR.message_types_by_name['DeviceId'] +_DEVICE = DESCRIPTOR.message_types_by_name['Device'] +_COMPONENT = DESCRIPTOR.message_types_by_name['Component'] +_COMPONENT_ATTRIBUTESENTRY = _COMPONENT.nested_types_by_name['AttributesEntry'] +_DEVICECONFIG = DESCRIPTOR.message_types_by_name['DeviceConfig'] +_DEVICEIDLIST = DESCRIPTOR.message_types_by_name['DeviceIdList'] +_DEVICELIST = DESCRIPTOR.message_types_by_name['DeviceList'] +_DEVICEFILTER = DESCRIPTOR.message_types_by_name['DeviceFilter'] +_DEVICEEVENT = DESCRIPTOR.message_types_by_name['DeviceEvent'] +_LINKID = DESCRIPTOR.message_types_by_name['LinkId'] +_LINKATTRIBUTES = DESCRIPTOR.message_types_by_name['LinkAttributes'] +_LINK = DESCRIPTOR.message_types_by_name['Link'] +_LINKIDLIST = DESCRIPTOR.message_types_by_name['LinkIdList'] +_LINKLIST = DESCRIPTOR.message_types_by_name['LinkList'] +_LINKEVENT = DESCRIPTOR.message_types_by_name['LinkEvent'] +_SERVICEID = DESCRIPTOR.message_types_by_name['ServiceId'] +_SERVICE = DESCRIPTOR.message_types_by_name['Service'] +_SERVICESTATUS = DESCRIPTOR.message_types_by_name['ServiceStatus'] +_SERVICECONFIG = DESCRIPTOR.message_types_by_name['ServiceConfig'] +_SERVICEIDLIST = DESCRIPTOR.message_types_by_name['ServiceIdList'] +_SERVICELIST = DESCRIPTOR.message_types_by_name['ServiceList'] +_SERVICEFILTER = DESCRIPTOR.message_types_by_name['ServiceFilter'] +_SERVICEEVENT = DESCRIPTOR.message_types_by_name['ServiceEvent'] +_SLICEID = DESCRIPTOR.message_types_by_name['SliceId'] +_SLICE = DESCRIPTOR.message_types_by_name['Slice'] +_SLICEOWNER = DESCRIPTOR.message_types_by_name['SliceOwner'] +_SLICESTATUS = DESCRIPTOR.message_types_by_name['SliceStatus'] +_SLICECONFIG = DESCRIPTOR.message_types_by_name['SliceConfig'] +_SLICEIDLIST = DESCRIPTOR.message_types_by_name['SliceIdList'] +_SLICELIST = DESCRIPTOR.message_types_by_name['SliceList'] +_SLICEFILTER = DESCRIPTOR.message_types_by_name['SliceFilter'] +_SLICEEVENT = DESCRIPTOR.message_types_by_name['SliceEvent'] +_QOSPROFILEID = DESCRIPTOR.message_types_by_name['QoSProfileId'] +_QOSPROFILEVALUEUNITPAIR = DESCRIPTOR.message_types_by_name['QoSProfileValueUnitPair'] +_QOSPROFILE = DESCRIPTOR.message_types_by_name['QoSProfile'] +_CONNECTIONID = DESCRIPTOR.message_types_by_name['ConnectionId'] +_CONNECTIONSETTINGS_L0 = DESCRIPTOR.message_types_by_name['ConnectionSettings_L0'] +_CONNECTIONSETTINGS_L2 = DESCRIPTOR.message_types_by_name['ConnectionSettings_L2'] +_CONNECTIONSETTINGS_L3 = DESCRIPTOR.message_types_by_name['ConnectionSettings_L3'] +_CONNECTIONSETTINGS_L4 = DESCRIPTOR.message_types_by_name['ConnectionSettings_L4'] +_CONNECTIONSETTINGS = DESCRIPTOR.message_types_by_name['ConnectionSettings'] +_CONNECTION = DESCRIPTOR.message_types_by_name['Connection'] +_CONNECTIONIDLIST = DESCRIPTOR.message_types_by_name['ConnectionIdList'] +_CONNECTIONLIST = DESCRIPTOR.message_types_by_name['ConnectionList'] +_CONNECTIONEVENT = DESCRIPTOR.message_types_by_name['ConnectionEvent'] +_ENDPOINTID = DESCRIPTOR.message_types_by_name['EndPointId'] +_ENDPOINT = DESCRIPTOR.message_types_by_name['EndPoint'] +_ENDPOINTNAME = DESCRIPTOR.message_types_by_name['EndPointName'] +_ENDPOINTIDLIST = DESCRIPTOR.message_types_by_name['EndPointIdList'] +_ENDPOINTNAMELIST = DESCRIPTOR.message_types_by_name['EndPointNameList'] +_CONFIGRULE_CUSTOM = DESCRIPTOR.message_types_by_name['ConfigRule_Custom'] +_CONFIGRULE_ACL = DESCRIPTOR.message_types_by_name['ConfigRule_ACL'] +_CONFIGRULE = DESCRIPTOR.message_types_by_name['ConfigRule'] +_CONSTRAINT_CUSTOM = DESCRIPTOR.message_types_by_name['Constraint_Custom'] +_CONSTRAINT_SCHEDULE = DESCRIPTOR.message_types_by_name['Constraint_Schedule'] +_GPS_POSITION = DESCRIPTOR.message_types_by_name['GPS_Position'] +_LOCATION = DESCRIPTOR.message_types_by_name['Location'] +_CONSTRAINT_ENDPOINTLOCATION = DESCRIPTOR.message_types_by_name['Constraint_EndPointLocation'] +_CONSTRAINT_ENDPOINTPRIORITY = DESCRIPTOR.message_types_by_name['Constraint_EndPointPriority'] +_CONSTRAINT_SLA_LATENCY = DESCRIPTOR.message_types_by_name['Constraint_SLA_Latency'] +_CONSTRAINT_SLA_CAPACITY = DESCRIPTOR.message_types_by_name['Constraint_SLA_Capacity'] +_CONSTRAINT_SLA_AVAILABILITY = DESCRIPTOR.message_types_by_name['Constraint_SLA_Availability'] +_CONSTRAINT_SLA_ISOLATION_LEVEL = DESCRIPTOR.message_types_by_name['Constraint_SLA_Isolation_level'] +_CONSTRAINT_EXCLUSIONS = DESCRIPTOR.message_types_by_name['Constraint_Exclusions'] +_CONSTRAINT = DESCRIPTOR.message_types_by_name['Constraint'] +_TERAFLOWCONTROLLER = DESCRIPTOR.message_types_by_name['TeraFlowController'] +_AUTHENTICATIONRESULT = DESCRIPTOR.message_types_by_name['AuthenticationResult'] +_OPTICALCONFIGID = DESCRIPTOR.message_types_by_name['OpticalConfigId'] +_OPTICALCONFIG = DESCRIPTOR.message_types_by_name['OpticalConfig'] +_OPTICALCONFIGLIST = DESCRIPTOR.message_types_by_name['OpticalConfigList'] +_OPTICALLINKID = DESCRIPTOR.message_types_by_name['OpticalLinkId'] +_FIBERID = DESCRIPTOR.message_types_by_name['FiberId'] +_FIBER = DESCRIPTOR.message_types_by_name['Fiber'] +_OPTICALLINKDETAILS = DESCRIPTOR.message_types_by_name['OpticalLinkDetails'] +_OPTICALLINK = DESCRIPTOR.message_types_by_name['OpticalLink'] +Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), { + 'DESCRIPTOR' : _EMPTY, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Empty) + }) +_sym_db.RegisterMessage(Empty) + +Uuid = _reflection.GeneratedProtocolMessageType('Uuid', (_message.Message,), { + 'DESCRIPTOR' : _UUID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Uuid) + }) +_sym_db.RegisterMessage(Uuid) + +Timestamp = _reflection.GeneratedProtocolMessageType('Timestamp', (_message.Message,), { + 'DESCRIPTOR' : _TIMESTAMP, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Timestamp) + }) +_sym_db.RegisterMessage(Timestamp) + +Event = _reflection.GeneratedProtocolMessageType('Event', (_message.Message,), { + 'DESCRIPTOR' : _EVENT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Event) + }) +_sym_db.RegisterMessage(Event) + +ContextId = _reflection.GeneratedProtocolMessageType('ContextId', (_message.Message,), { + 'DESCRIPTOR' : _CONTEXTID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ContextId) + }) +_sym_db.RegisterMessage(ContextId) + +Context = _reflection.GeneratedProtocolMessageType('Context', (_message.Message,), { + 'DESCRIPTOR' : _CONTEXT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Context) + }) +_sym_db.RegisterMessage(Context) + +ContextIdList = _reflection.GeneratedProtocolMessageType('ContextIdList', (_message.Message,), { + 'DESCRIPTOR' : _CONTEXTIDLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ContextIdList) + }) +_sym_db.RegisterMessage(ContextIdList) + +ContextList = _reflection.GeneratedProtocolMessageType('ContextList', (_message.Message,), { + 'DESCRIPTOR' : _CONTEXTLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ContextList) + }) +_sym_db.RegisterMessage(ContextList) + +ContextEvent = _reflection.GeneratedProtocolMessageType('ContextEvent', (_message.Message,), { + 'DESCRIPTOR' : _CONTEXTEVENT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ContextEvent) + }) +_sym_db.RegisterMessage(ContextEvent) + +TopologyId = _reflection.GeneratedProtocolMessageType('TopologyId', (_message.Message,), { + 'DESCRIPTOR' : _TOPOLOGYID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.TopologyId) + }) +_sym_db.RegisterMessage(TopologyId) + +Topology = _reflection.GeneratedProtocolMessageType('Topology', (_message.Message,), { + 'DESCRIPTOR' : _TOPOLOGY, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Topology) + }) +_sym_db.RegisterMessage(Topology) + +TopologyDetails = _reflection.GeneratedProtocolMessageType('TopologyDetails', (_message.Message,), { + 'DESCRIPTOR' : _TOPOLOGYDETAILS, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.TopologyDetails) + }) +_sym_db.RegisterMessage(TopologyDetails) + +TopologyIdList = _reflection.GeneratedProtocolMessageType('TopologyIdList', (_message.Message,), { + 'DESCRIPTOR' : _TOPOLOGYIDLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.TopologyIdList) + }) +_sym_db.RegisterMessage(TopologyIdList) + +TopologyList = _reflection.GeneratedProtocolMessageType('TopologyList', (_message.Message,), { + 'DESCRIPTOR' : _TOPOLOGYLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.TopologyList) + }) +_sym_db.RegisterMessage(TopologyList) + +TopologyEvent = _reflection.GeneratedProtocolMessageType('TopologyEvent', (_message.Message,), { + 'DESCRIPTOR' : _TOPOLOGYEVENT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.TopologyEvent) + }) +_sym_db.RegisterMessage(TopologyEvent) + +DeviceId = _reflection.GeneratedProtocolMessageType('DeviceId', (_message.Message,), { + 'DESCRIPTOR' : _DEVICEID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.DeviceId) + }) +_sym_db.RegisterMessage(DeviceId) + +Device = _reflection.GeneratedProtocolMessageType('Device', (_message.Message,), { + 'DESCRIPTOR' : _DEVICE, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Device) + }) +_sym_db.RegisterMessage(Device) + +Component = _reflection.GeneratedProtocolMessageType('Component', (_message.Message,), { + + 'AttributesEntry' : _reflection.GeneratedProtocolMessageType('AttributesEntry', (_message.Message,), { + 'DESCRIPTOR' : _COMPONENT_ATTRIBUTESENTRY, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Component.AttributesEntry) + }) + , + 'DESCRIPTOR' : _COMPONENT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Component) + }) +_sym_db.RegisterMessage(Component) +_sym_db.RegisterMessage(Component.AttributesEntry) + +DeviceConfig = _reflection.GeneratedProtocolMessageType('DeviceConfig', (_message.Message,), { + 'DESCRIPTOR' : _DEVICECONFIG, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.DeviceConfig) + }) +_sym_db.RegisterMessage(DeviceConfig) + +DeviceIdList = _reflection.GeneratedProtocolMessageType('DeviceIdList', (_message.Message,), { + 'DESCRIPTOR' : _DEVICEIDLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.DeviceIdList) + }) +_sym_db.RegisterMessage(DeviceIdList) + +DeviceList = _reflection.GeneratedProtocolMessageType('DeviceList', (_message.Message,), { + 'DESCRIPTOR' : _DEVICELIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.DeviceList) + }) +_sym_db.RegisterMessage(DeviceList) + +DeviceFilter = _reflection.GeneratedProtocolMessageType('DeviceFilter', (_message.Message,), { + 'DESCRIPTOR' : _DEVICEFILTER, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.DeviceFilter) + }) +_sym_db.RegisterMessage(DeviceFilter) + +DeviceEvent = _reflection.GeneratedProtocolMessageType('DeviceEvent', (_message.Message,), { + 'DESCRIPTOR' : _DEVICEEVENT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.DeviceEvent) + }) +_sym_db.RegisterMessage(DeviceEvent) + +LinkId = _reflection.GeneratedProtocolMessageType('LinkId', (_message.Message,), { + 'DESCRIPTOR' : _LINKID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.LinkId) + }) +_sym_db.RegisterMessage(LinkId) + +LinkAttributes = _reflection.GeneratedProtocolMessageType('LinkAttributes', (_message.Message,), { + 'DESCRIPTOR' : _LINKATTRIBUTES, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.LinkAttributes) + }) +_sym_db.RegisterMessage(LinkAttributes) + +Link = _reflection.GeneratedProtocolMessageType('Link', (_message.Message,), { + 'DESCRIPTOR' : _LINK, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Link) + }) +_sym_db.RegisterMessage(Link) + +LinkIdList = _reflection.GeneratedProtocolMessageType('LinkIdList', (_message.Message,), { + 'DESCRIPTOR' : _LINKIDLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.LinkIdList) + }) +_sym_db.RegisterMessage(LinkIdList) + +LinkList = _reflection.GeneratedProtocolMessageType('LinkList', (_message.Message,), { + 'DESCRIPTOR' : _LINKLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.LinkList) + }) +_sym_db.RegisterMessage(LinkList) + +LinkEvent = _reflection.GeneratedProtocolMessageType('LinkEvent', (_message.Message,), { + 'DESCRIPTOR' : _LINKEVENT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.LinkEvent) + }) +_sym_db.RegisterMessage(LinkEvent) + +ServiceId = _reflection.GeneratedProtocolMessageType('ServiceId', (_message.Message,), { + 'DESCRIPTOR' : _SERVICEID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ServiceId) + }) +_sym_db.RegisterMessage(ServiceId) + +Service = _reflection.GeneratedProtocolMessageType('Service', (_message.Message,), { + 'DESCRIPTOR' : _SERVICE, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Service) + }) +_sym_db.RegisterMessage(Service) + +ServiceStatus = _reflection.GeneratedProtocolMessageType('ServiceStatus', (_message.Message,), { + 'DESCRIPTOR' : _SERVICESTATUS, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ServiceStatus) + }) +_sym_db.RegisterMessage(ServiceStatus) + +ServiceConfig = _reflection.GeneratedProtocolMessageType('ServiceConfig', (_message.Message,), { + 'DESCRIPTOR' : _SERVICECONFIG, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ServiceConfig) + }) +_sym_db.RegisterMessage(ServiceConfig) + +ServiceIdList = _reflection.GeneratedProtocolMessageType('ServiceIdList', (_message.Message,), { + 'DESCRIPTOR' : _SERVICEIDLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ServiceIdList) + }) +_sym_db.RegisterMessage(ServiceIdList) + +ServiceList = _reflection.GeneratedProtocolMessageType('ServiceList', (_message.Message,), { + 'DESCRIPTOR' : _SERVICELIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ServiceList) + }) +_sym_db.RegisterMessage(ServiceList) + +ServiceFilter = _reflection.GeneratedProtocolMessageType('ServiceFilter', (_message.Message,), { + 'DESCRIPTOR' : _SERVICEFILTER, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ServiceFilter) + }) +_sym_db.RegisterMessage(ServiceFilter) + +ServiceEvent = _reflection.GeneratedProtocolMessageType('ServiceEvent', (_message.Message,), { + 'DESCRIPTOR' : _SERVICEEVENT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ServiceEvent) + }) +_sym_db.RegisterMessage(ServiceEvent) + +SliceId = _reflection.GeneratedProtocolMessageType('SliceId', (_message.Message,), { + 'DESCRIPTOR' : _SLICEID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.SliceId) + }) +_sym_db.RegisterMessage(SliceId) + +Slice = _reflection.GeneratedProtocolMessageType('Slice', (_message.Message,), { + 'DESCRIPTOR' : _SLICE, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Slice) + }) +_sym_db.RegisterMessage(Slice) + +SliceOwner = _reflection.GeneratedProtocolMessageType('SliceOwner', (_message.Message,), { + 'DESCRIPTOR' : _SLICEOWNER, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.SliceOwner) + }) +_sym_db.RegisterMessage(SliceOwner) + +SliceStatus = _reflection.GeneratedProtocolMessageType('SliceStatus', (_message.Message,), { + 'DESCRIPTOR' : _SLICESTATUS, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.SliceStatus) + }) +_sym_db.RegisterMessage(SliceStatus) + +SliceConfig = _reflection.GeneratedProtocolMessageType('SliceConfig', (_message.Message,), { + 'DESCRIPTOR' : _SLICECONFIG, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.SliceConfig) + }) +_sym_db.RegisterMessage(SliceConfig) + +SliceIdList = _reflection.GeneratedProtocolMessageType('SliceIdList', (_message.Message,), { + 'DESCRIPTOR' : _SLICEIDLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.SliceIdList) + }) +_sym_db.RegisterMessage(SliceIdList) + +SliceList = _reflection.GeneratedProtocolMessageType('SliceList', (_message.Message,), { + 'DESCRIPTOR' : _SLICELIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.SliceList) + }) +_sym_db.RegisterMessage(SliceList) + +SliceFilter = _reflection.GeneratedProtocolMessageType('SliceFilter', (_message.Message,), { + 'DESCRIPTOR' : _SLICEFILTER, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.SliceFilter) + }) +_sym_db.RegisterMessage(SliceFilter) + +SliceEvent = _reflection.GeneratedProtocolMessageType('SliceEvent', (_message.Message,), { + 'DESCRIPTOR' : _SLICEEVENT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.SliceEvent) + }) +_sym_db.RegisterMessage(SliceEvent) + +QoSProfileId = _reflection.GeneratedProtocolMessageType('QoSProfileId', (_message.Message,), { + 'DESCRIPTOR' : _QOSPROFILEID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.QoSProfileId) + }) +_sym_db.RegisterMessage(QoSProfileId) + +QoSProfileValueUnitPair = _reflection.GeneratedProtocolMessageType('QoSProfileValueUnitPair', (_message.Message,), { + 'DESCRIPTOR' : _QOSPROFILEVALUEUNITPAIR, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.QoSProfileValueUnitPair) + }) +_sym_db.RegisterMessage(QoSProfileValueUnitPair) + +QoSProfile = _reflection.GeneratedProtocolMessageType('QoSProfile', (_message.Message,), { + 'DESCRIPTOR' : _QOSPROFILE, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.QoSProfile) + }) +_sym_db.RegisterMessage(QoSProfile) + +ConnectionId = _reflection.GeneratedProtocolMessageType('ConnectionId', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConnectionId) + }) +_sym_db.RegisterMessage(ConnectionId) + +ConnectionSettings_L0 = _reflection.GeneratedProtocolMessageType('ConnectionSettings_L0', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONSETTINGS_L0, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConnectionSettings_L0) + }) +_sym_db.RegisterMessage(ConnectionSettings_L0) + +ConnectionSettings_L2 = _reflection.GeneratedProtocolMessageType('ConnectionSettings_L2', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONSETTINGS_L2, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConnectionSettings_L2) + }) +_sym_db.RegisterMessage(ConnectionSettings_L2) + +ConnectionSettings_L3 = _reflection.GeneratedProtocolMessageType('ConnectionSettings_L3', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONSETTINGS_L3, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConnectionSettings_L3) + }) +_sym_db.RegisterMessage(ConnectionSettings_L3) + +ConnectionSettings_L4 = _reflection.GeneratedProtocolMessageType('ConnectionSettings_L4', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONSETTINGS_L4, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConnectionSettings_L4) + }) +_sym_db.RegisterMessage(ConnectionSettings_L4) + +ConnectionSettings = _reflection.GeneratedProtocolMessageType('ConnectionSettings', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONSETTINGS, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConnectionSettings) + }) +_sym_db.RegisterMessage(ConnectionSettings) + +Connection = _reflection.GeneratedProtocolMessageType('Connection', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTION, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Connection) + }) +_sym_db.RegisterMessage(Connection) + +ConnectionIdList = _reflection.GeneratedProtocolMessageType('ConnectionIdList', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONIDLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConnectionIdList) + }) +_sym_db.RegisterMessage(ConnectionIdList) + +ConnectionList = _reflection.GeneratedProtocolMessageType('ConnectionList', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConnectionList) + }) +_sym_db.RegisterMessage(ConnectionList) + +ConnectionEvent = _reflection.GeneratedProtocolMessageType('ConnectionEvent', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONEVENT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConnectionEvent) + }) +_sym_db.RegisterMessage(ConnectionEvent) + +EndPointId = _reflection.GeneratedProtocolMessageType('EndPointId', (_message.Message,), { + 'DESCRIPTOR' : _ENDPOINTID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.EndPointId) + }) +_sym_db.RegisterMessage(EndPointId) + +EndPoint = _reflection.GeneratedProtocolMessageType('EndPoint', (_message.Message,), { + 'DESCRIPTOR' : _ENDPOINT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.EndPoint) + }) +_sym_db.RegisterMessage(EndPoint) + +EndPointName = _reflection.GeneratedProtocolMessageType('EndPointName', (_message.Message,), { + 'DESCRIPTOR' : _ENDPOINTNAME, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.EndPointName) + }) +_sym_db.RegisterMessage(EndPointName) + +EndPointIdList = _reflection.GeneratedProtocolMessageType('EndPointIdList', (_message.Message,), { + 'DESCRIPTOR' : _ENDPOINTIDLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.EndPointIdList) + }) +_sym_db.RegisterMessage(EndPointIdList) + +EndPointNameList = _reflection.GeneratedProtocolMessageType('EndPointNameList', (_message.Message,), { + 'DESCRIPTOR' : _ENDPOINTNAMELIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.EndPointNameList) + }) +_sym_db.RegisterMessage(EndPointNameList) + +ConfigRule_Custom = _reflection.GeneratedProtocolMessageType('ConfigRule_Custom', (_message.Message,), { + 'DESCRIPTOR' : _CONFIGRULE_CUSTOM, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConfigRule_Custom) + }) +_sym_db.RegisterMessage(ConfigRule_Custom) + +ConfigRule_ACL = _reflection.GeneratedProtocolMessageType('ConfigRule_ACL', (_message.Message,), { + 'DESCRIPTOR' : _CONFIGRULE_ACL, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConfigRule_ACL) + }) +_sym_db.RegisterMessage(ConfigRule_ACL) + +ConfigRule = _reflection.GeneratedProtocolMessageType('ConfigRule', (_message.Message,), { + 'DESCRIPTOR' : _CONFIGRULE, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.ConfigRule) + }) +_sym_db.RegisterMessage(ConfigRule) + +Constraint_Custom = _reflection.GeneratedProtocolMessageType('Constraint_Custom', (_message.Message,), { + 'DESCRIPTOR' : _CONSTRAINT_CUSTOM, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Constraint_Custom) + }) +_sym_db.RegisterMessage(Constraint_Custom) + +Constraint_Schedule = _reflection.GeneratedProtocolMessageType('Constraint_Schedule', (_message.Message,), { + 'DESCRIPTOR' : _CONSTRAINT_SCHEDULE, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Constraint_Schedule) + }) +_sym_db.RegisterMessage(Constraint_Schedule) + +GPS_Position = _reflection.GeneratedProtocolMessageType('GPS_Position', (_message.Message,), { + 'DESCRIPTOR' : _GPS_POSITION, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.GPS_Position) + }) +_sym_db.RegisterMessage(GPS_Position) + +Location = _reflection.GeneratedProtocolMessageType('Location', (_message.Message,), { + 'DESCRIPTOR' : _LOCATION, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Location) + }) +_sym_db.RegisterMessage(Location) + +Constraint_EndPointLocation = _reflection.GeneratedProtocolMessageType('Constraint_EndPointLocation', (_message.Message,), { + 'DESCRIPTOR' : _CONSTRAINT_ENDPOINTLOCATION, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Constraint_EndPointLocation) + }) +_sym_db.RegisterMessage(Constraint_EndPointLocation) + +Constraint_EndPointPriority = _reflection.GeneratedProtocolMessageType('Constraint_EndPointPriority', (_message.Message,), { + 'DESCRIPTOR' : _CONSTRAINT_ENDPOINTPRIORITY, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Constraint_EndPointPriority) + }) +_sym_db.RegisterMessage(Constraint_EndPointPriority) + +Constraint_SLA_Latency = _reflection.GeneratedProtocolMessageType('Constraint_SLA_Latency', (_message.Message,), { + 'DESCRIPTOR' : _CONSTRAINT_SLA_LATENCY, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Constraint_SLA_Latency) + }) +_sym_db.RegisterMessage(Constraint_SLA_Latency) + +Constraint_SLA_Capacity = _reflection.GeneratedProtocolMessageType('Constraint_SLA_Capacity', (_message.Message,), { + 'DESCRIPTOR' : _CONSTRAINT_SLA_CAPACITY, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Constraint_SLA_Capacity) + }) +_sym_db.RegisterMessage(Constraint_SLA_Capacity) + +Constraint_SLA_Availability = _reflection.GeneratedProtocolMessageType('Constraint_SLA_Availability', (_message.Message,), { + 'DESCRIPTOR' : _CONSTRAINT_SLA_AVAILABILITY, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Constraint_SLA_Availability) + }) +_sym_db.RegisterMessage(Constraint_SLA_Availability) + +Constraint_SLA_Isolation_level = _reflection.GeneratedProtocolMessageType('Constraint_SLA_Isolation_level', (_message.Message,), { + 'DESCRIPTOR' : _CONSTRAINT_SLA_ISOLATION_LEVEL, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Constraint_SLA_Isolation_level) + }) +_sym_db.RegisterMessage(Constraint_SLA_Isolation_level) + +Constraint_Exclusions = _reflection.GeneratedProtocolMessageType('Constraint_Exclusions', (_message.Message,), { + 'DESCRIPTOR' : _CONSTRAINT_EXCLUSIONS, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Constraint_Exclusions) + }) +_sym_db.RegisterMessage(Constraint_Exclusions) + +Constraint = _reflection.GeneratedProtocolMessageType('Constraint', (_message.Message,), { + 'DESCRIPTOR' : _CONSTRAINT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Constraint) + }) +_sym_db.RegisterMessage(Constraint) + +TeraFlowController = _reflection.GeneratedProtocolMessageType('TeraFlowController', (_message.Message,), { + 'DESCRIPTOR' : _TERAFLOWCONTROLLER, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.TeraFlowController) + }) +_sym_db.RegisterMessage(TeraFlowController) + +AuthenticationResult = _reflection.GeneratedProtocolMessageType('AuthenticationResult', (_message.Message,), { + 'DESCRIPTOR' : _AUTHENTICATIONRESULT, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.AuthenticationResult) + }) +_sym_db.RegisterMessage(AuthenticationResult) + +OpticalConfigId = _reflection.GeneratedProtocolMessageType('OpticalConfigId', (_message.Message,), { + 'DESCRIPTOR' : _OPTICALCONFIGID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.OpticalConfigId) + }) +_sym_db.RegisterMessage(OpticalConfigId) + +OpticalConfig = _reflection.GeneratedProtocolMessageType('OpticalConfig', (_message.Message,), { + 'DESCRIPTOR' : _OPTICALCONFIG, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.OpticalConfig) + }) +_sym_db.RegisterMessage(OpticalConfig) + +OpticalConfigList = _reflection.GeneratedProtocolMessageType('OpticalConfigList', (_message.Message,), { + 'DESCRIPTOR' : _OPTICALCONFIGLIST, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.OpticalConfigList) + }) +_sym_db.RegisterMessage(OpticalConfigList) + +OpticalLinkId = _reflection.GeneratedProtocolMessageType('OpticalLinkId', (_message.Message,), { + 'DESCRIPTOR' : _OPTICALLINKID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.OpticalLinkId) + }) +_sym_db.RegisterMessage(OpticalLinkId) + +FiberId = _reflection.GeneratedProtocolMessageType('FiberId', (_message.Message,), { + 'DESCRIPTOR' : _FIBERID, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.FiberId) + }) +_sym_db.RegisterMessage(FiberId) + +Fiber = _reflection.GeneratedProtocolMessageType('Fiber', (_message.Message,), { + 'DESCRIPTOR' : _FIBER, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.Fiber) + }) +_sym_db.RegisterMessage(Fiber) + +OpticalLinkDetails = _reflection.GeneratedProtocolMessageType('OpticalLinkDetails', (_message.Message,), { + 'DESCRIPTOR' : _OPTICALLINKDETAILS, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.OpticalLinkDetails) + }) +_sym_db.RegisterMessage(OpticalLinkDetails) + +OpticalLink = _reflection.GeneratedProtocolMessageType('OpticalLink', (_message.Message,), { + 'DESCRIPTOR' : _OPTICALLINK, + '__module__' : 'context_pb2' + # @@protoc_insertion_point(class_scope:context.OpticalLink) + }) +_sym_db.RegisterMessage(OpticalLink) + +_CONTEXTSERVICE = DESCRIPTOR.services_by_name['ContextService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _COMPONENT_ATTRIBUTESENTRY._options = None + _COMPONENT_ATTRIBUTESENTRY._serialized_options = b'8\001' + _EVENTTYPEENUM._serialized_start=10202 + _EVENTTYPEENUM._serialized_end=10308 + _DEVICEDRIVERENUM._serialized_start=10311 + _DEVICEDRIVERENUM._serialized_end=10671 + _DEVICEOPERATIONALSTATUSENUM._serialized_start=10674 + _DEVICEOPERATIONALSTATUSENUM._serialized_end=10817 + _SERVICETYPEENUM._serialized_start=10820 + _SERVICETYPEENUM._serialized_end=11028 + _SERVICESTATUSENUM._serialized_start=11031 + _SERVICESTATUSENUM._serialized_end=11227 + _SLICESTATUSENUM._serialized_start=11230 + _SLICESTATUSENUM._serialized_end=11399 + _CONFIGACTIONENUM._serialized_start=11401 + _CONFIGACTIONENUM._serialized_end=11494 + _CONSTRAINTACTIONENUM._serialized_start=11496 + _CONSTRAINTACTIONENUM._serialized_end=11605 + _ISOLATIONLEVELENUM._serialized_start=11608 + _ISOLATIONLEVELENUM._serialized_end=11867 + _EMPTY._serialized_start=61 + _EMPTY._serialized_end=68 + _UUID._serialized_start=70 + _UUID._serialized_end=90 + _TIMESTAMP._serialized_start=92 + _TIMESTAMP._serialized_end=122 + _EVENT._serialized_start=124 + _EVENT._serialized_end=214 + _CONTEXTID._serialized_start=216 + _CONTEXTID._serialized_end=264 + _CONTEXT._serialized_start=267 + _CONTEXT._serialized_end=500 + _CONTEXTIDLIST._serialized_start=502 + _CONTEXTIDLIST._serialized_end=558 + _CONTEXTLIST._serialized_start=560 + _CONTEXTLIST._serialized_end=609 + _CONTEXTEVENT._serialized_start=611 + _CONTEXTEVENT._serialized_end=696 + _TOPOLOGYID._serialized_start=698 + _TOPOLOGYID._serialized_end=788 + _TOPOLOGY._serialized_start=791 + _TOPOLOGY._serialized_end=931 + _TOPOLOGYDETAILS._serialized_start=934 + _TOPOLOGYDETAILS._serialized_end=1071 + _TOPOLOGYIDLIST._serialized_start=1073 + _TOPOLOGYIDLIST._serialized_end=1132 + _TOPOLOGYLIST._serialized_start=1134 + _TOPOLOGYLIST._serialized_end=1187 + _TOPOLOGYEVENT._serialized_start=1189 + _TOPOLOGYEVENT._serialized_end=1277 + _DEVICEID._serialized_start=1279 + _DEVICEID._serialized_end=1325 + _DEVICE._serialized_start=1328 + _DEVICE._serialized_end=1706 + _COMPONENT._serialized_start=1709 + _COMPONENT._serialized_end=1910 + _COMPONENT_ATTRIBUTESENTRY._serialized_start=1861 + _COMPONENT_ATTRIBUTESENTRY._serialized_end=1910 + _DEVICECONFIG._serialized_start=1912 + _DEVICECONFIG._serialized_end=1969 + _DEVICEIDLIST._serialized_start=1971 + _DEVICEIDLIST._serialized_end=2024 + _DEVICELIST._serialized_start=2026 + _DEVICELIST._serialized_end=2072 + _DEVICEFILTER._serialized_start=2075 + _DEVICEFILTER._serialized_end=2217 + _DEVICEEVENT._serialized_start=2220 + _DEVICEEVENT._serialized_end=2348 + _LINKID._serialized_start=2350 + _LINKID._serialized_end=2392 + _LINKATTRIBUTES._serialized_start=2394 + _LINKATTRIBUTES._serialized_end=2467 + _LINK._serialized_start=2470 + _LINK._serialized_end=2617 + _LINKIDLIST._serialized_start=2619 + _LINKIDLIST._serialized_end=2666 + _LINKLIST._serialized_start=2668 + _LINKLIST._serialized_end=2708 + _LINKEVENT._serialized_start=2710 + _LINKEVENT._serialized_end=2786 + _SERVICEID._serialized_start=2788 + _SERVICEID._serialized_end=2876 + _SERVICE._serialized_start=2879 + _SERVICE._serialized_end=3226 + _SERVICESTATUS._serialized_start=3228 + _SERVICESTATUS._serialized_end=3295 + _SERVICECONFIG._serialized_start=3297 + _SERVICECONFIG._serialized_end=3355 + _SERVICEIDLIST._serialized_start=3357 + _SERVICEIDLIST._serialized_end=3413 + _SERVICELIST._serialized_start=3415 + _SERVICELIST._serialized_end=3464 + _SERVICEFILTER._serialized_start=3467 + _SERVICEFILTER._serialized_end=3616 + _SERVICEEVENT._serialized_start=3618 + _SERVICEEVENT._serialized_end=3703 + _SLICEID._serialized_start=3705 + _SLICEID._serialized_end=3789 + _SLICE._serialized_start=3792 + _SLICE._serialized_end=4208 + _SLICEOWNER._serialized_start=4210 + _SLICEOWNER._serialized_end=4279 + _SLICESTATUS._serialized_start=4281 + _SLICESTATUS._serialized_end=4342 + _SLICECONFIG._serialized_start=4344 + _SLICECONFIG._serialized_end=4400 + _SLICEIDLIST._serialized_start=4402 + _SLICEIDLIST._serialized_end=4452 + _SLICELIST._serialized_start=4454 + _SLICELIST._serialized_end=4497 + _SLICEFILTER._serialized_start=4500 + _SLICEFILTER._serialized_end=4702 + _SLICEEVENT._serialized_start=4704 + _SLICEEVENT._serialized_end=4783 + _QOSPROFILEID._serialized_start=4785 + _QOSPROFILEID._serialized_end=4838 + _QOSPROFILEVALUEUNITPAIR._serialized_start=4840 + _QOSPROFILEVALUEUNITPAIR._serialized_end=4894 + _QOSPROFILE._serialized_start=4897 + _QOSPROFILE._serialized_end=5657 + _CONNECTIONID._serialized_start=5659 + _CONNECTIONID._serialized_end=5713 + _CONNECTIONSETTINGS_L0._serialized_start=5715 + _CONNECTIONSETTINGS_L0._serialized_end=5765 + _CONNECTIONSETTINGS_L2._serialized_start=5768 + _CONNECTIONSETTINGS_L2._serialized_end=5926 + _CONNECTIONSETTINGS_L3._serialized_start=5928 + _CONNECTIONSETTINGS_L3._serialized_end=6044 + _CONNECTIONSETTINGS_L4._serialized_start=6046 + _CONNECTIONSETTINGS_L4._serialized_end=6137 + _CONNECTIONSETTINGS._serialized_start=6140 + _CONNECTIONSETTINGS._serialized_end=6336 + _CONNECTION._serialized_start=6339 + _CONNECTION._serialized_end=6582 + _CONNECTIONIDLIST._serialized_start=6584 + _CONNECTIONIDLIST._serialized_end=6649 + _CONNECTIONLIST._serialized_start=6651 + _CONNECTIONLIST._serialized_end=6709 + _CONNECTIONEVENT._serialized_start=6711 + _CONNECTIONEVENT._serialized_end=6805 + _ENDPOINTID._serialized_start=6808 + _ENDPOINTID._serialized_end=6938 + _ENDPOINT._serialized_start=6941 + _ENDPOINT._serialized_end=7135 + _ENDPOINTNAME._serialized_start=7137 + _ENDPOINTNAME._serialized_end=7260 + _ENDPOINTIDLIST._serialized_start=7262 + _ENDPOINTIDLIST._serialized_end=7321 + _ENDPOINTNAMELIST._serialized_start=7323 + _ENDPOINTNAMELIST._serialized_end=7388 + _CONFIGRULE_CUSTOM._serialized_start=7390 + _CONFIGRULE_CUSTOM._serialized_end=7455 + _CONFIGRULE_ACL._serialized_start=7457 + _CONFIGRULE_ACL._serialized_end=7550 + _CONFIGRULE._serialized_start=7553 + _CONFIGRULE._serialized_end=7709 + _CONSTRAINT_CUSTOM._serialized_start=7711 + _CONSTRAINT_CUSTOM._serialized_end=7781 + _CONSTRAINT_SCHEDULE._serialized_start=7783 + _CONSTRAINT_SCHEDULE._serialized_end=7852 + _GPS_POSITION._serialized_start=7854 + _GPS_POSITION._serialized_end=7905 + _LOCATION._serialized_start=7907 + _LOCATION._serialized_end=7994 + _CONSTRAINT_ENDPOINTLOCATION._serialized_start=7996 + _CONSTRAINT_ENDPOINTLOCATION._serialized_end=8104 + _CONSTRAINT_ENDPOINTPRIORITY._serialized_start=8106 + _CONSTRAINT_ENDPOINTPRIORITY._serialized_end=8195 + _CONSTRAINT_SLA_LATENCY._serialized_start=8197 + _CONSTRAINT_SLA_LATENCY._serialized_end=8245 + _CONSTRAINT_SLA_CAPACITY._serialized_start=8247 + _CONSTRAINT_SLA_CAPACITY._serialized_end=8295 + _CONSTRAINT_SLA_AVAILABILITY._serialized_start=8297 + _CONSTRAINT_SLA_AVAILABILITY._serialized_end=8396 + _CONSTRAINT_SLA_ISOLATION_LEVEL._serialized_start=8398 + _CONSTRAINT_SLA_ISOLATION_LEVEL._serialized_end=8484 + _CONSTRAINT_EXCLUSIONS._serialized_start=8487 + _CONSTRAINT_EXCLUSIONS._serialized_end=8649 + _CONSTRAINT._serialized_start=8652 + _CONSTRAINT._serialized_end=9255 + _TERAFLOWCONTROLLER._serialized_start=9257 + _TERAFLOWCONTROLLER._serialized_end=9351 + _AUTHENTICATIONRESULT._serialized_start=9353 + _AUTHENTICATIONRESULT._serialized_end=9438 + _OPTICALCONFIGID._serialized_start=9440 + _OPTICALCONFIGID._serialized_end=9485 + _OPTICALCONFIG._serialized_start=9487 + _OPTICALCONFIG._serialized_end=9570 + _OPTICALCONFIGLIST._serialized_start=9572 + _OPTICALCONFIGLIST._serialized_end=9639 + _OPTICALLINKID._serialized_start=9641 + _OPTICALLINKID._serialized_end=9698 + _FIBERID._serialized_start=9700 + _FIBERID._serialized_end=9744 + _FIBER._serialized_start=9747 + _FIBER._serialized_end=9972 + _OPTICALLINKDETAILS._serialized_start=9974 + _OPTICALLINKDETAILS._serialized_end=10074 + _OPTICALLINK._serialized_start=10076 + _OPTICALLINK._serialized_end=10200 + _CONTEXTSERVICE._serialized_start=11870 + _CONTEXTSERVICE._serialized_end=15419 +# @@protoc_insertion_point(module_scope) diff --git a/proto/context_pb2_grpc.py b/proto/context_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..3d49aa14f9c04df175afec629bab59056b8ba6c8 --- /dev/null +++ b/proto/context_pb2_grpc.py @@ -0,0 +1,2014 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 + + +class ContextServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListContextIds = channel.unary_unary( + '/context.ContextService/ListContextIds', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.ContextIdList.FromString, + ) + self.ListContexts = channel.unary_unary( + '/context.ContextService/ListContexts', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.ContextList.FromString, + ) + self.GetContext = channel.unary_unary( + '/context.ContextService/GetContext', + request_serializer=context__pb2.ContextId.SerializeToString, + response_deserializer=context__pb2.Context.FromString, + ) + self.SetContext = channel.unary_unary( + '/context.ContextService/SetContext', + request_serializer=context__pb2.Context.SerializeToString, + response_deserializer=context__pb2.ContextId.FromString, + ) + self.RemoveContext = channel.unary_unary( + '/context.ContextService/RemoveContext', + request_serializer=context__pb2.ContextId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetContextEvents = channel.unary_stream( + '/context.ContextService/GetContextEvents', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.ContextEvent.FromString, + ) + self.ListTopologyIds = channel.unary_unary( + '/context.ContextService/ListTopologyIds', + request_serializer=context__pb2.ContextId.SerializeToString, + response_deserializer=context__pb2.TopologyIdList.FromString, + ) + self.ListTopologies = channel.unary_unary( + '/context.ContextService/ListTopologies', + request_serializer=context__pb2.ContextId.SerializeToString, + response_deserializer=context__pb2.TopologyList.FromString, + ) + self.GetTopology = channel.unary_unary( + '/context.ContextService/GetTopology', + request_serializer=context__pb2.TopologyId.SerializeToString, + response_deserializer=context__pb2.Topology.FromString, + ) + self.GetTopologyDetails = channel.unary_unary( + '/context.ContextService/GetTopologyDetails', + request_serializer=context__pb2.TopologyId.SerializeToString, + response_deserializer=context__pb2.TopologyDetails.FromString, + ) + self.SetTopology = channel.unary_unary( + '/context.ContextService/SetTopology', + request_serializer=context__pb2.Topology.SerializeToString, + response_deserializer=context__pb2.TopologyId.FromString, + ) + self.RemoveTopology = channel.unary_unary( + '/context.ContextService/RemoveTopology', + request_serializer=context__pb2.TopologyId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetTopologyEvents = channel.unary_stream( + '/context.ContextService/GetTopologyEvents', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.TopologyEvent.FromString, + ) + self.ListDeviceIds = channel.unary_unary( + '/context.ContextService/ListDeviceIds', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.DeviceIdList.FromString, + ) + self.ListDevices = channel.unary_unary( + '/context.ContextService/ListDevices', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.DeviceList.FromString, + ) + self.GetDevice = channel.unary_unary( + '/context.ContextService/GetDevice', + request_serializer=context__pb2.DeviceId.SerializeToString, + response_deserializer=context__pb2.Device.FromString, + ) + self.SetDevice = channel.unary_unary( + '/context.ContextService/SetDevice', + request_serializer=context__pb2.Device.SerializeToString, + response_deserializer=context__pb2.DeviceId.FromString, + ) + self.RemoveDevice = channel.unary_unary( + '/context.ContextService/RemoveDevice', + request_serializer=context__pb2.DeviceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetDeviceEvents = channel.unary_stream( + '/context.ContextService/GetDeviceEvents', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.DeviceEvent.FromString, + ) + self.SelectDevice = channel.unary_unary( + '/context.ContextService/SelectDevice', + request_serializer=context__pb2.DeviceFilter.SerializeToString, + response_deserializer=context__pb2.DeviceList.FromString, + ) + self.ListEndPointNames = channel.unary_unary( + '/context.ContextService/ListEndPointNames', + request_serializer=context__pb2.EndPointIdList.SerializeToString, + response_deserializer=context__pb2.EndPointNameList.FromString, + ) + self.ListLinkIds = channel.unary_unary( + '/context.ContextService/ListLinkIds', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.LinkIdList.FromString, + ) + self.ListLinks = channel.unary_unary( + '/context.ContextService/ListLinks', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.LinkList.FromString, + ) + self.GetLink = channel.unary_unary( + '/context.ContextService/GetLink', + request_serializer=context__pb2.LinkId.SerializeToString, + response_deserializer=context__pb2.Link.FromString, + ) + self.SetLink = channel.unary_unary( + '/context.ContextService/SetLink', + request_serializer=context__pb2.Link.SerializeToString, + response_deserializer=context__pb2.LinkId.FromString, + ) + self.RemoveLink = channel.unary_unary( + '/context.ContextService/RemoveLink', + request_serializer=context__pb2.LinkId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetLinkEvents = channel.unary_stream( + '/context.ContextService/GetLinkEvents', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.LinkEvent.FromString, + ) + self.ListServiceIds = channel.unary_unary( + '/context.ContextService/ListServiceIds', + request_serializer=context__pb2.ContextId.SerializeToString, + response_deserializer=context__pb2.ServiceIdList.FromString, + ) + self.ListServices = channel.unary_unary( + '/context.ContextService/ListServices', + request_serializer=context__pb2.ContextId.SerializeToString, + response_deserializer=context__pb2.ServiceList.FromString, + ) + self.GetService = channel.unary_unary( + '/context.ContextService/GetService', + request_serializer=context__pb2.ServiceId.SerializeToString, + response_deserializer=context__pb2.Service.FromString, + ) + self.SetService = channel.unary_unary( + '/context.ContextService/SetService', + request_serializer=context__pb2.Service.SerializeToString, + response_deserializer=context__pb2.ServiceId.FromString, + ) + self.UnsetService = channel.unary_unary( + '/context.ContextService/UnsetService', + request_serializer=context__pb2.Service.SerializeToString, + response_deserializer=context__pb2.ServiceId.FromString, + ) + self.RemoveService = channel.unary_unary( + '/context.ContextService/RemoveService', + request_serializer=context__pb2.ServiceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetServiceEvents = channel.unary_stream( + '/context.ContextService/GetServiceEvents', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.ServiceEvent.FromString, + ) + self.SelectService = channel.unary_unary( + '/context.ContextService/SelectService', + request_serializer=context__pb2.ServiceFilter.SerializeToString, + response_deserializer=context__pb2.ServiceList.FromString, + ) + self.ListSliceIds = channel.unary_unary( + '/context.ContextService/ListSliceIds', + request_serializer=context__pb2.ContextId.SerializeToString, + response_deserializer=context__pb2.SliceIdList.FromString, + ) + self.ListSlices = channel.unary_unary( + '/context.ContextService/ListSlices', + request_serializer=context__pb2.ContextId.SerializeToString, + response_deserializer=context__pb2.SliceList.FromString, + ) + self.GetSlice = channel.unary_unary( + '/context.ContextService/GetSlice', + request_serializer=context__pb2.SliceId.SerializeToString, + response_deserializer=context__pb2.Slice.FromString, + ) + self.SetSlice = channel.unary_unary( + '/context.ContextService/SetSlice', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.SliceId.FromString, + ) + self.UnsetSlice = channel.unary_unary( + '/context.ContextService/UnsetSlice', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.SliceId.FromString, + ) + self.RemoveSlice = channel.unary_unary( + '/context.ContextService/RemoveSlice', + request_serializer=context__pb2.SliceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetSliceEvents = channel.unary_stream( + '/context.ContextService/GetSliceEvents', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.SliceEvent.FromString, + ) + self.SelectSlice = channel.unary_unary( + '/context.ContextService/SelectSlice', + request_serializer=context__pb2.SliceFilter.SerializeToString, + response_deserializer=context__pb2.SliceList.FromString, + ) + self.CreateQoSProfile = channel.unary_unary( + '/context.ContextService/CreateQoSProfile', + request_serializer=context__pb2.QoSProfile.SerializeToString, + response_deserializer=context__pb2.QoSProfile.FromString, + ) + self.UpdateQoSProfile = channel.unary_unary( + '/context.ContextService/UpdateQoSProfile', + request_serializer=context__pb2.QoSProfile.SerializeToString, + response_deserializer=context__pb2.QoSProfile.FromString, + ) + self.DeleteQoSProfile = channel.unary_unary( + '/context.ContextService/DeleteQoSProfile', + request_serializer=context__pb2.QoSProfileId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetQoSProfile = channel.unary_unary( + '/context.ContextService/GetQoSProfile', + request_serializer=context__pb2.QoSProfileId.SerializeToString, + response_deserializer=context__pb2.QoSProfile.FromString, + ) + self.GetQoSProfiles = channel.unary_stream( + '/context.ContextService/GetQoSProfiles', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.QoSProfile.FromString, + ) + self.ListConnectionIds = channel.unary_unary( + '/context.ContextService/ListConnectionIds', + request_serializer=context__pb2.ServiceId.SerializeToString, + response_deserializer=context__pb2.ConnectionIdList.FromString, + ) + self.ListConnections = channel.unary_unary( + '/context.ContextService/ListConnections', + request_serializer=context__pb2.ServiceId.SerializeToString, + response_deserializer=context__pb2.ConnectionList.FromString, + ) + self.GetConnection = channel.unary_unary( + '/context.ContextService/GetConnection', + request_serializer=context__pb2.ConnectionId.SerializeToString, + response_deserializer=context__pb2.Connection.FromString, + ) + self.SetConnection = channel.unary_unary( + '/context.ContextService/SetConnection', + request_serializer=context__pb2.Connection.SerializeToString, + response_deserializer=context__pb2.ConnectionId.FromString, + ) + self.RemoveConnection = channel.unary_unary( + '/context.ContextService/RemoveConnection', + request_serializer=context__pb2.ConnectionId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetConnectionEvents = channel.unary_stream( + '/context.ContextService/GetConnectionEvents', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.ConnectionEvent.FromString, + ) + self.GetOpticalConfig = channel.unary_unary( + '/context.ContextService/GetOpticalConfig', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.OpticalConfigList.FromString, + ) + self.SetOpticalConfig = channel.unary_unary( + '/context.ContextService/SetOpticalConfig', + request_serializer=context__pb2.OpticalConfig.SerializeToString, + response_deserializer=context__pb2.OpticalConfigId.FromString, + ) + self.SelectOpticalConfig = channel.unary_unary( + '/context.ContextService/SelectOpticalConfig', + request_serializer=context__pb2.OpticalConfigId.SerializeToString, + response_deserializer=context__pb2.OpticalConfig.FromString, + ) + self.SetOpticalLink = channel.unary_unary( + '/context.ContextService/SetOpticalLink', + request_serializer=context__pb2.OpticalLink.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetOpticalLink = channel.unary_unary( + '/context.ContextService/GetOpticalLink', + request_serializer=context__pb2.OpticalLinkId.SerializeToString, + response_deserializer=context__pb2.OpticalLink.FromString, + ) + self.GetFiber = channel.unary_unary( + '/context.ContextService/GetFiber', + request_serializer=context__pb2.FiberId.SerializeToString, + response_deserializer=context__pb2.Fiber.FromString, + ) + + +class ContextServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ListContextIds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListContexts(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetContext(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetContext(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveContext(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetContextEvents(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListTopologyIds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListTopologies(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetTopology(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetTopologyDetails(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetTopology(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveTopology(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetTopologyEvents(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListDeviceIds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListDevices(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetDeviceEvents(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SelectDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListEndPointNames(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListLinkIds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListLinks(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetLink(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetLink(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveLink(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetLinkEvents(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListServiceIds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListServices(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UnsetService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetServiceEvents(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SelectService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListSliceIds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListSlices(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UnsetSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetSliceEvents(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SelectSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateQoSProfile(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateQoSProfile(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteQoSProfile(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetQoSProfile(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetQoSProfiles(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListConnectionIds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListConnections(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetConnection(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetConnection(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemoveConnection(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetConnectionEvents(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetOpticalConfig(self, request, context): + """------------------------------ Experimental ----------------------------- + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetOpticalConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SelectOpticalConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetOpticalLink(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetOpticalLink(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetFiber(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ContextServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ListContextIds': grpc.unary_unary_rpc_method_handler( + servicer.ListContextIds, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.ContextIdList.SerializeToString, + ), + 'ListContexts': grpc.unary_unary_rpc_method_handler( + servicer.ListContexts, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.ContextList.SerializeToString, + ), + 'GetContext': grpc.unary_unary_rpc_method_handler( + servicer.GetContext, + request_deserializer=context__pb2.ContextId.FromString, + response_serializer=context__pb2.Context.SerializeToString, + ), + 'SetContext': grpc.unary_unary_rpc_method_handler( + servicer.SetContext, + request_deserializer=context__pb2.Context.FromString, + response_serializer=context__pb2.ContextId.SerializeToString, + ), + 'RemoveContext': grpc.unary_unary_rpc_method_handler( + servicer.RemoveContext, + request_deserializer=context__pb2.ContextId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetContextEvents': grpc.unary_stream_rpc_method_handler( + servicer.GetContextEvents, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.ContextEvent.SerializeToString, + ), + 'ListTopologyIds': grpc.unary_unary_rpc_method_handler( + servicer.ListTopologyIds, + request_deserializer=context__pb2.ContextId.FromString, + response_serializer=context__pb2.TopologyIdList.SerializeToString, + ), + 'ListTopologies': grpc.unary_unary_rpc_method_handler( + servicer.ListTopologies, + request_deserializer=context__pb2.ContextId.FromString, + response_serializer=context__pb2.TopologyList.SerializeToString, + ), + 'GetTopology': grpc.unary_unary_rpc_method_handler( + servicer.GetTopology, + request_deserializer=context__pb2.TopologyId.FromString, + response_serializer=context__pb2.Topology.SerializeToString, + ), + 'GetTopologyDetails': grpc.unary_unary_rpc_method_handler( + servicer.GetTopologyDetails, + request_deserializer=context__pb2.TopologyId.FromString, + response_serializer=context__pb2.TopologyDetails.SerializeToString, + ), + 'SetTopology': grpc.unary_unary_rpc_method_handler( + servicer.SetTopology, + request_deserializer=context__pb2.Topology.FromString, + response_serializer=context__pb2.TopologyId.SerializeToString, + ), + 'RemoveTopology': grpc.unary_unary_rpc_method_handler( + servicer.RemoveTopology, + request_deserializer=context__pb2.TopologyId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetTopologyEvents': grpc.unary_stream_rpc_method_handler( + servicer.GetTopologyEvents, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.TopologyEvent.SerializeToString, + ), + 'ListDeviceIds': grpc.unary_unary_rpc_method_handler( + servicer.ListDeviceIds, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.DeviceIdList.SerializeToString, + ), + 'ListDevices': grpc.unary_unary_rpc_method_handler( + servicer.ListDevices, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.DeviceList.SerializeToString, + ), + 'GetDevice': grpc.unary_unary_rpc_method_handler( + servicer.GetDevice, + request_deserializer=context__pb2.DeviceId.FromString, + response_serializer=context__pb2.Device.SerializeToString, + ), + 'SetDevice': grpc.unary_unary_rpc_method_handler( + servicer.SetDevice, + request_deserializer=context__pb2.Device.FromString, + response_serializer=context__pb2.DeviceId.SerializeToString, + ), + 'RemoveDevice': grpc.unary_unary_rpc_method_handler( + servicer.RemoveDevice, + request_deserializer=context__pb2.DeviceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetDeviceEvents': grpc.unary_stream_rpc_method_handler( + servicer.GetDeviceEvents, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.DeviceEvent.SerializeToString, + ), + 'SelectDevice': grpc.unary_unary_rpc_method_handler( + servicer.SelectDevice, + request_deserializer=context__pb2.DeviceFilter.FromString, + response_serializer=context__pb2.DeviceList.SerializeToString, + ), + 'ListEndPointNames': grpc.unary_unary_rpc_method_handler( + servicer.ListEndPointNames, + request_deserializer=context__pb2.EndPointIdList.FromString, + response_serializer=context__pb2.EndPointNameList.SerializeToString, + ), + 'ListLinkIds': grpc.unary_unary_rpc_method_handler( + servicer.ListLinkIds, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.LinkIdList.SerializeToString, + ), + 'ListLinks': grpc.unary_unary_rpc_method_handler( + servicer.ListLinks, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.LinkList.SerializeToString, + ), + 'GetLink': grpc.unary_unary_rpc_method_handler( + servicer.GetLink, + request_deserializer=context__pb2.LinkId.FromString, + response_serializer=context__pb2.Link.SerializeToString, + ), + 'SetLink': grpc.unary_unary_rpc_method_handler( + servicer.SetLink, + request_deserializer=context__pb2.Link.FromString, + response_serializer=context__pb2.LinkId.SerializeToString, + ), + 'RemoveLink': grpc.unary_unary_rpc_method_handler( + servicer.RemoveLink, + request_deserializer=context__pb2.LinkId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetLinkEvents': grpc.unary_stream_rpc_method_handler( + servicer.GetLinkEvents, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.LinkEvent.SerializeToString, + ), + 'ListServiceIds': grpc.unary_unary_rpc_method_handler( + servicer.ListServiceIds, + request_deserializer=context__pb2.ContextId.FromString, + response_serializer=context__pb2.ServiceIdList.SerializeToString, + ), + 'ListServices': grpc.unary_unary_rpc_method_handler( + servicer.ListServices, + request_deserializer=context__pb2.ContextId.FromString, + response_serializer=context__pb2.ServiceList.SerializeToString, + ), + 'GetService': grpc.unary_unary_rpc_method_handler( + servicer.GetService, + request_deserializer=context__pb2.ServiceId.FromString, + response_serializer=context__pb2.Service.SerializeToString, + ), + 'SetService': grpc.unary_unary_rpc_method_handler( + servicer.SetService, + request_deserializer=context__pb2.Service.FromString, + response_serializer=context__pb2.ServiceId.SerializeToString, + ), + 'UnsetService': grpc.unary_unary_rpc_method_handler( + servicer.UnsetService, + request_deserializer=context__pb2.Service.FromString, + response_serializer=context__pb2.ServiceId.SerializeToString, + ), + 'RemoveService': grpc.unary_unary_rpc_method_handler( + servicer.RemoveService, + request_deserializer=context__pb2.ServiceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetServiceEvents': grpc.unary_stream_rpc_method_handler( + servicer.GetServiceEvents, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.ServiceEvent.SerializeToString, + ), + 'SelectService': grpc.unary_unary_rpc_method_handler( + servicer.SelectService, + request_deserializer=context__pb2.ServiceFilter.FromString, + response_serializer=context__pb2.ServiceList.SerializeToString, + ), + 'ListSliceIds': grpc.unary_unary_rpc_method_handler( + servicer.ListSliceIds, + request_deserializer=context__pb2.ContextId.FromString, + response_serializer=context__pb2.SliceIdList.SerializeToString, + ), + 'ListSlices': grpc.unary_unary_rpc_method_handler( + servicer.ListSlices, + request_deserializer=context__pb2.ContextId.FromString, + response_serializer=context__pb2.SliceList.SerializeToString, + ), + 'GetSlice': grpc.unary_unary_rpc_method_handler( + servicer.GetSlice, + request_deserializer=context__pb2.SliceId.FromString, + response_serializer=context__pb2.Slice.SerializeToString, + ), + 'SetSlice': grpc.unary_unary_rpc_method_handler( + servicer.SetSlice, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.SliceId.SerializeToString, + ), + 'UnsetSlice': grpc.unary_unary_rpc_method_handler( + servicer.UnsetSlice, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.SliceId.SerializeToString, + ), + 'RemoveSlice': grpc.unary_unary_rpc_method_handler( + servicer.RemoveSlice, + request_deserializer=context__pb2.SliceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetSliceEvents': grpc.unary_stream_rpc_method_handler( + servicer.GetSliceEvents, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.SliceEvent.SerializeToString, + ), + 'SelectSlice': grpc.unary_unary_rpc_method_handler( + servicer.SelectSlice, + request_deserializer=context__pb2.SliceFilter.FromString, + response_serializer=context__pb2.SliceList.SerializeToString, + ), + 'CreateQoSProfile': grpc.unary_unary_rpc_method_handler( + servicer.CreateQoSProfile, + request_deserializer=context__pb2.QoSProfile.FromString, + response_serializer=context__pb2.QoSProfile.SerializeToString, + ), + 'UpdateQoSProfile': grpc.unary_unary_rpc_method_handler( + servicer.UpdateQoSProfile, + request_deserializer=context__pb2.QoSProfile.FromString, + response_serializer=context__pb2.QoSProfile.SerializeToString, + ), + 'DeleteQoSProfile': grpc.unary_unary_rpc_method_handler( + servicer.DeleteQoSProfile, + request_deserializer=context__pb2.QoSProfileId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetQoSProfile': grpc.unary_unary_rpc_method_handler( + servicer.GetQoSProfile, + request_deserializer=context__pb2.QoSProfileId.FromString, + response_serializer=context__pb2.QoSProfile.SerializeToString, + ), + 'GetQoSProfiles': grpc.unary_stream_rpc_method_handler( + servicer.GetQoSProfiles, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.QoSProfile.SerializeToString, + ), + 'ListConnectionIds': grpc.unary_unary_rpc_method_handler( + servicer.ListConnectionIds, + request_deserializer=context__pb2.ServiceId.FromString, + response_serializer=context__pb2.ConnectionIdList.SerializeToString, + ), + 'ListConnections': grpc.unary_unary_rpc_method_handler( + servicer.ListConnections, + request_deserializer=context__pb2.ServiceId.FromString, + response_serializer=context__pb2.ConnectionList.SerializeToString, + ), + 'GetConnection': grpc.unary_unary_rpc_method_handler( + servicer.GetConnection, + request_deserializer=context__pb2.ConnectionId.FromString, + response_serializer=context__pb2.Connection.SerializeToString, + ), + 'SetConnection': grpc.unary_unary_rpc_method_handler( + servicer.SetConnection, + request_deserializer=context__pb2.Connection.FromString, + response_serializer=context__pb2.ConnectionId.SerializeToString, + ), + 'RemoveConnection': grpc.unary_unary_rpc_method_handler( + servicer.RemoveConnection, + request_deserializer=context__pb2.ConnectionId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetConnectionEvents': grpc.unary_stream_rpc_method_handler( + servicer.GetConnectionEvents, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.ConnectionEvent.SerializeToString, + ), + 'GetOpticalConfig': grpc.unary_unary_rpc_method_handler( + servicer.GetOpticalConfig, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.OpticalConfigList.SerializeToString, + ), + 'SetOpticalConfig': grpc.unary_unary_rpc_method_handler( + servicer.SetOpticalConfig, + request_deserializer=context__pb2.OpticalConfig.FromString, + response_serializer=context__pb2.OpticalConfigId.SerializeToString, + ), + 'SelectOpticalConfig': grpc.unary_unary_rpc_method_handler( + servicer.SelectOpticalConfig, + request_deserializer=context__pb2.OpticalConfigId.FromString, + response_serializer=context__pb2.OpticalConfig.SerializeToString, + ), + 'SetOpticalLink': grpc.unary_unary_rpc_method_handler( + servicer.SetOpticalLink, + request_deserializer=context__pb2.OpticalLink.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetOpticalLink': grpc.unary_unary_rpc_method_handler( + servicer.GetOpticalLink, + request_deserializer=context__pb2.OpticalLinkId.FromString, + response_serializer=context__pb2.OpticalLink.SerializeToString, + ), + 'GetFiber': grpc.unary_unary_rpc_method_handler( + servicer.GetFiber, + request_deserializer=context__pb2.FiberId.FromString, + response_serializer=context__pb2.Fiber.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'context.ContextService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ContextService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ListContextIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListContextIds', + context__pb2.Empty.SerializeToString, + context__pb2.ContextIdList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListContexts(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListContexts', + context__pb2.Empty.SerializeToString, + context__pb2.ContextList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetContext(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetContext', + context__pb2.ContextId.SerializeToString, + context__pb2.Context.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetContext(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SetContext', + context__pb2.Context.SerializeToString, + context__pb2.ContextId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveContext(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/RemoveContext', + context__pb2.ContextId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetContextEvents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/context.ContextService/GetContextEvents', + context__pb2.Empty.SerializeToString, + context__pb2.ContextEvent.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListTopologyIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListTopologyIds', + context__pb2.ContextId.SerializeToString, + context__pb2.TopologyIdList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListTopologies(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListTopologies', + context__pb2.ContextId.SerializeToString, + context__pb2.TopologyList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetTopology(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetTopology', + context__pb2.TopologyId.SerializeToString, + context__pb2.Topology.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetTopologyDetails(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetTopologyDetails', + context__pb2.TopologyId.SerializeToString, + context__pb2.TopologyDetails.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetTopology(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SetTopology', + context__pb2.Topology.SerializeToString, + context__pb2.TopologyId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveTopology(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/RemoveTopology', + context__pb2.TopologyId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetTopologyEvents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/context.ContextService/GetTopologyEvents', + context__pb2.Empty.SerializeToString, + context__pb2.TopologyEvent.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListDeviceIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListDeviceIds', + context__pb2.Empty.SerializeToString, + context__pb2.DeviceIdList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListDevices(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListDevices', + context__pb2.Empty.SerializeToString, + context__pb2.DeviceList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetDevice', + context__pb2.DeviceId.SerializeToString, + context__pb2.Device.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SetDevice', + context__pb2.Device.SerializeToString, + context__pb2.DeviceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/RemoveDevice', + context__pb2.DeviceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDeviceEvents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/context.ContextService/GetDeviceEvents', + context__pb2.Empty.SerializeToString, + context__pb2.DeviceEvent.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SelectDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SelectDevice', + context__pb2.DeviceFilter.SerializeToString, + context__pb2.DeviceList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListEndPointNames(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListEndPointNames', + context__pb2.EndPointIdList.SerializeToString, + context__pb2.EndPointNameList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListLinkIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListLinkIds', + context__pb2.Empty.SerializeToString, + context__pb2.LinkIdList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListLinks(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListLinks', + context__pb2.Empty.SerializeToString, + context__pb2.LinkList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetLink(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetLink', + context__pb2.LinkId.SerializeToString, + context__pb2.Link.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetLink(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SetLink', + context__pb2.Link.SerializeToString, + context__pb2.LinkId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveLink(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/RemoveLink', + context__pb2.LinkId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetLinkEvents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/context.ContextService/GetLinkEvents', + context__pb2.Empty.SerializeToString, + context__pb2.LinkEvent.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListServiceIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListServiceIds', + context__pb2.ContextId.SerializeToString, + context__pb2.ServiceIdList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListServices(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListServices', + context__pb2.ContextId.SerializeToString, + context__pb2.ServiceList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetService', + context__pb2.ServiceId.SerializeToString, + context__pb2.Service.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SetService', + context__pb2.Service.SerializeToString, + context__pb2.ServiceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UnsetService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/UnsetService', + context__pb2.Service.SerializeToString, + context__pb2.ServiceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/RemoveService', + context__pb2.ServiceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetServiceEvents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/context.ContextService/GetServiceEvents', + context__pb2.Empty.SerializeToString, + context__pb2.ServiceEvent.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SelectService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SelectService', + context__pb2.ServiceFilter.SerializeToString, + context__pb2.ServiceList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListSliceIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListSliceIds', + context__pb2.ContextId.SerializeToString, + context__pb2.SliceIdList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListSlices(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListSlices', + context__pb2.ContextId.SerializeToString, + context__pb2.SliceList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetSlice', + context__pb2.SliceId.SerializeToString, + context__pb2.Slice.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SetSlice', + context__pb2.Slice.SerializeToString, + context__pb2.SliceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UnsetSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/UnsetSlice', + context__pb2.Slice.SerializeToString, + context__pb2.SliceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/RemoveSlice', + context__pb2.SliceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetSliceEvents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/context.ContextService/GetSliceEvents', + context__pb2.Empty.SerializeToString, + context__pb2.SliceEvent.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SelectSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SelectSlice', + context__pb2.SliceFilter.SerializeToString, + context__pb2.SliceList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateQoSProfile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/CreateQoSProfile', + context__pb2.QoSProfile.SerializeToString, + context__pb2.QoSProfile.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateQoSProfile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/UpdateQoSProfile', + context__pb2.QoSProfile.SerializeToString, + context__pb2.QoSProfile.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteQoSProfile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/DeleteQoSProfile', + context__pb2.QoSProfileId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetQoSProfile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetQoSProfile', + context__pb2.QoSProfileId.SerializeToString, + context__pb2.QoSProfile.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetQoSProfiles(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/context.ContextService/GetQoSProfiles', + context__pb2.Empty.SerializeToString, + context__pb2.QoSProfile.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListConnectionIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListConnectionIds', + context__pb2.ServiceId.SerializeToString, + context__pb2.ConnectionIdList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListConnections(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/ListConnections', + context__pb2.ServiceId.SerializeToString, + context__pb2.ConnectionList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetConnection(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetConnection', + context__pb2.ConnectionId.SerializeToString, + context__pb2.Connection.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetConnection(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SetConnection', + context__pb2.Connection.SerializeToString, + context__pb2.ConnectionId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemoveConnection(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/RemoveConnection', + context__pb2.ConnectionId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetConnectionEvents(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/context.ContextService/GetConnectionEvents', + context__pb2.Empty.SerializeToString, + context__pb2.ConnectionEvent.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetOpticalConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetOpticalConfig', + context__pb2.Empty.SerializeToString, + context__pb2.OpticalConfigList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetOpticalConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SetOpticalConfig', + context__pb2.OpticalConfig.SerializeToString, + context__pb2.OpticalConfigId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SelectOpticalConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SelectOpticalConfig', + context__pb2.OpticalConfigId.SerializeToString, + context__pb2.OpticalConfig.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetOpticalLink(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/SetOpticalLink', + context__pb2.OpticalLink.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetOpticalLink(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetOpticalLink', + context__pb2.OpticalLinkId.SerializeToString, + context__pb2.OpticalLink.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetFiber(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context.ContextService/GetFiber', + context__pb2.FiberId.SerializeToString, + context__pb2.Fiber.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/context_policy_pb2.py b/proto/context_policy_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..8570ad4ff82beb2bd16e06087785d83c6b6e4603 --- /dev/null +++ b/proto/context_policy_pb2.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: context_policy.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import policy_pb2 as policy__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x63ontext_policy.proto\x12\x0e\x63ontext_policy\x1a\rcontext.proto\x1a\x0cpolicy.proto2\xca\x02\n\x14\x43ontextPolicyService\x12?\n\x11ListPolicyRuleIds\x12\x0e.context.Empty\x1a\x18.policy.PolicyRuleIdList\"\x00\x12;\n\x0fListPolicyRules\x12\x0e.context.Empty\x1a\x16.policy.PolicyRuleList\"\x00\x12;\n\rGetPolicyRule\x12\x14.policy.PolicyRuleId\x1a\x12.policy.PolicyRule\"\x00\x12;\n\rSetPolicyRule\x12\x12.policy.PolicyRule\x1a\x14.policy.PolicyRuleId\"\x00\x12:\n\x10RemovePolicyRule\x12\x14.policy.PolicyRuleId\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_CONTEXTPOLICYSERVICE = DESCRIPTOR.services_by_name['ContextPolicyService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _CONTEXTPOLICYSERVICE._serialized_start=70 + _CONTEXTPOLICYSERVICE._serialized_end=400 +# @@protoc_insertion_point(module_scope) diff --git a/proto/context_policy_pb2_grpc.py b/proto/context_policy_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..6e6a7a2e0cd3b8dc019dc0f9338194fe3750ffa7 --- /dev/null +++ b/proto/context_policy_pb2_grpc.py @@ -0,0 +1,202 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import policy_pb2 as policy__pb2 + + +class ContextPolicyServiceStub(object): + """created as a separate service to prevent import-loops in context and policy + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListPolicyRuleIds = channel.unary_unary( + '/context_policy.ContextPolicyService/ListPolicyRuleIds', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleIdList.FromString, + ) + self.ListPolicyRules = channel.unary_unary( + '/context_policy.ContextPolicyService/ListPolicyRules', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleList.FromString, + ) + self.GetPolicyRule = channel.unary_unary( + '/context_policy.ContextPolicyService/GetPolicyRule', + request_serializer=policy__pb2.PolicyRuleId.SerializeToString, + response_deserializer=policy__pb2.PolicyRule.FromString, + ) + self.SetPolicyRule = channel.unary_unary( + '/context_policy.ContextPolicyService/SetPolicyRule', + request_serializer=policy__pb2.PolicyRule.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleId.FromString, + ) + self.RemovePolicyRule = channel.unary_unary( + '/context_policy.ContextPolicyService/RemovePolicyRule', + request_serializer=policy__pb2.PolicyRuleId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class ContextPolicyServiceServicer(object): + """created as a separate service to prevent import-loops in context and policy + """ + + def ListPolicyRuleIds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListPolicyRules(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetPolicyRule(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetPolicyRule(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemovePolicyRule(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ContextPolicyServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ListPolicyRuleIds': grpc.unary_unary_rpc_method_handler( + servicer.ListPolicyRuleIds, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=policy__pb2.PolicyRuleIdList.SerializeToString, + ), + 'ListPolicyRules': grpc.unary_unary_rpc_method_handler( + servicer.ListPolicyRules, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=policy__pb2.PolicyRuleList.SerializeToString, + ), + 'GetPolicyRule': grpc.unary_unary_rpc_method_handler( + servicer.GetPolicyRule, + request_deserializer=policy__pb2.PolicyRuleId.FromString, + response_serializer=policy__pb2.PolicyRule.SerializeToString, + ), + 'SetPolicyRule': grpc.unary_unary_rpc_method_handler( + servicer.SetPolicyRule, + request_deserializer=policy__pb2.PolicyRule.FromString, + response_serializer=policy__pb2.PolicyRuleId.SerializeToString, + ), + 'RemovePolicyRule': grpc.unary_unary_rpc_method_handler( + servicer.RemovePolicyRule, + request_deserializer=policy__pb2.PolicyRuleId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'context_policy.ContextPolicyService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ContextPolicyService(object): + """created as a separate service to prevent import-loops in context and policy + """ + + @staticmethod + def ListPolicyRuleIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context_policy.ContextPolicyService/ListPolicyRuleIds', + context__pb2.Empty.SerializeToString, + policy__pb2.PolicyRuleIdList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListPolicyRules(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context_policy.ContextPolicyService/ListPolicyRules', + context__pb2.Empty.SerializeToString, + policy__pb2.PolicyRuleList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetPolicyRule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context_policy.ContextPolicyService/GetPolicyRule', + policy__pb2.PolicyRuleId.SerializeToString, + policy__pb2.PolicyRule.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetPolicyRule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context_policy.ContextPolicyService/SetPolicyRule', + policy__pb2.PolicyRule.SerializeToString, + policy__pb2.PolicyRuleId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemovePolicyRule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context_policy.ContextPolicyService/RemovePolicyRule', + policy__pb2.PolicyRuleId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/dbscanserving_pb2.py b/proto/dbscanserving_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..c367501de0be8d6289498c298683145917017a4b --- /dev/null +++ b/proto/dbscanserving_pb2.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: dbscanserving.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x64\x62scanserving.proto\x12\rdbscanserving\"\x1a\n\x06Sample\x12\x10\n\x08\x66\x65\x61tures\x18\x01 \x03(\x02\"\xc2\x01\n\x10\x44\x65tectionRequest\x12\x0b\n\x03\x65ps\x18\x01 \x01(\x02\x12\x13\n\x0bmin_samples\x18\x02 \x01(\x05\x12%\n\x06metric\x18\x03 \x01(\x0e\x32\x15.dbscanserving.Metric\x12\x13\n\x0bnum_samples\x18\x04 \x01(\x05\x12\x14\n\x0cnum_features\x18\x05 \x01(\x05\x12&\n\x07samples\x18\x06 \x03(\x0b\x32\x15.dbscanserving.Sample\x12\x12\n\nidentifier\x18\x07 \x01(\x05\",\n\x11\x44\x65tectionResponse\x12\x17\n\x0f\x63luster_indices\x18\x01 \x03(\x05*\x17\n\x06Metric\x12\r\n\tEUCLIDEAN\x10\x00\x32W\n\x08\x44\x65tector\x12K\n\x06\x44\x65tect\x12\x1f.dbscanserving.DetectionRequest\x1a .dbscanserving.DetectionResponseb\x06proto3') + +_METRIC = DESCRIPTOR.enum_types_by_name['Metric'] +Metric = enum_type_wrapper.EnumTypeWrapper(_METRIC) +EUCLIDEAN = 0 + + +_SAMPLE = DESCRIPTOR.message_types_by_name['Sample'] +_DETECTIONREQUEST = DESCRIPTOR.message_types_by_name['DetectionRequest'] +_DETECTIONRESPONSE = DESCRIPTOR.message_types_by_name['DetectionResponse'] +Sample = _reflection.GeneratedProtocolMessageType('Sample', (_message.Message,), { + 'DESCRIPTOR' : _SAMPLE, + '__module__' : 'dbscanserving_pb2' + # @@protoc_insertion_point(class_scope:dbscanserving.Sample) + }) +_sym_db.RegisterMessage(Sample) + +DetectionRequest = _reflection.GeneratedProtocolMessageType('DetectionRequest', (_message.Message,), { + 'DESCRIPTOR' : _DETECTIONREQUEST, + '__module__' : 'dbscanserving_pb2' + # @@protoc_insertion_point(class_scope:dbscanserving.DetectionRequest) + }) +_sym_db.RegisterMessage(DetectionRequest) + +DetectionResponse = _reflection.GeneratedProtocolMessageType('DetectionResponse', (_message.Message,), { + 'DESCRIPTOR' : _DETECTIONRESPONSE, + '__module__' : 'dbscanserving_pb2' + # @@protoc_insertion_point(class_scope:dbscanserving.DetectionResponse) + }) +_sym_db.RegisterMessage(DetectionResponse) + +_DETECTOR = DESCRIPTOR.services_by_name['Detector'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _METRIC._serialized_start=309 + _METRIC._serialized_end=332 + _SAMPLE._serialized_start=38 + _SAMPLE._serialized_end=64 + _DETECTIONREQUEST._serialized_start=67 + _DETECTIONREQUEST._serialized_end=261 + _DETECTIONRESPONSE._serialized_start=263 + _DETECTIONRESPONSE._serialized_end=307 + _DETECTOR._serialized_start=334 + _DETECTOR._serialized_end=421 +# @@protoc_insertion_point(module_scope) diff --git a/proto/dbscanserving_pb2_grpc.py b/proto/dbscanserving_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..7a80a65efad3cfaf9039533b6ce67bb67f13592e --- /dev/null +++ b/proto/dbscanserving_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import dbscanserving_pb2 as dbscanserving__pb2 + + +class DetectorStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Detect = channel.unary_unary( + '/dbscanserving.Detector/Detect', + request_serializer=dbscanserving__pb2.DetectionRequest.SerializeToString, + response_deserializer=dbscanserving__pb2.DetectionResponse.FromString, + ) + + +class DetectorServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Detect(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DetectorServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Detect': grpc.unary_unary_rpc_method_handler( + servicer.Detect, + request_deserializer=dbscanserving__pb2.DetectionRequest.FromString, + response_serializer=dbscanserving__pb2.DetectionResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'dbscanserving.Detector', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Detector(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Detect(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dbscanserving.Detector/Detect', + dbscanserving__pb2.DetectionRequest.SerializeToString, + dbscanserving__pb2.DetectionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/device_pb2.py b/proto/device_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..648d8287e3337b0047bd7ff17cae62b97bdc467d --- /dev/null +++ b/proto/device_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: device.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import monitoring_pb2 as monitoring__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x64\x65vice.proto\x12\x06\x64\x65vice\x1a\rcontext.proto\x1a\x10monitoring.proto\"\xa4\x01\n\x12MonitoringSettings\x12!\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x11.monitoring.KpiId\x12\x31\n\x0ekpi_descriptor\x18\x02 \x01(\x0b\x32\x19.monitoring.KpiDescriptor\x12\x1b\n\x13sampling_duration_s\x18\x03 \x01(\x02\x12\x1b\n\x13sampling_interval_s\x18\x04 \x01(\x02\x32\xb2\x02\n\rDeviceService\x12\x31\n\tAddDevice\x12\x0f.context.Device\x1a\x11.context.DeviceId\"\x00\x12\x37\n\x0f\x43onfigureDevice\x12\x0f.context.Device\x1a\x11.context.DeviceId\"\x00\x12\x33\n\x0c\x44\x65leteDevice\x12\x11.context.DeviceId\x1a\x0e.context.Empty\"\x00\x12>\n\x10GetInitialConfig\x12\x11.context.DeviceId\x1a\x15.context.DeviceConfig\"\x00\x12@\n\x10MonitorDeviceKpi\x12\x1a.device.MonitoringSettings\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_MONITORINGSETTINGS = DESCRIPTOR.message_types_by_name['MonitoringSettings'] +MonitoringSettings = _reflection.GeneratedProtocolMessageType('MonitoringSettings', (_message.Message,), { + 'DESCRIPTOR' : _MONITORINGSETTINGS, + '__module__' : 'device_pb2' + # @@protoc_insertion_point(class_scope:device.MonitoringSettings) + }) +_sym_db.RegisterMessage(MonitoringSettings) + +_DEVICESERVICE = DESCRIPTOR.services_by_name['DeviceService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _MONITORINGSETTINGS._serialized_start=58 + _MONITORINGSETTINGS._serialized_end=222 + _DEVICESERVICE._serialized_start=225 + _DEVICESERVICE._serialized_end=531 +# @@protoc_insertion_point(module_scope) diff --git a/proto/device_pb2_grpc.py b/proto/device_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..06cd56e4ece119d678e0b3d2ca62a80f81561cc1 --- /dev/null +++ b/proto/device_pb2_grpc.py @@ -0,0 +1,199 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import device_pb2 as device__pb2 + + +class DeviceServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.AddDevice = channel.unary_unary( + '/device.DeviceService/AddDevice', + request_serializer=context__pb2.Device.SerializeToString, + response_deserializer=context__pb2.DeviceId.FromString, + ) + self.ConfigureDevice = channel.unary_unary( + '/device.DeviceService/ConfigureDevice', + request_serializer=context__pb2.Device.SerializeToString, + response_deserializer=context__pb2.DeviceId.FromString, + ) + self.DeleteDevice = channel.unary_unary( + '/device.DeviceService/DeleteDevice', + request_serializer=context__pb2.DeviceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetInitialConfig = channel.unary_unary( + '/device.DeviceService/GetInitialConfig', + request_serializer=context__pb2.DeviceId.SerializeToString, + response_deserializer=context__pb2.DeviceConfig.FromString, + ) + self.MonitorDeviceKpi = channel.unary_unary( + '/device.DeviceService/MonitorDeviceKpi', + request_serializer=device__pb2.MonitoringSettings.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class DeviceServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def AddDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ConfigureDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetInitialConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def MonitorDeviceKpi(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DeviceServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'AddDevice': grpc.unary_unary_rpc_method_handler( + servicer.AddDevice, + request_deserializer=context__pb2.Device.FromString, + response_serializer=context__pb2.DeviceId.SerializeToString, + ), + 'ConfigureDevice': grpc.unary_unary_rpc_method_handler( + servicer.ConfigureDevice, + request_deserializer=context__pb2.Device.FromString, + response_serializer=context__pb2.DeviceId.SerializeToString, + ), + 'DeleteDevice': grpc.unary_unary_rpc_method_handler( + servicer.DeleteDevice, + request_deserializer=context__pb2.DeviceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetInitialConfig': grpc.unary_unary_rpc_method_handler( + servicer.GetInitialConfig, + request_deserializer=context__pb2.DeviceId.FromString, + response_serializer=context__pb2.DeviceConfig.SerializeToString, + ), + 'MonitorDeviceKpi': grpc.unary_unary_rpc_method_handler( + servicer.MonitorDeviceKpi, + request_deserializer=device__pb2.MonitoringSettings.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'device.DeviceService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class DeviceService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def AddDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/device.DeviceService/AddDevice', + context__pb2.Device.SerializeToString, + context__pb2.DeviceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ConfigureDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/device.DeviceService/ConfigureDevice', + context__pb2.Device.SerializeToString, + context__pb2.DeviceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/device.DeviceService/DeleteDevice', + context__pb2.DeviceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetInitialConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/device.DeviceService/GetInitialConfig', + context__pb2.DeviceId.SerializeToString, + context__pb2.DeviceConfig.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def MonitorDeviceKpi(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/device.DeviceService/MonitorDeviceKpi', + device__pb2.MonitoringSettings.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/distributed_cybersecurity_pb2.py b/proto/distributed_cybersecurity_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..83d99b165a6edb00005a65f24dd1c22c9ed222ac --- /dev/null +++ b/proto/distributed_cybersecurity_pb2.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: distributed_cybersecurity.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import monitoring_pb2 as monitoring__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1f\x64istributed_cybersecurity.proto\x12\x19\x64istributed_cybersecurity\x1a\rcontext.proto\x1a\x10monitoring.proto2\x87\x01\n\x1f\x44istributedCyberSecurityService\x12\x30\n\x0c\x44\x65tectAttack\x12\x0e.context.Empty\x1a\x0e.context.Empty\"\x00\x12\x32\n\tReportKpi\x12\x13.monitoring.KpiList\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_DISTRIBUTEDCYBERSECURITYSERVICE = DESCRIPTOR.services_by_name['DistributedCyberSecurityService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _DISTRIBUTEDCYBERSECURITYSERVICE._serialized_start=96 + _DISTRIBUTEDCYBERSECURITYSERVICE._serialized_end=231 +# @@protoc_insertion_point(module_scope) diff --git a/proto/distributed_cybersecurity_pb2_grpc.py b/proto/distributed_cybersecurity_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..d5e004a0cac25bebdf19365663fb9ec118b8bbc7 --- /dev/null +++ b/proto/distributed_cybersecurity_pb2_grpc.py @@ -0,0 +1,102 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import monitoring_pb2 as monitoring__pb2 + + +class DistributedCyberSecurityServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.DetectAttack = channel.unary_unary( + '/distributed_cybersecurity.DistributedCyberSecurityService/DetectAttack', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.ReportKpi = channel.unary_unary( + '/distributed_cybersecurity.DistributedCyberSecurityService/ReportKpi', + request_serializer=monitoring__pb2.KpiList.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class DistributedCyberSecurityServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def DetectAttack(self, request, context): + """rpc that triggers the attack detection loop + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ReportKpi(self, request, context): + """receiving KPIs from monitored devices (packed processors) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DistributedCyberSecurityServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'DetectAttack': grpc.unary_unary_rpc_method_handler( + servicer.DetectAttack, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'ReportKpi': grpc.unary_unary_rpc_method_handler( + servicer.ReportKpi, + request_deserializer=monitoring__pb2.KpiList.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'distributed_cybersecurity.DistributedCyberSecurityService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class DistributedCyberSecurityService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def DetectAttack(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/distributed_cybersecurity.DistributedCyberSecurityService/DetectAttack', + context__pb2.Empty.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ReportKpi(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/distributed_cybersecurity.DistributedCyberSecurityService/ReportKpi', + monitoring__pb2.KpiList.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/dlt_connector_pb2.py b/proto/dlt_connector_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..00545522cf6f77a29964d12c2a1822720451930c --- /dev/null +++ b/proto/dlt_connector_pb2.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: dlt_connector.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x64lt_connector.proto\x12\x03\x64lt\x1a\rcontext.proto\"m\n\x0b\x44ltDeviceId\x12(\n\x0btopology_id\x18\x01 \x01(\x0b\x32\x13.context.TopologyId\x12$\n\tdevice_id\x18\x02 \x01(\x0b\x32\x11.context.DeviceId\x12\x0e\n\x06\x64\x65lete\x18\x03 \x01(\x08\"g\n\tDltLinkId\x12(\n\x0btopology_id\x18\x01 \x01(\x0b\x32\x13.context.TopologyId\x12 \n\x07link_id\x18\x02 \x01(\x0b\x32\x0f.context.LinkId\x12\x0e\n\x06\x64\x65lete\x18\x03 \x01(\x08\"p\n\x0c\x44ltServiceId\x12(\n\x0btopology_id\x18\x01 \x01(\x0b\x32\x13.context.TopologyId\x12&\n\nservice_id\x18\x02 \x01(\x0b\x32\x12.context.ServiceId\x12\x0e\n\x06\x64\x65lete\x18\x03 \x01(\x08\"j\n\nDltSliceId\x12(\n\x0btopology_id\x18\x01 \x01(\x0b\x32\x13.context.TopologyId\x12\"\n\x08slice_id\x18\x02 \x01(\x0b\x32\x10.context.SliceId\x12\x0e\n\x06\x64\x65lete\x18\x03 \x01(\x08\x32\xff\x03\n\x13\x44ltConnectorService\x12\x32\n\tRecordAll\x12\x13.context.TopologyId\x1a\x0e.context.Empty\"\x00\x12\x39\n\x10RecordAllDevices\x12\x13.context.TopologyId\x1a\x0e.context.Empty\"\x00\x12\x32\n\x0cRecordDevice\x12\x10.dlt.DltDeviceId\x1a\x0e.context.Empty\"\x00\x12\x37\n\x0eRecordAllLinks\x12\x13.context.TopologyId\x1a\x0e.context.Empty\"\x00\x12.\n\nRecordLink\x12\x0e.dlt.DltLinkId\x1a\x0e.context.Empty\"\x00\x12:\n\x11RecordAllServices\x12\x13.context.TopologyId\x1a\x0e.context.Empty\"\x00\x12\x34\n\rRecordService\x12\x11.dlt.DltServiceId\x1a\x0e.context.Empty\"\x00\x12\x38\n\x0fRecordAllSlices\x12\x13.context.TopologyId\x1a\x0e.context.Empty\"\x00\x12\x30\n\x0bRecordSlice\x12\x0f.dlt.DltSliceId\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_DLTDEVICEID = DESCRIPTOR.message_types_by_name['DltDeviceId'] +_DLTLINKID = DESCRIPTOR.message_types_by_name['DltLinkId'] +_DLTSERVICEID = DESCRIPTOR.message_types_by_name['DltServiceId'] +_DLTSLICEID = DESCRIPTOR.message_types_by_name['DltSliceId'] +DltDeviceId = _reflection.GeneratedProtocolMessageType('DltDeviceId', (_message.Message,), { + 'DESCRIPTOR' : _DLTDEVICEID, + '__module__' : 'dlt_connector_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltDeviceId) + }) +_sym_db.RegisterMessage(DltDeviceId) + +DltLinkId = _reflection.GeneratedProtocolMessageType('DltLinkId', (_message.Message,), { + 'DESCRIPTOR' : _DLTLINKID, + '__module__' : 'dlt_connector_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltLinkId) + }) +_sym_db.RegisterMessage(DltLinkId) + +DltServiceId = _reflection.GeneratedProtocolMessageType('DltServiceId', (_message.Message,), { + 'DESCRIPTOR' : _DLTSERVICEID, + '__module__' : 'dlt_connector_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltServiceId) + }) +_sym_db.RegisterMessage(DltServiceId) + +DltSliceId = _reflection.GeneratedProtocolMessageType('DltSliceId', (_message.Message,), { + 'DESCRIPTOR' : _DLTSLICEID, + '__module__' : 'dlt_connector_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltSliceId) + }) +_sym_db.RegisterMessage(DltSliceId) + +_DLTCONNECTORSERVICE = DESCRIPTOR.services_by_name['DltConnectorService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _DLTDEVICEID._serialized_start=43 + _DLTDEVICEID._serialized_end=152 + _DLTLINKID._serialized_start=154 + _DLTLINKID._serialized_end=257 + _DLTSERVICEID._serialized_start=259 + _DLTSERVICEID._serialized_end=371 + _DLTSLICEID._serialized_start=373 + _DLTSLICEID._serialized_end=479 + _DLTCONNECTORSERVICE._serialized_start=482 + _DLTCONNECTORSERVICE._serialized_end=993 +# @@protoc_insertion_point(module_scope) diff --git a/proto/dlt_connector_pb2_grpc.py b/proto/dlt_connector_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..4f1a08f71db3f9c94d96eec0f997b63b15fc3ca9 --- /dev/null +++ b/proto/dlt_connector_pb2_grpc.py @@ -0,0 +1,331 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import dlt_connector_pb2 as dlt__connector__pb2 + + +class DltConnectorServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.RecordAll = channel.unary_unary( + '/dlt.DltConnectorService/RecordAll', + request_serializer=context__pb2.TopologyId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.RecordAllDevices = channel.unary_unary( + '/dlt.DltConnectorService/RecordAllDevices', + request_serializer=context__pb2.TopologyId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.RecordDevice = channel.unary_unary( + '/dlt.DltConnectorService/RecordDevice', + request_serializer=dlt__connector__pb2.DltDeviceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.RecordAllLinks = channel.unary_unary( + '/dlt.DltConnectorService/RecordAllLinks', + request_serializer=context__pb2.TopologyId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.RecordLink = channel.unary_unary( + '/dlt.DltConnectorService/RecordLink', + request_serializer=dlt__connector__pb2.DltLinkId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.RecordAllServices = channel.unary_unary( + '/dlt.DltConnectorService/RecordAllServices', + request_serializer=context__pb2.TopologyId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.RecordService = channel.unary_unary( + '/dlt.DltConnectorService/RecordService', + request_serializer=dlt__connector__pb2.DltServiceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.RecordAllSlices = channel.unary_unary( + '/dlt.DltConnectorService/RecordAllSlices', + request_serializer=context__pb2.TopologyId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.RecordSlice = channel.unary_unary( + '/dlt.DltConnectorService/RecordSlice', + request_serializer=dlt__connector__pb2.DltSliceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class DltConnectorServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def RecordAll(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RecordAllDevices(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RecordDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RecordAllLinks(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RecordLink(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RecordAllServices(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RecordService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RecordAllSlices(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RecordSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DltConnectorServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'RecordAll': grpc.unary_unary_rpc_method_handler( + servicer.RecordAll, + request_deserializer=context__pb2.TopologyId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'RecordAllDevices': grpc.unary_unary_rpc_method_handler( + servicer.RecordAllDevices, + request_deserializer=context__pb2.TopologyId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'RecordDevice': grpc.unary_unary_rpc_method_handler( + servicer.RecordDevice, + request_deserializer=dlt__connector__pb2.DltDeviceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'RecordAllLinks': grpc.unary_unary_rpc_method_handler( + servicer.RecordAllLinks, + request_deserializer=context__pb2.TopologyId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'RecordLink': grpc.unary_unary_rpc_method_handler( + servicer.RecordLink, + request_deserializer=dlt__connector__pb2.DltLinkId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'RecordAllServices': grpc.unary_unary_rpc_method_handler( + servicer.RecordAllServices, + request_deserializer=context__pb2.TopologyId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'RecordService': grpc.unary_unary_rpc_method_handler( + servicer.RecordService, + request_deserializer=dlt__connector__pb2.DltServiceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'RecordAllSlices': grpc.unary_unary_rpc_method_handler( + servicer.RecordAllSlices, + request_deserializer=context__pb2.TopologyId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'RecordSlice': grpc.unary_unary_rpc_method_handler( + servicer.RecordSlice, + request_deserializer=dlt__connector__pb2.DltSliceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'dlt.DltConnectorService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class DltConnectorService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def RecordAll(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltConnectorService/RecordAll', + context__pb2.TopologyId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RecordAllDevices(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltConnectorService/RecordAllDevices', + context__pb2.TopologyId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RecordDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltConnectorService/RecordDevice', + dlt__connector__pb2.DltDeviceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RecordAllLinks(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltConnectorService/RecordAllLinks', + context__pb2.TopologyId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RecordLink(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltConnectorService/RecordLink', + dlt__connector__pb2.DltLinkId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RecordAllServices(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltConnectorService/RecordAllServices', + context__pb2.TopologyId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RecordService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltConnectorService/RecordService', + dlt__connector__pb2.DltServiceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RecordAllSlices(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltConnectorService/RecordAllSlices', + context__pb2.TopologyId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RecordSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltConnectorService/RecordSlice', + dlt__connector__pb2.DltSliceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/dlt_gateway_pb2.py b/proto/dlt_gateway_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..6861d44e01ed799cf17268f46ca77eeab8e864d4 --- /dev/null +++ b/proto/dlt_gateway_pb2.py @@ -0,0 +1,134 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: dlt_gateway.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11\x64lt_gateway.proto\x12\x03\x64lt\x1a\rcontext.proto\"{\n\x0b\x44ltRecordId\x12\"\n\x0b\x64omain_uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\x12$\n\x04type\x18\x02 \x01(\x0e\x32\x16.dlt.DltRecordTypeEnum\x12\"\n\x0brecord_uuid\x18\x03 \x01(\x0b\x32\r.context.Uuid\"s\n\tDltRecord\x12#\n\trecord_id\x18\x01 \x01(\x0b\x32\x10.dlt.DltRecordId\x12.\n\toperation\x18\x02 \x01(\x0e\x32\x1b.dlt.DltRecordOperationEnum\x12\x11\n\tdata_json\x18\x03 \x01(\t\"m\n\x15\x44ltRecordSubscription\x12$\n\x04type\x18\x01 \x03(\x0e\x32\x16.dlt.DltRecordTypeEnum\x12.\n\toperation\x18\x02 \x03(\x0e\x32\x1b.dlt.DltRecordOperationEnum\"T\n\x0e\x44ltRecordEvent\x12\x1d\n\x05\x65vent\x18\x01 \x01(\x0b\x32\x0e.context.Event\x12#\n\trecord_id\x18\x02 \x01(\x0b\x32\x10.dlt.DltRecordId\"w\n\x0f\x44ltRecordStatus\x12#\n\trecord_id\x18\x01 \x01(\x0b\x32\x10.dlt.DltRecordId\x12(\n\x06status\x18\x02 \x01(\x0e\x32\x18.dlt.DltRecordStatusEnum\x12\x15\n\rerror_message\x18\x03 \x01(\t\"d\n\rDltPeerStatus\x12/\n\ncontroller\x18\x01 \x01(\x0b\x32\x1b.context.TeraFlowController\x12\"\n\x06status\x18\x02 \x01(\x0e\x32\x12.dlt.DltStatusEnum\"6\n\x11\x44ltPeerStatusList\x12!\n\x05peers\x18\x01 \x03(\x0b\x32\x12.dlt.DltPeerStatus*\xcd\x01\n\x11\x44ltRecordTypeEnum\x12\x1b\n\x17\x44LTRECORDTYPE_UNDEFINED\x10\x00\x12\x19\n\x15\x44LTRECORDTYPE_CONTEXT\x10\x01\x12\x1a\n\x16\x44LTRECORDTYPE_TOPOLOGY\x10\x02\x12\x18\n\x14\x44LTRECORDTYPE_DEVICE\x10\x03\x12\x16\n\x12\x44LTRECORDTYPE_LINK\x10\x04\x12\x19\n\x15\x44LTRECORDTYPE_SERVICE\x10\x05\x12\x17\n\x13\x44LTRECORDTYPE_SLICE\x10\x06*\x94\x01\n\x16\x44ltRecordOperationEnum\x12 \n\x1c\x44LTRECORDOPERATION_UNDEFINED\x10\x00\x12\x1a\n\x16\x44LTRECORDOPERATION_ADD\x10\x01\x12\x1d\n\x19\x44LTRECORDOPERATION_UPDATE\x10\x02\x12\x1d\n\x19\x44LTRECORDOPERATION_DELETE\x10\x03*o\n\x13\x44ltRecordStatusEnum\x12\x1d\n\x19\x44LTRECORDSTATUS_UNDEFINED\x10\x00\x12\x1d\n\x19\x44LTRECORDSTATUS_SUCCEEDED\x10\x01\x12\x1a\n\x16\x44LTRECORDSTATUS_FAILED\x10\x02*\x8e\x01\n\rDltStatusEnum\x12\x17\n\x13\x44LTSTATUS_UNDEFINED\x10\x00\x12\x1a\n\x16\x44LTSTATUS_NOTAVAILABLE\x10\x01\x12\x19\n\x15\x44LTSTATUS_INITIALIZED\x10\x02\x12\x17\n\x13\x44LTSTATUS_AVAILABLE\x10\x03\x12\x14\n\x10\x44LTSTATUS_DEINIT\x10\x04\x32\xbf\x02\n\x11\x44ltGatewayService\x12\x35\n\x0bRecordToDlt\x12\x0e.dlt.DltRecord\x1a\x14.dlt.DltRecordStatus\"\x00\x12\x30\n\nGetFromDlt\x12\x10.dlt.DltRecordId\x1a\x0e.dlt.DltRecord\"\x00\x12\x45\n\x0eSubscribeToDlt\x12\x1a.dlt.DltRecordSubscription\x1a\x13.dlt.DltRecordEvent\"\x00\x30\x01\x12\x41\n\x0cGetDltStatus\x12\x1b.context.TeraFlowController\x1a\x12.dlt.DltPeerStatus\"\x00\x12\x37\n\x0bGetDltPeers\x12\x0e.context.Empty\x1a\x16.dlt.DltPeerStatusList\"\x00\x62\x06proto3') + +_DLTRECORDTYPEENUM = DESCRIPTOR.enum_types_by_name['DltRecordTypeEnum'] +DltRecordTypeEnum = enum_type_wrapper.EnumTypeWrapper(_DLTRECORDTYPEENUM) +_DLTRECORDOPERATIONENUM = DESCRIPTOR.enum_types_by_name['DltRecordOperationEnum'] +DltRecordOperationEnum = enum_type_wrapper.EnumTypeWrapper(_DLTRECORDOPERATIONENUM) +_DLTRECORDSTATUSENUM = DESCRIPTOR.enum_types_by_name['DltRecordStatusEnum'] +DltRecordStatusEnum = enum_type_wrapper.EnumTypeWrapper(_DLTRECORDSTATUSENUM) +_DLTSTATUSENUM = DESCRIPTOR.enum_types_by_name['DltStatusEnum'] +DltStatusEnum = enum_type_wrapper.EnumTypeWrapper(_DLTSTATUSENUM) +DLTRECORDTYPE_UNDEFINED = 0 +DLTRECORDTYPE_CONTEXT = 1 +DLTRECORDTYPE_TOPOLOGY = 2 +DLTRECORDTYPE_DEVICE = 3 +DLTRECORDTYPE_LINK = 4 +DLTRECORDTYPE_SERVICE = 5 +DLTRECORDTYPE_SLICE = 6 +DLTRECORDOPERATION_UNDEFINED = 0 +DLTRECORDOPERATION_ADD = 1 +DLTRECORDOPERATION_UPDATE = 2 +DLTRECORDOPERATION_DELETE = 3 +DLTRECORDSTATUS_UNDEFINED = 0 +DLTRECORDSTATUS_SUCCEEDED = 1 +DLTRECORDSTATUS_FAILED = 2 +DLTSTATUS_UNDEFINED = 0 +DLTSTATUS_NOTAVAILABLE = 1 +DLTSTATUS_INITIALIZED = 2 +DLTSTATUS_AVAILABLE = 3 +DLTSTATUS_DEINIT = 4 + + +_DLTRECORDID = DESCRIPTOR.message_types_by_name['DltRecordId'] +_DLTRECORD = DESCRIPTOR.message_types_by_name['DltRecord'] +_DLTRECORDSUBSCRIPTION = DESCRIPTOR.message_types_by_name['DltRecordSubscription'] +_DLTRECORDEVENT = DESCRIPTOR.message_types_by_name['DltRecordEvent'] +_DLTRECORDSTATUS = DESCRIPTOR.message_types_by_name['DltRecordStatus'] +_DLTPEERSTATUS = DESCRIPTOR.message_types_by_name['DltPeerStatus'] +_DLTPEERSTATUSLIST = DESCRIPTOR.message_types_by_name['DltPeerStatusList'] +DltRecordId = _reflection.GeneratedProtocolMessageType('DltRecordId', (_message.Message,), { + 'DESCRIPTOR' : _DLTRECORDID, + '__module__' : 'dlt_gateway_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltRecordId) + }) +_sym_db.RegisterMessage(DltRecordId) + +DltRecord = _reflection.GeneratedProtocolMessageType('DltRecord', (_message.Message,), { + 'DESCRIPTOR' : _DLTRECORD, + '__module__' : 'dlt_gateway_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltRecord) + }) +_sym_db.RegisterMessage(DltRecord) + +DltRecordSubscription = _reflection.GeneratedProtocolMessageType('DltRecordSubscription', (_message.Message,), { + 'DESCRIPTOR' : _DLTRECORDSUBSCRIPTION, + '__module__' : 'dlt_gateway_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltRecordSubscription) + }) +_sym_db.RegisterMessage(DltRecordSubscription) + +DltRecordEvent = _reflection.GeneratedProtocolMessageType('DltRecordEvent', (_message.Message,), { + 'DESCRIPTOR' : _DLTRECORDEVENT, + '__module__' : 'dlt_gateway_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltRecordEvent) + }) +_sym_db.RegisterMessage(DltRecordEvent) + +DltRecordStatus = _reflection.GeneratedProtocolMessageType('DltRecordStatus', (_message.Message,), { + 'DESCRIPTOR' : _DLTRECORDSTATUS, + '__module__' : 'dlt_gateway_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltRecordStatus) + }) +_sym_db.RegisterMessage(DltRecordStatus) + +DltPeerStatus = _reflection.GeneratedProtocolMessageType('DltPeerStatus', (_message.Message,), { + 'DESCRIPTOR' : _DLTPEERSTATUS, + '__module__' : 'dlt_gateway_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltPeerStatus) + }) +_sym_db.RegisterMessage(DltPeerStatus) + +DltPeerStatusList = _reflection.GeneratedProtocolMessageType('DltPeerStatusList', (_message.Message,), { + 'DESCRIPTOR' : _DLTPEERSTATUSLIST, + '__module__' : 'dlt_gateway_pb2' + # @@protoc_insertion_point(class_scope:dlt.DltPeerStatusList) + }) +_sym_db.RegisterMessage(DltPeerStatusList) + +_DLTGATEWAYSERVICE = DESCRIPTOR.services_by_name['DltGatewayService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _DLTRECORDTYPEENUM._serialized_start=760 + _DLTRECORDTYPEENUM._serialized_end=965 + _DLTRECORDOPERATIONENUM._serialized_start=968 + _DLTRECORDOPERATIONENUM._serialized_end=1116 + _DLTRECORDSTATUSENUM._serialized_start=1118 + _DLTRECORDSTATUSENUM._serialized_end=1229 + _DLTSTATUSENUM._serialized_start=1232 + _DLTSTATUSENUM._serialized_end=1374 + _DLTRECORDID._serialized_start=41 + _DLTRECORDID._serialized_end=164 + _DLTRECORD._serialized_start=166 + _DLTRECORD._serialized_end=281 + _DLTRECORDSUBSCRIPTION._serialized_start=283 + _DLTRECORDSUBSCRIPTION._serialized_end=392 + _DLTRECORDEVENT._serialized_start=394 + _DLTRECORDEVENT._serialized_end=478 + _DLTRECORDSTATUS._serialized_start=480 + _DLTRECORDSTATUS._serialized_end=599 + _DLTPEERSTATUS._serialized_start=601 + _DLTPEERSTATUS._serialized_end=701 + _DLTPEERSTATUSLIST._serialized_start=703 + _DLTPEERSTATUSLIST._serialized_end=757 + _DLTGATEWAYSERVICE._serialized_start=1377 + _DLTGATEWAYSERVICE._serialized_end=1696 +# @@protoc_insertion_point(module_scope) diff --git a/proto/dlt_gateway_pb2_grpc.py b/proto/dlt_gateway_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..5c4733873ec93a19b805b747c0d6622e4a34c7a6 --- /dev/null +++ b/proto/dlt_gateway_pb2_grpc.py @@ -0,0 +1,199 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import dlt_gateway_pb2 as dlt__gateway__pb2 + + +class DltGatewayServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.RecordToDlt = channel.unary_unary( + '/dlt.DltGatewayService/RecordToDlt', + request_serializer=dlt__gateway__pb2.DltRecord.SerializeToString, + response_deserializer=dlt__gateway__pb2.DltRecordStatus.FromString, + ) + self.GetFromDlt = channel.unary_unary( + '/dlt.DltGatewayService/GetFromDlt', + request_serializer=dlt__gateway__pb2.DltRecordId.SerializeToString, + response_deserializer=dlt__gateway__pb2.DltRecord.FromString, + ) + self.SubscribeToDlt = channel.unary_stream( + '/dlt.DltGatewayService/SubscribeToDlt', + request_serializer=dlt__gateway__pb2.DltRecordSubscription.SerializeToString, + response_deserializer=dlt__gateway__pb2.DltRecordEvent.FromString, + ) + self.GetDltStatus = channel.unary_unary( + '/dlt.DltGatewayService/GetDltStatus', + request_serializer=context__pb2.TeraFlowController.SerializeToString, + response_deserializer=dlt__gateway__pb2.DltPeerStatus.FromString, + ) + self.GetDltPeers = channel.unary_unary( + '/dlt.DltGatewayService/GetDltPeers', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=dlt__gateway__pb2.DltPeerStatusList.FromString, + ) + + +class DltGatewayServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def RecordToDlt(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetFromDlt(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SubscribeToDlt(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetDltStatus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetDltPeers(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_DltGatewayServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'RecordToDlt': grpc.unary_unary_rpc_method_handler( + servicer.RecordToDlt, + request_deserializer=dlt__gateway__pb2.DltRecord.FromString, + response_serializer=dlt__gateway__pb2.DltRecordStatus.SerializeToString, + ), + 'GetFromDlt': grpc.unary_unary_rpc_method_handler( + servicer.GetFromDlt, + request_deserializer=dlt__gateway__pb2.DltRecordId.FromString, + response_serializer=dlt__gateway__pb2.DltRecord.SerializeToString, + ), + 'SubscribeToDlt': grpc.unary_stream_rpc_method_handler( + servicer.SubscribeToDlt, + request_deserializer=dlt__gateway__pb2.DltRecordSubscription.FromString, + response_serializer=dlt__gateway__pb2.DltRecordEvent.SerializeToString, + ), + 'GetDltStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetDltStatus, + request_deserializer=context__pb2.TeraFlowController.FromString, + response_serializer=dlt__gateway__pb2.DltPeerStatus.SerializeToString, + ), + 'GetDltPeers': grpc.unary_unary_rpc_method_handler( + servicer.GetDltPeers, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=dlt__gateway__pb2.DltPeerStatusList.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'dlt.DltGatewayService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class DltGatewayService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def RecordToDlt(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltGatewayService/RecordToDlt', + dlt__gateway__pb2.DltRecord.SerializeToString, + dlt__gateway__pb2.DltRecordStatus.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetFromDlt(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltGatewayService/GetFromDlt', + dlt__gateway__pb2.DltRecordId.SerializeToString, + dlt__gateway__pb2.DltRecord.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SubscribeToDlt(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/dlt.DltGatewayService/SubscribeToDlt', + dlt__gateway__pb2.DltRecordSubscription.SerializeToString, + dlt__gateway__pb2.DltRecordEvent.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDltStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltGatewayService/GetDltStatus', + context__pb2.TeraFlowController.SerializeToString, + dlt__gateway__pb2.DltPeerStatus.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDltPeers(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dlt.DltGatewayService/GetDltPeers', + context__pb2.Empty.SerializeToString, + dlt__gateway__pb2.DltPeerStatusList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/e2eorchestrator_pb2.py b/proto/e2eorchestrator_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..069943acb63136d5bc0e0ed3ccd8408cb7b59548 --- /dev/null +++ b/proto/e2eorchestrator_pb2.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: e2eorchestrator.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x65\x32\x65orchestrator.proto\x12\x0corchestrator\x1a\rcontext.proto\";\n\x16\x45\x32\x45OrchestratorRequest\x12!\n\x07service\x18\x01 \x01(\x0b\x32\x10.context.Service\"d\n\x14\x45\x32\x45OrchestratorReply\x12\"\n\x08services\x18\x01 \x03(\x0b\x32\x10.context.Service\x12(\n\x0b\x63onnections\x18\x02 \x03(\x0b\x32\x13.context.Connection2o\n\x16\x45\x32\x45OrchestratorService\x12U\n\x07\x43ompute\x12$.orchestrator.E2EOrchestratorRequest\x1a\".orchestrator.E2EOrchestratorReply\"\x00\x62\x06proto3') + + + +_E2EORCHESTRATORREQUEST = DESCRIPTOR.message_types_by_name['E2EOrchestratorRequest'] +_E2EORCHESTRATORREPLY = DESCRIPTOR.message_types_by_name['E2EOrchestratorReply'] +E2EOrchestratorRequest = _reflection.GeneratedProtocolMessageType('E2EOrchestratorRequest', (_message.Message,), { + 'DESCRIPTOR' : _E2EORCHESTRATORREQUEST, + '__module__' : 'e2eorchestrator_pb2' + # @@protoc_insertion_point(class_scope:orchestrator.E2EOrchestratorRequest) + }) +_sym_db.RegisterMessage(E2EOrchestratorRequest) + +E2EOrchestratorReply = _reflection.GeneratedProtocolMessageType('E2EOrchestratorReply', (_message.Message,), { + 'DESCRIPTOR' : _E2EORCHESTRATORREPLY, + '__module__' : 'e2eorchestrator_pb2' + # @@protoc_insertion_point(class_scope:orchestrator.E2EOrchestratorReply) + }) +_sym_db.RegisterMessage(E2EOrchestratorReply) + +_E2EORCHESTRATORSERVICE = DESCRIPTOR.services_by_name['E2EOrchestratorService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _E2EORCHESTRATORREQUEST._serialized_start=54 + _E2EORCHESTRATORREQUEST._serialized_end=113 + _E2EORCHESTRATORREPLY._serialized_start=115 + _E2EORCHESTRATORREPLY._serialized_end=215 + _E2EORCHESTRATORSERVICE._serialized_start=217 + _E2EORCHESTRATORSERVICE._serialized_end=328 +# @@protoc_insertion_point(module_scope) diff --git a/proto/e2eorchestrator_pb2_grpc.py b/proto/e2eorchestrator_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..504db4ffc1c203f830dd4490b387d2616724065c --- /dev/null +++ b/proto/e2eorchestrator_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import e2eorchestrator_pb2 as e2eorchestrator__pb2 + + +class E2EOrchestratorServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Compute = channel.unary_unary( + '/orchestrator.E2EOrchestratorService/Compute', + request_serializer=e2eorchestrator__pb2.E2EOrchestratorRequest.SerializeToString, + response_deserializer=e2eorchestrator__pb2.E2EOrchestratorReply.FromString, + ) + + +class E2EOrchestratorServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Compute(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_E2EOrchestratorServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Compute': grpc.unary_unary_rpc_method_handler( + servicer.Compute, + request_deserializer=e2eorchestrator__pb2.E2EOrchestratorRequest.FromString, + response_serializer=e2eorchestrator__pb2.E2EOrchestratorReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'orchestrator.E2EOrchestratorService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class E2EOrchestratorService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Compute(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/orchestrator.E2EOrchestratorService/Compute', + e2eorchestrator__pb2.E2EOrchestratorRequest.SerializeToString, + e2eorchestrator__pb2.E2EOrchestratorReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/forecaster_pb2.py b/proto/forecaster_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..12bfba57b8f1025df315e5fca0283a6c3c4c9c51 --- /dev/null +++ b/proto/forecaster_pb2.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: forecaster.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x66orecaster.proto\x12\nforecaster\x1a\rcontext.proto\"`\n\x1b\x46orecastLinkCapacityRequest\x12 \n\x07link_id\x18\x01 \x01(\x0b\x32\x0f.context.LinkId\x12\x1f\n\x17\x66orecast_window_seconds\x18\x02 \x01(\x02\"\xa3\x01\n\x19\x46orecastLinkCapacityReply\x12 \n\x07link_id\x18\x01 \x01(\x0b\x32\x0f.context.LinkId\x12\x1b\n\x13total_capacity_gbps\x18\x02 \x01(\x02\x12\"\n\x1a\x63urrent_used_capacity_gbps\x18\x03 \x01(\x02\x12#\n\x1b\x66orecast_used_capacity_gbps\x18\x04 \x01(\x02\"l\n\x1f\x46orecastTopologyCapacityRequest\x12(\n\x0btopology_id\x18\x01 \x01(\x0b\x32\x13.context.TopologyId\x12\x1f\n\x17\x66orecast_window_seconds\x18\x02 \x01(\x02\"_\n\x1d\x46orecastTopologyCapacityReply\x12>\n\x0flink_capacities\x18\x01 \x03(\x0b\x32%.forecaster.ForecastLinkCapacityReply2\xf3\x01\n\x11\x46orecasterService\x12h\n\x14\x46orecastLinkCapacity\x12\'.forecaster.ForecastLinkCapacityRequest\x1a%.forecaster.ForecastLinkCapacityReply\"\x00\x12t\n\x18\x46orecastTopologyCapacity\x12+.forecaster.ForecastTopologyCapacityRequest\x1a).forecaster.ForecastTopologyCapacityReply\"\x00\x62\x06proto3') + + + +_FORECASTLINKCAPACITYREQUEST = DESCRIPTOR.message_types_by_name['ForecastLinkCapacityRequest'] +_FORECASTLINKCAPACITYREPLY = DESCRIPTOR.message_types_by_name['ForecastLinkCapacityReply'] +_FORECASTTOPOLOGYCAPACITYREQUEST = DESCRIPTOR.message_types_by_name['ForecastTopologyCapacityRequest'] +_FORECASTTOPOLOGYCAPACITYREPLY = DESCRIPTOR.message_types_by_name['ForecastTopologyCapacityReply'] +ForecastLinkCapacityRequest = _reflection.GeneratedProtocolMessageType('ForecastLinkCapacityRequest', (_message.Message,), { + 'DESCRIPTOR' : _FORECASTLINKCAPACITYREQUEST, + '__module__' : 'forecaster_pb2' + # @@protoc_insertion_point(class_scope:forecaster.ForecastLinkCapacityRequest) + }) +_sym_db.RegisterMessage(ForecastLinkCapacityRequest) + +ForecastLinkCapacityReply = _reflection.GeneratedProtocolMessageType('ForecastLinkCapacityReply', (_message.Message,), { + 'DESCRIPTOR' : _FORECASTLINKCAPACITYREPLY, + '__module__' : 'forecaster_pb2' + # @@protoc_insertion_point(class_scope:forecaster.ForecastLinkCapacityReply) + }) +_sym_db.RegisterMessage(ForecastLinkCapacityReply) + +ForecastTopologyCapacityRequest = _reflection.GeneratedProtocolMessageType('ForecastTopologyCapacityRequest', (_message.Message,), { + 'DESCRIPTOR' : _FORECASTTOPOLOGYCAPACITYREQUEST, + '__module__' : 'forecaster_pb2' + # @@protoc_insertion_point(class_scope:forecaster.ForecastTopologyCapacityRequest) + }) +_sym_db.RegisterMessage(ForecastTopologyCapacityRequest) + +ForecastTopologyCapacityReply = _reflection.GeneratedProtocolMessageType('ForecastTopologyCapacityReply', (_message.Message,), { + 'DESCRIPTOR' : _FORECASTTOPOLOGYCAPACITYREPLY, + '__module__' : 'forecaster_pb2' + # @@protoc_insertion_point(class_scope:forecaster.ForecastTopologyCapacityReply) + }) +_sym_db.RegisterMessage(ForecastTopologyCapacityReply) + +_FORECASTERSERVICE = DESCRIPTOR.services_by_name['ForecasterService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _FORECASTLINKCAPACITYREQUEST._serialized_start=47 + _FORECASTLINKCAPACITYREQUEST._serialized_end=143 + _FORECASTLINKCAPACITYREPLY._serialized_start=146 + _FORECASTLINKCAPACITYREPLY._serialized_end=309 + _FORECASTTOPOLOGYCAPACITYREQUEST._serialized_start=311 + _FORECASTTOPOLOGYCAPACITYREQUEST._serialized_end=419 + _FORECASTTOPOLOGYCAPACITYREPLY._serialized_start=421 + _FORECASTTOPOLOGYCAPACITYREPLY._serialized_end=516 + _FORECASTERSERVICE._serialized_start=519 + _FORECASTERSERVICE._serialized_end=762 +# @@protoc_insertion_point(module_scope) diff --git a/proto/forecaster_pb2_grpc.py b/proto/forecaster_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..166ed06ccefd66a3fd7c9dc92c41b9f1a8c466ee --- /dev/null +++ b/proto/forecaster_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import forecaster_pb2 as forecaster__pb2 + + +class ForecasterServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ForecastLinkCapacity = channel.unary_unary( + '/forecaster.ForecasterService/ForecastLinkCapacity', + request_serializer=forecaster__pb2.ForecastLinkCapacityRequest.SerializeToString, + response_deserializer=forecaster__pb2.ForecastLinkCapacityReply.FromString, + ) + self.ForecastTopologyCapacity = channel.unary_unary( + '/forecaster.ForecasterService/ForecastTopologyCapacity', + request_serializer=forecaster__pb2.ForecastTopologyCapacityRequest.SerializeToString, + response_deserializer=forecaster__pb2.ForecastTopologyCapacityReply.FromString, + ) + + +class ForecasterServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ForecastLinkCapacity(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ForecastTopologyCapacity(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ForecasterServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ForecastLinkCapacity': grpc.unary_unary_rpc_method_handler( + servicer.ForecastLinkCapacity, + request_deserializer=forecaster__pb2.ForecastLinkCapacityRequest.FromString, + response_serializer=forecaster__pb2.ForecastLinkCapacityReply.SerializeToString, + ), + 'ForecastTopologyCapacity': grpc.unary_unary_rpc_method_handler( + servicer.ForecastTopologyCapacity, + request_deserializer=forecaster__pb2.ForecastTopologyCapacityRequest.FromString, + response_serializer=forecaster__pb2.ForecastTopologyCapacityReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'forecaster.ForecasterService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ForecasterService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ForecastLinkCapacity(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/forecaster.ForecasterService/ForecastLinkCapacity', + forecaster__pb2.ForecastLinkCapacityRequest.SerializeToString, + forecaster__pb2.ForecastLinkCapacityReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ForecastTopologyCapacity(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/forecaster.ForecasterService/ForecastTopologyCapacity', + forecaster__pb2.ForecastTopologyCapacityRequest.SerializeToString, + forecaster__pb2.ForecastTopologyCapacityReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/health_pb2.py b/proto/health_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..5525116efc3d28d9ec2a4e942df0f22fb6ce0fc3 --- /dev/null +++ b/proto/health_pb2.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: health.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0chealth.proto\x12\x0egrpc.health.v1\"%\n\x12HealthCheckRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\"\xa9\x01\n\x13HealthCheckResponse\x12\x41\n\x06status\x18\x01 \x01(\x0e\x32\x31.grpc.health.v1.HealthCheckResponse.ServingStatus\"O\n\rServingStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0f\n\x0bNOT_SERVING\x10\x02\x12\x13\n\x0fSERVICE_UNKNOWN\x10\x03\x32\xae\x01\n\x06Health\x12P\n\x05\x43heck\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse\x12R\n\x05Watch\x12\".grpc.health.v1.HealthCheckRequest\x1a#.grpc.health.v1.HealthCheckResponse0\x01\x62\x06proto3') + + + +_HEALTHCHECKREQUEST = DESCRIPTOR.message_types_by_name['HealthCheckRequest'] +_HEALTHCHECKRESPONSE = DESCRIPTOR.message_types_by_name['HealthCheckResponse'] +_HEALTHCHECKRESPONSE_SERVINGSTATUS = _HEALTHCHECKRESPONSE.enum_types_by_name['ServingStatus'] +HealthCheckRequest = _reflection.GeneratedProtocolMessageType('HealthCheckRequest', (_message.Message,), { + 'DESCRIPTOR' : _HEALTHCHECKREQUEST, + '__module__' : 'health_pb2' + # @@protoc_insertion_point(class_scope:grpc.health.v1.HealthCheckRequest) + }) +_sym_db.RegisterMessage(HealthCheckRequest) + +HealthCheckResponse = _reflection.GeneratedProtocolMessageType('HealthCheckResponse', (_message.Message,), { + 'DESCRIPTOR' : _HEALTHCHECKRESPONSE, + '__module__' : 'health_pb2' + # @@protoc_insertion_point(class_scope:grpc.health.v1.HealthCheckResponse) + }) +_sym_db.RegisterMessage(HealthCheckResponse) + +_HEALTH = DESCRIPTOR.services_by_name['Health'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _HEALTHCHECKREQUEST._serialized_start=32 + _HEALTHCHECKREQUEST._serialized_end=69 + _HEALTHCHECKRESPONSE._serialized_start=72 + _HEALTHCHECKRESPONSE._serialized_end=241 + _HEALTHCHECKRESPONSE_SERVINGSTATUS._serialized_start=162 + _HEALTHCHECKRESPONSE_SERVINGSTATUS._serialized_end=241 + _HEALTH._serialized_start=244 + _HEALTH._serialized_end=418 +# @@protoc_insertion_point(module_scope) diff --git a/proto/health_pb2_grpc.py b/proto/health_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..33c1d2ce5149a15523f15fe18108fb52de32b84a --- /dev/null +++ b/proto/health_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import health_pb2 as health__pb2 + + +class HealthStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Check = channel.unary_unary( + '/grpc.health.v1.Health/Check', + request_serializer=health__pb2.HealthCheckRequest.SerializeToString, + response_deserializer=health__pb2.HealthCheckResponse.FromString, + ) + self.Watch = channel.unary_stream( + '/grpc.health.v1.Health/Watch', + request_serializer=health__pb2.HealthCheckRequest.SerializeToString, + response_deserializer=health__pb2.HealthCheckResponse.FromString, + ) + + +class HealthServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Check(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Watch(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_HealthServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Check': grpc.unary_unary_rpc_method_handler( + servicer.Check, + request_deserializer=health__pb2.HealthCheckRequest.FromString, + response_serializer=health__pb2.HealthCheckResponse.SerializeToString, + ), + 'Watch': grpc.unary_stream_rpc_method_handler( + servicer.Watch, + request_deserializer=health__pb2.HealthCheckRequest.FromString, + response_serializer=health__pb2.HealthCheckResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'grpc.health.v1.Health', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Health(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Check(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/grpc.health.v1.Health/Check', + health__pb2.HealthCheckRequest.SerializeToString, + health__pb2.HealthCheckResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Watch(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/grpc.health.v1.Health/Watch', + health__pb2.HealthCheckRequest.SerializeToString, + health__pb2.HealthCheckResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/interdomain_pb2.py b/proto/interdomain_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..84880e3ae95fd93c571f92e2ca852b547250c205 --- /dev/null +++ b/proto/interdomain_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: interdomain.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11interdomain.proto\x12\x0binterdomain\x1a\rcontext.proto2\xe1\x03\n\x12InterdomainService\x12L\n\x0c\x41uthenticate\x12\x1b.context.TeraFlowController\x1a\x1d.context.AuthenticationResult\"\x00\x12\x32\n\x0cRequestSlice\x12\x0e.context.Slice\x1a\x10.context.SliceId\"\x00\x12\x31\n\x0bLookUpSlice\x12\x0e.context.Slice\x1a\x10.context.SliceId\"\x00\x12\x39\n\x15OrderSliceFromCatalog\x12\x0e.context.Slice\x1a\x0e.context.Slice\"\x00\x12>\n\x1a\x43reateSliceAndAddToCatalog\x12\x0e.context.Slice\x1a\x0e.context.Slice\"\x00\x12\x37\n\x11OrderSliceWithSLA\x12\x0e.context.Slice\x1a\x10.context.SliceId\"\x00\x12/\n\x0bUpdateSlice\x12\x0e.context.Slice\x1a\x0e.context.Slice\"\x00\x12\x31\n\x0b\x44\x65leteSlice\x12\x10.context.SliceId\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_INTERDOMAINSERVICE = DESCRIPTOR.services_by_name['InterdomainService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _INTERDOMAINSERVICE._serialized_start=50 + _INTERDOMAINSERVICE._serialized_end=531 +# @@protoc_insertion_point(module_scope) diff --git a/proto/interdomain_pb2_grpc.py b/proto/interdomain_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..7216741bd3bcd519b6223e20925ac511a7847769 --- /dev/null +++ b/proto/interdomain_pb2_grpc.py @@ -0,0 +1,297 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 + + +class InterdomainServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Authenticate = channel.unary_unary( + '/interdomain.InterdomainService/Authenticate', + request_serializer=context__pb2.TeraFlowController.SerializeToString, + response_deserializer=context__pb2.AuthenticationResult.FromString, + ) + self.RequestSlice = channel.unary_unary( + '/interdomain.InterdomainService/RequestSlice', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.SliceId.FromString, + ) + self.LookUpSlice = channel.unary_unary( + '/interdomain.InterdomainService/LookUpSlice', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.SliceId.FromString, + ) + self.OrderSliceFromCatalog = channel.unary_unary( + '/interdomain.InterdomainService/OrderSliceFromCatalog', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.Slice.FromString, + ) + self.CreateSliceAndAddToCatalog = channel.unary_unary( + '/interdomain.InterdomainService/CreateSliceAndAddToCatalog', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.Slice.FromString, + ) + self.OrderSliceWithSLA = channel.unary_unary( + '/interdomain.InterdomainService/OrderSliceWithSLA', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.SliceId.FromString, + ) + self.UpdateSlice = channel.unary_unary( + '/interdomain.InterdomainService/UpdateSlice', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.Slice.FromString, + ) + self.DeleteSlice = channel.unary_unary( + '/interdomain.InterdomainService/DeleteSlice', + request_serializer=context__pb2.SliceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class InterdomainServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Authenticate(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RequestSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LookUpSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def OrderSliceFromCatalog(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateSliceAndAddToCatalog(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def OrderSliceWithSLA(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_InterdomainServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Authenticate': grpc.unary_unary_rpc_method_handler( + servicer.Authenticate, + request_deserializer=context__pb2.TeraFlowController.FromString, + response_serializer=context__pb2.AuthenticationResult.SerializeToString, + ), + 'RequestSlice': grpc.unary_unary_rpc_method_handler( + servicer.RequestSlice, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.SliceId.SerializeToString, + ), + 'LookUpSlice': grpc.unary_unary_rpc_method_handler( + servicer.LookUpSlice, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.SliceId.SerializeToString, + ), + 'OrderSliceFromCatalog': grpc.unary_unary_rpc_method_handler( + servicer.OrderSliceFromCatalog, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.Slice.SerializeToString, + ), + 'CreateSliceAndAddToCatalog': grpc.unary_unary_rpc_method_handler( + servicer.CreateSliceAndAddToCatalog, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.Slice.SerializeToString, + ), + 'OrderSliceWithSLA': grpc.unary_unary_rpc_method_handler( + servicer.OrderSliceWithSLA, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.SliceId.SerializeToString, + ), + 'UpdateSlice': grpc.unary_unary_rpc_method_handler( + servicer.UpdateSlice, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.Slice.SerializeToString, + ), + 'DeleteSlice': grpc.unary_unary_rpc_method_handler( + servicer.DeleteSlice, + request_deserializer=context__pb2.SliceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'interdomain.InterdomainService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class InterdomainService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Authenticate(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/Authenticate', + context__pb2.TeraFlowController.SerializeToString, + context__pb2.AuthenticationResult.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RequestSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/RequestSlice', + context__pb2.Slice.SerializeToString, + context__pb2.SliceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def LookUpSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/LookUpSlice', + context__pb2.Slice.SerializeToString, + context__pb2.SliceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def OrderSliceFromCatalog(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/OrderSliceFromCatalog', + context__pb2.Slice.SerializeToString, + context__pb2.Slice.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateSliceAndAddToCatalog(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/CreateSliceAndAddToCatalog', + context__pb2.Slice.SerializeToString, + context__pb2.Slice.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def OrderSliceWithSLA(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/OrderSliceWithSLA', + context__pb2.Slice.SerializeToString, + context__pb2.SliceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/UpdateSlice', + context__pb2.Slice.SerializeToString, + context__pb2.Slice.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/interdomain.InterdomainService/DeleteSlice', + context__pb2.SliceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/kpi_manager_pb2.py b/proto/kpi_manager_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..b04e523db58d1d1ea3ab3fafb546de3353ef327f --- /dev/null +++ b/proto/kpi_manager_pb2.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: kpi_manager.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import kpi_sample_types_pb2 as kpi__sample__types__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11kpi_manager.proto\x12\x0bkpi_manager\x1a\rcontext.proto\x1a\x16kpi_sample_types.proto\"&\n\x05KpiId\x12\x1d\n\x06kpi_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"\xf2\x02\n\rKpiDescriptor\x12\"\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x12.kpi_manager.KpiId\x12\x17\n\x0fkpi_description\x18\x02 \x01(\t\x12\x38\n\x0fkpi_sample_type\x18\x03 \x01(\x0e\x32\x1f.kpi_sample_types.KpiSampleType\x12$\n\tdevice_id\x18\x04 \x01(\x0b\x32\x11.context.DeviceId\x12(\n\x0b\x65ndpoint_id\x18\x05 \x01(\x0b\x32\x13.context.EndPointId\x12&\n\nservice_id\x18\x06 \x01(\x0b\x32\x12.context.ServiceId\x12\"\n\x08slice_id\x18\x07 \x01(\x0b\x32\x10.context.SliceId\x12,\n\rconnection_id\x18\x08 \x01(\x0b\x32\x15.context.ConnectionId\x12 \n\x07link_id\x18\t \x01(\x0b\x32\x0f.context.LinkId\"\xdf\x02\n\x13KpiDescriptorFilter\x12\"\n\x06kpi_id\x18\x01 \x03(\x0b\x32\x12.kpi_manager.KpiId\x12\x38\n\x0fkpi_sample_type\x18\x02 \x03(\x0e\x32\x1f.kpi_sample_types.KpiSampleType\x12$\n\tdevice_id\x18\x03 \x03(\x0b\x32\x11.context.DeviceId\x12(\n\x0b\x65ndpoint_id\x18\x04 \x03(\x0b\x32\x13.context.EndPointId\x12&\n\nservice_id\x18\x05 \x03(\x0b\x32\x12.context.ServiceId\x12\"\n\x08slice_id\x18\x06 \x03(\x0b\x32\x10.context.SliceId\x12,\n\rconnection_id\x18\x07 \x03(\x0b\x32\x15.context.ConnectionId\x12 \n\x07link_id\x18\x08 \x03(\x0b\x32\x0f.context.LinkId\"L\n\x11KpiDescriptorList\x12\x37\n\x13kpi_descriptor_list\x18\x01 \x03(\x0b\x32\x1a.kpi_manager.KpiDescriptor2\xb7\x02\n\x11KpiManagerService\x12\x44\n\x10SetKpiDescriptor\x12\x1a.kpi_manager.KpiDescriptor\x1a\x12.kpi_manager.KpiId\"\x00\x12;\n\x13\x44\x65leteKpiDescriptor\x12\x12.kpi_manager.KpiId\x1a\x0e.context.Empty\"\x00\x12\x44\n\x10GetKpiDescriptor\x12\x12.kpi_manager.KpiId\x1a\x1a.kpi_manager.KpiDescriptor\"\x00\x12Y\n\x13SelectKpiDescriptor\x12 .kpi_manager.KpiDescriptorFilter\x1a\x1e.kpi_manager.KpiDescriptorList\"\x00\x62\x06proto3') + + + +_KPIID = DESCRIPTOR.message_types_by_name['KpiId'] +_KPIDESCRIPTOR = DESCRIPTOR.message_types_by_name['KpiDescriptor'] +_KPIDESCRIPTORFILTER = DESCRIPTOR.message_types_by_name['KpiDescriptorFilter'] +_KPIDESCRIPTORLIST = DESCRIPTOR.message_types_by_name['KpiDescriptorList'] +KpiId = _reflection.GeneratedProtocolMessageType('KpiId', (_message.Message,), { + 'DESCRIPTOR' : _KPIID, + '__module__' : 'kpi_manager_pb2' + # @@protoc_insertion_point(class_scope:kpi_manager.KpiId) + }) +_sym_db.RegisterMessage(KpiId) + +KpiDescriptor = _reflection.GeneratedProtocolMessageType('KpiDescriptor', (_message.Message,), { + 'DESCRIPTOR' : _KPIDESCRIPTOR, + '__module__' : 'kpi_manager_pb2' + # @@protoc_insertion_point(class_scope:kpi_manager.KpiDescriptor) + }) +_sym_db.RegisterMessage(KpiDescriptor) + +KpiDescriptorFilter = _reflection.GeneratedProtocolMessageType('KpiDescriptorFilter', (_message.Message,), { + 'DESCRIPTOR' : _KPIDESCRIPTORFILTER, + '__module__' : 'kpi_manager_pb2' + # @@protoc_insertion_point(class_scope:kpi_manager.KpiDescriptorFilter) + }) +_sym_db.RegisterMessage(KpiDescriptorFilter) + +KpiDescriptorList = _reflection.GeneratedProtocolMessageType('KpiDescriptorList', (_message.Message,), { + 'DESCRIPTOR' : _KPIDESCRIPTORLIST, + '__module__' : 'kpi_manager_pb2' + # @@protoc_insertion_point(class_scope:kpi_manager.KpiDescriptorList) + }) +_sym_db.RegisterMessage(KpiDescriptorList) + +_KPIMANAGERSERVICE = DESCRIPTOR.services_by_name['KpiManagerService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _KPIID._serialized_start=73 + _KPIID._serialized_end=111 + _KPIDESCRIPTOR._serialized_start=114 + _KPIDESCRIPTOR._serialized_end=484 + _KPIDESCRIPTORFILTER._serialized_start=487 + _KPIDESCRIPTORFILTER._serialized_end=838 + _KPIDESCRIPTORLIST._serialized_start=840 + _KPIDESCRIPTORLIST._serialized_end=916 + _KPIMANAGERSERVICE._serialized_start=919 + _KPIMANAGERSERVICE._serialized_end=1230 +# @@protoc_insertion_point(module_scope) diff --git a/proto/kpi_manager_pb2_grpc.py b/proto/kpi_manager_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..e8e8668fb6deb3b785f8783f00355d9c7ab5f5ae --- /dev/null +++ b/proto/kpi_manager_pb2_grpc.py @@ -0,0 +1,166 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import kpi_manager_pb2 as kpi__manager__pb2 + + +class KpiManagerServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.SetKpiDescriptor = channel.unary_unary( + '/kpi_manager.KpiManagerService/SetKpiDescriptor', + request_serializer=kpi__manager__pb2.KpiDescriptor.SerializeToString, + response_deserializer=kpi__manager__pb2.KpiId.FromString, + ) + self.DeleteKpiDescriptor = channel.unary_unary( + '/kpi_manager.KpiManagerService/DeleteKpiDescriptor', + request_serializer=kpi__manager__pb2.KpiId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetKpiDescriptor = channel.unary_unary( + '/kpi_manager.KpiManagerService/GetKpiDescriptor', + request_serializer=kpi__manager__pb2.KpiId.SerializeToString, + response_deserializer=kpi__manager__pb2.KpiDescriptor.FromString, + ) + self.SelectKpiDescriptor = channel.unary_unary( + '/kpi_manager.KpiManagerService/SelectKpiDescriptor', + request_serializer=kpi__manager__pb2.KpiDescriptorFilter.SerializeToString, + response_deserializer=kpi__manager__pb2.KpiDescriptorList.FromString, + ) + + +class KpiManagerServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def SetKpiDescriptor(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteKpiDescriptor(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetKpiDescriptor(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SelectKpiDescriptor(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_KpiManagerServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'SetKpiDescriptor': grpc.unary_unary_rpc_method_handler( + servicer.SetKpiDescriptor, + request_deserializer=kpi__manager__pb2.KpiDescriptor.FromString, + response_serializer=kpi__manager__pb2.KpiId.SerializeToString, + ), + 'DeleteKpiDescriptor': grpc.unary_unary_rpc_method_handler( + servicer.DeleteKpiDescriptor, + request_deserializer=kpi__manager__pb2.KpiId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetKpiDescriptor': grpc.unary_unary_rpc_method_handler( + servicer.GetKpiDescriptor, + request_deserializer=kpi__manager__pb2.KpiId.FromString, + response_serializer=kpi__manager__pb2.KpiDescriptor.SerializeToString, + ), + 'SelectKpiDescriptor': grpc.unary_unary_rpc_method_handler( + servicer.SelectKpiDescriptor, + request_deserializer=kpi__manager__pb2.KpiDescriptorFilter.FromString, + response_serializer=kpi__manager__pb2.KpiDescriptorList.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'kpi_manager.KpiManagerService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class KpiManagerService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def SetKpiDescriptor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/kpi_manager.KpiManagerService/SetKpiDescriptor', + kpi__manager__pb2.KpiDescriptor.SerializeToString, + kpi__manager__pb2.KpiId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteKpiDescriptor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/kpi_manager.KpiManagerService/DeleteKpiDescriptor', + kpi__manager__pb2.KpiId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetKpiDescriptor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/kpi_manager.KpiManagerService/GetKpiDescriptor', + kpi__manager__pb2.KpiId.SerializeToString, + kpi__manager__pb2.KpiDescriptor.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SelectKpiDescriptor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/kpi_manager.KpiManagerService/SelectKpiDescriptor', + kpi__manager__pb2.KpiDescriptorFilter.SerializeToString, + kpi__manager__pb2.KpiDescriptorList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/kpi_sample_types_pb2.py b/proto/kpi_sample_types_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..0b90a0ef70fc9eff26434df494f59ea768ce5a2a --- /dev/null +++ b/proto/kpi_sample_types_pb2.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: kpi_sample_types.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16kpi_sample_types.proto\x12\x10kpi_sample_types*\xb0\x05\n\rKpiSampleType\x12\x19\n\x15KPISAMPLETYPE_UNKNOWN\x10\x00\x12%\n!KPISAMPLETYPE_PACKETS_TRANSMITTED\x10\x65\x12\"\n\x1eKPISAMPLETYPE_PACKETS_RECEIVED\x10\x66\x12!\n\x1dKPISAMPLETYPE_PACKETS_DROPPED\x10g\x12$\n\x1fKPISAMPLETYPE_BYTES_TRANSMITTED\x10\xc9\x01\x12!\n\x1cKPISAMPLETYPE_BYTES_RECEIVED\x10\xca\x01\x12 \n\x1bKPISAMPLETYPE_BYTES_DROPPED\x10\xcb\x01\x12+\n&KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS\x10\xad\x02\x12*\n%KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS\x10\xae\x02\x12 \n\x1bKPISAMPLETYPE_ML_CONFIDENCE\x10\x91\x03\x12*\n%KPISAMPLETYPE_OPTICAL_SECURITY_STATUS\x10\xf5\x03\x12)\n$KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS\x10\xd9\x04\x12*\n%KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS\x10\xda\x04\x12&\n!KPISAMPLETYPE_L3_UNIQUE_ATTACKERS\x10\xdb\x04\x12\x30\n+KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS\x10\xdc\x04\x12,\n\'KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO\x10\xdd\x04\x12%\n KPISAMPLETYPE_SERVICE_LATENCY_MS\x10\xbd\x05\x62\x06proto3') + +_KPISAMPLETYPE = DESCRIPTOR.enum_types_by_name['KpiSampleType'] +KpiSampleType = enum_type_wrapper.EnumTypeWrapper(_KPISAMPLETYPE) +KPISAMPLETYPE_UNKNOWN = 0 +KPISAMPLETYPE_PACKETS_TRANSMITTED = 101 +KPISAMPLETYPE_PACKETS_RECEIVED = 102 +KPISAMPLETYPE_PACKETS_DROPPED = 103 +KPISAMPLETYPE_BYTES_TRANSMITTED = 201 +KPISAMPLETYPE_BYTES_RECEIVED = 202 +KPISAMPLETYPE_BYTES_DROPPED = 203 +KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS = 301 +KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS = 302 +KPISAMPLETYPE_ML_CONFIDENCE = 401 +KPISAMPLETYPE_OPTICAL_SECURITY_STATUS = 501 +KPISAMPLETYPE_L3_UNIQUE_ATTACK_CONNS = 601 +KPISAMPLETYPE_L3_TOTAL_DROPPED_PACKTS = 602 +KPISAMPLETYPE_L3_UNIQUE_ATTACKERS = 603 +KPISAMPLETYPE_L3_UNIQUE_COMPROMISED_CLIENTS = 604 +KPISAMPLETYPE_L3_SECURITY_STATUS_CRYPTO = 605 +KPISAMPLETYPE_SERVICE_LATENCY_MS = 701 + + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _KPISAMPLETYPE._serialized_start=45 + _KPISAMPLETYPE._serialized_end=733 +# @@protoc_insertion_point(module_scope) diff --git a/proto/kpi_sample_types_pb2_grpc.py b/proto/kpi_sample_types_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/proto/kpi_sample_types_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/proto/kpi_value_api_pb2.py b/proto/kpi_value_api_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..aefa0338161cce14e1b6ad6dd41e3c871a1667af --- /dev/null +++ b/proto/kpi_value_api_pb2.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: kpi_value_api.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import kpi_manager_pb2 as kpi__manager__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13kpi_value_api.proto\x12\rkpi_value_api\x1a\rcontext.proto\x1a\x11kpi_manager.proto\"\x8a\x01\n\x08KpiValue\x12\"\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x12.kpi_manager.KpiId\x12%\n\ttimestamp\x18\x02 \x01(\x0b\x32\x12.context.Timestamp\x12\x33\n\x0ekpi_value_type\x18\x03 \x01(\x0b\x32\x1b.kpi_value_api.KpiValueType\"?\n\x0cKpiValueList\x12/\n\x0ekpi_value_list\x18\x01 \x03(\x0b\x32\x17.kpi_value_api.KpiValue\"\xa5\x01\n\x0cKpiValueType\x12\x12\n\x08int32Val\x18\x01 \x01(\x05H\x00\x12\x13\n\tuint32Val\x18\x02 \x01(\rH\x00\x12\x12\n\x08int64Val\x18\x03 \x01(\x03H\x00\x12\x13\n\tuint64Val\x18\x04 \x01(\x04H\x00\x12\x12\n\x08\x66loatVal\x18\x05 \x01(\x02H\x00\x12\x13\n\tstringVal\x18\x06 \x01(\tH\x00\x12\x11\n\x07\x62oolVal\x18\x07 \x01(\x08H\x00\x42\x07\n\x05value\"\x8c\x01\n\x0eKpiValueFilter\x12\"\n\x06kpi_id\x18\x01 \x03(\x0b\x32\x12.kpi_manager.KpiId\x12+\n\x0fstart_timestamp\x18\x02 \x03(\x0b\x32\x12.context.Timestamp\x12)\n\rend_timestamp\x18\x03 \x03(\x0b\x32\x12.context.Timestamp2\xa6\x01\n\x12KpiValueAPIService\x12?\n\x0eStoreKpiValues\x12\x1b.kpi_value_api.KpiValueList\x1a\x0e.context.Empty\"\x00\x12O\n\x0fSelectKpiValues\x12\x1d.kpi_value_api.KpiValueFilter\x1a\x1b.kpi_value_api.KpiValueList\"\x00\x62\x06proto3') + + + +_KPIVALUE = DESCRIPTOR.message_types_by_name['KpiValue'] +_KPIVALUELIST = DESCRIPTOR.message_types_by_name['KpiValueList'] +_KPIVALUETYPE = DESCRIPTOR.message_types_by_name['KpiValueType'] +_KPIVALUEFILTER = DESCRIPTOR.message_types_by_name['KpiValueFilter'] +KpiValue = _reflection.GeneratedProtocolMessageType('KpiValue', (_message.Message,), { + 'DESCRIPTOR' : _KPIVALUE, + '__module__' : 'kpi_value_api_pb2' + # @@protoc_insertion_point(class_scope:kpi_value_api.KpiValue) + }) +_sym_db.RegisterMessage(KpiValue) + +KpiValueList = _reflection.GeneratedProtocolMessageType('KpiValueList', (_message.Message,), { + 'DESCRIPTOR' : _KPIVALUELIST, + '__module__' : 'kpi_value_api_pb2' + # @@protoc_insertion_point(class_scope:kpi_value_api.KpiValueList) + }) +_sym_db.RegisterMessage(KpiValueList) + +KpiValueType = _reflection.GeneratedProtocolMessageType('KpiValueType', (_message.Message,), { + 'DESCRIPTOR' : _KPIVALUETYPE, + '__module__' : 'kpi_value_api_pb2' + # @@protoc_insertion_point(class_scope:kpi_value_api.KpiValueType) + }) +_sym_db.RegisterMessage(KpiValueType) + +KpiValueFilter = _reflection.GeneratedProtocolMessageType('KpiValueFilter', (_message.Message,), { + 'DESCRIPTOR' : _KPIVALUEFILTER, + '__module__' : 'kpi_value_api_pb2' + # @@protoc_insertion_point(class_scope:kpi_value_api.KpiValueFilter) + }) +_sym_db.RegisterMessage(KpiValueFilter) + +_KPIVALUEAPISERVICE = DESCRIPTOR.services_by_name['KpiValueAPIService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _KPIVALUE._serialized_start=73 + _KPIVALUE._serialized_end=211 + _KPIVALUELIST._serialized_start=213 + _KPIVALUELIST._serialized_end=276 + _KPIVALUETYPE._serialized_start=279 + _KPIVALUETYPE._serialized_end=444 + _KPIVALUEFILTER._serialized_start=447 + _KPIVALUEFILTER._serialized_end=587 + _KPIVALUEAPISERVICE._serialized_start=590 + _KPIVALUEAPISERVICE._serialized_end=756 +# @@protoc_insertion_point(module_scope) diff --git a/proto/kpi_value_api_pb2_grpc.py b/proto/kpi_value_api_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..b362e4da07dacf62de7e9867304749d7dd4c80e2 --- /dev/null +++ b/proto/kpi_value_api_pb2_grpc.py @@ -0,0 +1,100 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import kpi_value_api_pb2 as kpi__value__api__pb2 + + +class KpiValueAPIServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.StoreKpiValues = channel.unary_unary( + '/kpi_value_api.KpiValueAPIService/StoreKpiValues', + request_serializer=kpi__value__api__pb2.KpiValueList.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.SelectKpiValues = channel.unary_unary( + '/kpi_value_api.KpiValueAPIService/SelectKpiValues', + request_serializer=kpi__value__api__pb2.KpiValueFilter.SerializeToString, + response_deserializer=kpi__value__api__pb2.KpiValueList.FromString, + ) + + +class KpiValueAPIServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def StoreKpiValues(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SelectKpiValues(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_KpiValueAPIServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'StoreKpiValues': grpc.unary_unary_rpc_method_handler( + servicer.StoreKpiValues, + request_deserializer=kpi__value__api__pb2.KpiValueList.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'SelectKpiValues': grpc.unary_unary_rpc_method_handler( + servicer.SelectKpiValues, + request_deserializer=kpi__value__api__pb2.KpiValueFilter.FromString, + response_serializer=kpi__value__api__pb2.KpiValueList.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'kpi_value_api.KpiValueAPIService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class KpiValueAPIService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def StoreKpiValues(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/kpi_value_api.KpiValueAPIService/StoreKpiValues', + kpi__value__api__pb2.KpiValueList.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SelectKpiValues(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/kpi_value_api.KpiValueAPIService/SelectKpiValues', + kpi__value__api__pb2.KpiValueFilter.SerializeToString, + kpi__value__api__pb2.KpiValueList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/l3_attackmitigator_pb2.py b/proto/l3_attackmitigator_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..30acd4affad41e47610fdc9a0ea4a7b833f53281 --- /dev/null +++ b/proto/l3_attackmitigator_pb2.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: l3_attackmitigator.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import l3_centralizedattackdetector_pb2 as l3__centralizedattackdetector__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18l3_attackmitigator.proto\x12\x12l3_attackmitigator\x1a\rcontext.proto\x1a\"l3_centralizedattackdetector.proto\"\xc5\x02\n\x17L3AttackmitigatorOutput\x12\x12\n\nconfidence\x18\x01 \x01(\x02\x12\x11\n\ttimestamp\x18\x02 \x01(\t\x12\x0c\n\x04ip_o\x18\x03 \x01(\t\x12\x0c\n\x04ip_d\x18\x04 \x01(\t\x12\x10\n\x08tag_name\x18\x05 \x01(\t\x12\x0b\n\x03tag\x18\x06 \x01(\x05\x12\x0f\n\x07\x66low_id\x18\x07 \x01(\t\x12\x10\n\x08protocol\x18\x08 \x01(\t\x12\x0e\n\x06port_o\x18\t \x01(\t\x12\x0e\n\x06port_d\x18\n \x01(\t\x12\r\n\x05ml_id\x18\x0b \x01(\t\x12&\n\nservice_id\x18\x0c \x01(\x0b\x32\x12.context.ServiceId\x12(\n\x0b\x65ndpoint_id\x18\r \x01(\x0b\x32\x13.context.EndPointId\x12\x12\n\ntime_start\x18\x0e \x01(\x02\x12\x10\n\x08time_end\x18\x0f \x01(\x02\"2\n\x08\x41\x43LRules\x12&\n\tacl_rules\x18\x01 \x03(\x0b\x32\x13.context.ConfigRule2\x80\x02\n\x11L3Attackmitigator\x12o\n\x11PerformMitigation\x12+.l3_attackmitigator.L3AttackmitigatorOutput\x1a+.l3_centralizedattackdetector.StatusMessage\"\x00\x12\x31\n\rGetMitigation\x12\x0e.context.Empty\x1a\x0e.context.Empty\"\x00\x12G\n\x15GetConfiguredACLRules\x12\x0e.context.Empty\x1a\x1c.l3_attackmitigator.ACLRules\"\x00\x62\x06proto3') + + + +_L3ATTACKMITIGATOROUTPUT = DESCRIPTOR.message_types_by_name['L3AttackmitigatorOutput'] +_ACLRULES = DESCRIPTOR.message_types_by_name['ACLRules'] +L3AttackmitigatorOutput = _reflection.GeneratedProtocolMessageType('L3AttackmitigatorOutput', (_message.Message,), { + 'DESCRIPTOR' : _L3ATTACKMITIGATOROUTPUT, + '__module__' : 'l3_attackmitigator_pb2' + # @@protoc_insertion_point(class_scope:l3_attackmitigator.L3AttackmitigatorOutput) + }) +_sym_db.RegisterMessage(L3AttackmitigatorOutput) + +ACLRules = _reflection.GeneratedProtocolMessageType('ACLRules', (_message.Message,), { + 'DESCRIPTOR' : _ACLRULES, + '__module__' : 'l3_attackmitigator_pb2' + # @@protoc_insertion_point(class_scope:l3_attackmitigator.ACLRules) + }) +_sym_db.RegisterMessage(ACLRules) + +_L3ATTACKMITIGATOR = DESCRIPTOR.services_by_name['L3Attackmitigator'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _L3ATTACKMITIGATOROUTPUT._serialized_start=100 + _L3ATTACKMITIGATOROUTPUT._serialized_end=425 + _ACLRULES._serialized_start=427 + _ACLRULES._serialized_end=477 + _L3ATTACKMITIGATOR._serialized_start=480 + _L3ATTACKMITIGATOR._serialized_end=736 +# @@protoc_insertion_point(module_scope) diff --git a/proto/l3_attackmitigator_pb2_grpc.py b/proto/l3_attackmitigator_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..438397c06e1aebd8d23fc750a43569cf5cb98d3b --- /dev/null +++ b/proto/l3_attackmitigator_pb2_grpc.py @@ -0,0 +1,134 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import l3_attackmitigator_pb2 as l3__attackmitigator__pb2 +import l3_centralizedattackdetector_pb2 as l3__centralizedattackdetector__pb2 + + +class L3AttackmitigatorStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.PerformMitigation = channel.unary_unary( + '/l3_attackmitigator.L3Attackmitigator/PerformMitigation', + request_serializer=l3__attackmitigator__pb2.L3AttackmitigatorOutput.SerializeToString, + response_deserializer=l3__centralizedattackdetector__pb2.StatusMessage.FromString, + ) + self.GetMitigation = channel.unary_unary( + '/l3_attackmitigator.L3Attackmitigator/GetMitigation', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetConfiguredACLRules = channel.unary_unary( + '/l3_attackmitigator.L3Attackmitigator/GetConfiguredACLRules', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=l3__attackmitigator__pb2.ACLRules.FromString, + ) + + +class L3AttackmitigatorServicer(object): + """Missing associated documentation comment in .proto file.""" + + def PerformMitigation(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetMitigation(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetConfiguredACLRules(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_L3AttackmitigatorServicer_to_server(servicer, server): + rpc_method_handlers = { + 'PerformMitigation': grpc.unary_unary_rpc_method_handler( + servicer.PerformMitigation, + request_deserializer=l3__attackmitigator__pb2.L3AttackmitigatorOutput.FromString, + response_serializer=l3__centralizedattackdetector__pb2.StatusMessage.SerializeToString, + ), + 'GetMitigation': grpc.unary_unary_rpc_method_handler( + servicer.GetMitigation, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetConfiguredACLRules': grpc.unary_unary_rpc_method_handler( + servicer.GetConfiguredACLRules, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=l3__attackmitigator__pb2.ACLRules.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'l3_attackmitigator.L3Attackmitigator', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class L3Attackmitigator(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def PerformMitigation(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/l3_attackmitigator.L3Attackmitigator/PerformMitigation', + l3__attackmitigator__pb2.L3AttackmitigatorOutput.SerializeToString, + l3__centralizedattackdetector__pb2.StatusMessage.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetMitigation(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/l3_attackmitigator.L3Attackmitigator/GetMitigation', + context__pb2.Empty.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetConfiguredACLRules(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/l3_attackmitigator.L3Attackmitigator/GetConfiguredACLRules', + context__pb2.Empty.SerializeToString, + l3__attackmitigator__pb2.ACLRules.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/l3_centralizedattackdetector_pb2.py b/proto/l3_centralizedattackdetector_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..def173864bfdc7668bd91963863854bc7ff32610 --- /dev/null +++ b/proto/l3_centralizedattackdetector_pb2.py @@ -0,0 +1,98 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: l3_centralizedattackdetector.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"l3_centralizedattackdetector.proto\x12\x1cl3_centralizedattackdetector\x1a\rcontext.proto\"\x1a\n\x07\x46\x65\x61ture\x12\x0f\n\x07\x66\x65\x61ture\x18\x01 \x01(\x02\"\xac\x01\n\"L3CentralizedattackdetectorMetrics\x12\x37\n\x08\x66\x65\x61tures\x18\x01 \x03(\x0b\x32%.l3_centralizedattackdetector.Feature\x12M\n\x13\x63onnection_metadata\x18\x02 \x01(\x0b\x32\x30.l3_centralizedattackdetector.ConnectionMetadata\"\xeb\x01\n\x12\x43onnectionMetadata\x12\x0c\n\x04ip_o\x18\x01 \x01(\t\x12\x0e\n\x06port_o\x18\x02 \x01(\t\x12\x0c\n\x04ip_d\x18\x03 \x01(\t\x12\x0e\n\x06port_d\x18\x04 \x01(\t\x12\x0f\n\x07\x66low_id\x18\x05 \x01(\t\x12&\n\nservice_id\x18\x06 \x01(\x0b\x32\x12.context.ServiceId\x12(\n\x0b\x65ndpoint_id\x18\x07 \x01(\x0b\x32\x13.context.EndPointId\x12\x10\n\x08protocol\x18\x08 \x01(\t\x12\x12\n\ntime_start\x18\t \x01(\x02\x12\x10\n\x08time_end\x18\n \x01(\x02\"%\n\x0c\x41utoFeatures\x12\x15\n\rauto_features\x18\x01 \x03(\x02\"z\n%L3CentralizedattackdetectorBatchInput\x12Q\n\x07metrics\x18\x01 \x03(\x0b\x32@.l3_centralizedattackdetector.L3CentralizedattackdetectorMetrics\" \n\rStatusMessage\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x1f\n\tAttackIPs\x12\x12\n\nattack_ips\x18\x01 \x03(\t2\xe2\x03\n\x1bL3Centralizedattackdetector\x12\x8e\x01\n\x1b\x41nalyzeConnectionStatistics\x12@.l3_centralizedattackdetector.L3CentralizedattackdetectorMetrics\x1a+.l3_centralizedattackdetector.StatusMessage\"\x00\x12\x96\x01\n AnalyzeBatchConnectionStatistics\x12\x43.l3_centralizedattackdetector.L3CentralizedattackdetectorBatchInput\x1a+.l3_centralizedattackdetector.StatusMessage\"\x00\x12N\n\x0eGetFeaturesIds\x12\x0e.context.Empty\x1a*.l3_centralizedattackdetector.AutoFeatures\"\x00\x12I\n\x0cSetAttackIPs\x12\'.l3_centralizedattackdetector.AttackIPs\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_FEATURE = DESCRIPTOR.message_types_by_name['Feature'] +_L3CENTRALIZEDATTACKDETECTORMETRICS = DESCRIPTOR.message_types_by_name['L3CentralizedattackdetectorMetrics'] +_CONNECTIONMETADATA = DESCRIPTOR.message_types_by_name['ConnectionMetadata'] +_AUTOFEATURES = DESCRIPTOR.message_types_by_name['AutoFeatures'] +_L3CENTRALIZEDATTACKDETECTORBATCHINPUT = DESCRIPTOR.message_types_by_name['L3CentralizedattackdetectorBatchInput'] +_STATUSMESSAGE = DESCRIPTOR.message_types_by_name['StatusMessage'] +_ATTACKIPS = DESCRIPTOR.message_types_by_name['AttackIPs'] +Feature = _reflection.GeneratedProtocolMessageType('Feature', (_message.Message,), { + 'DESCRIPTOR' : _FEATURE, + '__module__' : 'l3_centralizedattackdetector_pb2' + # @@protoc_insertion_point(class_scope:l3_centralizedattackdetector.Feature) + }) +_sym_db.RegisterMessage(Feature) + +L3CentralizedattackdetectorMetrics = _reflection.GeneratedProtocolMessageType('L3CentralizedattackdetectorMetrics', (_message.Message,), { + 'DESCRIPTOR' : _L3CENTRALIZEDATTACKDETECTORMETRICS, + '__module__' : 'l3_centralizedattackdetector_pb2' + # @@protoc_insertion_point(class_scope:l3_centralizedattackdetector.L3CentralizedattackdetectorMetrics) + }) +_sym_db.RegisterMessage(L3CentralizedattackdetectorMetrics) + +ConnectionMetadata = _reflection.GeneratedProtocolMessageType('ConnectionMetadata', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTIONMETADATA, + '__module__' : 'l3_centralizedattackdetector_pb2' + # @@protoc_insertion_point(class_scope:l3_centralizedattackdetector.ConnectionMetadata) + }) +_sym_db.RegisterMessage(ConnectionMetadata) + +AutoFeatures = _reflection.GeneratedProtocolMessageType('AutoFeatures', (_message.Message,), { + 'DESCRIPTOR' : _AUTOFEATURES, + '__module__' : 'l3_centralizedattackdetector_pb2' + # @@protoc_insertion_point(class_scope:l3_centralizedattackdetector.AutoFeatures) + }) +_sym_db.RegisterMessage(AutoFeatures) + +L3CentralizedattackdetectorBatchInput = _reflection.GeneratedProtocolMessageType('L3CentralizedattackdetectorBatchInput', (_message.Message,), { + 'DESCRIPTOR' : _L3CENTRALIZEDATTACKDETECTORBATCHINPUT, + '__module__' : 'l3_centralizedattackdetector_pb2' + # @@protoc_insertion_point(class_scope:l3_centralizedattackdetector.L3CentralizedattackdetectorBatchInput) + }) +_sym_db.RegisterMessage(L3CentralizedattackdetectorBatchInput) + +StatusMessage = _reflection.GeneratedProtocolMessageType('StatusMessage', (_message.Message,), { + 'DESCRIPTOR' : _STATUSMESSAGE, + '__module__' : 'l3_centralizedattackdetector_pb2' + # @@protoc_insertion_point(class_scope:l3_centralizedattackdetector.StatusMessage) + }) +_sym_db.RegisterMessage(StatusMessage) + +AttackIPs = _reflection.GeneratedProtocolMessageType('AttackIPs', (_message.Message,), { + 'DESCRIPTOR' : _ATTACKIPS, + '__module__' : 'l3_centralizedattackdetector_pb2' + # @@protoc_insertion_point(class_scope:l3_centralizedattackdetector.AttackIPs) + }) +_sym_db.RegisterMessage(AttackIPs) + +_L3CENTRALIZEDATTACKDETECTOR = DESCRIPTOR.services_by_name['L3Centralizedattackdetector'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _FEATURE._serialized_start=83 + _FEATURE._serialized_end=109 + _L3CENTRALIZEDATTACKDETECTORMETRICS._serialized_start=112 + _L3CENTRALIZEDATTACKDETECTORMETRICS._serialized_end=284 + _CONNECTIONMETADATA._serialized_start=287 + _CONNECTIONMETADATA._serialized_end=522 + _AUTOFEATURES._serialized_start=524 + _AUTOFEATURES._serialized_end=561 + _L3CENTRALIZEDATTACKDETECTORBATCHINPUT._serialized_start=563 + _L3CENTRALIZEDATTACKDETECTORBATCHINPUT._serialized_end=685 + _STATUSMESSAGE._serialized_start=687 + _STATUSMESSAGE._serialized_end=719 + _ATTACKIPS._serialized_start=721 + _ATTACKIPS._serialized_end=752 + _L3CENTRALIZEDATTACKDETECTOR._serialized_start=755 + _L3CENTRALIZEDATTACKDETECTOR._serialized_end=1237 +# @@protoc_insertion_point(module_scope) diff --git a/proto/l3_centralizedattackdetector_pb2_grpc.py b/proto/l3_centralizedattackdetector_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..49aa2555f14b252c7eac5644d8a89731d38f9d43 --- /dev/null +++ b/proto/l3_centralizedattackdetector_pb2_grpc.py @@ -0,0 +1,171 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import l3_centralizedattackdetector_pb2 as l3__centralizedattackdetector__pb2 + + +class L3CentralizedattackdetectorStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.AnalyzeConnectionStatistics = channel.unary_unary( + '/l3_centralizedattackdetector.L3Centralizedattackdetector/AnalyzeConnectionStatistics', + request_serializer=l3__centralizedattackdetector__pb2.L3CentralizedattackdetectorMetrics.SerializeToString, + response_deserializer=l3__centralizedattackdetector__pb2.StatusMessage.FromString, + ) + self.AnalyzeBatchConnectionStatistics = channel.unary_unary( + '/l3_centralizedattackdetector.L3Centralizedattackdetector/AnalyzeBatchConnectionStatistics', + request_serializer=l3__centralizedattackdetector__pb2.L3CentralizedattackdetectorBatchInput.SerializeToString, + response_deserializer=l3__centralizedattackdetector__pb2.StatusMessage.FromString, + ) + self.GetFeaturesIds = channel.unary_unary( + '/l3_centralizedattackdetector.L3Centralizedattackdetector/GetFeaturesIds', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=l3__centralizedattackdetector__pb2.AutoFeatures.FromString, + ) + self.SetAttackIPs = channel.unary_unary( + '/l3_centralizedattackdetector.L3Centralizedattackdetector/SetAttackIPs', + request_serializer=l3__centralizedattackdetector__pb2.AttackIPs.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class L3CentralizedattackdetectorServicer(object): + """Missing associated documentation comment in .proto file.""" + + def AnalyzeConnectionStatistics(self, request, context): + """Analyze single input to the ML model in the CAD component + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AnalyzeBatchConnectionStatistics(self, request, context): + """Analyze a batch of inputs to the ML model in the CAD component + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetFeaturesIds(self, request, context): + """Get the list of features used by the ML model in the CAD component + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetAttackIPs(self, request, context): + """Sets the list of attack IPs in order to be used to compute the prediction accuracy of the + ML model in the CAD component in case of testing the ML model. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_L3CentralizedattackdetectorServicer_to_server(servicer, server): + rpc_method_handlers = { + 'AnalyzeConnectionStatistics': grpc.unary_unary_rpc_method_handler( + servicer.AnalyzeConnectionStatistics, + request_deserializer=l3__centralizedattackdetector__pb2.L3CentralizedattackdetectorMetrics.FromString, + response_serializer=l3__centralizedattackdetector__pb2.StatusMessage.SerializeToString, + ), + 'AnalyzeBatchConnectionStatistics': grpc.unary_unary_rpc_method_handler( + servicer.AnalyzeBatchConnectionStatistics, + request_deserializer=l3__centralizedattackdetector__pb2.L3CentralizedattackdetectorBatchInput.FromString, + response_serializer=l3__centralizedattackdetector__pb2.StatusMessage.SerializeToString, + ), + 'GetFeaturesIds': grpc.unary_unary_rpc_method_handler( + servicer.GetFeaturesIds, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=l3__centralizedattackdetector__pb2.AutoFeatures.SerializeToString, + ), + 'SetAttackIPs': grpc.unary_unary_rpc_method_handler( + servicer.SetAttackIPs, + request_deserializer=l3__centralizedattackdetector__pb2.AttackIPs.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'l3_centralizedattackdetector.L3Centralizedattackdetector', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class L3Centralizedattackdetector(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def AnalyzeConnectionStatistics(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/l3_centralizedattackdetector.L3Centralizedattackdetector/AnalyzeConnectionStatistics', + l3__centralizedattackdetector__pb2.L3CentralizedattackdetectorMetrics.SerializeToString, + l3__centralizedattackdetector__pb2.StatusMessage.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AnalyzeBatchConnectionStatistics(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/l3_centralizedattackdetector.L3Centralizedattackdetector/AnalyzeBatchConnectionStatistics', + l3__centralizedattackdetector__pb2.L3CentralizedattackdetectorBatchInput.SerializeToString, + l3__centralizedattackdetector__pb2.StatusMessage.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetFeaturesIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/l3_centralizedattackdetector.L3Centralizedattackdetector/GetFeaturesIds', + context__pb2.Empty.SerializeToString, + l3__centralizedattackdetector__pb2.AutoFeatures.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetAttackIPs(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/l3_centralizedattackdetector.L3Centralizedattackdetector/SetAttackIPs', + l3__centralizedattackdetector__pb2.AttackIPs.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/load_generator_pb2.py b/proto/load_generator_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..96ec2b963371c2b65964865bd0833521534bb452 --- /dev/null +++ b/proto/load_generator_pb2.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: load_generator.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14load_generator.proto\x12\x0eload_generator\x1a\rcontext.proto\")\n\x05Range\x12\x0f\n\x07minimum\x18\x01 \x01(\x02\x12\x0f\n\x07maximum\x18\x02 \x01(\x02\"R\n\rScalarOrRange\x12\x10\n\x06scalar\x18\x01 \x01(\x02H\x00\x12&\n\x05range\x18\x02 \x01(\x0b\x32\x15.load_generator.RangeH\x00\x42\x07\n\x05value\"\xdc\x03\n\nParameters\x12\x14\n\x0cnum_requests\x18\x01 \x01(\x04\x12\x36\n\rrequest_types\x18\x02 \x03(\x0e\x32\x1f.load_generator.RequestTypeEnum\x12\x14\n\x0c\x64\x65vice_regex\x18\x03 \x01(\t\x12\x16\n\x0e\x65ndpoint_regex\x18\x04 \x01(\t\x12\x14\n\x0coffered_load\x18\x05 \x01(\x02\x12\x14\n\x0cholding_time\x18\x06 \x01(\x02\x12\x1a\n\x12inter_arrival_time\x18\x07 \x01(\x02\x12\x33\n\x0c\x61vailability\x18\x08 \x03(\x0b\x32\x1d.load_generator.ScalarOrRange\x12\x34\n\rcapacity_gbps\x18\t \x03(\x0b\x32\x1d.load_generator.ScalarOrRange\x12\x35\n\x0e\x65\x32\x65_latency_ms\x18\n \x03(\x0b\x32\x1d.load_generator.ScalarOrRange\x12\x13\n\x0bmax_workers\x18\x0b \x01(\r\x12\x13\n\x0b\x64o_teardown\x18\x0c \x01(\x08\x12\x10\n\x08\x64ry_mode\x18\r \x01(\x08\x12\x15\n\rrecord_to_dlt\x18\x0e \x01(\x08\x12\x15\n\rdlt_domain_id\x18\x0f \x01(\t\"\x8d\x01\n\x06Status\x12.\n\nparameters\x18\x01 \x01(\x0b\x32\x1a.load_generator.Parameters\x12\x15\n\rnum_generated\x18\x02 \x01(\x04\x12\x14\n\x0cnum_released\x18\x03 \x01(\x04\x12\x15\n\rinfinite_loop\x18\x04 \x01(\x08\x12\x0f\n\x07running\x18\x05 \x01(\x08*\xda\x01\n\x0fRequestTypeEnum\x12\x19\n\x15REQUESTTYPE_UNDEFINED\x10\x00\x12\x1c\n\x18REQUESTTYPE_SERVICE_L2NM\x10\x01\x12\x1c\n\x18REQUESTTYPE_SERVICE_L3NM\x10\x02\x12\x1a\n\x16REQUESTTYPE_SERVICE_MW\x10\x03\x12\x1c\n\x18REQUESTTYPE_SERVICE_TAPI\x10\x04\x12\x1a\n\x16REQUESTTYPE_SLICE_L2NM\x10\x05\x12\x1a\n\x16REQUESTTYPE_SLICE_L3NM\x10\x06\x32\xae\x01\n\x14LoadGeneratorService\x12\x35\n\x05Start\x12\x1a.load_generator.Parameters\x1a\x0e.context.Empty\"\x00\x12\x35\n\tGetStatus\x12\x0e.context.Empty\x1a\x16.load_generator.Status\"\x00\x12(\n\x04Stop\x12\x0e.context.Empty\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + +_REQUESTTYPEENUM = DESCRIPTOR.enum_types_by_name['RequestTypeEnum'] +RequestTypeEnum = enum_type_wrapper.EnumTypeWrapper(_REQUESTTYPEENUM) +REQUESTTYPE_UNDEFINED = 0 +REQUESTTYPE_SERVICE_L2NM = 1 +REQUESTTYPE_SERVICE_L3NM = 2 +REQUESTTYPE_SERVICE_MW = 3 +REQUESTTYPE_SERVICE_TAPI = 4 +REQUESTTYPE_SLICE_L2NM = 5 +REQUESTTYPE_SLICE_L3NM = 6 + + +_RANGE = DESCRIPTOR.message_types_by_name['Range'] +_SCALARORRANGE = DESCRIPTOR.message_types_by_name['ScalarOrRange'] +_PARAMETERS = DESCRIPTOR.message_types_by_name['Parameters'] +_STATUS = DESCRIPTOR.message_types_by_name['Status'] +Range = _reflection.GeneratedProtocolMessageType('Range', (_message.Message,), { + 'DESCRIPTOR' : _RANGE, + '__module__' : 'load_generator_pb2' + # @@protoc_insertion_point(class_scope:load_generator.Range) + }) +_sym_db.RegisterMessage(Range) + +ScalarOrRange = _reflection.GeneratedProtocolMessageType('ScalarOrRange', (_message.Message,), { + 'DESCRIPTOR' : _SCALARORRANGE, + '__module__' : 'load_generator_pb2' + # @@protoc_insertion_point(class_scope:load_generator.ScalarOrRange) + }) +_sym_db.RegisterMessage(ScalarOrRange) + +Parameters = _reflection.GeneratedProtocolMessageType('Parameters', (_message.Message,), { + 'DESCRIPTOR' : _PARAMETERS, + '__module__' : 'load_generator_pb2' + # @@protoc_insertion_point(class_scope:load_generator.Parameters) + }) +_sym_db.RegisterMessage(Parameters) + +Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), { + 'DESCRIPTOR' : _STATUS, + '__module__' : 'load_generator_pb2' + # @@protoc_insertion_point(class_scope:load_generator.Status) + }) +_sym_db.RegisterMessage(Status) + +_LOADGENERATORSERVICE = DESCRIPTOR.services_by_name['LoadGeneratorService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _REQUESTTYPEENUM._serialized_start=806 + _REQUESTTYPEENUM._serialized_end=1024 + _RANGE._serialized_start=55 + _RANGE._serialized_end=96 + _SCALARORRANGE._serialized_start=98 + _SCALARORRANGE._serialized_end=180 + _PARAMETERS._serialized_start=183 + _PARAMETERS._serialized_end=659 + _STATUS._serialized_start=662 + _STATUS._serialized_end=803 + _LOADGENERATORSERVICE._serialized_start=1027 + _LOADGENERATORSERVICE._serialized_end=1201 +# @@protoc_insertion_point(module_scope) diff --git a/proto/load_generator_pb2_grpc.py b/proto/load_generator_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..8e0874d4fe081073a03327569152dcc912d58eac --- /dev/null +++ b/proto/load_generator_pb2_grpc.py @@ -0,0 +1,133 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import load_generator_pb2 as load__generator__pb2 + + +class LoadGeneratorServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Start = channel.unary_unary( + '/load_generator.LoadGeneratorService/Start', + request_serializer=load__generator__pb2.Parameters.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetStatus = channel.unary_unary( + '/load_generator.LoadGeneratorService/GetStatus', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=load__generator__pb2.Status.FromString, + ) + self.Stop = channel.unary_unary( + '/load_generator.LoadGeneratorService/Stop', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class LoadGeneratorServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Start(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetStatus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Stop(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_LoadGeneratorServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Start': grpc.unary_unary_rpc_method_handler( + servicer.Start, + request_deserializer=load__generator__pb2.Parameters.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetStatus, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=load__generator__pb2.Status.SerializeToString, + ), + 'Stop': grpc.unary_unary_rpc_method_handler( + servicer.Stop, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'load_generator.LoadGeneratorService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class LoadGeneratorService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Start(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/load_generator.LoadGeneratorService/Start', + load__generator__pb2.Parameters.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/load_generator.LoadGeneratorService/GetStatus', + context__pb2.Empty.SerializeToString, + load__generator__pb2.Status.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Stop(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/load_generator.LoadGeneratorService/Stop', + context__pb2.Empty.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/monitoring_pb2.py b/proto/monitoring_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..cd0f6849ae22c514c1086b85a221415cbaba016a --- /dev/null +++ b/proto/monitoring_pb2.py @@ -0,0 +1,239 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: monitoring.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import kpi_sample_types_pb2 as kpi__sample__types__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10monitoring.proto\x12\nmonitoring\x1a\rcontext.proto\x1a\x16kpi_sample_types.proto\"\x99\x03\n\rKpiDescriptor\x12!\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x11.monitoring.KpiId\x12\x17\n\x0fkpi_description\x18\x02 \x01(\t\x12&\n\x0bkpi_id_list\x18\x03 \x03(\x0b\x32\x11.monitoring.KpiId\x12\x38\n\x0fkpi_sample_type\x18\x04 \x01(\x0e\x32\x1f.kpi_sample_types.KpiSampleType\x12$\n\tdevice_id\x18\x05 \x01(\x0b\x32\x11.context.DeviceId\x12(\n\x0b\x65ndpoint_id\x18\x06 \x01(\x0b\x32\x13.context.EndPointId\x12&\n\nservice_id\x18\x07 \x01(\x0b\x32\x12.context.ServiceId\x12\"\n\x08slice_id\x18\x08 \x01(\x0b\x32\x10.context.SliceId\x12,\n\rconnection_id\x18\t \x01(\x0b\x32\x15.context.ConnectionId\x12 \n\x07link_id\x18\n \x01(\x0b\x32\x0f.context.LinkId\"l\n\x11MonitorKpiRequest\x12!\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x11.monitoring.KpiId\x12\x1b\n\x13monitoring_window_s\x18\x02 \x01(\x02\x12\x17\n\x0fsampling_rate_s\x18\x03 \x01(\x02\"\xbb\x01\n\x08KpiQuery\x12\"\n\x07kpi_ids\x18\x01 \x03(\x0b\x32\x11.monitoring.KpiId\x12\x1b\n\x13monitoring_window_s\x18\x02 \x01(\x02\x12\x16\n\x0elast_n_samples\x18\x03 \x01(\r\x12+\n\x0fstart_timestamp\x18\x04 \x01(\x0b\x32\x12.context.Timestamp\x12)\n\rend_timestamp\x18\x05 \x01(\x0b\x32\x12.context.Timestamp\"X\n\x06RawKpi\x12%\n\ttimestamp\x18\x01 \x01(\x0b\x32\x12.context.Timestamp\x12\'\n\tkpi_value\x18\x02 \x01(\x0b\x32\x14.monitoring.KpiValue\"U\n\nRawKpiList\x12!\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x11.monitoring.KpiId\x12$\n\x08raw_kpis\x18\x02 \x03(\x0b\x32\x12.monitoring.RawKpi\"<\n\x0bRawKpiTable\x12-\n\rraw_kpi_lists\x18\x01 \x03(\x0b\x32\x16.monitoring.RawKpiList\"&\n\x05KpiId\x12\x1d\n\x06kpi_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"x\n\x03Kpi\x12!\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x11.monitoring.KpiId\x12%\n\ttimestamp\x18\x02 \x01(\x0b\x32\x12.context.Timestamp\x12\'\n\tkpi_value\x18\x03 \x01(\x0b\x32\x14.monitoring.KpiValue\"\xa8\x01\n\rKpiValueRange\x12)\n\x0bkpiMinValue\x18\x01 \x01(\x0b\x32\x14.monitoring.KpiValue\x12)\n\x0bkpiMaxValue\x18\x02 \x01(\x0b\x32\x14.monitoring.KpiValue\x12\x0f\n\x07inRange\x18\x03 \x01(\x08\x12\x17\n\x0fincludeMinValue\x18\x04 \x01(\x08\x12\x17\n\x0fincludeMaxValue\x18\x05 \x01(\x08\"\xa1\x01\n\x08KpiValue\x12\x12\n\x08int32Val\x18\x01 \x01(\x05H\x00\x12\x13\n\tuint32Val\x18\x02 \x01(\rH\x00\x12\x12\n\x08int64Val\x18\x03 \x01(\x03H\x00\x12\x13\n\tuint64Val\x18\x04 \x01(\x04H\x00\x12\x12\n\x08\x66loatVal\x18\x05 \x01(\x02H\x00\x12\x13\n\tstringVal\x18\x06 \x01(\tH\x00\x12\x11\n\x07\x62oolVal\x18\x07 \x01(\x08H\x00\x42\x07\n\x05value\"\'\n\x07KpiList\x12\x1c\n\x03kpi\x18\x01 \x03(\x0b\x32\x0f.monitoring.Kpi\"K\n\x11KpiDescriptorList\x12\x36\n\x13kpi_descriptor_list\x18\x01 \x03(\x0b\x32\x19.monitoring.KpiDescriptor\"\xf2\x01\n\x0eSubsDescriptor\x12+\n\x07subs_id\x18\x01 \x01(\x0b\x32\x1a.monitoring.SubscriptionID\x12!\n\x06kpi_id\x18\x02 \x01(\x0b\x32\x11.monitoring.KpiId\x12\x1b\n\x13sampling_duration_s\x18\x03 \x01(\x02\x12\x1b\n\x13sampling_interval_s\x18\x04 \x01(\x02\x12+\n\x0fstart_timestamp\x18\x05 \x01(\x0b\x32\x12.context.Timestamp\x12)\n\rend_timestamp\x18\x06 \x01(\x0b\x32\x12.context.Timestamp\"0\n\x0eSubscriptionID\x12\x1e\n\x07subs_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"b\n\x0cSubsResponse\x12+\n\x07subs_id\x18\x01 \x01(\x0b\x32\x1a.monitoring.SubscriptionID\x12%\n\x08kpi_list\x18\x02 \x01(\x0b\x32\x13.monitoring.KpiList\"?\n\x08SubsList\x12\x33\n\x0fsubs_descriptor\x18\x01 \x03(\x0b\x32\x1a.monitoring.SubsDescriptor\"\xdf\x01\n\x0f\x41larmDescriptor\x12%\n\x08\x61larm_id\x18\x01 \x01(\x0b\x32\x13.monitoring.AlarmID\x12\x19\n\x11\x61larm_description\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12!\n\x06kpi_id\x18\x04 \x01(\x0b\x32\x11.monitoring.KpiId\x12\x32\n\x0fkpi_value_range\x18\x05 \x01(\x0b\x32\x19.monitoring.KpiValueRange\x12%\n\ttimestamp\x18\x06 \x01(\x0b\x32\x12.context.Timestamp\"*\n\x07\x41larmID\x12\x1f\n\x08\x61larm_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"}\n\x11\x41larmSubscription\x12%\n\x08\x61larm_id\x18\x01 \x01(\x0b\x32\x13.monitoring.AlarmID\x12\x1e\n\x16subscription_timeout_s\x18\x02 \x01(\x02\x12!\n\x19subscription_frequency_ms\x18\x03 \x01(\x02\"k\n\rAlarmResponse\x12%\n\x08\x61larm_id\x18\x01 \x01(\x0b\x32\x13.monitoring.AlarmID\x12\x0c\n\x04text\x18\x02 \x01(\t\x12%\n\x08kpi_list\x18\x03 \x01(\x0b\x32\x13.monitoring.KpiList\"B\n\tAlarmList\x12\x35\n\x10\x61larm_descriptor\x18\x01 \x03(\x0b\x32\x1b.monitoring.AlarmDescriptor2\x9c\t\n\x11MonitoringService\x12\x38\n\x06SetKpi\x12\x19.monitoring.KpiDescriptor\x1a\x11.monitoring.KpiId\"\x00\x12\x30\n\tDeleteKpi\x12\x11.monitoring.KpiId\x1a\x0e.context.Empty\"\x00\x12\x42\n\x10GetKpiDescriptor\x12\x11.monitoring.KpiId\x1a\x19.monitoring.KpiDescriptor\"\x00\x12G\n\x14GetKpiDescriptorList\x12\x0e.context.Empty\x1a\x1d.monitoring.KpiDescriptorList\"\x00\x12/\n\nIncludeKpi\x12\x0f.monitoring.Kpi\x1a\x0e.context.Empty\"\x00\x12=\n\nMonitorKpi\x12\x1d.monitoring.MonitorKpiRequest\x1a\x0e.context.Empty\"\x00\x12?\n\x0cQueryKpiData\x12\x14.monitoring.KpiQuery\x1a\x17.monitoring.RawKpiTable\"\x00\x12N\n\x12SetKpiSubscription\x12\x1a.monitoring.SubsDescriptor\x1a\x18.monitoring.SubsResponse\"\x00\x30\x01\x12M\n\x11GetSubsDescriptor\x12\x1a.monitoring.SubscriptionID\x1a\x1a.monitoring.SubsDescriptor\"\x00\x12:\n\x10GetSubscriptions\x12\x0e.context.Empty\x1a\x14.monitoring.SubsList\"\x00\x12\x42\n\x12\x44\x65leteSubscription\x12\x1a.monitoring.SubscriptionID\x1a\x0e.context.Empty\"\x00\x12\x41\n\x0bSetKpiAlarm\x12\x1b.monitoring.AlarmDescriptor\x1a\x13.monitoring.AlarmID\"\x00\x12\x34\n\tGetAlarms\x12\x0e.context.Empty\x1a\x15.monitoring.AlarmList\"\x00\x12H\n\x12GetAlarmDescriptor\x12\x13.monitoring.AlarmID\x1a\x1b.monitoring.AlarmDescriptor\"\x00\x12V\n\x16GetAlarmResponseStream\x12\x1d.monitoring.AlarmSubscription\x1a\x19.monitoring.AlarmResponse\"\x00\x30\x01\x12\x34\n\x0b\x44\x65leteAlarm\x12\x13.monitoring.AlarmID\x1a\x0e.context.Empty\"\x00\x12\x36\n\x0cGetStreamKpi\x12\x11.monitoring.KpiId\x1a\x0f.monitoring.Kpi\"\x00\x30\x01\x12\x35\n\rGetInstantKpi\x12\x11.monitoring.KpiId\x1a\x0f.monitoring.Kpi\"\x00\x62\x06proto3') + + + +_KPIDESCRIPTOR = DESCRIPTOR.message_types_by_name['KpiDescriptor'] +_MONITORKPIREQUEST = DESCRIPTOR.message_types_by_name['MonitorKpiRequest'] +_KPIQUERY = DESCRIPTOR.message_types_by_name['KpiQuery'] +_RAWKPI = DESCRIPTOR.message_types_by_name['RawKpi'] +_RAWKPILIST = DESCRIPTOR.message_types_by_name['RawKpiList'] +_RAWKPITABLE = DESCRIPTOR.message_types_by_name['RawKpiTable'] +_KPIID = DESCRIPTOR.message_types_by_name['KpiId'] +_KPI = DESCRIPTOR.message_types_by_name['Kpi'] +_KPIVALUERANGE = DESCRIPTOR.message_types_by_name['KpiValueRange'] +_KPIVALUE = DESCRIPTOR.message_types_by_name['KpiValue'] +_KPILIST = DESCRIPTOR.message_types_by_name['KpiList'] +_KPIDESCRIPTORLIST = DESCRIPTOR.message_types_by_name['KpiDescriptorList'] +_SUBSDESCRIPTOR = DESCRIPTOR.message_types_by_name['SubsDescriptor'] +_SUBSCRIPTIONID = DESCRIPTOR.message_types_by_name['SubscriptionID'] +_SUBSRESPONSE = DESCRIPTOR.message_types_by_name['SubsResponse'] +_SUBSLIST = DESCRIPTOR.message_types_by_name['SubsList'] +_ALARMDESCRIPTOR = DESCRIPTOR.message_types_by_name['AlarmDescriptor'] +_ALARMID = DESCRIPTOR.message_types_by_name['AlarmID'] +_ALARMSUBSCRIPTION = DESCRIPTOR.message_types_by_name['AlarmSubscription'] +_ALARMRESPONSE = DESCRIPTOR.message_types_by_name['AlarmResponse'] +_ALARMLIST = DESCRIPTOR.message_types_by_name['AlarmList'] +KpiDescriptor = _reflection.GeneratedProtocolMessageType('KpiDescriptor', (_message.Message,), { + 'DESCRIPTOR' : _KPIDESCRIPTOR, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.KpiDescriptor) + }) +_sym_db.RegisterMessage(KpiDescriptor) + +MonitorKpiRequest = _reflection.GeneratedProtocolMessageType('MonitorKpiRequest', (_message.Message,), { + 'DESCRIPTOR' : _MONITORKPIREQUEST, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.MonitorKpiRequest) + }) +_sym_db.RegisterMessage(MonitorKpiRequest) + +KpiQuery = _reflection.GeneratedProtocolMessageType('KpiQuery', (_message.Message,), { + 'DESCRIPTOR' : _KPIQUERY, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.KpiQuery) + }) +_sym_db.RegisterMessage(KpiQuery) + +RawKpi = _reflection.GeneratedProtocolMessageType('RawKpi', (_message.Message,), { + 'DESCRIPTOR' : _RAWKPI, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.RawKpi) + }) +_sym_db.RegisterMessage(RawKpi) + +RawKpiList = _reflection.GeneratedProtocolMessageType('RawKpiList', (_message.Message,), { + 'DESCRIPTOR' : _RAWKPILIST, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.RawKpiList) + }) +_sym_db.RegisterMessage(RawKpiList) + +RawKpiTable = _reflection.GeneratedProtocolMessageType('RawKpiTable', (_message.Message,), { + 'DESCRIPTOR' : _RAWKPITABLE, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.RawKpiTable) + }) +_sym_db.RegisterMessage(RawKpiTable) + +KpiId = _reflection.GeneratedProtocolMessageType('KpiId', (_message.Message,), { + 'DESCRIPTOR' : _KPIID, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.KpiId) + }) +_sym_db.RegisterMessage(KpiId) + +Kpi = _reflection.GeneratedProtocolMessageType('Kpi', (_message.Message,), { + 'DESCRIPTOR' : _KPI, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.Kpi) + }) +_sym_db.RegisterMessage(Kpi) + +KpiValueRange = _reflection.GeneratedProtocolMessageType('KpiValueRange', (_message.Message,), { + 'DESCRIPTOR' : _KPIVALUERANGE, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.KpiValueRange) + }) +_sym_db.RegisterMessage(KpiValueRange) + +KpiValue = _reflection.GeneratedProtocolMessageType('KpiValue', (_message.Message,), { + 'DESCRIPTOR' : _KPIVALUE, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.KpiValue) + }) +_sym_db.RegisterMessage(KpiValue) + +KpiList = _reflection.GeneratedProtocolMessageType('KpiList', (_message.Message,), { + 'DESCRIPTOR' : _KPILIST, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.KpiList) + }) +_sym_db.RegisterMessage(KpiList) + +KpiDescriptorList = _reflection.GeneratedProtocolMessageType('KpiDescriptorList', (_message.Message,), { + 'DESCRIPTOR' : _KPIDESCRIPTORLIST, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.KpiDescriptorList) + }) +_sym_db.RegisterMessage(KpiDescriptorList) + +SubsDescriptor = _reflection.GeneratedProtocolMessageType('SubsDescriptor', (_message.Message,), { + 'DESCRIPTOR' : _SUBSDESCRIPTOR, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.SubsDescriptor) + }) +_sym_db.RegisterMessage(SubsDescriptor) + +SubscriptionID = _reflection.GeneratedProtocolMessageType('SubscriptionID', (_message.Message,), { + 'DESCRIPTOR' : _SUBSCRIPTIONID, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.SubscriptionID) + }) +_sym_db.RegisterMessage(SubscriptionID) + +SubsResponse = _reflection.GeneratedProtocolMessageType('SubsResponse', (_message.Message,), { + 'DESCRIPTOR' : _SUBSRESPONSE, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.SubsResponse) + }) +_sym_db.RegisterMessage(SubsResponse) + +SubsList = _reflection.GeneratedProtocolMessageType('SubsList', (_message.Message,), { + 'DESCRIPTOR' : _SUBSLIST, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.SubsList) + }) +_sym_db.RegisterMessage(SubsList) + +AlarmDescriptor = _reflection.GeneratedProtocolMessageType('AlarmDescriptor', (_message.Message,), { + 'DESCRIPTOR' : _ALARMDESCRIPTOR, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.AlarmDescriptor) + }) +_sym_db.RegisterMessage(AlarmDescriptor) + +AlarmID = _reflection.GeneratedProtocolMessageType('AlarmID', (_message.Message,), { + 'DESCRIPTOR' : _ALARMID, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.AlarmID) + }) +_sym_db.RegisterMessage(AlarmID) + +AlarmSubscription = _reflection.GeneratedProtocolMessageType('AlarmSubscription', (_message.Message,), { + 'DESCRIPTOR' : _ALARMSUBSCRIPTION, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.AlarmSubscription) + }) +_sym_db.RegisterMessage(AlarmSubscription) + +AlarmResponse = _reflection.GeneratedProtocolMessageType('AlarmResponse', (_message.Message,), { + 'DESCRIPTOR' : _ALARMRESPONSE, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.AlarmResponse) + }) +_sym_db.RegisterMessage(AlarmResponse) + +AlarmList = _reflection.GeneratedProtocolMessageType('AlarmList', (_message.Message,), { + 'DESCRIPTOR' : _ALARMLIST, + '__module__' : 'monitoring_pb2' + # @@protoc_insertion_point(class_scope:monitoring.AlarmList) + }) +_sym_db.RegisterMessage(AlarmList) + +_MONITORINGSERVICE = DESCRIPTOR.services_by_name['MonitoringService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _KPIDESCRIPTOR._serialized_start=72 + _KPIDESCRIPTOR._serialized_end=481 + _MONITORKPIREQUEST._serialized_start=483 + _MONITORKPIREQUEST._serialized_end=591 + _KPIQUERY._serialized_start=594 + _KPIQUERY._serialized_end=781 + _RAWKPI._serialized_start=783 + _RAWKPI._serialized_end=871 + _RAWKPILIST._serialized_start=873 + _RAWKPILIST._serialized_end=958 + _RAWKPITABLE._serialized_start=960 + _RAWKPITABLE._serialized_end=1020 + _KPIID._serialized_start=1022 + _KPIID._serialized_end=1060 + _KPI._serialized_start=1062 + _KPI._serialized_end=1182 + _KPIVALUERANGE._serialized_start=1185 + _KPIVALUERANGE._serialized_end=1353 + _KPIVALUE._serialized_start=1356 + _KPIVALUE._serialized_end=1517 + _KPILIST._serialized_start=1519 + _KPILIST._serialized_end=1558 + _KPIDESCRIPTORLIST._serialized_start=1560 + _KPIDESCRIPTORLIST._serialized_end=1635 + _SUBSDESCRIPTOR._serialized_start=1638 + _SUBSDESCRIPTOR._serialized_end=1880 + _SUBSCRIPTIONID._serialized_start=1882 + _SUBSCRIPTIONID._serialized_end=1930 + _SUBSRESPONSE._serialized_start=1932 + _SUBSRESPONSE._serialized_end=2030 + _SUBSLIST._serialized_start=2032 + _SUBSLIST._serialized_end=2095 + _ALARMDESCRIPTOR._serialized_start=2098 + _ALARMDESCRIPTOR._serialized_end=2321 + _ALARMID._serialized_start=2323 + _ALARMID._serialized_end=2365 + _ALARMSUBSCRIPTION._serialized_start=2367 + _ALARMSUBSCRIPTION._serialized_end=2492 + _ALARMRESPONSE._serialized_start=2494 + _ALARMRESPONSE._serialized_end=2601 + _ALARMLIST._serialized_start=2603 + _ALARMLIST._serialized_end=2669 + _MONITORINGSERVICE._serialized_start=2672 + _MONITORINGSERVICE._serialized_end=3852 +# @@protoc_insertion_point(module_scope) diff --git a/proto/monitoring_pb2_grpc.py b/proto/monitoring_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..7144ae00971981e8df495cef03463f83bf0b4e73 --- /dev/null +++ b/proto/monitoring_pb2_grpc.py @@ -0,0 +1,628 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import monitoring_pb2 as monitoring__pb2 + + +class MonitoringServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.SetKpi = channel.unary_unary( + '/monitoring.MonitoringService/SetKpi', + request_serializer=monitoring__pb2.KpiDescriptor.SerializeToString, + response_deserializer=monitoring__pb2.KpiId.FromString, + ) + self.DeleteKpi = channel.unary_unary( + '/monitoring.MonitoringService/DeleteKpi', + request_serializer=monitoring__pb2.KpiId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetKpiDescriptor = channel.unary_unary( + '/monitoring.MonitoringService/GetKpiDescriptor', + request_serializer=monitoring__pb2.KpiId.SerializeToString, + response_deserializer=monitoring__pb2.KpiDescriptor.FromString, + ) + self.GetKpiDescriptorList = channel.unary_unary( + '/monitoring.MonitoringService/GetKpiDescriptorList', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=monitoring__pb2.KpiDescriptorList.FromString, + ) + self.IncludeKpi = channel.unary_unary( + '/monitoring.MonitoringService/IncludeKpi', + request_serializer=monitoring__pb2.Kpi.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.MonitorKpi = channel.unary_unary( + '/monitoring.MonitoringService/MonitorKpi', + request_serializer=monitoring__pb2.MonitorKpiRequest.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.QueryKpiData = channel.unary_unary( + '/monitoring.MonitoringService/QueryKpiData', + request_serializer=monitoring__pb2.KpiQuery.SerializeToString, + response_deserializer=monitoring__pb2.RawKpiTable.FromString, + ) + self.SetKpiSubscription = channel.unary_stream( + '/monitoring.MonitoringService/SetKpiSubscription', + request_serializer=monitoring__pb2.SubsDescriptor.SerializeToString, + response_deserializer=monitoring__pb2.SubsResponse.FromString, + ) + self.GetSubsDescriptor = channel.unary_unary( + '/monitoring.MonitoringService/GetSubsDescriptor', + request_serializer=monitoring__pb2.SubscriptionID.SerializeToString, + response_deserializer=monitoring__pb2.SubsDescriptor.FromString, + ) + self.GetSubscriptions = channel.unary_unary( + '/monitoring.MonitoringService/GetSubscriptions', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=monitoring__pb2.SubsList.FromString, + ) + self.DeleteSubscription = channel.unary_unary( + '/monitoring.MonitoringService/DeleteSubscription', + request_serializer=monitoring__pb2.SubscriptionID.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.SetKpiAlarm = channel.unary_unary( + '/monitoring.MonitoringService/SetKpiAlarm', + request_serializer=monitoring__pb2.AlarmDescriptor.SerializeToString, + response_deserializer=monitoring__pb2.AlarmID.FromString, + ) + self.GetAlarms = channel.unary_unary( + '/monitoring.MonitoringService/GetAlarms', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=monitoring__pb2.AlarmList.FromString, + ) + self.GetAlarmDescriptor = channel.unary_unary( + '/monitoring.MonitoringService/GetAlarmDescriptor', + request_serializer=monitoring__pb2.AlarmID.SerializeToString, + response_deserializer=monitoring__pb2.AlarmDescriptor.FromString, + ) + self.GetAlarmResponseStream = channel.unary_stream( + '/monitoring.MonitoringService/GetAlarmResponseStream', + request_serializer=monitoring__pb2.AlarmSubscription.SerializeToString, + response_deserializer=monitoring__pb2.AlarmResponse.FromString, + ) + self.DeleteAlarm = channel.unary_unary( + '/monitoring.MonitoringService/DeleteAlarm', + request_serializer=monitoring__pb2.AlarmID.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetStreamKpi = channel.unary_stream( + '/monitoring.MonitoringService/GetStreamKpi', + request_serializer=monitoring__pb2.KpiId.SerializeToString, + response_deserializer=monitoring__pb2.Kpi.FromString, + ) + self.GetInstantKpi = channel.unary_unary( + '/monitoring.MonitoringService/GetInstantKpi', + request_serializer=monitoring__pb2.KpiId.SerializeToString, + response_deserializer=monitoring__pb2.Kpi.FromString, + ) + + +class MonitoringServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def SetKpi(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteKpi(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetKpiDescriptor(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetKpiDescriptorList(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def IncludeKpi(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def MonitorKpi(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def QueryKpiData(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetKpiSubscription(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetSubsDescriptor(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetSubscriptions(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteSubscription(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetKpiAlarm(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAlarms(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAlarmDescriptor(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAlarmResponseStream(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteAlarm(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetStreamKpi(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetInstantKpi(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_MonitoringServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'SetKpi': grpc.unary_unary_rpc_method_handler( + servicer.SetKpi, + request_deserializer=monitoring__pb2.KpiDescriptor.FromString, + response_serializer=monitoring__pb2.KpiId.SerializeToString, + ), + 'DeleteKpi': grpc.unary_unary_rpc_method_handler( + servicer.DeleteKpi, + request_deserializer=monitoring__pb2.KpiId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetKpiDescriptor': grpc.unary_unary_rpc_method_handler( + servicer.GetKpiDescriptor, + request_deserializer=monitoring__pb2.KpiId.FromString, + response_serializer=monitoring__pb2.KpiDescriptor.SerializeToString, + ), + 'GetKpiDescriptorList': grpc.unary_unary_rpc_method_handler( + servicer.GetKpiDescriptorList, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=monitoring__pb2.KpiDescriptorList.SerializeToString, + ), + 'IncludeKpi': grpc.unary_unary_rpc_method_handler( + servicer.IncludeKpi, + request_deserializer=monitoring__pb2.Kpi.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'MonitorKpi': grpc.unary_unary_rpc_method_handler( + servicer.MonitorKpi, + request_deserializer=monitoring__pb2.MonitorKpiRequest.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'QueryKpiData': grpc.unary_unary_rpc_method_handler( + servicer.QueryKpiData, + request_deserializer=monitoring__pb2.KpiQuery.FromString, + response_serializer=monitoring__pb2.RawKpiTable.SerializeToString, + ), + 'SetKpiSubscription': grpc.unary_stream_rpc_method_handler( + servicer.SetKpiSubscription, + request_deserializer=monitoring__pb2.SubsDescriptor.FromString, + response_serializer=monitoring__pb2.SubsResponse.SerializeToString, + ), + 'GetSubsDescriptor': grpc.unary_unary_rpc_method_handler( + servicer.GetSubsDescriptor, + request_deserializer=monitoring__pb2.SubscriptionID.FromString, + response_serializer=monitoring__pb2.SubsDescriptor.SerializeToString, + ), + 'GetSubscriptions': grpc.unary_unary_rpc_method_handler( + servicer.GetSubscriptions, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=monitoring__pb2.SubsList.SerializeToString, + ), + 'DeleteSubscription': grpc.unary_unary_rpc_method_handler( + servicer.DeleteSubscription, + request_deserializer=monitoring__pb2.SubscriptionID.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'SetKpiAlarm': grpc.unary_unary_rpc_method_handler( + servicer.SetKpiAlarm, + request_deserializer=monitoring__pb2.AlarmDescriptor.FromString, + response_serializer=monitoring__pb2.AlarmID.SerializeToString, + ), + 'GetAlarms': grpc.unary_unary_rpc_method_handler( + servicer.GetAlarms, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=monitoring__pb2.AlarmList.SerializeToString, + ), + 'GetAlarmDescriptor': grpc.unary_unary_rpc_method_handler( + servicer.GetAlarmDescriptor, + request_deserializer=monitoring__pb2.AlarmID.FromString, + response_serializer=monitoring__pb2.AlarmDescriptor.SerializeToString, + ), + 'GetAlarmResponseStream': grpc.unary_stream_rpc_method_handler( + servicer.GetAlarmResponseStream, + request_deserializer=monitoring__pb2.AlarmSubscription.FromString, + response_serializer=monitoring__pb2.AlarmResponse.SerializeToString, + ), + 'DeleteAlarm': grpc.unary_unary_rpc_method_handler( + servicer.DeleteAlarm, + request_deserializer=monitoring__pb2.AlarmID.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetStreamKpi': grpc.unary_stream_rpc_method_handler( + servicer.GetStreamKpi, + request_deserializer=monitoring__pb2.KpiId.FromString, + response_serializer=monitoring__pb2.Kpi.SerializeToString, + ), + 'GetInstantKpi': grpc.unary_unary_rpc_method_handler( + servicer.GetInstantKpi, + request_deserializer=monitoring__pb2.KpiId.FromString, + response_serializer=monitoring__pb2.Kpi.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'monitoring.MonitoringService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class MonitoringService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def SetKpi(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/SetKpi', + monitoring__pb2.KpiDescriptor.SerializeToString, + monitoring__pb2.KpiId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteKpi(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/DeleteKpi', + monitoring__pb2.KpiId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetKpiDescriptor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/GetKpiDescriptor', + monitoring__pb2.KpiId.SerializeToString, + monitoring__pb2.KpiDescriptor.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetKpiDescriptorList(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/GetKpiDescriptorList', + context__pb2.Empty.SerializeToString, + monitoring__pb2.KpiDescriptorList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def IncludeKpi(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/IncludeKpi', + monitoring__pb2.Kpi.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def MonitorKpi(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/MonitorKpi', + monitoring__pb2.MonitorKpiRequest.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def QueryKpiData(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/QueryKpiData', + monitoring__pb2.KpiQuery.SerializeToString, + monitoring__pb2.RawKpiTable.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetKpiSubscription(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/monitoring.MonitoringService/SetKpiSubscription', + monitoring__pb2.SubsDescriptor.SerializeToString, + monitoring__pb2.SubsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetSubsDescriptor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/GetSubsDescriptor', + monitoring__pb2.SubscriptionID.SerializeToString, + monitoring__pb2.SubsDescriptor.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetSubscriptions(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/GetSubscriptions', + context__pb2.Empty.SerializeToString, + monitoring__pb2.SubsList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteSubscription(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/DeleteSubscription', + monitoring__pb2.SubscriptionID.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetKpiAlarm(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/SetKpiAlarm', + monitoring__pb2.AlarmDescriptor.SerializeToString, + monitoring__pb2.AlarmID.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAlarms(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/GetAlarms', + context__pb2.Empty.SerializeToString, + monitoring__pb2.AlarmList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAlarmDescriptor(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/GetAlarmDescriptor', + monitoring__pb2.AlarmID.SerializeToString, + monitoring__pb2.AlarmDescriptor.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAlarmResponseStream(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/monitoring.MonitoringService/GetAlarmResponseStream', + monitoring__pb2.AlarmSubscription.SerializeToString, + monitoring__pb2.AlarmResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteAlarm(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/DeleteAlarm', + monitoring__pb2.AlarmID.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetStreamKpi(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/monitoring.MonitoringService/GetStreamKpi', + monitoring__pb2.KpiId.SerializeToString, + monitoring__pb2.Kpi.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetInstantKpi(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/monitoring.MonitoringService/GetInstantKpi', + monitoring__pb2.KpiId.SerializeToString, + monitoring__pb2.Kpi.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/nbi_pb2.py b/proto/nbi_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..c35d9a447478d518acedfeffc1572d2ea4741163 --- /dev/null +++ b/proto/nbi_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: nbi.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tnbi.proto\x12\x03nbi\x1a\rcontext.proto2\x85\x04\n\nNbiService\x12P\n\x10\x43heckCredentials\x12\x1b.context.TeraFlowController\x1a\x1d.context.AuthenticationResult\"\x00\x12L\n\x1cGetConnectivityServiceStatus\x12\x12.context.ServiceId\x1a\x16.context.ServiceStatus\"\x00\x12\x43\n\x19\x43reateConnectivityService\x12\x10.context.Service\x1a\x12.context.ServiceId\"\x00\x12\x41\n\x17\x45\x64itConnectivityService\x12\x10.context.Service\x1a\x12.context.ServiceId\"\x00\x12?\n\x19\x44\x65leteConnectivityService\x12\x10.context.Service\x1a\x0e.context.Empty\"\x00\x12L\n GetAllActiveConnectivityServices\x12\x0e.context.Empty\x1a\x16.context.ServiceIdList\"\x00\x12@\n\x1c\x43learAllConnectivityServices\x12\x0e.context.Empty\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_NBISERVICE = DESCRIPTOR.services_by_name['NbiService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _NBISERVICE._serialized_start=34 + _NBISERVICE._serialized_end=551 +# @@protoc_insertion_point(module_scope) diff --git a/proto/nbi_pb2_grpc.py b/proto/nbi_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..877d8463ddf041933f28045b8606497f2819ef8c --- /dev/null +++ b/proto/nbi_pb2_grpc.py @@ -0,0 +1,264 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 + + +class NbiServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CheckCredentials = channel.unary_unary( + '/nbi.NbiService/CheckCredentials', + request_serializer=context__pb2.TeraFlowController.SerializeToString, + response_deserializer=context__pb2.AuthenticationResult.FromString, + ) + self.GetConnectivityServiceStatus = channel.unary_unary( + '/nbi.NbiService/GetConnectivityServiceStatus', + request_serializer=context__pb2.ServiceId.SerializeToString, + response_deserializer=context__pb2.ServiceStatus.FromString, + ) + self.CreateConnectivityService = channel.unary_unary( + '/nbi.NbiService/CreateConnectivityService', + request_serializer=context__pb2.Service.SerializeToString, + response_deserializer=context__pb2.ServiceId.FromString, + ) + self.EditConnectivityService = channel.unary_unary( + '/nbi.NbiService/EditConnectivityService', + request_serializer=context__pb2.Service.SerializeToString, + response_deserializer=context__pb2.ServiceId.FromString, + ) + self.DeleteConnectivityService = channel.unary_unary( + '/nbi.NbiService/DeleteConnectivityService', + request_serializer=context__pb2.Service.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetAllActiveConnectivityServices = channel.unary_unary( + '/nbi.NbiService/GetAllActiveConnectivityServices', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.ServiceIdList.FromString, + ) + self.ClearAllConnectivityServices = channel.unary_unary( + '/nbi.NbiService/ClearAllConnectivityServices', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class NbiServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CheckCredentials(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetConnectivityServiceStatus(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateConnectivityService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def EditConnectivityService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteConnectivityService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAllActiveConnectivityServices(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ClearAllConnectivityServices(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_NbiServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CheckCredentials': grpc.unary_unary_rpc_method_handler( + servicer.CheckCredentials, + request_deserializer=context__pb2.TeraFlowController.FromString, + response_serializer=context__pb2.AuthenticationResult.SerializeToString, + ), + 'GetConnectivityServiceStatus': grpc.unary_unary_rpc_method_handler( + servicer.GetConnectivityServiceStatus, + request_deserializer=context__pb2.ServiceId.FromString, + response_serializer=context__pb2.ServiceStatus.SerializeToString, + ), + 'CreateConnectivityService': grpc.unary_unary_rpc_method_handler( + servicer.CreateConnectivityService, + request_deserializer=context__pb2.Service.FromString, + response_serializer=context__pb2.ServiceId.SerializeToString, + ), + 'EditConnectivityService': grpc.unary_unary_rpc_method_handler( + servicer.EditConnectivityService, + request_deserializer=context__pb2.Service.FromString, + response_serializer=context__pb2.ServiceId.SerializeToString, + ), + 'DeleteConnectivityService': grpc.unary_unary_rpc_method_handler( + servicer.DeleteConnectivityService, + request_deserializer=context__pb2.Service.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetAllActiveConnectivityServices': grpc.unary_unary_rpc_method_handler( + servicer.GetAllActiveConnectivityServices, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.ServiceIdList.SerializeToString, + ), + 'ClearAllConnectivityServices': grpc.unary_unary_rpc_method_handler( + servicer.ClearAllConnectivityServices, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'nbi.NbiService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class NbiService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CheckCredentials(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/nbi.NbiService/CheckCredentials', + context__pb2.TeraFlowController.SerializeToString, + context__pb2.AuthenticationResult.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetConnectivityServiceStatus(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/nbi.NbiService/GetConnectivityServiceStatus', + context__pb2.ServiceId.SerializeToString, + context__pb2.ServiceStatus.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateConnectivityService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/nbi.NbiService/CreateConnectivityService', + context__pb2.Service.SerializeToString, + context__pb2.ServiceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def EditConnectivityService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/nbi.NbiService/EditConnectivityService', + context__pb2.Service.SerializeToString, + context__pb2.ServiceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteConnectivityService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/nbi.NbiService/DeleteConnectivityService', + context__pb2.Service.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAllActiveConnectivityServices(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/nbi.NbiService/GetAllActiveConnectivityServices', + context__pb2.Empty.SerializeToString, + context__pb2.ServiceIdList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ClearAllConnectivityServices(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/nbi.NbiService/ClearAllConnectivityServices', + context__pb2.Empty.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/openconfig_device_pb2.py b/proto/openconfig_device_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..cc8b728392728a72ffbb1cefaa913627722f30d3 --- /dev/null +++ b/proto/openconfig_device_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: openconfig_device.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17openconfig_device.proto\x12\x11openconfig_device\x1a\rcontext.proto2\xa2\x01\n\x11OpenConfigService\x12I\n\x13\x41\x64\x64OpenConfigDevice\x12\x16.context.OpticalConfig\x1a\x18.context.OpticalConfigId\"\x00\x12\x42\n\x16\x43onfigureOpticalDevice\x12\x16.context.OpticalConfig\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_OPENCONFIGSERVICE = DESCRIPTOR.services_by_name['OpenConfigService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _OPENCONFIGSERVICE._serialized_start=62 + _OPENCONFIGSERVICE._serialized_end=224 +# @@protoc_insertion_point(module_scope) diff --git a/proto/openconfig_device_pb2_grpc.py b/proto/openconfig_device_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2c71d8ca7b0f8d5323f1be4d67cd5b1dd3636ce5 --- /dev/null +++ b/proto/openconfig_device_pb2_grpc.py @@ -0,0 +1,99 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 + + +class OpenConfigServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.AddOpenConfigDevice = channel.unary_unary( + '/openconfig_device.OpenConfigService/AddOpenConfigDevice', + request_serializer=context__pb2.OpticalConfig.SerializeToString, + response_deserializer=context__pb2.OpticalConfigId.FromString, + ) + self.ConfigureOpticalDevice = channel.unary_unary( + '/openconfig_device.OpenConfigService/ConfigureOpticalDevice', + request_serializer=context__pb2.OpticalConfig.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class OpenConfigServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def AddOpenConfigDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ConfigureOpticalDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_OpenConfigServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'AddOpenConfigDevice': grpc.unary_unary_rpc_method_handler( + servicer.AddOpenConfigDevice, + request_deserializer=context__pb2.OpticalConfig.FromString, + response_serializer=context__pb2.OpticalConfigId.SerializeToString, + ), + 'ConfigureOpticalDevice': grpc.unary_unary_rpc_method_handler( + servicer.ConfigureOpticalDevice, + request_deserializer=context__pb2.OpticalConfig.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'openconfig_device.OpenConfigService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class OpenConfigService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def AddOpenConfigDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/openconfig_device.OpenConfigService/AddOpenConfigDevice', + context__pb2.OpticalConfig.SerializeToString, + context__pb2.OpticalConfigId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ConfigureOpticalDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/openconfig_device.OpenConfigService/ConfigureOpticalDevice', + context__pb2.OpticalConfig.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/optical_attack_detector_pb2.py b/proto/optical_attack_detector_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..3ec979fe0760a7a2b7812009d90fa93c3b90a840 --- /dev/null +++ b/proto/optical_attack_detector_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: optical_attack_detector.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import monitoring_pb2 as monitoring__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1doptical_attack_detector.proto\x12\x17optical_attack_detector\x1a\rcontext.proto\x1a\x10monitoring.proto\"]\n\x10\x44\x65tectionRequest\x12&\n\nservice_id\x18\x01 \x01(\x0b\x32\x12.context.ServiceId\x12!\n\x06kpi_id\x18\x02 \x01(\x0b\x32\x11.monitoring.KpiId2k\n\x1cOpticalAttackDetectorService\x12K\n\x0c\x44\x65tectAttack\x12).optical_attack_detector.DetectionRequest\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_DETECTIONREQUEST = DESCRIPTOR.message_types_by_name['DetectionRequest'] +DetectionRequest = _reflection.GeneratedProtocolMessageType('DetectionRequest', (_message.Message,), { + 'DESCRIPTOR' : _DETECTIONREQUEST, + '__module__' : 'optical_attack_detector_pb2' + # @@protoc_insertion_point(class_scope:optical_attack_detector.DetectionRequest) + }) +_sym_db.RegisterMessage(DetectionRequest) + +_OPTICALATTACKDETECTORSERVICE = DESCRIPTOR.services_by_name['OpticalAttackDetectorService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _DETECTIONREQUEST._serialized_start=91 + _DETECTIONREQUEST._serialized_end=184 + _OPTICALATTACKDETECTORSERVICE._serialized_start=186 + _OPTICALATTACKDETECTORSERVICE._serialized_end=293 +# @@protoc_insertion_point(module_scope) diff --git a/proto/optical_attack_detector_pb2_grpc.py b/proto/optical_attack_detector_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..d07553cd21c4b82c0d12597e575ddb159dca61c8 --- /dev/null +++ b/proto/optical_attack_detector_pb2_grpc.py @@ -0,0 +1,68 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import optical_attack_detector_pb2 as optical__attack__detector__pb2 + + +class OpticalAttackDetectorServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.DetectAttack = channel.unary_unary( + '/optical_attack_detector.OpticalAttackDetectorService/DetectAttack', + request_serializer=optical__attack__detector__pb2.DetectionRequest.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class OpticalAttackDetectorServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def DetectAttack(self, request, context): + """rpc that executes the detection loop for a particular service + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_OpticalAttackDetectorServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'DetectAttack': grpc.unary_unary_rpc_method_handler( + servicer.DetectAttack, + request_deserializer=optical__attack__detector__pb2.DetectionRequest.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'optical_attack_detector.OpticalAttackDetectorService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class OpticalAttackDetectorService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def DetectAttack(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/optical_attack_detector.OpticalAttackDetectorService/DetectAttack', + optical__attack__detector__pb2.DetectionRequest.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/optical_attack_mitigator_pb2.py b/proto/optical_attack_mitigator_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..2a7df0295286750f3df0200c67adbe3e8d06cd2e --- /dev/null +++ b/proto/optical_attack_mitigator_pb2.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: optical_attack_mitigator.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eoptical_attack_mitigator.proto\x12\x18optical_attack_mitigator\x1a\rcontext.proto\"t\n\x11\x41ttackDescription\x12\x1c\n\x05\x63s_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\x12\x11\n\tattack_id\x18\x02 \x01(\x05\x12\x12\n\nconfidence\x18\x03 \x01(\x02\x12\x1a\n\x12\x61ttack_description\x18\x04 \x01(\t\"\xa2\x01\n\x0e\x41ttackResponse\x12\x1c\n\x05\x63s_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\x12\x11\n\tattack_id\x18\x02 \x01(\x05\x12\x1a\n\x12\x61ttack_description\x18\x03 \x01(\t\x12\x1c\n\x14response_strategy_id\x18\x04 \x01(\x05\x12%\n\x1dresponse_strategy_description\x18\x05 \x01(\t2z\n\x0f\x41ttackMitigator\x12g\n\x0cNotifyAttack\x12+.optical_attack_mitigator.AttackDescription\x1a(.optical_attack_mitigator.AttackResponse\"\x00\x62\x06proto3') + + + +_ATTACKDESCRIPTION = DESCRIPTOR.message_types_by_name['AttackDescription'] +_ATTACKRESPONSE = DESCRIPTOR.message_types_by_name['AttackResponse'] +AttackDescription = _reflection.GeneratedProtocolMessageType('AttackDescription', (_message.Message,), { + 'DESCRIPTOR' : _ATTACKDESCRIPTION, + '__module__' : 'optical_attack_mitigator_pb2' + # @@protoc_insertion_point(class_scope:optical_attack_mitigator.AttackDescription) + }) +_sym_db.RegisterMessage(AttackDescription) + +AttackResponse = _reflection.GeneratedProtocolMessageType('AttackResponse', (_message.Message,), { + 'DESCRIPTOR' : _ATTACKRESPONSE, + '__module__' : 'optical_attack_mitigator_pb2' + # @@protoc_insertion_point(class_scope:optical_attack_mitigator.AttackResponse) + }) +_sym_db.RegisterMessage(AttackResponse) + +_ATTACKMITIGATOR = DESCRIPTOR.services_by_name['AttackMitigator'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _ATTACKDESCRIPTION._serialized_start=75 + _ATTACKDESCRIPTION._serialized_end=191 + _ATTACKRESPONSE._serialized_start=194 + _ATTACKRESPONSE._serialized_end=356 + _ATTACKMITIGATOR._serialized_start=358 + _ATTACKMITIGATOR._serialized_end=480 +# @@protoc_insertion_point(module_scope) diff --git a/proto/optical_attack_mitigator_pb2_grpc.py b/proto/optical_attack_mitigator_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..f4f110a702bf33d98aff1c9a6d122019a3af7eca --- /dev/null +++ b/proto/optical_attack_mitigator_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import optical_attack_mitigator_pb2 as optical__attack__mitigator__pb2 + + +class AttackMitigatorStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.NotifyAttack = channel.unary_unary( + '/optical_attack_mitigator.AttackMitigator/NotifyAttack', + request_serializer=optical__attack__mitigator__pb2.AttackDescription.SerializeToString, + response_deserializer=optical__attack__mitigator__pb2.AttackResponse.FromString, + ) + + +class AttackMitigatorServicer(object): + """Missing associated documentation comment in .proto file.""" + + def NotifyAttack(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_AttackMitigatorServicer_to_server(servicer, server): + rpc_method_handlers = { + 'NotifyAttack': grpc.unary_unary_rpc_method_handler( + servicer.NotifyAttack, + request_deserializer=optical__attack__mitigator__pb2.AttackDescription.FromString, + response_serializer=optical__attack__mitigator__pb2.AttackResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'optical_attack_mitigator.AttackMitigator', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class AttackMitigator(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def NotifyAttack(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/optical_attack_mitigator.AttackMitigator/NotifyAttack', + optical__attack__mitigator__pb2.AttackDescription.SerializeToString, + optical__attack__mitigator__pb2.AttackResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/pathcomp_pb2.py b/proto/pathcomp_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..75f744323ece20be22aee180b896fc32f4076e32 --- /dev/null +++ b/proto/pathcomp_pb2.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: pathcomp.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0epathcomp.proto\x12\x08pathcomp\x1a\rcontext.proto\"\x18\n\x16\x41lgorithm_ShortestPath\"A\n\x17\x41lgorithm_KShortestPath\x12\x14\n\x0ck_inspection\x18\x01 \x01(\r\x12\x10\n\x08k_return\x18\x02 \x01(\r\"/\n\x17\x41lgorithm_KDisjointPath\x12\x14\n\x0cnum_disjoint\x18\x01 \x01(\r\"\xf9\x01\n\x0fPathCompRequest\x12\"\n\x08services\x18\x01 \x03(\x0b\x32\x10.context.Service\x12\x39\n\rshortest_path\x18\n \x01(\x0b\x32 .pathcomp.Algorithm_ShortestPathH\x00\x12<\n\x0fk_shortest_path\x18\x0b \x01(\x0b\x32!.pathcomp.Algorithm_KShortestPathH\x00\x12<\n\x0fk_disjoint_path\x18\x0c \x01(\x0b\x32!.pathcomp.Algorithm_KDisjointPathH\x00\x42\x0b\n\talgorithm\"]\n\rPathCompReply\x12\"\n\x08services\x18\x01 \x03(\x0b\x32\x10.context.Service\x12(\n\x0b\x63onnections\x18\x02 \x03(\x0b\x32\x13.context.Connection2R\n\x0fPathCompService\x12?\n\x07\x43ompute\x12\x19.pathcomp.PathCompRequest\x1a\x17.pathcomp.PathCompReply\"\x00\x62\x06proto3') + + + +_ALGORITHM_SHORTESTPATH = DESCRIPTOR.message_types_by_name['Algorithm_ShortestPath'] +_ALGORITHM_KSHORTESTPATH = DESCRIPTOR.message_types_by_name['Algorithm_KShortestPath'] +_ALGORITHM_KDISJOINTPATH = DESCRIPTOR.message_types_by_name['Algorithm_KDisjointPath'] +_PATHCOMPREQUEST = DESCRIPTOR.message_types_by_name['PathCompRequest'] +_PATHCOMPREPLY = DESCRIPTOR.message_types_by_name['PathCompReply'] +Algorithm_ShortestPath = _reflection.GeneratedProtocolMessageType('Algorithm_ShortestPath', (_message.Message,), { + 'DESCRIPTOR' : _ALGORITHM_SHORTESTPATH, + '__module__' : 'pathcomp_pb2' + # @@protoc_insertion_point(class_scope:pathcomp.Algorithm_ShortestPath) + }) +_sym_db.RegisterMessage(Algorithm_ShortestPath) + +Algorithm_KShortestPath = _reflection.GeneratedProtocolMessageType('Algorithm_KShortestPath', (_message.Message,), { + 'DESCRIPTOR' : _ALGORITHM_KSHORTESTPATH, + '__module__' : 'pathcomp_pb2' + # @@protoc_insertion_point(class_scope:pathcomp.Algorithm_KShortestPath) + }) +_sym_db.RegisterMessage(Algorithm_KShortestPath) + +Algorithm_KDisjointPath = _reflection.GeneratedProtocolMessageType('Algorithm_KDisjointPath', (_message.Message,), { + 'DESCRIPTOR' : _ALGORITHM_KDISJOINTPATH, + '__module__' : 'pathcomp_pb2' + # @@protoc_insertion_point(class_scope:pathcomp.Algorithm_KDisjointPath) + }) +_sym_db.RegisterMessage(Algorithm_KDisjointPath) + +PathCompRequest = _reflection.GeneratedProtocolMessageType('PathCompRequest', (_message.Message,), { + 'DESCRIPTOR' : _PATHCOMPREQUEST, + '__module__' : 'pathcomp_pb2' + # @@protoc_insertion_point(class_scope:pathcomp.PathCompRequest) + }) +_sym_db.RegisterMessage(PathCompRequest) + +PathCompReply = _reflection.GeneratedProtocolMessageType('PathCompReply', (_message.Message,), { + 'DESCRIPTOR' : _PATHCOMPREPLY, + '__module__' : 'pathcomp_pb2' + # @@protoc_insertion_point(class_scope:pathcomp.PathCompReply) + }) +_sym_db.RegisterMessage(PathCompReply) + +_PATHCOMPSERVICE = DESCRIPTOR.services_by_name['PathCompService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _ALGORITHM_SHORTESTPATH._serialized_start=43 + _ALGORITHM_SHORTESTPATH._serialized_end=67 + _ALGORITHM_KSHORTESTPATH._serialized_start=69 + _ALGORITHM_KSHORTESTPATH._serialized_end=134 + _ALGORITHM_KDISJOINTPATH._serialized_start=136 + _ALGORITHM_KDISJOINTPATH._serialized_end=183 + _PATHCOMPREQUEST._serialized_start=186 + _PATHCOMPREQUEST._serialized_end=435 + _PATHCOMPREPLY._serialized_start=437 + _PATHCOMPREPLY._serialized_end=530 + _PATHCOMPSERVICE._serialized_start=532 + _PATHCOMPSERVICE._serialized_end=614 +# @@protoc_insertion_point(module_scope) diff --git a/proto/pathcomp_pb2_grpc.py b/proto/pathcomp_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..112a9e09b9ddaaa02c85ae24c7fa925c09b80b62 --- /dev/null +++ b/proto/pathcomp_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import pathcomp_pb2 as pathcomp__pb2 + + +class PathCompServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Compute = channel.unary_unary( + '/pathcomp.PathCompService/Compute', + request_serializer=pathcomp__pb2.PathCompRequest.SerializeToString, + response_deserializer=pathcomp__pb2.PathCompReply.FromString, + ) + + +class PathCompServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def Compute(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_PathCompServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Compute': grpc.unary_unary_rpc_method_handler( + servicer.Compute, + request_deserializer=pathcomp__pb2.PathCompRequest.FromString, + response_serializer=pathcomp__pb2.PathCompReply.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'pathcomp.PathCompService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class PathCompService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def Compute(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pathcomp.PathCompService/Compute', + pathcomp__pb2.PathCompRequest.SerializeToString, + pathcomp__pb2.PathCompReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/policy_action_pb2.py b/proto/policy_action_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..ed95404ee011521937d612e91c52687a636cd10d --- /dev/null +++ b/proto/policy_action_pb2.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: policy_action.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13policy_action.proto\x12\x06policy\"w\n\x10PolicyRuleAction\x12,\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x1c.policy.PolicyRuleActionEnum\x12\x35\n\raction_config\x18\x02 \x03(\x0b\x32\x1e.policy.PolicyRuleActionConfig\"B\n\x16PolicyRuleActionConfig\x12\x12\n\naction_key\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63tion_value\x18\x02 \x01(\t*\x8e\x02\n\x14PolicyRuleActionEnum\x12\x1f\n\x1bPOLICYRULE_ACTION_NO_ACTION\x10\x00\x12\'\n#POLICYRULE_ACTION_SET_DEVICE_STATUS\x10\x01\x12,\n(POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE\x10\x02\x12,\n(POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT\x10\x03\x12\'\n#POLICY_RULE_ACTION_CALL_SERVICE_RPC\x10\x04\x12\'\n#POLICY_RULE_ACTION_RECALCULATE_PATH\x10\x05\x62\x06proto3') + +_POLICYRULEACTIONENUM = DESCRIPTOR.enum_types_by_name['PolicyRuleActionEnum'] +PolicyRuleActionEnum = enum_type_wrapper.EnumTypeWrapper(_POLICYRULEACTIONENUM) +POLICYRULE_ACTION_NO_ACTION = 0 +POLICYRULE_ACTION_SET_DEVICE_STATUS = 1 +POLICYRULE_ACTION_ADD_SERVICE_CONFIGRULE = 2 +POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3 +POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4 +POLICY_RULE_ACTION_RECALCULATE_PATH = 5 + + +_POLICYRULEACTION = DESCRIPTOR.message_types_by_name['PolicyRuleAction'] +_POLICYRULEACTIONCONFIG = DESCRIPTOR.message_types_by_name['PolicyRuleActionConfig'] +PolicyRuleAction = _reflection.GeneratedProtocolMessageType('PolicyRuleAction', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEACTION, + '__module__' : 'policy_action_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleAction) + }) +_sym_db.RegisterMessage(PolicyRuleAction) + +PolicyRuleActionConfig = _reflection.GeneratedProtocolMessageType('PolicyRuleActionConfig', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEACTIONCONFIG, + '__module__' : 'policy_action_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleActionConfig) + }) +_sym_db.RegisterMessage(PolicyRuleActionConfig) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _POLICYRULEACTIONENUM._serialized_start=221 + _POLICYRULEACTIONENUM._serialized_end=491 + _POLICYRULEACTION._serialized_start=31 + _POLICYRULEACTION._serialized_end=150 + _POLICYRULEACTIONCONFIG._serialized_start=152 + _POLICYRULEACTIONCONFIG._serialized_end=218 +# @@protoc_insertion_point(module_scope) diff --git a/proto/policy_action_pb2_grpc.py b/proto/policy_action_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/proto/policy_action_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/proto/policy_condition_pb2.py b/proto/policy_condition_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..d942380924f5c8be88d1e470e08848cab2eba889 --- /dev/null +++ b/proto/policy_condition_pb2.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: policy_condition.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import monitoring_pb2 as monitoring__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16policy_condition.proto\x12\x06policy\x1a\x10monitoring.proto\"\x95\x01\n\x13PolicyRuleCondition\x12 \n\x05kpiId\x18\x01 \x01(\x0b\x32\x11.monitoring.KpiId\x12\x34\n\x11numericalOperator\x18\x02 \x01(\x0e\x32\x19.policy.NumericalOperator\x12&\n\x08kpiValue\x18\x03 \x01(\x0b\x32\x14.monitoring.KpiValue*\xe3\x02\n\x11NumericalOperator\x12,\n(POLICYRULE_CONDITION_NUMERICAL_UNDEFINED\x10\x00\x12(\n$POLICYRULE_CONDITION_NUMERICAL_EQUAL\x10\x01\x12,\n(POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL\x10\x02\x12,\n(POLICYRULE_CONDITION_NUMERICAL_LESS_THAN\x10\x03\x12\x32\n.POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL\x10\x04\x12/\n+POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN\x10\x05\x12\x35\n1POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL\x10\x06*\x88\x01\n\x0f\x42ooleanOperator\x12*\n&POLICYRULE_CONDITION_BOOLEAN_UNDEFINED\x10\x00\x12$\n POLICYRULE_CONDITION_BOOLEAN_AND\x10\x01\x12#\n\x1fPOLICYRULE_CONDITION_BOOLEAN_OR\x10\x02\x62\x06proto3') + +_NUMERICALOPERATOR = DESCRIPTOR.enum_types_by_name['NumericalOperator'] +NumericalOperator = enum_type_wrapper.EnumTypeWrapper(_NUMERICALOPERATOR) +_BOOLEANOPERATOR = DESCRIPTOR.enum_types_by_name['BooleanOperator'] +BooleanOperator = enum_type_wrapper.EnumTypeWrapper(_BOOLEANOPERATOR) +POLICYRULE_CONDITION_NUMERICAL_UNDEFINED = 0 +POLICYRULE_CONDITION_NUMERICAL_EQUAL = 1 +POLICYRULE_CONDITION_NUMERICAL_NOT_EQUAL = 2 +POLICYRULE_CONDITION_NUMERICAL_LESS_THAN = 3 +POLICYRULE_CONDITION_NUMERICAL_LESS_THAN_EQUAL = 4 +POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN = 5 +POLICYRULE_CONDITION_NUMERICAL_GREATER_THAN_EQUAL = 6 +POLICYRULE_CONDITION_BOOLEAN_UNDEFINED = 0 +POLICYRULE_CONDITION_BOOLEAN_AND = 1 +POLICYRULE_CONDITION_BOOLEAN_OR = 2 + + +_POLICYRULECONDITION = DESCRIPTOR.message_types_by_name['PolicyRuleCondition'] +PolicyRuleCondition = _reflection.GeneratedProtocolMessageType('PolicyRuleCondition', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULECONDITION, + '__module__' : 'policy_condition_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleCondition) + }) +_sym_db.RegisterMessage(PolicyRuleCondition) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _NUMERICALOPERATOR._serialized_start=205 + _NUMERICALOPERATOR._serialized_end=560 + _BOOLEANOPERATOR._serialized_start=563 + _BOOLEANOPERATOR._serialized_end=699 + _POLICYRULECONDITION._serialized_start=53 + _POLICYRULECONDITION._serialized_end=202 +# @@protoc_insertion_point(module_scope) diff --git a/proto/policy_condition_pb2_grpc.py b/proto/policy_condition_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..2daafffebfc817aefe8fcb96eaec25e65b3903e8 --- /dev/null +++ b/proto/policy_condition_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/proto/policy_pb2.py b/proto/policy_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..c1c710998b219f9bedc5ea4d5f357c9439c81875 --- /dev/null +++ b/proto/policy_pb2.py @@ -0,0 +1,146 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: policy.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import policy_condition_pb2 as policy__condition__pb2 +import policy_action_pb2 as policy__action__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cpolicy.proto\x12\x06policy\x1a\rcontext.proto\x1a\x16policy_condition.proto\x1a\x13policy_action.proto\"+\n\x0cPolicyRuleId\x12\x1b\n\x04uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\"g\n\x0fPolicyRuleState\x12\x34\n\x0fpolicyRuleState\x18\x01 \x01(\x0e\x32\x1b.policy.PolicyRuleStateEnum\x12\x1e\n\x16policyRuleStateMessage\x18\x02 \x01(\t\"\x95\x02\n\x0fPolicyRuleBasic\x12*\n\x0cpolicyRuleId\x18\x01 \x01(\x0b\x32\x14.policy.PolicyRuleId\x12\x30\n\x0fpolicyRuleState\x18\x02 \x01(\x0b\x32\x17.policy.PolicyRuleState\x12\x10\n\x08priority\x18\x03 \x01(\r\x12\x32\n\rconditionList\x18\x04 \x03(\x0b\x32\x1b.policy.PolicyRuleCondition\x12\x30\n\x0f\x62ooleanOperator\x18\x05 \x01(\x0e\x32\x17.policy.BooleanOperator\x12,\n\nactionList\x18\x06 \x03(\x0b\x32\x18.policy.PolicyRuleAction\"\x93\x01\n\x11PolicyRuleService\x12\x30\n\x0fpolicyRuleBasic\x18\x01 \x01(\x0b\x32\x17.policy.PolicyRuleBasic\x12%\n\tserviceId\x18\x02 \x01(\x0b\x32\x12.context.ServiceId\x12%\n\ndeviceList\x18\x03 \x03(\x0b\x32\x11.context.DeviceId\"k\n\x10PolicyRuleDevice\x12\x30\n\x0fpolicyRuleBasic\x18\x01 \x01(\x0b\x32\x17.policy.PolicyRuleBasic\x12%\n\ndeviceList\x18\x02 \x03(\x0b\x32\x11.context.DeviceId\"u\n\nPolicyRule\x12,\n\x07service\x18\x01 \x01(\x0b\x32\x19.policy.PolicyRuleServiceH\x00\x12*\n\x06\x64\x65vice\x18\x02 \x01(\x0b\x32\x18.policy.PolicyRuleDeviceH\x00\x42\r\n\x0bpolicy_rule\"B\n\x10PolicyRuleIdList\x12.\n\x10policyRuleIdList\x18\x01 \x03(\x0b\x32\x14.policy.PolicyRuleId\"Q\n\x15PolicyRuleServiceList\x12\x38\n\x15policyRuleServiceList\x18\x01 \x03(\x0b\x32\x19.policy.PolicyRuleService\"N\n\x14PolicyRuleDeviceList\x12\x36\n\x14policyRuleDeviceList\x18\x01 \x03(\x0b\x32\x18.policy.PolicyRuleDevice\"9\n\x0ePolicyRuleList\x12\'\n\x0bpolicyRules\x18\x01 \x03(\x0b\x32\x12.policy.PolicyRule*\xff\x01\n\x13PolicyRuleStateEnum\x12\x14\n\x10POLICY_UNDEFINED\x10\x00\x12\x11\n\rPOLICY_FAILED\x10\x01\x12\x13\n\x0fPOLICY_INSERTED\x10\x02\x12\x14\n\x10POLICY_VALIDATED\x10\x03\x12\x16\n\x12POLICY_PROVISIONED\x10\x04\x12\x11\n\rPOLICY_ACTIVE\x10\x05\x12\x13\n\x0fPOLICY_ENFORCED\x10\x06\x12\x16\n\x12POLICY_INEFFECTIVE\x10\x07\x12\x14\n\x10POLICY_EFFECTIVE\x10\x08\x12\x12\n\x0ePOLICY_UPDATED\x10\t\x12\x12\n\x0ePOLICY_REMOVED\x10\n2\xd3\x04\n\rPolicyService\x12H\n\x10PolicyAddService\x12\x19.policy.PolicyRuleService\x1a\x17.policy.PolicyRuleState\"\x00\x12\x46\n\x0fPolicyAddDevice\x12\x18.policy.PolicyRuleDevice\x1a\x17.policy.PolicyRuleState\"\x00\x12K\n\x13PolicyUpdateService\x12\x19.policy.PolicyRuleService\x1a\x17.policy.PolicyRuleState\"\x00\x12I\n\x12PolicyUpdateDevice\x12\x18.policy.PolicyRuleDevice\x1a\x17.policy.PolicyRuleState\"\x00\x12?\n\x0cPolicyDelete\x12\x14.policy.PolicyRuleId\x1a\x17.policy.PolicyRuleState\"\x00\x12\x45\n\x10GetPolicyService\x12\x14.policy.PolicyRuleId\x1a\x19.policy.PolicyRuleService\"\x00\x12\x43\n\x0fGetPolicyDevice\x12\x14.policy.PolicyRuleId\x1a\x18.policy.PolicyRuleDevice\"\x00\x12K\n\x14GetPolicyByServiceId\x12\x12.context.ServiceId\x1a\x1d.policy.PolicyRuleServiceList\"\x00\x62\x06proto3') + +_POLICYRULESTATEENUM = DESCRIPTOR.enum_types_by_name['PolicyRuleStateEnum'] +PolicyRuleStateEnum = enum_type_wrapper.EnumTypeWrapper(_POLICYRULESTATEENUM) +POLICY_UNDEFINED = 0 +POLICY_FAILED = 1 +POLICY_INSERTED = 2 +POLICY_VALIDATED = 3 +POLICY_PROVISIONED = 4 +POLICY_ACTIVE = 5 +POLICY_ENFORCED = 6 +POLICY_INEFFECTIVE = 7 +POLICY_EFFECTIVE = 8 +POLICY_UPDATED = 9 +POLICY_REMOVED = 10 + + +_POLICYRULEID = DESCRIPTOR.message_types_by_name['PolicyRuleId'] +_POLICYRULESTATE = DESCRIPTOR.message_types_by_name['PolicyRuleState'] +_POLICYRULEBASIC = DESCRIPTOR.message_types_by_name['PolicyRuleBasic'] +_POLICYRULESERVICE = DESCRIPTOR.message_types_by_name['PolicyRuleService'] +_POLICYRULEDEVICE = DESCRIPTOR.message_types_by_name['PolicyRuleDevice'] +_POLICYRULE = DESCRIPTOR.message_types_by_name['PolicyRule'] +_POLICYRULEIDLIST = DESCRIPTOR.message_types_by_name['PolicyRuleIdList'] +_POLICYRULESERVICELIST = DESCRIPTOR.message_types_by_name['PolicyRuleServiceList'] +_POLICYRULEDEVICELIST = DESCRIPTOR.message_types_by_name['PolicyRuleDeviceList'] +_POLICYRULELIST = DESCRIPTOR.message_types_by_name['PolicyRuleList'] +PolicyRuleId = _reflection.GeneratedProtocolMessageType('PolicyRuleId', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEID, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleId) + }) +_sym_db.RegisterMessage(PolicyRuleId) + +PolicyRuleState = _reflection.GeneratedProtocolMessageType('PolicyRuleState', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULESTATE, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleState) + }) +_sym_db.RegisterMessage(PolicyRuleState) + +PolicyRuleBasic = _reflection.GeneratedProtocolMessageType('PolicyRuleBasic', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEBASIC, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleBasic) + }) +_sym_db.RegisterMessage(PolicyRuleBasic) + +PolicyRuleService = _reflection.GeneratedProtocolMessageType('PolicyRuleService', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULESERVICE, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleService) + }) +_sym_db.RegisterMessage(PolicyRuleService) + +PolicyRuleDevice = _reflection.GeneratedProtocolMessageType('PolicyRuleDevice', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEDEVICE, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleDevice) + }) +_sym_db.RegisterMessage(PolicyRuleDevice) + +PolicyRule = _reflection.GeneratedProtocolMessageType('PolicyRule', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULE, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRule) + }) +_sym_db.RegisterMessage(PolicyRule) + +PolicyRuleIdList = _reflection.GeneratedProtocolMessageType('PolicyRuleIdList', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEIDLIST, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleIdList) + }) +_sym_db.RegisterMessage(PolicyRuleIdList) + +PolicyRuleServiceList = _reflection.GeneratedProtocolMessageType('PolicyRuleServiceList', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULESERVICELIST, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleServiceList) + }) +_sym_db.RegisterMessage(PolicyRuleServiceList) + +PolicyRuleDeviceList = _reflection.GeneratedProtocolMessageType('PolicyRuleDeviceList', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEDEVICELIST, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleDeviceList) + }) +_sym_db.RegisterMessage(PolicyRuleDeviceList) + +PolicyRuleList = _reflection.GeneratedProtocolMessageType('PolicyRuleList', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULELIST, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleList) + }) +_sym_db.RegisterMessage(PolicyRuleList) + +_POLICYSERVICE = DESCRIPTOR.services_by_name['PolicyService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _POLICYRULESTATEENUM._serialized_start=1183 + _POLICYRULESTATEENUM._serialized_end=1438 + _POLICYRULEID._serialized_start=84 + _POLICYRULEID._serialized_end=127 + _POLICYRULESTATE._serialized_start=129 + _POLICYRULESTATE._serialized_end=232 + _POLICYRULEBASIC._serialized_start=235 + _POLICYRULEBASIC._serialized_end=512 + _POLICYRULESERVICE._serialized_start=515 + _POLICYRULESERVICE._serialized_end=662 + _POLICYRULEDEVICE._serialized_start=664 + _POLICYRULEDEVICE._serialized_end=771 + _POLICYRULE._serialized_start=773 + _POLICYRULE._serialized_end=890 + _POLICYRULEIDLIST._serialized_start=892 + _POLICYRULEIDLIST._serialized_end=958 + _POLICYRULESERVICELIST._serialized_start=960 + _POLICYRULESERVICELIST._serialized_end=1041 + _POLICYRULEDEVICELIST._serialized_start=1043 + _POLICYRULEDEVICELIST._serialized_end=1121 + _POLICYRULELIST._serialized_start=1123 + _POLICYRULELIST._serialized_end=1180 + _POLICYSERVICE._serialized_start=1441 + _POLICYSERVICE._serialized_end=2036 +# @@protoc_insertion_point(module_scope) diff --git a/proto/policy_pb2_grpc.py b/proto/policy_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..8330d36474b2bd00a43cc95ddda3694d723a4266 --- /dev/null +++ b/proto/policy_pb2_grpc.py @@ -0,0 +1,298 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import policy_pb2 as policy__pb2 + + +class PolicyServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.PolicyAddService = channel.unary_unary( + '/policy.PolicyService/PolicyAddService', + request_serializer=policy__pb2.PolicyRuleService.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleState.FromString, + ) + self.PolicyAddDevice = channel.unary_unary( + '/policy.PolicyService/PolicyAddDevice', + request_serializer=policy__pb2.PolicyRuleDevice.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleState.FromString, + ) + self.PolicyUpdateService = channel.unary_unary( + '/policy.PolicyService/PolicyUpdateService', + request_serializer=policy__pb2.PolicyRuleService.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleState.FromString, + ) + self.PolicyUpdateDevice = channel.unary_unary( + '/policy.PolicyService/PolicyUpdateDevice', + request_serializer=policy__pb2.PolicyRuleDevice.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleState.FromString, + ) + self.PolicyDelete = channel.unary_unary( + '/policy.PolicyService/PolicyDelete', + request_serializer=policy__pb2.PolicyRuleId.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleState.FromString, + ) + self.GetPolicyService = channel.unary_unary( + '/policy.PolicyService/GetPolicyService', + request_serializer=policy__pb2.PolicyRuleId.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleService.FromString, + ) + self.GetPolicyDevice = channel.unary_unary( + '/policy.PolicyService/GetPolicyDevice', + request_serializer=policy__pb2.PolicyRuleId.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleDevice.FromString, + ) + self.GetPolicyByServiceId = channel.unary_unary( + '/policy.PolicyService/GetPolicyByServiceId', + request_serializer=context__pb2.ServiceId.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleServiceList.FromString, + ) + + +class PolicyServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def PolicyAddService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PolicyAddDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PolicyUpdateService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PolicyUpdateDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PolicyDelete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetPolicyService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetPolicyDevice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetPolicyByServiceId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_PolicyServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'PolicyAddService': grpc.unary_unary_rpc_method_handler( + servicer.PolicyAddService, + request_deserializer=policy__pb2.PolicyRuleService.FromString, + response_serializer=policy__pb2.PolicyRuleState.SerializeToString, + ), + 'PolicyAddDevice': grpc.unary_unary_rpc_method_handler( + servicer.PolicyAddDevice, + request_deserializer=policy__pb2.PolicyRuleDevice.FromString, + response_serializer=policy__pb2.PolicyRuleState.SerializeToString, + ), + 'PolicyUpdateService': grpc.unary_unary_rpc_method_handler( + servicer.PolicyUpdateService, + request_deserializer=policy__pb2.PolicyRuleService.FromString, + response_serializer=policy__pb2.PolicyRuleState.SerializeToString, + ), + 'PolicyUpdateDevice': grpc.unary_unary_rpc_method_handler( + servicer.PolicyUpdateDevice, + request_deserializer=policy__pb2.PolicyRuleDevice.FromString, + response_serializer=policy__pb2.PolicyRuleState.SerializeToString, + ), + 'PolicyDelete': grpc.unary_unary_rpc_method_handler( + servicer.PolicyDelete, + request_deserializer=policy__pb2.PolicyRuleId.FromString, + response_serializer=policy__pb2.PolicyRuleState.SerializeToString, + ), + 'GetPolicyService': grpc.unary_unary_rpc_method_handler( + servicer.GetPolicyService, + request_deserializer=policy__pb2.PolicyRuleId.FromString, + response_serializer=policy__pb2.PolicyRuleService.SerializeToString, + ), + 'GetPolicyDevice': grpc.unary_unary_rpc_method_handler( + servicer.GetPolicyDevice, + request_deserializer=policy__pb2.PolicyRuleId.FromString, + response_serializer=policy__pb2.PolicyRuleDevice.SerializeToString, + ), + 'GetPolicyByServiceId': grpc.unary_unary_rpc_method_handler( + servicer.GetPolicyByServiceId, + request_deserializer=context__pb2.ServiceId.FromString, + response_serializer=policy__pb2.PolicyRuleServiceList.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'policy.PolicyService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class PolicyService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def PolicyAddService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/policy.PolicyService/PolicyAddService', + policy__pb2.PolicyRuleService.SerializeToString, + policy__pb2.PolicyRuleState.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PolicyAddDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/policy.PolicyService/PolicyAddDevice', + policy__pb2.PolicyRuleDevice.SerializeToString, + policy__pb2.PolicyRuleState.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PolicyUpdateService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/policy.PolicyService/PolicyUpdateService', + policy__pb2.PolicyRuleService.SerializeToString, + policy__pb2.PolicyRuleState.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PolicyUpdateDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/policy.PolicyService/PolicyUpdateDevice', + policy__pb2.PolicyRuleDevice.SerializeToString, + policy__pb2.PolicyRuleState.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def PolicyDelete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/policy.PolicyService/PolicyDelete', + policy__pb2.PolicyRuleId.SerializeToString, + policy__pb2.PolicyRuleState.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetPolicyService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/policy.PolicyService/GetPolicyService', + policy__pb2.PolicyRuleId.SerializeToString, + policy__pb2.PolicyRuleService.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetPolicyDevice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/policy.PolicyService/GetPolicyDevice', + policy__pb2.PolicyRuleId.SerializeToString, + policy__pb2.PolicyRuleDevice.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetPolicyByServiceId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/policy.PolicyService/GetPolicyByServiceId', + context__pb2.ServiceId.SerializeToString, + policy__pb2.PolicyRuleServiceList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/qos_profile_pb2.py b/proto/qos_profile_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..4f151630e4cbe454b1ca73f6b21c483fbc527ac8 --- /dev/null +++ b/proto/qos_profile_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: qos_profile.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11qos_profile.proto\x12\x0bqos_profile\x1a\rcontext.proto2\xca\x02\n\x11QoSProfileService\x12>\n\x10\x43reateQoSProfile\x12\x13.context.QoSProfile\x1a\x13.context.QoSProfile\"\x00\x12>\n\x10UpdateQoSProfile\x12\x13.context.QoSProfile\x1a\x13.context.QoSProfile\"\x00\x12;\n\x10\x44\x65leteQoSProfile\x12\x15.context.QoSProfileId\x1a\x0e.context.Empty\"\x00\x12=\n\rGetQoSProfile\x12\x15.context.QoSProfileId\x1a\x13.context.QoSProfile\"\x00\x12\x39\n\x0eGetQoSProfiles\x12\x0e.context.Empty\x1a\x13.context.QoSProfile\"\x00\x30\x01\x62\x06proto3') + + + +_QOSPROFILESERVICE = DESCRIPTOR.services_by_name['QoSProfileService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _QOSPROFILESERVICE._serialized_start=50 + _QOSPROFILESERVICE._serialized_end=380 +# @@protoc_insertion_point(module_scope) diff --git a/proto/qos_profile_pb2_grpc.py b/proto/qos_profile_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..437d7789638245b607b7fe2f3fbd58ba041d341f --- /dev/null +++ b/proto/qos_profile_pb2_grpc.py @@ -0,0 +1,198 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 + + +class QoSProfileServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateQoSProfile = channel.unary_unary( + '/qos_profile.QoSProfileService/CreateQoSProfile', + request_serializer=context__pb2.QoSProfile.SerializeToString, + response_deserializer=context__pb2.QoSProfile.FromString, + ) + self.UpdateQoSProfile = channel.unary_unary( + '/qos_profile.QoSProfileService/UpdateQoSProfile', + request_serializer=context__pb2.QoSProfile.SerializeToString, + response_deserializer=context__pb2.QoSProfile.FromString, + ) + self.DeleteQoSProfile = channel.unary_unary( + '/qos_profile.QoSProfileService/DeleteQoSProfile', + request_serializer=context__pb2.QoSProfileId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.GetQoSProfile = channel.unary_unary( + '/qos_profile.QoSProfileService/GetQoSProfile', + request_serializer=context__pb2.QoSProfileId.SerializeToString, + response_deserializer=context__pb2.QoSProfile.FromString, + ) + self.GetQoSProfiles = channel.unary_stream( + '/qos_profile.QoSProfileService/GetQoSProfiles', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.QoSProfile.FromString, + ) + + +class QoSProfileServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreateQoSProfile(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateQoSProfile(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteQoSProfile(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetQoSProfile(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetQoSProfiles(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_QoSProfileServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateQoSProfile': grpc.unary_unary_rpc_method_handler( + servicer.CreateQoSProfile, + request_deserializer=context__pb2.QoSProfile.FromString, + response_serializer=context__pb2.QoSProfile.SerializeToString, + ), + 'UpdateQoSProfile': grpc.unary_unary_rpc_method_handler( + servicer.UpdateQoSProfile, + request_deserializer=context__pb2.QoSProfile.FromString, + response_serializer=context__pb2.QoSProfile.SerializeToString, + ), + 'DeleteQoSProfile': grpc.unary_unary_rpc_method_handler( + servicer.DeleteQoSProfile, + request_deserializer=context__pb2.QoSProfileId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'GetQoSProfile': grpc.unary_unary_rpc_method_handler( + servicer.GetQoSProfile, + request_deserializer=context__pb2.QoSProfileId.FromString, + response_serializer=context__pb2.QoSProfile.SerializeToString, + ), + 'GetQoSProfiles': grpc.unary_stream_rpc_method_handler( + servicer.GetQoSProfiles, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.QoSProfile.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'qos_profile.QoSProfileService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class QoSProfileService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreateQoSProfile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/qos_profile.QoSProfileService/CreateQoSProfile', + context__pb2.QoSProfile.SerializeToString, + context__pb2.QoSProfile.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateQoSProfile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/qos_profile.QoSProfileService/UpdateQoSProfile', + context__pb2.QoSProfile.SerializeToString, + context__pb2.QoSProfile.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteQoSProfile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/qos_profile.QoSProfileService/DeleteQoSProfile', + context__pb2.QoSProfileId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetQoSProfile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/qos_profile.QoSProfileService/GetQoSProfile', + context__pb2.QoSProfileId.SerializeToString, + context__pb2.QoSProfile.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetQoSProfiles(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/qos_profile.QoSProfileService/GetQoSProfiles', + context__pb2.Empty.SerializeToString, + context__pb2.QoSProfile.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/service_pb2.py b/proto/service_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..5400bb5f66f3e3f4fe1ba9019893b528347d385f --- /dev/null +++ b/proto/service_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: service.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rservice.proto\x12\x07service\x1a\rcontext.proto2\xf5\x01\n\x0eServiceService\x12\x37\n\rCreateService\x12\x10.context.Service\x1a\x12.context.ServiceId\"\x00\x12\x37\n\rUpdateService\x12\x10.context.Service\x1a\x12.context.ServiceId\"\x00\x12\x35\n\rDeleteService\x12\x12.context.ServiceId\x1a\x0e.context.Empty\"\x00\x12:\n\x14RecomputeConnections\x12\x10.context.Service\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_SERVICESERVICE = DESCRIPTOR.services_by_name['ServiceService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _SERVICESERVICE._serialized_start=42 + _SERVICESERVICE._serialized_end=287 +# @@protoc_insertion_point(module_scope) diff --git a/proto/service_pb2_grpc.py b/proto/service_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..1d94183ed2852e24b4d85790d46760dcacd249b0 --- /dev/null +++ b/proto/service_pb2_grpc.py @@ -0,0 +1,165 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 + + +class ServiceServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateService = channel.unary_unary( + '/service.ServiceService/CreateService', + request_serializer=context__pb2.Service.SerializeToString, + response_deserializer=context__pb2.ServiceId.FromString, + ) + self.UpdateService = channel.unary_unary( + '/service.ServiceService/UpdateService', + request_serializer=context__pb2.Service.SerializeToString, + response_deserializer=context__pb2.ServiceId.FromString, + ) + self.DeleteService = channel.unary_unary( + '/service.ServiceService/DeleteService', + request_serializer=context__pb2.ServiceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.RecomputeConnections = channel.unary_unary( + '/service.ServiceService/RecomputeConnections', + request_serializer=context__pb2.Service.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class ServiceServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreateService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteService(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RecomputeConnections(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ServiceServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateService': grpc.unary_unary_rpc_method_handler( + servicer.CreateService, + request_deserializer=context__pb2.Service.FromString, + response_serializer=context__pb2.ServiceId.SerializeToString, + ), + 'UpdateService': grpc.unary_unary_rpc_method_handler( + servicer.UpdateService, + request_deserializer=context__pb2.Service.FromString, + response_serializer=context__pb2.ServiceId.SerializeToString, + ), + 'DeleteService': grpc.unary_unary_rpc_method_handler( + servicer.DeleteService, + request_deserializer=context__pb2.ServiceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'RecomputeConnections': grpc.unary_unary_rpc_method_handler( + servicer.RecomputeConnections, + request_deserializer=context__pb2.Service.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'service.ServiceService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ServiceService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreateService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/service.ServiceService/CreateService', + context__pb2.Service.SerializeToString, + context__pb2.ServiceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/service.ServiceService/UpdateService', + context__pb2.Service.SerializeToString, + context__pb2.ServiceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteService(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/service.ServiceService/DeleteService', + context__pb2.ServiceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RecomputeConnections(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/service.ServiceService/RecomputeConnections', + context__pb2.Service.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/slice_pb2.py b/proto/slice_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..f81c432eeaeb6dd012414550925b9da8cbae44b7 --- /dev/null +++ b/proto/slice_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: slice.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0bslice.proto\x12\x05slice\x1a\rcontext.proto2\x96\x02\n\x0cSliceService\x12\x31\n\x0b\x43reateSlice\x12\x0e.context.Slice\x1a\x10.context.SliceId\"\x00\x12\x31\n\x0bUpdateSlice\x12\x0e.context.Slice\x1a\x10.context.SliceId\"\x00\x12\x31\n\x0b\x44\x65leteSlice\x12\x10.context.SliceId\x1a\x0e.context.Empty\"\x00\x12\x37\n\x11OrderSliceWithSLA\x12\x0e.context.Slice\x1a\x10.context.SliceId\"\x00\x12\x34\n\x10RunSliceGrouping\x12\x0e.context.Empty\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_SLICESERVICE = DESCRIPTOR.services_by_name['SliceService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _SLICESERVICE._serialized_start=38 + _SLICESERVICE._serialized_end=316 +# @@protoc_insertion_point(module_scope) diff --git a/proto/slice_pb2_grpc.py b/proto/slice_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..bf3dd4438f1786e421a2f476048e6eb5b79e3c7b --- /dev/null +++ b/proto/slice_pb2_grpc.py @@ -0,0 +1,198 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 + + +class SliceServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateSlice = channel.unary_unary( + '/slice.SliceService/CreateSlice', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.SliceId.FromString, + ) + self.UpdateSlice = channel.unary_unary( + '/slice.SliceService/UpdateSlice', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.SliceId.FromString, + ) + self.DeleteSlice = channel.unary_unary( + '/slice.SliceService/DeleteSlice', + request_serializer=context__pb2.SliceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.OrderSliceWithSLA = channel.unary_unary( + '/slice.SliceService/OrderSliceWithSLA', + request_serializer=context__pb2.Slice.SerializeToString, + response_deserializer=context__pb2.SliceId.FromString, + ) + self.RunSliceGrouping = channel.unary_unary( + '/slice.SliceService/RunSliceGrouping', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class SliceServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def CreateSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteSlice(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def OrderSliceWithSLA(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RunSliceGrouping(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_SliceServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateSlice': grpc.unary_unary_rpc_method_handler( + servicer.CreateSlice, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.SliceId.SerializeToString, + ), + 'UpdateSlice': grpc.unary_unary_rpc_method_handler( + servicer.UpdateSlice, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.SliceId.SerializeToString, + ), + 'DeleteSlice': grpc.unary_unary_rpc_method_handler( + servicer.DeleteSlice, + request_deserializer=context__pb2.SliceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'OrderSliceWithSLA': grpc.unary_unary_rpc_method_handler( + servicer.OrderSliceWithSLA, + request_deserializer=context__pb2.Slice.FromString, + response_serializer=context__pb2.SliceId.SerializeToString, + ), + 'RunSliceGrouping': grpc.unary_unary_rpc_method_handler( + servicer.RunSliceGrouping, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'slice.SliceService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class SliceService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def CreateSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/slice.SliceService/CreateSlice', + context__pb2.Slice.SerializeToString, + context__pb2.SliceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/slice.SliceService/UpdateSlice', + context__pb2.Slice.SerializeToString, + context__pb2.SliceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteSlice(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/slice.SliceService/DeleteSlice', + context__pb2.SliceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def OrderSliceWithSLA(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/slice.SliceService/OrderSliceWithSLA', + context__pb2.Slice.SerializeToString, + context__pb2.SliceId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RunSliceGrouping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/slice.SliceService/RunSliceGrouping', + context__pb2.Empty.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/te_pb2.py b/proto/te_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..21fbabc90f5940c2a554506f218e985049844637 --- /dev/null +++ b/proto/te_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: te.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x08te.proto\x12\x02te\x1a\rcontext.proto2\xb3\x01\n\tTEService\x12\x38\n\nRequestLSP\x12\x10.context.Service\x1a\x16.context.ServiceStatus\"\x00\x12\x39\n\tUpdateLSP\x12\x12.context.ServiceId\x1a\x16.context.ServiceStatus\"\x00\x12\x31\n\tDeleteLSP\x12\x12.context.ServiceId\x1a\x0e.context.Empty\"\x00\x62\x06proto3') + + + +_TESERVICE = DESCRIPTOR.services_by_name['TEService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _TESERVICE._serialized_start=32 + _TESERVICE._serialized_end=211 +# @@protoc_insertion_point(module_scope) diff --git a/proto/te_pb2_grpc.py b/proto/te_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..daedf78fa15926cee1bc0e0751f88848f85773a7 --- /dev/null +++ b/proto/te_pb2_grpc.py @@ -0,0 +1,132 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 + + +class TEServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.RequestLSP = channel.unary_unary( + '/te.TEService/RequestLSP', + request_serializer=context__pb2.Service.SerializeToString, + response_deserializer=context__pb2.ServiceStatus.FromString, + ) + self.UpdateLSP = channel.unary_unary( + '/te.TEService/UpdateLSP', + request_serializer=context__pb2.ServiceId.SerializeToString, + response_deserializer=context__pb2.ServiceStatus.FromString, + ) + self.DeleteLSP = channel.unary_unary( + '/te.TEService/DeleteLSP', + request_serializer=context__pb2.ServiceId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class TEServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def RequestLSP(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateLSP(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteLSP(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_TEServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'RequestLSP': grpc.unary_unary_rpc_method_handler( + servicer.RequestLSP, + request_deserializer=context__pb2.Service.FromString, + response_serializer=context__pb2.ServiceStatus.SerializeToString, + ), + 'UpdateLSP': grpc.unary_unary_rpc_method_handler( + servicer.UpdateLSP, + request_deserializer=context__pb2.ServiceId.FromString, + response_serializer=context__pb2.ServiceStatus.SerializeToString, + ), + 'DeleteLSP': grpc.unary_unary_rpc_method_handler( + servicer.DeleteLSP, + request_deserializer=context__pb2.ServiceId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'te.TEService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class TEService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def RequestLSP(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/te.TEService/RequestLSP', + context__pb2.Service.SerializeToString, + context__pb2.ServiceStatus.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateLSP(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/te.TEService/UpdateLSP', + context__pb2.ServiceId.SerializeToString, + context__pb2.ServiceStatus.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteLSP(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/te.TEService/DeleteLSP', + context__pb2.ServiceId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/telemetry_frontend_pb2.py b/proto/telemetry_frontend_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..1989e621184d609e72a4c8a6aeb0a7c343140e8f --- /dev/null +++ b/proto/telemetry_frontend_pb2.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: telemetry_frontend.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 +import kpi_manager_pb2 as kpi__manager__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18telemetry_frontend.proto\x12\x12telemetry_frontend\x1a\rcontext.proto\x1a\x11kpi_manager.proto\"2\n\x0b\x43ollectorId\x12#\n\x0c\x63ollector_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"\x8e\x01\n\tCollector\x12\x35\n\x0c\x63ollector_id\x18\x01 \x01(\x0b\x32\x1f.telemetry_frontend.CollectorId\x12\"\n\x06kpi_id\x18\x02 \x01(\x0b\x32\x12.kpi_manager.KpiId\x12\x12\n\nduration_s\x18\x03 \x01(\x02\x12\x12\n\ninterval_s\x18\x04 \x01(\x02\"l\n\x0f\x43ollectorFilter\x12\x35\n\x0c\x63ollector_id\x18\x01 \x03(\x0b\x32\x1f.telemetry_frontend.CollectorId\x12\"\n\x06kpi_id\x18\x02 \x03(\x0b\x32\x12.kpi_manager.KpiId\"F\n\rCollectorList\x12\x35\n\x0e\x63ollector_list\x18\x01 \x03(\x0b\x32\x1d.telemetry_frontend.Collector2\x90\x02\n\x18TelemetryFrontendService\x12R\n\x0eStartCollector\x12\x1d.telemetry_frontend.Collector\x1a\x1f.telemetry_frontend.CollectorId\"\x00\x12\x42\n\rStopCollector\x12\x1f.telemetry_frontend.CollectorId\x1a\x0e.context.Empty\"\x00\x12\\\n\x10SelectCollectors\x12#.telemetry_frontend.CollectorFilter\x1a!.telemetry_frontend.CollectorList\"\x00\x62\x06proto3') + + + +_COLLECTORID = DESCRIPTOR.message_types_by_name['CollectorId'] +_COLLECTOR = DESCRIPTOR.message_types_by_name['Collector'] +_COLLECTORFILTER = DESCRIPTOR.message_types_by_name['CollectorFilter'] +_COLLECTORLIST = DESCRIPTOR.message_types_by_name['CollectorList'] +CollectorId = _reflection.GeneratedProtocolMessageType('CollectorId', (_message.Message,), { + 'DESCRIPTOR' : _COLLECTORID, + '__module__' : 'telemetry_frontend_pb2' + # @@protoc_insertion_point(class_scope:telemetry_frontend.CollectorId) + }) +_sym_db.RegisterMessage(CollectorId) + +Collector = _reflection.GeneratedProtocolMessageType('Collector', (_message.Message,), { + 'DESCRIPTOR' : _COLLECTOR, + '__module__' : 'telemetry_frontend_pb2' + # @@protoc_insertion_point(class_scope:telemetry_frontend.Collector) + }) +_sym_db.RegisterMessage(Collector) + +CollectorFilter = _reflection.GeneratedProtocolMessageType('CollectorFilter', (_message.Message,), { + 'DESCRIPTOR' : _COLLECTORFILTER, + '__module__' : 'telemetry_frontend_pb2' + # @@protoc_insertion_point(class_scope:telemetry_frontend.CollectorFilter) + }) +_sym_db.RegisterMessage(CollectorFilter) + +CollectorList = _reflection.GeneratedProtocolMessageType('CollectorList', (_message.Message,), { + 'DESCRIPTOR' : _COLLECTORLIST, + '__module__' : 'telemetry_frontend_pb2' + # @@protoc_insertion_point(class_scope:telemetry_frontend.CollectorList) + }) +_sym_db.RegisterMessage(CollectorList) + +_TELEMETRYFRONTENDSERVICE = DESCRIPTOR.services_by_name['TelemetryFrontendService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _COLLECTORID._serialized_start=82 + _COLLECTORID._serialized_end=132 + _COLLECTOR._serialized_start=135 + _COLLECTOR._serialized_end=277 + _COLLECTORFILTER._serialized_start=279 + _COLLECTORFILTER._serialized_end=387 + _COLLECTORLIST._serialized_start=389 + _COLLECTORLIST._serialized_end=459 + _TELEMETRYFRONTENDSERVICE._serialized_start=462 + _TELEMETRYFRONTENDSERVICE._serialized_end=734 +# @@protoc_insertion_point(module_scope) diff --git a/proto/telemetry_frontend_pb2_grpc.py b/proto/telemetry_frontend_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..1b76c426a161dfd27d3c90c996236bcec8c871bc --- /dev/null +++ b/proto/telemetry_frontend_pb2_grpc.py @@ -0,0 +1,133 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import telemetry_frontend_pb2 as telemetry__frontend__pb2 + + +class TelemetryFrontendServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.StartCollector = channel.unary_unary( + '/telemetry_frontend.TelemetryFrontendService/StartCollector', + request_serializer=telemetry__frontend__pb2.Collector.SerializeToString, + response_deserializer=telemetry__frontend__pb2.CollectorId.FromString, + ) + self.StopCollector = channel.unary_unary( + '/telemetry_frontend.TelemetryFrontendService/StopCollector', + request_serializer=telemetry__frontend__pb2.CollectorId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + self.SelectCollectors = channel.unary_unary( + '/telemetry_frontend.TelemetryFrontendService/SelectCollectors', + request_serializer=telemetry__frontend__pb2.CollectorFilter.SerializeToString, + response_deserializer=telemetry__frontend__pb2.CollectorList.FromString, + ) + + +class TelemetryFrontendServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def StartCollector(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def StopCollector(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SelectCollectors(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_TelemetryFrontendServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'StartCollector': grpc.unary_unary_rpc_method_handler( + servicer.StartCollector, + request_deserializer=telemetry__frontend__pb2.Collector.FromString, + response_serializer=telemetry__frontend__pb2.CollectorId.SerializeToString, + ), + 'StopCollector': grpc.unary_unary_rpc_method_handler( + servicer.StopCollector, + request_deserializer=telemetry__frontend__pb2.CollectorId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + 'SelectCollectors': grpc.unary_unary_rpc_method_handler( + servicer.SelectCollectors, + request_deserializer=telemetry__frontend__pb2.CollectorFilter.FromString, + response_serializer=telemetry__frontend__pb2.CollectorList.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'telemetry_frontend.TelemetryFrontendService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class TelemetryFrontendService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def StartCollector(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/telemetry_frontend.TelemetryFrontendService/StartCollector', + telemetry__frontend__pb2.Collector.SerializeToString, + telemetry__frontend__pb2.CollectorId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def StopCollector(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/telemetry_frontend.TelemetryFrontendService/StopCollector', + telemetry__frontend__pb2.CollectorId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SelectCollectors(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/telemetry_frontend.TelemetryFrontendService/SelectCollectors', + telemetry__frontend__pb2.CollectorFilter.SerializeToString, + telemetry__frontend__pb2.CollectorList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/proto/ztp_pb2.py b/proto/ztp_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..1a95c2da7126abcbb890b2bd734c79767d2a0170 --- /dev/null +++ b/proto/ztp_pb2.py @@ -0,0 +1,105 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: ztp.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 symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import context_pb2 as context__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tztp.proto\x12\x03ztp\x1a\rcontext.proto\"R\n\x0c\x44\x65viceRoleId\x12 \n\tdevRoleId\x18\x01 \x01(\x0b\x32\r.context.Uuid\x12 \n\x05\x64\x65vId\x18\x02 \x01(\x0b\x32\x11.context.DeviceId\"\\\n\nDeviceRole\x12$\n\tdevRoleId\x18\x01 \x01(\x0b\x32\x11.ztp.DeviceRoleId\x12(\n\x0b\x64\x65vRoleType\x18\x02 \x01(\x0e\x32\x13.ztp.DeviceRoleType\"^\n\x10\x44\x65viceRoleConfig\x12 \n\x07\x64\x65vRole\x18\x01 \x01(\x0b\x32\x0f.ztp.DeviceRole\x12(\n\tdevConfig\x18\x02 \x01(\x0b\x32\x15.context.DeviceConfig\"2\n\x0e\x44\x65viceRoleList\x12 \n\x07\x64\x65vRole\x18\x01 \x03(\x0b\x32\x0f.ztp.DeviceRole\"b\n\x0f\x44\x65viceRoleState\x12$\n\tdevRoleId\x18\x01 \x01(\x0b\x32\x11.ztp.DeviceRoleId\x12)\n\x0c\x64\x65vRoleState\x18\x02 \x01(\x0e\x32\x13.ztp.ZtpDeviceState\"\'\n\x14\x44\x65viceDeletionResult\x12\x0f\n\x07\x64\x65leted\x18\x01 \x03(\t*H\n\x0e\x44\x65viceRoleType\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07\x44\x45V_OPS\x10\x01\x12\x0c\n\x08\x44\x45V_CONF\x10\x02\x12\x11\n\rPIPELINE_CONF\x10\x03*~\n\x0eZtpDeviceState\x12\x1b\n\x17ZTP_DEV_STATE_UNDEFINED\x10\x00\x12\x19\n\x15ZTP_DEV_STATE_CREATED\x10\x01\x12\x19\n\x15ZTP_DEV_STATE_UPDATED\x10\x02\x12\x19\n\x15ZTP_DEV_STATE_DELETED\x10\x03\x32\xf1\x02\n\nZtpService\x12\x38\n\x10ZtpGetDeviceRole\x12\x11.ztp.DeviceRoleId\x1a\x0f.ztp.DeviceRole\"\x00\x12G\n\x1bZtpGetDeviceRolesByDeviceId\x12\x11.context.DeviceId\x1a\x13.ztp.DeviceRoleList\"\x00\x12\x31\n\x06ZtpAdd\x12\x0f.ztp.DeviceRole\x1a\x14.ztp.DeviceRoleState\"\x00\x12:\n\tZtpUpdate\x12\x15.ztp.DeviceRoleConfig\x1a\x14.ztp.DeviceRoleState\"\x00\x12\x34\n\tZtpDelete\x12\x0f.ztp.DeviceRole\x1a\x14.ztp.DeviceRoleState\"\x00\x12;\n\x0cZtpDeleteAll\x12\x0e.context.Empty\x1a\x19.ztp.DeviceDeletionResult\"\x00\x62\x06proto3') + +_DEVICEROLETYPE = DESCRIPTOR.enum_types_by_name['DeviceRoleType'] +DeviceRoleType = enum_type_wrapper.EnumTypeWrapper(_DEVICEROLETYPE) +_ZTPDEVICESTATE = DESCRIPTOR.enum_types_by_name['ZtpDeviceState'] +ZtpDeviceState = enum_type_wrapper.EnumTypeWrapper(_ZTPDEVICESTATE) +NONE = 0 +DEV_OPS = 1 +DEV_CONF = 2 +PIPELINE_CONF = 3 +ZTP_DEV_STATE_UNDEFINED = 0 +ZTP_DEV_STATE_CREATED = 1 +ZTP_DEV_STATE_UPDATED = 2 +ZTP_DEV_STATE_DELETED = 3 + + +_DEVICEROLEID = DESCRIPTOR.message_types_by_name['DeviceRoleId'] +_DEVICEROLE = DESCRIPTOR.message_types_by_name['DeviceRole'] +_DEVICEROLECONFIG = DESCRIPTOR.message_types_by_name['DeviceRoleConfig'] +_DEVICEROLELIST = DESCRIPTOR.message_types_by_name['DeviceRoleList'] +_DEVICEROLESTATE = DESCRIPTOR.message_types_by_name['DeviceRoleState'] +_DEVICEDELETIONRESULT = DESCRIPTOR.message_types_by_name['DeviceDeletionResult'] +DeviceRoleId = _reflection.GeneratedProtocolMessageType('DeviceRoleId', (_message.Message,), { + 'DESCRIPTOR' : _DEVICEROLEID, + '__module__' : 'ztp_pb2' + # @@protoc_insertion_point(class_scope:ztp.DeviceRoleId) + }) +_sym_db.RegisterMessage(DeviceRoleId) + +DeviceRole = _reflection.GeneratedProtocolMessageType('DeviceRole', (_message.Message,), { + 'DESCRIPTOR' : _DEVICEROLE, + '__module__' : 'ztp_pb2' + # @@protoc_insertion_point(class_scope:ztp.DeviceRole) + }) +_sym_db.RegisterMessage(DeviceRole) + +DeviceRoleConfig = _reflection.GeneratedProtocolMessageType('DeviceRoleConfig', (_message.Message,), { + 'DESCRIPTOR' : _DEVICEROLECONFIG, + '__module__' : 'ztp_pb2' + # @@protoc_insertion_point(class_scope:ztp.DeviceRoleConfig) + }) +_sym_db.RegisterMessage(DeviceRoleConfig) + +DeviceRoleList = _reflection.GeneratedProtocolMessageType('DeviceRoleList', (_message.Message,), { + 'DESCRIPTOR' : _DEVICEROLELIST, + '__module__' : 'ztp_pb2' + # @@protoc_insertion_point(class_scope:ztp.DeviceRoleList) + }) +_sym_db.RegisterMessage(DeviceRoleList) + +DeviceRoleState = _reflection.GeneratedProtocolMessageType('DeviceRoleState', (_message.Message,), { + 'DESCRIPTOR' : _DEVICEROLESTATE, + '__module__' : 'ztp_pb2' + # @@protoc_insertion_point(class_scope:ztp.DeviceRoleState) + }) +_sym_db.RegisterMessage(DeviceRoleState) + +DeviceDeletionResult = _reflection.GeneratedProtocolMessageType('DeviceDeletionResult', (_message.Message,), { + 'DESCRIPTOR' : _DEVICEDELETIONRESULT, + '__module__' : 'ztp_pb2' + # @@protoc_insertion_point(class_scope:ztp.DeviceDeletionResult) + }) +_sym_db.RegisterMessage(DeviceDeletionResult) + +_ZTPSERVICE = DESCRIPTOR.services_by_name['ZtpService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _DEVICEROLETYPE._serialized_start=500 + _DEVICEROLETYPE._serialized_end=572 + _ZTPDEVICESTATE._serialized_start=574 + _ZTPDEVICESTATE._serialized_end=700 + _DEVICEROLEID._serialized_start=33 + _DEVICEROLEID._serialized_end=115 + _DEVICEROLE._serialized_start=117 + _DEVICEROLE._serialized_end=209 + _DEVICEROLECONFIG._serialized_start=211 + _DEVICEROLECONFIG._serialized_end=305 + _DEVICEROLELIST._serialized_start=307 + _DEVICEROLELIST._serialized_end=357 + _DEVICEROLESTATE._serialized_start=359 + _DEVICEROLESTATE._serialized_end=457 + _DEVICEDELETIONRESULT._serialized_start=459 + _DEVICEDELETIONRESULT._serialized_end=498 + _ZTPSERVICE._serialized_start=703 + _ZTPSERVICE._serialized_end=1072 +# @@protoc_insertion_point(module_scope) diff --git a/proto/ztp_pb2_grpc.py b/proto/ztp_pb2_grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..079ffb1f0e2339c2a6620e18323a8ec082e1a3ed --- /dev/null +++ b/proto/ztp_pb2_grpc.py @@ -0,0 +1,232 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import context_pb2 as context__pb2 +import ztp_pb2 as ztp__pb2 + + +class ZtpServiceStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ZtpGetDeviceRole = channel.unary_unary( + '/ztp.ZtpService/ZtpGetDeviceRole', + request_serializer=ztp__pb2.DeviceRoleId.SerializeToString, + response_deserializer=ztp__pb2.DeviceRole.FromString, + ) + self.ZtpGetDeviceRolesByDeviceId = channel.unary_unary( + '/ztp.ZtpService/ZtpGetDeviceRolesByDeviceId', + request_serializer=context__pb2.DeviceId.SerializeToString, + response_deserializer=ztp__pb2.DeviceRoleList.FromString, + ) + self.ZtpAdd = channel.unary_unary( + '/ztp.ZtpService/ZtpAdd', + request_serializer=ztp__pb2.DeviceRole.SerializeToString, + response_deserializer=ztp__pb2.DeviceRoleState.FromString, + ) + self.ZtpUpdate = channel.unary_unary( + '/ztp.ZtpService/ZtpUpdate', + request_serializer=ztp__pb2.DeviceRoleConfig.SerializeToString, + response_deserializer=ztp__pb2.DeviceRoleState.FromString, + ) + self.ZtpDelete = channel.unary_unary( + '/ztp.ZtpService/ZtpDelete', + request_serializer=ztp__pb2.DeviceRole.SerializeToString, + response_deserializer=ztp__pb2.DeviceRoleState.FromString, + ) + self.ZtpDeleteAll = channel.unary_unary( + '/ztp.ZtpService/ZtpDeleteAll', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=ztp__pb2.DeviceDeletionResult.FromString, + ) + + +class ZtpServiceServicer(object): + """Missing associated documentation comment in .proto file.""" + + def ZtpGetDeviceRole(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZtpGetDeviceRolesByDeviceId(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZtpAdd(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZtpUpdate(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZtpDelete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZtpDeleteAll(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ZtpServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ZtpGetDeviceRole': grpc.unary_unary_rpc_method_handler( + servicer.ZtpGetDeviceRole, + request_deserializer=ztp__pb2.DeviceRoleId.FromString, + response_serializer=ztp__pb2.DeviceRole.SerializeToString, + ), + 'ZtpGetDeviceRolesByDeviceId': grpc.unary_unary_rpc_method_handler( + servicer.ZtpGetDeviceRolesByDeviceId, + request_deserializer=context__pb2.DeviceId.FromString, + response_serializer=ztp__pb2.DeviceRoleList.SerializeToString, + ), + 'ZtpAdd': grpc.unary_unary_rpc_method_handler( + servicer.ZtpAdd, + request_deserializer=ztp__pb2.DeviceRole.FromString, + response_serializer=ztp__pb2.DeviceRoleState.SerializeToString, + ), + 'ZtpUpdate': grpc.unary_unary_rpc_method_handler( + servicer.ZtpUpdate, + request_deserializer=ztp__pb2.DeviceRoleConfig.FromString, + response_serializer=ztp__pb2.DeviceRoleState.SerializeToString, + ), + 'ZtpDelete': grpc.unary_unary_rpc_method_handler( + servicer.ZtpDelete, + request_deserializer=ztp__pb2.DeviceRole.FromString, + response_serializer=ztp__pb2.DeviceRoleState.SerializeToString, + ), + 'ZtpDeleteAll': grpc.unary_unary_rpc_method_handler( + servicer.ZtpDeleteAll, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=ztp__pb2.DeviceDeletionResult.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ztp.ZtpService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ZtpService(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def ZtpGetDeviceRole(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ztp.ZtpService/ZtpGetDeviceRole', + ztp__pb2.DeviceRoleId.SerializeToString, + ztp__pb2.DeviceRole.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ZtpGetDeviceRolesByDeviceId(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ztp.ZtpService/ZtpGetDeviceRolesByDeviceId', + context__pb2.DeviceId.SerializeToString, + ztp__pb2.DeviceRoleList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ZtpAdd(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ztp.ZtpService/ZtpAdd', + ztp__pb2.DeviceRole.SerializeToString, + ztp__pb2.DeviceRoleState.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ZtpUpdate(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ztp.ZtpService/ZtpUpdate', + ztp__pb2.DeviceRoleConfig.SerializeToString, + ztp__pb2.DeviceRoleState.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ZtpDelete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ztp.ZtpService/ZtpDelete', + ztp__pb2.DeviceRole.SerializeToString, + ztp__pb2.DeviceRoleState.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ZtpDeleteAll(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ztp.ZtpService/ZtpDeleteAll', + context__pb2.Empty.SerializeToString, + ztp__pb2.DeviceDeletionResult.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/scripts/run_tests_locally-nbi-camara-qod.sh b/scripts/run_tests_locally-nbi-camara-qod.sh index 6f387f58e3088dca067a99f3f497a852f014152d..e8dc47a9538d182fa3949e1c55b83a2b7665c008 100755 --- a/scripts/run_tests_locally-nbi-camara-qod.sh +++ b/scripts/run_tests_locally-nbi-camara-qod.sh @@ -22,4 +22,6 @@ RCFILE=$PROJECTDIR/coverage/.coveragerc # Run unitary tests and analyze coverage of code at same time # helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ - nbi/tests/test_camara_qod.py + nbi/tests/test_camara_qod_profile.py +coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ + nbi/tests/test_camara_qos_service.py \ No newline at end of file diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile index e3baa5b565dc4d0a123217af85d88c208671a185..f09a04fa5902ce942f7e459f4e63b98f5825b10c 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -93,16 +93,14 @@ COPY src/slice/client/. slice/client/ RUN mkdir -p /var/teraflow/tests/tools COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ -# Add component sub-folder for qos_profile -RUN mkdir -p /var/teraflow/qos_profile -WORKDIR /var/teraflow/qos_profile -COPY src/qos_profile/requirements.in requirements.in -RUN pip-compile --quiet --output-file=requirements.txt requirements.in -RUN python3 -m pip install -r requirements.txt - # Add qos_profile files into working directory -WORKDIR /var/teraflow -COPY src/qos_profile/. qos_profile/ +COPY src/qos_profile/. /var/teraflow/qos_profile/ +COPY src/qos_profile/__init__.py qos_profile/__init__.py +COPY src/qos_profile/client/. qos_profile/client/ +COPY src/qos_profile/tests/. qos_profile/client/tests +COPY src/context/service/database/QoSProfile.py context/service/database/QoSProfile.py +COPY src/context/service/database/ /var/teraflow/context/service/database/ + # Start the service diff --git a/src/nbi/service/rest_server/nbi_plugins/camara_qod/Resources.py b/src/nbi/service/rest_server/nbi_plugins/camara_qod/Resources.py index 15a0205fede303211395bd1d65348b0c9b50a8f7..398dca9dc5be1923a2f9076f6026bcadabf37937 100644 --- a/src/nbi/service/rest_server/nbi_plugins/camara_qod/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/camara_qod/Resources.py @@ -12,272 +12,221 @@ # See the License for the specific language governing permissions and # limitations under the License. + +from venv import logger from flask.json import jsonify from flask_restful import Resource, request from enum import Enum -import uuid -from src.qos_profile.client import QoSProfileClient -from common.proto.context_pb2 import Empty, Uuid, QoSProfileValueUnitPair, QoSProfileId, QoSProfile -import json -import uuid -from flask.json import jsonify -from src.qos_profile.client import QoSProfileClient -from src.context.service.database.QoSProfile import grpc_message_to_qos_table_data -from src.qos_profile.tests.test_crud import create_qos_profile_from_json +import grpc._channel +from context.service.database.QoSProfile import grpc_message_to_qos_table_data +from qos_profile.tests.test_crud import create_qos_profile_from_json,test_update_qos_profile +from qos_profile.client.QoSProfileClient import QoSProfileClient +from werkzeug.exceptions import UnsupportedMediaType +from common.proto.context_pb2 import QoSProfile, QoSProfileId, Uuid, QoSProfileValueUnitPair,Empty +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from typing import Dict +from uuid import uuid4 +import grpc, logging - -class SessionStatus(Enum): - ACTIVE = 'ACTIVE' - INACTIVE = 'INACTIVE' -# -#class Rate: -# def __init__(self, value, unit): -# self.value = value -# self.unit = unit -# -#class Duration: -# def __init__(self, value, unit): -# self.value = value -# self.unit = unit -# -#class ProfileCreate: -# def __init__(self, name, description, status, targetMinUpstreamRate=None, maxUpstreamRate=None, maxUpstreamBurstRate=None, -# targetMinDownstreamRate=None, maxDownstreamRate=None, maxDownstreamBurstRate=None, minDuration=None, maxDuration=None, -# priority=None, packetDelayBudget=None, jitter=None, packetErrorLossRate=None): -# self.name = name -# self.description = description -# self.status = status -# self.targetMinUpstreamRate = targetMinUpstreamRate -# self.maxUpstreamRate = maxUpstreamRate -# self.maxUpstreamBurstRate = maxUpstreamBurstRate -# self.targetMinDownstreamRate = targetMinDownstreamRate -# self.maxDownstreamRate = maxDownstreamRate -# self.maxDownstreamBurstRate = maxDownstreamBurstRate -# self.minDuration = minDuration -# self.maxDuration = maxDuration -# self.priority = priority -# self.packetDelayBudget = packetDelayBudget -# self.jitter = jitter -# self.packetErrorLossRate = packetErrorLossRate -# -#class Profile(ProfileCreate): -# def __init__(self, profile_id, **kwargs): -# super().__init__(**kwargs) -# self.profile_id = profile_id -# -#profiles = [] +LOGGER = logging.getLogger(__name__) + +#Initiate the QoSProfileClient class _Resource(Resource): def __init__(self) -> None: super().__init__() - self.client = QoSProfileClient() + self.qos_profile_client = QoSProfileClient() + self.client = ContextClient() + self.service_client = ServiceClient() -class ProfileList(Resource): +#ProfileList Endpoint for posting +class ProfileList(_Resource): def post(self): - data = request.get_json() - qos_profile = create_qos_profile_from_json(data) + if not request.is_json: + return {"message": "JSON payload is required to proceed"}, 415 + request_data: Dict = request.get_json() #get the json from the test function + request_data['qos_profile_id']=str(uuid4()) # Create qos ID randomly using uuid4 + # JSON TO GRPC to store the data in the grpc server + try: + qos_profile = create_qos_profile_from_json(request_data) + except Exception as e: + LOGGER.info(e) # track if there is an error + raise e + # Send to gRPC server using CreateQosProfile done by Shayan try: - self.client.CreateQoSProfile(qos_profile) - return jsonify({"status": "QoS Profile created successfully"}), 201 + qos_profile_created = self.qos_profile_client.CreateQoSProfile(qos_profile) except Exception as e: - # Step 4: Handle any exceptions that occur - return jsonify({"error": str(e)}), 500 + LOGGER.info(e) + raise e + #gRPC message back to JSON using the helper function created by shayan + qos_profile_data = grpc_message_to_qos_table_data(qos_profile_created) + LOGGER.info(f'qos_profile_data{qos_profile_data}') + return jsonify(qos_profile_data) + + def get(self): + qos_profiles = self.qos_profile_client.GetQoSProfiles(Empty()) #get all of type empty and defined in .proto file () + qos_profile_list = [] #since it iterates over QoSProfile , create a list to store all QOS profiles + for qos_profile in qos_profiles: + qos_profile_data = grpc_message_to_qos_table_data(qos_profile) #transform to json + qos_profile_list.append(qos_profile_data) # append to the list + + return jsonify(qos_profile_list) + +#getting,updating,deleting using the qos profile id class ProfileDetail(_Resource): - def get(self,qos_profile_id): - qos_get_profile=self.client.GetQoSProfile(qos_profile_id) - qos_table_data = grpc_message_to_qos_table_data(qos_get_profile) - return qos_table_data + def get(self, qos_profile_id): + id = QoSProfileId(qos_profile_id=Uuid(uuid=qos_profile_id)) #this is because we want to GetQOSProfile which takes QOSProfileID + #The QoSProfileID is message qod_profile_id of type Uuid + # Uuid is a message uuid of type qos_profile_id which is a string + try: + qos_profile = self.qos_profile_client.GetQoSProfile(id) #get the qosprofile from grpc server according to ID + qos_profile_data = grpc_message_to_qos_table_data(qos_profile) # grpc to json agian to view it on http + return jsonify(qos_profile_data) + except grpc._channel._InactiveRpcError as exc: + if exc.code() == grpc.StatusCode.NOT_FOUND: + LOGGER.warning(f"QoSProfile not found: {qos_profile_id}") + return {"error": f"QoSProfile {qos_profile_id} not found"}, 404 + LOGGER.error(f"gRPC error while fetching QoSProfile: {exc}") + return {"error": "Internal Server Error"}, 500 + except Exception as e: + LOGGER.error(f"Error while fetching QoSProfile: {e}") + return {"error": "Internal Server Error"}, 500 + + def put(self, qos_profile_id): + try: + request_data = request.get_json() # get the json to do the update + if 'qos_profile_id' not in request_data: #ensuring the update on qos profile id + request_data['qos_profile_id'] = qos_profile_id # ID to be updated + qos_profile = create_qos_profile_from_json(request_data) # Transform it again to grpc + qos_profile_updated = self.qos_profile_client.UpdateQoSProfile(qos_profile) # update the profile in the grpc server + return grpc_message_to_qos_table_data(qos_profile_updated), 200 + except KeyError as e: + LOGGER.error(f"Missing required key: {e}") + return {"error": f"Missing required key: {str(e)}"}, 400 + except grpc._channel._InactiveRpcError as exc: + if exc.code() == grpc.StatusCode.NOT_FOUND: + LOGGER.warning(f"QoSProfile not found for update: {qos_profile_id}") + return {"error": f"QoSProfile {qos_profile_id} not found"}, 404 + LOGGER.error(f"gRPC error while updating QoSProfile: {exc}") + return {"error": "Internal Server Error"}, 500 + except Exception as e: + LOGGER.error(f"Error in PUT /profiles/{qos_profile_id}: {e}") + return {"error": "Internal Server Error"}, 500 + + def delete(self, qos_profile_id): + id = QoSProfileId(qos_profile_id=Uuid(uuid=qos_profile_id)) # get id to delete accordingly + try: + qos_profile = self.qos_profile_client.DeleteQoSProfile(id) + qos_profile_data = grpc_message_to_qos_table_data(qos_profile) + return jsonify(qos_profile_data) + except grpc._channel._InactiveRpcError as exc: + if exc.code() == grpc.StatusCode.NOT_FOUND: + LOGGER.warning(f"QoSProfile not found for deletion: {qos_profile_id}") + return {"error": f"QoSProfile {qos_profile_id} not found"}, 404 + LOGGER.error(f"gRPC error while deleting QoSProfile: {exc}") + return {"error": "Internal Server Error"}, 500 + except Exception as e: + LOGGER.error(f"Error in DELETE /profiles/{qos_profile_id}: {e}") + return {"error": "Internal Server Error"}, 500 + -# def put(self, profile_id): -# data = request.get_json() -# profile = next((p for p in profiles if p["profile_id"] == profile_id), None) -# if profile: -# for key, value in data.items(): -# if key in profile: -# profile[key] = value -# return jsonify(profile) -# return {"message": "Profile not found"}, 404 -# -#class Profile_delete_by_name(Resource): -# def delete(self, name): -# global profiles -# profile = next((p for p in profiles if p["name"] == name), None) -# if profile: -# profiles = [p for p in profiles if p["name"] != name] -# return {"message": "Profile deleted successfully"}, 200 -# return {"message": "Profile not found"}, 404 +import copy, deepmerge, json, logging +from typing import Dict +from flask_restful import Resource, request +from werkzeug.exceptions import UnsupportedMediaType +from common.Constants import DEFAULT_CONTEXT_NAME +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from .Tools import ( + format_grpc_to_json, grpc_context_id, grpc_service_id, QOD_2_service, service_2_qod +) -#class AllProfiles(Resource): -# def get(self): -# qos_profiles_got = list(qos_profile_client.GetQoSProfiles(Empty())) +LOGGER = logging.getLogger(__name__) +class _Resource(Resource): + def __init__(self) -> None: + super().__init__() + self.client = ContextClient() + self.service_client = ServiceClient() +class qodinfo(_Resource): + def post(self): + if not request.is_json: + return (jsonify({'error': 'Unsupported Media Type', 'message': 'JSON payload is required'}), 415) + + request_data: Dict = request.get_json() + qos_profile_id = request_data.get('qos_profile_id') + LOGGER.info(f'qos_profile_id:{qos_profile_id}') + if not qos_profile_id: + return jsonify({'error': 'qos_profile_id is required'}), 400 + service = QOD_2_service(self.client, request_data,qos_profile_id) + stripped_service = copy.deepcopy(service) + stripped_service.ClearField('service_endpoint_ids') + stripped_service.ClearField('service_constraints') + stripped_service.ClearField('service_config') + try: + response = format_grpc_to_json(self.service_client.CreateService(stripped_service)) + response = format_grpc_to_json(self.service_client.UpdateService(service)) + except Exception as e: # pylint: disable=broad-except + + return e + LOGGER.info(f"error related to response: {response}") + return response -#class Delete_all_profile(Resource): -# def delete(self): -# global profiles -# profile_count = len(profiles) -# profiles = [] -# return {"message": f"Deleted {profile_count} sessions."}, 200 + def get(self): + service_list = self.client.ListServices(grpc_context_id(DEFAULT_CONTEXT_NAME)) + qod_info = [service_2_qod(service) for service in service_list.services] + LOGGER.info(f"error related to qod_info: {qod_info}") + return qod_info + + + + + +class qodinfoId(_Resource): + + def get(self, sessionId: str): + try: + service = self.client.GetService(grpc_service_id(DEFAULT_CONTEXT_NAME, sessionId)) + return service_2_qod(service) + except grpc._channel._InactiveRpcError as exc: + if exc.code()==grpc.StatusCode.NOT_FOUND: + LOGGER.warning(f"Qod Session not found: {sessionId}") + return {"error": f"Qod Session {sessionId} not found"}, 404 + + def put(self, sessionId: str): + try: + request_data: Dict = request.get_json() + sessionId= request_data.get('session_id') + if not sessionId: + return jsonify({'error': 'sessionId is required'}), 400 + qos_profile_id = request_data.get('qos_profile_id') + if not qos_profile_id: + return jsonify({'error': 'qos_profile_id is required'}), 400 + service = QOD_2_service(self.client, request_data, qos_profile_id) + updated_service = self.service_client.UpdateService(service) + qod_response = service_2_qod(updated_service) + + return qod_response, 200 + + except KeyError as e: + LOGGER.error(f"Missing required key: {e}") + return {"error": f"Missing required key: {str(e)}"}, 400 + except grpc._channel._InactiveRpcError as exc: + if exc.code() == grpc.StatusCode.NOT_FOUND: + LOGGER.warning(f"Qod Session not found: {sessionId}") + return {"error": f"Qod Session {sessionId} not found"}, 404 + LOGGER.error(f"gRPC error while updating Qod Session: {exc}") + return {"error": "Internal Server Error"}, 500 + except Exception as e: + LOGGER.error(f"Error in PUT /sessions/{sessionId}: {e}") + return {"error": "Internal Server Error"}, 500 + + + def delete(self, sessionId: str): + self.service_client.DeleteService(grpc_service_id(DEFAULT_CONTEXT_NAME, sessionId)) + return{"Session Deleted"} + -####session#### -#class PortRange: -# def __init__(self, from_port, to_port): -# self.from_port = from_port -# self.to_port = to_port -# -#class PortDetails: -# def __init__(self, ranges=None, ports=None): -# self.ranges = ranges or [] -# self.ports = ports or [] -# -#class Device: -# def __init__(self, phoneNumber, networkAccessIdentifier, publicAddress, publicPort, ipv6Address): -# self.phoneNumber = phoneNumber -# self.networkAccessIdentifier = networkAccessIdentifier -# self.publicAddress = publicAddress -# self.publicPort = publicPort -# self.ipv6Address = ipv6Address -# -#class ApplicationServer: -# def __init__(self, ipv4Address, ipv6Address): -# self.ipv4Address = ipv4Address -# self.ipv6Address = ipv6Address -# -#class Webhook: -# def __init__(self, notificationUrl, notificationAuthToken): -# self.notificationUrl = notificationUrl -# self.notificationAuthToken = notificationAuthToken -# -#class SessionCreate: -# def __init__(self, device, applicationServer, devicePorts, applicationServerPorts, qosProfile, webhook, duration): -# self.device = device -# self.applicationServer = applicationServer -# self.devicePorts = devicePorts -# self.applicationServerPorts = applicationServerPorts -# self.qosProfile = qosProfile -# self.webhook = webhook -# self.duration = duration -# -#sessions = [] -# -#class SessionList(Resource): -# def post(self): -# data = request.get_json() -# session_id = str(uuid.uuid4()) -# profile_name = data.get('qosProfile') -# -# profile = next((p for p in profiles if p["name"] == profile_name), None) -# if not profile: -# return jsonify({"error": "QoS profile not found"}), 404 -# -# device = Device( -# phoneNumber=data['device']['phoneNumber'], -# networkAccessIdentifier=data['device']['networkAccessIdentifier'], -# publicAddress=data['device']['ipv4Address']['publicAddress'], -# publicPort=data['device']['ipv4Address']['publicPort'], -# ipv6Address=data['device']['ipv6Address'] -# ) -# -# applicationServer = ApplicationServer( -# ipv4Address=data['applicationServer']['ipv4Address'], -# ipv6Address=data['applicationServer']['ipv6Address'] -# ) -# -# devicePorts = PortDetails( -# ranges=[PortRange(r['from'], r['to']) for r in data['devicePorts']['ranges']], -# ports=data['devicePorts']['ports'] -# ) -# -# applicationServerPorts = PortDetails( -# ranges=[PortRange(r['from'], r['to']) for r in data['applicationServerPorts']['ranges']], -# ports=data['applicationServerPorts']['ports'] -# ) -# -# webhook = Webhook( -# notificationUrl=data['webhook']['notificationUrl'], -# notificationAuthToken=data['webhook']['notificationAuthToken'] -# ) -# -# new_session = SessionCreate( -# device=device, -# applicationServer=applicationServer, -# devicePorts=devicePorts, -# applicationServerPorts=applicationServerPorts, -# qosProfile=profile_name, -# webhook=webhook, -# duration=data['duration'] -# ) -# -# session_data = { -# "session_id": session_id, -# "device": { -# "phoneNumber": device.phoneNumber, -# "networkAccessIdentifier": device.networkAccessIdentifier, -# "ipv4Address": { -# "publicAddress": device.publicAddress, -# "publicPort": device.publicPort -# }, -# "ipv6Address": device.ipv6Address -# }, -# "applicationServer": { -# "ipv4Address": applicationServer.ipv4Address, -# "ipv6Address": applicationServer.ipv6Address -# }, -# "devicePorts": { -# "ranges": [{"from": r.from_port, "to": r.to_port} for r in devicePorts.ranges], -# "ports": devicePorts.ports -# }, -# "applicationServerPorts": { -# "ranges": [{"from": r.from_port, "to": r.to_port} for r in applicationServerPorts.ranges], -# "ports": applicationServerPorts.ports -# }, -# "qosProfile": new_session.qosProfile, -# "webhook": { -# "notificationUrl": webhook.notificationUrl, -# "notificationAuthToken": webhook.notificationAuthToken -# }, -# "duration": new_session.duration, -# "status": SessionStatus.ACTIVE.value -# } -# -# sessions.append(session_data) -# return jsonify(session_data), 201 -# -#class SessionDetail(Resource): -# def get(self, session_id): -# session = next((s for s in sessions if s["session_id"] == session_id), None) -# if session: -# return jsonify(session) -# return {"message": "Session not found"}, 404 -# -# def put(self, session_id): -# data = request.get_json() -# session = next((s for s in sessions if s["session_id"] == session_id), None) -# if session: -# for key, value in data.items(): -# if key in session: -# session[key] = value -# return jsonify(session) -# return {"message": "Session not found"}, 404 -# -# def delete(self, session_id): -# global sessions -# session = next((s for s in sessions if s["session_id"] == session_id), None) -# if session: -# sessions = [s for s in sessions if s["session_id"] != session_id] -# return {"message": "Session deleted successfully"}, 200 -# return {"message": "Session not found"}, 404 -# -#class AllSessions(Resource): -# def get(self): -# return jsonify(sessions) -# -#class DeleteAllSessions(Resource): -# def delete(self): -# global sessions -# session_count = len(sessions) -# sessions = [] -# return {"message": f"Deleted {session_count} sessions."}, 200 -# \ No newline at end of file diff --git a/src/nbi/service/rest_server/nbi_plugins/camara_qod/Tools.py b/src/nbi/service/rest_server/nbi_plugins/camara_qod/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..98a85cc8c424213872136f788302e6533c3fe383 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/camara_qod/Tools.py @@ -0,0 +1,195 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, re, time +from decimal import ROUND_HALF_EVEN, Decimal +from flask.json import jsonify +from common.proto.context_pb2 import ( + ContextId, Empty, EndPointId, ServiceId, ServiceStatusEnum, ServiceTypeEnum, + Service, Constraint, Constraint_SLA_Capacity, ConfigRule, ConfigRule_Custom, + ConfigActionEnum,QoSProfile +) +from common.tools.grpc.ConfigRules import update_config_rule_custom +from common.tools.grpc.Tools import grpc_message_to_json +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Service import json_service_id +from uuid import uuid4 +from nbi.service.rest_server.nbi_plugins.ietf_network.bindings.networks import network +from qos_profile.client.QoSProfileClient import QoSProfileClient +from context.service.database.QoSProfile import grpc_message_to_qos_table_data +from common.proto.context_pb2 import QoSProfile, QoSProfileId, Uuid, QoSProfileValueUnitPair,Empty +import logging +import grpc +from netaddr import IPAddress, IPNetwork + +LOGGER = logging.getLogger(__name__) + +ENDPOINT_SETTINGS_KEY = '/device[{:s}]/endpoint[{:s}]/vlan[{:d}]/settings' +DEVICE_SETTINGS_KEY = '/device[{:s}]/settings' +RE_CONFIG_RULE_IF_SUBIF = re.compile(r'^\/interface\[([^\]]+)\]\/subinterface\[([^\]]+)\]$') +MEC_CONSIDERED_FIELDS = ['device', 'applicationServer', 'qosProfile', 'sessionId', 'duration', 'startedAt', 'expiresAt', 'qosStatus'] + + +def __init__(self) -> None: + super().__init__() + self.qos_profile_client = QoSProfileClient() + +def ip_withoutsubnet(ip_withsubnet,neededip): + network=IPNetwork(ip_withsubnet) + return IPAddress(neededip) in network + + +def QOD_2_service(client,qod_info: dict,qos_profile_id) -> Service: + service = Service() + service_config_rules = service.service_config.config_rules + + request_cr_key = '/request' + request_cr_value = {k: qod_info[k] for k in MEC_CONSIDERED_FIELDS if k in qod_info} + config_rule = ConfigRule() + config_rule.action = ConfigActionEnum.CONFIGACTION_SET + config_rule_custom = ConfigRule_Custom() + config_rule_custom.resource_key = request_cr_key + config_rule_custom.resource_value = json.dumps(request_cr_value) + config_rule.custom.CopyFrom(config_rule_custom) + service_config_rules.append(config_rule) + + if 'device' in qod_info and 'applicationServer' in qod_info: + a_ip = qod_info['device'].get('ipv4Address') + z_ip = qod_info['applicationServer'].get('ipv4Address') + + LOGGER.info('a_ip = {:s}'.format(str(a_ip))) + LOGGER.info('z_ip = {:s}'.format(str(z_ip))) + + if a_ip and z_ip: + devices = client.ListDevices(Empty()).devices + #LOGGER.info('devices = {:s}'.format(str(devices))) + + ip_interface_name_dict = {} + + for device in devices: + #LOGGER.info('device..uuid = {:s}'.format(str(device.device_id.device_uuid.uuid))) + #LOGGER.info('device..name = {:s}'.format(str(device.name))) + device_endpoint_uuids = {ep.name: ep.endpoint_id.endpoint_uuid.uuid for ep in device.device_endpoints} + #LOGGER.info('device_endpoint_uuids = {:s}'.format(str(device_endpoint_uuids))) + + for cr in device.device_config.config_rules: + if cr.WhichOneof('config_rule') != 'custom': + continue + #LOGGER.info('cr = {:s}'.format(str(cr))) + match_subif = RE_CONFIG_RULE_IF_SUBIF.match(cr.custom.resource_key) + if not match_subif: + continue + address_ip =json.loads(cr.custom.resource_value).get('address_ip') + LOGGER.info('cr..address_ip = {:s}'.format(str(address_ip))) + short_port_name = match_subif.groups()[0] + LOGGER.info('short_port_name = {:s}'.format(str(short_port_name))) + + ip_interface_name_dict[address_ip] = short_port_name + + if not (ip_withoutsubnet(a_ip, address_ip) or ip_withoutsubnet(z_ip, address_ip)): + continue + ep_id = EndPointId() + ep_id.endpoint_uuid.uuid = device_endpoint_uuids.get(short_port_name , '') + ep_id.device_id.device_uuid.uuid = device.device_id.device_uuid.uuid + service.service_endpoint_ids.append(ep_id) + LOGGER.info(f"the ip address{ep_id}") + + #LOGGER.info('ip_interface_name_dict = {:s}'.format(str(ip_interface_name_dict))) + + settings_cr_key = '/settings' + settings_cr_value = {} + update_config_rule_custom(service_config_rules, settings_cr_key, settings_cr_value) + service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED + service.service_type = ServiceTypeEnum.SERVICETYPE_L3NM + + qod_info["sessionID"]=str(uuid4()) + qod_info["context"]='admin' + service.service_id.service_uuid.uuid = qod_info['sessionID'] + service.service_id.context_id.context_uuid.uuid = qod_info["context"] + #service.service_constraints.CopyFrom() = qod_info['contraints'] + #LOGGER.info(f'this is the error: {qod_info["context"]}') + + + try: + id = QoSProfileId(qos_profile_id=Uuid(uuid=qos_profile_id)) + qos_profile = client.GetQoSProfile(id) + except grpc._channel._InactiveRpcError as exc: + if exc.code() == grpc.StatusCode.NOT_FOUND: + return {"error": f"QoSProfile {qos_profile_id} not found"}, 404 + + if qos_profile.qos_profile_id: + qos_profile_id = qod_info.get('qos_profile_id') + service.name = qod_info.get('QosProfileId', qos_profile_id) + #qos_profile = QoSProfile() + #qos_profile.qos_profile_id.qos_profile_id.uuid = qod_info['qosProfile'] + + + #if 'qosProfile' in qos_profile_list: + # qos_profile = QoSProfile() + # qos_profile.qos_profile_id.qos_profile_id.uuid = qod_info['qosProfile'] + + + + return service + + + +def service_2_qod(service: Service) -> dict: + response = {} + for config_rule in service.service_config.config_rules: + resource_value_json = json.loads(config_rule.custom.resource_value) + LOGGER.info(f"the resource value contains:{resource_value_json}") + if config_rule.custom.resource_key != '/request': + continue + if 'device' in resource_value_json and 'ipv4Address' in resource_value_json['device']: + response['device'] = { + 'ipv4Address': resource_value_json['device']['ipv4Address'] + } + + if 'applicationServer' in resource_value_json and 'ipv4Address' in resource_value_json['applicationServer']: + response['applicationServer'] = { + 'ipv4Address': resource_value_json['applicationServer']['ipv4Address'] + } + + if service.name: + response['qos_profile_id'] = service.name + + if service.service_id: + response['sessionId'] = service.service_id.service_uuid.uuid + + if service.timestamp: + response['duration'] = service.timestamp.timestamp + LOGGER.info(f"time stamp contains{response['duration']}") + + current_time = time.time() + response['startedAt'] = int(current_time) + response['expiresAt'] = int(current_time + response['duration']) + +# unixtime = time.time() +# response['timeStamp'] = { +# "seconds": int(unixtime), +# "nanoseconds": int(unixtime % 1 * 1e9) +# } + + return response + + +def format_grpc_to_json(grpc_reply): + return jsonify(grpc_message_to_json(grpc_reply)) + +def grpc_context_id(context_uuid): + return ContextId(**json_context_id(context_uuid)) + +def grpc_service_id(context_uuid, service_uuid): + return ServiceId(**json_service_id(service_uuid, context_id=json_context_id(context_uuid))) diff --git a/src/nbi/service/rest_server/nbi_plugins/camara_qod/__init__.py b/src/nbi/service/rest_server/nbi_plugins/camara_qod/__init__.py index 54794d72395b9a8aba9549f0725ac0c26869b4c6..cd54c35b0126e30c019770aca5e53f249bc6166f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/camara_qod/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/camara_qod/__init__.py @@ -13,10 +13,10 @@ # limitations under the License. from nbi.service.rest_server.RestServer import RestServer -from .Resources import ( - Profile_delete_by_name, SessionList,SessionDetail,AllSessions,DeleteAllSessions,ProfileList,ProfileDetail,AllProfiles,Profile_delete_by_name, - Delete_all_profile -) +from .Resources import (ProfileList,ProfileDetail,qodinfo,qodinfoId) + + #Profile_delete_by_name,#SessionList,SessionDetail,AllSessions,DeleteAllSessions,ProfileList,ProfileDetail,AllProfiles,Profile_delete_by_name, + #Delete_all_prof URL_PREFIX = '/camara/qod/v0' @@ -24,15 +24,13 @@ URL_PREFIX = '/camara/qod/v0' RESOURCES = [ # (endpoint_name, resource_class, resource_url) # TODO: Add appropriate endpoints - ('camara.qod.session_list', SessionList, '/sessions'), - ('camara.qod.session', SessionDetail, '/sessions/<string:session_id>'), - ('camara.qod.session_all', AllSessions, '/sessions/all'), - ('camara.qod.delete_all_sessions',DeleteAllSessions,'/sessions/delete_all'), + ('camara.qod_session_info', qodinfo, '/sessions'), + ('camara.qod_info_session_id', qodinfoId, '/sessions/<sessionId>'), ('camara.qod.profile_list',ProfileList,'/profiles'), - ('camara.qod.profile_detail',ProfileDetail,'/profiles/<string:profile_id>'), - ('camara.qod.profile_all',AllProfiles,'/profiles/all'), - ('camara.qod.profile_delete_by_name',Profile_delete_by_name,'/profiles/delete_by_name/<string:name>'), - ('camara.qod.profile_delete_all',Delete_all_profile,'/profiles/delete_all/'), + ('camara.qod.profile_detail',ProfileDetail,'/profiles/<string:qos_profile_id>'), + #('camara.qod.profile_all',ProfileListAll,'/profiles/all'), + #('camara.qod.profile_delete_by_name',Profile_delete_by_name,'/profiles/delete_by_name/<string:name>'), + #('camara.qod.profile_delete_all',Delete_all_profile,'/profiles/delete_all/'), ] diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py deleted file mode 100644 index e82c0166acff476924fbc2b873dbc30765fcce6a..0000000000000000000000000000000000000000 --- a/src/nbi/tests/PrepareTestScenario.py +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import enum, logging, os, pytest, requests, time -from typing import Any, Dict, List, Optional, Set, Union -from common.Constants import ServiceNameEnum -from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_HTTP, - get_env_var_name, get_service_baseurl_http, get_service_port_http -) -from context.client.ContextClient import ContextClient -from nbi.service.rest_server.RestServer import RestServer -from nbi.service.rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api -from nbi.service.rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn -from nbi.service.rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn -from nbi.service.rest_server.nbi_plugins.ietf_network import register_ietf_network -from nbi.service.rest_server.nbi_plugins.tfs_api import register_tfs_api -from nbi.tests.MockService_Dependencies import MockService_Dependencies -from service.client.ServiceClient import ServiceClient -from slice.client.SliceClient import SliceClient -from tests.tools.mock_osm.MockOSM import MockOSM -from .Constants import USERNAME, PASSWORD, WIM_MAPPING - -LOCAL_HOST = '127.0.0.1' -MOCKSERVICE_PORT = 10000 -NBI_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_http(ServiceNameEnum.NBI) # avoid privileged ports -os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) -os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) - -@pytest.fixture(scope='session') -def mock_service(): - _service = MockService_Dependencies(MOCKSERVICE_PORT) - _service.configure_env_vars() - _service.start() - yield _service - _service.stop() - -@pytest.fixture(scope='session') -def nbi_service_rest(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _rest_server = RestServer() - register_etsi_bwm_api(_rest_server) - register_ietf_l2vpn(_rest_server) - register_ietf_l3vpn(_rest_server) - register_ietf_network(_rest_server) - register_tfs_api(_rest_server) - _rest_server.start() - time.sleep(1) # bring time for the server to start - yield _rest_server - _rest_server.shutdown() - _rest_server.join() - -@pytest.fixture(scope='session') -def osm_wim(nbi_service_rest : RestServer): # pylint: disable=redefined-outer-name, unused-argument - wim_url = 'http://{:s}:{:d}'.format(LOCAL_HOST, NBI_SERVICE_PORT) - return MockOSM(wim_url, WIM_MAPPING, USERNAME, PASSWORD) - -@pytest.fixture(scope='session') -def context_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _client = ContextClient() - yield _client - _client.close() - -@pytest.fixture(scope='session') -def service_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _client = ServiceClient() - yield _client - _client.close() - -@pytest.fixture(scope='session') -def slice_client(mock_service : MockService_Dependencies): # pylint: disable=redefined-outer-name, unused-argument - _client = SliceClient() - yield _client - _client.close() - -class RestRequestMethod(enum.Enum): - GET = 'get' - POST = 'post' - PUT = 'put' - PATCH = 'patch' - DELETE = 'delete' - -EXPECTED_STATUS_CODES : Set[int] = { - requests.codes['OK' ], - requests.codes['CREATED' ], - requests.codes['ACCEPTED' ], - requests.codes['NO_CONTENT'], -} - -def do_rest_request( - method : RestRequestMethod, url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - base_url = get_service_baseurl_http(ServiceNameEnum.NBI) or '' - request_url = 'http://{:s}:{:s}@{:s}:{:d}{:s}{:s}'.format( - USERNAME, PASSWORD, LOCAL_HOST, NBI_SERVICE_PORT, str(base_url), url - ) - if logger is not None: - msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) - if body is not None: msg += ' body={:s}'.format(str(body)) - logger.warning(msg) - reply = requests.request(method.value, request_url, timeout=timeout, json=body, allow_redirects=allow_redirects) - if logger is not None: - logger.warning('Reply: {:s}'.format(str(reply.text))) - assert reply.status_code in expected_status_codes, 'Reply failed with status code {:d}'.format(reply.status_code) - - if reply.content and len(reply.content) > 0: return reply.json() - return None - -def do_rest_get_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.GET, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_post_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.POST, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_put_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.PUT, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_patch_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.PATCH, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) - -def do_rest_delete_request( - url : str, body : Optional[Any] = None, timeout : int = 10, - allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, - logger : Optional[logging.Logger] = None -) -> Optional[Union[Dict, List]]: - return do_rest_request( - RestRequestMethod.DELETE, url, body=body, timeout=timeout, allow_redirects=allow_redirects, - expected_status_codes=expected_status_codes, logger=logger - ) diff --git a/src/nbi/tests/test_camara_qod.py b/src/nbi/tests/test_camara_qod.py deleted file mode 100644 index f23ff84d8972677b7fa716649da39c5ae1fb769a..0000000000000000000000000000000000000000 --- a/src/nbi/tests/test_camara_qod.py +++ /dev/null @@ -1,115 +0,0 @@ -from urllib import response -import requests - -BASE_URL = 'http://10.1.7.197/camara/qod/v0' - -def test_create_profile(): - response = requests.post(f'{BASE_URL}/profiles', json={ -"qos_profile_id": "f00406f5-8e36-4abc-a0ec-b871c7f062b7", -"name": "QCI_1_voice", -"description": "QoS profile for video streaming", -"status": "ACTIVE", -"targetMinUpstreamRate": { - "value": 10, - "unit": "bps" -}, -"maxUpstreamRate": { - "value": 10, - "unit": "bps" -}, -"maxUpstreamBurstRate": { - "value": 10, - "unit": "bps" -}, -"targetMinDownstreamRate": { - "value": 10, - "unit": "bps" -}, -"maxDownstreamRate": { - "value": 10, - "unit": "bps" -}, -"maxDownstreamBurstRate": { - "value": 10, - "unit": "bps" -}, -"minDuration": { - "value": 12, - "unit": "Minutes" -}, -"maxDuration": { - "value": 12, - "unit": "Minutes" -}, -"priority": 20, -"packetDelayBudget": { - "value": 12, - "unit": "Minutes" -}, -"jitter": { - "value": 12, - "unit": "Minutes" -}, -"packetErrorLossRate": 3 -} -) - -def get_profile(): - response=requests.get(f'{BASE_URL}/profile/ProfileDetail') - -#def test_delete_profile_by_name(): -# response = requests.delete(f'{BASE_URL}/profiles/delete_by_name/Test Profile') - -#def test_update_profile(): -# response = requests.put(f'{BASE_URL}/profiles/270a9c75-6a4e-452e-9dc5-804fc0204dcb', json={ -# "description": "AM UPDATING THIS ", -# "name":"test2" -# }) -# -# -# -#def test_create_session(): -# response = requests.post(f'{BASE_URL}/sessions', json={ -# "device": { -# "phoneNumber": "1234567890", -# "networkAccessIdentifier": "nai", -# "ipv4Address": {"publicAddress": "84.125.93.10", "publicPort": 59765}, -# "ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344" -# }, -# "applicationServer": { -# "ipv4Address": "192.168.0.1/24", -# "ipv6Address": "2001:db8:85a3:8d3:1319:8a2e:370:7344" -# }, -# "devicePorts": { -# "ranges": [{"from": 5010, "to": 5020}], -# "ports": [5060, 5070] -# }, -# "applicationServerPorts": { -# "ranges": [{"from": 6010, "to": 6020}], -# "ports": [6060, 6070] -# }, -# "qosProfile": "Test Profile", -# "webhook": { -# "notificationUrl": "https://application-server.com", -# "notificationAuthToken": "c8974e592c2fa383d4a3960714" -# }, -# "duration": {"value": 1, "unit": "hours"} -# }) -# -# -#def test_update_session(): -# response = requests.put(f'{BASE_URL}/sessions/88c51c03-13bf-4542-b3f2-43a9edccfc95', json={ -# "duration": {"value": 32, "unit": "hours"} -# }) -# -#def test_delete_session(): -# response = requests.delete(f'{BASE_URL}/sessions/e1b53005-ffba-4e66-b7fe-0c5e022d8d7d') -# -##def test_delete_all_sessions(): -# #BASE_URL = 'http://10.1.7.197/camara/qod/v0' -# #DELETE_ALL_URL = f"{BASE_URL}/sessions/delete_all" -# #response = requests.delete(DELETE_ALL_URL) -##def test_delete_all_profiles(): -# #BASE_URL = 'http://10.1.7.197/camara/qod/v0' -# #DELETE_ALL_URL_Profile = f"{BASE_URL}/profiles/delete_all" -# #response = requests.delete(DELETE_ALL_URL_Profile) \ No newline at end of file diff --git a/src/nbi/tests/test_camara_qod_profile.py b/src/nbi/tests/test_camara_qod_profile.py new file mode 100644 index 0000000000000000000000000000000000000000..063999a2da6eb72076649433af65fd3444390b73 --- /dev/null +++ b/src/nbi/tests/test_camara_qod_profile.py @@ -0,0 +1,133 @@ +import logging +from flask import jsonify +import requests + + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger() +BASE_URL = 'http://10.1.7.197/camara/qod/v0' + +def test_create_profile(): + BASE_URL = 'http://10.1.7.197/camara/qod/v0' + qos_profile_data={ + "name": "QCI_2_voice", + "description": "QoS profile for video streaming", + "status": "ACTIVE", + "targetMinUpstreamRate": { + "value": 10, + "unit": "bps" + }, + "maxUpstreamRate": { + "value": 10, + "unit": "bps" + }, + "maxUpstreamBurstRate": { + "value": 10, + "unit": "bps" + }, + "targetMinDownstreamRate": { + "value": 10, + "unit": "bps" + }, + "maxDownstreamRate": { + "value": 10, + "unit": "bps" + }, + "maxDownstreamBurstRate": { + "value": 10, + "unit": "bps" + }, + "minDuration": { + "value": 12, + "unit": "Minutes" + }, + "maxDuration": { + "value": 12, + "unit": "Minutes" + }, + "priority": 20, + "packetDelayBudget": { + "value": 12, + "unit": "Minutes" + }, + "jitter": { + "value": 12, + "unit": "Minutes" + }, + "packetErrorLossRate": 3 + } + + post_response = requests.post(f'{BASE_URL}/profiles', json=qos_profile_data).json() + id=post_response['qos_profile_id'] + get_response = requests.get(f'{BASE_URL}/profiles/{id}').json() + assert post_response['qos_profile_id'] == get_response['qos_profile_id'] + assert post_response['jitter'] == get_response['jitter'] + assert post_response['maxDownstreamBurstRate'] == get_response['maxDownstreamBurstRate'] + assert post_response['maxDownstreamRate'] == get_response['maxDownstreamRate'] + assert post_response['maxUpstreamBurstRate'] == get_response['maxUpstreamBurstRate'] + assert post_response['maxUpstreamRate'] == get_response['maxUpstreamRate'] + assert post_response['minDuration'] == get_response['minDuration'] + assert post_response['name'] == get_response['name'] + assert post_response['packetDelayBudget'] == get_response['packetDelayBudget'] + assert post_response['packetErrorLossRate'] == get_response['packetErrorLossRate'] + assert post_response['priority'] == get_response['priority'] + assert post_response['status'] == get_response['status'] + assert post_response['targetMinDownstreamRate'] == get_response['targetMinDownstreamRate'] + assert post_response['targetMinUpstreamRate'] == get_response['targetMinUpstreamRate'] + #assert response.status_code == 200, f"Failed to retrieve profile with status code {response.status_code}" +#def test_update_profile(): +# qos_profile_id = '1b4689d8-02a4-4a6c-bd0a-18ffecc1a336' +# qos_profile_data = { +# "qos_profile_id": "1b4689d8-02a4-4a6c-bd0a-18ffecc1a336", +# "name": "Updated Name", +# "description": "Updated Description", +# "status": "ACTIVE", +# "targetMinUpstreamRate": { +# "value": 20, +# "unit": "bps" +# }, +# "maxUpstreamRate": { +# "value": 50, +# "unit": "bps" +# }, +# "maxUpstreamBurstRate": { +# "value": 60, +# "unit": "bps" +# }, +# "targetMinDownstreamRate": { +# "value": 30, +# "unit": "bps" +# }, +# "maxDownstreamRate": { +# "value": 100, +# "unit": "bps" +# }, +# "maxDownstreamBurstRate": { +# "value": 70, +# "unit": "bps" +# }, +# "minDuration": { +# "value": 15, +# "unit": "Minutes" +# }, +# "maxDuration": { +# "value": 25, +# "unit": "Minutes" +# }, +# "priority": 15, +# "packetDelayBudget": { +# "value": 10, +# "unit": "Minutes" +# }, +# "jitter": { +# "value": 10, +# "unit": "Minutes" +# }, +# "packetErrorLossRate": 1 +#} +# +# response = requests.put(f'{BASE_URL}/profiles/{qos_profile_id}', json=qos_profile_data) +# +#def test_delete_profile_by_id(): +# qos_profile_id = 'adcbc52e-85e1-42e2-aa33-b6d022798fb3' +# response = requests.delete(f'{BASE_URL}/profiles/{qos_profile_id}') diff --git a/src/nbi/tests/test_camara_qos_service.py b/src/nbi/tests/test_camara_qos_service.py new file mode 100644 index 0000000000000000000000000000000000000000..f3bfd6f03133c4d33f35a86e25ed637b6dcac5c6 --- /dev/null +++ b/src/nbi/tests/test_camara_qos_service.py @@ -0,0 +1,52 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from flask import jsonify +import requests + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger() +BASE_URL = 'http://10.1.7.197/camara/qod/v0' + +#def test_create_SESSION(): +# BASE_URL = 'http://10.1.7.197/camara/qod/v0' +# service_data={ +# "device": +# {"ipv4Address":"84.75.11.12/25" }, +# "applicationServer": { +# "ipv4Address": "192.168.0.1/26", +# }, +# "duration":100.00, +# "qos_profile_id": "6f39d0ae-f1a4-4e05-ad3c-bc77bdbb7fd0", +# } +# post_response = requests.post(f'{BASE_URL}/sessions', json=service_data).json() +# #id=post_response['sessionID'] +# #get_response = requests.get(f'{BASE_URL}/sessions/{id}').json() +# get_response = requests.get(f'{BASE_URL}/sessions').json() +#def test_delete_session_by_id(): +# session_id = '' +# response = requests.delete(f'{BASE_URL}/sessions/{session_id}') + +def test_update_session_by_id(): + session_id='f192a586-4869-4d28-8793-01478fa149041' + session_data={"session_id":'f192a586-4869-4d28-8793-01478fa14904', + "device": + {"ipv4Address":"84.75.11.12/25" }, + "applicationServer": { + "ipv4Address": "192.168.0.1/26", + }, + "duration":200.00, + "qos_profile_id": "6f39d0ae-f1a4-4e05-ad3c-bc77bdbb7fd0"} + put_response=requests.put(f'{BASE_URL}/sessions/{session_id}',json=session_data).json() \ No newline at end of file diff --git a/src/nbi/tests/test_session.py b/src/nbi/tests/test_session.py new file mode 100644 index 0000000000000000000000000000000000000000..2becd19e395927587df853cccf273a95ed5cb30e --- /dev/null +++ b/src/nbi/tests/test_session.py @@ -0,0 +1,99 @@ +import json +import logging +import pytest +from typing import Dict +from nbi.service.rest_server import RestServer +from context.client.ContextClient import ContextClient +from common.Constants import DEFAULT_CONTEXT_NAME + +from .PrepareTestScenario import ( # Import necessary mock functions + do_rest_delete_request, do_rest_get_request, do_rest_patch_request, do_rest_post_request, do_rest_put_request, + mock_service, nbi_service_rest, context_client +) + +# Initialize logger +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +BASE_URL = '/camara/qod/v0' + +@pytest.fixture(scope='session') +def storage() -> Dict: + """Fixture to maintain test state across tests.""" + yield dict() + +def test_prepare_environment(context_client: ContextClient) -> None: # pylint: disable=redefined-outer-name + """Test case to prepare the environment by validating and setting up the necessary context.""" + # Ensure the environment is empty + # Add any preparation steps here as needed + pass + +def test_post_create_session(nbi_service_rest: RestServer, storage: Dict): # pylint: disable=redefined-outer-name + """Test case to create a new QoD session via POST request.""" + URL = BASE_URL + '/sessions' + data = { + "appInsId": "test_session_01", + "sessionInfo": { # Example payload, adjust according to your requirements + "sourceIp": "192.168.1.1", + "destinationIp": "192.168.1.2", + "constraints": { + "bandwidth": "100Mbps", + "latency": "50ms" + } + } + } + retrieved_data = do_rest_post_request(URL, body=data, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + storage['test_session_01'] = retrieved_data['appInsId'] + +def test_get_sessions(nbi_service_rest: RestServer, storage: Dict): # pylint: disable=redefined-outer-name + """Test case to retrieve all QoD sessions via GET request.""" + URL = BASE_URL + '/sessions' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + assert len(retrieved_data) > 0 # Adjust this assertion based on expected behavior + +def test_get_session_by_id(nbi_service_rest: RestServer, storage: Dict): # pylint: disable=redefined-outer-name + """Test case to retrieve a specific QoD session by sessionId via GET request.""" + assert 'test_session_01' in storage + session_id = storage['test_session_01'] + URL = BASE_URL + f'/sessions/{session_id}' + retrieved_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + # Add assertions to validate the retrieved data + +def test_put_update_session(nbi_service_rest: RestServer, storage: Dict): # pylint: disable=redefined-outer-name + """Test case to update a specific QoD session via PUT request.""" + assert 'test_session_01' in storage + session_id = storage['test_session_01'] + URL = BASE_URL + f'/sessions/{session_id}' + updated_data = { + "appInsId": session_id, + "sessionInfo": { # Example payload, adjust according to your requirements + "sourceIp": "192.168.1.1", + "destinationIp": "192.168.1.3", + "constraints": { + "bandwidth": "200Mbps", + "latency": "30ms" + } + } + } + retrieved_data = do_rest_put_request(URL, body=updated_data, logger=LOGGER, expected_status_codes={200}) + LOGGER.debug('retrieved_data={:s}'.format(json.dumps(retrieved_data, sort_keys=True))) + # Add assertions to validate the retrieved data + +def test_delete_session(nbi_service_rest: RestServer, storage: Dict): # pylint: disable=redefined-outer-name + """Test case to delete a specific QoD session via DELETE request.""" + assert 'test_session_01' in storage + session_id = storage['test_session_01'] + URL = BASE_URL + f'/sessions/{session_id}' + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={200}) + # Verify the deletion by trying to get the session again + response = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={404}) + assert response is None # Adjust this assertion based on expected behavior + +def test_cleanup_environment(context_client: ContextClient) -> None: # pylint: disable=redefined-outer-name + """Test case to clean up the environment by removing any test data or resetting the state.""" + # Clean up environment + # Add any cleanup steps here as needed + pass