blob: dd50bb8360eeaa025acd633deb56e62443857276 [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.ghosh188a84f2020-09-27 20:59:25 +020065message SetLoggingEndpointRequest {
66 Uuid device_uuid = 1;
67 string logging_endpoint = 2;
68 string logging_protocol = 3;
69}
70
71message SetRemoteEndpointResponse {
72 Status status = 1;
73 Reason reason = 2;
74}
75
76message GetLoggingEndpointResponse {
77 Status status = 1;
78 Reason reason = 2;
79 string logging_endpoint = 3;
80 string logging_protocol = 4;
81}
82
83message SetMsgBusEndpointRequest {
84 string msgbus_endpoint = 1;
85}
86
87message GetMsgBusEndpointResponse {
88 Status status = 1;
89 Reason reason = 2;
90 string msgbus_endpoint = 3;
91}
92
Amit Ghosh09f28362020-06-12 21:52:19 +010093service NativeHWManagementService {
94 // Initializes context for a device and sets up required states
Amit Ghosh704462f2020-06-24 16:44:56 +010095 // 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 Ghosh09f28362020-06-12 21:52:19 +0100104
Amit Ghosh366228e2020-07-06 13:46:42 +0100105 // Stop management of a device and clean up any context and caches for that device
106 rpc StopManagingDevice(StopManagingDeviceRequest) returns(StopManagingDeviceResponse);
107
Andrea Campanellacb990bc2020-09-22 12:50:56 +0200108 // Returns an object containing a list of devices managed by this entity
109 rpc GetManagedDevices(google.protobuf.Empty) returns(ManagedDevicesResponse);
110
Amit Ghosh09f28362020-06-12 21:52:19 +0100111 // 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
aghoshc301dcd2020-09-03 16:55:34 +0100115 rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream HWComponentInfoGetResponse);
Amit Ghosh09f28362020-06-12 21:52:19 +0100116
117 // Sets the permissible attributes of a HW component
118 rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);
amit.ghosh188a84f2020-09-27 20:59:25 +0200119
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 Ghosh09f28362020-06-12 21:52:19 +0100131}