uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 1 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! |
| 2 | """Client and server classes corresponding to protobuf-defined services.""" |
| 3 | import grpc |
| 4 | |
| 5 | from dmi import hw_management_service_pb2 as dmi_dot_hw__management__service__pb2 |
| 6 | from dmi import hw_pb2 as dmi_dot_hw__pb2 |
Andrea Campanella | cb990bc | 2020-09-22 12:50:56 +0200 | [diff] [blame] | 7 | from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 |
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 8 | |
| 9 | |
| 10 | class 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 Campanella | cb990bc | 2020-09-22 12:50:56 +0200 | [diff] [blame] | 29 | 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 ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 34 | 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, |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 42 | response_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetResponse.FromString, |
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 43 | ) |
| 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 | ) |
amit.ghosh | 188a84f | 2020-09-27 20:59:25 +0200 | [diff] [blame] | 49 | self.SetLoggingEndpoint = channel.unary_unary( |
| 50 | '/dmi.NativeHWManagementService/SetLoggingEndpoint', |
| 51 | request_serializer=dmi_dot_hw__management__service__pb2.SetLoggingEndpointRequest.SerializeToString, |
| 52 | response_deserializer=dmi_dot_hw__management__service__pb2.SetRemoteEndpointResponse.FromString, |
| 53 | ) |
| 54 | self.GetLoggingEndpoint = channel.unary_unary( |
| 55 | '/dmi.NativeHWManagementService/GetLoggingEndpoint', |
| 56 | request_serializer=dmi_dot_hw__pb2.Uuid.SerializeToString, |
| 57 | response_deserializer=dmi_dot_hw__management__service__pb2.GetLoggingEndpointResponse.FromString, |
| 58 | ) |
| 59 | self.SetMsgBusEndpoint = channel.unary_unary( |
| 60 | '/dmi.NativeHWManagementService/SetMsgBusEndpoint', |
| 61 | request_serializer=dmi_dot_hw__management__service__pb2.SetMsgBusEndpointRequest.SerializeToString, |
| 62 | response_deserializer=dmi_dot_hw__management__service__pb2.SetRemoteEndpointResponse.FromString, |
| 63 | ) |
| 64 | self.GetMsgBusEndpoint = channel.unary_unary( |
| 65 | '/dmi.NativeHWManagementService/GetMsgBusEndpoint', |
| 66 | request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 67 | response_deserializer=dmi_dot_hw__management__service__pb2.GetMsgBusEndpointResponse.FromString, |
| 68 | ) |
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 69 | |
| 70 | |
| 71 | class NativeHWManagementServiceServicer(object): |
| 72 | """Missing associated documentation comment in .proto file.""" |
| 73 | |
| 74 | def StartManagingDevice(self, request, context): |
| 75 | """Initializes context for a device and sets up required states
|
| 76 | In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant
|
| 77 | and their meanings in this context is mentioned below:
|
| 78 | name = The unique name that needs to be assigned to this hardware;
|
| 79 | class = COMPONENT_TYPE_UNDEFINED;
|
| 80 | parent = nil;
|
| 81 | alias = Optional;
|
| 82 | asset_id = Optional;
|
| 83 | uri = IP Address of the Hardware;
|
| 84 | """ |
| 85 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 86 | context.set_details('Method not implemented!') |
| 87 | raise NotImplementedError('Method not implemented!') |
| 88 | |
| 89 | def StopManagingDevice(self, request, context): |
| 90 | """Stop management of a device and clean up any context and caches for that device
|
| 91 | """ |
| 92 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 93 | context.set_details('Method not implemented!') |
| 94 | raise NotImplementedError('Method not implemented!') |
| 95 | |
Andrea Campanella | cb990bc | 2020-09-22 12:50:56 +0200 | [diff] [blame] | 96 | def GetManagedDevices(self, request, context): |
| 97 | """Returns an object containing a list of devices managed by this entity
|
| 98 | """ |
| 99 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 100 | context.set_details('Method not implemented!') |
| 101 | raise NotImplementedError('Method not implemented!') |
| 102 | |
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 103 | def GetPhysicalInventory(self, request, context): |
| 104 | """Get the HW inventory details of the Device
|
| 105 | """ |
| 106 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 107 | context.set_details('Method not implemented!') |
| 108 | raise NotImplementedError('Method not implemented!') |
| 109 | |
| 110 | def GetHWComponentInfo(self, request, context): |
| 111 | """Get the details of a particular HW component
|
| 112 | """ |
| 113 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 114 | context.set_details('Method not implemented!') |
| 115 | raise NotImplementedError('Method not implemented!') |
| 116 | |
| 117 | def SetHWComponentInfo(self, request, context): |
| 118 | """Sets the permissible attributes of a HW component
|
| 119 | """ |
| 120 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 121 | context.set_details('Method not implemented!') |
| 122 | raise NotImplementedError('Method not implemented!') |
| 123 | |
amit.ghosh | 188a84f | 2020-09-27 20:59:25 +0200 | [diff] [blame] | 124 | def SetLoggingEndpoint(self, request, context): |
| 125 | """Sets the location to which logs need to be shipped
|
| 126 | """ |
| 127 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 128 | context.set_details('Method not implemented!') |
| 129 | raise NotImplementedError('Method not implemented!') |
| 130 | |
| 131 | def GetLoggingEndpoint(self, request, context): |
| 132 | """Gets the configured location to which the logs are being shipped
|
| 133 | """ |
| 134 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 135 | context.set_details('Method not implemented!') |
| 136 | raise NotImplementedError('Method not implemented!') |
| 137 | |
| 138 | def SetMsgBusEndpoint(self, request, context): |
| 139 | """Sets the location of the Message Bus to which events and metrics are shipped
|
| 140 | """ |
| 141 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 142 | context.set_details('Method not implemented!') |
| 143 | raise NotImplementedError('Method not implemented!') |
| 144 | |
| 145 | def GetMsgBusEndpoint(self, request, context): |
| 146 | """Gets the configured location to which the events and metrics are being shipped
|
| 147 | """ |
| 148 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 149 | context.set_details('Method not implemented!') |
| 150 | raise NotImplementedError('Method not implemented!') |
| 151 | |
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 152 | |
| 153 | def add_NativeHWManagementServiceServicer_to_server(servicer, server): |
| 154 | rpc_method_handlers = { |
| 155 | 'StartManagingDevice': grpc.unary_stream_rpc_method_handler( |
| 156 | servicer.StartManagingDevice, |
| 157 | request_deserializer=dmi_dot_hw__pb2.ModifiableComponent.FromString, |
| 158 | response_serializer=dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.SerializeToString, |
| 159 | ), |
| 160 | 'StopManagingDevice': grpc.unary_unary_rpc_method_handler( |
| 161 | servicer.StopManagingDevice, |
| 162 | request_deserializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.FromString, |
| 163 | response_serializer=dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.SerializeToString, |
| 164 | ), |
Andrea Campanella | cb990bc | 2020-09-22 12:50:56 +0200 | [diff] [blame] | 165 | 'GetManagedDevices': grpc.unary_unary_rpc_method_handler( |
| 166 | servicer.GetManagedDevices, |
| 167 | request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 168 | response_serializer=dmi_dot_hw__management__service__pb2.ManagedDevicesResponse.SerializeToString, |
| 169 | ), |
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 170 | 'GetPhysicalInventory': grpc.unary_stream_rpc_method_handler( |
| 171 | servicer.GetPhysicalInventory, |
| 172 | request_deserializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.FromString, |
| 173 | response_serializer=dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.SerializeToString, |
| 174 | ), |
| 175 | 'GetHWComponentInfo': grpc.unary_stream_rpc_method_handler( |
| 176 | servicer.GetHWComponentInfo, |
| 177 | request_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.FromString, |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 178 | response_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoGetResponse.SerializeToString, |
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 179 | ), |
| 180 | 'SetHWComponentInfo': grpc.unary_unary_rpc_method_handler( |
| 181 | servicer.SetHWComponentInfo, |
| 182 | request_deserializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.FromString, |
| 183 | response_serializer=dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.SerializeToString, |
| 184 | ), |
amit.ghosh | 188a84f | 2020-09-27 20:59:25 +0200 | [diff] [blame] | 185 | 'SetLoggingEndpoint': grpc.unary_unary_rpc_method_handler( |
| 186 | servicer.SetLoggingEndpoint, |
| 187 | request_deserializer=dmi_dot_hw__management__service__pb2.SetLoggingEndpointRequest.FromString, |
| 188 | response_serializer=dmi_dot_hw__management__service__pb2.SetRemoteEndpointResponse.SerializeToString, |
| 189 | ), |
| 190 | 'GetLoggingEndpoint': grpc.unary_unary_rpc_method_handler( |
| 191 | servicer.GetLoggingEndpoint, |
| 192 | request_deserializer=dmi_dot_hw__pb2.Uuid.FromString, |
| 193 | response_serializer=dmi_dot_hw__management__service__pb2.GetLoggingEndpointResponse.SerializeToString, |
| 194 | ), |
| 195 | 'SetMsgBusEndpoint': grpc.unary_unary_rpc_method_handler( |
| 196 | servicer.SetMsgBusEndpoint, |
| 197 | request_deserializer=dmi_dot_hw__management__service__pb2.SetMsgBusEndpointRequest.FromString, |
| 198 | response_serializer=dmi_dot_hw__management__service__pb2.SetRemoteEndpointResponse.SerializeToString, |
| 199 | ), |
| 200 | 'GetMsgBusEndpoint': grpc.unary_unary_rpc_method_handler( |
| 201 | servicer.GetMsgBusEndpoint, |
| 202 | request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, |
| 203 | response_serializer=dmi_dot_hw__management__service__pb2.GetMsgBusEndpointResponse.SerializeToString, |
| 204 | ), |
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 205 | } |
| 206 | generic_handler = grpc.method_handlers_generic_handler( |
| 207 | 'dmi.NativeHWManagementService', rpc_method_handlers) |
| 208 | server.add_generic_rpc_handlers((generic_handler,)) |
| 209 | |
| 210 | |
| 211 | # This class is part of an EXPERIMENTAL API. |
| 212 | class NativeHWManagementService(object): |
| 213 | """Missing associated documentation comment in .proto file.""" |
| 214 | |
| 215 | @staticmethod |
| 216 | def StartManagingDevice(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/StartManagingDevice', |
| 227 | dmi_dot_hw__pb2.ModifiableComponent.SerializeToString, |
| 228 | dmi_dot_hw__management__service__pb2.StartManagingDeviceResponse.FromString, |
| 229 | options, channel_credentials, |
| 230 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 231 | |
| 232 | @staticmethod |
| 233 | def StopManagingDevice(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/StopManagingDevice', |
| 244 | dmi_dot_hw__management__service__pb2.StopManagingDeviceRequest.SerializeToString, |
| 245 | dmi_dot_hw__management__service__pb2.StopManagingDeviceResponse.FromString, |
| 246 | options, channel_credentials, |
| 247 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 248 | |
| 249 | @staticmethod |
Andrea Campanella | cb990bc | 2020-09-22 12:50:56 +0200 | [diff] [blame] | 250 | def GetManagedDevices(request, |
| 251 | target, |
| 252 | options=(), |
| 253 | channel_credentials=None, |
| 254 | call_credentials=None, |
| 255 | insecure=False, |
| 256 | compression=None, |
| 257 | wait_for_ready=None, |
| 258 | timeout=None, |
| 259 | metadata=None): |
| 260 | return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/GetManagedDevices', |
| 261 | google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 262 | dmi_dot_hw__management__service__pb2.ManagedDevicesResponse.FromString, |
| 263 | options, channel_credentials, |
| 264 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 265 | |
| 266 | @staticmethod |
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 267 | def GetPhysicalInventory(request, |
| 268 | target, |
| 269 | options=(), |
| 270 | channel_credentials=None, |
| 271 | call_credentials=None, |
| 272 | insecure=False, |
| 273 | compression=None, |
| 274 | wait_for_ready=None, |
| 275 | timeout=None, |
| 276 | metadata=None): |
| 277 | return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/GetPhysicalInventory', |
| 278 | dmi_dot_hw__management__service__pb2.PhysicalInventoryRequest.SerializeToString, |
| 279 | dmi_dot_hw__management__service__pb2.PhysicalInventoryResponse.FromString, |
| 280 | options, channel_credentials, |
| 281 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 282 | |
| 283 | @staticmethod |
| 284 | def GetHWComponentInfo(request, |
| 285 | target, |
| 286 | options=(), |
| 287 | channel_credentials=None, |
| 288 | call_credentials=None, |
| 289 | insecure=False, |
| 290 | compression=None, |
| 291 | wait_for_ready=None, |
| 292 | timeout=None, |
| 293 | metadata=None): |
| 294 | return grpc.experimental.unary_stream(request, target, '/dmi.NativeHWManagementService/GetHWComponentInfo', |
| 295 | dmi_dot_hw__management__service__pb2.HWComponentInfoGetRequest.SerializeToString, |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 296 | dmi_dot_hw__management__service__pb2.HWComponentInfoGetResponse.FromString, |
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 297 | options, channel_credentials, |
| 298 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 299 | |
| 300 | @staticmethod |
| 301 | def SetHWComponentInfo(request, |
| 302 | target, |
| 303 | options=(), |
| 304 | channel_credentials=None, |
| 305 | call_credentials=None, |
| 306 | insecure=False, |
| 307 | compression=None, |
| 308 | wait_for_ready=None, |
| 309 | timeout=None, |
| 310 | metadata=None): |
| 311 | return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/SetHWComponentInfo', |
| 312 | dmi_dot_hw__management__service__pb2.HWComponentInfoSetRequest.SerializeToString, |
| 313 | dmi_dot_hw__management__service__pb2.HWComponentInfoSetResponse.FromString, |
| 314 | options, channel_credentials, |
| 315 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
amit.ghosh | 188a84f | 2020-09-27 20:59:25 +0200 | [diff] [blame] | 316 | |
| 317 | @staticmethod |
| 318 | def SetLoggingEndpoint(request, |
| 319 | target, |
| 320 | options=(), |
| 321 | channel_credentials=None, |
| 322 | call_credentials=None, |
| 323 | insecure=False, |
| 324 | compression=None, |
| 325 | wait_for_ready=None, |
| 326 | timeout=None, |
| 327 | metadata=None): |
| 328 | return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/SetLoggingEndpoint', |
| 329 | dmi_dot_hw__management__service__pb2.SetLoggingEndpointRequest.SerializeToString, |
| 330 | dmi_dot_hw__management__service__pb2.SetRemoteEndpointResponse.FromString, |
| 331 | options, channel_credentials, |
| 332 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 333 | |
| 334 | @staticmethod |
| 335 | def GetLoggingEndpoint(request, |
| 336 | target, |
| 337 | options=(), |
| 338 | channel_credentials=None, |
| 339 | call_credentials=None, |
| 340 | insecure=False, |
| 341 | compression=None, |
| 342 | wait_for_ready=None, |
| 343 | timeout=None, |
| 344 | metadata=None): |
| 345 | return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/GetLoggingEndpoint', |
| 346 | dmi_dot_hw__pb2.Uuid.SerializeToString, |
| 347 | dmi_dot_hw__management__service__pb2.GetLoggingEndpointResponse.FromString, |
| 348 | options, channel_credentials, |
| 349 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 350 | |
| 351 | @staticmethod |
| 352 | def SetMsgBusEndpoint(request, |
| 353 | target, |
| 354 | options=(), |
| 355 | channel_credentials=None, |
| 356 | call_credentials=None, |
| 357 | insecure=False, |
| 358 | compression=None, |
| 359 | wait_for_ready=None, |
| 360 | timeout=None, |
| 361 | metadata=None): |
| 362 | return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/SetMsgBusEndpoint', |
| 363 | dmi_dot_hw__management__service__pb2.SetMsgBusEndpointRequest.SerializeToString, |
| 364 | dmi_dot_hw__management__service__pb2.SetRemoteEndpointResponse.FromString, |
| 365 | options, channel_credentials, |
| 366 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 367 | |
| 368 | @staticmethod |
| 369 | def GetMsgBusEndpoint(request, |
| 370 | target, |
| 371 | options=(), |
| 372 | channel_credentials=None, |
| 373 | call_credentials=None, |
| 374 | insecure=False, |
| 375 | compression=None, |
| 376 | wait_for_ready=None, |
| 377 | timeout=None, |
| 378 | metadata=None): |
| 379 | return grpc.experimental.unary_unary(request, target, '/dmi.NativeHWManagementService/GetMsgBusEndpoint', |
| 380 | google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, |
| 381 | dmi_dot_hw__management__service__pb2.GetMsgBusEndpointResponse.FromString, |
| 382 | options, channel_credentials, |
| 383 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |