blob: 759a668cd1c518b2aceaf6491872636b3c765686 [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
Andrea Campanellacb990bc2020-09-22 12:50:56 +02007from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +02008
9
10class NativeHWManagementServiceStub(object):
11 """Missing associated documentation comment in .proto file."""
12
13 def __init__(self, channel):
14 """Constructor.
15
16 Args:
17 channel: A grpc.Channel.
18 """
19 self.StartManagingDevice = channel.unary_stream(
20 '/dmi.NativeHWManagementService/StartManagingDevice',
21 request_serializer=dmi_dot_hw__pb2.ModifiableComponent.SerializeToString,
22 response_deserializer=dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.FromString,
23 )
24 self.StopManagingDevice = channel.unary_unary(
25 '/dmi.NativeHWManagementService/StopManagingDevice',
26 request_serializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.SerializeToString,
27 response_deserializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.FromString,
28 )
Andrea Campanellacb990bc2020-09-22 12:50:56 +020029 self.GetManagedDevices = channel.unary_unary(
30 '/dmi.NativeHWManagementService/GetManagedDevices',
31 request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
32 response_deserializer=dmi_dot_hw__management__service__pb2.ManagedDevicesResponse.FromString,
33 )
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020034 self.GetPhysicalInventory = channel.unary_stream(
35 '/dmi.NativeHWManagementService/GetPhysicalInventory',
36 request_serializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.SerializeToString,
37 response_deserializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.FromString,
38 )
39 self.GetHWComponentInfo = channel.unary_stream(
40 '/dmi.NativeHWManagementService/GetHWComponentInfo',
41 request_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +010042 response_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020043 )
44 self.SetHWComponentInfo = channel.unary_unary(
45 '/dmi.NativeHWManagementService/SetHWComponentInfo',
46 request_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.SerializeToString,
47 response_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.FromString,
48 )
49
50
51class NativeHWManagementServiceServicer(object):
52 """Missing associated documentation comment in .proto file."""
53
54 def StartManagingDevice(self, request, context):
55 """Initializes context for a device and sets up required states
56 In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant
57 and their meanings in this context is mentioned below:
58 name = The unique name that needs to be assigned to this hardware;
59 class = COMPONENT_TYPE_UNDEFINED;
60 parent = nil;
61 alias = Optional;
62 asset_id = Optional;
63 uri = IP Address of the Hardware;
64 """
65 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
66 context.set_details('Method not implemented!')
67 raise NotImplementedError('Method not implemented!')
68
69 def StopManagingDevice(self, request, context):
70 """Stop management of a device and clean up any context and caches for that device
71 """
72 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
73 context.set_details('Method not implemented!')
74 raise NotImplementedError('Method not implemented!')
75
Andrea Campanellacb990bc2020-09-22 12:50:56 +020076 def GetManagedDevices(self, request, context):
77 """Returns an object containing a list of devices managed by this entity
78 """
79 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
80 context.set_details('Method not implemented!')
81 raise NotImplementedError('Method not implemented!')
82
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020083 def GetPhysicalInventory(self, request, context):
84 """Get the HW inventory details of the Device
85 """
86 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
87 context.set_details('Method not implemented!')
88 raise NotImplementedError('Method not implemented!')
89
90 def GetHWComponentInfo(self, request, context):
91 """Get the details of a particular HW component
92 """
93 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
94 context.set_details('Method not implemented!')
95 raise NotImplementedError('Method not implemented!')
96
97 def SetHWComponentInfo(self, request, context):
98 """Sets the permissible attributes of a HW component
99 """
100 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
101 context.set_details('Method not implemented!')
102 raise NotImplementedError('Method not implemented!')
103
104
105def add_NativeHWManagementServiceServicer_to_server(servicer, server):
106 rpc_method_handlers = {
107 'StartManagingDevice': grpc.unary_stream_rpc_method_handler(
108 servicer.StartManagingDevice,
109 request_deserializer=dmi_dot_hw__pb2.ModifiableComponent.FromString,
110 response_serializer=dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.SerializeToString,
111 ),
112 'StopManagingDevice': grpc.unary_unary_rpc_method_handler(
113 servicer.StopManagingDevice,
114 request_deserializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.FromString,
115 response_serializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.SerializeToString,
116 ),
Andrea Campanellacb990bc2020-09-22 12:50:56 +0200117 'GetManagedDevices': grpc.unary_unary_rpc_method_handler(
118 servicer.GetManagedDevices,
119 request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
120 response_serializer=dmi_dot_hw__management__service__pb2.ManagedDevicesResponse.SerializeToString,
121 ),
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200122 'GetPhysicalInventory': grpc.unary_stream_rpc_method_handler(
123 servicer.GetPhysicalInventory,
124 request_deserializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.FromString,
125 response_serializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.SerializeToString,
126 ),
127 'GetHWComponentInfo': grpc.unary_stream_rpc_method_handler(
128 servicer.GetHWComponentInfo,
129 request_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.FromString,
aghoshc301dcd2020-09-03 16:55:34 +0100130 response_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetResponse.SerializeToString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200131 ),
132 'SetHWComponentInfo': grpc.unary_unary_rpc_method_handler(
133 servicer.SetHWComponentInfo,
134 request_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.FromString,
135 response_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.SerializeToString,
136 ),
137 }
138 generic_handler = grpc.method_handlers_generic_handler(
139 'dmi.NativeHWManagementService', rpc_method_handlers)
140 server.add_generic_rpc_handlers((generic_handler,))
141
142
143 # This class is part of an EXPERIMENTAL API.
144class NativeHWManagementService(object):
145 """Missing associated documentation comment in .proto file."""
146
147 @staticmethod
148 def StartManagingDevice(request,
149 target,
150 options=(),
151 channel_credentials=None,
152 call_credentials=None,
153 insecure=False,
154 compression=None,
155 wait_for_ready=None,
156 timeout=None,
157 metadata=None):
158 return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/StartManagingDevice',
159 dmi_dot_hw__pb2.ModifiableComponent.SerializeToString,
160 dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.FromString,
161 options, channel_credentials,
162 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
163
164 @staticmethod
165 def StopManagingDevice(request,
166 target,
167 options=(),
168 channel_credentials=None,
169 call_credentials=None,
170 insecure=False,
171 compression=None,
172 wait_for_ready=None,
173 timeout=None,
174 metadata=None):
175 return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/StopManagingDevice',
176 dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.SerializeToString,
177 dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.FromString,
178 options, channel_credentials,
179 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
180
181 @staticmethod
Andrea Campanellacb990bc2020-09-22 12:50:56 +0200182 def GetManagedDevices(request,
183 target,
184 options=(),
185 channel_credentials=None,
186 call_credentials=None,
187 insecure=False,
188 compression=None,
189 wait_for_ready=None,
190 timeout=None,
191 metadata=None):
192 return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/GetManagedDevices',
193 google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
194 dmi_dot_hw__management__service__pb2.ManagedDevicesResponse.FromString,
195 options, channel_credentials,
196 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
197
198 @staticmethod
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200199 def GetPhysicalInventory(request,
200 target,
201 options=(),
202 channel_credentials=None,
203 call_credentials=None,
204 insecure=False,
205 compression=None,
206 wait_for_ready=None,
207 timeout=None,
208 metadata=None):
209 return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/GetPhysicalInventory',
210 dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.SerializeToString,
211 dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.FromString,
212 options, channel_credentials,
213 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
214
215 @staticmethod
216 def GetHWComponentInfo(request,
217 target,
218 options=(),
219 channel_credentials=None,
220 call_credentials=None,
221 insecure=False,
222 compression=None,
223 wait_for_ready=None,
224 timeout=None,
225 metadata=None):
226 return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/GetHWComponentInfo',
227 dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.SerializeToString,
aghoshc301dcd2020-09-03 16:55:34 +0100228 dmi_dot_hw__management__service__pb2.HWComponentInfoGetResponse.FromString,
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +0200229 options, channel_credentials,
230 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
231
232 @staticmethod
233 def SetHWComponentInfo(request,
234 target,
235 options=(),
236 channel_credentials=None,
237 call_credentials=None,
238 insecure=False,
239 compression=None,
240 wait_for_ready=None,
241 timeout=None,
242 metadata=None):
243 return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/SetHWComponentInfo',
244 dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.SerializeToString,
245 dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.FromString,
246 options, channel_credentials,
247 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)