blob: 88308e18e7bf3e6df0166fbbe3de6e290cf9dc57 [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
26if typing.TYPE_CHECKING:
27 import grpclib.server
28
29import osm_lcm.frontend_pb2
30
31
32class FrontendExecutorBase(abc.ABC):
33
34 @abc.abstractmethod
35 async def RunPrimitive(self, stream: 'grpclib.server.Stream[osm_lcm.frontend_pb2.PrimitiveRequest, osm_lcm.frontend_pb2.PrimitiveReply]') -> None:
36 pass
37
38 @abc.abstractmethod
39 async def GetSshKey(self, stream: 'grpclib.server.Stream[osm_lcm.frontend_pb2.SshKeyRequest, osm_lcm.frontend_pb2.SshKeyReply]') -> None:
40 pass
41
42 def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
43 return {
lloretgalleg302266e2020-07-01 08:52:35 +000044 '/osm_ee.FrontendExecutor/RunPrimitive': grpclib.const.Handler(
lloretgalleg62b2ee42020-06-30 11:26:48 +000045 self.RunPrimitive,
46 grpclib.const.Cardinality.UNARY_STREAM,
47 osm_lcm.frontend_pb2.PrimitiveRequest,
48 osm_lcm.frontend_pb2.PrimitiveReply,
49 ),
lloretgalleg302266e2020-07-01 08:52:35 +000050 '/osm_ee.FrontendExecutor/GetSshKey': grpclib.const.Handler(
lloretgalleg62b2ee42020-06-30 11:26:48 +000051 self.GetSshKey,
52 grpclib.const.Cardinality.UNARY_UNARY,
53 osm_lcm.frontend_pb2.SshKeyRequest,
54 osm_lcm.frontend_pb2.SshKeyReply,
55 ),
56 }
57
58
59class FrontendExecutorStub:
60
61 def __init__(self, channel: grpclib.client.Channel) -> None:
62 self.RunPrimitive = grpclib.client.UnaryStreamMethod(
63 channel,
lloretgalleg302266e2020-07-01 08:52:35 +000064 '/osm_ee.FrontendExecutor/RunPrimitive',
lloretgalleg62b2ee42020-06-30 11:26:48 +000065 osm_lcm.frontend_pb2.PrimitiveRequest,
66 osm_lcm.frontend_pb2.PrimitiveReply,
67 )
68 self.GetSshKey = grpclib.client.UnaryUnaryMethod(
69 channel,
lloretgalleg302266e2020-07-01 08:52:35 +000070 '/osm_ee.FrontendExecutor/GetSshKey',
lloretgalleg62b2ee42020-06-30 11:26:48 +000071 osm_lcm.frontend_pb2.SshKeyRequest,
72 osm_lcm.frontend_pb2.SshKeyReply,
73 )