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";
|
Andrea Campanella | cb990bc | 2020-09-22 12:50:56 +0200 | [diff] [blame] | 8 | import "google/protobuf/empty.proto";
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 9 |
|
| 10 | // Protos for the management of a hardware and it's components
|
| 11 |
|
| 12 | message PhysicalInventoryRequest {
|
| 13 | Uuid device_uuid = 1;
|
| 14 | }
|
| 15 |
|
| 16 | message PhysicalInventoryResponse {
|
| 17 | Status status = 1;
|
| 18 | Reason reason = 2;
|
| 19 | Hardware inventory = 3;
|
| 20 | }
|
| 21 |
|
| 22 | message HWComponentInfoGetRequest {
|
| 23 | Uuid device_uuid = 1;
|
| 24 | Uuid component_uuid = 2;
|
| 25 | string component_name = 3;
|
| 26 | }
|
| 27 |
|
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 28 | message HWComponentInfoGetResponse {
|
| 29 | Status status = 1;
|
| 30 | Reason reason = 2;
|
| 31 | Component component = 3;
|
| 32 | }
|
| 33 |
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 34 | message HWComponentInfoSetRequest {
|
| 35 | Uuid device_uuid = 1;
|
| 36 | Uuid component_uuid = 2;
|
| 37 | string component_name = 3;
|
| 38 | ModifiableComponent changes = 4;
|
| 39 | }
|
| 40 |
|
| 41 | message HWComponentInfoSetResponse {
|
| 42 | Status status = 1;
|
| 43 | Reason reason = 2;
|
| 44 | }
|
| 45 |
|
| 46 | message StartManagingDeviceResponse {
|
| 47 | Status status = 1;
|
| 48 | Reason reason = 2;
|
| 49 | Uuid device_uuid = 3;
|
| 50 | }
|
| 51 |
|
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 52 | message StopManagingDeviceRequest {
|
| 53 | string name = 1;
|
| 54 | }
|
| 55 |
|
| 56 | message StopManagingDeviceResponse {
|
| 57 | Status status = 1;
|
| 58 | Reason reason = 2;
|
| 59 | }
|
| 60 |
|
Andrea Campanella | cb990bc | 2020-09-22 12:50:56 +0200 | [diff] [blame] | 61 | message ManagedDevicesResponse {
|
| 62 | repeated ModifiableComponent devices = 1;
|
| 63 | }
|
| 64 |
|
amit.ghosh | 188a84f | 2020-09-27 20:59:25 +0200 | [diff] [blame^] | 65 | message SetLoggingEndpointRequest {
|
| 66 | Uuid device_uuid = 1;
|
| 67 | string logging_endpoint = 2;
|
| 68 | string logging_protocol = 3;
|
| 69 | }
|
| 70 |
|
| 71 | message SetRemoteEndpointResponse {
|
| 72 | Status status = 1;
|
| 73 | Reason reason = 2;
|
| 74 | }
|
| 75 |
|
| 76 | message GetLoggingEndpointResponse {
|
| 77 | Status status = 1;
|
| 78 | Reason reason = 2;
|
| 79 | string logging_endpoint = 3;
|
| 80 | string logging_protocol = 4;
|
| 81 | }
|
| 82 |
|
| 83 | message SetMsgBusEndpointRequest {
|
| 84 | string msgbus_endpoint = 1;
|
| 85 | }
|
| 86 |
|
| 87 | message GetMsgBusEndpointResponse {
|
| 88 | Status status = 1;
|
| 89 | Reason reason = 2;
|
| 90 | string msgbus_endpoint = 3;
|
| 91 | }
|
| 92 |
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 93 | service NativeHWManagementService {
|
| 94 | // Initializes context for a device and sets up required states
|
Amit Ghosh | 704462f | 2020-06-24 16:44:56 +0100 | [diff] [blame] | 95 | // In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant
|
| 96 | // and their meanings in this context is mentioned below:
|
| 97 | // name = The unique name that needs to be assigned to this hardware;
|
| 98 | // class = COMPONENT_TYPE_UNDEFINED;
|
| 99 | // parent = nil;
|
| 100 | // alias = Optional;
|
| 101 | // asset_id = Optional;
|
| 102 | // uri = IP Address of the Hardware;
|
| 103 | rpc StartManagingDevice(ModifiableComponent) returns(stream StartManagingDeviceResponse);
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 104 |
|
Amit Ghosh | 366228e | 2020-07-06 13:46:42 +0100 | [diff] [blame] | 105 | // Stop management of a device and clean up any context and caches for that device
|
| 106 | rpc StopManagingDevice(StopManagingDeviceRequest) returns(StopManagingDeviceResponse);
|
| 107 |
|
Andrea Campanella | cb990bc | 2020-09-22 12:50:56 +0200 | [diff] [blame] | 108 | // Returns an object containing a list of devices managed by this entity
|
| 109 | rpc GetManagedDevices(google.protobuf.Empty) returns(ManagedDevicesResponse);
|
| 110 |
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 111 | // Get the HW inventory details of the Device
|
| 112 | rpc GetPhysicalInventory(PhysicalInventoryRequest) returns(stream PhysicalInventoryResponse);
|
| 113 |
|
| 114 | // Get the details of a particular HW component
|
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 115 | rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream HWComponentInfoGetResponse);
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 116 |
|
| 117 | // Sets the permissible attributes of a HW component
|
| 118 | rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);
|
amit.ghosh | 188a84f | 2020-09-27 20:59:25 +0200 | [diff] [blame^] | 119 |
|
| 120 | // Sets the location to which logs need to be shipped
|
| 121 | rpc SetLoggingEndpoint(SetLoggingEndpointRequest) returns(SetRemoteEndpointResponse);
|
| 122 |
|
| 123 | // Gets the configured location to which the logs are being shipped
|
| 124 | rpc GetLoggingEndpoint(Uuid) returns(GetLoggingEndpointResponse);
|
| 125 |
|
| 126 | // Sets the location of the Message Bus to which events and metrics are shipped
|
| 127 | rpc SetMsgBusEndpoint(SetMsgBusEndpointRequest) returns(SetRemoteEndpointResponse);
|
| 128 |
|
| 129 | // Gets the configured location to which the events and metrics are being shipped
|
| 130 | rpc GetMsgBusEndpoint(google.protobuf.Empty) returns(GetMsgBusEndpointResponse);
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 131 | }
|