--- /dev/null
+#!/usr/bin/python3
+# -*- coding: utf-8 -*-
+
+##
+# Copyright 2018 Telefonica S.A.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+##
+# Generated by the Protocol Buffers compiler. DO NOT EDIT!
+# source: osm_lcm/frontend.proto
+# plugin: grpclib.plugin.main
+import abc
+import typing
+
+import grpclib.const
+import grpclib.client
+if typing.TYPE_CHECKING:
+ import grpclib.server
+
+import osm_lcm.frontend_pb2
+
+
+class FrontendExecutorBase(abc.ABC):
+
+ @abc.abstractmethod
+ async def RunPrimitive(self, stream: 'grpclib.server.Stream[osm_lcm.frontend_pb2.PrimitiveRequest, osm_lcm.frontend_pb2.PrimitiveReply]') -> None:
+ pass
+
+ @abc.abstractmethod
+ async def GetSshKey(self, stream: 'grpclib.server.Stream[osm_lcm.frontend_pb2.SshKeyRequest, osm_lcm.frontend_pb2.SshKeyReply]') -> None:
+ pass
+
+ def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
+ return {
+ '/osm_lcm.FrontendExecutor/RunPrimitive': grpclib.const.Handler(
+ self.RunPrimitive,
+ grpclib.const.Cardinality.UNARY_STREAM,
+ osm_lcm.frontend_pb2.PrimitiveRequest,
+ osm_lcm.frontend_pb2.PrimitiveReply,
+ ),
+ '/osm_lcm.FrontendExecutor/GetSshKey': grpclib.const.Handler(
+ self.GetSshKey,
+ grpclib.const.Cardinality.UNARY_UNARY,
+ osm_lcm.frontend_pb2.SshKeyRequest,
+ osm_lcm.frontend_pb2.SshKeyReply,
+ ),
+ }
+
+
+class FrontendExecutorStub:
+
+ def __init__(self, channel: grpclib.client.Channel) -> None:
+ self.RunPrimitive = grpclib.client.UnaryStreamMethod(
+ channel,
+ '/osm_lcm.FrontendExecutor/RunPrimitive',
+ osm_lcm.frontend_pb2.PrimitiveRequest,
+ osm_lcm.frontend_pb2.PrimitiveReply,
+ )
+ self.GetSshKey = grpclib.client.UnaryUnaryMethod(
+ channel,
+ '/osm_lcm.FrontendExecutor/GetSshKey',
+ osm_lcm.frontend_pb2.SshKeyRequest,
+ osm_lcm.frontend_pb2.SshKeyReply,
+ )
--- /dev/null
+# -*- coding: utf-8 -*-
+##
+# Copyright 2020 Telefonica Investigacion y Desarrollo, S.A.U.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+##
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: osm_lcm/frontend.proto
+
+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='osm_lcm/frontend.proto',
+ package='osm_lcm',
+ syntax='proto3',
+ serialized_options=b'\n\027com.etsi.osm.lcm.osm_lcmB\014GrpcExecutorP\001\242\002\003OEE',
+ serialized_pb=b'\n\x15osm_lcm/frontend.proto\x12\x06osm_lcm\"<\n\x10PrimitiveRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06params\x18\x03 \x01(\t\":\n\x0ePrimitiveReply\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x18\n\x10\x64\x65tailed_message\x18\x02 \x01(\t\"\x0f\n\rSshKeyRequest\"\x1e\n\x0bSshKeyReply\x12\x0f\n\x07message\x18\x01 \x01(\t2\x93\x01\n\x10\x46rontendExecutor\x12\x44\n\x0cRunPrimitive\x12\x18.osm_lcm.PrimitiveRequest\x1a\x16.osm_lcm.PrimitiveReply\"\x00\x30\x01\x12\x39\n\tGetSshKey\x12\x15.osm_lcm.SshKeyRequest\x1a\x13.osm_lcm.SshKeyReply\"\x00\x42/\n\x17\x63om.etsi.osm.lcm.osm_lcmB\x0cGrpcExecutorP\x01\xa2\x02\x03OEEb\x06proto3'
+)
+
+
+
+
+_PRIMITIVEREQUEST = _descriptor.Descriptor(
+ name='PrimitiveRequest',
+ full_name='osm_lcm.PrimitiveRequest',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='id', full_name='osm_lcm.PrimitiveRequest.id', 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='name', full_name='osm_lcm.PrimitiveRequest.name', 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='params', full_name='osm_lcm.PrimitiveRequest.params', 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),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=33,
+ serialized_end=93,
+)
+
+
+_PRIMITIVEREPLY = _descriptor.Descriptor(
+ name='PrimitiveReply',
+ full_name='osm_lcm.PrimitiveReply',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='status', full_name='osm_lcm.PrimitiveReply.status', 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='detailed_message', full_name='osm_lcm.PrimitiveReply.detailed_message', 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=95,
+ serialized_end=153,
+)
+
+
+_SSHKEYREQUEST = _descriptor.Descriptor(
+ name='SshKeyRequest',
+ full_name='osm_lcm.SshKeyRequest',
+ 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=155,
+ serialized_end=170,
+)
+
+
+_SSHKEYREPLY = _descriptor.Descriptor(
+ name='SshKeyReply',
+ full_name='osm_lcm.SshKeyReply',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='message', full_name='osm_lcm.SshKeyReply.message', 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=172,
+ serialized_end=202,
+)
+
+DESCRIPTOR.message_types_by_name['PrimitiveRequest'] = _PRIMITIVEREQUEST
+DESCRIPTOR.message_types_by_name['PrimitiveReply'] = _PRIMITIVEREPLY
+DESCRIPTOR.message_types_by_name['SshKeyRequest'] = _SSHKEYREQUEST
+DESCRIPTOR.message_types_by_name['SshKeyReply'] = _SSHKEYREPLY
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+PrimitiveRequest = _reflection.GeneratedProtocolMessageType('PrimitiveRequest', (_message.Message,), {
+ 'DESCRIPTOR' : _PRIMITIVEREQUEST,
+ '__module__' : 'osm_lcm.frontend_pb2'
+ # @@protoc_insertion_point(class_scope:osm_lcm.PrimitiveRequest)
+ })
+_sym_db.RegisterMessage(PrimitiveRequest)
+
+PrimitiveReply = _reflection.GeneratedProtocolMessageType('PrimitiveReply', (_message.Message,), {
+ 'DESCRIPTOR' : _PRIMITIVEREPLY,
+ '__module__' : 'osm_lcm.frontend_pb2'
+ # @@protoc_insertion_point(class_scope:osm_lcm.PrimitiveReply)
+ })
+_sym_db.RegisterMessage(PrimitiveReply)
+
+SshKeyRequest = _reflection.GeneratedProtocolMessageType('SshKeyRequest', (_message.Message,), {
+ 'DESCRIPTOR' : _SSHKEYREQUEST,
+ '__module__' : 'osm_lcm.frontend_pb2'
+ # @@protoc_insertion_point(class_scope:osm_lcm.SshKeyRequest)
+ })
+_sym_db.RegisterMessage(SshKeyRequest)
+
+SshKeyReply = _reflection.GeneratedProtocolMessageType('SshKeyReply', (_message.Message,), {
+ 'DESCRIPTOR' : _SSHKEYREPLY,
+ '__module__' : 'osm_lcm.frontend_pb2'
+ # @@protoc_insertion_point(class_scope:osm_lcm.SshKeyReply)
+ })
+_sym_db.RegisterMessage(SshKeyReply)
+
+
+DESCRIPTOR._options = None
+
+_FRONTENDEXECUTOR = _descriptor.ServiceDescriptor(
+ name='FrontendExecutor',
+ full_name='osm_lcm.FrontendExecutor',
+ file=DESCRIPTOR,
+ index=0,
+ serialized_options=None,
+ serialized_start=205,
+ serialized_end=352,
+ methods=[
+ _descriptor.MethodDescriptor(
+ name='RunPrimitive',
+ full_name='osm_lcm.FrontendExecutor.RunPrimitive',
+ index=0,
+ containing_service=None,
+ input_type=_PRIMITIVEREQUEST,
+ output_type=_PRIMITIVEREPLY,
+ serialized_options=None,
+ ),
+ _descriptor.MethodDescriptor(
+ name='GetSshKey',
+ full_name='osm_lcm.FrontendExecutor.GetSshKey',
+ index=1,
+ containing_service=None,
+ input_type=_SSHKEYREQUEST,
+ output_type=_SSHKEYREPLY,
+ serialized_options=None,
+ ),
+])
+_sym_db.RegisterServiceDescriptor(_FRONTENDEXECUTOR)
+
+DESCRIPTOR.services_by_name['FrontendExecutor'] = _FRONTENDEXECUTOR
+
+# @@protoc_insertion_point(module_scope)