blob: 0584454f992ae11cfe97c17db5a569024e8e4909 [file] [log] [blame]
Amit Ghosh09f28362020-06-12 21:52:19 +01001syntax = "proto3";
2
3option go_package = "github.com/opencord/device-management-interface/v3/go/dmi";
4package dmi;
5
6import "dmi/commons.proto";
7import "dmi/hw.proto";
Andrea Campanellacb990bc2020-09-22 12:50:56 +02008import "google/protobuf/empty.proto";
Amit Ghosh09f28362020-06-12 21:52:19 +01009
10// Protos for the management of a hardware and it's components
11
12message PhysicalInventoryRequest {
13 Uuid device_uuid = 1;
14}
15
16message PhysicalInventoryResponse {
17 Status status = 1;
18 Reason reason = 2;
19 Hardware inventory = 3;
20}
21
22message HWComponentInfoGetRequest {
23 Uuid device_uuid = 1;
24 Uuid component_uuid = 2;
25 string component_name = 3;
26}
27
aghoshc301dcd2020-09-03 16:55:34 +010028message HWComponentInfoGetResponse {
29 Status status = 1;
30 Reason reason = 2;
31 Component component = 3;
32}
33
Amit Ghosh09f28362020-06-12 21:52:19 +010034message HWComponentInfoSetRequest {
35 Uuid device_uuid = 1;
36 Uuid component_uuid = 2;
37 string component_name = 3;
38 ModifiableComponent changes = 4;
39}
40
41message HWComponentInfoSetResponse {
42 Status status = 1;
43 Reason reason = 2;
44}
45
46message StartManagingDeviceResponse {
47 Status status = 1;
48 Reason reason = 2;
49 Uuid device_uuid = 3;
50}
51
Amit Ghosh366228e2020-07-06 13:46:42 +010052message StopManagingDeviceRequest {
53 string name = 1;
54}
55
56message StopManagingDeviceResponse {
57 Status status = 1;
58 Reason reason = 2;
59}
60
Andrea Campanellacb990bc2020-09-22 12:50:56 +020061message ManagedDevicesResponse {
62 repeated ModifiableComponent devices = 1;
63}
64
Amit Ghosh09f28362020-06-12 21:52:19 +010065service NativeHWManagementService {
66 // Initializes context for a device and sets up required states
Amit Ghosh704462f2020-06-24 16:44:56 +010067 // In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant
68 // and their meanings in this context is mentioned below:
69 // name = The unique name that needs to be assigned to this hardware;
70 // class = COMPONENT_TYPE_UNDEFINED;
71 // parent = nil;
72 // alias = Optional;
73 // asset_id = Optional;
74 // uri = IP Address of the Hardware;
75 rpc StartManagingDevice(ModifiableComponent) returns(stream StartManagingDeviceResponse);
Amit Ghosh09f28362020-06-12 21:52:19 +010076
Amit Ghosh366228e2020-07-06 13:46:42 +010077 // Stop management of a device and clean up any context and caches for that device
78 rpc StopManagingDevice(StopManagingDeviceRequest) returns(StopManagingDeviceResponse);
79
Andrea Campanellacb990bc2020-09-22 12:50:56 +020080 // Returns an object containing a list of devices managed by this entity
81 rpc GetManagedDevices(google.protobuf.Empty) returns(ManagedDevicesResponse);
82
Amit Ghosh09f28362020-06-12 21:52:19 +010083 // Get the HW inventory details of the Device
84 rpc GetPhysicalInventory(PhysicalInventoryRequest) returns(stream PhysicalInventoryResponse);
85
86 // Get the details of a particular HW component
aghoshc301dcd2020-09-03 16:55:34 +010087 rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream HWComponentInfoGetResponse);
Amit Ghosh09f28362020-06-12 21:52:19 +010088
89 // Sets the permissible attributes of a HW component
90 rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);
91}