blob: bc477914ad8fe9f0bcc8f7ba721c3d6342bf977f [file] [log] [blame]
Joey Armstrong25589d82024-01-02 22:31:35 -05001// Copyright 2018-2024 Open Networking Foundation (ONF) and the ONF Contributors
Zack Williams52209662019-02-07 10:15:31 -07002//
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";
William Kurkian7c151592019-03-27 09:36:15 -040016
khenaidoo5fc5cea2021-08-11 17:39:16 -040017option go_package = "github.com/opencord/voltha-protos/v5/go/openolt";
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030018option java_package = "org.opencord.voltha.openolt";
19option java_outer_classname = "VolthaOpenOLT";
William Kurkian7c151592019-03-27 09:36:15 -040020
Zack Williams52209662019-02-07 10:15:31 -070021package openolt;
22import "google/api/annotations.proto";
khenaidoo4c6543e2021-10-19 17:25:58 -040023import "voltha_protos/tech_profile.proto";
dpaul2b52e712020-06-23 13:02:28 +053024import "voltha_protos/ext_config.proto";
khenaidoo4c6543e2021-10-19 17:25:58 -040025import "voltha_protos/extensions.proto";
Akash Kankanala761955c2024-02-21 19:32:20 +053026import "voltha_protos/common.proto";
Zack Williams52209662019-02-07 10:15:31 -070027
28service Openolt {
29
30 rpc DisableOlt(Empty) returns (Empty) {
31 option (google.api.http) = {
32 post: "/v1/Disable"
33 body: "*"
34 };
35 }
36
37 rpc ReenableOlt(Empty) returns (Empty) {
38 option (google.api.http) = {
39 post: "/v1/Reenable"
40 body: "*"
41 };
42 }
43
44 rpc ActivateOnu(Onu) returns (Empty) {
45 option (google.api.http) = {
46 post: "/v1/EnableOnu"
47 body: "*"
48 };
49 }
50
51 rpc DeactivateOnu(Onu) returns (Empty) {
52 option (google.api.http) = {
53 post: "/v1/DisableOnu"
54 body: "*"
55 };
56 }
57
58 rpc DeleteOnu(Onu) returns (Empty) {
59 option (google.api.http) = {
60 post: "/v1/DeleteOnu"
61 body: "*"
62 };
63 }
64
65 rpc OmciMsgOut(OmciMsg) returns (Empty) {
66 option (google.api.http) = {
67 post: "/v1/OmciMsgOut"
68 body: "*"
69 };
70 }
71
72 rpc OnuPacketOut(OnuPacket) returns (Empty) {
73 option (google.api.http) = {
74 post: "/v1/OnuPacketOut"
75 body: "*"
76 };
77 }
78
79 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
80 option (google.api.http) = {
81 post: "/v1/UplinkPacketOut"
82 body: "*"
83 };
84 }
85
86 rpc FlowAdd(Flow) returns (Empty) {
87 option (google.api.http) = {
88 post: "/v1/FlowAdd"
89 body: "*"
90 };
91 }
92
93 rpc FlowRemove(Flow) returns (Empty) {
94 option (google.api.http) = {
95 post: "/v1/FlowRemove"
96 body: "*"
97 };
98 }
99
100 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
101 option (google.api.http) = {
102 post: "/v1/HeartbeatCheck"
103 body: "*"
104 };
105 }
106
107 rpc EnablePonIf(Interface) returns (Empty) {
108 option (google.api.http) = {
109 post: "/v1/EnablePonIf"
110 body: "*"
111 };
112 }
113
114 rpc DisablePonIf(Interface) returns (Empty) {
115 option (google.api.http) = {
116 post: "/v1/DisablePonIf"
117 body: "*"
118 };
119 }
120
121 rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
122 option (google.api.http) = {
123 post: "/v1/GetDeviceInfo"
124 body: "*"
125 };
126 }
127
128 rpc Reboot(Empty) returns (Empty) {
129 option (google.api.http) = {
130 post: "/v1/Reboot"
131 body: "*"
132 };
133 }
134
135 rpc CollectStatistics(Empty) returns (Empty) {
136 option (google.api.http) = {
137 post: "/v1/CollectStatistics"
138 body: "*"
139 };
140 }
141
Gamze Abaka66fe96f2020-12-17 13:27:27 +0000142 rpc GetOnuStatistics(Onu) returns (OnuStatistics) {
143 option (google.api.http) = {
144 post: "/v1/GetOnuStatistics"
145 body: "*"
146 };
147 }
148
149 rpc GetGemPortStatistics(OnuPacket) returns (GemPortStatistics) {
150 option (google.api.http) = {
151 post: "/v1/GetGemPortStatistics"
152 body: "*"
153 };
154 }
155
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400156 rpc CreateTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700157 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400158 post: "/v1/CreateTrafficSchedulers"
Zack Williams52209662019-02-07 10:15:31 -0700159 body: "*"
160 };
161 }
162
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400163 rpc RemoveTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700164 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400165 post: "/v1/RemoveTrafficSchedulers"
166 body: "*"
167 };
168 }
169
170 rpc CreateTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
171 option (google.api.http) = {
172 post: "/v1/CreateTrafficQueues"
173 body: "*"
174 };
175 }
176
177 rpc RemoveTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
178 option (google.api.http) = {
179 post: "/v1/RemoveTrafficQueues"
Zack Williams52209662019-02-07 10:15:31 -0700180 body: "*"
181 };
182 }
183
184 rpc EnableIndication(Empty) returns (stream Indication) {}
Burak Gurdag402dd952019-12-10 20:31:11 +0000185
186 rpc PerformGroupOperation(Group) returns (Empty) {
187 option (google.api.http) = {
188 post: "/v1/PerformGroupOperation"
189 body: "*"
190 };
191 }
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800192
Burak Gurdagaadbcc02020-05-18 14:22:38 +0000193 rpc DeleteGroup(Group) returns (Empty) {
194 option (google.api.http) = {
195 post: "/v1/DeleteGroup"
196 body: "*"
197 };
198 }
199
khenaidoo4c6543e2021-10-19 17:25:58 -0400200 rpc GetExtValue(ValueParam) returns (extension.ReturnValues) {
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800201 option (google.api.http) = {
202 post: "/v1/GetExtValue"
203 body: "*"
204 };
205 }
206
dpaul2b52e712020-06-23 13:02:28 +0530207 rpc OnuItuPonAlarmSet(config.OnuItuPonAlarm) returns (Empty) {
Jason Huang55ee29d2020-03-11 23:43:29 +0800208 option (google.api.http) = {
209 post: "/v1/OnuItuPonAlarmSet"
210 body: "*"
211 };
212 }
Jason Huang4f8a9372020-06-03 18:09:35 +0800213
214 rpc GetLogicalOnuDistanceZero(Onu) returns (OnuLogicalDistance) {
215 option (google.api.http) = {
216 post: "/v1/GetLogicalOnuDistanceZero"
217 body: "*"
218 };
219 }
220
221 rpc GetLogicalOnuDistance(Onu) returns (OnuLogicalDistance) {
222 option (google.api.http) = {
223 post: "/v1/GetLogicalOnuDistance"
224 body: "*"
225 };
226 }
Orhan Kupusogluda19b452021-05-12 12:19:16 +0000227
228 rpc GetPonRxPower(Onu) returns (PonRxPowerData) {
229 option (google.api.http) = {
230 post: "/v1/GetPonRxPower"
231 body: "*"
232 };
233 }
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530234
235 /*
Abhilash Laxmeshwarba79e802023-03-30 15:28:20 +0530236 * GetOnuInfo takes Onu id, serialnumber, and pon interface as argument from the onu structure.
237 * Returns the Onu info from the device.
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530238 */
Abhilash Laxmeshwarba79e802023-03-30 15:28:20 +0530239 rpc GetOnuInfo(Onu) returns (OnuInfo) {
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530240 option (google.api.http) = {
Abhilash Laxmeshwarba79e802023-03-30 15:28:20 +0530241 post: "/v1/GetOnuInfo"
242 body: "*"
243 };
244 }
245
246 /*
247 * GetPonInterfaceInfo takes the pon intf id as argument.
248 * Returns the pon interface information from the device.
249 */
250 rpc GetPonInterfaceInfo(Interface) returns (PonIntfInfo) {
251 option (google.api.http) = {
252 post: "/v1/GetInterfaceInfo"
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530253 body: "*"
254 };
255 }
Akash Kankanala761955c2024-02-21 19:32:20 +0530256
257 /*
258 * GetAllocIdStatistics takes onuId and allocId as argument.
259 * This method includes a default wait period of 10 secs before collecting the stats.
260 * The caller has to be aware of this wait and handle it accordingly.
261 * Returns AllocId statistics in the form of OnuAllocStatistics structure
262 */
263 rpc GetAllocIdStatistics(OnuPacket) returns (OnuAllocIdStatistics) {
264 option (google.api.http) = {
265 post: "/v1/GetAllocIdStatistics"
266 body: "*"
267 };
268 }
269
270 /*
271 * GetPonPortStatistics takes interface id and type as argument from Interface structure.
272 * Returns Pon port statistics in the form of PonStatsData structure.
273 */
274 rpc GetPonPortStatistics(Interface) returns (common.PortStatistics) {
275 option (google.api.http) = {
276 post: "/v1/GetPonPortStatistics"
277 body: "*"
278 };
279 }
280
281 /*
282 * GetNniPortStatistics takes takes interface id and type as argument from Interface structure.
283 * Returns Nni port statistics in the form of NniStatsData structure
284 */
285 rpc GetNniPortStatistics(Interface) returns (common.PortStatistics) {
286 option (google.api.http) = {
287 post: "/v1/GetNniPortStatistics"
288 body: "*"
289 };
290 }
Abhilash laxmeshware46f98e2025-06-23 20:33:29 +0530291
292
293 /*
294 * Disable ONU serailnumber, disable device at PLOAM.
295 * Takes input as intfid, onuid, sn of the ONU.
296 * Returns success if the call towards the device is success, error otherwise.
297 */
298 rpc DisableOnu (InterfaceOnuSerialNumberOnuId) returns (Empty) {
299 option (google.api.http) = {
300 post: "/v1/DisableOnu"
301 };
302 }
303
304 /*
305 * Enables ONU serailnumber, enable device at PLOAM.
306 * Takes input as intfid, onuid, sn of the ONU.
307 * Returns success if the call towards the device is success, error otherwise.
308 */
309 rpc EnableOnu (InterfaceOnuSerialNumberOnuId) returns (Empty) {
310 option (google.api.http) = {
311 post: "/v1/EnableOnu"
312 };
313 }
314
315
316 /*
317 * Disable ONU serailnumber, disable device at PLOAM
318 * Takes input as intfid and sn of the ONU. Generally used when the onu is not present in the OLT.
319 * Returns success if the call towards the device is success, error otherwise.
320 */
321 rpc DisableOnuSerialNumber(InterfaceOnuSerialNumber) returns (Empty) {
322 option (google.api.http) = {
323 post: "/v1/DisableOnuSerialNumber"
324 };
325 }
326
327 /*
328 * Enables ONU serailnumber, enable device at PLOAM
329 * Takes input as intfid and sn of the ONU. Generally used when the onu is not present in the OLT.
330 * Returns success if the call towards the device is success, error otherwise.
331 */
332 rpc EnableOnuSerialNumber(InterfaceOnuSerialNumber) returns (Empty) {
333 option (google.api.http) = {
334 post: "/v1/EnableOnuSerialNumber"
335 };
336 }
Zack Williams52209662019-02-07 10:15:31 -0700337}
338
339message Indication {
340 oneof data {
341 OltIndication olt_ind = 1;
342 IntfIndication intf_ind = 2;
343 IntfOperIndication intf_oper_ind = 3;
344 OnuDiscIndication onu_disc_ind = 4;
345 OnuIndication onu_ind = 5;
346 OmciIndication omci_ind = 6;
347 PacketIndication pkt_ind = 7;
Akash Kankanala761955c2024-02-21 19:32:20 +0530348 common.PortStatistics port_stats = 8;
Zack Williams52209662019-02-07 10:15:31 -0700349 FlowStatistics flow_stats = 9;
350 AlarmIndication alarm_ind= 10;
Abhilash laxmeshware46f98e2025-06-23 20:33:29 +0530351 OnuDisabledIndication onu_disabled_ind = 11;
352 OnuEnabledIndication onu_enabled_ind = 12;
Zack Williams52209662019-02-07 10:15:31 -0700353 }
354}
355
356message AlarmIndication {
357 oneof data {
358 LosIndication los_ind = 1;
359 DyingGaspIndication dying_gasp_ind = 2;
360 OnuAlarmIndication onu_alarm_ind = 3;
361 OnuStartupFailureIndication onu_startup_fail_ind = 4;
362 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
363 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
364 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
365 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
366 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
367 OnuActivationFailureIndication onu_activation_fail_ind = 10;
368 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Naga Manjunath0a734252019-11-21 19:00:23 +0530369 OnuLossOfKeySyncFailureIndication onu_loss_of_sync_fail_ind = 12;
370 OnuItuPonStatsIndication onu_itu_pon_stats_ind = 13;
Devmalya Paulea6eb472020-02-04 20:41:01 -0500371 OnuDeactivationFailureIndication onu_deactivation_failure_ind = 14;
Devmalya Paulb0c12472020-02-18 20:08:53 -0500372 OnuRemoteDefectIndication onu_remote_defect_ind = 15;
Devmalya Paul82957962020-03-01 18:49:37 -0500373 OnuLossOfGEMChannelDelineationIndication onu_loss_gem_delineation_ind = 16;
374 OnuPhysicalEquipmentErrorIndication onu_physical_equipment_error_ind = 17;
375 OnuLossOfAcknowledgementIndication onu_loss_of_ack_ind = 18;
Devmalya Paul342bf9d2020-03-19 02:42:56 -0400376 OnuDifferentialReachExceededIndication onu_diff_reach_exceeded_ind = 19;
Zack Williams52209662019-02-07 10:15:31 -0700377 }
378}
379
380message OltIndication {
381 string oper_state = 1; // up, down
382}
383
384message IntfIndication {
385 fixed32 intf_id = 1;
386 string oper_state = 2; // up, down
387}
388
389message OnuDiscIndication {
390 fixed32 intf_id = 1;
391 SerialNumber serial_number = 2;
392}
393
394message OnuIndication {
395 fixed32 intf_id = 1;
396 fixed32 onu_id = 2;
397 string oper_state = 3; // up, down
398 string admin_state = 5; // up, down
399 SerialNumber serial_number = 4;
kesavandd1a8bca2020-08-27 19:24:07 +0530400 /** activation fail reason. */
401 enum ActivationFailReason
402 {
403 ONU_ACTIVATION_FAIL_REASON_NONE = 0;
404 ONU_ACTIVATION_FAIL_REASON_RANGING = 1; //Ranging Failure
405 ONU_ACTIVATION_FAIL_REASON_PASSWORD_AUTHENTICATION = 2; //Password authentication
406 ONU_ACTIVATION_FAIL_REASON_LOS = 3; //LOS
407 ONU_ACTIVATION_FAIL_ONU_ALARM = 4; // ONU Alarm
408 ONU_ACTIVATION_FAIL_SWITCH_OVER = 5; //protection switch over
409 }
410 ActivationFailReason fail_reason = 6;
411
Zack Williams52209662019-02-07 10:15:31 -0700412}
413
Abhilash laxmeshware46f98e2025-06-23 20:33:29 +0530414message OnuDisabledIndication {
415 fixed32 intf_id = 1;
416 fixed32 onu_id = 2;
417 SerialNumber serial_number = 4;
418}
419
420message OnuEnabledIndication {
421 fixed32 intf_id = 1;
422 fixed32 onu_id = 2;
423 SerialNumber serial_number = 4;
424}
425
426
Zack Williams52209662019-02-07 10:15:31 -0700427message IntfOperIndication {
428 string type = 1; // nni, pon
429 fixed32 intf_id = 2;
430 string oper_state = 3; // up, down
Elia Battiston345a5b72022-02-01 10:17:56 +0100431 fixed32 speed = 4; // measured in Mbps
Girish Gowdra34ff0c42022-03-10 16:04:23 -0800432 string technology = 5;
433
434 message PONResourceRanges {
435
436 message Pool {
437
438 enum PoolType {
439 ONU_ID = 0;
440 ALLOC_ID = 1;
441 GEMPORT_ID = 2;
442 FLOW_ID = 3;
443 }
444
445
446 PoolType type = 1;
447 fixed32 start = 3; // lower bound on IDs allocated from this pool
448 fixed32 end = 4; // upper bound on IDs allocated from this pool
449 }
450
451 repeated Pool pools = 3;
452 }
453
454 PONResourceRanges ranges = 6;
Zack Williams52209662019-02-07 10:15:31 -0700455}
456
457message OmciIndication {
458 fixed32 intf_id = 1;
459 fixed32 onu_id = 2;
460 bytes pkt = 3;
461}
462
463message PacketIndication {
464 string intf_type = 5; // nni, pon, unknown
465 fixed32 intf_id = 1;
Girish Gowdra31a356c2021-05-14 15:56:04 -0700466 fixed32 onu_id = 8;
467 fixed32 uni_id = 9;
Zack Williams52209662019-02-07 10:15:31 -0700468 fixed32 gemport_id = 2;
469 fixed32 flow_id = 3;
470 fixed32 port_no = 6;
471 fixed64 cookie = 7;
472 bytes pkt = 4;
473}
474
475message Interface {
476 fixed32 intf_id = 1;
Akash Kankanala761955c2024-02-21 19:32:20 +0530477 fixed32 intf_type = 2;
Zack Williams52209662019-02-07 10:15:31 -0700478}
479
480message Heartbeat {
481 fixed32 heartbeat_signature = 1;
482}
483
484message Onu {
485 fixed32 intf_id = 1;
486 fixed32 onu_id = 2;
487 SerialNumber serial_number = 3;
488 fixed32 pir = 4; // peak information rate assigned to onu
kesavand66bade72020-08-05 06:16:34 +0200489 bool omcc_encryption = 5;
Zack Williams52209662019-02-07 10:15:31 -0700490}
491
Jason Huang4f8a9372020-06-03 18:09:35 +0800492message OnuLogicalDistance {
493 fixed32 intf_id = 1;
494 fixed32 onu_id = 2;
495 fixed32 logical_onu_distance_zero = 3; //0km logical distance
496 fixed32 logical_onu_distance = 4;
497}
498
Zack Williams52209662019-02-07 10:15:31 -0700499message OmciMsg {
500 fixed32 intf_id = 1;
501 fixed32 onu_id = 2;
502 bytes pkt = 3;
503}
504
505message OnuPacket {
506 fixed32 intf_id = 1;
507 fixed32 onu_id = 2;
508 fixed32 port_no = 4;
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400509 fixed32 gemport_id = 5;
Akash Kankanala761955c2024-02-21 19:32:20 +0530510 fixed32 alloc_id = 6;
Zack Williams52209662019-02-07 10:15:31 -0700511 bytes pkt = 3;
512}
513
514message UplinkPacket {
515 fixed32 intf_id = 1;
516 bytes pkt = 2;
517}
518
519message DeviceInfo {
520 string vendor = 1;
521 string model = 2;
522 string hardware_version = 3;
523 string firmware_version = 4;
524 string device_id = 16;
525 string device_serial_number = 17;
Gamze Abaka7a0d3942021-03-11 11:41:36 +0000526 bool previously_connected = 19; // used to indicate agent reconcile status
Zack Williams52209662019-02-07 10:15:31 -0700527
528 // Total number of pon intf ports on the device
529 fixed32 pon_ports = 12;
Sridhar Ravindra8859b3e2025-05-28 13:02:27 +0530530 // Total number of nni intf ports on the device
531 fixed32 nni_ports = 20;
Zack Williams52209662019-02-07 10:15:31 -0700532
Elia Battiston3e451982022-02-23 09:43:26 +0100533 reserved 5 to 11, 13, 14;
534 // Not used anymore, this information is defined per-range only
535 // and is fully provided by DeviceResourceRanges
536 //
537 // string technology = 5;
538 // fixed32 onu_id_start = 6;
539 // fixed32 onu_id_end = 7;
540 // fixed32 alloc_id_start = 8;
541 // fixed32 alloc_id_end = 9;
542 // fixed32 gemport_id_start = 10;
543 // fixed32 gemport_id_end = 11;
544 // fixed32 flow_id_start = 13;
545 // fixed32 flow_id_end = 14;
Zack Williams52209662019-02-07 10:15:31 -0700546
547 message DeviceResourceRanges {
548
549 // List of 0 or more intf_ids that use the same technology and pools.
550 // If 0 intf_ids supplied, it implies ALL interfaces
551 repeated fixed32 intf_ids = 1;
552
553 // Technology profile for this pool
554 string technology = 2;
555
556 message Pool {
557 enum PoolType {
558 ONU_ID = 0;
559 ALLOC_ID = 1;
560 GEMPORT_ID = 2;
561 FLOW_ID = 3;
562 }
563
564 enum SharingType {
565 DEDICATED_PER_INTF = 0;
566 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
567 SHARED_BY_ALL_INTF_SAME_TECH = 2; // Shared across all interfaces of the same technology used in this range
568 }
569
570 PoolType type = 1;
571 SharingType sharing = 2;
572 fixed32 start = 3; // lower bound on IDs allocated from this pool
573 fixed32 end = 4; // upper bound on IDs allocated from this pool
574 }
575 repeated Pool pools = 3;
576 }
577 repeated DeviceResourceRanges ranges = 15;
578}
579
580message Classifier {
581 fixed32 o_tpid = 1;
582 fixed32 o_vid = 2;
583 fixed32 i_tpid = 3;
584 fixed32 i_vid = 4;
585 fixed32 o_pbits = 5;
586 fixed32 i_pbits = 6;
587 fixed32 eth_type = 7;
588 bytes dst_mac = 8;
589 bytes src_mac = 9;
590 fixed32 ip_proto = 10;
591 fixed32 dst_ip = 11;
592 fixed32 src_ip = 12;
593 fixed32 src_port = 13;
594 fixed32 dst_port = 14;
595 string pkt_tag_type = 15; // untagged, single_tag, double_tag
596}
597
598message ActionCmd {
599 bool add_outer_tag = 1;
600 bool remove_outer_tag = 2;
601 bool trap_to_host = 3;
Burak Gurdag402dd952019-12-10 20:31:11 +0000602 bool remark_outer_pbits = 4;
603 bool remark_inner_pbits = 5;
604 bool add_inner_tag = 6;
605 bool remove_inner_tag = 7;
606 bool translate_inner_tag = 8;
607 bool translate_outer_tag = 9;
Zack Williams52209662019-02-07 10:15:31 -0700608}
609
610message Action {
611 ActionCmd cmd = 1;
612 fixed32 o_vid = 2;
613 fixed32 o_pbits = 3;
614 fixed32 o_tpid = 4;
615 fixed32 i_vid = 5;
616 fixed32 i_pbits = 6;
617 fixed32 i_tpid = 7;
618}
619
620message Flow {
621 sfixed32 access_intf_id = 1;
622 sfixed32 onu_id = 2;
623 sfixed32 uni_id = 11;
Girish Gowdrab152d9f2020-08-17 11:37:50 -0700624
625 fixed64 flow_id = 3; // voltha flow-id. 0 is not a valid flow_id
626 fixed64 symmetric_flow_id = 18; // symmetric voltha flow-id, if applicable. All data path flows generally have a symmetric flow,
627 // but trap-to-controller flows do not have a symmetric flow
628 // Broadcom BAL requires that symmetric flows use the same BAL flow-id
629
630 string flow_type = 4; // upstream, downstream, broadcast, multicast
Zack Williams52209662019-02-07 10:15:31 -0700631 sfixed32 alloc_id = 10;
632 sfixed32 network_intf_id = 5;
Girish Gowdrab152d9f2020-08-17 11:37:50 -0700633 sfixed32 gemport_id = 6; // When 'replicate_flow' field is true, this field is obsolete.
Zack Williams52209662019-02-07 10:15:31 -0700634 Classifier classifier = 7;
635 Action action = 8;
636 sfixed32 priority = 9;
637 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
638 fixed32 port_no = 13; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
Burak Gurdag402dd952019-12-10 20:31:11 +0000639 fixed32 group_id = 14;
Burak Gurdagce064352020-04-20 20:11:18 +0000640 fixed32 tech_profile_id = 15;
Girish Gowdrab152d9f2020-08-17 11:37:50 -0700641
642 bool replicate_flow = 16; // When this field is true, use pbitToGemPortID to know which p-bit needs to be classfied to which gem port.
643 map<fixed32, fixed32> pbit_to_gemport = 17; // Map of p-bit to gem port ID
Gamze Abakad8caefa2021-02-26 10:31:15 +0000644 map<fixed32, bool> gemport_to_aes = 19; // Map of gem port ID to aes encryption
Zack Williams52209662019-02-07 10:15:31 -0700645}
646
647message SerialNumber {
648 bytes vendor_id = 1;
649 bytes vendor_specific = 2;
650}
651
Gamze Abaka66fe96f2020-12-17 13:27:27 +0000652message OnuStatistics {
653 fixed32 intf_id = 1;
654 fixed32 onu_id = 2;
655 fixed64 positive_drift = 3;
656 fixed64 negative_drift = 4;
657 fixed64 delimiter_miss_detection = 5;
658 fixed64 bip_errors = 6;
659 fixed64 bip_units = 7;
660 fixed64 fec_corrected_symbols = 8;
661 fixed64 fec_codewords_corrected = 9;
662 fixed64 fec_codewords_uncorrectable = 10;
663 fixed64 fec_codewords = 11;
664 fixed64 fec_corrected_units = 12;
665 fixed64 xgem_key_errors = 13;
666 fixed64 xgem_loss = 14;
667 fixed64 rx_ploams_error = 15;
668 fixed64 rx_ploams_non_idle = 16;
669 fixed64 rx_omci = 17;
670 fixed64 rx_omci_packets_crc_error = 18;
671 fixed64 rx_bytes = 19;
672 fixed64 rx_packets = 20;
673 fixed64 tx_bytes = 21;
674 fixed64 tx_packets = 22;
675 fixed64 ber_reported = 23;
676 fixed64 lcdg_errors = 24;
677 fixed64 rdi_errors = 25;
678 fixed32 timestamp = 26;
679}
680
681message GemPortStatistics {
682 fixed32 intf_id = 1;
683 fixed32 gemport_id = 2;
684 fixed64 rx_packets = 3;
685 fixed64 rx_bytes = 4;
686 fixed64 tx_packets = 5;
687 fixed64 tx_bytes = 6;
688 fixed32 timestamp = 26;
689}
690
Zack Williams52209662019-02-07 10:15:31 -0700691message FlowStatistics {
692 fixed32 flow_id = 1;
693 fixed64 rx_bytes = 2;
694 fixed64 rx_packets = 3;
695 fixed64 tx_bytes = 8;
696 fixed64 tx_packets = 9;
697 fixed32 timestamp = 16;
698}
699
700message LosIndication {
701 fixed32 intf_id = 1;
702 string status = 2;
703}
704
705message DyingGaspIndication {
706 fixed32 intf_id = 1;
707 fixed32 onu_id = 2;
708 string status = 3;
709}
710
711message OnuAlarmIndication {
712 fixed32 intf_id = 1;
713 fixed32 onu_id = 2;
714 string los_status = 3;
715 string lob_status = 4;
716 string lopc_miss_status = 5;
717 string lopc_mic_error_status = 6;
Naga Manjunath0a734252019-11-21 19:00:23 +0530718 string lofi_status = 7;
719 string loami_status = 8;
Zack Williams52209662019-02-07 10:15:31 -0700720}
721
722message OnuStartupFailureIndication {
723 fixed32 intf_id = 1;
724 fixed32 onu_id = 2;
725 string status = 3;
726}
727
728message OnuSignalDegradeIndication {
729 fixed32 intf_id = 1;
730 fixed32 onu_id = 2;
731 string status = 3;
732 fixed32 inverse_bit_error_rate = 4;
733}
734
735message OnuDriftOfWindowIndication {
736 fixed32 intf_id = 1;
737 fixed32 onu_id = 2;
738 string status = 3;
739 fixed32 drift = 4;
740 fixed32 new_eqd = 5;
741}
742
743message OnuLossOfOmciChannelIndication {
744 fixed32 intf_id = 1;
745 fixed32 onu_id = 2;
746 string status = 3;
747}
748
749message OnuSignalsFailureIndication {
750 fixed32 intf_id = 1;
751 fixed32 onu_id = 2;
752 string status = 3;
753 fixed32 inverse_bit_error_rate = 4;
754}
755
756message OnuTransmissionInterferenceWarning {
757 fixed32 intf_id = 1;
758 fixed32 onu_id = 2;
759 string status = 3;
760 fixed32 drift = 4;
761}
762
763message OnuActivationFailureIndication {
764 fixed32 intf_id = 1;
765 fixed32 onu_id = 2;
Naga Manjunath0a734252019-11-21 19:00:23 +0530766 fixed32 fail_reason = 3;
767}
768
769message OnuLossOfKeySyncFailureIndication {
770 fixed32 intf_id = 1;
771 fixed32 onu_id = 2;
772 string status = 3;
773}
774
Girish Gowdra5192ea82020-05-06 20:49:11 -0700775message RdiErrorIndication {
776 fixed64 rdi_error_count = 1; // RDI Error count
777 string status = 2; // on/off based on configured reporting condition
778}
779
Naga Manjunath0a734252019-11-21 19:00:23 +0530780message OnuItuPonStatsIndication{
781 fixed32 intf_id = 1;
782 fixed32 onu_id = 2;
Girish Gowdra5192ea82020-05-06 20:49:11 -0700783 oneof stats {
784 RdiErrorIndication rdi_error_ind = 3;
785 // add more here
786 }
Zack Williams52209662019-02-07 10:15:31 -0700787}
788
789message OnuProcessingErrorIndication {
790 fixed32 intf_id = 1;
791 fixed32 onu_id = 2;
792}
793
Devmalya Paulea6eb472020-02-04 20:41:01 -0500794message OnuDeactivationFailureIndication {
795 fixed32 intf_id = 1;
796 fixed32 onu_id = 2;
Girish Gowdra5192ea82020-05-06 20:49:11 -0700797 string status = 3;
Devmalya Paulea6eb472020-02-04 20:41:01 -0500798}
799
Jason Huang55ee29d2020-03-11 23:43:29 +0800800message OnuRemoteDefectIndication {
Devmalya Paulb0c12472020-02-18 20:08:53 -0500801 fixed32 intf_id = 1;
802 fixed32 onu_id = 2;
Jason Huang55ee29d2020-03-11 23:43:29 +0800803 fixed64 rdi_errors = 3;
Devmalya Paulb0c12472020-02-18 20:08:53 -0500804}
805
Devmalya Paul82957962020-03-01 18:49:37 -0500806message OnuLossOfGEMChannelDelineationIndication {
807 fixed32 intf_id = 1;
808 fixed32 onu_id = 2;
809 string status = 3;
810 fixed32 delineation_errors = 4;
811}
812
813message OnuPhysicalEquipmentErrorIndication {
814 fixed32 intf_id = 1;
815 fixed32 onu_id = 2;
816 string status = 3;
817}
818
819message OnuLossOfAcknowledgementIndication {
820 fixed32 intf_id = 1;
821 fixed32 onu_id = 2;
822 string status = 3;
823}
824
Devmalya Paul342bf9d2020-03-19 02:42:56 -0400825message OnuDifferentialReachExceededIndication {
826 fixed32 intf_id = 1;
827 fixed32 onu_id = 2;
828 string status = 3;
829 fixed32 distance = 4;
830}
831
Burak Gurdag402dd952019-12-10 20:31:11 +0000832message GroupMember {
833 enum InterfaceType {
834 PON = 0;
835 EPON_1G_PATH = 1;
836 EPON_10G_PATH = 2;
837 }
838 uint32 interface_id = 1;
839 InterfaceType interface_type = 2;
840 uint32 gem_port_id = 3;
841 uint32 priority = 4; // Priority (and also the ID) of the default fixed queue for the multicast traffic.
842 // This queue is attached to the default PON port scheduler.
843}
844
845message Group {
846 enum GroupMembersCommand {
847 ADD_MEMBERS = 0;
848 REMOVE_MEMBERS = 1;
849 SET_MEMBERS = 2;
850 }
851
852 uint32 group_id = 1;
853 GroupMembersCommand command = 2;
854 repeated GroupMember members = 3;
855 Action action = 4;
856}
857
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800858message ValueParam {
859 Onu onu = 1;
khenaidoo4c6543e2021-10-19 17:25:58 -0400860 extension.ValueType.Type value = 2;
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800861}
Burak Gurdag402dd952019-12-10 20:31:11 +0000862
Orhan Kupusogluda19b452021-05-12 12:19:16 +0000863message PonRxPowerData {
864 enum RssiMeasurementFailReason {
865 FAIL_REASON_NONE = 0;
866 FAIL_REASON_NO_DELIMITER = 1;
867 FAIL_REASON_NO_ACCESS = 2;
868 }
Burak Gurdag402dd952019-12-10 20:31:11 +0000869
Orhan Kupusogluda19b452021-05-12 12:19:16 +0000870 fixed32 intf_id = 1;
871 fixed32 onu_id = 2;
872 string status = 3;
873 RssiMeasurementFailReason fail_reason = 4;
874 double rx_power_mean_dbm = 5;
875}
876
Akash Kankanala761955c2024-02-21 19:32:20 +0530877message OnuAllocIdStatistics {
878 fixed32 intfId = 1;
879 fixed32 allocId = 2;
880 fixed64 rxBytes = 3;
881}
882
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530883enum AlarmState {
884 OFF = 0;
885 ON = 1;
886}
887
888/*
889 * contains the onu id, state of the onu and the information about the alarms on the onu.
890 * As of now only few alarms are added, any further information needed can be added to the structure.
891 */
Abhilash Laxmeshwarba79e802023-03-30 15:28:20 +0530892message OnuInfo {
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530893 fixed32 onu_id = 1;
Abhilash Laxmeshwarba79e802023-03-30 15:28:20 +0530894 enum OnuState {
895 /*
896 * There are other states in BAL for ONU, which voltha is not interested as of now.
897 * UNKNOWN is to be filled for the rest of the states other than NOT_CONFIGURED/ACTIVE/INACTIVE/DISABLED
898 */
899 UNKNOWN = 0;
900 NOT_CONFIGURED = 1;
901 ACTIVE = 2;
902 INACTIVE = 3;
903 DISABLED = 4;
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530904 }
Abhilash Laxmeshwarba79e802023-03-30 15:28:20 +0530905 OnuState state = 2;
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530906 AlarmState losi = 3;
907 AlarmState lofi = 4;
Abhilash Laxmeshwarba79e802023-03-30 15:28:20 +0530908 AlarmState loami = 5;
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530909}
910
911/*
Abhilash Laxmeshwarba79e802023-03-30 15:28:20 +0530912 * IntfInfo has the interface Id and if there are any alarms active on that interface.
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530913 * Any further information needed from the interface object can be added to the structure.
914 */
Abhilash Laxmeshwarba79e802023-03-30 15:28:20 +0530915message PonIntfInfo {
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530916 fixed32 intf_id = 1;
Abhilash Laxmeshwarba79e802023-03-30 15:28:20 +0530917 enum PonIntfState {
918 UNKNOWN = 0;
919 ACTIVE_WORKING = 1;
920 ACTIVE_STANDBY = 2;
921 INACTIVE = 3;
922 DISABLED = 4;
923 }
924 PonIntfState state = 3;
925 AlarmState los = 4;
Abhilash Laxmeshward95e1992023-03-13 18:52:05 +0530926}
927
Abhilash laxmeshware46f98e2025-06-23 20:33:29 +0530928/*
929 * Message used for disabling device by serialnumber, disable at PLOAM
930 */
931message InterfaceOnuSerialNumberOnuId {
932 InterfaceOnuSerialNumber intf_id_serial_num = 1;
933 fixed32 onu_id = 2;
934}
935
936message InterfaceOnuSerialNumber {
937 fixed32 intf_id = 1;
938 SerialNumber onu_serial_number = 2;
939}
Orhan Kupusogluda19b452021-05-12 12:19:16 +0000940message Empty {}