Code Coverage

Cobertura Coverage Report > osm_lcm >

frontend_grpc.py

Trend

File Coverage summary

NameClassesLinesConditionals
frontend_grpc.py
100%
1/1
70%
14/20
100%
0/0

Coverage Breakdown by Class

NameLinesConditionals
frontend_grpc.py
70%
14/20
N/A

Source

osm_lcm/frontend_grpc.py
1 ##
2 # Copyright 2020 Telefonica Investigacion y Desarrollo, S.A.U.
3 #
4 # 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
7 #
8 #    http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # 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 #
17 ##
18 # Generated by the Protocol Buffers compiler. DO NOT EDIT!
19 # source: osm_lcm/frontend.proto
20 # plugin: grpclib.plugin.main
21 1 import abc
22 1 import typing
23
24 1 import grpclib.const
25 1 import grpclib.client
26
27 1 if typing.TYPE_CHECKING:
28 0     import grpclib.server
29
30 1 import osm_lcm.frontend_pb2
31
32
33 1 class FrontendExecutorBase(abc.ABC):
34 1     @abc.abstractmethod
35 1     async def RunPrimitive(
36         self,
37         stream: "grpclib.server.Stream[osm_lcm.frontend_pb2.PrimitiveRequest, osm_lcm.frontend_pb2.PrimitiveReply]",
38     ) -> None:
39 0         pass
40
41 1     @abc.abstractmethod
42 1     async def GetSshKey(
43         self,
44         stream: "grpclib.server.Stream[osm_lcm.frontend_pb2.SshKeyRequest, osm_lcm.frontend_pb2.SshKeyReply]",
45     ) -> None:
46 0         pass
47
48 1     def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
49 0         return {
50             "/osm_ee.FrontendExecutor/RunPrimitive": grpclib.const.Handler(
51                 self.RunPrimitive,
52                 grpclib.const.Cardinality.UNARY_STREAM,
53                 osm_lcm.frontend_pb2.PrimitiveRequest,
54                 osm_lcm.frontend_pb2.PrimitiveReply,
55             ),
56             "/osm_ee.FrontendExecutor/GetSshKey": grpclib.const.Handler(
57                 self.GetSshKey,
58                 grpclib.const.Cardinality.UNARY_UNARY,
59                 osm_lcm.frontend_pb2.SshKeyRequest,
60                 osm_lcm.frontend_pb2.SshKeyReply,
61             ),
62         }
63
64
65 1 class FrontendExecutorStub:
66 1     def __init__(self, channel: grpclib.client.Channel) -> None:
67 0         self.RunPrimitive = grpclib.client.UnaryStreamMethod(
68             channel,
69             "/osm_ee.FrontendExecutor/RunPrimitive",
70             osm_lcm.frontend_pb2.PrimitiveRequest,
71             osm_lcm.frontend_pb2.PrimitiveReply,
72         )
73 0         self.GetSshKey = grpclib.client.UnaryUnaryMethod(
74             channel,
75             "/osm_ee.FrontendExecutor/GetSshKey",
76             osm_lcm.frontend_pb2.SshKeyRequest,
77             osm_lcm.frontend_pb2.SshKeyReply,
78         )