blob: 759a668cd1c518b2aceaf6491872636b3c765686 [file] [log] [blame]
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from dmi import hw_management_service_pb2 as dmi_dot_hw__management__service__pb2
from dmi import hw_pb2 as dmi_dot_hw__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
class NativeHWManagementServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.StartManagingDevice = channel.unary_stream(
'/dmi.NativeHWManagementService/StartManagingDevice',
request_serializer=dmi_dot_hw__pb2.ModifiableComponent.SerializeToString,
response_deserializer=dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.FromString,
)
self.StopManagingDevice = channel.unary_unary(
'/dmi.NativeHWManagementService/StopManagingDevice',
request_serializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.SerializeToString,
response_deserializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.FromString,
)
self.GetManagedDevices = channel.unary_unary(
'/dmi.NativeHWManagementService/GetManagedDevices',
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
response_deserializer=dmi_dot_hw__management__service__pb2.ManagedDevicesResponse.FromString,
)
self.GetPhysicalInventory = channel.unary_stream(
'/dmi.NativeHWManagementService/GetPhysicalInventory',
request_serializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.SerializeToString,
response_deserializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.FromString,
)
self.GetHWComponentInfo = channel.unary_stream(
'/dmi.NativeHWManagementService/GetHWComponentInfo',
request_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.SerializeToString,
response_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetResponse.FromString,
)
self.SetHWComponentInfo = channel.unary_unary(
'/dmi.NativeHWManagementService/SetHWComponentInfo',
request_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.SerializeToString,
response_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.FromString,
)
class NativeHWManagementServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def StartManagingDevice(self, request, context):
"""Initializes context for a device and sets up required states
In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant
and their meanings in this context is mentioned below:
name = The unique name that needs to be assigned to this hardware;
class = COMPONENT_TYPE_UNDEFINED;
parent = nil;
alias = Optional;
asset_id = Optional;
uri = IP Address of the Hardware;
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def StopManagingDevice(self, request, context):
"""Stop management of a device and clean up any context and caches for that device
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetManagedDevices(self, request, context):
"""Returns an object containing a list of devices managed by this entity
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetPhysicalInventory(self, request, context):
"""Get the HW inventory details of the Device
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetHWComponentInfo(self, request, context):
"""Get the details of a particular HW component
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetHWComponentInfo(self, request, context):
"""Sets the permissible attributes of a HW component
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_NativeHWManagementServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'StartManagingDevice': grpc.unary_stream_rpc_method_handler(
servicer.StartManagingDevice,
request_deserializer=dmi_dot_hw__pb2.ModifiableComponent.FromString,
response_serializer=dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.SerializeToString,
),
'StopManagingDevice': grpc.unary_unary_rpc_method_handler(
servicer.StopManagingDevice,
request_deserializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.FromString,
response_serializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.SerializeToString,
),
'GetManagedDevices': grpc.unary_unary_rpc_method_handler(
servicer.GetManagedDevices,
request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
response_serializer=dmi_dot_hw__management__service__pb2.ManagedDevicesResponse.SerializeToString,
),
'GetPhysicalInventory': grpc.unary_stream_rpc_method_handler(
servicer.GetPhysicalInventory,
request_deserializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.FromString,
response_serializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.SerializeToString,
),
'GetHWComponentInfo': grpc.unary_stream_rpc_method_handler(
servicer.GetHWComponentInfo,
request_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.FromString,
response_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetResponse.SerializeToString,
),
'SetHWComponentInfo': grpc.unary_unary_rpc_method_handler(
servicer.SetHWComponentInfo,
request_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.FromString,
response_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'dmi.NativeHWManagementService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class NativeHWManagementService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def StartManagingDevice(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/StartManagingDevice',
dmi_dot_hw__pb2.ModifiableComponent.SerializeToString,
dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def StopManagingDevice(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/StopManagingDevice',
dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.SerializeToString,
dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetManagedDevices(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/GetManagedDevices',
google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
dmi_dot_hw__management__service__pb2.ManagedDevicesResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetPhysicalInventory(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/GetPhysicalInventory',
dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.SerializeToString,
dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetHWComponentInfo(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/GetHWComponentInfo',
dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.SerializeToString,
dmi_dot_hw__management__service__pb2.HWComponentInfoGetResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SetHWComponentInfo(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/SetHWComponentInfo',
dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.SerializeToString,
dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)