blob: 422370f4376f8544f2aeca731036a139bb6e031c [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 "google/protobuf/timestamp.proto";
7
8// The model used to represent a HW is based on RFC8348 (https://tools.ietf.org/html/rfc8348)
9
10message Uuid {
11 string uuid = 1;
12}
13
14message HardwareID {
15 Uuid uuid = 1;
16}
17
18message Uri {
19 string uri = 1;
20}
21
22enum ComponentType {
23 COMPONENT_TYPE_UNDEFINED = 0;
24 COMPONENT_TYPE_UNKNOWN = 1;
25 COMPONENT_TYPE_CHASSIS = 2;
26 COMPONENT_TYPE_BACKPLANE = 3;
27 COMPONENT_TYPE_CONTAINER = 4;
28 COMPONENT_TYPE_POWER_SUPPLY = 5;
29 COMPONENT_TYPE_FAN = 6;
30 COMPONENT_TYPE_SENSOR = 7;
31 COMPONENT_TYPE_MODULE = 8;
32 COMPONENT_TYPE_PORT = 9;
33 COMPONENT_TYPE_CPU = 10;
34 COMPONENT_TYPE_BATTERY = 11;
35 COMPONENT_TYPE_STORAGE = 12;
36 COMPONENT_TYPE_MEMORY = 13;
amit.ghosh2a6b60b2021-02-03 15:16:02 +010037 // A component of type "TRANSCEIVER" could have 0 or more components of type "PORT" as children.
Amit Ghosh09f28362020-06-12 21:52:19 +010038 COMPONENT_TYPE_TRANSCEIVER = 14;
39}
40
41enum ComponentAdminState {
42 COMP_ADMIN_STATE_UNDEFINED = 0;
43 COMP_ADMIN_STATE_UNKNOWN = 1;
44 COMP_ADMIN_STATE_LOCKED = 2;
45 COMP_ADMIN_STATE_SHUTTING_DOWN = 3;
46 COMP_ADMIN_STATE_UNLOCKED = 4;
Amit Ghoshe45d9972025-06-26 14:52:48 +020047 // Indicates that the component is in a prohibited administrative state, meaning operations are not allowed.
48 // Typically used to enforce security or policy restrictions.
49 COMP_ADMIN_STATE_ISOLATED = 6;
50 // Indicates that the component is administratively isolated from the rest of the system.
51 // Used when a component must be separated for maintenance, troubleshooting, or security reasons.
52 COMP_ADMIN_STATE_PROHIBITED = 5;
Amit Ghosh09f28362020-06-12 21:52:19 +010053}
54
55enum ComponentOperState {
56 COMP_OPER_STATE_UNDEFINED = 0;
57 COMP_OPER_STATE_UNKNOWN = 1;
58 COMP_OPER_STATE_DISABLED = 2;
59 COMP_OPER_STATE_ENABLED = 3;
60 COMP_OPER_STATE_TESTING = 4;
Amit Ghoshe45d9972025-06-26 14:52:48 +020061 // Indicates that the component is operating normally.
62 COMP_OPER_STATE_NORMAL = 5;
63 // Indicates that the component is currently being configured.
64 COMP_OPER_STATE_CONFIGURING = 6;
65 // Indicates that the component is automatically loading configuration or software.
66 COMP_OPER_STATE_AUTOMATIC_LOADING = 7;
67 // Indicates that the component has encountered a failure.
68 COMP_OPER_STATE_FAILED = 8;
69 // Indicates that the component is temporarily shut down.
70 // The component is in a high temperature shutdown state due to exceeding safe operating temperature limits.
71 COMP_OPER_STATE_HIGH_TEMP_SHUTDOWN= 9;
72 // Indicates that the component is manually shut down.
73 COMP_OPER_STATE_MANUAL_SHUTDOWN = 10;
74 // Indicates that the component is shut down to save power.
75 COMP_OPER_STATE_POWER_SAVING_SHUTDOWN = 11;
76 // Indicates that the component's type does not match the expected type.
77 COMP_OPER_STATE_TYPE_MISMATCH = 12;
Amit Ghosh09f28362020-06-12 21:52:19 +010078}
79
80enum ComponentUsageState {
81 COMP_USAGE_STATE_UNDEFINED = 0;
82 COMP_USAGE_STATE_UNKNOWN = 1;
83 COMP_USAGE_STATE_IDLE = 2;
84 COMP_USAGE_STATE_ACTIVE = 3;
85 COMP_USAGE_STATE_BUSY = 4;
86}
87
88enum ComponentAlarmState {
89 COMP_ALARM_STATE_UNDEFINED = 0;
90 COMP_ALARM_STATE_UNKNOWN = 1;
91 COMP_ALARM_STATE_UNDER_REPAIR= 2;
92 COMP_ALARM_STATE_CRITICAL = 3;
93 COMP_ALARM_STATE_MAJOR = 4;
94 COMP_ALARM_STATE_MINOR = 5;
95 COMP_ALARM_STATE_WARNING = 6;
amit.ghosh3a5c7f12020-12-11 13:56:26 +010096 COMP_ALARM_STATE_INDETERMINATE = 7;
Amit Ghosh09f28362020-06-12 21:52:19 +010097}
98
99enum ComponentStandbyState {
100 COMP_STANDBY_STATE_UNDEFINED = 0;
101 COMP_STANDBY_STATE_UNKNOWN = 1;
102 COMP_STANDBY_STATE_HOT = 2;
103 COMP_STANDBY_STATE_COLD = 3;
104 COMP_STANDBY_STATE_PROVIDING_SERVICE = 4;
105}
106
107message ComponentState {
108 google.protobuf.Timestamp state_last_changed = 1;
109 ComponentAdminState admin_state = 2;
110 ComponentOperState oper_state = 3;
111 ComponentUsageState usage_state = 4;
112 ComponentAlarmState alarm_state = 5;
113 ComponentStandbyState standby_state = 6;
114}
115
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100116enum DataValueType {
117 VALUE_TYPE_UNDEFINED = 0;
118 VALUE_TYPE_OTHER = 1;
119 VALUE_TYPE_UNKNOWN = 2;
120 VALUE_TYPE_VOLTS_AC = 3;
121 VALUE_TYPE_VOLTS_DC = 4;
122 VALUE_TYPE_AMPERES = 5;
123 VALUE_TYPE_WATTS = 6;
124 VALUE_TYPE_HERTZ = 7;
125 VALUE_TYPE_CELSIUS = 8;
126 VALUE_TYPE_PERCENT_RH = 9;
127 VALUE_TYPE_RPM = 10;
128 VALUE_TYPE_CMM = 11;
129 VALUE_TYPE_TRUTH_VALUE = 12;
amit.ghoshf54a9a32021-03-10 16:39:54 +0100130 VALUE_TYPE_PERCENT = 13;
131 VALUE_TYPE_METERS = 14;
132 VALUE_TYPE_BYTES = 15;
amit.ghosh93921ec2022-09-08 17:22:40 +0200133 VALUE_TYPE_DBM = 16;
Amit Ghosh09f28362020-06-12 21:52:19 +0100134}
135
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100136enum ValueScale {
137 VALUE_SCALE_UNDEFINED = 0;
138 VALUE_SCALE_YOCTO = 1;
139 VALUE_SCALE_ZEPTO = 2;
140 VALUE_SCALE_ATTO = 3;
141 VALUE_SCALE_FEMTO = 4;
142 VALUE_SCALE_PICO = 5;
143 VALUE_SCALE_NANO = 6;
144 VALUE_SCALE_MICRO = 7;
145 VALUE_SCALE_MILLI = 8;
146 VALUE_SCALE_UNITS = 9;
147 VALUE_SCALE_KILO = 10;
148 VALUE_SCALE_MEGA = 11;
149 VALUE_SCALE_GIGA = 12;
150 VALUE_SCALE_TERA = 13;
151 VALUE_SCALE_PETA = 14;
152 VALUE_SCALE_EXA = 15;
153 VALUE_SCALE_ZETTA = 16;
154 VALUE_SCALE_YOTTA =17;
Amit Ghosh09f28362020-06-12 21:52:19 +0100155}
156
157enum SensorStatus {
158 SENSOR_STATUS_UNDEFINED = 0;
159 SENSOR_STATUS_OK = 1;
160 SENSOR_STATUS_UNAVAILABLE = 2;
161 SENSOR_STATUS_NONOPERATIONAL = 3;
162}
163
Girish Gowdra997432d2022-03-10 15:59:33 -0800164enum TransceiverType {
165 TYPE_UNDEFINED = 0;
166 ETHERNET = 1;
167 GPON = 2;
168 XGPON = 3;
169 XGSPON = 4;
170 CPON = 5;
171 NG_PON2 = 6;
172 EPON = 7;
amit.ghoshecfad5d2022-03-17 13:37:14 +0100173 COMBO_GPON_XGSPON = 8;
Girish Gowdra997432d2022-03-10 15:59:33 -0800174 // Add more here
175
176 TYPE_NOT_DETECTED = 255;
177}
178
Amit Ghosh09f28362020-06-12 21:52:19 +0100179message ComponentSensorData {
180 int32 value = 1;
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100181 DataValueType type = 2;
182 ValueScale scale = 3;
Amit Ghosh09f28362020-06-12 21:52:19 +0100183 int32 precision = 4;
184 SensorStatus status = 5;
185 string units_display = 6;
186 google.protobuf.Timestamp timestamp = 7;
187 uint32 value_update_rate = 8;
188 // data_type can be of the string representation of MetricNames or something else as well
189 string data_type = 9;
190}
191
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100192message PortComponentAttributes{
193 enum ConnectorType {
194 CONNECTOR_TYPE_UNDEFINED = 0;
195 RJ45 = 1;
196 FIBER_LC = 2;
197 FIBER_SC_PC = 3;
198 FIBER_MPO = 4;
amit.ghosh6682fef2021-03-19 14:53:37 +0100199 RS232 = 5;
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100200 }
201 enum Speed {
202 SPEED_UNDEFINED = 0;
203 DYNAMIC = 1;
204 GIGABIT_1 = 2;
205 GIGABIT_10 = 3;
206 GIGABIT_25 = 4;
207 GIGABIT_40 = 5;
208 GIGABIT_100 = 6;
209 GIGABIT_400 = 7;
210 MEGABIT_2500 = 8;
211 MEGABIT_1250 = 9;
212 }
213 enum Protocol {
214 PROTOCOL_UNDEFINED = 0;
215 ETHERNET = 1;
216 GPON = 2;
217 XGPON = 3;
218 XGSPON = 4;
219 GFAST = 5;
220 SERIAL = 6;
221 EPON = 7;
amit.ghosh6682fef2021-03-19 14:53:37 +0100222 BITS = 8;
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100223 }
224 ConnectorType connector_type = 1;
225 Speed speed = 2;
226 Protocol protocol = 3;
227 string physical_label = 4;
amit.ghosh98c5a6c2021-08-12 16:19:46 +0200228 // The mapping_label can be used to map ports between the DMI interface and other systems like VOLTHA
229 // The value of the mapping_label should be exactly the same as generated for the same port by the other
230 // system
231 string mapping_label = 5;
232 PonIdConfig pon_id_config = 6;
Andrea Campanellafcd22292021-08-27 10:45:46 +0200233 bool speed_autonegotiation = 7; //Only valid for ethernet type port components. True if enabled, false otherwise.
Abhilash laxmeshward4a9fa32023-09-15 16:10:22 +0530234 PonDistance distance = 8; //Pon max distance and max differential reach distance.
amit.ghosh98c5a6c2021-08-12 16:19:46 +0200235}
236
Abhilash laxmeshward4a9fa32023-09-15 16:10:22 +0530237message PonDistance {
238 /*
239 * The ITU-T G.987.x series of Recommendations addresses the linear extent parameters of XG-PON
240 * using the single concept of fibre distance. An ONU is characterized by its fibre distance, and for
241 * each pair of ONUs on the same OLT PON interface, the differential fibre distance is the difference
242 * between the two individual fibre distances. Each specific PMD layer parameter set contains a
243 * provision to support a specific maximum fibre distance. The XG-PON TC layer specification
244 * contains a provision to support specific ranges of maximum fibre distance and maximum
245 * differential fibre distance. These ranges can be configurable for a given system. One can expect that
246 * for each XG-PON deployment, the configured TC layer maximum fibre distance will match the
247 * maximum fibre distance supported by the selected PMD layer parameter set.
248 */
249 uint32 max_distance = 1; //Distance in kilometers the maximum logical distance on an ONU on the PON
250 uint32 max_differential_distance = 2; // maximum distance between the closest ONU to the farthest ONU in km.
251}
amit.ghosh98c5a6c2021-08-12 16:19:46 +0200252message PortComponentChangeAttributes {
253 PonIdConfig pon_id_config = 1;
Abhilash laxmeshward4a9fa32023-09-15 16:10:22 +0530254 PonDistance distance = 2; //Pon max distance and max differential reach distance.
amit.ghosh98c5a6c2021-08-12 16:19:46 +0200255}
256
Girish Gowdra997432d2022-03-10 15:59:33 -0800257message TransceiverComponentChangeAttributes {
258 TransceiverType trans_type = 1;
259}
260
amit.ghosh98c5a6c2021-08-12 16:19:46 +0200261message PonIdConfig {
262 // The pon_id and pon_id_transmit_periodicity attributes are valid only for ports of type GPON, XGPON and XGSPON
263 // For GPON pon_id is a 7 byte value
264 // For XGS-PON, it's a 32 bit value, should be encoded in the first 4 bytes of pon_id in network byte order
265 bytes pon_id = 1;
266 uint32 pon_id_transmit_periodicity = 2; // The value is in seconds and defaults to 1 second
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100267}
268
269message ContainerComponentAttributes{
270 string physical_label = 1;
271}
272
273message PsuComponentAttributes{
274 enum SupportedVoltage {
275 SUPPORTED_VOLTAGE_UNDEFINED = 0;
276 V48 = 1;
277 V230 = 2;
278 V115 = 3;
279 }
280 SupportedVoltage supported_voltage = 1;
281}
282
283message TransceiverComponentsAttributes{
284 enum FormFactor {
285 FORM_FACTOR_UNKNOWN = 0;
286 QSFP = 1;
287 QSFP_PLUS = 2;
288 QSFP28 = 3;
289 SFP = 4;
290 SFP_PLUS = 5;
291 XFP = 6;
292 CFP4 = 7;
293 CFP2 = 8;
294 CPAK = 9;
295 X2 = 10;
296 OTHER = 11;
297 CFP = 12;
298 CFP2_ACO = 13;
299 CFP2_DCO = 14;
amit.ghoshb68828f2023-10-25 18:56:01 +0200300 QSFP_DD = 15;
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100301 }
302
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100303 FormFactor form_factor = 1;
Girish Gowdra997432d2022-03-10 15:59:33 -0800304 TransceiverType trans_type = 2;
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100305 // The maximum reach that can be achieved by this transceiver
306 uint32 max_distance = 3;
307 ValueScale max_distance_scale = 4;
308 // The receive and transmit wavelengths that the transeiver operates on
309 repeated uint32 rx_wavelength = 5;
310 repeated uint32 tx_wavelength = 6;
311 ValueScale wavelength_scale = 7;
amit.ghosh52abaae2022-11-28 13:59:22 +0100312 // The tx powers on the transceiver; the value type of tx_power should be dBm.
313 // Note: When there are multiple rx/tx wavelengths and powers
314 // each of the corresponding ones should be aligned on the same index of the array
315 repeated int32 tx_power = 8;
316 ValueScale tx_power_scale = 9;
317
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100318}
319
Amit Ghosh09f28362020-06-12 21:52:19 +0100320message Component {
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100321 // The name of a component uniquely identifies a component within the hardware
Amit Ghosh09f28362020-06-12 21:52:19 +0100322 string name = 1;
323 ComponentType class = 2;
324 string description = 3;
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100325 // The name of the parent of this component, empty string("") in case of the root component
Amit Ghosh121f7c22020-07-21 10:18:38 +0100326 string parent = 4;
Amit Ghosh09f28362020-06-12 21:52:19 +0100327 int32 parent_rel_pos = 5;
328 repeated Component children = 6;
329 string hardware_rev = 7;
330 string firmware_rev = 8;
331 string software_rev = 9;
332 string serial_num = 10;
333 string mfg_name = 11;
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100334 // Apart from the definition of this attribute as defined in RFC 8348, implementations could choose to carry
335 // the manufacturer's part number in this attribute.
Amit Ghosh09f28362020-06-12 21:52:19 +0100336 string model_name = 12;
337 string alias = 13;
338 string asset_id = 14;
339 bool is_fru = 15;
340 google.protobuf.Timestamp mfg_date = 16;
341 Uri uri = 17;
342 // The uuid of the component uniquely identifies the component across the entire system
343 Uuid uuid= 18;
344 ComponentState state = 19;
345 repeated ComponentSensorData sensor_data = 20;
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100346 // The attribute 'specific' can be populated for components where more details are required by the users of the DMI interface
347 oneof specific {
348 PortComponentAttributes port_attr = 50;
349 ContainerComponentAttributes container_attr = 51;
350 PsuComponentAttributes psu_attr = 52;
351 TransceiverComponentsAttributes transceiver_attr = 53;
352 }
Amit Ghosh09f28362020-06-12 21:52:19 +0100353}
354
355message Hardware {
356 google.protobuf.Timestamp last_change = 1;
357 // Each HW has one parent/root and all other components are children of this
358 // The class of the root component would be set as UNDEFINED
359 Component root = 2;
amit.ghosh2a6b60b2021-02-03 15:16:02 +0100360 // TODO: Authentication?
361 // Timestamp at which the hardware last booted
362 google.protobuf.Timestamp last_booted = 3;
Amit Ghosh09f28362020-06-12 21:52:19 +0100363}
364
365// The attributes of a component which are modifiable from the client side
366message ModifiableComponent {
367 // The name has to be unique for each component within the hardware and implementations need to
368 // ascertain this when modifying the name
369 string name = 1;
370 ComponentType class = 2;
371 Component parent = 3;
372 int32 parent_rel_pos = 4;
373 string alias = 5;
374 string asset_id = 6;
375 Uri uri = 7;
376 ComponentAdminState admin_state = 8;
amit.ghosh98c5a6c2021-08-12 16:19:46 +0200377 // The attribute 'specific' can be populated for specific class of components
378 oneof specific {
379 PortComponentChangeAttributes port_attr = 50;
Girish Gowdra997432d2022-03-10 15:59:33 -0800380 TransceiverComponentChangeAttributes trx_attr = 51;
amit.ghosh98c5a6c2021-08-12 16:19:46 +0200381 }
Amit Ghosh09f28362020-06-12 21:52:19 +0100382}