blob: 2c3a7d9b2fcb45fba9f7c74e0aed1f045c4f6677 [file] [log] [blame]
lloretgalleg62b2ee42020-06-30 11:26:48 +00001##
lloretgalleg302266e2020-07-01 08:52:35 +00002# Copyright 2020 Telefonica Investigacion y Desarrollo, S.A.U.
lloretgalleg62b2ee42020-06-30 11:26:48 +00003#
lloretgalleg302266e2020-07-01 08:52:35 +00004# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
lloretgalleg62b2ee42020-06-30 11:26:48 +00007#
lloretgalleg302266e2020-07-01 08:52:35 +00008# http://www.apache.org/licenses/LICENSE-2.0
lloretgalleg62b2ee42020-06-30 11:26:48 +00009#
10# Unless required by applicable law or agreed to in writing, software
lloretgalleg302266e2020-07-01 08:52:35 +000011# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13# implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
lloretgalleg62b2ee42020-06-30 11:26:48 +000017##
18# Generated by the Protocol Buffers compiler. DO NOT EDIT!
19# source: osm_lcm/frontend.proto
20# plugin: grpclib.plugin.main
21import abc
22import typing
23
24import grpclib.const
25import grpclib.client
garciadeblas5697b8b2021-03-24 09:17:02 +010026
lloretgalleg62b2ee42020-06-30 11:26:48 +000027if typing.TYPE_CHECKING:
28 import grpclib.server
29
30import osm_lcm.frontend_pb2
31
32
33class FrontendExecutorBase(abc.ABC):
lloretgalleg62b2ee42020-06-30 11:26:48 +000034 @abc.abstractmethod
garciadeblas5697b8b2021-03-24 09:17:02 +010035 async def RunPrimitive(
36 self,
37 stream: "grpclib.server.Stream[osm_lcm.frontend_pb2.PrimitiveRequest, osm_lcm.frontend_pb2.PrimitiveReply]",
38 ) -> None:
lloretgalleg62b2ee42020-06-30 11:26:48 +000039 pass
40
41 @abc.abstractmethod
garciadeblas5697b8b2021-03-24 09:17:02 +010042 async def GetSshKey(
43 self,
44 stream: "grpclib.server.Stream[osm_lcm.frontend_pb2.SshKeyRequest, osm_lcm.frontend_pb2.SshKeyReply]",
45 ) -> None:
lloretgalleg62b2ee42020-06-30 11:26:48 +000046 pass
47
48 def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
49 return {
garciadeblas5697b8b2021-03-24 09:17:02 +010050 "/osm_ee.FrontendExecutor/RunPrimitive": grpclib.const.Handler(
lloretgalleg62b2ee42020-06-30 11:26:48 +000051 self.RunPrimitive,
52 grpclib.const.Cardinality.UNARY_STREAM,
53 osm_lcm.frontend_pb2.PrimitiveRequest,
54 osm_lcm.frontend_pb2.PrimitiveReply,
55 ),
garciadeblas5697b8b2021-03-24 09:17:02 +010056 "/osm_ee.FrontendExecutor/GetSshKey": grpclib.const.Handler(
lloretgalleg62b2ee42020-06-30 11:26:48 +000057 self.GetSshKey,
58 grpclib.const.Cardinality.UNARY_UNARY,
59 osm_lcm.frontend_pb2.SshKeyRequest,
60 osm_lcm.frontend_pb2.SshKeyReply,
61 ),
62 }
63
64
65class FrontendExecutorStub:
lloretgalleg62b2ee42020-06-30 11:26:48 +000066 def __init__(self, channel: grpclib.client.Channel) -> None:
67 self.RunPrimitive = grpclib.client.UnaryStreamMethod(
68 channel,
garciadeblas5697b8b2021-03-24 09:17:02 +010069 "/osm_ee.FrontendExecutor/RunPrimitive",
lloretgalleg62b2ee42020-06-30 11:26:48 +000070 osm_lcm.frontend_pb2.PrimitiveRequest,
71 osm_lcm.frontend_pb2.PrimitiveReply,
72 )
73 self.GetSshKey = grpclib.client.UnaryUnaryMethod(
74 channel,
garciadeblas5697b8b2021-03-24 09:17:02 +010075 "/osm_ee.FrontendExecutor/GetSshKey",
lloretgalleg62b2ee42020-06-30 11:26:48 +000076 osm_lcm.frontend_pb2.SshKeyRequest,
77 osm_lcm.frontend_pb2.SshKeyReply,
78 )