blob: 253556a4b19027410ced82b34bb62aad3cfe5b78 [file] [log] [blame]
Zack Williams52209662019-02-07 10:15:31 -07001// 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";
William Kurkian7c151592019-03-27 09:36:15 -040016
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030017option go_package = "github.com/opencord/voltha-protos/v3/go/openolt";
18option 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";
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -040023import public "voltha_protos/tech_profile.proto";
Zack Williams52209662019-02-07 10:15:31 -070024
25service Openolt {
26
27 rpc DisableOlt(Empty) returns (Empty) {
28 option (google.api.http) = {
29 post: "/v1/Disable"
30 body: "*"
31 };
32 }
33
34 rpc ReenableOlt(Empty) returns (Empty) {
35 option (google.api.http) = {
36 post: "/v1/Reenable"
37 body: "*"
38 };
39 }
40
41 rpc ActivateOnu(Onu) returns (Empty) {
42 option (google.api.http) = {
43 post: "/v1/EnableOnu"
44 body: "*"
45 };
46 }
47
48 rpc DeactivateOnu(Onu) returns (Empty) {
49 option (google.api.http) = {
50 post: "/v1/DisableOnu"
51 body: "*"
52 };
53 }
54
55 rpc DeleteOnu(Onu) returns (Empty) {
56 option (google.api.http) = {
57 post: "/v1/DeleteOnu"
58 body: "*"
59 };
60 }
61
62 rpc OmciMsgOut(OmciMsg) returns (Empty) {
63 option (google.api.http) = {
64 post: "/v1/OmciMsgOut"
65 body: "*"
66 };
67 }
68
69 rpc OnuPacketOut(OnuPacket) returns (Empty) {
70 option (google.api.http) = {
71 post: "/v1/OnuPacketOut"
72 body: "*"
73 };
74 }
75
76 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
77 option (google.api.http) = {
78 post: "/v1/UplinkPacketOut"
79 body: "*"
80 };
81 }
82
83 rpc FlowAdd(Flow) returns (Empty) {
84 option (google.api.http) = {
85 post: "/v1/FlowAdd"
86 body: "*"
87 };
88 }
89
90 rpc FlowRemove(Flow) returns (Empty) {
91 option (google.api.http) = {
92 post: "/v1/FlowRemove"
93 body: "*"
94 };
95 }
96
97 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
98 option (google.api.http) = {
99 post: "/v1/HeartbeatCheck"
100 body: "*"
101 };
102 }
103
104 rpc EnablePonIf(Interface) returns (Empty) {
105 option (google.api.http) = {
106 post: "/v1/EnablePonIf"
107 body: "*"
108 };
109 }
110
111 rpc DisablePonIf(Interface) returns (Empty) {
112 option (google.api.http) = {
113 post: "/v1/DisablePonIf"
114 body: "*"
115 };
116 }
117
118 rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
119 option (google.api.http) = {
120 post: "/v1/GetDeviceInfo"
121 body: "*"
122 };
123 }
124
125 rpc Reboot(Empty) returns (Empty) {
126 option (google.api.http) = {
127 post: "/v1/Reboot"
128 body: "*"
129 };
130 }
131
132 rpc CollectStatistics(Empty) returns (Empty) {
133 option (google.api.http) = {
134 post: "/v1/CollectStatistics"
135 body: "*"
136 };
137 }
138
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400139 rpc CreateTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700140 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400141 post: "/v1/CreateTrafficSchedulers"
Zack Williams52209662019-02-07 10:15:31 -0700142 body: "*"
143 };
144 }
145
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400146 rpc RemoveTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700147 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400148 post: "/v1/RemoveTrafficSchedulers"
149 body: "*"
150 };
151 }
152
153 rpc CreateTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
154 option (google.api.http) = {
155 post: "/v1/CreateTrafficQueues"
156 body: "*"
157 };
158 }
159
160 rpc RemoveTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
161 option (google.api.http) = {
162 post: "/v1/RemoveTrafficQueues"
Zack Williams52209662019-02-07 10:15:31 -0700163 body: "*"
164 };
165 }
166
167 rpc EnableIndication(Empty) returns (stream Indication) {}
Burak Gurdag402dd952019-12-10 20:31:11 +0000168
169 rpc PerformGroupOperation(Group) returns (Empty) {
170 option (google.api.http) = {
171 post: "/v1/PerformGroupOperation"
172 body: "*"
173 };
174 }
Zack Williams52209662019-02-07 10:15:31 -0700175}
176
177message Indication {
178 oneof data {
179 OltIndication olt_ind = 1;
180 IntfIndication intf_ind = 2;
181 IntfOperIndication intf_oper_ind = 3;
182 OnuDiscIndication onu_disc_ind = 4;
183 OnuIndication onu_ind = 5;
184 OmciIndication omci_ind = 6;
185 PacketIndication pkt_ind = 7;
186 PortStatistics port_stats = 8;
187 FlowStatistics flow_stats = 9;
188 AlarmIndication alarm_ind= 10;
189 }
190}
191
192message AlarmIndication {
193 oneof data {
194 LosIndication los_ind = 1;
195 DyingGaspIndication dying_gasp_ind = 2;
196 OnuAlarmIndication onu_alarm_ind = 3;
197 OnuStartupFailureIndication onu_startup_fail_ind = 4;
198 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
199 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
200 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
201 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
202 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
203 OnuActivationFailureIndication onu_activation_fail_ind = 10;
204 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Naga Manjunath0a734252019-11-21 19:00:23 +0530205 OnuLossOfKeySyncFailureIndication onu_loss_of_sync_fail_ind = 12;
206 OnuItuPonStatsIndication onu_itu_pon_stats_ind = 13;
Devmalya Paulea6eb472020-02-04 20:41:01 -0500207 OnuDeactivationFailureIndication onu_deactivation_failure_ind = 14;
Devmalya Paulb0c12472020-02-18 20:08:53 -0500208 OnuRemoteDefectIndication onu_remote_defect_ind = 15;
Devmalya Paul82957962020-03-01 18:49:37 -0500209 OnuLossOfGEMChannelDelineationIndication onu_loss_gem_delineation_ind = 16;
210 OnuPhysicalEquipmentErrorIndication onu_physical_equipment_error_ind = 17;
211 OnuLossOfAcknowledgementIndication onu_loss_of_ack_ind = 18;
Devmalya Paul342bf9d2020-03-19 02:42:56 -0400212 OnuDifferentialReachExceededIndication onu_diff_reach_exceeded_ind = 19;
Zack Williams52209662019-02-07 10:15:31 -0700213 }
214}
215
216message OltIndication {
217 string oper_state = 1; // up, down
218}
219
220message IntfIndication {
221 fixed32 intf_id = 1;
222 string oper_state = 2; // up, down
223}
224
225message OnuDiscIndication {
226 fixed32 intf_id = 1;
227 SerialNumber serial_number = 2;
228}
229
230message OnuIndication {
231 fixed32 intf_id = 1;
232 fixed32 onu_id = 2;
233 string oper_state = 3; // up, down
234 string admin_state = 5; // up, down
235 SerialNumber serial_number = 4;
236}
237
238message IntfOperIndication {
239 string type = 1; // nni, pon
240 fixed32 intf_id = 2;
241 string oper_state = 3; // up, down
242}
243
244message OmciIndication {
245 fixed32 intf_id = 1;
246 fixed32 onu_id = 2;
247 bytes pkt = 3;
248}
249
250message PacketIndication {
251 string intf_type = 5; // nni, pon, unknown
252 fixed32 intf_id = 1;
253 fixed32 gemport_id = 2;
254 fixed32 flow_id = 3;
255 fixed32 port_no = 6;
256 fixed64 cookie = 7;
257 bytes pkt = 4;
258}
259
260message Interface {
261 fixed32 intf_id = 1;
262}
263
264message Heartbeat {
265 fixed32 heartbeat_signature = 1;
266}
267
268message Onu {
269 fixed32 intf_id = 1;
270 fixed32 onu_id = 2;
271 SerialNumber serial_number = 3;
272 fixed32 pir = 4; // peak information rate assigned to onu
273}
274
275message OmciMsg {
276 fixed32 intf_id = 1;
277 fixed32 onu_id = 2;
278 bytes pkt = 3;
279}
280
281message OnuPacket {
282 fixed32 intf_id = 1;
283 fixed32 onu_id = 2;
284 fixed32 port_no = 4;
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400285 fixed32 gemport_id = 5;
Zack Williams52209662019-02-07 10:15:31 -0700286 bytes pkt = 3;
287}
288
289message UplinkPacket {
290 fixed32 intf_id = 1;
291 bytes pkt = 2;
292}
293
294message DeviceInfo {
295 string vendor = 1;
296 string model = 2;
297 string hardware_version = 3;
298 string firmware_version = 4;
299 string device_id = 16;
300 string device_serial_number = 17;
301
302 // Total number of pon intf ports on the device
303 fixed32 pon_ports = 12;
304
305 // If using global per-device technology profile. To be deprecated
306 string technology = 5;
307 fixed32 onu_id_start = 6;
308 fixed32 onu_id_end = 7;
309 fixed32 alloc_id_start = 8;
310 fixed32 alloc_id_end = 9;
311 fixed32 gemport_id_start = 10;
312 fixed32 gemport_id_end = 11;
313 fixed32 flow_id_start = 13;
314 fixed32 flow_id_end = 14;
315
316 message DeviceResourceRanges {
317
318 // List of 0 or more intf_ids that use the same technology and pools.
319 // If 0 intf_ids supplied, it implies ALL interfaces
320 repeated fixed32 intf_ids = 1;
321
322 // Technology profile for this pool
323 string technology = 2;
324
325 message Pool {
326 enum PoolType {
327 ONU_ID = 0;
328 ALLOC_ID = 1;
329 GEMPORT_ID = 2;
330 FLOW_ID = 3;
331 }
332
333 enum SharingType {
334 DEDICATED_PER_INTF = 0;
335 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
336 SHARED_BY_ALL_INTF_SAME_TECH = 2; // Shared across all interfaces of the same technology used in this range
337 }
338
339 PoolType type = 1;
340 SharingType sharing = 2;
341 fixed32 start = 3; // lower bound on IDs allocated from this pool
342 fixed32 end = 4; // upper bound on IDs allocated from this pool
343 }
344 repeated Pool pools = 3;
345 }
346 repeated DeviceResourceRanges ranges = 15;
347}
348
349message Classifier {
350 fixed32 o_tpid = 1;
351 fixed32 o_vid = 2;
352 fixed32 i_tpid = 3;
353 fixed32 i_vid = 4;
354 fixed32 o_pbits = 5;
355 fixed32 i_pbits = 6;
356 fixed32 eth_type = 7;
357 bytes dst_mac = 8;
358 bytes src_mac = 9;
359 fixed32 ip_proto = 10;
360 fixed32 dst_ip = 11;
361 fixed32 src_ip = 12;
362 fixed32 src_port = 13;
363 fixed32 dst_port = 14;
364 string pkt_tag_type = 15; // untagged, single_tag, double_tag
365}
366
367message ActionCmd {
368 bool add_outer_tag = 1;
369 bool remove_outer_tag = 2;
370 bool trap_to_host = 3;
Burak Gurdag402dd952019-12-10 20:31:11 +0000371 bool remark_outer_pbits = 4;
372 bool remark_inner_pbits = 5;
373 bool add_inner_tag = 6;
374 bool remove_inner_tag = 7;
375 bool translate_inner_tag = 8;
376 bool translate_outer_tag = 9;
Zack Williams52209662019-02-07 10:15:31 -0700377}
378
379message Action {
380 ActionCmd cmd = 1;
381 fixed32 o_vid = 2;
382 fixed32 o_pbits = 3;
383 fixed32 o_tpid = 4;
384 fixed32 i_vid = 5;
385 fixed32 i_pbits = 6;
386 fixed32 i_tpid = 7;
387}
388
389message Flow {
390 sfixed32 access_intf_id = 1;
391 sfixed32 onu_id = 2;
392 sfixed32 uni_id = 11;
393 fixed32 flow_id = 3;
394 string flow_type = 4; // upstream, downstream, broadcast, multicast
395 sfixed32 alloc_id = 10;
396 sfixed32 network_intf_id = 5;
397 sfixed32 gemport_id = 6;
398 Classifier classifier = 7;
399 Action action = 8;
400 sfixed32 priority = 9;
401 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
402 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 +0000403 fixed32 group_id = 14;
Zack Williams52209662019-02-07 10:15:31 -0700404}
405
406message SerialNumber {
407 bytes vendor_id = 1;
408 bytes vendor_specific = 2;
409}
410
411message PortStatistics {
412 fixed32 intf_id = 1;
413 fixed64 rx_bytes = 2;
414 fixed64 rx_packets = 3;
415 fixed64 rx_ucast_packets = 4;
416 fixed64 rx_mcast_packets = 5;
417 fixed64 rx_bcast_packets = 6;
418 fixed64 rx_error_packets = 7;
419 fixed64 tx_bytes = 8;
420 fixed64 tx_packets = 9;
421 fixed64 tx_ucast_packets = 10;
422 fixed64 tx_mcast_packets = 11;
423 fixed64 tx_bcast_packets = 12;
424 fixed64 tx_error_packets = 13;
425 fixed64 rx_crc_errors = 14;
426 fixed64 bip_errors = 15;
427 fixed32 timestamp = 16;
428}
429
430message FlowStatistics {
431 fixed32 flow_id = 1;
432 fixed64 rx_bytes = 2;
433 fixed64 rx_packets = 3;
434 fixed64 tx_bytes = 8;
435 fixed64 tx_packets = 9;
436 fixed32 timestamp = 16;
437}
438
439message LosIndication {
440 fixed32 intf_id = 1;
441 string status = 2;
442}
443
444message DyingGaspIndication {
445 fixed32 intf_id = 1;
446 fixed32 onu_id = 2;
447 string status = 3;
448}
449
450message OnuAlarmIndication {
451 fixed32 intf_id = 1;
452 fixed32 onu_id = 2;
453 string los_status = 3;
454 string lob_status = 4;
455 string lopc_miss_status = 5;
456 string lopc_mic_error_status = 6;
Naga Manjunath0a734252019-11-21 19:00:23 +0530457 string lofi_status = 7;
458 string loami_status = 8;
Zack Williams52209662019-02-07 10:15:31 -0700459}
460
461message OnuStartupFailureIndication {
462 fixed32 intf_id = 1;
463 fixed32 onu_id = 2;
464 string status = 3;
465}
466
467message OnuSignalDegradeIndication {
468 fixed32 intf_id = 1;
469 fixed32 onu_id = 2;
470 string status = 3;
471 fixed32 inverse_bit_error_rate = 4;
472}
473
474message OnuDriftOfWindowIndication {
475 fixed32 intf_id = 1;
476 fixed32 onu_id = 2;
477 string status = 3;
478 fixed32 drift = 4;
479 fixed32 new_eqd = 5;
480}
481
482message OnuLossOfOmciChannelIndication {
483 fixed32 intf_id = 1;
484 fixed32 onu_id = 2;
485 string status = 3;
486}
487
488message OnuSignalsFailureIndication {
489 fixed32 intf_id = 1;
490 fixed32 onu_id = 2;
491 string status = 3;
492 fixed32 inverse_bit_error_rate = 4;
493}
494
495message OnuTransmissionInterferenceWarning {
496 fixed32 intf_id = 1;
497 fixed32 onu_id = 2;
498 string status = 3;
499 fixed32 drift = 4;
500}
501
502message OnuActivationFailureIndication {
503 fixed32 intf_id = 1;
504 fixed32 onu_id = 2;
Naga Manjunath0a734252019-11-21 19:00:23 +0530505 fixed32 fail_reason = 3;
506}
507
508message OnuLossOfKeySyncFailureIndication {
509 fixed32 intf_id = 1;
510 fixed32 onu_id = 2;
511 string status = 3;
512}
513
514message OnuItuPonStatsIndication{
515 fixed32 intf_id = 1;
516 fixed32 onu_id = 2;
517 fixed32 rdi_errors = 3;
Zack Williams52209662019-02-07 10:15:31 -0700518}
519
520message OnuProcessingErrorIndication {
521 fixed32 intf_id = 1;
522 fixed32 onu_id = 2;
523}
524
Devmalya Paulea6eb472020-02-04 20:41:01 -0500525message OnuDeactivationFailureIndication {
526 fixed32 intf_id = 1;
527 fixed32 onu_id = 2;
528 fixed32 fail_reason = 3;
529}
530
Devmalya Paulb0c12472020-02-18 20:08:53 -0500531message OnuRemoteDefectIndication{
532 fixed32 intf_id = 1;
533 fixed32 onu_id = 2;
534 fixed32 rdi_errors = 3;
535}
536
Devmalya Paul82957962020-03-01 18:49:37 -0500537message OnuLossOfGEMChannelDelineationIndication {
538 fixed32 intf_id = 1;
539 fixed32 onu_id = 2;
540 string status = 3;
541 fixed32 delineation_errors = 4;
542}
543
544message OnuPhysicalEquipmentErrorIndication {
545 fixed32 intf_id = 1;
546 fixed32 onu_id = 2;
547 string status = 3;
548}
549
550message OnuLossOfAcknowledgementIndication {
551 fixed32 intf_id = 1;
552 fixed32 onu_id = 2;
553 string status = 3;
554}
555
Devmalya Paul342bf9d2020-03-19 02:42:56 -0400556message OnuDifferentialReachExceededIndication {
557 fixed32 intf_id = 1;
558 fixed32 onu_id = 2;
559 string status = 3;
560 fixed32 distance = 4;
561}
562
Burak Gurdag402dd952019-12-10 20:31:11 +0000563message GroupMember {
564 enum InterfaceType {
565 PON = 0;
566 EPON_1G_PATH = 1;
567 EPON_10G_PATH = 2;
568 }
569 uint32 interface_id = 1;
570 InterfaceType interface_type = 2;
571 uint32 gem_port_id = 3;
572 uint32 priority = 4; // Priority (and also the ID) of the default fixed queue for the multicast traffic.
573 // This queue is attached to the default PON port scheduler.
574}
575
576message Group {
577 enum GroupMembersCommand {
578 ADD_MEMBERS = 0;
579 REMOVE_MEMBERS = 1;
580 SET_MEMBERS = 2;
581 }
582
583 uint32 group_id = 1;
584 GroupMembersCommand command = 2;
585 repeated GroupMember members = 3;
586 Action action = 4;
587}
588
589
590
Zack Williams52209662019-02-07 10:15:31 -0700591message Empty {}
Burak Gurdag402dd952019-12-10 20:31:11 +0000592