blob: bb04eed24b3e5086e9ce3537f1a4b23477f1dadf [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
Zack Williams52209662019-02-07 10:15:31 -0700184}
185
186message Indication {
187 oneof data {
188 OltIndication olt_ind = 1;
189 IntfIndication intf_ind = 2;
190 IntfOperIndication intf_oper_ind = 3;
191 OnuDiscIndication onu_disc_ind = 4;
192 OnuIndication onu_ind = 5;
193 OmciIndication omci_ind = 6;
194 PacketIndication pkt_ind = 7;
195 PortStatistics port_stats = 8;
196 FlowStatistics flow_stats = 9;
197 AlarmIndication alarm_ind= 10;
198 }
199}
200
201message AlarmIndication {
202 oneof data {
203 LosIndication los_ind = 1;
204 DyingGaspIndication dying_gasp_ind = 2;
205 OnuAlarmIndication onu_alarm_ind = 3;
206 OnuStartupFailureIndication onu_startup_fail_ind = 4;
207 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
208 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
209 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
210 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
211 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
212 OnuActivationFailureIndication onu_activation_fail_ind = 10;
213 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Naga Manjunath0a734252019-11-21 19:00:23 +0530214 OnuLossOfKeySyncFailureIndication onu_loss_of_sync_fail_ind = 12;
215 OnuItuPonStatsIndication onu_itu_pon_stats_ind = 13;
Devmalya Paulea6eb472020-02-04 20:41:01 -0500216 OnuDeactivationFailureIndication onu_deactivation_failure_ind = 14;
Devmalya Paulb0c12472020-02-18 20:08:53 -0500217 OnuRemoteDefectIndication onu_remote_defect_ind = 15;
Devmalya Paul82957962020-03-01 18:49:37 -0500218 OnuLossOfGEMChannelDelineationIndication onu_loss_gem_delineation_ind = 16;
219 OnuPhysicalEquipmentErrorIndication onu_physical_equipment_error_ind = 17;
220 OnuLossOfAcknowledgementIndication onu_loss_of_ack_ind = 18;
Devmalya Paul342bf9d2020-03-19 02:42:56 -0400221 OnuDifferentialReachExceededIndication onu_diff_reach_exceeded_ind = 19;
Zack Williams52209662019-02-07 10:15:31 -0700222 }
223}
224
225message OltIndication {
226 string oper_state = 1; // up, down
227}
228
229message IntfIndication {
230 fixed32 intf_id = 1;
231 string oper_state = 2; // up, down
232}
233
234message OnuDiscIndication {
235 fixed32 intf_id = 1;
236 SerialNumber serial_number = 2;
237}
238
239message OnuIndication {
240 fixed32 intf_id = 1;
241 fixed32 onu_id = 2;
242 string oper_state = 3; // up, down
243 string admin_state = 5; // up, down
244 SerialNumber serial_number = 4;
245}
246
247message IntfOperIndication {
248 string type = 1; // nni, pon
249 fixed32 intf_id = 2;
250 string oper_state = 3; // up, down
251}
252
253message OmciIndication {
254 fixed32 intf_id = 1;
255 fixed32 onu_id = 2;
256 bytes pkt = 3;
257}
258
259message PacketIndication {
260 string intf_type = 5; // nni, pon, unknown
261 fixed32 intf_id = 1;
262 fixed32 gemport_id = 2;
263 fixed32 flow_id = 3;
264 fixed32 port_no = 6;
265 fixed64 cookie = 7;
266 bytes pkt = 4;
267}
268
269message Interface {
270 fixed32 intf_id = 1;
271}
272
273message Heartbeat {
274 fixed32 heartbeat_signature = 1;
275}
276
277message Onu {
278 fixed32 intf_id = 1;
279 fixed32 onu_id = 2;
280 SerialNumber serial_number = 3;
281 fixed32 pir = 4; // peak information rate assigned to onu
282}
283
284message OmciMsg {
285 fixed32 intf_id = 1;
286 fixed32 onu_id = 2;
287 bytes pkt = 3;
288}
289
290message OnuPacket {
291 fixed32 intf_id = 1;
292 fixed32 onu_id = 2;
293 fixed32 port_no = 4;
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400294 fixed32 gemport_id = 5;
Zack Williams52209662019-02-07 10:15:31 -0700295 bytes pkt = 3;
296}
297
298message UplinkPacket {
299 fixed32 intf_id = 1;
300 bytes pkt = 2;
301}
302
303message DeviceInfo {
304 string vendor = 1;
305 string model = 2;
306 string hardware_version = 3;
307 string firmware_version = 4;
308 string device_id = 16;
309 string device_serial_number = 17;
310
311 // Total number of pon intf ports on the device
312 fixed32 pon_ports = 12;
313
314 // If using global per-device technology profile. To be deprecated
315 string technology = 5;
316 fixed32 onu_id_start = 6;
317 fixed32 onu_id_end = 7;
318 fixed32 alloc_id_start = 8;
319 fixed32 alloc_id_end = 9;
320 fixed32 gemport_id_start = 10;
321 fixed32 gemport_id_end = 11;
322 fixed32 flow_id_start = 13;
323 fixed32 flow_id_end = 14;
324
325 message DeviceResourceRanges {
326
327 // List of 0 or more intf_ids that use the same technology and pools.
328 // If 0 intf_ids supplied, it implies ALL interfaces
329 repeated fixed32 intf_ids = 1;
330
331 // Technology profile for this pool
332 string technology = 2;
333
334 message Pool {
335 enum PoolType {
336 ONU_ID = 0;
337 ALLOC_ID = 1;
338 GEMPORT_ID = 2;
339 FLOW_ID = 3;
340 }
341
342 enum SharingType {
343 DEDICATED_PER_INTF = 0;
344 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
345 SHARED_BY_ALL_INTF_SAME_TECH = 2; // Shared across all interfaces of the same technology used in this range
346 }
347
348 PoolType type = 1;
349 SharingType sharing = 2;
350 fixed32 start = 3; // lower bound on IDs allocated from this pool
351 fixed32 end = 4; // upper bound on IDs allocated from this pool
352 }
353 repeated Pool pools = 3;
354 }
355 repeated DeviceResourceRanges ranges = 15;
356}
357
358message Classifier {
359 fixed32 o_tpid = 1;
360 fixed32 o_vid = 2;
361 fixed32 i_tpid = 3;
362 fixed32 i_vid = 4;
363 fixed32 o_pbits = 5;
364 fixed32 i_pbits = 6;
365 fixed32 eth_type = 7;
366 bytes dst_mac = 8;
367 bytes src_mac = 9;
368 fixed32 ip_proto = 10;
369 fixed32 dst_ip = 11;
370 fixed32 src_ip = 12;
371 fixed32 src_port = 13;
372 fixed32 dst_port = 14;
373 string pkt_tag_type = 15; // untagged, single_tag, double_tag
374}
375
376message ActionCmd {
377 bool add_outer_tag = 1;
378 bool remove_outer_tag = 2;
379 bool trap_to_host = 3;
Burak Gurdag402dd952019-12-10 20:31:11 +0000380 bool remark_outer_pbits = 4;
381 bool remark_inner_pbits = 5;
382 bool add_inner_tag = 6;
383 bool remove_inner_tag = 7;
384 bool translate_inner_tag = 8;
385 bool translate_outer_tag = 9;
Zack Williams52209662019-02-07 10:15:31 -0700386}
387
388message Action {
389 ActionCmd cmd = 1;
390 fixed32 o_vid = 2;
391 fixed32 o_pbits = 3;
392 fixed32 o_tpid = 4;
393 fixed32 i_vid = 5;
394 fixed32 i_pbits = 6;
395 fixed32 i_tpid = 7;
396}
397
398message Flow {
399 sfixed32 access_intf_id = 1;
400 sfixed32 onu_id = 2;
401 sfixed32 uni_id = 11;
402 fixed32 flow_id = 3;
403 string flow_type = 4; // upstream, downstream, broadcast, multicast
404 sfixed32 alloc_id = 10;
405 sfixed32 network_intf_id = 5;
406 sfixed32 gemport_id = 6;
407 Classifier classifier = 7;
408 Action action = 8;
409 sfixed32 priority = 9;
410 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
411 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 +0000412 fixed32 group_id = 14;
Zack Williams52209662019-02-07 10:15:31 -0700413}
414
415message SerialNumber {
416 bytes vendor_id = 1;
417 bytes vendor_specific = 2;
418}
419
420message PortStatistics {
421 fixed32 intf_id = 1;
422 fixed64 rx_bytes = 2;
423 fixed64 rx_packets = 3;
424 fixed64 rx_ucast_packets = 4;
425 fixed64 rx_mcast_packets = 5;
426 fixed64 rx_bcast_packets = 6;
427 fixed64 rx_error_packets = 7;
428 fixed64 tx_bytes = 8;
429 fixed64 tx_packets = 9;
430 fixed64 tx_ucast_packets = 10;
431 fixed64 tx_mcast_packets = 11;
432 fixed64 tx_bcast_packets = 12;
433 fixed64 tx_error_packets = 13;
434 fixed64 rx_crc_errors = 14;
435 fixed64 bip_errors = 15;
436 fixed32 timestamp = 16;
437}
438
439message FlowStatistics {
440 fixed32 flow_id = 1;
441 fixed64 rx_bytes = 2;
442 fixed64 rx_packets = 3;
443 fixed64 tx_bytes = 8;
444 fixed64 tx_packets = 9;
445 fixed32 timestamp = 16;
446}
447
448message LosIndication {
449 fixed32 intf_id = 1;
450 string status = 2;
451}
452
453message DyingGaspIndication {
454 fixed32 intf_id = 1;
455 fixed32 onu_id = 2;
456 string status = 3;
457}
458
459message OnuAlarmIndication {
460 fixed32 intf_id = 1;
461 fixed32 onu_id = 2;
462 string los_status = 3;
463 string lob_status = 4;
464 string lopc_miss_status = 5;
465 string lopc_mic_error_status = 6;
Naga Manjunath0a734252019-11-21 19:00:23 +0530466 string lofi_status = 7;
467 string loami_status = 8;
Zack Williams52209662019-02-07 10:15:31 -0700468}
469
470message OnuStartupFailureIndication {
471 fixed32 intf_id = 1;
472 fixed32 onu_id = 2;
473 string status = 3;
474}
475
476message OnuSignalDegradeIndication {
477 fixed32 intf_id = 1;
478 fixed32 onu_id = 2;
479 string status = 3;
480 fixed32 inverse_bit_error_rate = 4;
481}
482
483message OnuDriftOfWindowIndication {
484 fixed32 intf_id = 1;
485 fixed32 onu_id = 2;
486 string status = 3;
487 fixed32 drift = 4;
488 fixed32 new_eqd = 5;
489}
490
491message OnuLossOfOmciChannelIndication {
492 fixed32 intf_id = 1;
493 fixed32 onu_id = 2;
494 string status = 3;
495}
496
497message OnuSignalsFailureIndication {
498 fixed32 intf_id = 1;
499 fixed32 onu_id = 2;
500 string status = 3;
501 fixed32 inverse_bit_error_rate = 4;
502}
503
504message OnuTransmissionInterferenceWarning {
505 fixed32 intf_id = 1;
506 fixed32 onu_id = 2;
507 string status = 3;
508 fixed32 drift = 4;
509}
510
511message OnuActivationFailureIndication {
512 fixed32 intf_id = 1;
513 fixed32 onu_id = 2;
Naga Manjunath0a734252019-11-21 19:00:23 +0530514 fixed32 fail_reason = 3;
515}
516
517message OnuLossOfKeySyncFailureIndication {
518 fixed32 intf_id = 1;
519 fixed32 onu_id = 2;
520 string status = 3;
521}
522
523message OnuItuPonStatsIndication{
524 fixed32 intf_id = 1;
525 fixed32 onu_id = 2;
526 fixed32 rdi_errors = 3;
Zack Williams52209662019-02-07 10:15:31 -0700527}
528
529message OnuProcessingErrorIndication {
530 fixed32 intf_id = 1;
531 fixed32 onu_id = 2;
532}
533
Devmalya Paulea6eb472020-02-04 20:41:01 -0500534message OnuDeactivationFailureIndication {
535 fixed32 intf_id = 1;
536 fixed32 onu_id = 2;
537 fixed32 fail_reason = 3;
538}
539
Devmalya Paulb0c12472020-02-18 20:08:53 -0500540message OnuRemoteDefectIndication{
541 fixed32 intf_id = 1;
542 fixed32 onu_id = 2;
543 fixed32 rdi_errors = 3;
544}
545
Devmalya Paul82957962020-03-01 18:49:37 -0500546message OnuLossOfGEMChannelDelineationIndication {
547 fixed32 intf_id = 1;
548 fixed32 onu_id = 2;
549 string status = 3;
550 fixed32 delineation_errors = 4;
551}
552
553message OnuPhysicalEquipmentErrorIndication {
554 fixed32 intf_id = 1;
555 fixed32 onu_id = 2;
556 string status = 3;
557}
558
559message OnuLossOfAcknowledgementIndication {
560 fixed32 intf_id = 1;
561 fixed32 onu_id = 2;
562 string status = 3;
563}
564
Devmalya Paul342bf9d2020-03-19 02:42:56 -0400565message OnuDifferentialReachExceededIndication {
566 fixed32 intf_id = 1;
567 fixed32 onu_id = 2;
568 string status = 3;
569 fixed32 distance = 4;
570}
571
Burak Gurdag402dd952019-12-10 20:31:11 +0000572message GroupMember {
573 enum InterfaceType {
574 PON = 0;
575 EPON_1G_PATH = 1;
576 EPON_10G_PATH = 2;
577 }
578 uint32 interface_id = 1;
579 InterfaceType interface_type = 2;
580 uint32 gem_port_id = 3;
581 uint32 priority = 4; // Priority (and also the ID) of the default fixed queue for the multicast traffic.
582 // This queue is attached to the default PON port scheduler.
583}
584
585message Group {
586 enum GroupMembersCommand {
587 ADD_MEMBERS = 0;
588 REMOVE_MEMBERS = 1;
589 SET_MEMBERS = 2;
590 }
591
592 uint32 group_id = 1;
593 GroupMembersCommand command = 2;
594 repeated GroupMember members = 3;
595 Action action = 4;
596}
597
Dinesh Belwalkared6da5e2020-02-25 11:23:57 -0800598message ValueParam {
599 Onu onu = 1;
600 common.ValueType.Type value = 2;
601}
Burak Gurdag402dd952019-12-10 20:31:11 +0000602
Zack Williams52209662019-02-07 10:15:31 -0700603message Empty {}
Burak Gurdag402dd952019-12-10 20:31:11 +0000604