diff --git a/proto/src/attack_mitigator_pb2.py b/proto/src/attack_mitigator_pb2.py deleted file mode 100644 index ce1e2d4910eeededdd110d90d80936d0b2cf0533..0000000000000000000000000000000000000000 --- a/proto/src/attack_mitigator_pb2.py +++ /dev/null @@ -1,186 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: attack_mitigator.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import 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.FileDescriptor( - name='attack_mitigator.proto', - package='attack_mitigator', - syntax='proto3', - serialized_options=None, - serialized_pb=_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') - , - dependencies=[context__pb2.DESCRIPTOR,]) - - - - -_ATTACKDESCRIPTION = _descriptor.Descriptor( - name='AttackDescription', - full_name='attack_mitigator.AttackDescription', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='cs_id', full_name='attack_mitigator.AttackDescription.cs_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='attack_id', full_name='attack_mitigator.AttackDescription.attack_id', index=1, - number=2, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='confidence', full_name='attack_mitigator.AttackDescription.confidence', index=2, - number=3, type=2, cpp_type=6, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='attack_description', full_name='attack_mitigator.AttackDescription.attack_description', index=3, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=59, - serialized_end=175, -) - - -_ATTACKRESPONSE = _descriptor.Descriptor( - name='AttackResponse', - full_name='attack_mitigator.AttackResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='cs_id', full_name='attack_mitigator.AttackResponse.cs_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='attack_id', full_name='attack_mitigator.AttackResponse.attack_id', index=1, - number=2, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='attack_description', full_name='attack_mitigator.AttackResponse.attack_description', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='response_strategy_id', full_name='attack_mitigator.AttackResponse.response_strategy_id', index=3, - number=4, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='response_strategy_description', full_name='attack_mitigator.AttackResponse.response_strategy_description', index=4, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=178, - serialized_end=340, -) - -_ATTACKDESCRIPTION.fields_by_name['cs_id'].message_type = context__pb2._UUID -_ATTACKRESPONSE.fields_by_name['cs_id'].message_type = context__pb2._UUID -DESCRIPTOR.message_types_by_name['AttackDescription'] = _ATTACKDESCRIPTION -DESCRIPTOR.message_types_by_name['AttackResponse'] = _ATTACKRESPONSE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -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.ServiceDescriptor( - name='AttackMitigator', - full_name='attack_mitigator.AttackMitigator', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=342, - serialized_end=448, - methods=[ - _descriptor.MethodDescriptor( - name='NotifyAttack', - full_name='attack_mitigator.AttackMitigator.NotifyAttack', - index=0, - containing_service=None, - input_type=_ATTACKDESCRIPTION, - output_type=_ATTACKRESPONSE, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_ATTACKMITIGATOR) - -DESCRIPTOR.services_by_name['AttackMitigator'] = _ATTACKMITIGATOR - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/attack_mitigator_pb2_grpc.py b/proto/src/attack_mitigator_pb2_grpc.py deleted file mode 100644 index 71518e3952ea5aad2cd5d9885a57b895faab9056..0000000000000000000000000000000000000000 --- a/proto/src/attack_mitigator_pb2_grpc.py +++ /dev/null @@ -1,46 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import attack_mitigator_pb2 as attack__mitigator__pb2 - - -class AttackMitigatorStub(object): - # missing associated documentation comment in .proto file - pass - - 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 - pass - - def NotifyAttack(self, request, context): - # missing associated documentation comment in .proto file - pass - 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,)) diff --git a/proto/src/automation_pb2.py b/proto/src/automation_pb2.py deleted file mode 100644 index 5fd11474d4cfdcb5a19ba05fd82bf5bce4f81e96..0000000000000000000000000000000000000000 --- a/proto/src/automation_pb2.py +++ /dev/null @@ -1,364 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: automation.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -import context_pb2 as context__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='automation.proto', - package='automation', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\x10\x61utomation.proto\x12\nautomation\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\"j\n\nDeviceRole\x12+\n\tdevRoleId\x18\x01 \x01(\x0b\x32\x18.automation.DeviceRoleId\x12/\n\x0b\x64\x65vRoleType\x18\x02 \x01(\x0e\x32\x1a.automation.DeviceRoleType\"9\n\x0e\x44\x65viceRoleList\x12\'\n\x07\x64\x65vRole\x18\x01 \x03(\x0b\x32\x16.automation.DeviceRole\"p\n\x0f\x44\x65viceRoleState\x12+\n\tdevRoleId\x18\x01 \x01(\x0b\x32\x18.automation.DeviceRoleId\x12\x30\n\x0c\x64\x65vRoleState\x18\x02 \x01(\x0e\x32\x1a.automation.ZtpDeviceState*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\n\x0eZtpDeviceState\x12\x0b\n\x07PLANNED\x10\x00\x12\x17\n\x13POTENCIAL_AVAILABLE\x10\x01\x12\x12\n\x0ePOTENCIAL_BUSY\x10\x02\x12\r\n\tINSTALLED\x10\x03\x12\x13\n\x0fPENDING_REMOVAL\x10\x04\x32\xc0\x03\n\x11\x41utomationService\x12\x46\n\x10ZtpGetDeviceRole\x12\x18.automation.DeviceRoleId\x1a\x16.automation.DeviceRole\"\x00\x12N\n\x1bZtpGetDeviceRolesByDeviceId\x12\x11.context.DeviceId\x1a\x1a.automation.DeviceRoleList\"\x00\x12?\n\x06ZtpAdd\x12\x16.automation.DeviceRole\x1a\x1b.automation.DeviceRoleState\"\x00\x12\x42\n\tZtpUpdate\x12\x16.automation.DeviceRole\x1a\x1b.automation.DeviceRoleState\"\x00\x12\x42\n\tZtpDelete\x12\x16.automation.DeviceRole\x1a\x1b.automation.DeviceRoleState\"\x00\x12J\n\x16ZtpDeleteAllByDeviceId\x12\x11.context.DeviceId\x1a\x1b.automation.DeviceRoleState\"\x00\x62\x06proto3') - , - dependencies=[context__pb2.DESCRIPTOR,]) - -_DEVICEROLETYPE = _descriptor.EnumDescriptor( - name='DeviceRoleType', - full_name='automation.DeviceRoleType', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='NONE', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DEV_OPS', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DEV_CONF', index=2, number=2, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='PIPELINE_CONF', index=3, number=3, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=412, - serialized_end=484, -) -_sym_db.RegisterEnumDescriptor(_DEVICEROLETYPE) - -DeviceRoleType = enum_type_wrapper.EnumTypeWrapper(_DEVICEROLETYPE) -_ZTPDEVICESTATE = _descriptor.EnumDescriptor( - name='ZtpDeviceState', - full_name='automation.ZtpDeviceState', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='PLANNED', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='POTENCIAL_AVAILABLE', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='POTENCIAL_BUSY', index=2, number=2, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='INSTALLED', index=3, number=3, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='PENDING_REMOVAL', index=4, number=4, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=486, - serialized_end=596, -) -_sym_db.RegisterEnumDescriptor(_ZTPDEVICESTATE) - -ZtpDeviceState = enum_type_wrapper.EnumTypeWrapper(_ZTPDEVICESTATE) -NONE = 0 -DEV_OPS = 1 -DEV_CONF = 2 -PIPELINE_CONF = 3 -PLANNED = 0 -POTENCIAL_AVAILABLE = 1 -POTENCIAL_BUSY = 2 -INSTALLED = 3 -PENDING_REMOVAL = 4 - - - -_DEVICEROLEID = _descriptor.Descriptor( - name='DeviceRoleId', - full_name='automation.DeviceRoleId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='devRoleId', full_name='automation.DeviceRoleId.devRoleId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='devId', full_name='automation.DeviceRoleId.devId', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=47, - serialized_end=129, -) - - -_DEVICEROLE = _descriptor.Descriptor( - name='DeviceRole', - full_name='automation.DeviceRole', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='devRoleId', full_name='automation.DeviceRole.devRoleId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='devRoleType', full_name='automation.DeviceRole.devRoleType', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=131, - serialized_end=237, -) - - -_DEVICEROLELIST = _descriptor.Descriptor( - name='DeviceRoleList', - full_name='automation.DeviceRoleList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='devRole', full_name='automation.DeviceRoleList.devRole', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=239, - serialized_end=296, -) - - -_DEVICEROLESTATE = _descriptor.Descriptor( - name='DeviceRoleState', - full_name='automation.DeviceRoleState', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='devRoleId', full_name='automation.DeviceRoleState.devRoleId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='devRoleState', full_name='automation.DeviceRoleState.devRoleState', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=298, - serialized_end=410, -) - -_DEVICEROLEID.fields_by_name['devRoleId'].message_type = context__pb2._UUID -_DEVICEROLEID.fields_by_name['devId'].message_type = context__pb2._DEVICEID -_DEVICEROLE.fields_by_name['devRoleId'].message_type = _DEVICEROLEID -_DEVICEROLE.fields_by_name['devRoleType'].enum_type = _DEVICEROLETYPE -_DEVICEROLELIST.fields_by_name['devRole'].message_type = _DEVICEROLE -_DEVICEROLESTATE.fields_by_name['devRoleId'].message_type = _DEVICEROLEID -_DEVICEROLESTATE.fields_by_name['devRoleState'].enum_type = _ZTPDEVICESTATE -DESCRIPTOR.message_types_by_name['DeviceRoleId'] = _DEVICEROLEID -DESCRIPTOR.message_types_by_name['DeviceRole'] = _DEVICEROLE -DESCRIPTOR.message_types_by_name['DeviceRoleList'] = _DEVICEROLELIST -DESCRIPTOR.message_types_by_name['DeviceRoleState'] = _DEVICEROLESTATE -DESCRIPTOR.enum_types_by_name['DeviceRoleType'] = _DEVICEROLETYPE -DESCRIPTOR.enum_types_by_name['ZtpDeviceState'] = _ZTPDEVICESTATE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -DeviceRoleId = _reflection.GeneratedProtocolMessageType('DeviceRoleId', (_message.Message,), { - 'DESCRIPTOR' : _DEVICEROLEID, - '__module__' : 'automation_pb2' - # @@protoc_insertion_point(class_scope:automation.DeviceRoleId) - }) -_sym_db.RegisterMessage(DeviceRoleId) - -DeviceRole = _reflection.GeneratedProtocolMessageType('DeviceRole', (_message.Message,), { - 'DESCRIPTOR' : _DEVICEROLE, - '__module__' : 'automation_pb2' - # @@protoc_insertion_point(class_scope:automation.DeviceRole) - }) -_sym_db.RegisterMessage(DeviceRole) - -DeviceRoleList = _reflection.GeneratedProtocolMessageType('DeviceRoleList', (_message.Message,), { - 'DESCRIPTOR' : _DEVICEROLELIST, - '__module__' : 'automation_pb2' - # @@protoc_insertion_point(class_scope:automation.DeviceRoleList) - }) -_sym_db.RegisterMessage(DeviceRoleList) - -DeviceRoleState = _reflection.GeneratedProtocolMessageType('DeviceRoleState', (_message.Message,), { - 'DESCRIPTOR' : _DEVICEROLESTATE, - '__module__' : 'automation_pb2' - # @@protoc_insertion_point(class_scope:automation.DeviceRoleState) - }) -_sym_db.RegisterMessage(DeviceRoleState) - - - -_AUTOMATIONSERVICE = _descriptor.ServiceDescriptor( - name='AutomationService', - full_name='automation.AutomationService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=599, - serialized_end=1047, - methods=[ - _descriptor.MethodDescriptor( - name='ZtpGetDeviceRole', - full_name='automation.AutomationService.ZtpGetDeviceRole', - index=0, - containing_service=None, - input_type=_DEVICEROLEID, - output_type=_DEVICEROLE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ZtpGetDeviceRolesByDeviceId', - full_name='automation.AutomationService.ZtpGetDeviceRolesByDeviceId', - index=1, - containing_service=None, - input_type=context__pb2._DEVICEID, - output_type=_DEVICEROLELIST, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ZtpAdd', - full_name='automation.AutomationService.ZtpAdd', - index=2, - containing_service=None, - input_type=_DEVICEROLE, - output_type=_DEVICEROLESTATE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ZtpUpdate', - full_name='automation.AutomationService.ZtpUpdate', - index=3, - containing_service=None, - input_type=_DEVICEROLE, - output_type=_DEVICEROLESTATE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ZtpDelete', - full_name='automation.AutomationService.ZtpDelete', - index=4, - containing_service=None, - input_type=_DEVICEROLE, - output_type=_DEVICEROLESTATE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ZtpDeleteAllByDeviceId', - full_name='automation.AutomationService.ZtpDeleteAllByDeviceId', - index=5, - containing_service=None, - input_type=context__pb2._DEVICEID, - output_type=_DEVICEROLESTATE, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_AUTOMATIONSERVICE) - -DESCRIPTOR.services_by_name['AutomationService'] = _AUTOMATIONSERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/automation_pb2_grpc.py b/proto/src/automation_pb2_grpc.py deleted file mode 100644 index 8ceb7956b3e7778db9d1c6e88c054238f57d7a61..0000000000000000000000000000000000000000 --- a/proto/src/automation_pb2_grpc.py +++ /dev/null @@ -1,132 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import automation_pb2 as automation__pb2 -import context_pb2 as context__pb2 - - -class AutomationServiceStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.ZtpGetDeviceRole = channel.unary_unary( - '/automation.AutomationService/ZtpGetDeviceRole', - request_serializer=automation__pb2.DeviceRoleId.SerializeToString, - response_deserializer=automation__pb2.DeviceRole.FromString, - ) - self.ZtpGetDeviceRolesByDeviceId = channel.unary_unary( - '/automation.AutomationService/ZtpGetDeviceRolesByDeviceId', - request_serializer=context__pb2.DeviceId.SerializeToString, - response_deserializer=automation__pb2.DeviceRoleList.FromString, - ) - self.ZtpAdd = channel.unary_unary( - '/automation.AutomationService/ZtpAdd', - request_serializer=automation__pb2.DeviceRole.SerializeToString, - response_deserializer=automation__pb2.DeviceRoleState.FromString, - ) - self.ZtpUpdate = channel.unary_unary( - '/automation.AutomationService/ZtpUpdate', - request_serializer=automation__pb2.DeviceRole.SerializeToString, - response_deserializer=automation__pb2.DeviceRoleState.FromString, - ) - self.ZtpDelete = channel.unary_unary( - '/automation.AutomationService/ZtpDelete', - request_serializer=automation__pb2.DeviceRole.SerializeToString, - response_deserializer=automation__pb2.DeviceRoleState.FromString, - ) - self.ZtpDeleteAllByDeviceId = channel.unary_unary( - '/automation.AutomationService/ZtpDeleteAllByDeviceId', - request_serializer=context__pb2.DeviceId.SerializeToString, - response_deserializer=automation__pb2.DeviceRoleState.FromString, - ) - - -class AutomationServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def ZtpGetDeviceRole(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - 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 - pass - 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 - pass - 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 - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ZtpDeleteAllByDeviceId(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_AutomationServiceServicer_to_server(servicer, server): - rpc_method_handlers = { - 'ZtpGetDeviceRole': grpc.unary_unary_rpc_method_handler( - servicer.ZtpGetDeviceRole, - request_deserializer=automation__pb2.DeviceRoleId.FromString, - response_serializer=automation__pb2.DeviceRole.SerializeToString, - ), - 'ZtpGetDeviceRolesByDeviceId': grpc.unary_unary_rpc_method_handler( - servicer.ZtpGetDeviceRolesByDeviceId, - request_deserializer=context__pb2.DeviceId.FromString, - response_serializer=automation__pb2.DeviceRoleList.SerializeToString, - ), - 'ZtpAdd': grpc.unary_unary_rpc_method_handler( - servicer.ZtpAdd, - request_deserializer=automation__pb2.DeviceRole.FromString, - response_serializer=automation__pb2.DeviceRoleState.SerializeToString, - ), - 'ZtpUpdate': grpc.unary_unary_rpc_method_handler( - servicer.ZtpUpdate, - request_deserializer=automation__pb2.DeviceRole.FromString, - response_serializer=automation__pb2.DeviceRoleState.SerializeToString, - ), - 'ZtpDelete': grpc.unary_unary_rpc_method_handler( - servicer.ZtpDelete, - request_deserializer=automation__pb2.DeviceRole.FromString, - response_serializer=automation__pb2.DeviceRoleState.SerializeToString, - ), - 'ZtpDeleteAllByDeviceId': grpc.unary_unary_rpc_method_handler( - servicer.ZtpDeleteAllByDeviceId, - request_deserializer=context__pb2.DeviceId.FromString, - response_serializer=automation__pb2.DeviceRoleState.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'automation.AutomationService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) diff --git a/proto/src/centralized_cybersecurity_pb2.py b/proto/src/centralized_cybersecurity_pb2.py deleted file mode 100644 index 77c8497f8867a796a0fcd07d3777ed273f064d04..0000000000000000000000000000000000000000 --- a/proto/src/centralized_cybersecurity_pb2.py +++ /dev/null @@ -1,86 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: centralized_cybersecurity.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import 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 service_pb2 as service__pb2 -import monitoring_pb2 as monitoring__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='centralized_cybersecurity.proto', - package='centralized_cybersecurity', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\x1f\x63\x65ntralized_cybersecurity.proto\x12\x19\x63\x65ntralized_cybersecurity\x1a\rcontext.proto\x1a\rservice.proto\x1a\x10monitoring.proto2\x80\x02\n\x1f\x43\x65ntralizedCyberSecurityService\x12\x39\n\x13NotifyServiceUpdate\x12\x10.service.Service\x1a\x0e.context.Empty\"\x00\x12\x30\n\x0c\x44\x65tectAttack\x12\x0e.context.Empty\x1a\x0e.context.Empty\"\x00\x12<\n\x13ReportSummarizedKpi\x12\x13.monitoring.KpiList\x1a\x0e.context.Empty\"\x00\x12\x32\n\tReportKpi\x12\x13.monitoring.KpiList\x1a\x0e.context.Empty\"\x00\x62\x06proto3') - , - dependencies=[context__pb2.DESCRIPTOR,service__pb2.DESCRIPTOR,monitoring__pb2.DESCRIPTOR,]) - - - -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - - - -_CENTRALIZEDCYBERSECURITYSERVICE = _descriptor.ServiceDescriptor( - name='CentralizedCyberSecurityService', - full_name='centralized_cybersecurity.CentralizedCyberSecurityService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=111, - serialized_end=367, - methods=[ - _descriptor.MethodDescriptor( - name='NotifyServiceUpdate', - full_name='centralized_cybersecurity.CentralizedCyberSecurityService.NotifyServiceUpdate', - index=0, - containing_service=None, - input_type=service__pb2._SERVICE, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='DetectAttack', - full_name='centralized_cybersecurity.CentralizedCyberSecurityService.DetectAttack', - index=1, - containing_service=None, - input_type=context__pb2._EMPTY, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ReportSummarizedKpi', - full_name='centralized_cybersecurity.CentralizedCyberSecurityService.ReportSummarizedKpi', - index=2, - containing_service=None, - input_type=monitoring__pb2._KPILIST, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ReportKpi', - full_name='centralized_cybersecurity.CentralizedCyberSecurityService.ReportKpi', - index=3, - containing_service=None, - input_type=monitoring__pb2._KPILIST, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_CENTRALIZEDCYBERSECURITYSERVICE) - -DESCRIPTOR.services_by_name['CentralizedCyberSecurityService'] = _CENTRALIZEDCYBERSECURITYSERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/centralized_cybersecurity_pb2_grpc.py b/proto/src/centralized_cybersecurity_pb2_grpc.py deleted file mode 100644 index cfd15633b07082ee168863dea2cb909a9ac1cac4..0000000000000000000000000000000000000000 --- a/proto/src/centralized_cybersecurity_pb2_grpc.py +++ /dev/null @@ -1,99 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 -import monitoring_pb2 as monitoring__pb2 -import service_pb2 as service__pb2 - - -class CentralizedCyberSecurityServiceStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.NotifyServiceUpdate = channel.unary_unary( - '/centralized_cybersecurity.CentralizedCyberSecurityService/NotifyServiceUpdate', - request_serializer=service__pb2.Service.SerializeToString, - response_deserializer=context__pb2.Empty.FromString, - ) - self.DetectAttack = channel.unary_unary( - '/centralized_cybersecurity.CentralizedCyberSecurityService/DetectAttack', - request_serializer=context__pb2.Empty.SerializeToString, - response_deserializer=context__pb2.Empty.FromString, - ) - self.ReportSummarizedKpi = channel.unary_unary( - '/centralized_cybersecurity.CentralizedCyberSecurityService/ReportSummarizedKpi', - request_serializer=monitoring__pb2.KpiList.SerializeToString, - response_deserializer=context__pb2.Empty.FromString, - ) - self.ReportKpi = channel.unary_unary( - '/centralized_cybersecurity.CentralizedCyberSecurityService/ReportKpi', - request_serializer=monitoring__pb2.KpiList.SerializeToString, - response_deserializer=context__pb2.Empty.FromString, - ) - - -class CentralizedCyberSecurityServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def NotifyServiceUpdate(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - 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 ReportSummarizedKpi(self, request, context): - """rpc called by the distributed component to report KPIs - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ReportKpi(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_CentralizedCyberSecurityServiceServicer_to_server(servicer, server): - rpc_method_handlers = { - 'NotifyServiceUpdate': grpc.unary_unary_rpc_method_handler( - servicer.NotifyServiceUpdate, - request_deserializer=service__pb2.Service.FromString, - response_serializer=context__pb2.Empty.SerializeToString, - ), - 'DetectAttack': grpc.unary_unary_rpc_method_handler( - servicer.DetectAttack, - request_deserializer=context__pb2.Empty.FromString, - response_serializer=context__pb2.Empty.SerializeToString, - ), - 'ReportSummarizedKpi': grpc.unary_unary_rpc_method_handler( - servicer.ReportSummarizedKpi, - request_deserializer=monitoring__pb2.KpiList.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( - 'centralized_cybersecurity.CentralizedCyberSecurityService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) diff --git a/proto/src/compute_pb2.py b/proto/src/compute_pb2.py deleted file mode 100644 index ea9fa5ece1fa1cc2f6885f2cb981f1e18403acfb..0000000000000000000000000000000000000000 --- a/proto/src/compute_pb2.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: compute.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import 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 service_pb2 as service__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='compute.proto', - package='compute', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\rcompute.proto\x12\x07\x63ompute\x1a\rcontext.proto\x1a\rservice.proto2\x99\x04\n\x0e\x43omputeService\x12Q\n\x11\x63heck_credentials\x12\x1b.context.TeraFlowController\x1a\x1d.context.AuthenticationResult\"\x00\x12N\n\x1fget_connectivity_service_status\x12\x12.service.ServiceId\x1a\x15.service.ServiceState\"\x00\x12\x45\n\x1b\x63reate_connectivity_service\x12\x10.service.Service\x1a\x12.service.ServiceId\"\x00\x12\x43\n\x19\x65\x64it_connectivity_service\x12\x10.service.Service\x1a\x12.service.ServiceId\"\x00\x12\x41\n\x1b\x64\x65lete_connectivity_service\x12\x10.service.Service\x1a\x0e.context.Empty\"\x00\x12P\n$get_all_active_connectivity_services\x12\x0e.context.Empty\x1a\x16.service.ServiceIdList\"\x00\x12\x43\n\x1f\x63lear_all_connectivity_services\x12\x0e.context.Empty\x1a\x0e.context.Empty\"\x00\x62\x06proto3') - , - dependencies=[context__pb2.DESCRIPTOR,service__pb2.DESCRIPTOR,]) - - - -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - - - -_COMPUTESERVICE = _descriptor.ServiceDescriptor( - name='ComputeService', - full_name='compute.ComputeService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=57, - serialized_end=594, - methods=[ - _descriptor.MethodDescriptor( - name='check_credentials', - full_name='compute.ComputeService.check_credentials', - index=0, - containing_service=None, - input_type=context__pb2._TERAFLOWCONTROLLER, - output_type=context__pb2._AUTHENTICATIONRESULT, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='get_connectivity_service_status', - full_name='compute.ComputeService.get_connectivity_service_status', - index=1, - containing_service=None, - input_type=service__pb2._SERVICEID, - output_type=service__pb2._SERVICESTATE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='create_connectivity_service', - full_name='compute.ComputeService.create_connectivity_service', - index=2, - containing_service=None, - input_type=service__pb2._SERVICE, - output_type=service__pb2._SERVICEID, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='edit_connectivity_service', - full_name='compute.ComputeService.edit_connectivity_service', - index=3, - containing_service=None, - input_type=service__pb2._SERVICE, - output_type=service__pb2._SERVICEID, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='delete_connectivity_service', - full_name='compute.ComputeService.delete_connectivity_service', - index=4, - containing_service=None, - input_type=service__pb2._SERVICE, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='get_all_active_connectivity_services', - full_name='compute.ComputeService.get_all_active_connectivity_services', - index=5, - containing_service=None, - input_type=context__pb2._EMPTY, - output_type=service__pb2._SERVICEIDLIST, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='clear_all_connectivity_services', - full_name='compute.ComputeService.clear_all_connectivity_services', - index=6, - containing_service=None, - input_type=context__pb2._EMPTY, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_COMPUTESERVICE) - -DESCRIPTOR.services_by_name['ComputeService'] = _COMPUTESERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/compute_pb2_grpc.py b/proto/src/compute_pb2_grpc.py deleted file mode 100644 index 4b5d7228c6bf3b257f4ad741140e77d29d2e4868..0000000000000000000000000000000000000000 --- a/proto/src/compute_pb2_grpc.py +++ /dev/null @@ -1,149 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 -import service_pb2 as service__pb2 - - -class ComputeServiceStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.check_credentials = channel.unary_unary( - '/compute.ComputeService/check_credentials', - request_serializer=context__pb2.TeraFlowController.SerializeToString, - response_deserializer=context__pb2.AuthenticationResult.FromString, - ) - self.get_connectivity_service_status = channel.unary_unary( - '/compute.ComputeService/get_connectivity_service_status', - request_serializer=service__pb2.ServiceId.SerializeToString, - response_deserializer=service__pb2.ServiceState.FromString, - ) - self.create_connectivity_service = channel.unary_unary( - '/compute.ComputeService/create_connectivity_service', - request_serializer=service__pb2.Service.SerializeToString, - response_deserializer=service__pb2.ServiceId.FromString, - ) - self.edit_connectivity_service = channel.unary_unary( - '/compute.ComputeService/edit_connectivity_service', - request_serializer=service__pb2.Service.SerializeToString, - response_deserializer=service__pb2.ServiceId.FromString, - ) - self.delete_connectivity_service = channel.unary_unary( - '/compute.ComputeService/delete_connectivity_service', - request_serializer=service__pb2.Service.SerializeToString, - response_deserializer=context__pb2.Empty.FromString, - ) - self.get_all_active_connectivity_services = channel.unary_unary( - '/compute.ComputeService/get_all_active_connectivity_services', - request_serializer=context__pb2.Empty.SerializeToString, - response_deserializer=service__pb2.ServiceIdList.FromString, - ) - self.clear_all_connectivity_services = channel.unary_unary( - '/compute.ComputeService/clear_all_connectivity_services', - request_serializer=context__pb2.Empty.SerializeToString, - response_deserializer=context__pb2.Empty.FromString, - ) - - -class ComputeServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def check_credentials(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def get_connectivity_service_status(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def create_connectivity_service(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def edit_connectivity_service(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def delete_connectivity_service(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def get_all_active_connectivity_services(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def clear_all_connectivity_services(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_ComputeServiceServicer_to_server(servicer, server): - rpc_method_handlers = { - 'check_credentials': grpc.unary_unary_rpc_method_handler( - servicer.check_credentials, - request_deserializer=context__pb2.TeraFlowController.FromString, - response_serializer=context__pb2.AuthenticationResult.SerializeToString, - ), - 'get_connectivity_service_status': grpc.unary_unary_rpc_method_handler( - servicer.get_connectivity_service_status, - request_deserializer=service__pb2.ServiceId.FromString, - response_serializer=service__pb2.ServiceState.SerializeToString, - ), - 'create_connectivity_service': grpc.unary_unary_rpc_method_handler( - servicer.create_connectivity_service, - request_deserializer=service__pb2.Service.FromString, - response_serializer=service__pb2.ServiceId.SerializeToString, - ), - 'edit_connectivity_service': grpc.unary_unary_rpc_method_handler( - servicer.edit_connectivity_service, - request_deserializer=service__pb2.Service.FromString, - response_serializer=service__pb2.ServiceId.SerializeToString, - ), - 'delete_connectivity_service': grpc.unary_unary_rpc_method_handler( - servicer.delete_connectivity_service, - request_deserializer=service__pb2.Service.FromString, - response_serializer=context__pb2.Empty.SerializeToString, - ), - 'get_all_active_connectivity_services': grpc.unary_unary_rpc_method_handler( - servicer.get_all_active_connectivity_services, - request_deserializer=context__pb2.Empty.FromString, - response_serializer=service__pb2.ServiceIdList.SerializeToString, - ), - 'clear_all_connectivity_services': grpc.unary_unary_rpc_method_handler( - servicer.clear_all_connectivity_services, - request_deserializer=context__pb2.Empty.FromString, - response_serializer=context__pb2.Empty.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'compute.ComputeService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) diff --git a/proto/src/context_pb2.py b/proto/src/context_pb2.py deleted file mode 100644 index d27de2618c175d3730376147f03ece21c8baefa6..0000000000000000000000000000000000000000 --- a/proto/src/context_pb2.py +++ /dev/null @@ -1,786 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: context.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='context.proto', - package='context', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\rcontext.proto\x12\x07\x63ontext\"\x07\n\x05\x45mpty\"{\n\x07\x43ontext\x12%\n\tcontextId\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x1f\n\x04topo\x18\x02 \x01(\x0b\x32\x11.context.Topology\x12(\n\x03\x63tl\x18\x03 \x01(\x0b\x32\x1b.context.TeraFlowController\"/\n\tContextId\x12\"\n\x0b\x63ontextUuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\"m\n\x08Topology\x12#\n\x06topoId\x18\x02 \x01(\x0b\x32\x13.context.TopologyId\x12\x1f\n\x06\x64\x65vice\x18\x03 \x03(\x0b\x32\x0f.context.Device\x12\x1b\n\x04link\x18\x04 \x03(\x0b\x32\r.context.Link\"1\n\x04Link\x12)\n\x0c\x65ndpointList\x18\x01 \x03(\x0b\x32\x13.context.EndPointId\"R\n\nTopologyId\x12%\n\tcontextId\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x1d\n\x06topoId\x18\x02 \x01(\x0b\x32\r.context.Uuid\"?\n\nConstraint\x12\x17\n\x0f\x63onstraint_type\x18\x01 \x01(\t\x12\x18\n\x10\x63onstraint_value\x18\x02 \x01(\t\"\xda\x01\n\x06\x44\x65vice\x12$\n\tdevice_id\x18\x01 \x01(\x0b\x32\x11.context.DeviceId\x12\x13\n\x0b\x64\x65vice_type\x18\x02 \x01(\t\x12,\n\rdevice_config\x18\x03 \x01(\x0b\x32\x15.context.DeviceConfig\x12>\n\x14\x64\x65vOperationalStatus\x18\x04 \x01(\x0e\x32 .context.DeviceOperationalStatus\x12\'\n\x0c\x65ndpointList\x18\x05 \x03(\x0b\x32\x11.context.EndPoint\"%\n\x0c\x44\x65viceConfig\x12\x15\n\rdevice_config\x18\x01 \x01(\t\"C\n\x08\x45ndPoint\x12$\n\x07port_id\x18\x01 \x01(\x0b\x32\x13.context.EndPointId\x12\x11\n\tport_type\x18\x02 \x01(\t\"t\n\nEndPointId\x12#\n\x06topoId\x18\x01 \x01(\x0b\x32\x13.context.TopologyId\x12!\n\x06\x64\x65v_id\x18\x02 \x01(\x0b\x32\x11.context.DeviceId\x12\x1e\n\x07port_id\x18\x03 \x01(\x0b\x32\r.context.Uuid\",\n\x08\x44\x65viceId\x12 \n\tdevice_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"\x14\n\x04Uuid\x12\x0c\n\x04uuid\x18\x01 \x01(\t\"K\n\x12TeraFlowController\x12\"\n\x06\x63tl_id\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x11\n\tipaddress\x18\x02 \x01(\t\"Q\n\x14\x41uthenticationResult\x12\"\n\x06\x63tl_id\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x15\n\rauthenticated\x18\x02 \x01(\x08*4\n\x17\x44\x65viceOperationalStatus\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x32\x44\n\x0e\x43ontextService\x12\x32\n\x0bGetTopology\x12\x0e.context.Empty\x1a\x11.context.Topology\"\x00\x62\x06proto3') -) - -_DEVICEOPERATIONALSTATUS = _descriptor.EnumDescriptor( - name='DeviceOperationalStatus', - full_name='context.DeviceOperationalStatus', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='DISABLED', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='ENABLED', index=1, number=1, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=1195, - serialized_end=1247, -) -_sym_db.RegisterEnumDescriptor(_DEVICEOPERATIONALSTATUS) - -DeviceOperationalStatus = enum_type_wrapper.EnumTypeWrapper(_DEVICEOPERATIONALSTATUS) -DISABLED = 0 -ENABLED = 1 - - - -_EMPTY = _descriptor.Descriptor( - name='Empty', - full_name='context.Empty', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=26, - serialized_end=33, -) - - -_CONTEXT = _descriptor.Descriptor( - name='Context', - full_name='context.Context', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='contextId', full_name='context.Context.contextId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='topo', full_name='context.Context.topo', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ctl', full_name='context.Context.ctl', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=35, - serialized_end=158, -) - - -_CONTEXTID = _descriptor.Descriptor( - name='ContextId', - full_name='context.ContextId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='contextUuid', full_name='context.ContextId.contextUuid', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=160, - serialized_end=207, -) - - -_TOPOLOGY = _descriptor.Descriptor( - name='Topology', - full_name='context.Topology', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='topoId', full_name='context.Topology.topoId', index=0, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='device', full_name='context.Topology.device', index=1, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='link', full_name='context.Topology.link', index=2, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=209, - serialized_end=318, -) - - -_LINK = _descriptor.Descriptor( - name='Link', - full_name='context.Link', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='endpointList', full_name='context.Link.endpointList', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=320, - serialized_end=369, -) - - -_TOPOLOGYID = _descriptor.Descriptor( - name='TopologyId', - full_name='context.TopologyId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='contextId', full_name='context.TopologyId.contextId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='topoId', full_name='context.TopologyId.topoId', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=371, - serialized_end=453, -) - - -_CONSTRAINT = _descriptor.Descriptor( - name='Constraint', - full_name='context.Constraint', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='constraint_type', full_name='context.Constraint.constraint_type', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='constraint_value', full_name='context.Constraint.constraint_value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=455, - serialized_end=518, -) - - -_DEVICE = _descriptor.Descriptor( - name='Device', - full_name='context.Device', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='device_id', full_name='context.Device.device_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='device_type', full_name='context.Device.device_type', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='device_config', full_name='context.Device.device_config', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='devOperationalStatus', full_name='context.Device.devOperationalStatus', index=3, - number=4, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='endpointList', full_name='context.Device.endpointList', index=4, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=521, - serialized_end=739, -) - - -_DEVICECONFIG = _descriptor.Descriptor( - name='DeviceConfig', - full_name='context.DeviceConfig', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='device_config', full_name='context.DeviceConfig.device_config', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=741, - serialized_end=778, -) - - -_ENDPOINT = _descriptor.Descriptor( - name='EndPoint', - full_name='context.EndPoint', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='port_id', full_name='context.EndPoint.port_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='port_type', full_name='context.EndPoint.port_type', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=780, - serialized_end=847, -) - - -_ENDPOINTID = _descriptor.Descriptor( - name='EndPointId', - full_name='context.EndPointId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='topoId', full_name='context.EndPointId.topoId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='dev_id', full_name='context.EndPointId.dev_id', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='port_id', full_name='context.EndPointId.port_id', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=849, - serialized_end=965, -) - - -_DEVICEID = _descriptor.Descriptor( - name='DeviceId', - full_name='context.DeviceId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='device_id', full_name='context.DeviceId.device_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=967, - serialized_end=1011, -) - - -_UUID = _descriptor.Descriptor( - name='Uuid', - full_name='context.Uuid', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='uuid', full_name='context.Uuid.uuid', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1013, - serialized_end=1033, -) - - -_TERAFLOWCONTROLLER = _descriptor.Descriptor( - name='TeraFlowController', - full_name='context.TeraFlowController', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='ctl_id', full_name='context.TeraFlowController.ctl_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ipaddress', full_name='context.TeraFlowController.ipaddress', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1035, - serialized_end=1110, -) - - -_AUTHENTICATIONRESULT = _descriptor.Descriptor( - name='AuthenticationResult', - full_name='context.AuthenticationResult', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='ctl_id', full_name='context.AuthenticationResult.ctl_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='authenticated', full_name='context.AuthenticationResult.authenticated', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1112, - serialized_end=1193, -) - -_CONTEXT.fields_by_name['contextId'].message_type = _CONTEXTID -_CONTEXT.fields_by_name['topo'].message_type = _TOPOLOGY -_CONTEXT.fields_by_name['ctl'].message_type = _TERAFLOWCONTROLLER -_CONTEXTID.fields_by_name['contextUuid'].message_type = _UUID -_TOPOLOGY.fields_by_name['topoId'].message_type = _TOPOLOGYID -_TOPOLOGY.fields_by_name['device'].message_type = _DEVICE -_TOPOLOGY.fields_by_name['link'].message_type = _LINK -_LINK.fields_by_name['endpointList'].message_type = _ENDPOINTID -_TOPOLOGYID.fields_by_name['contextId'].message_type = _CONTEXTID -_TOPOLOGYID.fields_by_name['topoId'].message_type = _UUID -_DEVICE.fields_by_name['device_id'].message_type = _DEVICEID -_DEVICE.fields_by_name['device_config'].message_type = _DEVICECONFIG -_DEVICE.fields_by_name['devOperationalStatus'].enum_type = _DEVICEOPERATIONALSTATUS -_DEVICE.fields_by_name['endpointList'].message_type = _ENDPOINT -_ENDPOINT.fields_by_name['port_id'].message_type = _ENDPOINTID -_ENDPOINTID.fields_by_name['topoId'].message_type = _TOPOLOGYID -_ENDPOINTID.fields_by_name['dev_id'].message_type = _DEVICEID -_ENDPOINTID.fields_by_name['port_id'].message_type = _UUID -_DEVICEID.fields_by_name['device_id'].message_type = _UUID -_TERAFLOWCONTROLLER.fields_by_name['ctl_id'].message_type = _CONTEXTID -_AUTHENTICATIONRESULT.fields_by_name['ctl_id'].message_type = _CONTEXTID -DESCRIPTOR.message_types_by_name['Empty'] = _EMPTY -DESCRIPTOR.message_types_by_name['Context'] = _CONTEXT -DESCRIPTOR.message_types_by_name['ContextId'] = _CONTEXTID -DESCRIPTOR.message_types_by_name['Topology'] = _TOPOLOGY -DESCRIPTOR.message_types_by_name['Link'] = _LINK -DESCRIPTOR.message_types_by_name['TopologyId'] = _TOPOLOGYID -DESCRIPTOR.message_types_by_name['Constraint'] = _CONSTRAINT -DESCRIPTOR.message_types_by_name['Device'] = _DEVICE -DESCRIPTOR.message_types_by_name['DeviceConfig'] = _DEVICECONFIG -DESCRIPTOR.message_types_by_name['EndPoint'] = _ENDPOINT -DESCRIPTOR.message_types_by_name['EndPointId'] = _ENDPOINTID -DESCRIPTOR.message_types_by_name['DeviceId'] = _DEVICEID -DESCRIPTOR.message_types_by_name['Uuid'] = _UUID -DESCRIPTOR.message_types_by_name['TeraFlowController'] = _TERAFLOWCONTROLLER -DESCRIPTOR.message_types_by_name['AuthenticationResult'] = _AUTHENTICATIONRESULT -DESCRIPTOR.enum_types_by_name['DeviceOperationalStatus'] = _DEVICEOPERATIONALSTATUS -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), { - 'DESCRIPTOR' : _EMPTY, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Empty) - }) -_sym_db.RegisterMessage(Empty) - -Context = _reflection.GeneratedProtocolMessageType('Context', (_message.Message,), { - 'DESCRIPTOR' : _CONTEXT, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Context) - }) -_sym_db.RegisterMessage(Context) - -ContextId = _reflection.GeneratedProtocolMessageType('ContextId', (_message.Message,), { - 'DESCRIPTOR' : _CONTEXTID, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.ContextId) - }) -_sym_db.RegisterMessage(ContextId) - -Topology = _reflection.GeneratedProtocolMessageType('Topology', (_message.Message,), { - 'DESCRIPTOR' : _TOPOLOGY, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Topology) - }) -_sym_db.RegisterMessage(Topology) - -Link = _reflection.GeneratedProtocolMessageType('Link', (_message.Message,), { - 'DESCRIPTOR' : _LINK, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Link) - }) -_sym_db.RegisterMessage(Link) - -TopologyId = _reflection.GeneratedProtocolMessageType('TopologyId', (_message.Message,), { - 'DESCRIPTOR' : _TOPOLOGYID, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.TopologyId) - }) -_sym_db.RegisterMessage(TopologyId) - -Constraint = _reflection.GeneratedProtocolMessageType('Constraint', (_message.Message,), { - 'DESCRIPTOR' : _CONSTRAINT, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Constraint) - }) -_sym_db.RegisterMessage(Constraint) - -Device = _reflection.GeneratedProtocolMessageType('Device', (_message.Message,), { - 'DESCRIPTOR' : _DEVICE, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Device) - }) -_sym_db.RegisterMessage(Device) - -DeviceConfig = _reflection.GeneratedProtocolMessageType('DeviceConfig', (_message.Message,), { - 'DESCRIPTOR' : _DEVICECONFIG, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.DeviceConfig) - }) -_sym_db.RegisterMessage(DeviceConfig) - -EndPoint = _reflection.GeneratedProtocolMessageType('EndPoint', (_message.Message,), { - 'DESCRIPTOR' : _ENDPOINT, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.EndPoint) - }) -_sym_db.RegisterMessage(EndPoint) - -EndPointId = _reflection.GeneratedProtocolMessageType('EndPointId', (_message.Message,), { - 'DESCRIPTOR' : _ENDPOINTID, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.EndPointId) - }) -_sym_db.RegisterMessage(EndPointId) - -DeviceId = _reflection.GeneratedProtocolMessageType('DeviceId', (_message.Message,), { - 'DESCRIPTOR' : _DEVICEID, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.DeviceId) - }) -_sym_db.RegisterMessage(DeviceId) - -Uuid = _reflection.GeneratedProtocolMessageType('Uuid', (_message.Message,), { - 'DESCRIPTOR' : _UUID, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Uuid) - }) -_sym_db.RegisterMessage(Uuid) - -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) - - - -_CONTEXTSERVICE = _descriptor.ServiceDescriptor( - name='ContextService', - full_name='context.ContextService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=1249, - serialized_end=1317, - methods=[ - _descriptor.MethodDescriptor( - name='GetTopology', - full_name='context.ContextService.GetTopology', - index=0, - containing_service=None, - input_type=_EMPTY, - output_type=_TOPOLOGY, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_CONTEXTSERVICE) - -DESCRIPTOR.services_by_name['ContextService'] = _CONTEXTSERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/context_pb2_grpc.py b/proto/src/context_pb2_grpc.py deleted file mode 100644 index d64835e12d21e68616361612e959d3fd6393ab6a..0000000000000000000000000000000000000000 --- a/proto/src/context_pb2_grpc.py +++ /dev/null @@ -1,46 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 - - -class ContextServiceStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.GetTopology = channel.unary_unary( - '/context.ContextService/GetTopology', - request_serializer=context__pb2.Empty.SerializeToString, - response_deserializer=context__pb2.Topology.FromString, - ) - - -class ContextServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def GetTopology(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 = { - 'GetTopology': grpc.unary_unary_rpc_method_handler( - servicer.GetTopology, - request_deserializer=context__pb2.Empty.FromString, - response_serializer=context__pb2.Topology.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'context.ContextService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) diff --git a/proto/src/device_pb2.py b/proto/src/device_pb2.py deleted file mode 100644 index e86c5042a7be395c776cba9e0ee2f5b3384833b4..0000000000000000000000000000000000000000 --- a/proto/src/device_pb2.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: device.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import 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.FileDescriptor( - name='device.proto', - package='device', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\x0c\x64\x65vice.proto\x12\x06\x64\x65vice\x1a\rcontext.proto2\xb6\x01\n\rDeviceService\x12\x31\n\tAddDevice\x12\x0f.context.Device\x1a\x11.context.DeviceId\"\x00\x12=\n\x0f\x43onfigureDevice\x12\x15.context.DeviceConfig\x1a\x11.context.DeviceId\"\x00\x12\x33\n\x0c\x44\x65leteDevice\x12\x11.context.DeviceId\x1a\x0e.context.Empty\"\x00\x62\x06proto3') - , - dependencies=[context__pb2.DESCRIPTOR,]) - - - -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - - - -_DEVICESERVICE = _descriptor.ServiceDescriptor( - name='DeviceService', - full_name='device.DeviceService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=40, - serialized_end=222, - methods=[ - _descriptor.MethodDescriptor( - name='AddDevice', - full_name='device.DeviceService.AddDevice', - index=0, - containing_service=None, - input_type=context__pb2._DEVICE, - output_type=context__pb2._DEVICEID, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ConfigureDevice', - full_name='device.DeviceService.ConfigureDevice', - index=1, - containing_service=None, - input_type=context__pb2._DEVICECONFIG, - output_type=context__pb2._DEVICEID, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='DeleteDevice', - full_name='device.DeviceService.DeleteDevice', - index=2, - containing_service=None, - input_type=context__pb2._DEVICEID, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_DEVICESERVICE) - -DESCRIPTOR.services_by_name['DeviceService'] = _DEVICESERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/device_pb2_grpc.py b/proto/src/device_pb2_grpc.py deleted file mode 100644 index ca45da27e378ba49118f4d101f80bca3e351070d..0000000000000000000000000000000000000000 --- a/proto/src/device_pb2_grpc.py +++ /dev/null @@ -1,80 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 - - -class DeviceServiceStub(object): - # missing associated documentation comment in .proto file - pass - - 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.DeviceConfig.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, - ) - - -class DeviceServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def AddDevice(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - 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 - pass - 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.DeviceConfig.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, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'device.DeviceService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) diff --git a/proto/src/distributed_cybersecurity_pb2.py b/proto/src/distributed_cybersecurity_pb2.py deleted file mode 100644 index 841a62540e94d2b152b93d1b170d751a28bcd732..0000000000000000000000000000000000000000 --- a/proto/src/distributed_cybersecurity_pb2.py +++ /dev/null @@ -1,67 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: distributed_cybersecurity.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import 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.FileDescriptor( - name='distributed_cybersecurity.proto', - package='distributed_cybersecurity', - syntax='proto3', - serialized_options=None, - serialized_pb=_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') - , - dependencies=[context__pb2.DESCRIPTOR,monitoring__pb2.DESCRIPTOR,]) - - - -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - - - -_DISTRIBUTEDCYBERSECURITYSERVICE = _descriptor.ServiceDescriptor( - name='DistributedCyberSecurityService', - full_name='distributed_cybersecurity.DistributedCyberSecurityService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=96, - serialized_end=231, - methods=[ - _descriptor.MethodDescriptor( - name='DetectAttack', - full_name='distributed_cybersecurity.DistributedCyberSecurityService.DetectAttack', - index=0, - containing_service=None, - input_type=context__pb2._EMPTY, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ReportKpi', - full_name='distributed_cybersecurity.DistributedCyberSecurityService.ReportKpi', - index=1, - containing_service=None, - input_type=monitoring__pb2._KPILIST, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_DISTRIBUTEDCYBERSECURITYSERVICE) - -DESCRIPTOR.services_by_name['DistributedCyberSecurityService'] = _DISTRIBUTEDCYBERSECURITYSERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/distributed_cybersecurity_pb2_grpc.py b/proto/src/distributed_cybersecurity_pb2_grpc.py deleted file mode 100644 index e8b7c9d2dc01993396def5af26e2c4de70e60211..0000000000000000000000000000000000000000 --- a/proto/src/distributed_cybersecurity_pb2_grpc.py +++ /dev/null @@ -1,64 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 -import monitoring_pb2 as monitoring__pb2 - - -class DistributedCyberSecurityServiceStub(object): - # missing associated documentation comment in .proto file - pass - - 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 - pass - - 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,)) diff --git a/proto/src/dlt_pb2.py b/proto/src/dlt_pb2.py deleted file mode 100644 index d1fa00a9faa75873b1790613851273e9dd86cb5d..0000000000000000000000000000000000000000 --- a/proto/src/dlt_pb2.py +++ /dev/null @@ -1,466 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: dlt.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -import context_pb2 as context__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='dlt.proto', - package='dlt', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\tdlt.proto\x12\x03\x64lt\x1a\rcontext.proto\"e\n\x15\x44ltRecordSubscription\x12 \n\x04type\x18\x01 \x01(\x0e\x32\x12.dlt.DltRecordType\x12*\n\toperation\x18\x02 \x01(\x0e\x32\x17.dlt.DltRecordOperation\"\x85\x01\n\tDltRecord\x12\x1c\n\x02id\x18\x01 \x01(\x0b\x32\x10.dlt.DltRecordId\x12 \n\x04type\x18\x02 \x01(\x0e\x32\x12.dlt.DltRecordType\x12*\n\toperation\x18\x03 \x01(\x0e\x32\x17.dlt.DltRecordOperation\x12\x0c\n\x04json\x18\x04 \x01(\t\"(\n\x0b\x44ltRecordId\x12\x19\n\x02id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"V\n\x0cRecordStatus\x12\x1c\n\x02id\x18\x01 \x01(\x0b\x32\x10.dlt.DltRecordId\x12(\n\x06status\x18\x02 \x01(\x0e\x32\x18.dlt.DltRecordStatusEnum\"Y\n\tDltStatus\x12(\n\x03\x63tl\x18\x01 \x01(\x0b\x32\x1b.context.TeraFlowController\x12\"\n\x06status\x18\x02 \x01(\x0e\x32\x12.dlt.DltStatusEnum*@\n\rDltRecordType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVICE\x10\x01\x12\n\n\x06\x44\x45VICE\x10\x02\x12\t\n\x05SLICE\x10\x03*5\n\x12\x44ltRecordOperation\x12\x07\n\x03\x41\x44\x44\x10\x00\x12\n\n\x06UPDATE\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02*>\n\x13\x44ltRecordStatusEnum\x12\r\n\tREQUESTED\x10\x00\x12\n\n\x06STORED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02*N\n\rDltStatusEnum\x12\x11\n\rNOT_AVAILABLE\x10\x00\x12\x0f\n\x0bINITIALIZED\x10\x01\x12\r\n\tAVAILABLE\x10\x02\x12\n\n\x06\x44\x45INIT\x10\x03\x32\xe6\x01\n\nDltService\x12\x32\n\x0bRecordToDlt\x12\x0e.dlt.DltRecord\x1a\x11.dlt.RecordStatus\"\x00\x12\x30\n\nGetFromDlt\x12\x10.dlt.DltRecordId\x1a\x0e.dlt.DltRecord\"\x00\x12@\n\x0eSubscribeToDlt\x12\x1a.dlt.DltRecordSubscription\x1a\x0e.dlt.DltRecord\"\x00\x30\x01\x12\x30\n\x0cGetDltStatus\x12\x0e.context.Empty\x1a\x0e.dlt.DltStatus\"\x00\x62\x06proto3') - , - dependencies=[context__pb2.DESCRIPTOR,]) - -_DLTRECORDTYPE = _descriptor.EnumDescriptor( - name='DltRecordType', - full_name='dlt.DltRecordType', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='UNKNOWN', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='SERVICE', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DEVICE', index=2, number=2, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='SLICE', index=3, number=3, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=493, - serialized_end=557, -) -_sym_db.RegisterEnumDescriptor(_DLTRECORDTYPE) - -DltRecordType = enum_type_wrapper.EnumTypeWrapper(_DLTRECORDTYPE) -_DLTRECORDOPERATION = _descriptor.EnumDescriptor( - name='DltRecordOperation', - full_name='dlt.DltRecordOperation', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='ADD', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='UPDATE', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DELETE', index=2, number=2, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=559, - serialized_end=612, -) -_sym_db.RegisterEnumDescriptor(_DLTRECORDOPERATION) - -DltRecordOperation = enum_type_wrapper.EnumTypeWrapper(_DLTRECORDOPERATION) -_DLTRECORDSTATUSENUM = _descriptor.EnumDescriptor( - name='DltRecordStatusEnum', - full_name='dlt.DltRecordStatusEnum', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='REQUESTED', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='STORED', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DISABLED', index=2, number=2, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=614, - serialized_end=676, -) -_sym_db.RegisterEnumDescriptor(_DLTRECORDSTATUSENUM) - -DltRecordStatusEnum = enum_type_wrapper.EnumTypeWrapper(_DLTRECORDSTATUSENUM) -_DLTSTATUSENUM = _descriptor.EnumDescriptor( - name='DltStatusEnum', - full_name='dlt.DltStatusEnum', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='NOT_AVAILABLE', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='INITIALIZED', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='AVAILABLE', index=2, number=2, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DEINIT', index=3, number=3, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=678, - serialized_end=756, -) -_sym_db.RegisterEnumDescriptor(_DLTSTATUSENUM) - -DltStatusEnum = enum_type_wrapper.EnumTypeWrapper(_DLTSTATUSENUM) -UNKNOWN = 0 -SERVICE = 1 -DEVICE = 2 -SLICE = 3 -ADD = 0 -UPDATE = 1 -DELETE = 2 -REQUESTED = 0 -STORED = 1 -DISABLED = 2 -NOT_AVAILABLE = 0 -INITIALIZED = 1 -AVAILABLE = 2 -DEINIT = 3 - - - -_DLTRECORDSUBSCRIPTION = _descriptor.Descriptor( - name='DltRecordSubscription', - full_name='dlt.DltRecordSubscription', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='type', full_name='dlt.DltRecordSubscription.type', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='operation', full_name='dlt.DltRecordSubscription.operation', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=33, - serialized_end=134, -) - - -_DLTRECORD = _descriptor.Descriptor( - name='DltRecord', - full_name='dlt.DltRecord', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='dlt.DltRecord.id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='type', full_name='dlt.DltRecord.type', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='operation', full_name='dlt.DltRecord.operation', index=2, - number=3, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='json', full_name='dlt.DltRecord.json', index=3, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=137, - serialized_end=270, -) - - -_DLTRECORDID = _descriptor.Descriptor( - name='DltRecordId', - full_name='dlt.DltRecordId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='dlt.DltRecordId.id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=272, - serialized_end=312, -) - - -_RECORDSTATUS = _descriptor.Descriptor( - name='RecordStatus', - full_name='dlt.RecordStatus', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='dlt.RecordStatus.id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='status', full_name='dlt.RecordStatus.status', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=314, - serialized_end=400, -) - - -_DLTSTATUS = _descriptor.Descriptor( - name='DltStatus', - full_name='dlt.DltStatus', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='ctl', full_name='dlt.DltStatus.ctl', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='status', full_name='dlt.DltStatus.status', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=402, - serialized_end=491, -) - -_DLTRECORDSUBSCRIPTION.fields_by_name['type'].enum_type = _DLTRECORDTYPE -_DLTRECORDSUBSCRIPTION.fields_by_name['operation'].enum_type = _DLTRECORDOPERATION -_DLTRECORD.fields_by_name['id'].message_type = _DLTRECORDID -_DLTRECORD.fields_by_name['type'].enum_type = _DLTRECORDTYPE -_DLTRECORD.fields_by_name['operation'].enum_type = _DLTRECORDOPERATION -_DLTRECORDID.fields_by_name['id'].message_type = context__pb2._UUID -_RECORDSTATUS.fields_by_name['id'].message_type = _DLTRECORDID -_RECORDSTATUS.fields_by_name['status'].enum_type = _DLTRECORDSTATUSENUM -_DLTSTATUS.fields_by_name['ctl'].message_type = context__pb2._TERAFLOWCONTROLLER -_DLTSTATUS.fields_by_name['status'].enum_type = _DLTSTATUSENUM -DESCRIPTOR.message_types_by_name['DltRecordSubscription'] = _DLTRECORDSUBSCRIPTION -DESCRIPTOR.message_types_by_name['DltRecord'] = _DLTRECORD -DESCRIPTOR.message_types_by_name['DltRecordId'] = _DLTRECORDID -DESCRIPTOR.message_types_by_name['RecordStatus'] = _RECORDSTATUS -DESCRIPTOR.message_types_by_name['DltStatus'] = _DLTSTATUS -DESCRIPTOR.enum_types_by_name['DltRecordType'] = _DLTRECORDTYPE -DESCRIPTOR.enum_types_by_name['DltRecordOperation'] = _DLTRECORDOPERATION -DESCRIPTOR.enum_types_by_name['DltRecordStatusEnum'] = _DLTRECORDSTATUSENUM -DESCRIPTOR.enum_types_by_name['DltStatusEnum'] = _DLTSTATUSENUM -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -DltRecordSubscription = _reflection.GeneratedProtocolMessageType('DltRecordSubscription', (_message.Message,), { - 'DESCRIPTOR' : _DLTRECORDSUBSCRIPTION, - '__module__' : 'dlt_pb2' - # @@protoc_insertion_point(class_scope:dlt.DltRecordSubscription) - }) -_sym_db.RegisterMessage(DltRecordSubscription) - -DltRecord = _reflection.GeneratedProtocolMessageType('DltRecord', (_message.Message,), { - 'DESCRIPTOR' : _DLTRECORD, - '__module__' : 'dlt_pb2' - # @@protoc_insertion_point(class_scope:dlt.DltRecord) - }) -_sym_db.RegisterMessage(DltRecord) - -DltRecordId = _reflection.GeneratedProtocolMessageType('DltRecordId', (_message.Message,), { - 'DESCRIPTOR' : _DLTRECORDID, - '__module__' : 'dlt_pb2' - # @@protoc_insertion_point(class_scope:dlt.DltRecordId) - }) -_sym_db.RegisterMessage(DltRecordId) - -RecordStatus = _reflection.GeneratedProtocolMessageType('RecordStatus', (_message.Message,), { - 'DESCRIPTOR' : _RECORDSTATUS, - '__module__' : 'dlt_pb2' - # @@protoc_insertion_point(class_scope:dlt.RecordStatus) - }) -_sym_db.RegisterMessage(RecordStatus) - -DltStatus = _reflection.GeneratedProtocolMessageType('DltStatus', (_message.Message,), { - 'DESCRIPTOR' : _DLTSTATUS, - '__module__' : 'dlt_pb2' - # @@protoc_insertion_point(class_scope:dlt.DltStatus) - }) -_sym_db.RegisterMessage(DltStatus) - - - -_DLTSERVICE = _descriptor.ServiceDescriptor( - name='DltService', - full_name='dlt.DltService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=759, - serialized_end=989, - methods=[ - _descriptor.MethodDescriptor( - name='RecordToDlt', - full_name='dlt.DltService.RecordToDlt', - index=0, - containing_service=None, - input_type=_DLTRECORD, - output_type=_RECORDSTATUS, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetFromDlt', - full_name='dlt.DltService.GetFromDlt', - index=1, - containing_service=None, - input_type=_DLTRECORDID, - output_type=_DLTRECORD, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='SubscribeToDlt', - full_name='dlt.DltService.SubscribeToDlt', - index=2, - containing_service=None, - input_type=_DLTRECORDSUBSCRIPTION, - output_type=_DLTRECORD, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetDltStatus', - full_name='dlt.DltService.GetDltStatus', - index=3, - containing_service=None, - input_type=context__pb2._EMPTY, - output_type=_DLTSTATUS, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_DLTSERVICE) - -DESCRIPTOR.services_by_name['DltService'] = _DLTSERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/dlt_pb2_grpc.py b/proto/src/dlt_pb2_grpc.py deleted file mode 100644 index a8b22526ecb0fec394facaea76bdb94b03bc8d14..0000000000000000000000000000000000000000 --- a/proto/src/dlt_pb2_grpc.py +++ /dev/null @@ -1,98 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 -import dlt_pb2 as dlt__pb2 - - -class DltServiceStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.RecordToDlt = channel.unary_unary( - '/dlt.DltService/RecordToDlt', - request_serializer=dlt__pb2.DltRecord.SerializeToString, - response_deserializer=dlt__pb2.RecordStatus.FromString, - ) - self.GetFromDlt = channel.unary_unary( - '/dlt.DltService/GetFromDlt', - request_serializer=dlt__pb2.DltRecordId.SerializeToString, - response_deserializer=dlt__pb2.DltRecord.FromString, - ) - self.SubscribeToDlt = channel.unary_stream( - '/dlt.DltService/SubscribeToDlt', - request_serializer=dlt__pb2.DltRecordSubscription.SerializeToString, - response_deserializer=dlt__pb2.DltRecord.FromString, - ) - self.GetDltStatus = channel.unary_unary( - '/dlt.DltService/GetDltStatus', - request_serializer=context__pb2.Empty.SerializeToString, - response_deserializer=dlt__pb2.DltStatus.FromString, - ) - - -class DltServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def RecordToDlt(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - 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 - pass - 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 - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_DltServiceServicer_to_server(servicer, server): - rpc_method_handlers = { - 'RecordToDlt': grpc.unary_unary_rpc_method_handler( - servicer.RecordToDlt, - request_deserializer=dlt__pb2.DltRecord.FromString, - response_serializer=dlt__pb2.RecordStatus.SerializeToString, - ), - 'GetFromDlt': grpc.unary_unary_rpc_method_handler( - servicer.GetFromDlt, - request_deserializer=dlt__pb2.DltRecordId.FromString, - response_serializer=dlt__pb2.DltRecord.SerializeToString, - ), - 'SubscribeToDlt': grpc.unary_stream_rpc_method_handler( - servicer.SubscribeToDlt, - request_deserializer=dlt__pb2.DltRecordSubscription.FromString, - response_serializer=dlt__pb2.DltRecord.SerializeToString, - ), - 'GetDltStatus': grpc.unary_unary_rpc_method_handler( - servicer.GetDltStatus, - request_deserializer=context__pb2.Empty.FromString, - response_serializer=dlt__pb2.DltStatus.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'dlt.DltService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) diff --git a/proto/src/health_pb2.py b/proto/src/health_pb2.py deleted file mode 100644 index 3cd84818dd84509d2c580ffa5d5aaf2df0ea9ee9..0000000000000000000000000000000000000000 --- a/proto/src/health_pb2.py +++ /dev/null @@ -1,175 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: health.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import 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.FileDescriptor( - name='health.proto', - package='grpc.health.v1', - syntax='proto3', - serialized_options=None, - serialized_pb=_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') -) - - - -_HEALTHCHECKRESPONSE_SERVINGSTATUS = _descriptor.EnumDescriptor( - name='ServingStatus', - full_name='grpc.health.v1.HealthCheckResponse.ServingStatus', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='UNKNOWN', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='SERVING', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='NOT_SERVING', index=2, number=2, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='SERVICE_UNKNOWN', index=3, number=3, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=162, - serialized_end=241, -) -_sym_db.RegisterEnumDescriptor(_HEALTHCHECKRESPONSE_SERVINGSTATUS) - - -_HEALTHCHECKREQUEST = _descriptor.Descriptor( - name='HealthCheckRequest', - full_name='grpc.health.v1.HealthCheckRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='service', full_name='grpc.health.v1.HealthCheckRequest.service', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=32, - serialized_end=69, -) - - -_HEALTHCHECKRESPONSE = _descriptor.Descriptor( - name='HealthCheckResponse', - full_name='grpc.health.v1.HealthCheckResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='status', full_name='grpc.health.v1.HealthCheckResponse.status', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - _HEALTHCHECKRESPONSE_SERVINGSTATUS, - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=72, - serialized_end=241, -) - -_HEALTHCHECKRESPONSE.fields_by_name['status'].enum_type = _HEALTHCHECKRESPONSE_SERVINGSTATUS -_HEALTHCHECKRESPONSE_SERVINGSTATUS.containing_type = _HEALTHCHECKRESPONSE -DESCRIPTOR.message_types_by_name['HealthCheckRequest'] = _HEALTHCHECKREQUEST -DESCRIPTOR.message_types_by_name['HealthCheckResponse'] = _HEALTHCHECKRESPONSE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -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.ServiceDescriptor( - name='Health', - full_name='grpc.health.v1.Health', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=244, - serialized_end=418, - methods=[ - _descriptor.MethodDescriptor( - name='Check', - full_name='grpc.health.v1.Health.Check', - index=0, - containing_service=None, - input_type=_HEALTHCHECKREQUEST, - output_type=_HEALTHCHECKRESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Watch', - full_name='grpc.health.v1.Health.Watch', - index=1, - containing_service=None, - input_type=_HEALTHCHECKREQUEST, - output_type=_HEALTHCHECKRESPONSE, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_HEALTH) - -DESCRIPTOR.services_by_name['Health'] = _HEALTH - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/health_pb2_grpc.py b/proto/src/health_pb2_grpc.py deleted file mode 100644 index 7f299d050c20dacb45b33b7ccd6396cb93e5a352..0000000000000000000000000000000000000000 --- a/proto/src/health_pb2_grpc.py +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import health_pb2 as health__pb2 - - -class HealthStub(object): - # missing associated documentation comment in .proto file - pass - - 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 - pass - - def Check(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - 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,)) diff --git a/proto/src/interdomain_pb2.py b/proto/src/interdomain_pb2.py deleted file mode 100644 index f94dec630b86f1844ac321b4fa0f5a363398fac4..0000000000000000000000000000000000000000 --- a/proto/src/interdomain_pb2.py +++ /dev/null @@ -1,85 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: interdomain.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import 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 slice_pb2 as slice__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='interdomain.proto', - package='interdomain', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\x11interdomain.proto\x12\x0binterdomain\x1a\rcontext.proto\x1a\x0bslice.proto2\xab\x02\n\x12InterdomainService\x12L\n\x0c\x41uthenticate\x12\x1b.context.TeraFlowController\x1a\x1d.context.AuthenticationResult\"\x00\x12\x36\n\x0bLookUpSlice\x12\x15.slice.TransportSlice\x1a\x0e.slice.SliceId\"\x00\x12\x44\n\x15OrderSliceFromCatalog\x12\x15.slice.TransportSlice\x1a\x12.slice.SliceStatus\"\x00\x12I\n\x1a\x43reateSliceAndAddToCatalog\x12\x15.slice.TransportSlice\x1a\x12.slice.SliceStatus\"\x00\x62\x06proto3') - , - dependencies=[context__pb2.DESCRIPTOR,slice__pb2.DESCRIPTOR,]) - - - -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - - - -_INTERDOMAINSERVICE = _descriptor.ServiceDescriptor( - name='InterdomainService', - full_name='interdomain.InterdomainService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=63, - serialized_end=362, - methods=[ - _descriptor.MethodDescriptor( - name='Authenticate', - full_name='interdomain.InterdomainService.Authenticate', - index=0, - containing_service=None, - input_type=context__pb2._TERAFLOWCONTROLLER, - output_type=context__pb2._AUTHENTICATIONRESULT, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='LookUpSlice', - full_name='interdomain.InterdomainService.LookUpSlice', - index=1, - containing_service=None, - input_type=slice__pb2._TRANSPORTSLICE, - output_type=slice__pb2._SLICEID, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='OrderSliceFromCatalog', - full_name='interdomain.InterdomainService.OrderSliceFromCatalog', - index=2, - containing_service=None, - input_type=slice__pb2._TRANSPORTSLICE, - output_type=slice__pb2._SLICESTATUS, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='CreateSliceAndAddToCatalog', - full_name='interdomain.InterdomainService.CreateSliceAndAddToCatalog', - index=3, - containing_service=None, - input_type=slice__pb2._TRANSPORTSLICE, - output_type=slice__pb2._SLICESTATUS, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_INTERDOMAINSERVICE) - -DESCRIPTOR.services_by_name['InterdomainService'] = _INTERDOMAINSERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/interdomain_pb2_grpc.py b/proto/src/interdomain_pb2_grpc.py deleted file mode 100644 index 5bbeb7bd7900633ace0b711e3a15c2c23415169e..0000000000000000000000000000000000000000 --- a/proto/src/interdomain_pb2_grpc.py +++ /dev/null @@ -1,98 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 -import slice_pb2 as slice__pb2 - - -class InterdomainServiceStub(object): - # missing associated documentation comment in .proto file - pass - - 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.LookUpSlice = channel.unary_unary( - '/interdomain.InterdomainService/LookUpSlice', - request_serializer=slice__pb2.TransportSlice.SerializeToString, - response_deserializer=slice__pb2.SliceId.FromString, - ) - self.OrderSliceFromCatalog = channel.unary_unary( - '/interdomain.InterdomainService/OrderSliceFromCatalog', - request_serializer=slice__pb2.TransportSlice.SerializeToString, - response_deserializer=slice__pb2.SliceStatus.FromString, - ) - self.CreateSliceAndAddToCatalog = channel.unary_unary( - '/interdomain.InterdomainService/CreateSliceAndAddToCatalog', - request_serializer=slice__pb2.TransportSlice.SerializeToString, - response_deserializer=slice__pb2.SliceStatus.FromString, - ) - - -class InterdomainServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def Authenticate(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - 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 - pass - 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 - pass - 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, - ), - 'LookUpSlice': grpc.unary_unary_rpc_method_handler( - servicer.LookUpSlice, - request_deserializer=slice__pb2.TransportSlice.FromString, - response_serializer=slice__pb2.SliceId.SerializeToString, - ), - 'OrderSliceFromCatalog': grpc.unary_unary_rpc_method_handler( - servicer.OrderSliceFromCatalog, - request_deserializer=slice__pb2.TransportSlice.FromString, - response_serializer=slice__pb2.SliceStatus.SerializeToString, - ), - 'CreateSliceAndAddToCatalog': grpc.unary_unary_rpc_method_handler( - servicer.CreateSliceAndAddToCatalog, - request_deserializer=slice__pb2.TransportSlice.FromString, - response_serializer=slice__pb2.SliceStatus.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'interdomain.InterdomainService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) diff --git a/proto/src/monitoring_pb2.py b/proto/src/monitoring_pb2.py deleted file mode 100644 index 2553dc6d264faeeed5e379506a7dc759c40ec8ef..0000000000000000000000000000000000000000 --- a/proto/src/monitoring_pb2.py +++ /dev/null @@ -1,339 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: monitoring.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf import descriptor as _descriptor -from google.protobuf import 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.FileDescriptor( - name='monitoring.proto', - package='monitoring', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\x10monitoring.proto\x12\nmonitoring\x1a\rcontext.proto\"|\n\x03Kpi\x12!\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x11.monitoring.KpiId\x12\x11\n\ttimestamp\x18\x02 \x01(\t\x12\x16\n\x0ekpiDescription\x18\x03 \x01(\t\x12\'\n\tkpi_value\x18\x04 \x01(\x0b\x32\x14.monitoring.KpiValue\"&\n\x05KpiId\x12\x1d\n\x06kpi_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"T\n\tKpiDevice\x12!\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x11.monitoring.KpiId\x12$\n\tdevice_id\x18\x02 \x01(\x0b\x32\x11.context.DeviceId\"+\n\x07KpiList\x12 \n\x07kpiList\x18\x01 \x03(\x0b\x32\x0f.monitoring.Kpi\"M\n\x08KpiValue\x12\x10\n\x06intVal\x18\x01 \x01(\rH\x00\x12\x13\n\tstringVal\x18\x02 \x01(\tH\x00\x12\x11\n\x07\x62oolVal\x18\x03 \x01(\x08H\x00\x42\x07\n\x05value2\xeb\x01\n\x11MonitoringService\x12/\n\nIncludeKpi\x12\x0f.monitoring.Kpi\x1a\x0e.context.Empty\"\x00\x12\x35\n\nMonitorKpi\x12\x15.monitoring.KpiDevice\x1a\x0e.context.Empty\"\x00\x12\x37\n\rGetStream_kpi\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') - , - dependencies=[context__pb2.DESCRIPTOR,]) - - - - -_KPI = _descriptor.Descriptor( - name='Kpi', - full_name='monitoring.Kpi', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='kpi_id', full_name='monitoring.Kpi.kpi_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='timestamp', full_name='monitoring.Kpi.timestamp', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='kpiDescription', full_name='monitoring.Kpi.kpiDescription', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='kpi_value', full_name='monitoring.Kpi.kpi_value', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=47, - serialized_end=171, -) - - -_KPIID = _descriptor.Descriptor( - name='KpiId', - full_name='monitoring.KpiId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='kpi_id', full_name='monitoring.KpiId.kpi_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=173, - serialized_end=211, -) - - -_KPIDEVICE = _descriptor.Descriptor( - name='KpiDevice', - full_name='monitoring.KpiDevice', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='kpi_id', full_name='monitoring.KpiDevice.kpi_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='device_id', full_name='monitoring.KpiDevice.device_id', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=213, - serialized_end=297, -) - - -_KPILIST = _descriptor.Descriptor( - name='KpiList', - full_name='monitoring.KpiList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='kpiList', full_name='monitoring.KpiList.kpiList', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=299, - serialized_end=342, -) - - -_KPIVALUE = _descriptor.Descriptor( - name='KpiValue', - full_name='monitoring.KpiValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='intVal', full_name='monitoring.KpiValue.intVal', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='stringVal', full_name='monitoring.KpiValue.stringVal', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='boolVal', full_name='monitoring.KpiValue.boolVal', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='value', full_name='monitoring.KpiValue.value', - index=0, containing_type=None, fields=[]), - ], - serialized_start=344, - serialized_end=421, -) - -_KPI.fields_by_name['kpi_id'].message_type = _KPIID -_KPI.fields_by_name['kpi_value'].message_type = _KPIVALUE -_KPIID.fields_by_name['kpi_id'].message_type = context__pb2._UUID -_KPIDEVICE.fields_by_name['kpi_id'].message_type = _KPIID -_KPIDEVICE.fields_by_name['device_id'].message_type = context__pb2._DEVICEID -_KPILIST.fields_by_name['kpiList'].message_type = _KPI -_KPIVALUE.oneofs_by_name['value'].fields.append( - _KPIVALUE.fields_by_name['intVal']) -_KPIVALUE.fields_by_name['intVal'].containing_oneof = _KPIVALUE.oneofs_by_name['value'] -_KPIVALUE.oneofs_by_name['value'].fields.append( - _KPIVALUE.fields_by_name['stringVal']) -_KPIVALUE.fields_by_name['stringVal'].containing_oneof = _KPIVALUE.oneofs_by_name['value'] -_KPIVALUE.oneofs_by_name['value'].fields.append( - _KPIVALUE.fields_by_name['boolVal']) -_KPIVALUE.fields_by_name['boolVal'].containing_oneof = _KPIVALUE.oneofs_by_name['value'] -DESCRIPTOR.message_types_by_name['Kpi'] = _KPI -DESCRIPTOR.message_types_by_name['KpiId'] = _KPIID -DESCRIPTOR.message_types_by_name['KpiDevice'] = _KPIDEVICE -DESCRIPTOR.message_types_by_name['KpiList'] = _KPILIST -DESCRIPTOR.message_types_by_name['KpiValue'] = _KPIVALUE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Kpi = _reflection.GeneratedProtocolMessageType('Kpi', (_message.Message,), { - 'DESCRIPTOR' : _KPI, - '__module__' : 'monitoring_pb2' - # @@protoc_insertion_point(class_scope:monitoring.Kpi) - }) -_sym_db.RegisterMessage(Kpi) - -KpiId = _reflection.GeneratedProtocolMessageType('KpiId', (_message.Message,), { - 'DESCRIPTOR' : _KPIID, - '__module__' : 'monitoring_pb2' - # @@protoc_insertion_point(class_scope:monitoring.KpiId) - }) -_sym_db.RegisterMessage(KpiId) - -KpiDevice = _reflection.GeneratedProtocolMessageType('KpiDevice', (_message.Message,), { - 'DESCRIPTOR' : _KPIDEVICE, - '__module__' : 'monitoring_pb2' - # @@protoc_insertion_point(class_scope:monitoring.KpiDevice) - }) -_sym_db.RegisterMessage(KpiDevice) - -KpiList = _reflection.GeneratedProtocolMessageType('KpiList', (_message.Message,), { - 'DESCRIPTOR' : _KPILIST, - '__module__' : 'monitoring_pb2' - # @@protoc_insertion_point(class_scope:monitoring.KpiList) - }) -_sym_db.RegisterMessage(KpiList) - -KpiValue = _reflection.GeneratedProtocolMessageType('KpiValue', (_message.Message,), { - 'DESCRIPTOR' : _KPIVALUE, - '__module__' : 'monitoring_pb2' - # @@protoc_insertion_point(class_scope:monitoring.KpiValue) - }) -_sym_db.RegisterMessage(KpiValue) - - - -_MONITORINGSERVICE = _descriptor.ServiceDescriptor( - name='MonitoringService', - full_name='monitoring.MonitoringService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=424, - serialized_end=659, - methods=[ - _descriptor.MethodDescriptor( - name='IncludeKpi', - full_name='monitoring.MonitoringService.IncludeKpi', - index=0, - containing_service=None, - input_type=_KPI, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='MonitorKpi', - full_name='monitoring.MonitoringService.MonitorKpi', - index=1, - containing_service=None, - input_type=_KPIDEVICE, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetStream_kpi', - full_name='monitoring.MonitoringService.GetStream_kpi', - index=2, - containing_service=None, - input_type=_KPIID, - output_type=_KPI, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetInstantKpi', - full_name='monitoring.MonitoringService.GetInstantKpi', - index=3, - containing_service=None, - input_type=_KPIID, - output_type=_KPI, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_MONITORINGSERVICE) - -DESCRIPTOR.services_by_name['MonitoringService'] = _MONITORINGSERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/monitoring_pb2_grpc.py b/proto/src/monitoring_pb2_grpc.py deleted file mode 100644 index 10904ec3785342e05b730de0456cf25b443af7d1..0000000000000000000000000000000000000000 --- a/proto/src/monitoring_pb2_grpc.py +++ /dev/null @@ -1,98 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 -import monitoring_pb2 as monitoring__pb2 - - -class MonitoringServiceStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - 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.KpiDevice.SerializeToString, - response_deserializer=context__pb2.Empty.FromString, - ) - self.GetStream_kpi = channel.unary_stream( - '/monitoring.MonitoringService/GetStream_kpi', - 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 - pass - - def IncludeKpi(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetStream_kpi(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - 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 = { - '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.KpiDevice.FromString, - response_serializer=context__pb2.Empty.SerializeToString, - ), - 'GetStream_kpi': grpc.unary_stream_rpc_method_handler( - servicer.GetStream_kpi, - 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,)) diff --git a/proto/src/policy_pb2.py b/proto/src/policy_pb2.py deleted file mode 100644 index 69c49bfb0706114e715ce6be866ed8c02ca37a91..0000000000000000000000000000000000000000 --- a/proto/src/policy_pb2.py +++ /dev/null @@ -1,518 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: policy.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -import context_pb2 as context__pb2 -import service_pb2 as service__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='policy.proto', - package='policy', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\x0cpolicy.proto\x12\x06policy\x1a\rcontext.proto\x1a\rservice.proto\"<\n\x0ePolicyRuleList\x12*\n\x0epolicyRuleList\x18\x01 \x03(\x0b\x32\x12.policy.PolicyRule\"\xac\x02\n\nPolicyRule\x12*\n\x0cpolicyRuleId\x18\x01 \x01(\x0b\x32\x14.policy.PolicyRuleId\x12\'\n\x0bserviceList\x18\x02 \x03(\x0b\x32\x12.service.ServiceId\x12%\n\ndeviceList\x18\x03 \x03(\x0b\x32\x11.context.DeviceId\x12\x16\n\x0epolicyRuleType\x18\x04 \x01(\t\x12\x1a\n\x12PolicyRulePriority\x18\x05 \x01(\t\x12\x39\n\x14polRuleConditionList\x18\x06 \x03(\x0b\x32\x1b.policy.PolicyRuleCondition\x12\x33\n\x11polRuleActionList\x18\x07 \x03(\x0b\x32\x18.policy.PolicyRuleAction\"+\n\x0cPolicyRuleId\x12\x1b\n\x04uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\"\x84\x01\n\x13PolicyRuleCondition\x12\x37\n\x13polRuleConditionVar\x18\x01 \x01(\x0b\x32\x1a.policy.PolicyRuleVariable\x12\x34\n\x13polRuleConditionVal\x18\x02 \x01(\x0b\x32\x17.policy.PolicyRuleValue\"{\n\x10PolicyRuleAction\x12\x34\n\x10polRuleActionVar\x18\x01 \x01(\x0b\x32\x1a.policy.PolicyRuleVariable\x12\x31\n\x10polRuleActionVal\x18\x02 \x01(\x0b\x32\x17.policy.PolicyRuleValue\"0\n\x12PolicyRuleVariable\x12\x1a\n\x12policyRuleVariable\x18\x01 \x01(\t\"*\n\x0fPolicyRuleValue\x12\x17\n\x0fpolicyRuleValue\x18\x01 \x01(\t\"b\n\x0fPolicyRuleState\x12#\n\x0cpolicyRuleId\x18\x01 \x01(\x0b\x32\r.context.Uuid\x12*\n\x0fpolicyRuleState\x18\x02 \x01(\x0e\x32\x11.policy.RuleState*$\n\tRuleState\x12\x0b\n\x07PLANNED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x32\x8c\x03\n\rPolicyService\x12:\n\tPolicyAdd\x12\x12.policy.PolicyRule\x1a\x17.policy.PolicyRuleState\"\x00\x12=\n\x0cPolicyUpdate\x12\x12.policy.PolicyRule\x1a\x17.policy.PolicyRuleState\"\x00\x12=\n\x0cPolicyDelete\x12\x12.policy.PolicyRule\x1a\x17.policy.PolicyRuleState\"\x00\x12\x37\n\tGetPolicy\x12\x14.policy.PolicyRuleId\x1a\x12.policy.PolicyRule\"\x00\x12\x42\n\x13GetPolicyByDeviceId\x12\x11.context.DeviceId\x1a\x16.policy.PolicyRuleList\"\x00\x12\x44\n\x14GetPolicyByServiceId\x12\x12.service.ServiceId\x1a\x16.policy.PolicyRuleList\"\x00\x62\x06proto3') - , - dependencies=[context__pb2.DESCRIPTOR,service__pb2.DESCRIPTOR,]) - -_RULESTATE = _descriptor.EnumDescriptor( - name='RuleState', - full_name='policy.RuleState', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='PLANNED', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='ACTIVE', index=1, number=1, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=918, - serialized_end=954, -) -_sym_db.RegisterEnumDescriptor(_RULESTATE) - -RuleState = enum_type_wrapper.EnumTypeWrapper(_RULESTATE) -PLANNED = 0 -ACTIVE = 1 - - - -_POLICYRULELIST = _descriptor.Descriptor( - name='PolicyRuleList', - full_name='policy.PolicyRuleList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='policyRuleList', full_name='policy.PolicyRuleList.policyRuleList', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=54, - serialized_end=114, -) - - -_POLICYRULE = _descriptor.Descriptor( - name='PolicyRule', - full_name='policy.PolicyRule', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='policyRuleId', full_name='policy.PolicyRule.policyRuleId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='serviceList', full_name='policy.PolicyRule.serviceList', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='deviceList', full_name='policy.PolicyRule.deviceList', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='policyRuleType', full_name='policy.PolicyRule.policyRuleType', index=3, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='PolicyRulePriority', full_name='policy.PolicyRule.PolicyRulePriority', index=4, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='polRuleConditionList', full_name='policy.PolicyRule.polRuleConditionList', index=5, - number=6, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='polRuleActionList', full_name='policy.PolicyRule.polRuleActionList', index=6, - number=7, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=117, - serialized_end=417, -) - - -_POLICYRULEID = _descriptor.Descriptor( - name='PolicyRuleId', - full_name='policy.PolicyRuleId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='uuid', full_name='policy.PolicyRuleId.uuid', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=419, - serialized_end=462, -) - - -_POLICYRULECONDITION = _descriptor.Descriptor( - name='PolicyRuleCondition', - full_name='policy.PolicyRuleCondition', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='polRuleConditionVar', full_name='policy.PolicyRuleCondition.polRuleConditionVar', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='polRuleConditionVal', full_name='policy.PolicyRuleCondition.polRuleConditionVal', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=465, - serialized_end=597, -) - - -_POLICYRULEACTION = _descriptor.Descriptor( - name='PolicyRuleAction', - full_name='policy.PolicyRuleAction', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='polRuleActionVar', full_name='policy.PolicyRuleAction.polRuleActionVar', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='polRuleActionVal', full_name='policy.PolicyRuleAction.polRuleActionVal', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=599, - serialized_end=722, -) - - -_POLICYRULEVARIABLE = _descriptor.Descriptor( - name='PolicyRuleVariable', - full_name='policy.PolicyRuleVariable', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='policyRuleVariable', full_name='policy.PolicyRuleVariable.policyRuleVariable', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=724, - serialized_end=772, -) - - -_POLICYRULEVALUE = _descriptor.Descriptor( - name='PolicyRuleValue', - full_name='policy.PolicyRuleValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='policyRuleValue', full_name='policy.PolicyRuleValue.policyRuleValue', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=774, - serialized_end=816, -) - - -_POLICYRULESTATE = _descriptor.Descriptor( - name='PolicyRuleState', - full_name='policy.PolicyRuleState', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='policyRuleId', full_name='policy.PolicyRuleState.policyRuleId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='policyRuleState', full_name='policy.PolicyRuleState.policyRuleState', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=818, - serialized_end=916, -) - -_POLICYRULELIST.fields_by_name['policyRuleList'].message_type = _POLICYRULE -_POLICYRULE.fields_by_name['policyRuleId'].message_type = _POLICYRULEID -_POLICYRULE.fields_by_name['serviceList'].message_type = service__pb2._SERVICEID -_POLICYRULE.fields_by_name['deviceList'].message_type = context__pb2._DEVICEID -_POLICYRULE.fields_by_name['polRuleConditionList'].message_type = _POLICYRULECONDITION -_POLICYRULE.fields_by_name['polRuleActionList'].message_type = _POLICYRULEACTION -_POLICYRULEID.fields_by_name['uuid'].message_type = context__pb2._UUID -_POLICYRULECONDITION.fields_by_name['polRuleConditionVar'].message_type = _POLICYRULEVARIABLE -_POLICYRULECONDITION.fields_by_name['polRuleConditionVal'].message_type = _POLICYRULEVALUE -_POLICYRULEACTION.fields_by_name['polRuleActionVar'].message_type = _POLICYRULEVARIABLE -_POLICYRULEACTION.fields_by_name['polRuleActionVal'].message_type = _POLICYRULEVALUE -_POLICYRULESTATE.fields_by_name['policyRuleId'].message_type = context__pb2._UUID -_POLICYRULESTATE.fields_by_name['policyRuleState'].enum_type = _RULESTATE -DESCRIPTOR.message_types_by_name['PolicyRuleList'] = _POLICYRULELIST -DESCRIPTOR.message_types_by_name['PolicyRule'] = _POLICYRULE -DESCRIPTOR.message_types_by_name['PolicyRuleId'] = _POLICYRULEID -DESCRIPTOR.message_types_by_name['PolicyRuleCondition'] = _POLICYRULECONDITION -DESCRIPTOR.message_types_by_name['PolicyRuleAction'] = _POLICYRULEACTION -DESCRIPTOR.message_types_by_name['PolicyRuleVariable'] = _POLICYRULEVARIABLE -DESCRIPTOR.message_types_by_name['PolicyRuleValue'] = _POLICYRULEVALUE -DESCRIPTOR.message_types_by_name['PolicyRuleState'] = _POLICYRULESTATE -DESCRIPTOR.enum_types_by_name['RuleState'] = _RULESTATE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -PolicyRuleList = _reflection.GeneratedProtocolMessageType('PolicyRuleList', (_message.Message,), { - 'DESCRIPTOR' : _POLICYRULELIST, - '__module__' : 'policy_pb2' - # @@protoc_insertion_point(class_scope:policy.PolicyRuleList) - }) -_sym_db.RegisterMessage(PolicyRuleList) - -PolicyRule = _reflection.GeneratedProtocolMessageType('PolicyRule', (_message.Message,), { - 'DESCRIPTOR' : _POLICYRULE, - '__module__' : 'policy_pb2' - # @@protoc_insertion_point(class_scope:policy.PolicyRule) - }) -_sym_db.RegisterMessage(PolicyRule) - -PolicyRuleId = _reflection.GeneratedProtocolMessageType('PolicyRuleId', (_message.Message,), { - 'DESCRIPTOR' : _POLICYRULEID, - '__module__' : 'policy_pb2' - # @@protoc_insertion_point(class_scope:policy.PolicyRuleId) - }) -_sym_db.RegisterMessage(PolicyRuleId) - -PolicyRuleCondition = _reflection.GeneratedProtocolMessageType('PolicyRuleCondition', (_message.Message,), { - 'DESCRIPTOR' : _POLICYRULECONDITION, - '__module__' : 'policy_pb2' - # @@protoc_insertion_point(class_scope:policy.PolicyRuleCondition) - }) -_sym_db.RegisterMessage(PolicyRuleCondition) - -PolicyRuleAction = _reflection.GeneratedProtocolMessageType('PolicyRuleAction', (_message.Message,), { - 'DESCRIPTOR' : _POLICYRULEACTION, - '__module__' : 'policy_pb2' - # @@protoc_insertion_point(class_scope:policy.PolicyRuleAction) - }) -_sym_db.RegisterMessage(PolicyRuleAction) - -PolicyRuleVariable = _reflection.GeneratedProtocolMessageType('PolicyRuleVariable', (_message.Message,), { - 'DESCRIPTOR' : _POLICYRULEVARIABLE, - '__module__' : 'policy_pb2' - # @@protoc_insertion_point(class_scope:policy.PolicyRuleVariable) - }) -_sym_db.RegisterMessage(PolicyRuleVariable) - -PolicyRuleValue = _reflection.GeneratedProtocolMessageType('PolicyRuleValue', (_message.Message,), { - 'DESCRIPTOR' : _POLICYRULEVALUE, - '__module__' : 'policy_pb2' - # @@protoc_insertion_point(class_scope:policy.PolicyRuleValue) - }) -_sym_db.RegisterMessage(PolicyRuleValue) - -PolicyRuleState = _reflection.GeneratedProtocolMessageType('PolicyRuleState', (_message.Message,), { - 'DESCRIPTOR' : _POLICYRULESTATE, - '__module__' : 'policy_pb2' - # @@protoc_insertion_point(class_scope:policy.PolicyRuleState) - }) -_sym_db.RegisterMessage(PolicyRuleState) - - - -_POLICYSERVICE = _descriptor.ServiceDescriptor( - name='PolicyService', - full_name='policy.PolicyService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=957, - serialized_end=1353, - methods=[ - _descriptor.MethodDescriptor( - name='PolicyAdd', - full_name='policy.PolicyService.PolicyAdd', - index=0, - containing_service=None, - input_type=_POLICYRULE, - output_type=_POLICYRULESTATE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='PolicyUpdate', - full_name='policy.PolicyService.PolicyUpdate', - index=1, - containing_service=None, - input_type=_POLICYRULE, - output_type=_POLICYRULESTATE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='PolicyDelete', - full_name='policy.PolicyService.PolicyDelete', - index=2, - containing_service=None, - input_type=_POLICYRULE, - output_type=_POLICYRULESTATE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetPolicy', - full_name='policy.PolicyService.GetPolicy', - index=3, - containing_service=None, - input_type=_POLICYRULEID, - output_type=_POLICYRULE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetPolicyByDeviceId', - full_name='policy.PolicyService.GetPolicyByDeviceId', - index=4, - containing_service=None, - input_type=context__pb2._DEVICEID, - output_type=_POLICYRULELIST, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetPolicyByServiceId', - full_name='policy.PolicyService.GetPolicyByServiceId', - index=5, - containing_service=None, - input_type=service__pb2._SERVICEID, - output_type=_POLICYRULELIST, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_POLICYSERVICE) - -DESCRIPTOR.services_by_name['PolicyService'] = _POLICYSERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/policy_pb2_grpc.py b/proto/src/policy_pb2_grpc.py deleted file mode 100644 index e7cea718547c3f9af99586c351cf7316724209a4..0000000000000000000000000000000000000000 --- a/proto/src/policy_pb2_grpc.py +++ /dev/null @@ -1,133 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 -import policy_pb2 as policy__pb2 -import service_pb2 as service__pb2 - - -class PolicyServiceStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.PolicyAdd = channel.unary_unary( - '/policy.PolicyService/PolicyAdd', - request_serializer=policy__pb2.PolicyRule.SerializeToString, - response_deserializer=policy__pb2.PolicyRuleState.FromString, - ) - self.PolicyUpdate = channel.unary_unary( - '/policy.PolicyService/PolicyUpdate', - request_serializer=policy__pb2.PolicyRule.SerializeToString, - response_deserializer=policy__pb2.PolicyRuleState.FromString, - ) - self.PolicyDelete = channel.unary_unary( - '/policy.PolicyService/PolicyDelete', - request_serializer=policy__pb2.PolicyRule.SerializeToString, - response_deserializer=policy__pb2.PolicyRuleState.FromString, - ) - self.GetPolicy = channel.unary_unary( - '/policy.PolicyService/GetPolicy', - request_serializer=policy__pb2.PolicyRuleId.SerializeToString, - response_deserializer=policy__pb2.PolicyRule.FromString, - ) - self.GetPolicyByDeviceId = channel.unary_unary( - '/policy.PolicyService/GetPolicyByDeviceId', - request_serializer=context__pb2.DeviceId.SerializeToString, - response_deserializer=policy__pb2.PolicyRuleList.FromString, - ) - self.GetPolicyByServiceId = channel.unary_unary( - '/policy.PolicyService/GetPolicyByServiceId', - request_serializer=service__pb2.ServiceId.SerializeToString, - response_deserializer=policy__pb2.PolicyRuleList.FromString, - ) - - -class PolicyServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def PolicyAdd(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def PolicyUpdate(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetPolicy(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetPolicyByDeviceId(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - 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 = { - 'PolicyAdd': grpc.unary_unary_rpc_method_handler( - servicer.PolicyAdd, - request_deserializer=policy__pb2.PolicyRule.FromString, - response_serializer=policy__pb2.PolicyRuleState.SerializeToString, - ), - 'PolicyUpdate': grpc.unary_unary_rpc_method_handler( - servicer.PolicyUpdate, - request_deserializer=policy__pb2.PolicyRule.FromString, - response_serializer=policy__pb2.PolicyRuleState.SerializeToString, - ), - 'PolicyDelete': grpc.unary_unary_rpc_method_handler( - servicer.PolicyDelete, - request_deserializer=policy__pb2.PolicyRule.FromString, - response_serializer=policy__pb2.PolicyRuleState.SerializeToString, - ), - 'GetPolicy': grpc.unary_unary_rpc_method_handler( - servicer.GetPolicy, - request_deserializer=policy__pb2.PolicyRuleId.FromString, - response_serializer=policy__pb2.PolicyRule.SerializeToString, - ), - 'GetPolicyByDeviceId': grpc.unary_unary_rpc_method_handler( - servicer.GetPolicyByDeviceId, - request_deserializer=context__pb2.DeviceId.FromString, - response_serializer=policy__pb2.PolicyRuleList.SerializeToString, - ), - 'GetPolicyByServiceId': grpc.unary_unary_rpc_method_handler( - servicer.GetPolicyByServiceId, - request_deserializer=service__pb2.ServiceId.FromString, - response_serializer=policy__pb2.PolicyRuleList.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'policy.PolicyService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) diff --git a/proto/src/service_pb2.py b/proto/src/service_pb2.py deleted file mode 100644 index 9375349b0cb327ab92c87db0a759ee59fc590892..0000000000000000000000000000000000000000 --- a/proto/src/service_pb2.py +++ /dev/null @@ -1,593 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: service.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -import context_pb2 as context__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='service.proto', - package='service', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\rservice.proto\x12\x07service\x1a\rcontext.proto\"+\n\x0bServiceList\x12\x1c\n\x02\x63s\x18\x01 \x03(\x0b\x32\x10.service.Service\"\x87\x02\n\x07Service\x12!\n\x05\x63s_id\x18\x01 \x01(\x0b\x32\x12.service.ServiceId\x12)\n\x0bserviceType\x18\x02 \x01(\x0e\x32\x14.service.ServiceType\x12)\n\x0c\x65ndpointList\x18\x03 \x03(\x0b\x32\x13.context.EndPointId\x12\'\n\nconstraint\x18\x04 \x03(\x0b\x32\x13.context.Constraint\x12+\n\x0cserviceState\x18\x05 \x01(\x0b\x32\x15.service.ServiceState\x12-\n\rserviceConfig\x18\x06 \x01(\x0b\x32\x16.service.ServiceConfig\"&\n\rServiceConfig\x12\x15\n\rserviceConfig\x18\x01 \x01(\t\"P\n\tServiceId\x12%\n\tcontextId\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x1c\n\x05\x63s_id\x18\x02 \x01(\x0b\x32\r.context.Uuid\":\n\rServiceIdList\x12)\n\rserviceIdList\x18\x01 \x03(\x0b\x32\x12.service.ServiceId\"?\n\x0cServiceState\x12/\n\x0cserviceState\x18\x01 \x01(\x0e\x32\x19.service.ServiceStateEnum\"=\n\x0e\x43onnectionList\x12+\n\x0e\x63onnectionList\x18\x01 \x03(\x0b\x32\x13.service.Connection\"\x84\x01\n\nConnection\x12%\n\x06\x63on_id\x18\x01 \x01(\x0b\x32\x15.service.ConnectionId\x12,\n\x10relatedServiceId\x18\x02 \x01(\x0b\x32\x12.service.ServiceId\x12!\n\x04path\x18\x03 \x03(\x0b\x32\x13.context.EndPointId\"-\n\x0c\x43onnectionId\x12\x1d\n\x06\x63on_id\x18\x01 \x01(\x0b\x32\r.context.Uuid*M\n\x0bServiceType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04L3NM\x10\x01\x12\x08\n\x04L2NM\x10\x02\x12\x1d\n\x19TAPI_CONNECTIVITY_SERVICE\x10\x03*@\n\x10ServiceStateEnum\x12\x0b\n\x07PLANNED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x13\n\x0fPENDING_REMOVAL\x10\x02\x32\xef\x02\n\x0eServiceService\x12\x38\n\x0eGetServiceList\x12\x0e.context.Empty\x1a\x14.service.ServiceList\"\x00\x12\x37\n\rCreateService\x12\x10.service.Service\x1a\x12.service.ServiceId\"\x00\x12\x37\n\rUpdateService\x12\x10.service.Service\x1a\x12.service.ServiceId\"\x00\x12\x37\n\rDeleteService\x12\x10.service.Service\x1a\x12.service.ServiceId\"\x00\x12\x38\n\x0eGetServiceById\x12\x12.service.ServiceId\x1a\x10.service.Service\"\x00\x12>\n\x11GetConnectionList\x12\x0e.context.Empty\x1a\x17.service.ConnectionList\"\x00\x62\x06proto3') - , - dependencies=[context__pb2.DESCRIPTOR,]) - -_SERVICETYPE = _descriptor.EnumDescriptor( - name='ServiceType', - full_name='service.ServiceType', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='UNKNOWN', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='L3NM', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='L2NM', index=2, number=2, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='TAPI_CONNECTIVITY_SERVICE', index=3, number=3, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=844, - serialized_end=921, -) -_sym_db.RegisterEnumDescriptor(_SERVICETYPE) - -ServiceType = enum_type_wrapper.EnumTypeWrapper(_SERVICETYPE) -_SERVICESTATEENUM = _descriptor.EnumDescriptor( - name='ServiceStateEnum', - full_name='service.ServiceStateEnum', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='PLANNED', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='ACTIVE', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='PENDING_REMOVAL', index=2, number=2, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=923, - serialized_end=987, -) -_sym_db.RegisterEnumDescriptor(_SERVICESTATEENUM) - -ServiceStateEnum = enum_type_wrapper.EnumTypeWrapper(_SERVICESTATEENUM) -UNKNOWN = 0 -L3NM = 1 -L2NM = 2 -TAPI_CONNECTIVITY_SERVICE = 3 -PLANNED = 0 -ACTIVE = 1 -PENDING_REMOVAL = 2 - - - -_SERVICELIST = _descriptor.Descriptor( - name='ServiceList', - full_name='service.ServiceList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='cs', full_name='service.ServiceList.cs', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=41, - serialized_end=84, -) - - -_SERVICE = _descriptor.Descriptor( - name='Service', - full_name='service.Service', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='cs_id', full_name='service.Service.cs_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='serviceType', full_name='service.Service.serviceType', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='endpointList', full_name='service.Service.endpointList', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='constraint', full_name='service.Service.constraint', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='serviceState', full_name='service.Service.serviceState', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='serviceConfig', full_name='service.Service.serviceConfig', index=5, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=87, - serialized_end=350, -) - - -_SERVICECONFIG = _descriptor.Descriptor( - name='ServiceConfig', - full_name='service.ServiceConfig', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='serviceConfig', full_name='service.ServiceConfig.serviceConfig', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=352, - serialized_end=390, -) - - -_SERVICEID = _descriptor.Descriptor( - name='ServiceId', - full_name='service.ServiceId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='contextId', full_name='service.ServiceId.contextId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='cs_id', full_name='service.ServiceId.cs_id', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=392, - serialized_end=472, -) - - -_SERVICEIDLIST = _descriptor.Descriptor( - name='ServiceIdList', - full_name='service.ServiceIdList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='serviceIdList', full_name='service.ServiceIdList.serviceIdList', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=474, - serialized_end=532, -) - - -_SERVICESTATE = _descriptor.Descriptor( - name='ServiceState', - full_name='service.ServiceState', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='serviceState', full_name='service.ServiceState.serviceState', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=534, - serialized_end=597, -) - - -_CONNECTIONLIST = _descriptor.Descriptor( - name='ConnectionList', - full_name='service.ConnectionList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='connectionList', full_name='service.ConnectionList.connectionList', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=599, - serialized_end=660, -) - - -_CONNECTION = _descriptor.Descriptor( - name='Connection', - full_name='service.Connection', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='con_id', full_name='service.Connection.con_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='relatedServiceId', full_name='service.Connection.relatedServiceId', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='path', full_name='service.Connection.path', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=663, - serialized_end=795, -) - - -_CONNECTIONID = _descriptor.Descriptor( - name='ConnectionId', - full_name='service.ConnectionId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='con_id', full_name='service.ConnectionId.con_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=797, - serialized_end=842, -) - -_SERVICELIST.fields_by_name['cs'].message_type = _SERVICE -_SERVICE.fields_by_name['cs_id'].message_type = _SERVICEID -_SERVICE.fields_by_name['serviceType'].enum_type = _SERVICETYPE -_SERVICE.fields_by_name['endpointList'].message_type = context__pb2._ENDPOINTID -_SERVICE.fields_by_name['constraint'].message_type = context__pb2._CONSTRAINT -_SERVICE.fields_by_name['serviceState'].message_type = _SERVICESTATE -_SERVICE.fields_by_name['serviceConfig'].message_type = _SERVICECONFIG -_SERVICEID.fields_by_name['contextId'].message_type = context__pb2._CONTEXTID -_SERVICEID.fields_by_name['cs_id'].message_type = context__pb2._UUID -_SERVICEIDLIST.fields_by_name['serviceIdList'].message_type = _SERVICEID -_SERVICESTATE.fields_by_name['serviceState'].enum_type = _SERVICESTATEENUM -_CONNECTIONLIST.fields_by_name['connectionList'].message_type = _CONNECTION -_CONNECTION.fields_by_name['con_id'].message_type = _CONNECTIONID -_CONNECTION.fields_by_name['relatedServiceId'].message_type = _SERVICEID -_CONNECTION.fields_by_name['path'].message_type = context__pb2._ENDPOINTID -_CONNECTIONID.fields_by_name['con_id'].message_type = context__pb2._UUID -DESCRIPTOR.message_types_by_name['ServiceList'] = _SERVICELIST -DESCRIPTOR.message_types_by_name['Service'] = _SERVICE -DESCRIPTOR.message_types_by_name['ServiceConfig'] = _SERVICECONFIG -DESCRIPTOR.message_types_by_name['ServiceId'] = _SERVICEID -DESCRIPTOR.message_types_by_name['ServiceIdList'] = _SERVICEIDLIST -DESCRIPTOR.message_types_by_name['ServiceState'] = _SERVICESTATE -DESCRIPTOR.message_types_by_name['ConnectionList'] = _CONNECTIONLIST -DESCRIPTOR.message_types_by_name['Connection'] = _CONNECTION -DESCRIPTOR.message_types_by_name['ConnectionId'] = _CONNECTIONID -DESCRIPTOR.enum_types_by_name['ServiceType'] = _SERVICETYPE -DESCRIPTOR.enum_types_by_name['ServiceStateEnum'] = _SERVICESTATEENUM -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -ServiceList = _reflection.GeneratedProtocolMessageType('ServiceList', (_message.Message,), { - 'DESCRIPTOR' : _SERVICELIST, - '__module__' : 'service_pb2' - # @@protoc_insertion_point(class_scope:service.ServiceList) - }) -_sym_db.RegisterMessage(ServiceList) - -Service = _reflection.GeneratedProtocolMessageType('Service', (_message.Message,), { - 'DESCRIPTOR' : _SERVICE, - '__module__' : 'service_pb2' - # @@protoc_insertion_point(class_scope:service.Service) - }) -_sym_db.RegisterMessage(Service) - -ServiceConfig = _reflection.GeneratedProtocolMessageType('ServiceConfig', (_message.Message,), { - 'DESCRIPTOR' : _SERVICECONFIG, - '__module__' : 'service_pb2' - # @@protoc_insertion_point(class_scope:service.ServiceConfig) - }) -_sym_db.RegisterMessage(ServiceConfig) - -ServiceId = _reflection.GeneratedProtocolMessageType('ServiceId', (_message.Message,), { - 'DESCRIPTOR' : _SERVICEID, - '__module__' : 'service_pb2' - # @@protoc_insertion_point(class_scope:service.ServiceId) - }) -_sym_db.RegisterMessage(ServiceId) - -ServiceIdList = _reflection.GeneratedProtocolMessageType('ServiceIdList', (_message.Message,), { - 'DESCRIPTOR' : _SERVICEIDLIST, - '__module__' : 'service_pb2' - # @@protoc_insertion_point(class_scope:service.ServiceIdList) - }) -_sym_db.RegisterMessage(ServiceIdList) - -ServiceState = _reflection.GeneratedProtocolMessageType('ServiceState', (_message.Message,), { - 'DESCRIPTOR' : _SERVICESTATE, - '__module__' : 'service_pb2' - # @@protoc_insertion_point(class_scope:service.ServiceState) - }) -_sym_db.RegisterMessage(ServiceState) - -ConnectionList = _reflection.GeneratedProtocolMessageType('ConnectionList', (_message.Message,), { - 'DESCRIPTOR' : _CONNECTIONLIST, - '__module__' : 'service_pb2' - # @@protoc_insertion_point(class_scope:service.ConnectionList) - }) -_sym_db.RegisterMessage(ConnectionList) - -Connection = _reflection.GeneratedProtocolMessageType('Connection', (_message.Message,), { - 'DESCRIPTOR' : _CONNECTION, - '__module__' : 'service_pb2' - # @@protoc_insertion_point(class_scope:service.Connection) - }) -_sym_db.RegisterMessage(Connection) - -ConnectionId = _reflection.GeneratedProtocolMessageType('ConnectionId', (_message.Message,), { - 'DESCRIPTOR' : _CONNECTIONID, - '__module__' : 'service_pb2' - # @@protoc_insertion_point(class_scope:service.ConnectionId) - }) -_sym_db.RegisterMessage(ConnectionId) - - - -_SERVICESERVICE = _descriptor.ServiceDescriptor( - name='ServiceService', - full_name='service.ServiceService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=990, - serialized_end=1357, - methods=[ - _descriptor.MethodDescriptor( - name='GetServiceList', - full_name='service.ServiceService.GetServiceList', - index=0, - containing_service=None, - input_type=context__pb2._EMPTY, - output_type=_SERVICELIST, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='CreateService', - full_name='service.ServiceService.CreateService', - index=1, - containing_service=None, - input_type=_SERVICE, - output_type=_SERVICEID, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='UpdateService', - full_name='service.ServiceService.UpdateService', - index=2, - containing_service=None, - input_type=_SERVICE, - output_type=_SERVICEID, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='DeleteService', - full_name='service.ServiceService.DeleteService', - index=3, - containing_service=None, - input_type=_SERVICE, - output_type=_SERVICEID, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetServiceById', - full_name='service.ServiceService.GetServiceById', - index=4, - containing_service=None, - input_type=_SERVICEID, - output_type=_SERVICE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetConnectionList', - full_name='service.ServiceService.GetConnectionList', - index=5, - containing_service=None, - input_type=context__pb2._EMPTY, - output_type=_CONNECTIONLIST, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_SERVICESERVICE) - -DESCRIPTOR.services_by_name['ServiceService'] = _SERVICESERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/service_pb2_grpc.py b/proto/src/service_pb2_grpc.py deleted file mode 100644 index 473364431b3d8ac83b6b726e37683d34bda77a3a..0000000000000000000000000000000000000000 --- a/proto/src/service_pb2_grpc.py +++ /dev/null @@ -1,132 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 -import service_pb2 as service__pb2 - - -class ServiceServiceStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.GetServiceList = channel.unary_unary( - '/service.ServiceService/GetServiceList', - request_serializer=context__pb2.Empty.SerializeToString, - response_deserializer=service__pb2.ServiceList.FromString, - ) - self.CreateService = channel.unary_unary( - '/service.ServiceService/CreateService', - request_serializer=service__pb2.Service.SerializeToString, - response_deserializer=service__pb2.ServiceId.FromString, - ) - self.UpdateService = channel.unary_unary( - '/service.ServiceService/UpdateService', - request_serializer=service__pb2.Service.SerializeToString, - response_deserializer=service__pb2.ServiceId.FromString, - ) - self.DeleteService = channel.unary_unary( - '/service.ServiceService/DeleteService', - request_serializer=service__pb2.Service.SerializeToString, - response_deserializer=service__pb2.ServiceId.FromString, - ) - self.GetServiceById = channel.unary_unary( - '/service.ServiceService/GetServiceById', - request_serializer=service__pb2.ServiceId.SerializeToString, - response_deserializer=service__pb2.Service.FromString, - ) - self.GetConnectionList = channel.unary_unary( - '/service.ServiceService/GetConnectionList', - request_serializer=context__pb2.Empty.SerializeToString, - response_deserializer=service__pb2.ConnectionList.FromString, - ) - - -class ServiceServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def GetServiceList(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CreateService(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - 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 - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetServiceById(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetConnectionList(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 = { - 'GetServiceList': grpc.unary_unary_rpc_method_handler( - servicer.GetServiceList, - request_deserializer=context__pb2.Empty.FromString, - response_serializer=service__pb2.ServiceList.SerializeToString, - ), - 'CreateService': grpc.unary_unary_rpc_method_handler( - servicer.CreateService, - request_deserializer=service__pb2.Service.FromString, - response_serializer=service__pb2.ServiceId.SerializeToString, - ), - 'UpdateService': grpc.unary_unary_rpc_method_handler( - servicer.UpdateService, - request_deserializer=service__pb2.Service.FromString, - response_serializer=service__pb2.ServiceId.SerializeToString, - ), - 'DeleteService': grpc.unary_unary_rpc_method_handler( - servicer.DeleteService, - request_deserializer=service__pb2.Service.FromString, - response_serializer=service__pb2.ServiceId.SerializeToString, - ), - 'GetServiceById': grpc.unary_unary_rpc_method_handler( - servicer.GetServiceById, - request_deserializer=service__pb2.ServiceId.FromString, - response_serializer=service__pb2.Service.SerializeToString, - ), - 'GetConnectionList': grpc.unary_unary_rpc_method_handler( - servicer.GetConnectionList, - request_deserializer=context__pb2.Empty.FromString, - response_serializer=service__pb2.ConnectionList.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'service.ServiceService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) diff --git a/proto/src/slice_pb2.py b/proto/src/slice_pb2.py deleted file mode 100644 index 8d93c77c9522ead02844633b453e20e54bf7915a..0000000000000000000000000000000000000000 --- a/proto/src/slice_pb2.py +++ /dev/null @@ -1,320 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: slice.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -import context_pb2 as context__pb2 -import service_pb2 as service__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='slice.proto', - package='slice', - syntax='proto3', - serialized_options=None, - serialized_pb=_b('\n\x0bslice.proto\x12\x05slice\x1a\rcontext.proto\x1a\rservice.proto\"3\n\rSliceEndpoint\x12\"\n\x07port_id\x18\x01 \x01(\x0b\x32\x11.context.EndPoint\"\xf4\x01\n\x0eTransportSlice\x12 \n\x08slice_id\x18\x01 \x01(\x0b\x32\x0e.slice.SliceId\x12\'\n\tendpoints\x18\x02 \x03(\x0b\x32\x14.slice.SliceEndpoint\x12(\n\x0b\x63onstraints\x18\x03 \x03(\x0b\x32\x13.context.Constraint\x12$\n\x08services\x18\x04 \x03(\x0b\x32\x12.service.ServiceId\x12#\n\x0bsubSlicesId\x18\x05 \x03(\x0b\x32\x0e.slice.SliceId\x12\"\n\x06status\x18\x06 \x01(\x0b\x32\x12.slice.SliceStatus\"Q\n\x07SliceId\x12%\n\tcontextId\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x1f\n\x08slice_id\x18\x02 \x01(\x0b\x32\r.context.Uuid\"W\n\x0bSliceStatus\x12 \n\x08slice_id\x18\x01 \x01(\x0b\x32\x0e.slice.SliceId\x12&\n\x06status\x18\x02 \x01(\x0e\x32\x16.slice.SliceStatusEnum*@\n\x0fSliceStatusEnum\x12\x0b\n\x07PLANNED\x10\x00\x12\x08\n\x04INIT\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\n\n\x06\x44\x45INIT\x10\x03\x32\x88\x01\n\x0cSliceService\x12@\n\x11\x43reateUpdateSlice\x12\x15.slice.TransportSlice\x1a\x12.slice.SliceStatus\"\x00\x12\x36\n\x0b\x44\x65leteSlice\x12\x15.slice.TransportSlice\x1a\x0e.context.Empty\"\x00\x62\x06proto3') - , - dependencies=[context__pb2.DESCRIPTOR,service__pb2.DESCRIPTOR,]) - -_SLICESTATUSENUM = _descriptor.EnumDescriptor( - name='SliceStatusEnum', - full_name='slice.SliceStatusEnum', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='PLANNED', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='INIT', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='ACTIVE', index=2, number=2, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='DEINIT', index=3, number=3, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=524, - serialized_end=588, -) -_sym_db.RegisterEnumDescriptor(_SLICESTATUSENUM) - -SliceStatusEnum = enum_type_wrapper.EnumTypeWrapper(_SLICESTATUSENUM) -PLANNED = 0 -INIT = 1 -ACTIVE = 2 -DEINIT = 3 - - - -_SLICEENDPOINT = _descriptor.Descriptor( - name='SliceEndpoint', - full_name='slice.SliceEndpoint', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='port_id', full_name='slice.SliceEndpoint.port_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=52, - serialized_end=103, -) - - -_TRANSPORTSLICE = _descriptor.Descriptor( - name='TransportSlice', - full_name='slice.TransportSlice', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='slice_id', full_name='slice.TransportSlice.slice_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='endpoints', full_name='slice.TransportSlice.endpoints', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='constraints', full_name='slice.TransportSlice.constraints', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='services', full_name='slice.TransportSlice.services', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='subSlicesId', full_name='slice.TransportSlice.subSlicesId', index=4, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='status', full_name='slice.TransportSlice.status', index=5, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=106, - serialized_end=350, -) - - -_SLICEID = _descriptor.Descriptor( - name='SliceId', - full_name='slice.SliceId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='contextId', full_name='slice.SliceId.contextId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='slice_id', full_name='slice.SliceId.slice_id', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=352, - serialized_end=433, -) - - -_SLICESTATUS = _descriptor.Descriptor( - name='SliceStatus', - full_name='slice.SliceStatus', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='slice_id', full_name='slice.SliceStatus.slice_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='status', full_name='slice.SliceStatus.status', index=1, - number=2, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=435, - serialized_end=522, -) - -_SLICEENDPOINT.fields_by_name['port_id'].message_type = context__pb2._ENDPOINT -_TRANSPORTSLICE.fields_by_name['slice_id'].message_type = _SLICEID -_TRANSPORTSLICE.fields_by_name['endpoints'].message_type = _SLICEENDPOINT -_TRANSPORTSLICE.fields_by_name['constraints'].message_type = context__pb2._CONSTRAINT -_TRANSPORTSLICE.fields_by_name['services'].message_type = service__pb2._SERVICEID -_TRANSPORTSLICE.fields_by_name['subSlicesId'].message_type = _SLICEID -_TRANSPORTSLICE.fields_by_name['status'].message_type = _SLICESTATUS -_SLICEID.fields_by_name['contextId'].message_type = context__pb2._CONTEXTID -_SLICEID.fields_by_name['slice_id'].message_type = context__pb2._UUID -_SLICESTATUS.fields_by_name['slice_id'].message_type = _SLICEID -_SLICESTATUS.fields_by_name['status'].enum_type = _SLICESTATUSENUM -DESCRIPTOR.message_types_by_name['SliceEndpoint'] = _SLICEENDPOINT -DESCRIPTOR.message_types_by_name['TransportSlice'] = _TRANSPORTSLICE -DESCRIPTOR.message_types_by_name['SliceId'] = _SLICEID -DESCRIPTOR.message_types_by_name['SliceStatus'] = _SLICESTATUS -DESCRIPTOR.enum_types_by_name['SliceStatusEnum'] = _SLICESTATUSENUM -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -SliceEndpoint = _reflection.GeneratedProtocolMessageType('SliceEndpoint', (_message.Message,), { - 'DESCRIPTOR' : _SLICEENDPOINT, - '__module__' : 'slice_pb2' - # @@protoc_insertion_point(class_scope:slice.SliceEndpoint) - }) -_sym_db.RegisterMessage(SliceEndpoint) - -TransportSlice = _reflection.GeneratedProtocolMessageType('TransportSlice', (_message.Message,), { - 'DESCRIPTOR' : _TRANSPORTSLICE, - '__module__' : 'slice_pb2' - # @@protoc_insertion_point(class_scope:slice.TransportSlice) - }) -_sym_db.RegisterMessage(TransportSlice) - -SliceId = _reflection.GeneratedProtocolMessageType('SliceId', (_message.Message,), { - 'DESCRIPTOR' : _SLICEID, - '__module__' : 'slice_pb2' - # @@protoc_insertion_point(class_scope:slice.SliceId) - }) -_sym_db.RegisterMessage(SliceId) - -SliceStatus = _reflection.GeneratedProtocolMessageType('SliceStatus', (_message.Message,), { - 'DESCRIPTOR' : _SLICESTATUS, - '__module__' : 'slice_pb2' - # @@protoc_insertion_point(class_scope:slice.SliceStatus) - }) -_sym_db.RegisterMessage(SliceStatus) - - - -_SLICESERVICE = _descriptor.ServiceDescriptor( - name='SliceService', - full_name='slice.SliceService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=591, - serialized_end=727, - methods=[ - _descriptor.MethodDescriptor( - name='CreateUpdateSlice', - full_name='slice.SliceService.CreateUpdateSlice', - index=0, - containing_service=None, - input_type=_TRANSPORTSLICE, - output_type=_SLICESTATUS, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='DeleteSlice', - full_name='slice.SliceService.DeleteSlice', - index=1, - containing_service=None, - input_type=_TRANSPORTSLICE, - output_type=context__pb2._EMPTY, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_SLICESERVICE) - -DESCRIPTOR.services_by_name['SliceService'] = _SLICESERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/proto/src/slice_pb2_grpc.py b/proto/src/slice_pb2_grpc.py deleted file mode 100644 index e191ecaf25e89279aca1a59774e6344de91a2c2c..0000000000000000000000000000000000000000 --- a/proto/src/slice_pb2_grpc.py +++ /dev/null @@ -1,64 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -import grpc - -import context_pb2 as context__pb2 -import slice_pb2 as slice__pb2 - - -class SliceServiceStub(object): - # missing associated documentation comment in .proto file - pass - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.CreateUpdateSlice = channel.unary_unary( - '/slice.SliceService/CreateUpdateSlice', - request_serializer=slice__pb2.TransportSlice.SerializeToString, - response_deserializer=slice__pb2.SliceStatus.FromString, - ) - self.DeleteSlice = channel.unary_unary( - '/slice.SliceService/DeleteSlice', - request_serializer=slice__pb2.TransportSlice.SerializeToString, - response_deserializer=context__pb2.Empty.FromString, - ) - - -class SliceServiceServicer(object): - # missing associated documentation comment in .proto file - pass - - def CreateUpdateSlice(self, request, context): - # missing associated documentation comment in .proto file - pass - 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 - pass - 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 = { - 'CreateUpdateSlice': grpc.unary_unary_rpc_method_handler( - servicer.CreateUpdateSlice, - request_deserializer=slice__pb2.TransportSlice.FromString, - response_serializer=slice__pb2.SliceStatus.SerializeToString, - ), - 'DeleteSlice': grpc.unary_unary_rpc_method_handler( - servicer.DeleteSlice, - request_deserializer=slice__pb2.TransportSlice.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,)) diff --git a/src/monitoring/monitoring_client.py b/src/monitoring/client/monitoring_client.py similarity index 100% rename from src/monitoring/monitoring_client.py rename to src/monitoring/client/monitoring_client.py diff --git a/src/monitoring/context_pb2.py b/src/monitoring/context_pb2.py deleted file mode 100644 index e4acb11a579694017d1ee5572f1f94848731802a..0000000000000000000000000000000000000000 --- a/src/monitoring/context_pb2.py +++ /dev/null @@ -1,805 +0,0 @@ -# -*- 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 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.FileDescriptor( - name='context.proto', - package='context', - syntax='proto3', - serialized_options=None, - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\rcontext.proto\x12\x07\x63ontext\"\x07\n\x05\x45mpty\"{\n\x07\x43ontext\x12%\n\tcontextId\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x1f\n\x04topo\x18\x02 \x01(\x0b\x32\x11.context.Topology\x12(\n\x03\x63tl\x18\x03 \x01(\x0b\x32\x1b.context.TeraFlowController\"/\n\tContextId\x12\"\n\x0b\x63ontextUuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\"m\n\x08Topology\x12#\n\x06topoId\x18\x02 \x01(\x0b\x32\x13.context.TopologyId\x12\x1f\n\x06\x64\x65vice\x18\x03 \x03(\x0b\x32\x0f.context.Device\x12\x1b\n\x04link\x18\x04 \x03(\x0b\x32\r.context.Link\"1\n\x04Link\x12)\n\x0c\x65ndpointList\x18\x01 \x03(\x0b\x32\x13.context.EndPointId\"R\n\nTopologyId\x12%\n\tcontextId\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x1d\n\x06topoId\x18\x02 \x01(\x0b\x32\r.context.Uuid\"?\n\nConstraint\x12\x17\n\x0f\x63onstraint_type\x18\x01 \x01(\t\x12\x18\n\x10\x63onstraint_value\x18\x02 \x01(\t\"\xda\x01\n\x06\x44\x65vice\x12$\n\tdevice_id\x18\x01 \x01(\x0b\x32\x11.context.DeviceId\x12\x13\n\x0b\x64\x65vice_type\x18\x02 \x01(\t\x12,\n\rdevice_config\x18\x03 \x01(\x0b\x32\x15.context.DeviceConfig\x12>\n\x14\x64\x65vOperationalStatus\x18\x04 \x01(\x0e\x32 .context.DeviceOperationalStatus\x12\'\n\x0c\x65ndpointList\x18\x05 \x03(\x0b\x32\x11.context.EndPoint\"%\n\x0c\x44\x65viceConfig\x12\x15\n\rdevice_config\x18\x01 \x01(\t\"C\n\x08\x45ndPoint\x12$\n\x07port_id\x18\x01 \x01(\x0b\x32\x13.context.EndPointId\x12\x11\n\tport_type\x18\x02 \x01(\t\"t\n\nEndPointId\x12#\n\x06topoId\x18\x01 \x01(\x0b\x32\x13.context.TopologyId\x12!\n\x06\x64\x65v_id\x18\x02 \x01(\x0b\x32\x11.context.DeviceId\x12\x1e\n\x07port_id\x18\x03 \x01(\x0b\x32\r.context.Uuid\",\n\x08\x44\x65viceId\x12 \n\tdevice_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"\x14\n\x04Uuid\x12\x0c\n\x04uuid\x18\x01 \x01(\t\"K\n\x12TeraFlowController\x12\"\n\x06\x63tl_id\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x11\n\tipaddress\x18\x02 \x01(\t\"Q\n\x14\x41uthenticationResult\x12\"\n\x06\x63tl_id\x18\x01 \x01(\x0b\x32\x12.context.ContextId\x12\x15\n\rauthenticated\x18\x02 \x01(\x08*4\n\x17\x44\x65viceOperationalStatus\x12\x0c\n\x08\x44ISABLED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x32\x44\n\x0e\x43ontextService\x12\x32\n\x0bGetTopology\x12\x0e.context.Empty\x1a\x11.context.Topology\"\x00\x62\x06proto3' -) - -_DEVICEOPERATIONALSTATUS = _descriptor.EnumDescriptor( - name='DeviceOperationalStatus', - full_name='context.DeviceOperationalStatus', - filename=None, - file=DESCRIPTOR, - create_key=_descriptor._internal_create_key, - values=[ - _descriptor.EnumValueDescriptor( - name='DISABLED', index=0, number=0, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - _descriptor.EnumValueDescriptor( - name='ENABLED', index=1, number=1, - serialized_options=None, - type=None, - create_key=_descriptor._internal_create_key), - ], - containing_type=None, - serialized_options=None, - serialized_start=1195, - serialized_end=1247, -) -_sym_db.RegisterEnumDescriptor(_DEVICEOPERATIONALSTATUS) - -DeviceOperationalStatus = enum_type_wrapper.EnumTypeWrapper(_DEVICEOPERATIONALSTATUS) -DISABLED = 0 -ENABLED = 1 - - - -_EMPTY = _descriptor.Descriptor( - name='Empty', - full_name='context.Empty', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=26, - serialized_end=33, -) - - -_CONTEXT = _descriptor.Descriptor( - name='Context', - full_name='context.Context', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='contextId', full_name='context.Context.contextId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='topo', full_name='context.Context.topo', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ctl', full_name='context.Context.ctl', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=35, - serialized_end=158, -) - - -_CONTEXTID = _descriptor.Descriptor( - name='ContextId', - full_name='context.ContextId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='contextUuid', full_name='context.ContextId.contextUuid', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=160, - serialized_end=207, -) - - -_TOPOLOGY = _descriptor.Descriptor( - name='Topology', - full_name='context.Topology', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='topoId', full_name='context.Topology.topoId', index=0, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='device', full_name='context.Topology.device', index=1, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='link', full_name='context.Topology.link', index=2, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=209, - serialized_end=318, -) - - -_LINK = _descriptor.Descriptor( - name='Link', - full_name='context.Link', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='endpointList', full_name='context.Link.endpointList', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=320, - serialized_end=369, -) - - -_TOPOLOGYID = _descriptor.Descriptor( - name='TopologyId', - full_name='context.TopologyId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='contextId', full_name='context.TopologyId.contextId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='topoId', full_name='context.TopologyId.topoId', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=371, - serialized_end=453, -) - - -_CONSTRAINT = _descriptor.Descriptor( - name='Constraint', - full_name='context.Constraint', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='constraint_type', full_name='context.Constraint.constraint_type', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='constraint_value', full_name='context.Constraint.constraint_value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=455, - serialized_end=518, -) - - -_DEVICE = _descriptor.Descriptor( - name='Device', - full_name='context.Device', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='device_id', full_name='context.Device.device_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='device_type', full_name='context.Device.device_type', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='device_config', full_name='context.Device.device_config', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='devOperationalStatus', full_name='context.Device.devOperationalStatus', index=3, - number=4, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='endpointList', full_name='context.Device.endpointList', index=4, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=521, - serialized_end=739, -) - - -_DEVICECONFIG = _descriptor.Descriptor( - name='DeviceConfig', - full_name='context.DeviceConfig', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='device_config', full_name='context.DeviceConfig.device_config', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=741, - serialized_end=778, -) - - -_ENDPOINT = _descriptor.Descriptor( - name='EndPoint', - full_name='context.EndPoint', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='port_id', full_name='context.EndPoint.port_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='port_type', full_name='context.EndPoint.port_type', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=780, - serialized_end=847, -) - - -_ENDPOINTID = _descriptor.Descriptor( - name='EndPointId', - full_name='context.EndPointId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='topoId', full_name='context.EndPointId.topoId', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='dev_id', full_name='context.EndPointId.dev_id', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='port_id', full_name='context.EndPointId.port_id', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=849, - serialized_end=965, -) - - -_DEVICEID = _descriptor.Descriptor( - name='DeviceId', - full_name='context.DeviceId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='device_id', full_name='context.DeviceId.device_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=967, - serialized_end=1011, -) - - -_UUID = _descriptor.Descriptor( - name='Uuid', - full_name='context.Uuid', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='uuid', full_name='context.Uuid.uuid', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1013, - serialized_end=1033, -) - - -_TERAFLOWCONTROLLER = _descriptor.Descriptor( - name='TeraFlowController', - full_name='context.TeraFlowController', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='ctl_id', full_name='context.TeraFlowController.ctl_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='ipaddress', full_name='context.TeraFlowController.ipaddress', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1035, - serialized_end=1110, -) - - -_AUTHENTICATIONRESULT = _descriptor.Descriptor( - name='AuthenticationResult', - full_name='context.AuthenticationResult', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='ctl_id', full_name='context.AuthenticationResult.ctl_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='authenticated', full_name='context.AuthenticationResult.authenticated', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1112, - serialized_end=1193, -) - -_CONTEXT.fields_by_name['contextId'].message_type = _CONTEXTID -_CONTEXT.fields_by_name['topo'].message_type = _TOPOLOGY -_CONTEXT.fields_by_name['ctl'].message_type = _TERAFLOWCONTROLLER -_CONTEXTID.fields_by_name['contextUuid'].message_type = _UUID -_TOPOLOGY.fields_by_name['topoId'].message_type = _TOPOLOGYID -_TOPOLOGY.fields_by_name['device'].message_type = _DEVICE -_TOPOLOGY.fields_by_name['link'].message_type = _LINK -_LINK.fields_by_name['endpointList'].message_type = _ENDPOINTID -_TOPOLOGYID.fields_by_name['contextId'].message_type = _CONTEXTID -_TOPOLOGYID.fields_by_name['topoId'].message_type = _UUID -_DEVICE.fields_by_name['device_id'].message_type = _DEVICEID -_DEVICE.fields_by_name['device_config'].message_type = _DEVICECONFIG -_DEVICE.fields_by_name['devOperationalStatus'].enum_type = _DEVICEOPERATIONALSTATUS -_DEVICE.fields_by_name['endpointList'].message_type = _ENDPOINT -_ENDPOINT.fields_by_name['port_id'].message_type = _ENDPOINTID -_ENDPOINTID.fields_by_name['topoId'].message_type = _TOPOLOGYID -_ENDPOINTID.fields_by_name['dev_id'].message_type = _DEVICEID -_ENDPOINTID.fields_by_name['port_id'].message_type = _UUID -_DEVICEID.fields_by_name['device_id'].message_type = _UUID -_TERAFLOWCONTROLLER.fields_by_name['ctl_id'].message_type = _CONTEXTID -_AUTHENTICATIONRESULT.fields_by_name['ctl_id'].message_type = _CONTEXTID -DESCRIPTOR.message_types_by_name['Empty'] = _EMPTY -DESCRIPTOR.message_types_by_name['Context'] = _CONTEXT -DESCRIPTOR.message_types_by_name['ContextId'] = _CONTEXTID -DESCRIPTOR.message_types_by_name['Topology'] = _TOPOLOGY -DESCRIPTOR.message_types_by_name['Link'] = _LINK -DESCRIPTOR.message_types_by_name['TopologyId'] = _TOPOLOGYID -DESCRIPTOR.message_types_by_name['Constraint'] = _CONSTRAINT -DESCRIPTOR.message_types_by_name['Device'] = _DEVICE -DESCRIPTOR.message_types_by_name['DeviceConfig'] = _DEVICECONFIG -DESCRIPTOR.message_types_by_name['EndPoint'] = _ENDPOINT -DESCRIPTOR.message_types_by_name['EndPointId'] = _ENDPOINTID -DESCRIPTOR.message_types_by_name['DeviceId'] = _DEVICEID -DESCRIPTOR.message_types_by_name['Uuid'] = _UUID -DESCRIPTOR.message_types_by_name['TeraFlowController'] = _TERAFLOWCONTROLLER -DESCRIPTOR.message_types_by_name['AuthenticationResult'] = _AUTHENTICATIONRESULT -DESCRIPTOR.enum_types_by_name['DeviceOperationalStatus'] = _DEVICEOPERATIONALSTATUS -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), { - 'DESCRIPTOR' : _EMPTY, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Empty) - }) -_sym_db.RegisterMessage(Empty) - -Context = _reflection.GeneratedProtocolMessageType('Context', (_message.Message,), { - 'DESCRIPTOR' : _CONTEXT, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Context) - }) -_sym_db.RegisterMessage(Context) - -ContextId = _reflection.GeneratedProtocolMessageType('ContextId', (_message.Message,), { - 'DESCRIPTOR' : _CONTEXTID, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.ContextId) - }) -_sym_db.RegisterMessage(ContextId) - -Topology = _reflection.GeneratedProtocolMessageType('Topology', (_message.Message,), { - 'DESCRIPTOR' : _TOPOLOGY, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Topology) - }) -_sym_db.RegisterMessage(Topology) - -Link = _reflection.GeneratedProtocolMessageType('Link', (_message.Message,), { - 'DESCRIPTOR' : _LINK, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Link) - }) -_sym_db.RegisterMessage(Link) - -TopologyId = _reflection.GeneratedProtocolMessageType('TopologyId', (_message.Message,), { - 'DESCRIPTOR' : _TOPOLOGYID, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.TopologyId) - }) -_sym_db.RegisterMessage(TopologyId) - -Constraint = _reflection.GeneratedProtocolMessageType('Constraint', (_message.Message,), { - 'DESCRIPTOR' : _CONSTRAINT, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Constraint) - }) -_sym_db.RegisterMessage(Constraint) - -Device = _reflection.GeneratedProtocolMessageType('Device', (_message.Message,), { - 'DESCRIPTOR' : _DEVICE, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Device) - }) -_sym_db.RegisterMessage(Device) - -DeviceConfig = _reflection.GeneratedProtocolMessageType('DeviceConfig', (_message.Message,), { - 'DESCRIPTOR' : _DEVICECONFIG, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.DeviceConfig) - }) -_sym_db.RegisterMessage(DeviceConfig) - -EndPoint = _reflection.GeneratedProtocolMessageType('EndPoint', (_message.Message,), { - 'DESCRIPTOR' : _ENDPOINT, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.EndPoint) - }) -_sym_db.RegisterMessage(EndPoint) - -EndPointId = _reflection.GeneratedProtocolMessageType('EndPointId', (_message.Message,), { - 'DESCRIPTOR' : _ENDPOINTID, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.EndPointId) - }) -_sym_db.RegisterMessage(EndPointId) - -DeviceId = _reflection.GeneratedProtocolMessageType('DeviceId', (_message.Message,), { - 'DESCRIPTOR' : _DEVICEID, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.DeviceId) - }) -_sym_db.RegisterMessage(DeviceId) - -Uuid = _reflection.GeneratedProtocolMessageType('Uuid', (_message.Message,), { - 'DESCRIPTOR' : _UUID, - '__module__' : 'context_pb2' - # @@protoc_insertion_point(class_scope:context.Uuid) - }) -_sym_db.RegisterMessage(Uuid) - -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) - - - -_CONTEXTSERVICE = _descriptor.ServiceDescriptor( - name='ContextService', - full_name='context.ContextService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - create_key=_descriptor._internal_create_key, - serialized_start=1249, - serialized_end=1317, - methods=[ - _descriptor.MethodDescriptor( - name='GetTopology', - full_name='context.ContextService.GetTopology', - index=0, - containing_service=None, - input_type=_EMPTY, - output_type=_TOPOLOGY, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), -]) -_sym_db.RegisterServiceDescriptor(_CONTEXTSERVICE) - -DESCRIPTOR.services_by_name['ContextService'] = _CONTEXTSERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/src/monitoring/context_pb2_grpc.py b/src/monitoring/context_pb2_grpc.py deleted file mode 100644 index 262835313921800de8c293a12820bdec0381a771..0000000000000000000000000000000000000000 --- a/src/monitoring/context_pb2_grpc.py +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - -from . 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.GetTopology = channel.unary_unary( - '/context.ContextService/GetTopology', - request_serializer=context__pb2.Empty.SerializeToString, - response_deserializer=context__pb2.Topology.FromString, - ) - - -class ContextServiceServicer(object): - """Missing associated documentation comment in .proto file.""" - - 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 add_ContextServiceServicer_to_server(servicer, server): - rpc_method_handlers = { - 'GetTopology': grpc.unary_unary_rpc_method_handler( - servicer.GetTopology, - request_deserializer=context__pb2.Empty.FromString, - response_serializer=context__pb2.Topology.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 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.Empty.SerializeToString, - context__pb2.Topology.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/monitoring/monitoring_pb2.py b/src/monitoring/monitoring_pb2.py deleted file mode 100644 index 32394e232c196c4189a1e5c147980a66d6f8d34d..0000000000000000000000000000000000000000 --- a/src/monitoring/monitoring_pb2.py +++ /dev/null @@ -1,350 +0,0 @@ -# -*- 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 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() - - -from . import context_pb2 as context__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='monitoring.proto', - package='monitoring', - syntax='proto3', - serialized_options=None, - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x10monitoring.proto\x12\nmonitoring\x1a\rcontext.proto\"|\n\x03Kpi\x12!\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x11.monitoring.KpiId\x12\x11\n\ttimestamp\x18\x02 \x01(\t\x12\x16\n\x0ekpiDescription\x18\x03 \x01(\t\x12\'\n\tkpi_value\x18\x04 \x01(\x0b\x32\x14.monitoring.KpiValue\"&\n\x05KpiId\x12\x1d\n\x06kpi_id\x18\x01 \x01(\x0b\x32\r.context.Uuid\"T\n\tKpiDevice\x12!\n\x06kpi_id\x18\x01 \x01(\x0b\x32\x11.monitoring.KpiId\x12$\n\tdevice_id\x18\x02 \x01(\x0b\x32\x11.context.DeviceId\"+\n\x07KpiList\x12 \n\x07kpiList\x18\x01 \x03(\x0b\x32\x0f.monitoring.Kpi\"M\n\x08KpiValue\x12\x10\n\x06intVal\x18\x01 \x01(\rH\x00\x12\x13\n\tstringVal\x18\x02 \x01(\tH\x00\x12\x11\n\x07\x62oolVal\x18\x03 \x01(\x08H\x00\x42\x07\n\x05value2\xeb\x01\n\x11MonitoringService\x12/\n\nIncludeKpi\x12\x0f.monitoring.Kpi\x1a\x0e.context.Empty\"\x00\x12\x35\n\nMonitorKpi\x12\x15.monitoring.KpiDevice\x1a\x0e.context.Empty\"\x00\x12\x37\n\rGetStream_kpi\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' - , - dependencies=[context__pb2.DESCRIPTOR,]) - - - - -_KPI = _descriptor.Descriptor( - name='Kpi', - full_name='monitoring.Kpi', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='kpi_id', full_name='monitoring.Kpi.kpi_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='timestamp', full_name='monitoring.Kpi.timestamp', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='kpiDescription', full_name='monitoring.Kpi.kpiDescription', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='kpi_value', full_name='monitoring.Kpi.kpi_value', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=47, - serialized_end=171, -) - - -_KPIID = _descriptor.Descriptor( - name='KpiId', - full_name='monitoring.KpiId', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='kpi_id', full_name='monitoring.KpiId.kpi_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=173, - serialized_end=211, -) - - -_KPIDEVICE = _descriptor.Descriptor( - name='KpiDevice', - full_name='monitoring.KpiDevice', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='kpi_id', full_name='monitoring.KpiDevice.kpi_id', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='device_id', full_name='monitoring.KpiDevice.device_id', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=213, - serialized_end=297, -) - - -_KPILIST = _descriptor.Descriptor( - name='KpiList', - full_name='monitoring.KpiList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='kpiList', full_name='monitoring.KpiList.kpiList', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=299, - serialized_end=342, -) - - -_KPIVALUE = _descriptor.Descriptor( - name='KpiValue', - full_name='monitoring.KpiValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='intVal', full_name='monitoring.KpiValue.intVal', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='stringVal', full_name='monitoring.KpiValue.stringVal', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='boolVal', full_name='monitoring.KpiValue.boolVal', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='value', full_name='monitoring.KpiValue.value', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=344, - serialized_end=421, -) - -_KPI.fields_by_name['kpi_id'].message_type = _KPIID -_KPI.fields_by_name['kpi_value'].message_type = _KPIVALUE -_KPIID.fields_by_name['kpi_id'].message_type = context__pb2._UUID -_KPIDEVICE.fields_by_name['kpi_id'].message_type = _KPIID -_KPIDEVICE.fields_by_name['device_id'].message_type = context__pb2._DEVICEID -_KPILIST.fields_by_name['kpiList'].message_type = _KPI -_KPIVALUE.oneofs_by_name['value'].fields.append( - _KPIVALUE.fields_by_name['intVal']) -_KPIVALUE.fields_by_name['intVal'].containing_oneof = _KPIVALUE.oneofs_by_name['value'] -_KPIVALUE.oneofs_by_name['value'].fields.append( - _KPIVALUE.fields_by_name['stringVal']) -_KPIVALUE.fields_by_name['stringVal'].containing_oneof = _KPIVALUE.oneofs_by_name['value'] -_KPIVALUE.oneofs_by_name['value'].fields.append( - _KPIVALUE.fields_by_name['boolVal']) -_KPIVALUE.fields_by_name['boolVal'].containing_oneof = _KPIVALUE.oneofs_by_name['value'] -DESCRIPTOR.message_types_by_name['Kpi'] = _KPI -DESCRIPTOR.message_types_by_name['KpiId'] = _KPIID -DESCRIPTOR.message_types_by_name['KpiDevice'] = _KPIDEVICE -DESCRIPTOR.message_types_by_name['KpiList'] = _KPILIST -DESCRIPTOR.message_types_by_name['KpiValue'] = _KPIVALUE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Kpi = _reflection.GeneratedProtocolMessageType('Kpi', (_message.Message,), { - 'DESCRIPTOR' : _KPI, - '__module__' : 'monitoring_pb2' - # @@protoc_insertion_point(class_scope:monitoring.Kpi) - }) -_sym_db.RegisterMessage(Kpi) - -KpiId = _reflection.GeneratedProtocolMessageType('KpiId', (_message.Message,), { - 'DESCRIPTOR' : _KPIID, - '__module__' : 'monitoring_pb2' - # @@protoc_insertion_point(class_scope:monitoring.KpiId) - }) -_sym_db.RegisterMessage(KpiId) - -KpiDevice = _reflection.GeneratedProtocolMessageType('KpiDevice', (_message.Message,), { - 'DESCRIPTOR' : _KPIDEVICE, - '__module__' : 'monitoring_pb2' - # @@protoc_insertion_point(class_scope:monitoring.KpiDevice) - }) -_sym_db.RegisterMessage(KpiDevice) - -KpiList = _reflection.GeneratedProtocolMessageType('KpiList', (_message.Message,), { - 'DESCRIPTOR' : _KPILIST, - '__module__' : 'monitoring_pb2' - # @@protoc_insertion_point(class_scope:monitoring.KpiList) - }) -_sym_db.RegisterMessage(KpiList) - -KpiValue = _reflection.GeneratedProtocolMessageType('KpiValue', (_message.Message,), { - 'DESCRIPTOR' : _KPIVALUE, - '__module__' : 'monitoring_pb2' - # @@protoc_insertion_point(class_scope:monitoring.KpiValue) - }) -_sym_db.RegisterMessage(KpiValue) - - - -_MONITORINGSERVICE = _descriptor.ServiceDescriptor( - name='MonitoringService', - full_name='monitoring.MonitoringService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - create_key=_descriptor._internal_create_key, - serialized_start=424, - serialized_end=659, - methods=[ - _descriptor.MethodDescriptor( - name='IncludeKpi', - full_name='monitoring.MonitoringService.IncludeKpi', - index=0, - containing_service=None, - input_type=_KPI, - output_type=context__pb2._EMPTY, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='MonitorKpi', - full_name='monitoring.MonitoringService.MonitorKpi', - index=1, - containing_service=None, - input_type=_KPIDEVICE, - output_type=context__pb2._EMPTY, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='GetStream_kpi', - full_name='monitoring.MonitoringService.GetStream_kpi', - index=2, - containing_service=None, - input_type=_KPIID, - output_type=_KPI, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), - _descriptor.MethodDescriptor( - name='GetInstantKpi', - full_name='monitoring.MonitoringService.GetInstantKpi', - index=3, - containing_service=None, - input_type=_KPIID, - output_type=_KPI, - serialized_options=None, - create_key=_descriptor._internal_create_key, - ), -]) -_sym_db.RegisterServiceDescriptor(_MONITORINGSERVICE) - -DESCRIPTOR.services_by_name['MonitoringService'] = _MONITORINGSERVICE - -# @@protoc_insertion_point(module_scope) diff --git a/src/monitoring/monitoring_pb2_grpc.py b/src/monitoring/monitoring_pb2_grpc.py deleted file mode 100644 index 2be807eee81ba23cb335e8830fb196c6f19f1425..0000000000000000000000000000000000000000 --- a/src/monitoring/monitoring_pb2_grpc.py +++ /dev/null @@ -1,166 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - -from . import context_pb2 as context__pb2 -from . 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.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.KpiDevice.SerializeToString, - response_deserializer=context__pb2.Empty.FromString, - ) - self.GetStream_kpi = channel.unary_stream( - '/monitoring.MonitoringService/GetStream_kpi', - 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 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 GetStream_kpi(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 = { - '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.KpiDevice.FromString, - response_serializer=context__pb2.Empty.SerializeToString, - ), - 'GetStream_kpi': grpc.unary_stream_rpc_method_handler( - servicer.GetStream_kpi, - 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 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.KpiDevice.SerializeToString, - context__pb2.Empty.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetStream_kpi(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/GetStream_kpi', - 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/src/monitoring/monitoring_server.py b/src/monitoring/service/monitoring_server.py similarity index 100% rename from src/monitoring/monitoring_server.py rename to src/monitoring/service/monitoring_server.py