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 "google/protobuf/timestamp.proto";
|
| 7 |
|
| 8 | // The model used to represent a HW is based on RFC8348 (https://tools.ietf.org/html/rfc8348)
|
| 9 |
|
| 10 | message Uuid {
|
| 11 | string uuid = 1;
|
| 12 | }
|
| 13 |
|
| 14 | message HardwareID {
|
| 15 | Uuid uuid = 1;
|
| 16 | }
|
| 17 |
|
| 18 | message Uri {
|
| 19 | string uri = 1;
|
| 20 | }
|
| 21 |
|
| 22 | enum 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.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 37 | // A component of type "TRANSCEIVER" could have 0 or more components of type "PORT" as children.
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 38 | COMPONENT_TYPE_TRANSCEIVER = 14;
|
| 39 | }
|
| 40 |
|
| 41 | enum 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;
|
| 47 | }
|
| 48 |
|
| 49 | enum ComponentOperState {
|
| 50 | COMP_OPER_STATE_UNDEFINED = 0;
|
| 51 | COMP_OPER_STATE_UNKNOWN = 1;
|
| 52 | COMP_OPER_STATE_DISABLED = 2;
|
| 53 | COMP_OPER_STATE_ENABLED = 3;
|
| 54 | COMP_OPER_STATE_TESTING = 4;
|
| 55 | }
|
| 56 |
|
| 57 | enum ComponentUsageState {
|
| 58 | COMP_USAGE_STATE_UNDEFINED = 0;
|
| 59 | COMP_USAGE_STATE_UNKNOWN = 1;
|
| 60 | COMP_USAGE_STATE_IDLE = 2;
|
| 61 | COMP_USAGE_STATE_ACTIVE = 3;
|
| 62 | COMP_USAGE_STATE_BUSY = 4;
|
| 63 | }
|
| 64 |
|
| 65 | enum ComponentAlarmState {
|
| 66 | COMP_ALARM_STATE_UNDEFINED = 0;
|
| 67 | COMP_ALARM_STATE_UNKNOWN = 1;
|
| 68 | COMP_ALARM_STATE_UNDER_REPAIR= 2;
|
| 69 | COMP_ALARM_STATE_CRITICAL = 3;
|
| 70 | COMP_ALARM_STATE_MAJOR = 4;
|
| 71 | COMP_ALARM_STATE_MINOR = 5;
|
| 72 | COMP_ALARM_STATE_WARNING = 6;
|
amit.ghosh | 3a5c7f1 | 2020-12-11 13:56:26 +0100 | [diff] [blame] | 73 | COMP_ALARM_STATE_INDETERMINATE = 7;
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 74 | }
|
| 75 |
|
| 76 | enum ComponentStandbyState {
|
| 77 | COMP_STANDBY_STATE_UNDEFINED = 0;
|
| 78 | COMP_STANDBY_STATE_UNKNOWN = 1;
|
| 79 | COMP_STANDBY_STATE_HOT = 2;
|
| 80 | COMP_STANDBY_STATE_COLD = 3;
|
| 81 | COMP_STANDBY_STATE_PROVIDING_SERVICE = 4;
|
| 82 | }
|
| 83 |
|
| 84 | message ComponentState {
|
| 85 | google.protobuf.Timestamp state_last_changed = 1;
|
| 86 | ComponentAdminState admin_state = 2;
|
| 87 | ComponentOperState oper_state = 3;
|
| 88 | ComponentUsageState usage_state = 4;
|
| 89 | ComponentAlarmState alarm_state = 5;
|
| 90 | ComponentStandbyState standby_state = 6;
|
| 91 | }
|
| 92 |
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 93 | enum DataValueType {
|
| 94 | VALUE_TYPE_UNDEFINED = 0;
|
| 95 | VALUE_TYPE_OTHER = 1;
|
| 96 | VALUE_TYPE_UNKNOWN = 2;
|
| 97 | VALUE_TYPE_VOLTS_AC = 3;
|
| 98 | VALUE_TYPE_VOLTS_DC = 4;
|
| 99 | VALUE_TYPE_AMPERES = 5;
|
| 100 | VALUE_TYPE_WATTS = 6;
|
| 101 | VALUE_TYPE_HERTZ = 7;
|
| 102 | VALUE_TYPE_CELSIUS = 8;
|
| 103 | VALUE_TYPE_PERCENT_RH = 9;
|
| 104 | VALUE_TYPE_RPM = 10;
|
| 105 | VALUE_TYPE_CMM = 11;
|
| 106 | VALUE_TYPE_TRUTH_VALUE = 12;
|
amit.ghosh | f54a9a3 | 2021-03-10 16:39:54 +0100 | [diff] [blame] | 107 | VALUE_TYPE_PERCENT = 13;
|
| 108 | VALUE_TYPE_METERS = 14;
|
| 109 | VALUE_TYPE_BYTES = 15;
|
amit.ghosh | 93921ec | 2022-09-08 17:22:40 +0200 | [diff] [blame] | 110 | VALUE_TYPE_DBM = 16;
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 111 | }
|
| 112 |
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 113 | enum ValueScale {
|
| 114 | VALUE_SCALE_UNDEFINED = 0;
|
| 115 | VALUE_SCALE_YOCTO = 1;
|
| 116 | VALUE_SCALE_ZEPTO = 2;
|
| 117 | VALUE_SCALE_ATTO = 3;
|
| 118 | VALUE_SCALE_FEMTO = 4;
|
| 119 | VALUE_SCALE_PICO = 5;
|
| 120 | VALUE_SCALE_NANO = 6;
|
| 121 | VALUE_SCALE_MICRO = 7;
|
| 122 | VALUE_SCALE_MILLI = 8;
|
| 123 | VALUE_SCALE_UNITS = 9;
|
| 124 | VALUE_SCALE_KILO = 10;
|
| 125 | VALUE_SCALE_MEGA = 11;
|
| 126 | VALUE_SCALE_GIGA = 12;
|
| 127 | VALUE_SCALE_TERA = 13;
|
| 128 | VALUE_SCALE_PETA = 14;
|
| 129 | VALUE_SCALE_EXA = 15;
|
| 130 | VALUE_SCALE_ZETTA = 16;
|
| 131 | VALUE_SCALE_YOTTA =17;
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 132 | }
|
| 133 |
|
| 134 | enum SensorStatus {
|
| 135 | SENSOR_STATUS_UNDEFINED = 0;
|
| 136 | SENSOR_STATUS_OK = 1;
|
| 137 | SENSOR_STATUS_UNAVAILABLE = 2;
|
| 138 | SENSOR_STATUS_NONOPERATIONAL = 3;
|
| 139 | }
|
| 140 |
|
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 141 | enum TransceiverType {
|
| 142 | TYPE_UNDEFINED = 0;
|
| 143 | ETHERNET = 1;
|
| 144 | GPON = 2;
|
| 145 | XGPON = 3;
|
| 146 | XGSPON = 4;
|
| 147 | CPON = 5;
|
| 148 | NG_PON2 = 6;
|
| 149 | EPON = 7;
|
amit.ghosh | ecfad5d | 2022-03-17 13:37:14 +0100 | [diff] [blame] | 150 | COMBO_GPON_XGSPON = 8;
|
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 151 | // Add more here
|
| 152 |
|
| 153 | TYPE_NOT_DETECTED = 255;
|
| 154 | }
|
| 155 |
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 156 | message ComponentSensorData {
|
| 157 | int32 value = 1;
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 158 | DataValueType type = 2;
|
| 159 | ValueScale scale = 3;
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 160 | int32 precision = 4;
|
| 161 | SensorStatus status = 5;
|
| 162 | string units_display = 6;
|
| 163 | google.protobuf.Timestamp timestamp = 7;
|
| 164 | uint32 value_update_rate = 8;
|
| 165 | // data_type can be of the string representation of MetricNames or something else as well
|
| 166 | string data_type = 9;
|
| 167 | }
|
| 168 |
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 169 | message PortComponentAttributes{
|
| 170 | enum ConnectorType {
|
| 171 | CONNECTOR_TYPE_UNDEFINED = 0;
|
| 172 | RJ45 = 1;
|
| 173 | FIBER_LC = 2;
|
| 174 | FIBER_SC_PC = 3;
|
| 175 | FIBER_MPO = 4;
|
amit.ghosh | 6682fef | 2021-03-19 14:53:37 +0100 | [diff] [blame] | 176 | RS232 = 5;
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 177 | }
|
| 178 | enum Speed {
|
| 179 | SPEED_UNDEFINED = 0;
|
| 180 | DYNAMIC = 1;
|
| 181 | GIGABIT_1 = 2;
|
| 182 | GIGABIT_10 = 3;
|
| 183 | GIGABIT_25 = 4;
|
| 184 | GIGABIT_40 = 5;
|
| 185 | GIGABIT_100 = 6;
|
| 186 | GIGABIT_400 = 7;
|
| 187 | MEGABIT_2500 = 8;
|
| 188 | MEGABIT_1250 = 9;
|
| 189 | }
|
| 190 | enum Protocol {
|
| 191 | PROTOCOL_UNDEFINED = 0;
|
| 192 | ETHERNET = 1;
|
| 193 | GPON = 2;
|
| 194 | XGPON = 3;
|
| 195 | XGSPON = 4;
|
| 196 | GFAST = 5;
|
| 197 | SERIAL = 6;
|
| 198 | EPON = 7;
|
amit.ghosh | 6682fef | 2021-03-19 14:53:37 +0100 | [diff] [blame] | 199 | BITS = 8;
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 200 | }
|
| 201 | ConnectorType connector_type = 1;
|
| 202 | Speed speed = 2;
|
| 203 | Protocol protocol = 3;
|
| 204 | string physical_label = 4;
|
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 205 | // The mapping_label can be used to map ports between the DMI interface and other systems like VOLTHA
|
| 206 | // The value of the mapping_label should be exactly the same as generated for the same port by the other
|
| 207 | // system
|
| 208 | string mapping_label = 5;
|
| 209 | PonIdConfig pon_id_config = 6;
|
Andrea Campanella | fcd2229 | 2021-08-27 10:45:46 +0200 | [diff] [blame] | 210 | bool speed_autonegotiation = 7; //Only valid for ethernet type port components. True if enabled, false otherwise.
|
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 211 | }
|
| 212 |
|
| 213 | message PortComponentChangeAttributes {
|
| 214 | PonIdConfig pon_id_config = 1;
|
| 215 | }
|
| 216 |
|
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 217 | message TransceiverComponentChangeAttributes {
|
| 218 | TransceiverType trans_type = 1;
|
| 219 | }
|
| 220 |
|
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 221 | message PonIdConfig {
|
| 222 | // The pon_id and pon_id_transmit_periodicity attributes are valid only for ports of type GPON, XGPON and XGSPON
|
| 223 | // For GPON pon_id is a 7 byte value
|
| 224 | // For XGS-PON, it's a 32 bit value, should be encoded in the first 4 bytes of pon_id in network byte order
|
| 225 | bytes pon_id = 1;
|
| 226 | uint32 pon_id_transmit_periodicity = 2; // The value is in seconds and defaults to 1 second
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 227 | }
|
| 228 |
|
| 229 | message ContainerComponentAttributes{
|
| 230 | string physical_label = 1;
|
| 231 | }
|
| 232 |
|
| 233 | message PsuComponentAttributes{
|
| 234 | enum SupportedVoltage {
|
| 235 | SUPPORTED_VOLTAGE_UNDEFINED = 0;
|
| 236 | V48 = 1;
|
| 237 | V230 = 2;
|
| 238 | V115 = 3;
|
| 239 | }
|
| 240 | SupportedVoltage supported_voltage = 1;
|
| 241 | }
|
| 242 |
|
| 243 | message TransceiverComponentsAttributes{
|
| 244 | enum FormFactor {
|
| 245 | FORM_FACTOR_UNKNOWN = 0;
|
| 246 | QSFP = 1;
|
| 247 | QSFP_PLUS = 2;
|
| 248 | QSFP28 = 3;
|
| 249 | SFP = 4;
|
| 250 | SFP_PLUS = 5;
|
| 251 | XFP = 6;
|
| 252 | CFP4 = 7;
|
| 253 | CFP2 = 8;
|
| 254 | CPAK = 9;
|
| 255 | X2 = 10;
|
| 256 | OTHER = 11;
|
| 257 | CFP = 12;
|
| 258 | CFP2_ACO = 13;
|
| 259 | CFP2_DCO = 14;
|
| 260 | }
|
| 261 |
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 262 | FormFactor form_factor = 1;
|
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 263 | TransceiverType trans_type = 2;
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 264 | // The maximum reach that can be achieved by this transceiver
|
| 265 | uint32 max_distance = 3;
|
| 266 | ValueScale max_distance_scale = 4;
|
| 267 | // The receive and transmit wavelengths that the transeiver operates on
|
| 268 | repeated uint32 rx_wavelength = 5;
|
| 269 | repeated uint32 tx_wavelength = 6;
|
| 270 | ValueScale wavelength_scale = 7;
|
amit.ghosh | 52abaae | 2022-11-28 13:59:22 +0100 | [diff] [blame] | 271 | // The tx powers on the transceiver; the value type of tx_power should be dBm.
|
| 272 | // Note: When there are multiple rx/tx wavelengths and powers
|
| 273 | // each of the corresponding ones should be aligned on the same index of the array
|
| 274 | repeated int32 tx_power = 8;
|
| 275 | ValueScale tx_power_scale = 9;
|
| 276 |
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 277 | }
|
| 278 |
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 279 | message Component {
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 280 | // The name of a component uniquely identifies a component within the hardware
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 281 | string name = 1;
|
| 282 | ComponentType class = 2;
|
| 283 | string description = 3;
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 284 | // The name of the parent of this component, empty string("") in case of the root component
|
Amit Ghosh | 121f7c2 | 2020-07-21 10:18:38 +0100 | [diff] [blame] | 285 | string parent = 4;
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 286 | int32 parent_rel_pos = 5;
|
| 287 | repeated Component children = 6;
|
| 288 | string hardware_rev = 7;
|
| 289 | string firmware_rev = 8;
|
| 290 | string software_rev = 9;
|
| 291 | string serial_num = 10;
|
| 292 | string mfg_name = 11;
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 293 | // Apart from the definition of this attribute as defined in RFC 8348, implementations could choose to carry
|
| 294 | // the manufacturer's part number in this attribute.
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 295 | string model_name = 12;
|
| 296 | string alias = 13;
|
| 297 | string asset_id = 14;
|
| 298 | bool is_fru = 15;
|
| 299 | google.protobuf.Timestamp mfg_date = 16;
|
| 300 | Uri uri = 17;
|
| 301 | // The uuid of the component uniquely identifies the component across the entire system
|
| 302 | Uuid uuid= 18;
|
| 303 | ComponentState state = 19;
|
| 304 | repeated ComponentSensorData sensor_data = 20;
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 305 | // The attribute 'specific' can be populated for components where more details are required by the users of the DMI interface
|
| 306 | oneof specific {
|
| 307 | PortComponentAttributes port_attr = 50;
|
| 308 | ContainerComponentAttributes container_attr = 51;
|
| 309 | PsuComponentAttributes psu_attr = 52;
|
| 310 | TransceiverComponentsAttributes transceiver_attr = 53;
|
| 311 | }
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 312 | }
|
| 313 |
|
| 314 | message Hardware {
|
| 315 | google.protobuf.Timestamp last_change = 1;
|
| 316 | // Each HW has one parent/root and all other components are children of this
|
| 317 | // The class of the root component would be set as UNDEFINED
|
| 318 | Component root = 2;
|
amit.ghosh | 2a6b60b | 2021-02-03 15:16:02 +0100 | [diff] [blame] | 319 | // TODO: Authentication?
|
| 320 | // Timestamp at which the hardware last booted
|
| 321 | google.protobuf.Timestamp last_booted = 3;
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 322 | }
|
| 323 |
|
| 324 | // The attributes of a component which are modifiable from the client side
|
| 325 | message ModifiableComponent {
|
| 326 | // The name has to be unique for each component within the hardware and implementations need to
|
| 327 | // ascertain this when modifying the name
|
| 328 | string name = 1;
|
| 329 | ComponentType class = 2;
|
| 330 | Component parent = 3;
|
| 331 | int32 parent_rel_pos = 4;
|
| 332 | string alias = 5;
|
| 333 | string asset_id = 6;
|
| 334 | Uri uri = 7;
|
| 335 | ComponentAdminState admin_state = 8;
|
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 336 | // The attribute 'specific' can be populated for specific class of components
|
| 337 | oneof specific {
|
| 338 | PortComponentChangeAttributes port_attr = 50;
|
Girish Gowdra | 997432d | 2022-03-10 15:59:33 -0800 | [diff] [blame] | 339 | TransceiverComponentChangeAttributes trx_attr = 51;
|
amit.ghosh | 98c5a6c | 2021-08-12 16:19:46 +0200 | [diff] [blame] | 340 | }
|
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 341 | }
|