From a70f6f9bb689ba3aae5694faad7ec4ff858cd523 Mon Sep 17 00:00:00 2001 From: Lluis Gifre <lluis.gifre@cttc.es> Date: Fri, 15 Jul 2022 09:11:14 +0000 Subject: [PATCH] Context component: - regenerated python code from proto files --- src/context/proto/acl_pb2_grpc.py | 4 - src/context/proto/context_pb2.py | 4 +- src/context/proto/context_pb2_grpc.py | 2 +- src/context/proto/context_policy_pb2.py | 99 +++ src/context/proto/context_policy_pb2_grpc.py | 202 ++++++ src/context/proto/kpi_sample_types_pb2.py | 78 +++ src/context/proto/policy_pb2.py | 654 +++++++++++++++++++ 7 files changed, 1036 insertions(+), 7 deletions(-) delete mode 100644 src/context/proto/acl_pb2_grpc.py create mode 100644 src/context/proto/context_policy_pb2.py create mode 100644 src/context/proto/context_policy_pb2_grpc.py create mode 100644 src/context/proto/kpi_sample_types_pb2.py create mode 100644 src/context/proto/policy_pb2.py diff --git a/src/context/proto/acl_pb2_grpc.py b/src/context/proto/acl_pb2_grpc.py deleted file mode 100644 index 2daafffeb..000000000 --- a/src/context/proto/acl_pb2_grpc.py +++ /dev/null @@ -1,4 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - diff --git a/src/context/proto/context_pb2.py b/src/context/proto/context_pb2.py index d4064fa4c..9ca466ed7 100644 --- a/src/context/proto/context_pb2.py +++ b/src/context/proto/context_pb2.py @@ -12,8 +12,8 @@ from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() -import acl_pb2 as acl__pb2 -import kpi_sample_types_pb2 as kpi__sample__types__pb2 +from . import acl_pb2 as acl__pb2 +from . import kpi_sample_types_pb2 as kpi__sample__types__pb2 DESCRIPTOR = _descriptor.FileDescriptor( diff --git a/src/context/proto/context_pb2_grpc.py b/src/context/proto/context_pb2_grpc.py index ecc01e111..8b30e91f3 100644 --- a/src/context/proto/context_pb2_grpc.py +++ b/src/context/proto/context_pb2_grpc.py @@ -2,7 +2,7 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -import context_pb2 as context__pb2 +from . import context_pb2 as context__pb2 class ContextServiceStub(object): diff --git a/src/context/proto/context_policy_pb2.py b/src/context/proto/context_policy_pb2.py new file mode 100644 index 000000000..94d9a2fae --- /dev/null +++ b/src/context/proto/context_policy_pb2.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: context-policy.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import 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 +from . import policy_pb2 as policy__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='context-policy.proto', + package='context_policy', + syntax='proto3', + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x14\x63ontext-policy.proto\x12\x0e\x63ontext_policy\x1a\rcontext.proto\x1a\x0cpolicy.proto2\xd4\x02\n\x14\x43ontextPolicyService\x12?\n\x11ListPolicyRuleIds\x12\x0e.context.Empty\x1a\x18.policy.PolicyRuleIdList\"\x00\x12;\n\x0fListPolicyRules\x12\x0e.context.Empty\x1a\x16.policy.PolicyRuleList\"\x00\x12@\n\rGetPolicyRule\x12\x14.policy.PolicyRuleId\x1a\x17.policy.PolicyRuleBasic\"\x00\x12@\n\rSetPolicyRule\x12\x17.policy.PolicyRuleBasic\x1a\x14.policy.PolicyRuleId\"\x00\x12:\n\x10RemovePolicyRule\x12\x14.policy.PolicyRuleId\x1a\x0e.context.Empty\"\x00\x62\x06proto3' + , + dependencies=[context__pb2.DESCRIPTOR,policy__pb2.DESCRIPTOR,]) + + + +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + + +_CONTEXTPOLICYSERVICE = _descriptor.ServiceDescriptor( + name='ContextPolicyService', + full_name='context_policy.ContextPolicyService', + file=DESCRIPTOR, + index=0, + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_start=70, + serialized_end=410, + methods=[ + _descriptor.MethodDescriptor( + name='ListPolicyRuleIds', + full_name='context_policy.ContextPolicyService.ListPolicyRuleIds', + index=0, + containing_service=None, + input_type=context__pb2._EMPTY, + output_type=policy__pb2._POLICYRULEIDLIST, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='ListPolicyRules', + full_name='context_policy.ContextPolicyService.ListPolicyRules', + index=1, + containing_service=None, + input_type=context__pb2._EMPTY, + output_type=policy__pb2._POLICYRULELIST, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetPolicyRule', + full_name='context_policy.ContextPolicyService.GetPolicyRule', + index=2, + containing_service=None, + input_type=policy__pb2._POLICYRULEID, + output_type=policy__pb2._POLICYRULEBASIC, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='SetPolicyRule', + full_name='context_policy.ContextPolicyService.SetPolicyRule', + index=3, + containing_service=None, + input_type=policy__pb2._POLICYRULEBASIC, + output_type=policy__pb2._POLICYRULEID, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='RemovePolicyRule', + full_name='context_policy.ContextPolicyService.RemovePolicyRule', + index=4, + containing_service=None, + input_type=policy__pb2._POLICYRULEID, + output_type=context__pb2._EMPTY, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), +]) +_sym_db.RegisterServiceDescriptor(_CONTEXTPOLICYSERVICE) + +DESCRIPTOR.services_by_name['ContextPolicyService'] = _CONTEXTPOLICYSERVICE + +# @@protoc_insertion_point(module_scope) diff --git a/src/context/proto/context_policy_pb2_grpc.py b/src/context/proto/context_policy_pb2_grpc.py new file mode 100644 index 000000000..a4d03e6c4 --- /dev/null +++ b/src/context/proto/context_policy_pb2_grpc.py @@ -0,0 +1,202 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import context_pb2 as context__pb2 +from . import policy_pb2 as policy__pb2 + + +class ContextPolicyServiceStub(object): + """created as a separate service to prevent import-loops in context and policy + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListPolicyRuleIds = channel.unary_unary( + '/context_policy.ContextPolicyService/ListPolicyRuleIds', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleIdList.FromString, + ) + self.ListPolicyRules = channel.unary_unary( + '/context_policy.ContextPolicyService/ListPolicyRules', + request_serializer=context__pb2.Empty.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleList.FromString, + ) + self.GetPolicyRule = channel.unary_unary( + '/context_policy.ContextPolicyService/GetPolicyRule', + request_serializer=policy__pb2.PolicyRuleId.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleBasic.FromString, + ) + self.SetPolicyRule = channel.unary_unary( + '/context_policy.ContextPolicyService/SetPolicyRule', + request_serializer=policy__pb2.PolicyRuleBasic.SerializeToString, + response_deserializer=policy__pb2.PolicyRuleId.FromString, + ) + self.RemovePolicyRule = channel.unary_unary( + '/context_policy.ContextPolicyService/RemovePolicyRule', + request_serializer=policy__pb2.PolicyRuleId.SerializeToString, + response_deserializer=context__pb2.Empty.FromString, + ) + + +class ContextPolicyServiceServicer(object): + """created as a separate service to prevent import-loops in context and policy + """ + + def ListPolicyRuleIds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListPolicyRules(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetPolicyRule(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetPolicyRule(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RemovePolicyRule(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ContextPolicyServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ListPolicyRuleIds': grpc.unary_unary_rpc_method_handler( + servicer.ListPolicyRuleIds, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=policy__pb2.PolicyRuleIdList.SerializeToString, + ), + 'ListPolicyRules': grpc.unary_unary_rpc_method_handler( + servicer.ListPolicyRules, + request_deserializer=context__pb2.Empty.FromString, + response_serializer=policy__pb2.PolicyRuleList.SerializeToString, + ), + 'GetPolicyRule': grpc.unary_unary_rpc_method_handler( + servicer.GetPolicyRule, + request_deserializer=policy__pb2.PolicyRuleId.FromString, + response_serializer=policy__pb2.PolicyRuleBasic.SerializeToString, + ), + 'SetPolicyRule': grpc.unary_unary_rpc_method_handler( + servicer.SetPolicyRule, + request_deserializer=policy__pb2.PolicyRuleBasic.FromString, + response_serializer=policy__pb2.PolicyRuleId.SerializeToString, + ), + 'RemovePolicyRule': grpc.unary_unary_rpc_method_handler( + servicer.RemovePolicyRule, + request_deserializer=policy__pb2.PolicyRuleId.FromString, + response_serializer=context__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'context_policy.ContextPolicyService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ContextPolicyService(object): + """created as a separate service to prevent import-loops in context and policy + """ + + @staticmethod + def ListPolicyRuleIds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context_policy.ContextPolicyService/ListPolicyRuleIds', + context__pb2.Empty.SerializeToString, + policy__pb2.PolicyRuleIdList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListPolicyRules(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context_policy.ContextPolicyService/ListPolicyRules', + context__pb2.Empty.SerializeToString, + policy__pb2.PolicyRuleList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetPolicyRule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context_policy.ContextPolicyService/GetPolicyRule', + policy__pb2.PolicyRuleId.SerializeToString, + policy__pb2.PolicyRuleBasic.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetPolicyRule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context_policy.ContextPolicyService/SetPolicyRule', + policy__pb2.PolicyRuleBasic.SerializeToString, + policy__pb2.PolicyRuleId.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RemovePolicyRule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/context_policy.ContextPolicyService/RemovePolicyRule', + policy__pb2.PolicyRuleId.SerializeToString, + context__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/context/proto/kpi_sample_types_pb2.py b/src/context/proto/kpi_sample_types_pb2.py new file mode 100644 index 000000000..ea7fd2f82 --- /dev/null +++ b/src/context/proto/kpi_sample_types_pb2.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: kpi_sample_types.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import 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='kpi_sample_types.proto', + package='kpi_sample_types', + syntax='proto3', + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x16kpi_sample_types.proto\x12\x10kpi_sample_types*\xbe\x01\n\rKpiSampleType\x12\x19\n\x15KPISAMPLETYPE_UNKNOWN\x10\x00\x12%\n!KPISAMPLETYPE_PACKETS_TRANSMITTED\x10\x65\x12\"\n\x1eKPISAMPLETYPE_PACKETS_RECEIVED\x10\x66\x12$\n\x1fKPISAMPLETYPE_BYTES_TRANSMITTED\x10\xc9\x01\x12!\n\x1cKPISAMPLETYPE_BYTES_RECEIVED\x10\xca\x01\x62\x06proto3' +) + +_KPISAMPLETYPE = _descriptor.EnumDescriptor( + name='KpiSampleType', + full_name='kpi_sample_types.KpiSampleType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='KPISAMPLETYPE_UNKNOWN', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='KPISAMPLETYPE_PACKETS_TRANSMITTED', index=1, number=101, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='KPISAMPLETYPE_PACKETS_RECEIVED', index=2, number=102, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='KPISAMPLETYPE_BYTES_TRANSMITTED', index=3, number=201, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='KPISAMPLETYPE_BYTES_RECEIVED', index=4, number=202, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=45, + serialized_end=235, +) +_sym_db.RegisterEnumDescriptor(_KPISAMPLETYPE) + +KpiSampleType = enum_type_wrapper.EnumTypeWrapper(_KPISAMPLETYPE) +KPISAMPLETYPE_UNKNOWN = 0 +KPISAMPLETYPE_PACKETS_TRANSMITTED = 101 +KPISAMPLETYPE_PACKETS_RECEIVED = 102 +KPISAMPLETYPE_BYTES_TRANSMITTED = 201 +KPISAMPLETYPE_BYTES_RECEIVED = 202 + + +DESCRIPTOR.enum_types_by_name['KpiSampleType'] = _KPISAMPLETYPE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + +# @@protoc_insertion_point(module_scope) diff --git a/src/context/proto/policy_pb2.py b/src/context/proto/policy_pb2.py new file mode 100644 index 000000000..72f13fbc4 --- /dev/null +++ b/src/context/proto/policy_pb2.py @@ -0,0 +1,654 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: policy.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import 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 +from . import policy_condition_pb2 as policy__condition__pb2 +from . import policy_action_pb2 as policy__action__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='policy.proto', + package='policy', + syntax='proto3', + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x0cpolicy.proto\x12\x06policy\x1a\rcontext.proto\x1a\x16policy-condition.proto\x1a\x13policy-action.proto\"+\n\x0cPolicyRuleId\x12\x1b\n\x04uuid\x18\x01 \x01(\x0b\x32\r.context.Uuid\"=\n\x0fPolicyRuleState\x12*\n\x0fpolicyRuleState\x18\x01 \x01(\x0e\x32\x11.policy.RuleState\"\xae\x02\n\x0fPolicyRuleBasic\x12*\n\x0cpolicyRuleId\x18\x01 \x01(\x0b\x32\x14.policy.PolicyRuleId\x12\x35\n\x0fpolicyRuleState\x18\x02 \x01(\x0b\x32\x17.policy.PolicyRuleStateH\x00\x88\x01\x01\x12\x10\n\x08priority\x18\x03 \x01(\r\x12\x32\n\rconditionList\x18\x04 \x03(\x0b\x32\x1b.policy.PolicyRuleCondition\x12\x30\n\x0f\x62ooleanOperator\x18\x05 \x01(\x0e\x32\x17.policy.BooleanOperator\x12,\n\nactionList\x18\x06 \x03(\x0b\x32\x18.policy.PolicyRuleActionB\x12\n\x10_policyRuleState\"\x93\x01\n\x11PolicyRuleService\x12\x30\n\x0fpolicyRuleBasic\x18\x01 \x01(\x0b\x32\x17.policy.PolicyRuleBasic\x12%\n\tserviceId\x18\x02 \x01(\x0b\x32\x12.context.ServiceId\x12%\n\ndeviceList\x18\x03 \x03(\x0b\x32\x11.context.DeviceId\"k\n\x10PolicyRuleDevice\x12\x30\n\x0fpolicyRuleBasic\x18\x01 \x01(\x0b\x32\x17.policy.PolicyRuleBasic\x12%\n\ndeviceList\x18\x02 \x03(\x0b\x32\x11.context.DeviceId\"B\n\x10PolicyRuleIdList\x12.\n\x10policyRuleIdList\x18\x01 \x03(\x0b\x32\x14.policy.PolicyRuleId\"Q\n\x15PolicyRuleServiceList\x12\x38\n\x15policyRuleServiceList\x18\x01 \x03(\x0b\x32\x19.policy.PolicyRuleService\"N\n\x14PolicyRuleDeviceList\x12\x36\n\x14policyRuleDeviceList\x18\x01 \x03(\x0b\x32\x18.policy.PolicyRuleDevice\";\n\x0ePolicyRuleList\x12)\n\x0bpolicyRules\x18\x01 \x03(\x0b\x32\x14.policy.PolicyRuleId*\xf5\x01\n\tRuleState\x12\x14\n\x10POLICY_UNDEFINED\x10\x00\x12\x11\n\rPOLICY_FAILED\x10\x01\x12\x13\n\x0fPOLICY_INSERTED\x10\x02\x12\x14\n\x10POLICY_VALIDATED\x10\x03\x12\x16\n\x12POLICY_PROVISIONED\x10\x04\x12\x11\n\rPOLICY_ACTIVE\x10\x05\x12\x13\n\x0fPOLICY_ENFORCED\x10\x06\x12\x16\n\x12POLICY_INEFFECTIVE\x10\x07\x12\x14\n\x10POLICY_EFFECTIVE\x10\x08\x12\x12\n\x0ePOLICY_UPDATED\x10\t\x12\x12\n\x0ePOLICY_REMOVED\x10\n2\xd3\x04\n\rPolicyService\x12H\n\x10PolicyAddService\x12\x19.policy.PolicyRuleService\x1a\x17.policy.PolicyRuleState\"\x00\x12\x46\n\x0fPolicyAddDevice\x12\x18.policy.PolicyRuleDevice\x1a\x17.policy.PolicyRuleState\"\x00\x12K\n\x13PolicyUpdateService\x12\x19.policy.PolicyRuleService\x1a\x17.policy.PolicyRuleState\"\x00\x12I\n\x12PolicyUpdateDevice\x12\x18.policy.PolicyRuleDevice\x1a\x17.policy.PolicyRuleState\"\x00\x12?\n\x0cPolicyDelete\x12\x14.policy.PolicyRuleId\x1a\x17.policy.PolicyRuleState\"\x00\x12\x45\n\x10GetPolicyService\x12\x14.policy.PolicyRuleId\x1a\x19.policy.PolicyRuleService\"\x00\x12\x43\n\x0fGetPolicyDevice\x12\x14.policy.PolicyRuleId\x1a\x18.policy.PolicyRuleDevice\"\x00\x12K\n\x14GetPolicyByServiceId\x12\x12.context.ServiceId\x1a\x1d.policy.PolicyRuleServiceList\"\x00\x62\x06proto3' + , + dependencies=[context__pb2.DESCRIPTOR,policy__condition__pb2.DESCRIPTOR,policy__action__pb2.DESCRIPTOR,]) + +_RULESTATE = _descriptor.EnumDescriptor( + name='RuleState', + full_name='policy.RuleState', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='POLICY_UNDEFINED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POLICY_FAILED', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POLICY_INSERTED', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POLICY_VALIDATED', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POLICY_PROVISIONED', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POLICY_ACTIVE', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POLICY_ENFORCED', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POLICY_INEFFECTIVE', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POLICY_EFFECTIVE', index=8, number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POLICY_UPDATED', index=9, number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='POLICY_REMOVED', index=10, number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1049, + serialized_end=1294, +) +_sym_db.RegisterEnumDescriptor(_RULESTATE) + +RuleState = enum_type_wrapper.EnumTypeWrapper(_RULESTATE) +POLICY_UNDEFINED = 0 +POLICY_FAILED = 1 +POLICY_INSERTED = 2 +POLICY_VALIDATED = 3 +POLICY_PROVISIONED = 4 +POLICY_ACTIVE = 5 +POLICY_ENFORCED = 6 +POLICY_INEFFECTIVE = 7 +POLICY_EFFECTIVE = 8 +POLICY_UPDATED = 9 +POLICY_REMOVED = 10 + + + +_POLICYRULEID = _descriptor.Descriptor( + name='PolicyRuleId', + full_name='policy.PolicyRuleId', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + 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, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=84, + serialized_end=127, +) + + +_POLICYRULESTATE = _descriptor.Descriptor( + name='PolicyRuleState', + full_name='policy.PolicyRuleState', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='policyRuleState', full_name='policy.PolicyRuleState.policyRuleState', 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, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=129, + serialized_end=190, +) + + +_POLICYRULEBASIC = _descriptor.Descriptor( + name='PolicyRuleBasic', + full_name='policy.PolicyRuleBasic', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='policyRuleId', full_name='policy.PolicyRuleBasic.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, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='policyRuleState', full_name='policy.PolicyRuleBasic.policyRuleState', 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='priority', full_name='policy.PolicyRuleBasic.priority', index=2, + number=3, 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='conditionList', full_name='policy.PolicyRuleBasic.conditionList', 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, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='booleanOperator', full_name='policy.PolicyRuleBasic.booleanOperator', index=4, + number=5, 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='actionList', full_name='policy.PolicyRuleBasic.actionList', 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, 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='_policyRuleState', full_name='policy.PolicyRuleBasic._policyRuleState', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=193, + serialized_end=495, +) + + +_POLICYRULESERVICE = _descriptor.Descriptor( + name='PolicyRuleService', + full_name='policy.PolicyRuleService', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='policyRuleBasic', full_name='policy.PolicyRuleService.policyRuleBasic', 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='serviceId', full_name='policy.PolicyRuleService.serviceId', 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='deviceList', full_name='policy.PolicyRuleService.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, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=498, + serialized_end=645, +) + + +_POLICYRULEDEVICE = _descriptor.Descriptor( + name='PolicyRuleDevice', + full_name='policy.PolicyRuleDevice', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='policyRuleBasic', full_name='policy.PolicyRuleDevice.policyRuleBasic', 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='deviceList', full_name='policy.PolicyRuleDevice.deviceList', 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, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=647, + serialized_end=754, +) + + +_POLICYRULEIDLIST = _descriptor.Descriptor( + name='PolicyRuleIdList', + full_name='policy.PolicyRuleIdList', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='policyRuleIdList', full_name='policy.PolicyRuleIdList.policyRuleIdList', 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=756, + serialized_end=822, +) + + +_POLICYRULESERVICELIST = _descriptor.Descriptor( + name='PolicyRuleServiceList', + full_name='policy.PolicyRuleServiceList', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='policyRuleServiceList', full_name='policy.PolicyRuleServiceList.policyRuleServiceList', 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=824, + serialized_end=905, +) + + +_POLICYRULEDEVICELIST = _descriptor.Descriptor( + name='PolicyRuleDeviceList', + full_name='policy.PolicyRuleDeviceList', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='policyRuleDeviceList', full_name='policy.PolicyRuleDeviceList.policyRuleDeviceList', 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=907, + serialized_end=985, +) + + +_POLICYRULELIST = _descriptor.Descriptor( + name='PolicyRuleList', + full_name='policy.PolicyRuleList', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='policyRules', full_name='policy.PolicyRuleList.policyRules', 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=987, + serialized_end=1046, +) + +_POLICYRULEID.fields_by_name['uuid'].message_type = context__pb2._UUID +_POLICYRULESTATE.fields_by_name['policyRuleState'].enum_type = _RULESTATE +_POLICYRULEBASIC.fields_by_name['policyRuleId'].message_type = _POLICYRULEID +_POLICYRULEBASIC.fields_by_name['policyRuleState'].message_type = _POLICYRULESTATE +_POLICYRULEBASIC.fields_by_name['conditionList'].message_type = policy__condition__pb2._POLICYRULECONDITION +_POLICYRULEBASIC.fields_by_name['booleanOperator'].enum_type = policy__condition__pb2._BOOLEANOPERATOR +_POLICYRULEBASIC.fields_by_name['actionList'].message_type = policy__action__pb2._POLICYRULEACTION +_POLICYRULEBASIC.oneofs_by_name['_policyRuleState'].fields.append( + _POLICYRULEBASIC.fields_by_name['policyRuleState']) +_POLICYRULEBASIC.fields_by_name['policyRuleState'].containing_oneof = _POLICYRULEBASIC.oneofs_by_name['_policyRuleState'] +_POLICYRULESERVICE.fields_by_name['policyRuleBasic'].message_type = _POLICYRULEBASIC +_POLICYRULESERVICE.fields_by_name['serviceId'].message_type = context__pb2._SERVICEID +_POLICYRULESERVICE.fields_by_name['deviceList'].message_type = context__pb2._DEVICEID +_POLICYRULEDEVICE.fields_by_name['policyRuleBasic'].message_type = _POLICYRULEBASIC +_POLICYRULEDEVICE.fields_by_name['deviceList'].message_type = context__pb2._DEVICEID +_POLICYRULEIDLIST.fields_by_name['policyRuleIdList'].message_type = _POLICYRULEID +_POLICYRULESERVICELIST.fields_by_name['policyRuleServiceList'].message_type = _POLICYRULESERVICE +_POLICYRULEDEVICELIST.fields_by_name['policyRuleDeviceList'].message_type = _POLICYRULEDEVICE +_POLICYRULELIST.fields_by_name['policyRules'].message_type = _POLICYRULEID +DESCRIPTOR.message_types_by_name['PolicyRuleId'] = _POLICYRULEID +DESCRIPTOR.message_types_by_name['PolicyRuleState'] = _POLICYRULESTATE +DESCRIPTOR.message_types_by_name['PolicyRuleBasic'] = _POLICYRULEBASIC +DESCRIPTOR.message_types_by_name['PolicyRuleService'] = _POLICYRULESERVICE +DESCRIPTOR.message_types_by_name['PolicyRuleDevice'] = _POLICYRULEDEVICE +DESCRIPTOR.message_types_by_name['PolicyRuleIdList'] = _POLICYRULEIDLIST +DESCRIPTOR.message_types_by_name['PolicyRuleServiceList'] = _POLICYRULESERVICELIST +DESCRIPTOR.message_types_by_name['PolicyRuleDeviceList'] = _POLICYRULEDEVICELIST +DESCRIPTOR.message_types_by_name['PolicyRuleList'] = _POLICYRULELIST +DESCRIPTOR.enum_types_by_name['RuleState'] = _RULESTATE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +PolicyRuleId = _reflection.GeneratedProtocolMessageType('PolicyRuleId', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEID, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleId) + }) +_sym_db.RegisterMessage(PolicyRuleId) + +PolicyRuleState = _reflection.GeneratedProtocolMessageType('PolicyRuleState', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULESTATE, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleState) + }) +_sym_db.RegisterMessage(PolicyRuleState) + +PolicyRuleBasic = _reflection.GeneratedProtocolMessageType('PolicyRuleBasic', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEBASIC, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleBasic) + }) +_sym_db.RegisterMessage(PolicyRuleBasic) + +PolicyRuleService = _reflection.GeneratedProtocolMessageType('PolicyRuleService', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULESERVICE, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleService) + }) +_sym_db.RegisterMessage(PolicyRuleService) + +PolicyRuleDevice = _reflection.GeneratedProtocolMessageType('PolicyRuleDevice', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEDEVICE, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleDevice) + }) +_sym_db.RegisterMessage(PolicyRuleDevice) + +PolicyRuleIdList = _reflection.GeneratedProtocolMessageType('PolicyRuleIdList', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEIDLIST, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleIdList) + }) +_sym_db.RegisterMessage(PolicyRuleIdList) + +PolicyRuleServiceList = _reflection.GeneratedProtocolMessageType('PolicyRuleServiceList', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULESERVICELIST, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleServiceList) + }) +_sym_db.RegisterMessage(PolicyRuleServiceList) + +PolicyRuleDeviceList = _reflection.GeneratedProtocolMessageType('PolicyRuleDeviceList', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULEDEVICELIST, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleDeviceList) + }) +_sym_db.RegisterMessage(PolicyRuleDeviceList) + +PolicyRuleList = _reflection.GeneratedProtocolMessageType('PolicyRuleList', (_message.Message,), { + 'DESCRIPTOR' : _POLICYRULELIST, + '__module__' : 'policy_pb2' + # @@protoc_insertion_point(class_scope:policy.PolicyRuleList) + }) +_sym_db.RegisterMessage(PolicyRuleList) + + + +_POLICYSERVICE = _descriptor.ServiceDescriptor( + name='PolicyService', + full_name='policy.PolicyService', + file=DESCRIPTOR, + index=0, + serialized_options=None, + create_key=_descriptor._internal_create_key, + serialized_start=1297, + serialized_end=1892, + methods=[ + _descriptor.MethodDescriptor( + name='PolicyAddService', + full_name='policy.PolicyService.PolicyAddService', + index=0, + containing_service=None, + input_type=_POLICYRULESERVICE, + output_type=_POLICYRULESTATE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='PolicyAddDevice', + full_name='policy.PolicyService.PolicyAddDevice', + index=1, + containing_service=None, + input_type=_POLICYRULEDEVICE, + output_type=_POLICYRULESTATE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='PolicyUpdateService', + full_name='policy.PolicyService.PolicyUpdateService', + index=2, + containing_service=None, + input_type=_POLICYRULESERVICE, + output_type=_POLICYRULESTATE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='PolicyUpdateDevice', + full_name='policy.PolicyService.PolicyUpdateDevice', + index=3, + containing_service=None, + input_type=_POLICYRULEDEVICE, + output_type=_POLICYRULESTATE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='PolicyDelete', + full_name='policy.PolicyService.PolicyDelete', + index=4, + containing_service=None, + input_type=_POLICYRULEID, + output_type=_POLICYRULESTATE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetPolicyService', + full_name='policy.PolicyService.GetPolicyService', + index=5, + containing_service=None, + input_type=_POLICYRULEID, + output_type=_POLICYRULESERVICE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetPolicyDevice', + full_name='policy.PolicyService.GetPolicyDevice', + index=6, + containing_service=None, + input_type=_POLICYRULEID, + output_type=_POLICYRULEDEVICE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='GetPolicyByServiceId', + full_name='policy.PolicyService.GetPolicyByServiceId', + index=7, + containing_service=None, + input_type=context__pb2._SERVICEID, + output_type=_POLICYRULESERVICELIST, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), +]) +_sym_db.RegisterServiceDescriptor(_POLICYSERVICE) + +DESCRIPTOR.services_by_name['PolicyService'] = _POLICYSERVICE + +# @@protoc_insertion_point(module_scope) -- GitLab