blob: 511a5d2d8fa0aeb230b57c867a8afed3a388019c [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";
8
9// Protos for the management of a hardware and it's components
10
11message PhysicalInventoryRequest {
12 Uuid device_uuid = 1;
13}
14
15message PhysicalInventoryResponse {
16 Status status = 1;
17 Reason reason = 2;
18 Hardware inventory = 3;
19}
20
21message HWComponentInfoGetRequest {
22 Uuid device_uuid = 1;
23 Uuid component_uuid = 2;
24 string component_name = 3;
25}
26
aghoshc301dcd2020-09-03 16:55:34 +010027message HWComponentInfoGetResponse {
28 Status status = 1;
29 Reason reason = 2;
30 Component component = 3;
31}
32
Amit Ghosh09f28362020-06-12 21:52:19 +010033message HWComponentInfoSetRequest {
34 Uuid device_uuid = 1;
35 Uuid component_uuid = 2;
36 string component_name = 3;
37 ModifiableComponent changes = 4;
38}
39
40message HWComponentInfoSetResponse {
41 Status status = 1;
42 Reason reason = 2;
43}
44
45message StartManagingDeviceResponse {
46 Status status = 1;
47 Reason reason = 2;
48 Uuid device_uuid = 3;
49}
50
Amit Ghosh366228e2020-07-06 13:46:42 +010051message StopManagingDeviceRequest {
52 string name = 1;
53}
54
55message StopManagingDeviceResponse {
56 Status status = 1;
57 Reason reason = 2;
58}
59
Amit Ghosh09f28362020-06-12 21:52:19 +010060service NativeHWManagementService {
61 // Initializes context for a device and sets up required states
Amit Ghosh704462f2020-06-24 16:44:56 +010062 // In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant
63 // and their meanings in this context is mentioned below:
64 // name = The unique name that needs to be assigned to this hardware;
65 // class = COMPONENT_TYPE_UNDEFINED;
66 // parent = nil;
67 // alias = Optional;
68 // asset_id = Optional;
69 // uri = IP Address of the Hardware;
70 rpc StartManagingDevice(ModifiableComponent) returns(stream StartManagingDeviceResponse);
Amit Ghosh09f28362020-06-12 21:52:19 +010071
Amit Ghosh366228e2020-07-06 13:46:42 +010072 // Stop management of a device and clean up any context and caches for that device
73 rpc StopManagingDevice(StopManagingDeviceRequest) returns(StopManagingDeviceResponse);
74
Amit Ghosh09f28362020-06-12 21:52:19 +010075 // Get the HW inventory details of the Device
76 rpc GetPhysicalInventory(PhysicalInventoryRequest) returns(stream PhysicalInventoryResponse);
77
78 // Get the details of a particular HW component
aghoshc301dcd2020-09-03 16:55:34 +010079 rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream HWComponentInfoGetResponse);
Amit Ghosh09f28362020-06-12 21:52:19 +010080
81 // Sets the permissible attributes of a HW component
82 rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);
83}