blob: bead6fb63a70810a1f228ad463f184f53af3d24e [file] [log] [blame]
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +02001# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2"""Client and server classes corresponding to protobuf-defined services."""
3import grpc
4
5from dmi import hw_management_service_pb2 as dmi_dot_hw__management__service__pb2
6from dmi import hw_pb2 as dmi_dot_hw__pb2
7
8
9class NativeHWManagementServiceStub(object):
10 """Missing associated documentation comment in .proto file."""
11
12 def __init__(self, channel):
13 """Constructor.
14
15 Args:
16 channel: A grpc.Channel.
17 """
18 self.StartManagingDevice = channel.unary_stream(
19 '/dmi.NativeHWManagementService/StartManagingDevice',
20 request_serializer=dmi_dot_hw__pb2.ModifiableComponent.SerializeToString,
21 response_deserializer=dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.FromString,
22 )
23 self.StopManagingDevice = channel.unary_unary(
24 '/dmi.NativeHWManagementService/StopManagingDevice',
25 request_serializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.SerializeToString,
26 response_deserializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.FromString,
27 )
28 self.GetPhysicalInventory = channel.unary_stream(
29 '/dmi.NativeHWManagementService/GetPhysicalInventory',
30 request_serializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.SerializeToString,
31 response_deserializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.FromString,
32 )
33 self.GetHWComponentInfo = channel.unary_stream(
34 '/dmi.NativeHWManagementService/GetHWComponentInfo',
35 request_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.SerializeToString,
36 response_deserializer=dmi_dot_hw__pb2.Component.FromString,
37 )
38 self.SetHWComponentInfo = channel.unary_unary(
39 '/dmi.NativeHWManagementService/SetHWComponentInfo',
40 request_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.SerializeToString,
41 response_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.FromString,
42 )
43
44
45class NativeHWManagementServiceServicer(object):
46 """Missing associated documentation comment in .proto file."""
47
48 def StartManagingDevice(self, request, context):
49 """Initializes context for a device and sets up required states
50 In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant
51 and their meanings in this context is mentioned below:
52 name = The unique name that needs to be assigned to this hardware;
53 class = COMPONENT_TYPE_UNDEFINED;
54 parent = nil;
55 alias = Optional;
56 asset_id = Optional;
57 uri = IP Address of the Hardware;
58 """
59 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
60 context.set_details('Method not implemented!')
61 raise NotImplementedError('Method not implemented!')
62
63 def StopManagingDevice(self, request, context):
64 """Stop management of a device and clean up any context and caches for that device
65 """
66 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
67 context.set_details('Method not implemented!')
68 raise NotImplementedError('Method not implemented!')
69
70 def GetPhysicalInventory(self, request, context):
71 """Get the HW inventory details of the Device
72 """
73 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
74 context.set_details('Method not implemented!')
75 raise NotImplementedError('Method not implemented!')
76
77 def GetHWComponentInfo(self, request, context):
78 """Get the details of a particular HW component
79 """
80 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
81 context.set_details('Method not implemented!')
82 raise NotImplementedError('Method not implemented!')
83
84 def SetHWComponentInfo(self, request, context):
85 """Sets the permissible attributes of a HW component
86 """
87 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
88 context.set_details('Method not implemented!')
89 raise NotImplementedError('Method not implemented!')
90
91
92def add_NativeHWManagementServiceServicer_to_server(servicer, server):
93 rpc_method_handlers = {
94 'StartManagingDevice': grpc.unary_stream_rpc_method_handler(
95 servicer.StartManagingDevice,
96 request_deserializer=dmi_dot_hw__pb2.ModifiableComponent.FromString,
97 response_serializer=dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.SerializeToString,
98 ),
99 'StopManagingDevice': grpc.unary_unary_rpc_method_handler(
100 servicer.StopManagingDevice,
101 request_deserializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.FromString,
102 response_serializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.SerializeToString,
103 ),
104 'GetPhysicalInventory': grpc.unary_stream_rpc_method_handler(
105 servicer.GetPhysicalInventory,
106 request_deserializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.FromString,
107 response_serializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.SerializeToString,
108 ),
109 'GetHWComponentInfo': grpc.unary_stream_rpc_method_handler(
110 servicer.GetHWComponentInfo,
111 request_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.FromString,
112 response_serializer=dmi_dot_hw__pb2.Component.SerializeToString,
113 ),
114 'SetHWComponentInfo': grpc.unary_unary_rpc_method_handler(
115 servicer.SetHWComponentInfo,
116 request_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.FromString,
117 response_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.SerializeToString,
118 ),
119 }
120 generic_handler = grpc.method_handlers_generic_handler(
121 'dmi.NativeHWManagementService', rpc_method_handlers)
122 server.add_generic_rpc_handlers((generic_handler,))
123
124
125 # This class is part of an EXPERIMENTAL API.
126class NativeHWManagementService(object):
127 """Missing associated documentation comment in .proto file."""
128
129 @staticmethod
130 def StartManagingDevice(request,
131 target,
132 options=(),
133 channel_credentials=None,
134 call_credentials=None,
135 insecure=False,
136 compression=None,
137 wait_for_ready=None,
138 timeout=None,
139 metadata=None):
140 return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/StartManagingDevice',
141 dmi_dot_hw__pb2.ModifiableComponent.SerializeToString,
142 dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.FromString,
143 options, channel_credentials,
144 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
145
146 @staticmethod
147 def StopManagingDevice(request,
148 target,
149 options=(),
150 channel_credentials=None,
151 call_credentials=None,
152 insecure=False,
153 compression=None,
154 wait_for_ready=None,
155 timeout=None,
156 metadata=None):
157 return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/StopManagingDevice',
158 dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.SerializeToString,
159 dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.FromString,
160 options, channel_credentials,
161 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
162
163 @staticmethod
164 def GetPhysicalInventory(request,
165 target,
166 options=(),
167 channel_credentials=None,
168 call_credentials=None,
169 insecure=False,
170 compression=None,
171 wait_for_ready=None,
172 timeout=None,
173 metadata=None):
174 return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/GetPhysicalInventory',
175 dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.SerializeToString,
176 dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.FromString,
177 options, channel_credentials,
178 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
179
180 @staticmethod
181 def GetHWComponentInfo(request,
182 target,
183 options=(),
184 channel_credentials=None,
185 call_credentials=None,
186 insecure=False,
187 compression=None,
188 wait_for_ready=None,
189 timeout=None,
190 metadata=None):
191 return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/GetHWComponentInfo',
192 dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.SerializeToString,
193 dmi_dot_hw__pb2.Component.FromString,
194 options, channel_credentials,
195 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
196
197 @staticmethod
198 def SetHWComponentInfo(request,
199 target,
200 options=(),
201 channel_credentials=None,
202 call_credentials=None,
203 insecure=False,
204 compression=None,
205 wait_for_ready=None,
206 timeout=None,
207 metadata=None):
208 return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/SetHWComponentInfo',
209 dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.SerializeToString,
210 dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.FromString,
211 options, channel_credentials,
212 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)