Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 1 | syntax = "proto3";
|
| 2 |
|
| 3 | option go_package = "github.com/opencord/device-management-interface/v3/go/dmi";
|
| 4 | package dmi;
|
| 5 |
|
| 6 | import "dmi/commons.proto";
|
| 7 | import "dmi/hw.proto";
|
| 8 |
|
| 9 | // Protos for the management of a hardware and it's components
|
| 10 |
|
| 11 | message PhysicalInventoryRequest {
|
| 12 | Uuid device_uuid = 1;
|
| 13 | }
|
| 14 |
|
| 15 | message PhysicalInventoryResponse {
|
| 16 | Status status = 1;
|
| 17 | Reason reason = 2;
|
| 18 | Hardware inventory = 3;
|
| 19 | }
|
| 20 |
|
| 21 | message HWComponentInfoGetRequest {
|
| 22 | Uuid device_uuid = 1;
|
| 23 | Uuid component_uuid = 2;
|
| 24 | string component_name = 3;
|
| 25 | }
|
| 26 |
|
| 27 | message HWComponentInfoSetRequest {
|
| 28 | Uuid device_uuid = 1;
|
| 29 | Uuid component_uuid = 2;
|
| 30 | string component_name = 3;
|
| 31 | ModifiableComponent changes = 4;
|
| 32 | }
|
| 33 |
|
| 34 | message HWComponentInfoSetResponse {
|
| 35 | Status status = 1;
|
| 36 | Reason reason = 2;
|
| 37 | }
|
| 38 |
|
| 39 | message StartManagingDeviceResponse {
|
| 40 | Status status = 1;
|
| 41 | Reason reason = 2;
|
| 42 | Uuid device_uuid = 3;
|
| 43 | }
|
| 44 |
|
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 45 | message StopManagingDeviceRequest {
|
| 46 | string name = 1;
|
| 47 | }
|
| 48 |
|
| 49 | message StopManagingDeviceResponse {
|
| 50 | Status status = 1;
|
| 51 | Reason reason = 2;
|
| 52 | }
|
| 53 |
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 54 | service NativeHWManagementService {
|
| 55 | // Initializes context for a device and sets up required states
|
Amit Ghosh | 704462f | 2020-06-24 16:44:56 +0100 | [diff] [blame] | 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 | rpc StartManagingDevice(ModifiableComponent) returns(stream StartManagingDeviceResponse);
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 65 |
|
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 66 | // Stop management of a device and clean up any context and caches for that device
|
| 67 | rpc StopManagingDevice(StopManagingDeviceRequest) returns(StopManagingDeviceResponse);
|
| 68 |
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 69 | // Get the HW inventory details of the Device
|
| 70 | rpc GetPhysicalInventory(PhysicalInventoryRequest) returns(stream PhysicalInventoryResponse);
|
| 71 |
|
| 72 | // Get the details of a particular HW component
|
| 73 | rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream Component);
|
| 74 |
|
| 75 | // Sets the permissible attributes of a HW component
|
| 76 | rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);
|
| 77 | }
|