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