blob: 2c3a7d9b2fcb45fba9f7c74e0aed1f045c4f6677 [file] [log] [blame]
##
# 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 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_ee.FrontendExecutor/RunPrimitive": grpclib.const.Handler(
self.RunPrimitive,
grpclib.const.Cardinality.UNARY_STREAM,
osm_lcm.frontend_pb2.PrimitiveRequest,
osm_lcm.frontend_pb2.PrimitiveReply,
),
"/osm_ee.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_ee.FrontendExecutor/RunPrimitive",
osm_lcm.frontend_pb2.PrimitiveRequest,
osm_lcm.frontend_pb2.PrimitiveReply,
)
self.GetSshKey = grpclib.client.UnaryUnaryMethod(
channel,
"/osm_ee.FrontendExecutor/GetSshKey",
osm_lcm.frontend_pb2.SshKeyRequest,
osm_lcm.frontend_pb2.SshKeyReply,
)