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 | |
| 17 | option go_package = "github.com/opencord/voltha-protos/v4/go/extension"; |
| 18 | option java_package = "org.opencord.voltha.extension"; |
| 19 | |
| 20 | package extension; |
| 21 | |
| 22 | import public "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 | |
| 25 | message GetDistanceRequest { |
| 26 | string onuDeviceId = 1; |
| 27 | } |
| 28 | |
| 29 | message GetDistanceResponse { |
| 30 | uint32 distance = 1; // distance in meters |
| 31 | } |
| 32 | |
| 33 | message GetOnuUniInfoRequest { |
| 34 | uint32 uniIndex = 1; // Index of the uni starting from 0 |
| 35 | } |
| 36 | |
| 37 | message GetOnuUniInfoResponse { |
| 38 | enum ConfigurationInd { |
| 39 | UNKOWN = 0; |
| 40 | TEN_BASE_T_FDX = 1; |
| 41 | HUNDRED_BASE_T_FDX = 2; |
| 42 | GIGABIT_ETHERNET_FDX = 3; |
| 43 | TEN_G_ETHERNET_FDX = 4; |
| 44 | TEN_BASE_T_HDX = 5; |
| 45 | HUNDRED_BASE_T_HDX = 6; |
| 46 | GIGABIT_ETHERNET_HDX = 7; |
| 47 | } |
| 48 | |
| 49 | enum AdministrativeState { |
| 50 | ADMSTATE_UNDEFINED = 0; |
| 51 | LOCKED = 1; |
| 52 | UNLOCKED = 2; |
| 53 | } |
| 54 | |
| 55 | enum OperationalState { |
| 56 | OPERSTATE_UNDEFINED = 0; |
| 57 | ENABLED = 1; |
| 58 | DISABLED = 2; |
| 59 | } |
| 60 | |
| 61 | AdministrativeState admState = 1; |
| 62 | OperationalState operState = 2; |
| 63 | ConfigurationInd configInd = 3; |
| 64 | } |
| 65 | |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 66 | message GetOltPortCounters { |
| 67 | enum PortType { |
| 68 | Port_UNKNOWN = 0; |
| 69 | Port_ETHERNET_NNI = 1; |
| 70 | Port_PON_OLT = 2; |
| 71 | } |
| 72 | uint32 portNo = 1; // Device-unique port number |
| 73 | PortType portType = 2; |
| 74 | } |
| 75 | |
| 76 | message GetOltPortCountersResponse { |
| 77 | uint64 txBytes = 1; |
| 78 | uint64 rxBytes = 2; |
| 79 | uint64 txPackets = 3; |
| 80 | uint64 rxPackets = 4; |
| 81 | uint64 txErrorPackets = 5; |
| 82 | uint64 rxErrorPackets = 6; |
| 83 | uint64 txBcastPackets = 7; |
| 84 | uint64 rxBcastPackets = 8; |
| 85 | uint64 txUcastPackets = 9; |
| 86 | uint64 rxUcastPackets = 10; |
| 87 | uint64 txMcastPackets = 11; |
| 88 | uint64 rxMcastPackets = 12; |
| 89 | } |
| 90 | |
| 91 | message GetOnuPonOpticalInfo { |
| 92 | google.protobuf.Empty empty = 1; |
| 93 | } |
| 94 | |
Girish Gowdra | b1d742d | 2021-05-01 15:34:32 -0700 | [diff] [blame] | 95 | // These values correspond to the Optical Line Supervision Test results |
| 96 | // 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] | 97 | message GetOnuPonOpticalInfoResponse{ |
Girish Gowdra | b1d742d | 2021-05-01 15:34:32 -0700 | [diff] [blame] | 98 | float powerFeedVoltage = 1; // unit of value is voltage |
| 99 | float receivedOpticalPower = 2; // unit of value is dBm |
| 100 | float meanOpticalLaunchPower = 3; // unit of value is dBm |
Girish Gowdra | bce9ea7 | 2021-05-05 08:47:49 -0700 | [diff] [blame] | 101 | float laserBiasCurrent = 4; // unit of value is milli-amphere (mA) |
Girish Gowdra | b1d742d | 2021-05-01 15:34:32 -0700 | [diff] [blame] | 102 | float temperature = 5; // unit of value is degree celsius |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | message GetOnuEthernetBridgePortHistory { |
| 106 | enum Direction { |
| 107 | UNDEFINED = 0; |
| 108 | UPSTREAM = 1; |
| 109 | DOWNSTREAM = 2; |
| 110 | } |
| 111 | Direction direction = 1; |
| 112 | } |
| 113 | |
| 114 | message GetOnuEthernetBridgePortHistoryResponse { |
| 115 | uint32 dropEvents = 1; |
| 116 | uint32 octets = 2; |
| 117 | uint32 packets= 3; |
| 118 | uint32 broadcastPackets = 4; |
| 119 | uint32 multicastPackets = 5; |
| 120 | uint32 crcErroredPackets = 6; |
| 121 | uint32 undersizePackets = 7; |
| 122 | uint32 oversizePackets = 8; |
| 123 | uint32 packets64octets = 9; |
| 124 | uint32 packets65To127octets = 10; |
| 125 | uint32 packets128To255Octets = 11; |
| 126 | uint32 packets256To511octets = 12; |
| 127 | uint32 packets512To1023octets = 13; |
| 128 | uint32 packets1024To1518octets = 14; |
| 129 | } |
| 130 | |
| 131 | message GetOnuFecHistory { |
| 132 | google.protobuf.Empty empty = 1; |
| 133 | } |
| 134 | |
| 135 | message GetOnuFecHistoryResponse { |
| 136 | uint32 correctedBytes = 1; |
| 137 | uint32 correctedCodeWords = 2; |
| 138 | uint32 fecSeconds = 3; |
| 139 | uint32 totalCodeWords = 4; |
| 140 | uint32 uncorrectableCodeWords = 5; |
| 141 | } |
| 142 | |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame^] | 143 | message GetOnuCountersRequest { |
| 144 | fixed32 intf_id = 1; |
| 145 | fixed32 onu_id = 2; |
| 146 | } |
| 147 | |
| 148 | message GetOnuOMCICountersRequest { |
| 149 | string onuDeviceId = 1; |
| 150 | } |
| 151 | |
| 152 | message GetOnuCountersResponse { |
| 153 | oneof is_intf_id { |
| 154 | fixed32 intf_id = 1; |
| 155 | } |
| 156 | oneof is_onu_id { |
| 157 | fixed32 onu_id = 2; |
| 158 | } |
| 159 | oneof is_positive_drift { |
| 160 | fixed64 positive_drift = 3; |
| 161 | } |
| 162 | oneof is_negative_drift { |
| 163 | fixed64 negative_drift = 4; |
| 164 | } |
| 165 | oneof is_delimiter_miss_detection { |
| 166 | fixed64 delimiter_miss_detection = 5; |
| 167 | } |
| 168 | oneof is_bip_errors { |
| 169 | fixed64 bip_errors = 6; |
| 170 | } |
| 171 | oneof is_bip_units { |
| 172 | fixed64 bip_units = 7; |
| 173 | } |
| 174 | oneof is_fec_corrected_symbols { |
| 175 | fixed64 fec_corrected_symbols = 8; |
| 176 | } |
| 177 | oneof is_fec_codewords_corrected { |
| 178 | fixed64 fec_codewords_corrected = 9; |
| 179 | } |
| 180 | oneof is_fec_codewords_uncorrectable { |
| 181 | fixed64 fec_codewords_uncorrectable = 10; |
| 182 | } |
| 183 | oneof is_fec_codewords { |
| 184 | fixed64 fec_codewords = 11; |
| 185 | } |
| 186 | oneof is_fec_corrected_units { |
| 187 | fixed64 fec_corrected_units = 12; |
| 188 | } |
| 189 | oneof is_xgem_key_errors { |
| 190 | fixed64 xgem_key_errors = 13; |
| 191 | } |
| 192 | oneof is_xgem_loss { |
| 193 | fixed64 xgem_loss = 14; |
| 194 | } |
| 195 | oneof is_rx_ploams_error { |
| 196 | fixed64 rx_ploams_error = 15; |
| 197 | } |
| 198 | oneof is_rx_ploams_non_idle { |
| 199 | fixed64 rx_ploams_non_idle = 16; |
| 200 | } |
| 201 | oneof is_rx_omci { |
| 202 | fixed64 rx_omci = 17; |
| 203 | } |
| 204 | oneof is_tx_omci { |
| 205 | fixed64 tx_omci = 18; |
| 206 | } |
| 207 | oneof is_rx_omci_packets_crc_error { |
| 208 | fixed64 rx_omci_packets_crc_error = 19; |
| 209 | } |
| 210 | oneof is_rx_bytes { |
| 211 | fixed64 rx_bytes = 20; |
| 212 | } |
| 213 | oneof is_rx_packets { |
| 214 | fixed64 rx_packets = 21; |
| 215 | } |
| 216 | oneof is_tx_bytes { |
| 217 | fixed64 tx_bytes = 22; |
| 218 | } |
| 219 | oneof is_tx_packets { |
| 220 | fixed64 tx_packets = 23; |
| 221 | } |
| 222 | oneof is_ber_reported { |
| 223 | fixed64 ber_reported = 24; |
| 224 | } |
| 225 | oneof is_lcdg_errors { |
| 226 | fixed64 lcdg_errors = 25; |
| 227 | } |
| 228 | oneof is_rdi_errors { |
| 229 | fixed64 rdi_errors = 26; |
| 230 | } |
| 231 | oneof is_timestamp { |
| 232 | // reported timestamp in seconds since epoch |
| 233 | fixed32 timestamp = 27; |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | message GetOnuOMCICountersResponse { |
| 238 | oneof is_drop_events { |
| 239 | fixed64 drop_events = 1; |
| 240 | } |
| 241 | oneof is_octets { |
| 242 | fixed64 octets = 2; |
| 243 | } |
| 244 | oneof is_frames { |
| 245 | fixed64 frames = 3; |
| 246 | } |
| 247 | oneof is_broadcast_frames { |
| 248 | fixed64 broadcast_frames = 4; |
| 249 | } |
| 250 | oneof is_multicast_frames { |
| 251 | fixed64 multicast_frames = 5; |
| 252 | } |
| 253 | oneof is_crc_errored_frames { |
| 254 | fixed64 crc_errored_frames = 6; |
| 255 | } |
| 256 | oneof is_undersize_frames { |
| 257 | fixed64 undersize_frames = 7; |
| 258 | } |
| 259 | oneof is_oversize_frames { |
| 260 | fixed64 oversize_frames = 8; |
| 261 | } |
| 262 | oneof is_frames_64_octets { |
| 263 | fixed64 frames_64_octets = 9; |
| 264 | } |
| 265 | oneof is_frames_65_to_127_octets { |
| 266 | fixed64 frames_65_to_127_octets = 10; |
| 267 | } |
| 268 | oneof is_frames_128_to_255_octets { |
| 269 | fixed64 frames_128_to_255_octets = 11; |
| 270 | } |
| 271 | oneof is_frames_256_to_511_octets { |
| 272 | fixed64 frames_256_to_511_octets = 12; |
| 273 | } |
| 274 | oneof is_frames_512_to_1023_octets { |
| 275 | fixed64 frames_512_to_1023_octets = 13; |
| 276 | } |
| 277 | oneof is_frames_1024_to_1518_octets { |
| 278 | fixed64 frames_1024_to_1518_octets = 14; |
| 279 | } |
| 280 | } |
| 281 | |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 282 | message GetValueRequest { |
| 283 | oneof request { |
| 284 | GetDistanceRequest distance = 1; |
| 285 | GetOnuUniInfoRequest uniInfo = 2; |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 286 | // Corresponds to PmMetricId.PON_PORT_COUNTERS, PmMetricId.NNI_PORT_COUNTERS |
| 287 | GetOltPortCounters oltPortInfo = 3; |
| 288 | // Corresponds to PmMetricId.PON_OPTICAL |
| 289 | GetOnuPonOpticalInfo onuOpticalInfo = 4; |
| 290 | // Corresponds to PmMetricId.ETHERNET_BRIDGE_PORT_HISTORY |
| 291 | GetOnuEthernetBridgePortHistory ethBridgePort = 5; |
| 292 | // Corresponds to PmMetricId.FEC_HISTORY |
| 293 | GetOnuFecHistory fecHistory= 6; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame^] | 294 | GetOnuCountersRequest onuPonInfo= 7; |
| 295 | GetOnuOMCICountersRequest onuInfo=8; |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 296 | } |
| 297 | } |
| 298 | |
| 299 | message GetValueResponse { |
| 300 | enum Status { |
| 301 | STATUS_UNDEFINED = 0; |
| 302 | OK = 1; |
| 303 | ERROR = 2; |
| 304 | } |
| 305 | |
| 306 | enum ErrorReason { |
| 307 | REASON_UNDEFINED = 0; |
| 308 | UNSUPPORTED = 1; |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 309 | INVALID_DEVICE_ID = 2; |
| 310 | INVALID_PORT_TYPE = 3; |
| 311 | TIMEOUT = 4; |
| 312 | INVALID_REQ_TYPE = 5; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame^] | 313 | INTERNAL_ERROR = 6; |
| 314 | INVALID_DEVICE = 7; |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 315 | } |
| 316 | Status status = 1; |
| 317 | ErrorReason errReason = 2; |
| 318 | |
| 319 | oneof response { |
| 320 | GetDistanceResponse distance = 3; |
| 321 | GetOnuUniInfoResponse uniInfo = 4; |
kesavand | 763d800 | 2021-01-04 16:24:42 +0530 | [diff] [blame] | 322 | GetOltPortCountersResponse portCoutners = 5; |
| 323 | GetOnuPonOpticalInfoResponse onuOpticalInfo = 6; |
| 324 | GetOnuEthernetBridgePortHistoryResponse ethBridgePortInfo = 7; |
| 325 | GetOnuFecHistoryResponse fecHistory = 8; |
Himani Chawla | e5bb7ca | 2021-05-17 15:48:32 +0530 | [diff] [blame^] | 326 | GetOnuCountersResponse onuPonCounters= 9; |
| 327 | GetOnuOMCICountersResponse onuOMCICounters= 10; |
| 328 | |
amit.ghosh | 9f6af0e | 2020-11-04 14:09:25 +0100 | [diff] [blame] | 329 | } |
| 330 | } |
| 331 | |
| 332 | message SetValueRequest { |
| 333 | oneof request { |
| 334 | config.AlarmConfig alarm_config = 1; |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | message SetValueResponse { |
| 339 | enum Status { |
| 340 | STATUS_UNDEFINED = 0; |
| 341 | OK = 1; |
| 342 | ERROR = 2; |
| 343 | } |
| 344 | |
| 345 | enum ErrorReason { |
| 346 | REASON_UNDEFINED = 0; |
| 347 | UNSUPPORTED = 1; |
| 348 | } |
| 349 | Status status = 1; |
| 350 | ErrorReason errReason = 2; |
| 351 | |
| 352 | // As of now we don't have any explicit response for the supported SetValueRequests |
| 353 | // to be used later |
| 354 | //oneof response { |
| 355 | // |
| 356 | //} |
| 357 | } |
| 358 | |
| 359 | message SingleGetValueRequest { |
| 360 | string targetId = 1; |
| 361 | GetValueRequest request = 2; |
| 362 | } |
| 363 | |
| 364 | message SingleGetValueResponse{ |
| 365 | GetValueResponse response = 1; |
| 366 | } |
| 367 | |
| 368 | message SingleSetValueRequest { |
| 369 | string targetId = 1; |
| 370 | SetValueRequest request = 2; |
| 371 | } |
| 372 | message SingleSetValueResponse { |
| 373 | SetValueResponse response = 1; |
| 374 | } |
| 375 | |
| 376 | // Extension is a service to get and set specific attributes |
| 377 | service Extension { |
| 378 | // Get a single attribute |
| 379 | rpc GetExtValue(SingleGetValueRequest) returns (SingleGetValueResponse); |
| 380 | // Set a single attribute |
| 381 | rpc SetExtValue(SingleSetValueRequest) returns (SingleSetValueResponse); |
| 382 | } |