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