blob: 61e9e455fa15cf09052b53a0dbf7b9834cb63383 [file] [log] [blame]
amit.ghosh9f6af0e2020-11-04 14:09:25 +01001// 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
15syntax = "proto3";
16
khenaidoo5fc5cea2021-08-11 17:39:16 -040017option go_package = "github.com/opencord/voltha-protos/v5/go/extension";
amit.ghosh9f6af0e2020-11-04 14:09:25 +010018option java_package = "org.opencord.voltha.extension";
19
20package extension;
21
22import public "voltha_protos/ext_config.proto";
kesavand763d8002021-01-04 16:24:42 +053023import "google/protobuf/empty.proto";
amit.ghosh9f6af0e2020-11-04 14:09:25 +010024
25message GetDistanceRequest {
26 string onuDeviceId = 1;
27}
28
29message GetDistanceResponse {
30 uint32 distance = 1; // distance in meters
31}
32
33message GetOnuUniInfoRequest {
34 uint32 uniIndex = 1; // Index of the uni starting from 0
35}
36
37message 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
kesavand763d8002021-01-04 16:24:42 +053066message 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
76message 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
91message GetOnuPonOpticalInfo {
92 google.protobuf.Empty empty = 1;
93}
94
Girish Gowdrab1d742d2021-05-01 15:34:32 -070095// 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.
kesavand763d8002021-01-04 16:24:42 +053097message GetOnuPonOpticalInfoResponse{
Girish Gowdrab1d742d2021-05-01 15:34:32 -070098 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 Gowdrabce9ea72021-05-05 08:47:49 -0700101 float laserBiasCurrent = 4; // unit of value is milli-amphere (mA)
Girish Gowdrab1d742d2021-05-01 15:34:32 -0700102 float temperature = 5; // unit of value is degree celsius
kesavand763d8002021-01-04 16:24:42 +0530103}
104
105message GetOnuEthernetBridgePortHistory {
106 enum Direction {
107 UNDEFINED = 0;
108 UPSTREAM = 1;
109 DOWNSTREAM = 2;
110 }
111 Direction direction = 1;
112}
113
114message 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
131message GetOnuFecHistory {
132 google.protobuf.Empty empty = 1;
133}
134
135message GetOnuFecHistoryResponse {
136 uint32 correctedBytes = 1;
137 uint32 correctedCodeWords = 2;
138 uint32 fecSeconds = 3;
139 uint32 totalCodeWords = 4;
140 uint32 uncorrectableCodeWords = 5;
141}
142
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530143message GetOnuCountersRequest {
144 fixed32 intf_id = 1;
145 fixed32 onu_id = 2;
146}
147
Himani Chawla9a497392021-05-28 13:04:42 +0530148message GetOmciEthernetFrameExtendedPmRequest {
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530149 string onuDeviceId = 1;
150}
151
Gamze Abaka08683072021-05-26 13:38:02 +0000152message GetRxPowerRequest {
153 fixed32 intf_id = 1;
154 fixed32 onu_id = 2;
155}
156
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530157message GetOnuCountersResponse {
158 oneof is_intf_id {
159 fixed32 intf_id = 1;
160 }
161 oneof is_onu_id {
162 fixed32 onu_id = 2;
163 }
164 oneof is_positive_drift {
165 fixed64 positive_drift = 3;
166 }
167 oneof is_negative_drift {
168 fixed64 negative_drift = 4;
169 }
170 oneof is_delimiter_miss_detection {
171 fixed64 delimiter_miss_detection = 5;
172 }
173 oneof is_bip_errors {
174 fixed64 bip_errors = 6;
175 }
176 oneof is_bip_units {
177 fixed64 bip_units = 7;
178 }
179 oneof is_fec_corrected_symbols {
180 fixed64 fec_corrected_symbols = 8;
181 }
182 oneof is_fec_codewords_corrected {
183 fixed64 fec_codewords_corrected = 9;
184 }
185 oneof is_fec_codewords_uncorrectable {
186 fixed64 fec_codewords_uncorrectable = 10;
187 }
188 oneof is_fec_codewords {
189 fixed64 fec_codewords = 11;
190 }
191 oneof is_fec_corrected_units {
192 fixed64 fec_corrected_units = 12;
193 }
194 oneof is_xgem_key_errors {
195 fixed64 xgem_key_errors = 13;
196 }
197 oneof is_xgem_loss {
198 fixed64 xgem_loss = 14;
199 }
200 oneof is_rx_ploams_error {
201 fixed64 rx_ploams_error = 15;
202 }
203 oneof is_rx_ploams_non_idle {
204 fixed64 rx_ploams_non_idle = 16;
205 }
206 oneof is_rx_omci {
207 fixed64 rx_omci = 17;
208 }
209 oneof is_tx_omci {
210 fixed64 tx_omci = 18;
211 }
212 oneof is_rx_omci_packets_crc_error {
213 fixed64 rx_omci_packets_crc_error = 19;
214 }
215 oneof is_rx_bytes {
216 fixed64 rx_bytes = 20;
217 }
218 oneof is_rx_packets {
219 fixed64 rx_packets = 21;
220 }
221 oneof is_tx_bytes {
222 fixed64 tx_bytes = 22;
223 }
224 oneof is_tx_packets {
225 fixed64 tx_packets = 23;
226 }
227 oneof is_ber_reported {
228 fixed64 ber_reported = 24;
229 }
230 oneof is_lcdg_errors {
231 fixed64 lcdg_errors = 25;
232 }
233 oneof is_rdi_errors {
234 fixed64 rdi_errors = 26;
235 }
236 oneof is_timestamp {
237 // reported timestamp in seconds since epoch
238 fixed32 timestamp = 27;
239 }
240}
241
Himani Chawla9a497392021-05-28 13:04:42 +0530242message OmciEthernetFrameExtendedPm {
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530243 fixed64 drop_events = 1;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530244 fixed64 octets = 2;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530245 fixed64 frames = 3;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530246 fixed64 broadcast_frames = 4;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530247 fixed64 multicast_frames = 5;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530248 fixed64 crc_errored_frames = 6;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530249 fixed64 undersize_frames = 7;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530250 fixed64 oversize_frames = 8;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530251 fixed64 frames_64_octets = 9;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530252 fixed64 frames_65_to_127_octets = 10;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530253 fixed64 frames_128_to_255_octets = 11;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530254 fixed64 frames_256_to_511_octets = 12;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530255 fixed64 frames_512_to_1023_octets = 13;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530256 fixed64 frames_1024_to_1518_octets = 14;
Himani Chawla9a497392021-05-28 13:04:42 +0530257}
258
259message GetOmciEthernetFrameExtendedPmResponse {
Himani Chawla654f7f32021-08-25 16:31:24 +0530260 enum Format {
261 THIRTY_TWO_BIT = 0;
262 SIXTY_FOUR_BIT = 1;
263 }
Himani Chawla9a497392021-05-28 13:04:42 +0530264 OmciEthernetFrameExtendedPm upstream = 1;
265 OmciEthernetFrameExtendedPm downstream = 2;
Himani Chawla654f7f32021-08-25 16:31:24 +0530266 Format omci_ethernet_frame_extended_pm_format= 3;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530267}
268
Gamze Abaka08683072021-05-26 13:38:02 +0000269message GetRxPowerResponse {
270 fixed32 intf_id= 1;
271 fixed32 onu_id = 2;
272 string status = 3;
273 string fail_reason = 4;
274 double rx_power = 5;
275}
276
amit.ghosh9f6af0e2020-11-04 14:09:25 +0100277message GetValueRequest {
278 oneof request {
279 GetDistanceRequest distance = 1;
280 GetOnuUniInfoRequest uniInfo = 2;
kesavand763d8002021-01-04 16:24:42 +0530281 // Corresponds to PmMetricId.PON_PORT_COUNTERS, PmMetricId.NNI_PORT_COUNTERS
282 GetOltPortCounters oltPortInfo = 3;
283 // Corresponds to PmMetricId.PON_OPTICAL
284 GetOnuPonOpticalInfo onuOpticalInfo = 4;
285 // Corresponds to PmMetricId.ETHERNET_BRIDGE_PORT_HISTORY
286 GetOnuEthernetBridgePortHistory ethBridgePort = 5;
287 // Corresponds to PmMetricId.FEC_HISTORY
Gamze Abaka08683072021-05-26 13:38:02 +0000288 GetOnuFecHistory fecHistory = 6;
289 GetOnuCountersRequest onuPonInfo = 7;
Himani Chawla9a497392021-05-28 13:04:42 +0530290 GetOmciEthernetFrameExtendedPmRequest onuInfo = 8;
Gamze Abaka08683072021-05-26 13:38:02 +0000291 GetRxPowerRequest rxPower = 9;
amit.ghosh9f6af0e2020-11-04 14:09:25 +0100292 }
293}
294
295message GetValueResponse {
296 enum Status {
297 STATUS_UNDEFINED = 0;
298 OK = 1;
299 ERROR = 2;
300 }
301
302 enum ErrorReason {
303 REASON_UNDEFINED = 0;
304 UNSUPPORTED = 1;
kesavand763d8002021-01-04 16:24:42 +0530305 INVALID_DEVICE_ID = 2;
306 INVALID_PORT_TYPE = 3;
307 TIMEOUT = 4;
308 INVALID_REQ_TYPE = 5;
Himani Chawlae5bb7ca2021-05-17 15:48:32 +0530309 INTERNAL_ERROR = 6;
310 INVALID_DEVICE = 7;
amit.ghosh9f6af0e2020-11-04 14:09:25 +0100311 }
312 Status status = 1;
313 ErrorReason errReason = 2;
314
315 oneof response {
316 GetDistanceResponse distance = 3;
317 GetOnuUniInfoResponse uniInfo = 4;
kesavand763d8002021-01-04 16:24:42 +0530318 GetOltPortCountersResponse portCoutners = 5;
319 GetOnuPonOpticalInfoResponse onuOpticalInfo = 6;
320 GetOnuEthernetBridgePortHistoryResponse ethBridgePortInfo = 7;
321 GetOnuFecHistoryResponse fecHistory = 8;
Gamze Abaka08683072021-05-26 13:38:02 +0000322 GetOnuCountersResponse onuPonCounters = 9;
Himani Chawla9a497392021-05-28 13:04:42 +0530323 GetOmciEthernetFrameExtendedPmResponse onuCounters = 10;
Gamze Abaka08683072021-05-26 13:38:02 +0000324 GetRxPowerResponse rxPower = 11;
amit.ghosh9f6af0e2020-11-04 14:09:25 +0100325 }
326}
327
328message SetValueRequest {
329 oneof request {
330 config.AlarmConfig alarm_config = 1;
331 }
332}
333
334message SetValueResponse {
335 enum Status {
336 STATUS_UNDEFINED = 0;
337 OK = 1;
338 ERROR = 2;
339 }
340
341 enum ErrorReason {
342 REASON_UNDEFINED = 0;
343 UNSUPPORTED = 1;
344 }
345 Status status = 1;
346 ErrorReason errReason = 2;
347
348 // As of now we don't have any explicit response for the supported SetValueRequests
349 // to be used later
350 //oneof response {
351 //
352 //}
353}
354
355message SingleGetValueRequest {
356 string targetId = 1;
357 GetValueRequest request = 2;
358}
359
360message SingleGetValueResponse{
361 GetValueResponse response = 1;
362}
363
364message SingleSetValueRequest {
365 string targetId = 1;
366 SetValueRequest request = 2;
367}
368message SingleSetValueResponse {
369 SetValueResponse response = 1;
370}
371
372// Extension is a service to get and set specific attributes
373service Extension {
374 // Get a single attribute
375 rpc GetExtValue(SingleGetValueRequest) returns (SingleGetValueResponse);
376 // Set a single attribute
377 rpc SetExtValue(SingleSetValueRequest) returns (SingleSetValueResponse);
378}