blob: 8c35bbaf05ae2ed07aa19a7483755f7222b6b7e3 [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;
220 bytes pkt = 4;
221}
222
Nicolas Palpacuer05ea0ea2018-07-06 11:47:21 -0400223message Interface {
224 fixed32 intf_id = 1;
225}
226
nick7be062f2018-05-25 17:52:56 -0400227message Heartbeat {
228 fixed32 heartbeat_signature = 1;
229}
230
Shad Ansari19249582018-04-30 04:31:00 +0000231message Onu {
232 fixed32 intf_id = 1;
233 fixed32 onu_id = 2;
234 SerialNumber serial_number = 3;
Shad Ansari06101952018-07-25 00:22:09 +0000235 fixed32 pir = 4; // peak information rate assigned to onu
Shad Ansari19249582018-04-30 04:31:00 +0000236}
237
238message OmciMsg {
239 fixed32 intf_id = 1;
240 fixed32 onu_id = 2;
241 bytes pkt = 3;
242}
243
244message OnuPacket {
245 fixed32 intf_id = 1;
246 fixed32 onu_id = 2;
247 bytes pkt = 3;
248}
249
Nicolas Palpacuerb78def42018-06-07 12:55:26 -0400250message UplinkPacket {
251 fixed32 intf_id = 1;
252 bytes pkt = 2;
253}
254
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400255message DeviceInfo {
256 string vendor = 1;
257 string model = 2;
258 string hardware_version = 3;
259 string firmware_version = 4;
Craig Lutgene4a202f2018-10-16 17:19:30 -0500260
261 // Total number of pon intf ports on the device
262 fixed32 pon_ports = 12;
263
264 // If using global per-device technology profile. To be deprecated
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400265 string technology = 5;
266 fixed32 onu_id_start = 6;
267 fixed32 onu_id_end = 7;
268 fixed32 alloc_id_start = 8;
269 fixed32 alloc_id_end = 9;
270 fixed32 gemport_id_start = 10;
271 fixed32 gemport_id_end = 11;
Craig Lutgene4a202f2018-10-16 17:19:30 -0500272 fixed32 flow_id_start = 13;
273 fixed32 flow_id_end = 14;
274
275 message DeviceResourceRanges {
276
277 // List of 0 or more intf_ids that use the same technology and pools.
278 // If 0 intf_ids supplied, it implies ALL interfaces
279 repeated fixed32 intf_ids = 1;
280
281 // Technology profile for this pool
282 string technology = 2;
283
284 message Pool {
285 enum PoolType {
286 ONU_ID = 0;
287 ALLOC_ID = 1;
288 GEMPORT_ID = 2;
289 FLOW_ID = 3;
290 }
291
292 enum SharingType {
293 DEDICATED_PER_INTF = 0;
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700294 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
Craig Lutgenb2601f02018-10-23 13:04:31 -0500295 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 -0500296 }
297
298 PoolType type = 1;
299 SharingType sharing = 2;
300 fixed32 start = 3; // lower bound on IDs allocated from this pool
301 fixed32 end = 4; // upper bound on IDs allocated from this pool
302 }
Craig Lutgenb2601f02018-10-23 13:04:31 -0500303 repeated Pool pools = 3;
Craig Lutgene4a202f2018-10-16 17:19:30 -0500304 }
305 repeated DeviceResourceRanges ranges = 15;
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400306}
307
Shad Ansari19249582018-04-30 04:31:00 +0000308message Classifier {
309 fixed32 o_tpid = 1;
310 fixed32 o_vid = 2;
311 fixed32 i_tpid = 3;
312 fixed32 i_vid = 4;
313 fixed32 o_pbits = 5;
314 fixed32 i_pbits = 6;
315 fixed32 eth_type = 7;
316 bytes dst_mac = 8;
317 bytes src_mac = 9;
318 fixed32 ip_proto = 10;
319 fixed32 dst_ip = 11;
320 fixed32 src_ip = 12;
321 fixed32 src_port = 13;
322 fixed32 dst_port = 14;
323 string pkt_tag_type = 15; // untagged, single_tag, double_tag
324}
325
326message ActionCmd {
327 bool add_outer_tag = 1;
328 bool remove_outer_tag = 2;
329 bool trap_to_host = 3;
330}
331
332message Action {
333 ActionCmd cmd = 1;
334 fixed32 o_vid = 2;
335 fixed32 o_pbits = 3;
336 fixed32 o_tpid = 4;
337 fixed32 i_vid = 5;
338 fixed32 i_pbits = 6;
339 fixed32 i_tpid = 7;
340}
341
342message Flow {
Shad Ansari39739bc2018-09-13 21:38:37 +0000343 sfixed32 access_intf_id = 1;
344 sfixed32 onu_id = 2;
Shad Ansari19249582018-04-30 04:31:00 +0000345 fixed32 flow_id = 3;
346 string flow_type = 4; // upstream, downstream, broadcast, multicast
Shad Ansari39739bc2018-09-13 21:38:37 +0000347 sfixed32 alloc_id = 10;
348 sfixed32 network_intf_id = 5;
349 sfixed32 gemport_id = 6;
Shad Ansari19249582018-04-30 04:31:00 +0000350 Classifier classifier = 7;
351 Action action = 8;
Shad Ansari39739bc2018-09-13 21:38:37 +0000352 sfixed32 priority = 9;
Shad Ansari19249582018-04-30 04:31:00 +0000353}
354
355message SerialNumber {
356 bytes vendor_id = 1;
357 bytes vendor_specific = 2;
358}
359
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400360message PortStatistics {
361 fixed32 intf_id = 1;
362 fixed64 rx_bytes = 2;
363 fixed64 rx_packets = 3;
364 fixed64 rx_ucast_packets = 4;
365 fixed64 rx_mcast_packets = 5;
366 fixed64 rx_bcast_packets = 6;
367 fixed64 rx_error_packets = 7;
368 fixed64 tx_bytes = 8;
369 fixed64 tx_packets = 9;
370 fixed64 tx_ucast_packets = 10;
371 fixed64 tx_mcast_packets = 11;
372 fixed64 tx_bcast_packets = 12;
373 fixed64 tx_error_packets = 13;
374 fixed64 rx_crc_errors = 14;
375 fixed64 bip_errors = 15;
376 fixed32 timestamp = 16;
377}
378
379message FlowStatistics {
380 fixed32 flow_id = 1;
381 fixed64 rx_bytes = 2;
382 fixed64 rx_packets = 3;
383 fixed64 tx_bytes = 8;
384 fixed64 tx_packets = 9;
385 fixed32 timestamp = 16;
386}
387
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400388message LosIndication {
389 fixed32 intf_id = 1;
390 string status = 2;
391}
392
393message DyingGaspIndication {
394 fixed32 intf_id = 1;
395 fixed32 onu_id = 2;
396 string status = 3;
397}
398
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400399message OnuAlarmIndication {
400 fixed32 intf_id = 1;
401 fixed32 onu_id = 2;
402 string los_status = 3;
403 string lob_status = 4;
404 string lopc_miss_status = 5;
405 string lopc_mic_error_status = 6;
406}
407
408message OnuStartupFailureIndication {
409 fixed32 intf_id = 1;
410 fixed32 onu_id = 2;
411 string status = 3;
412}
413
414message OnuSignalDegradeIndication {
415 fixed32 intf_id = 1;
416 fixed32 onu_id = 2;
417 string status = 3;
418 fixed32 inverse_bit_error_rate = 4;
419}
420
421message OnuDriftOfWindowIndication {
422 fixed32 intf_id = 1;
423 fixed32 onu_id = 2;
424 string status = 3;
425 fixed32 drift = 4;
426 fixed32 new_eqd = 5;
427}
428
429message OnuLossOfOmciChannelIndication {
430 fixed32 intf_id = 1;
431 fixed32 onu_id = 2;
432 string status = 3;
433}
434
435message OnuSignalsFailureIndication {
436 fixed32 intf_id = 1;
437 fixed32 onu_id = 2;
438 string status = 3;
439 fixed32 inverse_bit_error_rate = 4;
440}
441
442message OnuTransmissionInterferenceWarning {
443 fixed32 intf_id = 1;
444 fixed32 onu_id = 2;
445 string status = 3;
446 fixed32 drift = 4;
447}
448
449message OnuActivationFailureIndication {
450 fixed32 intf_id = 1;
451 fixed32 onu_id = 2;
452}
453
454message OnuProcessingErrorIndication {
455 fixed32 intf_id = 1;
456 fixed32 onu_id = 2;
457}
458
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700459enum Direction {
460 UPSTREAM = 0;
461 DOWNSTREAM = 1;
462 BIDIRECTIONAL = 2;
463}
464
465enum SchedulingPolicy {
466 WRR = 0;
467 StrictPriority = 1;
468 Hybrid = 2;
469}
470
471enum AdditionalBW {
472 AdditionalBW_None = 0;
473 AdditionalBW_NA = 1;
474 AdditionalBW_BestEffort = 2;
475 AdditionalBW_Auto = 3;
476}
477
478enum DiscardPolicy {
479 TailDrop = 0;
480 WTailDrop = 1;
481 Red = 2;
482 WRed = 3;
483}
484
485enum InferredAdditionBWIndication {
486 InferredAdditionBWIndication_None = 0;
487 InferredAdditionBWIndication_Assured = 1;
488 InferredAdditionBWIndication_BestEffort = 2;
489}
490
491message Scheduler {
492 Direction direction = 1;
493 AdditionalBW additional_bw = 2; // Valid on for “direction == Upstream”.
494 fixed32 priority = 3;
495 fixed32 weight = 4;
496 SchedulingPolicy sched_policy = 5;
497}
498
499message TrafficShapingInfo {
500 fixed32 cir = 1;
501 fixed32 cbs = 2;
502 fixed32 pir = 3;
503 fixed32 pbs = 4;
504 fixed32 gir = 5; // only if “direction == Upstream ”
505 InferredAdditionBWIndication add_bw_ind = 6; // only if “direction == Upstream”
506}
507
508message Tcont {
509 Direction direction = 1;
510 fixed32 alloc_id = 2; // valid only if “direction == Upstream ”
511 Scheduler scheduler = 3;
512 TrafficShapingInfo traffic_shaping_info = 4;
513}
514
515message Tconts {
516 fixed32 intf_id = 1;
517 fixed32 onu_id = 2;
518 repeated Tcont tconts = 3;
519}
520
521message TailDropDiscardConfig {
522 fixed32 queue_size = 1;
523}
524
525message RedDiscardConfig {
526 fixed32 min_threshold = 1;
527 fixed32 max_threshold = 2;
528 fixed32 max_probability = 3;
529}
530
531message WRedDiscardConfig {
532 RedDiscardConfig green = 1;
533 RedDiscardConfig yellow = 2;
534 RedDiscardConfig red = 3;
535}
536
537message DiscardConfig {
538 DiscardPolicy discard_policy = 1;
539 oneof discard_config {
540 TailDropDiscardConfig tail_drop_discard_config = 2;
541 RedDiscardConfig red_discard_config = 3;
542 WRedDiscardConfig wred_discard_config = 4;
543 }
544}
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400545
Shad Ansari19249582018-04-30 04:31:00 +0000546message Empty {}