amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 1 | // Copyright (c) 2018 Open Networking Foundation |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at: |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | syntax = "proto3"; |
| 16 | |
khenaidoo | 5fc5cea | 2021-08-11 17:39:16 -0400 | [diff] [blame] | 17 | option go_package = "github.com/opencord/voltha-protos/v5/go/extension"; |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 18 | option java_package = "org.opencord.voltha.extension"; |
| 19 | |
| 20 | package extension; |
| 21 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 22 | import "voltha_protos/ext_config.proto"; |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 23 | import "google/protobuf/empty.proto"; |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 24 | |
khenaidoo | 4c6543e | 2021-10-19 17:25:58 -0400 | [diff] [blame] | 25 | message ValueSet { |
| 26 | string id = 1; |
| 27 | oneof value{ |
| 28 | config.AlarmConfig alarm_config = 2; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | message ValueType { |
| 33 | enum Type { |
| 34 | EMPTY = 0; |
| 35 | DISTANCE = 1; |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | message ValueSpecifier { |
| 40 | string id = 1; |
| 41 | ValueType.Type value = 2; |
| 42 | } |
| 43 | |
| 44 | message ReturnValues { |
| 45 | uint32 Set = 1; // Specifies what values are |
| 46 | // set/valid in return |
| 47 | |
| 48 | uint32 Unsupported = 2; // Specifies requested values not |
| 49 | // supported by the device |
| 50 | |
| 51 | uint32 Error = 3; // Specifies requested values not |
| 52 | // fetched because of error |
| 53 | |
| 54 | uint32 Distance = 4; // Value of distance Set includes |
| 55 | // DISTANCE |
| 56 | |
| 57 | } |
| 58 | |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 59 | message GetDistanceRequest { |
| 60 | string onuDeviceId = 1; |
| 61 | } |
| 62 | |
| 63 | message GetDistanceResponse { |
| 64 | uint32 distance = 1; // distance in meters |
| 65 | } |
| 66 | |
| 67 | message GetOnuUniInfoRequest { |
| 68 | uint32 uniIndex = 1; // Index of the uni starting from 0 |
| 69 | } |
| 70 | |
| 71 | message GetOnuUniInfoResponse { |
| 72 | enum ConfigurationInd { |
| 73 | UNKOWN = 0; |
| 74 | TEN_BASE_T_FDX = 1; |
| 75 | HUNDRED_BASE_T_FDX = 2; |
| 76 | GIGABIT_ETHERNET_FDX = 3; |
| 77 | TEN_G_ETHERNET_FDX = 4; |
| 78 | TEN_BASE_T_HDX = 5; |
| 79 | HUNDRED_BASE_T_HDX = 6; |
| 80 | GIGABIT_ETHERNET_HDX = 7; |
| 81 | } |
| 82 | |
| 83 | enum AdministrativeState { |
| 84 | ADMSTATE_UNDEFINED = 0; |
| 85 | LOCKED = 1; |
| 86 | UNLOCKED = 2; |
| 87 | } |
| 88 | |
| 89 | enum OperationalState { |
| 90 | OPERSTATE_UNDEFINED = 0; |
| 91 | ENABLED = 1; |
| 92 | DISABLED = 2; |
| 93 | } |
| 94 | |
| 95 | AdministrativeState admState = 1; |
| 96 | OperationalState operState = 2; |
| 97 | ConfigurationInd configInd = 3; |
| 98 | } |
| 99 | |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 100 | message GetOltPortCounters { |
| 101 | enum PortType { |
| 102 | Port_UNKNOWN = 0; |
| 103 | Port_ETHERNET_NNI = 1; |
| 104 | Port_PON_OLT = 2; |
| 105 | } |
| 106 | uint32 portNo = 1; // Device-unique port number |
| 107 | PortType portType = 2; |
| 108 | } |
| 109 | |
| 110 | message GetOltPortCountersResponse { |
| 111 | uint64 txBytes = 1; |
| 112 | uint64 rxBytes = 2; |
| 113 | uint64 txPackets = 3; |
| 114 | uint64 rxPackets = 4; |
| 115 | uint64 txErrorPackets = 5; |
| 116 | uint64 rxErrorPackets = 6; |
| 117 | uint64 txBcastPackets = 7; |
| 118 | uint64 rxBcastPackets = 8; |
| 119 | uint64 txUcastPackets = 9; |
| 120 | uint64 rxUcastPackets = 10; |
| 121 | uint64 txMcastPackets = 11; |
| 122 | uint64 rxMcastPackets = 12; |
| 123 | } |
| 124 | |
| 125 | message GetOnuPonOpticalInfo { |
| 126 | google.protobuf.Empty empty = 1; |
| 127 | } |
| 128 | |
Girish Gowdra | b1d742d | 2021-05-01 15:34:32 -0700 | [diff] [blame] | 129 | // These values correspond to the Optical Line Supervision Test results |
| 130 | // described in section A3.39.5 of ITU-T G.988 (11/2017) specification. |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 131 | message GetOnuPonOpticalInfoResponse{ |
Girish Gowdra | b1d742d | 2021-05-01 15:34:32 -0700 | [diff] [blame] | 132 | float powerFeedVoltage = 1; // unit of value is voltage |
| 133 | float receivedOpticalPower = 2; // unit of value is dBm |
| 134 | float meanOpticalLaunchPower = 3; // unit of value is dBm |
Girish Gowdra | bce9ea7 | 2021-05-05 08:47:49 -0700 | [diff] [blame] | 135 | float laserBiasCurrent = 4; // unit of value is milli-amphere (mA) |
Girish Gowdra | b1d742d | 2021-05-01 15:34:32 -0700 | [diff] [blame] | 136 | float temperature = 5; // unit of value is degree celsius |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | message GetOnuEthernetBridgePortHistory { |
| 140 | enum Direction { |
| 141 | UNDEFINED = 0; |
| 142 | UPSTREAM = 1; |
| 143 | DOWNSTREAM = 2; |
| 144 | } |
| 145 | Direction direction = 1; |
| 146 | } |
| 147 | |
| 148 | message GetOnuEthernetBridgePortHistoryResponse { |
| 149 | uint32 dropEvents = 1; |
| 150 | uint32 octets = 2; |
| 151 | uint32 packets= 3; |
| 152 | uint32 broadcastPackets = 4; |
| 153 | uint32 multicastPackets = 5; |
| 154 | uint32 crcErroredPackets = 6; |
| 155 | uint32 undersizePackets = 7; |
| 156 | uint32 oversizePackets = 8; |
| 157 | uint32 packets64octets = 9; |
| 158 | uint32 packets65To127octets = 10; |
| 159 | uint32 packets128To255Octets = 11; |
| 160 | uint32 packets256To511octets = 12; |
| 161 | uint32 packets512To1023octets = 13; |
| 162 | uint32 packets1024To1518octets = 14; |
| 163 | } |
| 164 | |
| 165 | message GetOnuFecHistory { |
| 166 | google.protobuf.Empty empty = 1; |
| 167 | } |
| 168 | |
| 169 | message GetOnuFecHistoryResponse { |
| 170 | uint32 correctedBytes = 1; |
| 171 | uint32 correctedCodeWords = 2; |
| 172 | uint32 fecSeconds = 3; |
| 173 | uint32 totalCodeWords = 4; |
| 174 | uint32 uncorrectableCodeWords = 5; |
| 175 | } |
| 176 | |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 177 | message GetOnuCountersRequest { |
| 178 | fixed32 intf_id = 1; |
| 179 | fixed32 onu_id = 2; |
| 180 | } |
| 181 | |
Himani Chawla | 9a49739 | 2021-05-28 13:04:42 +0530 | [diff] [blame] | 182 | message GetOmciEthernetFrameExtendedPmRequest { |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 183 | string onuDeviceId = 1; |
Himani Chawla | 393605c | 2021-08-30 13:44:13 +0530 | [diff] [blame] | 184 | oneof is_uni_index { |
| 185 | uint32 uniIndex = 2; // Index of the uni starting from 0 |
| 186 | } |
| 187 | bool reset = 3; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 188 | } |
| 189 | |
Gamze Abaka | 0868307 | 2021-05-26 13:38:02 +0000 | [diff] [blame] | 190 | message GetRxPowerRequest { |
| 191 | fixed32 intf_id = 1; |
| 192 | fixed32 onu_id = 2; |
| 193 | } |
| 194 | |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 195 | message GetOnuCountersResponse { |
| 196 | oneof is_intf_id { |
| 197 | fixed32 intf_id = 1; |
| 198 | } |
| 199 | oneof is_onu_id { |
| 200 | fixed32 onu_id = 2; |
| 201 | } |
| 202 | oneof is_positive_drift { |
| 203 | fixed64 positive_drift = 3; |
| 204 | } |
| 205 | oneof is_negative_drift { |
| 206 | fixed64 negative_drift = 4; |
| 207 | } |
| 208 | oneof is_delimiter_miss_detection { |
| 209 | fixed64 delimiter_miss_detection = 5; |
| 210 | } |
| 211 | oneof is_bip_errors { |
| 212 | fixed64 bip_errors = 6; |
| 213 | } |
| 214 | oneof is_bip_units { |
| 215 | fixed64 bip_units = 7; |
| 216 | } |
| 217 | oneof is_fec_corrected_symbols { |
| 218 | fixed64 fec_corrected_symbols = 8; |
| 219 | } |
| 220 | oneof is_fec_codewords_corrected { |
| 221 | fixed64 fec_codewords_corrected = 9; |
| 222 | } |
| 223 | oneof is_fec_codewords_uncorrectable { |
| 224 | fixed64 fec_codewords_uncorrectable = 10; |
| 225 | } |
| 226 | oneof is_fec_codewords { |
| 227 | fixed64 fec_codewords = 11; |
| 228 | } |
| 229 | oneof is_fec_corrected_units { |
| 230 | fixed64 fec_corrected_units = 12; |
| 231 | } |
| 232 | oneof is_xgem_key_errors { |
| 233 | fixed64 xgem_key_errors = 13; |
| 234 | } |
| 235 | oneof is_xgem_loss { |
| 236 | fixed64 xgem_loss = 14; |
| 237 | } |
| 238 | oneof is_rx_ploams_error { |
| 239 | fixed64 rx_ploams_error = 15; |
| 240 | } |
| 241 | oneof is_rx_ploams_non_idle { |
| 242 | fixed64 rx_ploams_non_idle = 16; |
| 243 | } |
| 244 | oneof is_rx_omci { |
| 245 | fixed64 rx_omci = 17; |
| 246 | } |
| 247 | oneof is_tx_omci { |
| 248 | fixed64 tx_omci = 18; |
| 249 | } |
| 250 | oneof is_rx_omci_packets_crc_error { |
| 251 | fixed64 rx_omci_packets_crc_error = 19; |
| 252 | } |
| 253 | oneof is_rx_bytes { |
| 254 | fixed64 rx_bytes = 20; |
| 255 | } |
| 256 | oneof is_rx_packets { |
| 257 | fixed64 rx_packets = 21; |
| 258 | } |
| 259 | oneof is_tx_bytes { |
| 260 | fixed64 tx_bytes = 22; |
| 261 | } |
| 262 | oneof is_tx_packets { |
| 263 | fixed64 tx_packets = 23; |
| 264 | } |
| 265 | oneof is_ber_reported { |
| 266 | fixed64 ber_reported = 24; |
| 267 | } |
| 268 | oneof is_lcdg_errors { |
| 269 | fixed64 lcdg_errors = 25; |
| 270 | } |
| 271 | oneof is_rdi_errors { |
| 272 | fixed64 rdi_errors = 26; |
| 273 | } |
| 274 | oneof is_timestamp { |
| 275 | // reported timestamp in seconds since epoch |
| 276 | fixed32 timestamp = 27; |
| 277 | } |
| 278 | } |
| 279 | |
Himani Chawla | 9a49739 | 2021-05-28 13:04:42 +0530 | [diff] [blame] | 280 | message OmciEthernetFrameExtendedPm { |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 281 | fixed64 drop_events = 1; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 282 | fixed64 octets = 2; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 283 | fixed64 frames = 3; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 284 | fixed64 broadcast_frames = 4; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 285 | fixed64 multicast_frames = 5; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 286 | fixed64 crc_errored_frames = 6; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 287 | fixed64 undersize_frames = 7; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 288 | fixed64 oversize_frames = 8; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 289 | fixed64 frames_64_octets = 9; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 290 | fixed64 frames_65_to_127_octets = 10; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 291 | fixed64 frames_128_to_255_octets = 11; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 292 | fixed64 frames_256_to_511_octets = 12; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 293 | fixed64 frames_512_to_1023_octets = 13; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 294 | fixed64 frames_1024_to_1518_octets = 14; |
Himani Chawla | 9a49739 | 2021-05-28 13:04:42 +0530 | [diff] [blame] | 295 | } |
| 296 | |
| 297 | message GetOmciEthernetFrameExtendedPmResponse { |
Himani Chawla | 654f7f3 | 2021-08-25 16:31:24 +0530 | [diff] [blame] | 298 | enum Format { |
| 299 | THIRTY_TWO_BIT = 0; |
| 300 | SIXTY_FOUR_BIT = 1; |
| 301 | } |
Himani Chawla | 9a49739 | 2021-05-28 13:04:42 +0530 | [diff] [blame] | 302 | OmciEthernetFrameExtendedPm upstream = 1; |
| 303 | OmciEthernetFrameExtendedPm downstream = 2; |
Himani Chawla | 654f7f3 | 2021-08-25 16:31:24 +0530 | [diff] [blame] | 304 | Format omci_ethernet_frame_extended_pm_format= 3; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 305 | } |
| 306 | |
Gamze Abaka | 0868307 | 2021-05-26 13:38:02 +0000 | [diff] [blame] | 307 | message GetRxPowerResponse { |
| 308 | fixed32 intf_id= 1; |
| 309 | fixed32 onu_id = 2; |
| 310 | string status = 3; |
| 311 | string fail_reason = 4; |
| 312 | double rx_power = 5; |
| 313 | } |
| 314 | |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 315 | message GetValueRequest { |
| 316 | oneof request { |
| 317 | GetDistanceRequest distance = 1; |
| 318 | GetOnuUniInfoRequest uniInfo = 2; |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 319 | // Corresponds to PmMetricId.PON_PORT_COUNTERS, PmMetricId.NNI_PORT_COUNTERS |
| 320 | GetOltPortCounters oltPortInfo = 3; |
| 321 | // Corresponds to PmMetricId.PON_OPTICAL |
| 322 | GetOnuPonOpticalInfo onuOpticalInfo = 4; |
| 323 | // Corresponds to PmMetricId.ETHERNET_BRIDGE_PORT_HISTORY |
| 324 | GetOnuEthernetBridgePortHistory ethBridgePort = 5; |
| 325 | // Corresponds to PmMetricId.FEC_HISTORY |
Gamze Abaka | 0868307 | 2021-05-26 13:38:02 +0000 | [diff] [blame] | 326 | GetOnuFecHistory fecHistory = 6; |
| 327 | GetOnuCountersRequest onuPonInfo = 7; |
Himani Chawla | 9a49739 | 2021-05-28 13:04:42 +0530 | [diff] [blame] | 328 | GetOmciEthernetFrameExtendedPmRequest onuInfo = 8; |
Gamze Abaka | 0868307 | 2021-05-26 13:38:02 +0000 | [diff] [blame] | 329 | GetRxPowerRequest rxPower = 9; |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 330 | } |
| 331 | } |
| 332 | |
| 333 | message GetValueResponse { |
| 334 | enum Status { |
| 335 | STATUS_UNDEFINED = 0; |
| 336 | OK = 1; |
| 337 | ERROR = 2; |
| 338 | } |
| 339 | |
| 340 | enum ErrorReason { |
| 341 | REASON_UNDEFINED = 0; |
| 342 | UNSUPPORTED = 1; |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 343 | INVALID_DEVICE_ID = 2; |
| 344 | INVALID_PORT_TYPE = 3; |
| 345 | TIMEOUT = 4; |
| 346 | INVALID_REQ_TYPE = 5; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame] | 347 | INTERNAL_ERROR = 6; |
| 348 | INVALID_DEVICE = 7; |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 349 | } |
| 350 | Status status = 1; |
| 351 | ErrorReason errReason = 2; |
| 352 | |
| 353 | oneof response { |
| 354 | GetDistanceResponse distance = 3; |
| 355 | GetOnuUniInfoResponse uniInfo = 4; |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 356 | GetOltPortCountersResponse portCoutners = 5; |
| 357 | GetOnuPonOpticalInfoResponse onuOpticalInfo = 6; |
| 358 | GetOnuEthernetBridgePortHistoryResponse ethBridgePortInfo = 7; |
| 359 | GetOnuFecHistoryResponse fecHistory = 8; |
Gamze Abaka | 0868307 | 2021-05-26 13:38:02 +0000 | [diff] [blame] | 360 | GetOnuCountersResponse onuPonCounters = 9; |
Himani Chawla | 9a49739 | 2021-05-28 13:04:42 +0530 | [diff] [blame] | 361 | GetOmciEthernetFrameExtendedPmResponse onuCounters = 10; |
Gamze Abaka | 0868307 | 2021-05-26 13:38:02 +0000 | [diff] [blame] | 362 | GetRxPowerResponse rxPower = 11; |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 363 | } |
| 364 | } |
| 365 | |
| 366 | message SetValueRequest { |
| 367 | oneof request { |
| 368 | config.AlarmConfig alarm_config = 1; |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | message SetValueResponse { |
| 373 | enum Status { |
| 374 | STATUS_UNDEFINED = 0; |
| 375 | OK = 1; |
| 376 | ERROR = 2; |
| 377 | } |
| 378 | |
| 379 | enum ErrorReason { |
| 380 | REASON_UNDEFINED = 0; |
| 381 | UNSUPPORTED = 1; |
| 382 | } |
| 383 | Status status = 1; |
| 384 | ErrorReason errReason = 2; |
| 385 | |
| 386 | // As of now we don't have any explicit response for the supported SetValueRequests |
| 387 | // to be used later |
| 388 | //oneof response { |
| 389 | // |
| 390 | //} |
| 391 | } |
| 392 | |
| 393 | message SingleGetValueRequest { |
| 394 | string targetId = 1; |
| 395 | GetValueRequest request = 2; |
| 396 | } |
| 397 | |
| 398 | message SingleGetValueResponse{ |
| 399 | GetValueResponse response = 1; |
| 400 | } |
| 401 | |
| 402 | message SingleSetValueRequest { |
| 403 | string targetId = 1; |
| 404 | SetValueRequest request = 2; |
| 405 | } |
| 406 | message SingleSetValueResponse { |
| 407 | SetValueResponse response = 1; |
| 408 | } |
| 409 | |
| 410 | // Extension is a service to get and set specific attributes |
| 411 | service Extension { |
| 412 | // Get a single attribute |
| 413 | rpc GetExtValue(SingleGetValueRequest) returns (SingleGetValueResponse); |
| 414 | // Set a single attribute |
| 415 | rpc SetExtValue(SingleSetValueRequest) returns (SingleSetValueResponse); |
| 416 | } |