blob: e6bb0b5d21bc490c2643742b14a2e6f580a748cd [file] [log] [blame]
Shad Ansari19249582018-04-30 04:31:00 +00001// 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";
16package openolt;
17import "google/api/annotations.proto";
18
19service Openolt {
20
Nicolas Palpacuere3fc0d22018-08-02 16:51:05 -040021 rpc DisableOlt(Empty) returns (Empty) {
22 option (google.api.http) = {
23 post: "/v1/Disable"
24 body: "*"
25 };
26 }
27
28 rpc ReenableOlt(Empty) returns (Empty) {
29 option (google.api.http) = {
30 post: "/v1/Reenable"
31 body: "*"
32 };
33 }
34
Shad Ansari19249582018-04-30 04:31:00 +000035 rpc ActivateOnu(Onu) returns (Empty) {
36 option (google.api.http) = {
37 post: "/v1/EnableOnu"
38 body: "*"
39 };
40 }
41
Jonathan Davis70c21812018-07-19 15:32:10 -040042 rpc DeactivateOnu(Onu) returns (Empty) {
43 option (google.api.http) = {
44 post: "/v1/DisableOnu"
45 body: "*"
46 };
47 }
48
49 rpc DeleteOnu(Onu) returns (Empty) {
50 option (google.api.http) = {
51 post: "/v1/DeleteOnu"
52 body: "*"
53 };
54 }
55
Shad Ansari19249582018-04-30 04:31:00 +000056 rpc OmciMsgOut(OmciMsg) returns (Empty) {
57 option (google.api.http) = {
58 post: "/v1/OmciMsgOut"
59 body: "*"
60 };
61 }
62
63 rpc OnuPacketOut(OnuPacket) returns (Empty) {
64 option (google.api.http) = {
65 post: "/v1/OnuPacketOut"
66 body: "*"
67 };
68 }
69
Nicolas Palpacuerb78def42018-06-07 12:55:26 -040070 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
71 option (google.api.http) = {
72 post: "/v1/UplinkPacketOut"
73 body: "*"
74 };
75 }
76
Shad Ansari19249582018-04-30 04:31:00 +000077 rpc FlowAdd(Flow) returns (Empty) {
78 option (google.api.http) = {
79 post: "/v1/FlowAdd"
80 body: "*"
81 };
82 }
83
Nicolas Palpacueredfaa0c2018-07-05 15:05:27 -040084 rpc FlowRemove(Flow) returns (Empty) {
85 option (google.api.http) = {
86 post: "/v1/FlowRemove"
87 body: "*"
88 };
89 }
90
nick7be062f2018-05-25 17:52:56 -040091 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
92 option (google.api.http) = {
93 post: "/v1/HeartbeatCheck"
94 body: "*"
95 };
96 }
97
Nicolas Palpacuer05ea0ea2018-07-06 11:47:21 -040098 rpc EnablePonIf(Interface) returns (Empty) {
99 option (google.api.http) = {
100 post: "/v1/EnablePonIf"
101 body: "*"
102 };
103 }
104
105 rpc DisablePonIf(Interface) returns (Empty) {
106 option (google.api.http) = {
107 post: "/v1/DisablePonIf"
108 body: "*"
109 };
110 }
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400111
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400112 rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
113 option (google.api.http) = {
114 post: "/v1/GetDeviceInfo"
115 body: "*"
116 };
117 }
118
Nicolas Palpacuer45180662018-08-02 14:01:51 -0400119 rpc Reboot(Empty) returns (Empty) {
120 option (google.api.http) = {
121 post: "/v1/Reboot"
122 body: "*"
123 };
124 }
125
Shad Ansari39739bc2018-09-13 21:38:37 +0000126 rpc CollectStatistics(Empty) returns (Empty) {
127 option (google.api.http) = {
128 post: "/v1/CollectStatistics"
129 body: "*"
130 };
131 }
132
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700133 rpc CreateTconts(Tconts) returns (Empty) {
134 option (google.api.http) = {
135 post: "/v1/CreateTconts"
136 body: "*"
137 };
138 }
139
140 rpc RemoveTconts(Tconts) returns (Empty) {
141 option (google.api.http) = {
142 post: "/v1/RemoveTconts"
143 body: "*"
144 };
145 }
146
Shad Ansari19249582018-04-30 04:31:00 +0000147 rpc EnableIndication(Empty) returns (stream Indication) {}
148}
149
150message Indication {
151 oneof data {
152 OltIndication olt_ind = 1;
153 IntfIndication intf_ind = 2;
154 IntfOperIndication intf_oper_ind = 3;
155 OnuDiscIndication onu_disc_ind = 4;
156 OnuIndication onu_ind = 5;
157 OmciIndication omci_ind = 6;
158 PacketIndication pkt_ind = 7;
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400159 PortStatistics port_stats = 8;
160 FlowStatistics flow_stats = 9;
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400161 AlarmIndication alarm_ind= 10;
162 }
163}
164
165message AlarmIndication {
166 oneof data {
167 LosIndication los_ind = 1;
168 DyingGaspIndication dying_gasp_ind = 2;
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400169 OnuAlarmIndication onu_alarm_ind = 3;
170 OnuStartupFailureIndication onu_startup_fail_ind = 4;
171 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
172 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
173 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
174 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
175 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
176 OnuActivationFailureIndication onu_activation_fail_ind = 10;
177 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Shad Ansari19249582018-04-30 04:31:00 +0000178 }
179}
180
181message OltIndication {
182 string oper_state = 1; // up, down
Shad Ansari19249582018-04-30 04:31:00 +0000183}
184
185message IntfIndication {
186 fixed32 intf_id = 1;
187 string oper_state = 2; // up, down
188}
189
190message OnuDiscIndication {
191 fixed32 intf_id = 1;
192 SerialNumber serial_number = 2;
193}
194
195message OnuIndication {
196 fixed32 intf_id = 1;
197 fixed32 onu_id = 2;
198 string oper_state = 3; // up, down
Shad Ansarife9d9422018-05-22 23:25:02 +0000199 string admin_state = 5; // up, down
200 SerialNumber serial_number = 4;
Shad Ansari19249582018-04-30 04:31:00 +0000201}
202
203message IntfOperIndication {
204 string type = 1; // nni, pon
205 fixed32 intf_id = 2;
206 string oper_state = 3; // up, down
207}
208
209message OmciIndication {
210 fixed32 intf_id = 1;
211 fixed32 onu_id = 2;
212 bytes pkt = 3;
213}
214
215message PacketIndication {
Shad Ansariebc80362018-09-30 09:33:35 +0000216 string intf_type = 5; // nni, pon, unknown
Shad Ansari19249582018-04-30 04:31:00 +0000217 fixed32 intf_id = 1;
218 fixed32 gemport_id = 2;
219 fixed32 flow_id = 3;
Craig Lutgen967a1d02018-11-27 10:41:51 -0600220 fixed32 port_no = 6;
221 fixed64 cookie = 7;
Shad Ansari19249582018-04-30 04:31:00 +0000222 bytes pkt = 4;
223}
224
Nicolas Palpacuer05ea0ea2018-07-06 11:47:21 -0400225message Interface {
226 fixed32 intf_id = 1;
227}
228
nick7be062f2018-05-25 17:52:56 -0400229message Heartbeat {
230 fixed32 heartbeat_signature = 1;
231}
232
Shad Ansari19249582018-04-30 04:31:00 +0000233message Onu {
234 fixed32 intf_id = 1;
235 fixed32 onu_id = 2;
236 SerialNumber serial_number = 3;
Shad Ansari06101952018-07-25 00:22:09 +0000237 fixed32 pir = 4; // peak information rate assigned to onu
Shad Ansari19249582018-04-30 04:31:00 +0000238}
239
240message OmciMsg {
241 fixed32 intf_id = 1;
242 fixed32 onu_id = 2;
243 bytes pkt = 3;
244}
245
246message OnuPacket {
247 fixed32 intf_id = 1;
248 fixed32 onu_id = 2;
Craig Lutgen967a1d02018-11-27 10:41:51 -0600249 fixed64 port_no = 4;
Shad Ansari19249582018-04-30 04:31:00 +0000250 bytes pkt = 3;
251}
252
Nicolas Palpacuerb78def42018-06-07 12:55:26 -0400253message UplinkPacket {
254 fixed32 intf_id = 1;
255 bytes pkt = 2;
256}
257
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400258message DeviceInfo {
259 string vendor = 1;
260 string model = 2;
261 string hardware_version = 3;
262 string firmware_version = 4;
Craig Lutgen967a1d02018-11-27 10:41:51 -0600263 string device_id = 16;
264 string device_serial_number = 17;
Craig Lutgene4a202f2018-10-16 17:19:30 -0500265
266 // Total number of pon intf ports on the device
267 fixed32 pon_ports = 12;
268
269 // If using global per-device technology profile. To be deprecated
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400270 string technology = 5;
271 fixed32 onu_id_start = 6;
272 fixed32 onu_id_end = 7;
273 fixed32 alloc_id_start = 8;
274 fixed32 alloc_id_end = 9;
275 fixed32 gemport_id_start = 10;
276 fixed32 gemport_id_end = 11;
Craig Lutgene4a202f2018-10-16 17:19:30 -0500277 fixed32 flow_id_start = 13;
278 fixed32 flow_id_end = 14;
279
280 message DeviceResourceRanges {
281
282 // List of 0 or more intf_ids that use the same technology and pools.
283 // If 0 intf_ids supplied, it implies ALL interfaces
284 repeated fixed32 intf_ids = 1;
285
286 // Technology profile for this pool
287 string technology = 2;
288
289 message Pool {
290 enum PoolType {
291 ONU_ID = 0;
292 ALLOC_ID = 1;
293 GEMPORT_ID = 2;
294 FLOW_ID = 3;
295 }
296
297 enum SharingType {
298 DEDICATED_PER_INTF = 0;
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700299 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
Craig Lutgenb2601f02018-10-23 13:04:31 -0500300 SHARED_BY_ALL_INTF_SAME_TECH = 2; // Shared across all interfaces of the same technology used in this range
Craig Lutgene4a202f2018-10-16 17:19:30 -0500301 }
302
303 PoolType type = 1;
304 SharingType sharing = 2;
305 fixed32 start = 3; // lower bound on IDs allocated from this pool
306 fixed32 end = 4; // upper bound on IDs allocated from this pool
307 }
Craig Lutgenb2601f02018-10-23 13:04:31 -0500308 repeated Pool pools = 3;
Craig Lutgene4a202f2018-10-16 17:19:30 -0500309 }
310 repeated DeviceResourceRanges ranges = 15;
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400311}
312
Shad Ansari19249582018-04-30 04:31:00 +0000313message Classifier {
314 fixed32 o_tpid = 1;
315 fixed32 o_vid = 2;
316 fixed32 i_tpid = 3;
317 fixed32 i_vid = 4;
318 fixed32 o_pbits = 5;
319 fixed32 i_pbits = 6;
320 fixed32 eth_type = 7;
321 bytes dst_mac = 8;
322 bytes src_mac = 9;
323 fixed32 ip_proto = 10;
324 fixed32 dst_ip = 11;
325 fixed32 src_ip = 12;
326 fixed32 src_port = 13;
327 fixed32 dst_port = 14;
328 string pkt_tag_type = 15; // untagged, single_tag, double_tag
329}
330
331message ActionCmd {
332 bool add_outer_tag = 1;
333 bool remove_outer_tag = 2;
334 bool trap_to_host = 3;
335}
336
337message Action {
338 ActionCmd cmd = 1;
339 fixed32 o_vid = 2;
340 fixed32 o_pbits = 3;
341 fixed32 o_tpid = 4;
342 fixed32 i_vid = 5;
343 fixed32 i_pbits = 6;
344 fixed32 i_tpid = 7;
345}
346
347message Flow {
Shad Ansari39739bc2018-09-13 21:38:37 +0000348 sfixed32 access_intf_id = 1;
349 sfixed32 onu_id = 2;
Craig Lutgen967a1d02018-11-27 10:41:51 -0600350 sfixed32 uni_id = 11;
Shad Ansari19249582018-04-30 04:31:00 +0000351 fixed32 flow_id = 3;
352 string flow_type = 4; // upstream, downstream, broadcast, multicast
Shad Ansari39739bc2018-09-13 21:38:37 +0000353 sfixed32 alloc_id = 10;
354 sfixed32 network_intf_id = 5;
355 sfixed32 gemport_id = 6;
Shad Ansari19249582018-04-30 04:31:00 +0000356 Classifier classifier = 7;
357 Action action = 8;
Shad Ansari39739bc2018-09-13 21:38:37 +0000358 sfixed32 priority = 9;
Craig Lutgen967a1d02018-11-27 10:41:51 -0600359 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
360 fixed32 port_no = 13; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
Shad Ansari19249582018-04-30 04:31:00 +0000361}
362
363message SerialNumber {
364 bytes vendor_id = 1;
365 bytes vendor_specific = 2;
366}
367
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400368message PortStatistics {
369 fixed32 intf_id = 1;
370 fixed64 rx_bytes = 2;
371 fixed64 rx_packets = 3;
372 fixed64 rx_ucast_packets = 4;
373 fixed64 rx_mcast_packets = 5;
374 fixed64 rx_bcast_packets = 6;
375 fixed64 rx_error_packets = 7;
376 fixed64 tx_bytes = 8;
377 fixed64 tx_packets = 9;
378 fixed64 tx_ucast_packets = 10;
379 fixed64 tx_mcast_packets = 11;
380 fixed64 tx_bcast_packets = 12;
381 fixed64 tx_error_packets = 13;
382 fixed64 rx_crc_errors = 14;
383 fixed64 bip_errors = 15;
384 fixed32 timestamp = 16;
385}
386
387message FlowStatistics {
388 fixed32 flow_id = 1;
389 fixed64 rx_bytes = 2;
390 fixed64 rx_packets = 3;
391 fixed64 tx_bytes = 8;
392 fixed64 tx_packets = 9;
393 fixed32 timestamp = 16;
394}
395
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400396message LosIndication {
397 fixed32 intf_id = 1;
398 string status = 2;
399}
400
401message DyingGaspIndication {
402 fixed32 intf_id = 1;
403 fixed32 onu_id = 2;
404 string status = 3;
405}
406
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400407message OnuAlarmIndication {
408 fixed32 intf_id = 1;
409 fixed32 onu_id = 2;
410 string los_status = 3;
411 string lob_status = 4;
412 string lopc_miss_status = 5;
413 string lopc_mic_error_status = 6;
414}
415
416message OnuStartupFailureIndication {
417 fixed32 intf_id = 1;
418 fixed32 onu_id = 2;
419 string status = 3;
420}
421
422message OnuSignalDegradeIndication {
423 fixed32 intf_id = 1;
424 fixed32 onu_id = 2;
425 string status = 3;
426 fixed32 inverse_bit_error_rate = 4;
427}
428
429message OnuDriftOfWindowIndication {
430 fixed32 intf_id = 1;
431 fixed32 onu_id = 2;
432 string status = 3;
433 fixed32 drift = 4;
434 fixed32 new_eqd = 5;
435}
436
437message OnuLossOfOmciChannelIndication {
438 fixed32 intf_id = 1;
439 fixed32 onu_id = 2;
440 string status = 3;
441}
442
443message OnuSignalsFailureIndication {
444 fixed32 intf_id = 1;
445 fixed32 onu_id = 2;
446 string status = 3;
447 fixed32 inverse_bit_error_rate = 4;
448}
449
450message OnuTransmissionInterferenceWarning {
451 fixed32 intf_id = 1;
452 fixed32 onu_id = 2;
453 string status = 3;
454 fixed32 drift = 4;
455}
456
457message OnuActivationFailureIndication {
458 fixed32 intf_id = 1;
459 fixed32 onu_id = 2;
460}
461
462message OnuProcessingErrorIndication {
463 fixed32 intf_id = 1;
464 fixed32 onu_id = 2;
465}
466
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700467enum Direction {
468 UPSTREAM = 0;
469 DOWNSTREAM = 1;
470 BIDIRECTIONAL = 2;
471}
472
473enum SchedulingPolicy {
474 WRR = 0;
475 StrictPriority = 1;
476 Hybrid = 2;
477}
478
479enum AdditionalBW {
480 AdditionalBW_None = 0;
481 AdditionalBW_NA = 1;
482 AdditionalBW_BestEffort = 2;
483 AdditionalBW_Auto = 3;
484}
485
486enum DiscardPolicy {
487 TailDrop = 0;
488 WTailDrop = 1;
489 Red = 2;
490 WRed = 3;
491}
492
493enum InferredAdditionBWIndication {
494 InferredAdditionBWIndication_None = 0;
495 InferredAdditionBWIndication_Assured = 1;
496 InferredAdditionBWIndication_BestEffort = 2;
497}
498
499message Scheduler {
500 Direction direction = 1;
501 AdditionalBW additional_bw = 2; // Valid on for “direction == Upstream”.
502 fixed32 priority = 3;
503 fixed32 weight = 4;
504 SchedulingPolicy sched_policy = 5;
505}
506
507message TrafficShapingInfo {
508 fixed32 cir = 1;
509 fixed32 cbs = 2;
510 fixed32 pir = 3;
511 fixed32 pbs = 4;
512 fixed32 gir = 5; // only if “direction == Upstream ”
513 InferredAdditionBWIndication add_bw_ind = 6; // only if “direction == Upstream”
514}
515
516message Tcont {
517 Direction direction = 1;
518 fixed32 alloc_id = 2; // valid only if “direction == Upstream ”
519 Scheduler scheduler = 3;
520 TrafficShapingInfo traffic_shaping_info = 4;
521}
522
523message Tconts {
524 fixed32 intf_id = 1;
525 fixed32 onu_id = 2;
Craig Lutgen967a1d02018-11-27 10:41:51 -0600526 fixed32 uni_id = 4;
527 fixed32 port_no = 5;
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700528 repeated Tcont tconts = 3;
529}
530
531message TailDropDiscardConfig {
532 fixed32 queue_size = 1;
533}
534
535message RedDiscardConfig {
536 fixed32 min_threshold = 1;
537 fixed32 max_threshold = 2;
538 fixed32 max_probability = 3;
539}
540
541message WRedDiscardConfig {
542 RedDiscardConfig green = 1;
543 RedDiscardConfig yellow = 2;
544 RedDiscardConfig red = 3;
545}
546
547message DiscardConfig {
548 DiscardPolicy discard_policy = 1;
549 oneof discard_config {
550 TailDropDiscardConfig tail_drop_discard_config = 2;
551 RedDiscardConfig red_discard_config = 3;
552 WRedDiscardConfig wred_discard_config = 4;
553 }
554}
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400555
Shad Ansari19249582018-04-30 04:31:00 +0000556message Empty {}