blob: 12f1db06b80aa7c79fc6741c7b0b5385717f2f49 [file] [log] [blame]
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +09001// 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
Keita NISHIMOTO26dab092018-07-06 09:52:45 +090021 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
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +090035 rpc ActivateOnu(Onu) returns (Empty) {
36 option (google.api.http) = {
37 post: "/v1/EnableOnu"
38 body: "*"
39 };
40 }
41
Keita NISHIMOTO26dab092018-07-06 09:52:45 +090042 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
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +090056 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
Keita NISHIMOTO26dab092018-07-06 09:52:45 +090070 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
71 option (google.api.http) = {
72 post: "/v1/UplinkPacketOut"
73 body: "*"
74 };
75 }
76
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +090077 rpc FlowAdd(Flow) returns (Empty) {
78 option (google.api.http) = {
79 post: "/v1/FlowAdd"
80 body: "*"
81 };
82 }
83
Keita NISHIMOTO3b8b9c02018-10-09 09:40:01 +090084 rpc FlowRemove(Flow) returns (Empty) {
85 option (google.api.http) = {
86 post: "/v1/FlowRemove"
87 body: "*"
88 };
89 }
90
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +090091 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
92 option (google.api.http) = {
93 post: "/v1/HeartbeatCheck"
94 body: "*"
95 };
96 }
97
Keita NISHIMOTO26dab092018-07-06 09:52:45 +090098 rpc EnablePonIf(Interface) returns (Empty) {
99 option (google.api.http) = {
100 post: "/v1/EnablePonIf"
101 body: "*"
102 };
103 }
104
Anjali Thontakudib871c502019-07-03 18:26:12 +0000105 rpc GetPonIf(Interface) returns (IntfIndication) {
106 option (google.api.http) = {
107 post: "/v1/GetPonIf"
108 body: "*"
109 };
110 }
111
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900112 rpc DisablePonIf(Interface) returns (Empty) {
113 option (google.api.http) = {
114 post: "/v1/DisablePonIf"
115 body: "*"
116 };
117 }
118
Keita NISHIMOTO3b8b9c02018-10-09 09:40:01 +0900119 rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
120 option (google.api.http) = {
121 post: "/v1/GetDeviceInfo"
122 body: "*"
123 };
124 }
125
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900126 rpc Reboot(Empty) returns (Empty) {
127 option (google.api.http) = {
128 post: "/v1/Reboot"
129 body: "*"
130 };
131 }
132
Keita NISHIMOTO3b8b9c02018-10-09 09:40:01 +0900133 rpc CollectStatistics(Empty) returns (Empty) {
134 option (google.api.http) = {
135 post: "/v1/CollectStatistics"
136 body: "*"
137 };
138 }
139
Shad Ansarifd298442019-01-08 16:19:35 -0800140 rpc CreateTconts(Tconts) returns (Empty) {
141 option (google.api.http) = {
142 post: "/v1/CreateTconts"
143 body: "*"
144 };
145 }
146
147 rpc RemoveTconts(Tconts) returns (Empty) {
148 option (google.api.http) = {
149 post: "/v1/RemoveTconts"
150 body: "*"
151 };
152 }
153
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900154 rpc EnableIndication(Empty) returns (stream Indication) {}
155}
156
157message Indication {
158 oneof data {
159 OltIndication olt_ind = 1;
160 IntfIndication intf_ind = 2;
161 IntfOperIndication intf_oper_ind = 3;
162 OnuDiscIndication onu_disc_ind = 4;
163 OnuIndication onu_ind = 5;
164 OmciIndication omci_ind = 6;
165 PacketIndication pkt_ind = 7;
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900166 PortStatistics port_stats = 8;
167 FlowStatistics flow_stats = 9;
168 AlarmIndication alarm_ind= 10;
169 }
170}
171
172message AlarmIndication {
173 oneof data {
174 LosIndication los_ind = 1;
175 DyingGaspIndication dying_gasp_ind = 2;
176 OnuAlarmIndication onu_alarm_ind = 3;
177 OnuStartupFailureIndication onu_startup_fail_ind = 4;
178 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
179 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
180 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
181 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
182 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
183 OnuActivationFailureIndication onu_activation_fail_ind = 10;
184 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900185 }
186}
187
188message OltIndication {
189 string oper_state = 1; // up, down
190}
191
192message IntfIndication {
193 fixed32 intf_id = 1;
194 string oper_state = 2; // up, down
195}
196
197message OnuDiscIndication {
198 fixed32 intf_id = 1;
199 SerialNumber serial_number = 2;
200}
201
202message OnuIndication {
203 fixed32 intf_id = 1;
204 fixed32 onu_id = 2;
205 string oper_state = 3; // up, down
206 string admin_state = 5; // up, down
207 SerialNumber serial_number = 4;
208}
209
210message IntfOperIndication {
211 string type = 1; // nni, pon
212 fixed32 intf_id = 2;
213 string oper_state = 3; // up, down
214}
215
216message OmciIndication {
217 fixed32 intf_id = 1;
218 fixed32 onu_id = 2;
219 bytes pkt = 3;
220}
221
222message PacketIndication {
Keita NISHIMOTO3b8b9c02018-10-09 09:40:01 +0900223 string intf_type = 5; // nni, pon, unknown
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900224 fixed32 intf_id = 1;
225 fixed32 gemport_id = 2;
226 fixed32 flow_id = 3;
Shad Ansarifd298442019-01-08 16:19:35 -0800227 fixed32 port_no = 6;
228 fixed64 cookie = 7;
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900229 bytes pkt = 4;
230}
231
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900232message Interface {
233 fixed32 intf_id = 1;
234}
235
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900236message Heartbeat {
237 fixed32 heartbeat_signature = 1;
238}
239
240message Onu {
241 fixed32 intf_id = 1;
242 fixed32 onu_id = 2;
243 SerialNumber serial_number = 3;
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900244 fixed32 pir = 4; // peak information rate assigned to onu
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900245}
246
247message OmciMsg {
248 fixed32 intf_id = 1;
249 fixed32 onu_id = 2;
250 bytes pkt = 3;
251}
252
253message OnuPacket {
254 fixed32 intf_id = 1;
255 fixed32 onu_id = 2;
Shad Ansarifd298442019-01-08 16:19:35 -0800256 fixed32 port_no = 4;
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900257 bytes pkt = 3;
258}
259
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900260message UplinkPacket {
261 fixed32 intf_id = 1;
262 bytes pkt = 2;
263}
264
Keita NISHIMOTO3b8b9c02018-10-09 09:40:01 +0900265message DeviceInfo {
266 string vendor = 1;
267 string model = 2;
268 string hardware_version = 3;
269 string firmware_version = 4;
Shad Ansarifd298442019-01-08 16:19:35 -0800270 string device_id = 16;
271 string device_serial_number = 17;
Shad Ansarib7b58c72018-11-06 15:36:41 -0800272
273 // Total number of pon intf ports on the device
274 fixed32 pon_ports = 12;
275
276 // If using global per-device technology profile. To be deprecated
Keita NISHIMOTO3b8b9c02018-10-09 09:40:01 +0900277 string technology = 5;
278 fixed32 onu_id_start = 6;
279 fixed32 onu_id_end = 7;
280 fixed32 alloc_id_start = 8;
281 fixed32 alloc_id_end = 9;
282 fixed32 gemport_id_start = 10;
283 fixed32 gemport_id_end = 11;
Shad Ansarib7b58c72018-11-06 15:36:41 -0800284 fixed32 flow_id_start = 13;
285 fixed32 flow_id_end = 14;
286
287 message DeviceResourceRanges {
288
289 // List of 0 or more intf_ids that use the same technology and pools.
290 // If 0 intf_ids supplied, it implies ALL interfaces
291 repeated fixed32 intf_ids = 1;
292
293 // Technology profile for this pool
294 string technology = 2;
295
296 message Pool {
297 enum PoolType {
298 ONU_ID = 0;
299 ALLOC_ID = 1;
300 GEMPORT_ID = 2;
301 FLOW_ID = 3;
302 }
303
304 enum SharingType {
305 DEDICATED_PER_INTF = 0;
Shad Ansarifd298442019-01-08 16:19:35 -0800306 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
Shad Ansarib7b58c72018-11-06 15:36:41 -0800307 SHARED_BY_ALL_INTF_SAME_TECH = 2; // Shared across all interfaces of the same technology used in this range
308 }
309
310 PoolType type = 1;
311 SharingType sharing = 2;
312 fixed32 start = 3; // lower bound on IDs allocated from this pool
313 fixed32 end = 4; // upper bound on IDs allocated from this pool
314 }
315 repeated Pool pools = 3;
316 }
317 repeated DeviceResourceRanges ranges = 15;
Keita NISHIMOTO3b8b9c02018-10-09 09:40:01 +0900318}
319
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900320message Classifier {
321 fixed32 o_tpid = 1;
322 fixed32 o_vid = 2;
323 fixed32 i_tpid = 3;
324 fixed32 i_vid = 4;
325 fixed32 o_pbits = 5;
326 fixed32 i_pbits = 6;
327 fixed32 eth_type = 7;
328 bytes dst_mac = 8;
329 bytes src_mac = 9;
330 fixed32 ip_proto = 10;
331 fixed32 dst_ip = 11;
332 fixed32 src_ip = 12;
333 fixed32 src_port = 13;
334 fixed32 dst_port = 14;
335 string pkt_tag_type = 15; // untagged, single_tag, double_tag
336}
337
338message ActionCmd {
339 bool add_outer_tag = 1;
340 bool remove_outer_tag = 2;
341 bool trap_to_host = 3;
342}
343
344message Action {
345 ActionCmd cmd = 1;
346 fixed32 o_vid = 2;
347 fixed32 o_pbits = 3;
348 fixed32 o_tpid = 4;
349 fixed32 i_vid = 5;
350 fixed32 i_pbits = 6;
351 fixed32 i_tpid = 7;
352}
353
354message Flow {
Keita NISHIMOTO3b8b9c02018-10-09 09:40:01 +0900355 sfixed32 access_intf_id = 1;
356 sfixed32 onu_id = 2;
Shad Ansarifd298442019-01-08 16:19:35 -0800357 sfixed32 uni_id = 11;
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900358 fixed32 flow_id = 3;
359 string flow_type = 4; // upstream, downstream, broadcast, multicast
Keita NISHIMOTO3b8b9c02018-10-09 09:40:01 +0900360 sfixed32 alloc_id = 10;
361 sfixed32 network_intf_id = 5;
362 sfixed32 gemport_id = 6;
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900363 Classifier classifier = 7;
364 Action action = 8;
Keita NISHIMOTO3b8b9c02018-10-09 09:40:01 +0900365 sfixed32 priority = 9;
Shad Ansarifd298442019-01-08 16:19:35 -0800366 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
367 fixed32 port_no = 13; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900368}
369
370message SerialNumber {
371 bytes vendor_id = 1;
372 bytes vendor_specific = 2;
373}
374
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900375message PortStatistics {
376 fixed32 intf_id = 1;
377 fixed64 rx_bytes = 2;
378 fixed64 rx_packets = 3;
379 fixed64 rx_ucast_packets = 4;
380 fixed64 rx_mcast_packets = 5;
381 fixed64 rx_bcast_packets = 6;
382 fixed64 rx_error_packets = 7;
383 fixed64 tx_bytes = 8;
384 fixed64 tx_packets = 9;
385 fixed64 tx_ucast_packets = 10;
386 fixed64 tx_mcast_packets = 11;
387 fixed64 tx_bcast_packets = 12;
388 fixed64 tx_error_packets = 13;
389 fixed64 rx_crc_errors = 14;
390 fixed64 bip_errors = 15;
391 fixed32 timestamp = 16;
392}
393
394message FlowStatistics {
395 fixed32 flow_id = 1;
396 fixed64 rx_bytes = 2;
397 fixed64 rx_packets = 3;
398 fixed64 tx_bytes = 8;
399 fixed64 tx_packets = 9;
400 fixed32 timestamp = 16;
401}
402
403message LosIndication {
404 fixed32 intf_id = 1;
405 string status = 2;
406}
407
408message DyingGaspIndication {
409 fixed32 intf_id = 1;
410 fixed32 onu_id = 2;
411 string status = 3;
412}
413
414message OnuAlarmIndication {
415 fixed32 intf_id = 1;
416 fixed32 onu_id = 2;
417 string los_status = 3;
418 string lob_status = 4;
419 string lopc_miss_status = 5;
420 string lopc_mic_error_status = 6;
421}
422
423message OnuStartupFailureIndication {
424 fixed32 intf_id = 1;
425 fixed32 onu_id = 2;
426 string status = 3;
427}
428
429message OnuSignalDegradeIndication {
430 fixed32 intf_id = 1;
431 fixed32 onu_id = 2;
432 string status = 3;
433 fixed32 inverse_bit_error_rate = 4;
434}
435
436message OnuDriftOfWindowIndication {
437 fixed32 intf_id = 1;
438 fixed32 onu_id = 2;
439 string status = 3;
440 fixed32 drift = 4;
441 fixed32 new_eqd = 5;
442}
443
444message OnuLossOfOmciChannelIndication {
445 fixed32 intf_id = 1;
446 fixed32 onu_id = 2;
447 string status = 3;
448}
449
450message OnuSignalsFailureIndication {
451 fixed32 intf_id = 1;
452 fixed32 onu_id = 2;
453 string status = 3;
454 fixed32 inverse_bit_error_rate = 4;
455}
456
457message OnuTransmissionInterferenceWarning {
458 fixed32 intf_id = 1;
459 fixed32 onu_id = 2;
460 string status = 3;
461 fixed32 drift = 4;
462}
463
464message OnuActivationFailureIndication {
465 fixed32 intf_id = 1;
466 fixed32 onu_id = 2;
467}
468
469message OnuProcessingErrorIndication {
470 fixed32 intf_id = 1;
471 fixed32 onu_id = 2;
472}
473
Shad Ansarifd298442019-01-08 16:19:35 -0800474enum Direction {
475 UPSTREAM = 0;
476 DOWNSTREAM = 1;
477 BIDIRECTIONAL = 2;
478}
479
480enum SchedulingPolicy {
481 WRR = 0;
482 StrictPriority = 1;
483 Hybrid = 2;
484}
485
486enum AdditionalBW {
487 AdditionalBW_None = 0;
488 AdditionalBW_NA = 1;
489 AdditionalBW_BestEffort = 2;
490 AdditionalBW_Auto = 3;
491}
492
493enum DiscardPolicy {
494 TailDrop = 0;
495 WTailDrop = 1;
496 Red = 2;
497 WRed = 3;
498}
499
500enum InferredAdditionBWIndication {
501 InferredAdditionBWIndication_None = 0;
502 InferredAdditionBWIndication_Assured = 1;
503 InferredAdditionBWIndication_BestEffort = 2;
504}
505
506message Scheduler {
507 Direction direction = 1;
508 AdditionalBW additional_bw = 2; // Valid on for “direction == Upstream”.
509 fixed32 priority = 3;
510 fixed32 weight = 4;
511 SchedulingPolicy sched_policy = 5;
512}
513
514message TrafficShapingInfo {
515 fixed32 cir = 1;
516 fixed32 cbs = 2;
517 fixed32 pir = 3;
518 fixed32 pbs = 4;
519 fixed32 gir = 5; // only if “direction == Upstream ”
520 InferredAdditionBWIndication add_bw_ind = 6; // only if “direction == Upstream”
521}
522
523message Tcont {
524 Direction direction = 1;
525 fixed32 alloc_id = 2; // valid only if “direction == Upstream ”
526 Scheduler scheduler = 3;
527 TrafficShapingInfo traffic_shaping_info = 4;
528}
529
530message Tconts {
531 fixed32 intf_id = 1;
532 fixed32 onu_id = 2;
533 fixed32 uni_id = 4;
534 fixed32 port_no = 5;
535 repeated Tcont tconts = 3;
536}
537
538message TailDropDiscardConfig {
539 fixed32 queue_size = 1;
540}
541
542message RedDiscardConfig {
543 fixed32 min_threshold = 1;
544 fixed32 max_threshold = 2;
545 fixed32 max_probability = 3;
546}
547
548message WRedDiscardConfig {
549 RedDiscardConfig green = 1;
550 RedDiscardConfig yellow = 2;
551 RedDiscardConfig red = 3;
552}
553
554message DiscardConfig {
555 DiscardPolicy discard_policy = 1;
556 oneof discard_config {
557 TailDropDiscardConfig tail_drop_discard_config = 2;
558 RedDiscardConfig red_discard_config = 3;
559 WRedDiscardConfig wred_discard_config = 4;
560 }
561}
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900562
Shad Ansarib7b58c72018-11-06 15:36:41 -0800563message Empty {}