blob: 7e52f02a38593821ede26826469dd4b5bdeb3339 [file] [log] [blame]
Shad Ansari42db7342018-04-25 21:39:46 +00001// Copyright (c) 2018 Open Networking Foundation
Shad Ansari2825d012018-02-22 23:57:46 +00002//
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";
Girish Gowdru841708f2019-02-08 04:29:48 -080018import "tech_profile.proto";
Shad Ansari2825d012018-02-22 23:57:46 +000019
20service Openolt {
21
Nicolas Palpacuer62dbb9c2018-08-02 15:03:35 -040022 rpc DisableOlt(Empty) returns (Empty) {
23 option (google.api.http) = {
24 post: "/v1/Disable"
25 body: "*"
26 };
27 }
28
29 rpc ReenableOlt(Empty) returns (Empty) {
30 option (google.api.http) = {
31 post: "/v1/Reenable"
32 body: "*"
33 };
34 }
35
Shad Ansari2825d012018-02-22 23:57:46 +000036 rpc ActivateOnu(Onu) returns (Empty) {
37 option (google.api.http) = {
38 post: "/v1/EnableOnu"
39 body: "*"
40 };
41 }
42
Jonathan Davisb45bb372018-07-19 15:05:15 -040043 rpc DeactivateOnu(Onu) returns (Empty) {
44 option (google.api.http) = {
45 post: "/v1/DisableOnu"
46 body: "*"
47 };
48 }
49
50 rpc DeleteOnu(Onu) returns (Empty) {
51 option (google.api.http) = {
52 post: "/v1/DeleteOnu"
53 body: "*"
54 };
55 }
56
Anjali Thontakudi7f2e3d92019-07-03 23:31:33 +000057 rpc GetOnuInfo(Onu) returns (OnuIndication){
58 option (google.api.http) = {
59 post: "/v1/GetOnuInfo"
60 body: "*"
61 };
62 }
63
Shad Ansari2825d012018-02-22 23:57:46 +000064 rpc OmciMsgOut(OmciMsg) returns (Empty) {
65 option (google.api.http) = {
66 post: "/v1/OmciMsgOut"
67 body: "*"
68 };
69 }
70
Shad Ansari0346f0d2018-04-26 06:54:09 +000071 rpc OnuPacketOut(OnuPacket) returns (Empty) {
72 option (google.api.http) = {
73 post: "/v1/OnuPacketOut"
74 body: "*"
75 };
76 }
77
Nicolas Palpacuer7d902812018-06-07 16:17:09 -040078 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
79 option (google.api.http) = {
80 post: "/v1/UplinkPacketOut"
81 body: "*"
82 };
83 }
84
Shad Ansari2825d012018-02-22 23:57:46 +000085 rpc FlowAdd(Flow) returns (Empty) {
86 option (google.api.http) = {
87 post: "/v1/FlowAdd"
88 body: "*"
89 };
90 }
91
Nicolas Palpacuer0c7c3162018-08-08 11:27:57 -040092 rpc FlowRemove(Flow) returns (Empty) {
93 option (google.api.http) = {
94 post: "/v1/FlowRemove"
95 body: "*"
96 };
97 }
98
nick47b74372018-05-25 18:22:49 -040099 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
100 option (google.api.http) = {
101 post: "/v1/HeartbeatCheck"
102 body: "*"
103 };
104 }
105
Nicolas Palpacuer3d5a58a2018-07-06 11:50:17 -0400106 rpc EnablePonIf(Interface) returns (Empty) {
107 option (google.api.http) = {
108 post: "/v1/EnablePonIf"
109 body: "*"
110 };
111 }
112
Anjali Thontakudi1156b272019-07-02 18:37:52 +0000113 rpc GetPonIf(Interface) returns (IntfIndication) {
114 option (google.api.http) = {
115 post: "/v1/GetPonIf"
116 body: "*"
117 };
118 }
e9748942019-07-01 22:26:59 +0000119
Nicolas Palpacuer3d5a58a2018-07-06 11:50:17 -0400120 rpc DisablePonIf(Interface) returns (Empty) {
121 option (google.api.http) = {
122 post: "/v1/DisablePonIf"
123 body: "*"
124 };
125 }
Shad Ansari905b8402018-07-03 00:04:50 +0000126
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400127 rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
128 option (google.api.http) = {
129 post: "/v1/GetDeviceInfo"
130 body: "*"
131 };
132 }
133
Nicolas Palpacuerfd365ac2018-08-02 11:37:37 -0400134 rpc Reboot(Empty) returns (Empty) {
135 option (google.api.http) = {
136 post: "/v1/Reboot"
137 body: "*"
138 };
139 }
140
Nicolas Palpacuer30027f42018-09-06 15:55:54 -0400141 rpc CollectStatistics(Empty) returns (Empty) {
142 option (google.api.http) = {
143 post: "/v1/CollectStatistics"
144 body: "*"
145 };
146 }
147
Girish Gowdru841708f2019-02-08 04:29:48 -0800148 rpc CreateTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Girish Gowdruab836e92018-10-25 01:17:57 -0700149 option (google.api.http) = {
Girish Gowdru841708f2019-02-08 04:29:48 -0800150 post: "/v1/CreateTrafficSchedulers"
Girish Gowdruab836e92018-10-25 01:17:57 -0700151 body: "*"
152 };
153 }
154
Girish Gowdru841708f2019-02-08 04:29:48 -0800155 rpc RemoveTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Girish Gowdruab836e92018-10-25 01:17:57 -0700156 option (google.api.http) = {
Girish Gowdru841708f2019-02-08 04:29:48 -0800157 post: "/v1/RemoveTrafficSchedulers"
158 body: "*"
159 };
160 }
161
162 rpc CreateTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
163 option (google.api.http) = {
164 post: "/v1/CreateTrafficQueues"
165 body: "*"
166 };
167 }
168
169 rpc RemoveTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
170 option (google.api.http) = {
171 post: "/v1/RemoveTrafficQueues"
Girish Gowdruab836e92018-10-25 01:17:57 -0700172 body: "*"
173 };
174 }
175
Shad Ansari2825d012018-02-22 23:57:46 +0000176 rpc EnableIndication(Empty) returns (stream Indication) {}
177}
178
179message Indication {
180 oneof data {
181 OltIndication olt_ind = 1;
182 IntfIndication intf_ind = 2;
183 IntfOperIndication intf_oper_ind = 3;
184 OnuDiscIndication onu_disc_ind = 4;
185 OnuIndication onu_ind = 5;
186 OmciIndication omci_ind = 6;
Shad Ansari42db7342018-04-25 21:39:46 +0000187 PacketIndication pkt_ind = 7;
Nicolas Palpacuer33f1a822018-06-13 12:36:36 -0400188 PortStatistics port_stats = 8;
189 FlowStatistics flow_stats = 9;
Shad Ansari905b8402018-07-03 00:04:50 +0000190 AlarmIndication alarm_ind= 10;
191 }
192}
193
194message AlarmIndication {
195 oneof data {
196 LosIndication los_ind = 1;
197 DyingGaspIndication dying_gasp_ind = 2;
Nicolas Palpacuer16138de2018-07-03 14:35:18 -0400198 OnuAlarmIndication onu_alarm_ind = 3;
199 OnuStartupFailureIndication onu_startup_fail_ind = 4;
200 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
201 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
202 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
203 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
204 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
205 OnuActivationFailureIndication onu_activation_fail_ind = 10;
206 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Shad Ansari2825d012018-02-22 23:57:46 +0000207 }
208}
209
210message OltIndication {
211 string oper_state = 1; // up, down
212}
213
214message IntfIndication {
215 fixed32 intf_id = 1;
216 string oper_state = 2; // up, down
217}
218
219message OnuDiscIndication {
220 fixed32 intf_id = 1;
221 SerialNumber serial_number = 2;
222}
223
224message OnuIndication {
225 fixed32 intf_id = 1;
226 fixed32 onu_id = 2;
227 string oper_state = 3; // up, down
Nicolas Palpacuer65de6a42018-05-22 17:28:29 -0400228 string admin_state = 5; // up, down
Shad Ansari2825d012018-02-22 23:57:46 +0000229 SerialNumber serial_number = 4;
230}
231
232message IntfOperIndication {
233 string type = 1; // nni, pon
234 fixed32 intf_id = 2;
235 string oper_state = 3; // up, down
236}
237
238message OmciIndication {
239 fixed32 intf_id = 1;
240 fixed32 onu_id = 2;
241 bytes pkt = 3;
242}
243
Shad Ansari42db7342018-04-25 21:39:46 +0000244message PacketIndication {
Shad Ansari0ff82622018-09-30 09:32:04 +0000245 string intf_type = 5; // nni, pon, unknown
Shad Ansari42db7342018-04-25 21:39:46 +0000246 fixed32 intf_id = 1;
247 fixed32 gemport_id = 2;
248 fixed32 flow_id = 3;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000249 fixed32 port_no = 6;
250 fixed64 cookie = 7;
Shad Ansari42db7342018-04-25 21:39:46 +0000251 bytes pkt = 4;
252}
253
Nicolas Palpacuer3d5a58a2018-07-06 11:50:17 -0400254message Interface {
255 fixed32 intf_id = 1;
256}
257
nick47b74372018-05-25 18:22:49 -0400258message Heartbeat {
259 fixed32 heartbeat_signature = 1;
260}
261
Shad Ansari2825d012018-02-22 23:57:46 +0000262message Onu {
263 fixed32 intf_id = 1;
264 fixed32 onu_id = 2;
265 SerialNumber serial_number = 3;
Shad Ansari3cd9bf22018-07-25 19:29:39 +0000266 fixed32 pir = 4; // peak information rate assigned to onu
Shad Ansari2825d012018-02-22 23:57:46 +0000267}
268
269message OmciMsg {
270 fixed32 intf_id = 1;
271 fixed32 onu_id = 2;
272 bytes pkt = 3;
273}
274
Shad Ansari0346f0d2018-04-26 06:54:09 +0000275message OnuPacket {
276 fixed32 intf_id = 1;
277 fixed32 onu_id = 2;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000278 fixed32 port_no = 4;
Girish Gowdru841708f2019-02-08 04:29:48 -0800279 fixed32 gemport_id = 5;
Shad Ansari0346f0d2018-04-26 06:54:09 +0000280 bytes pkt = 3;
281}
282
Nicolas Palpacuer7d902812018-06-07 16:17:09 -0400283message UplinkPacket {
284 fixed32 intf_id = 1;
285 bytes pkt = 2;
286}
287
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400288message DeviceInfo {
289 string vendor = 1;
290 string model = 2;
291 string hardware_version = 3;
292 string firmware_version = 4;
Craig Lutgen109d4072018-12-11 17:01:16 -0600293 string device_id = 16;
294 string device_serial_number = 17;
Craig Lutgenc7d7af72018-10-16 17:22:09 -0500295
296 // Total number of pon intf ports on the device
297 fixed32 pon_ports = 12;
298
299 // If using global per-device technology profile. To be deprecated
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400300 string technology = 5;
301 fixed32 onu_id_start = 6;
302 fixed32 onu_id_end = 7;
303 fixed32 alloc_id_start = 8;
304 fixed32 alloc_id_end = 9;
305 fixed32 gemport_id_start = 10;
306 fixed32 gemport_id_end = 11;
Craig Lutgenc7d7af72018-10-16 17:22:09 -0500307 fixed32 flow_id_start = 13;
308 fixed32 flow_id_end = 14;
309
310 message DeviceResourceRanges {
311
312 // List of 0 or more intf_ids that use the same technology and pools.
313 // If 0 intf_ids supplied, it implies ALL interfaces
314 repeated fixed32 intf_ids = 1;
315
316 // Technology profile for this pool
317 string technology = 2;
318
319 message Pool {
320 enum PoolType {
321 ONU_ID = 0;
322 ALLOC_ID = 1;
323 GEMPORT_ID = 2;
324 FLOW_ID = 3;
325 }
326
327 enum SharingType {
328 DEDICATED_PER_INTF = 0;
Craig Lutgen1dd47082018-10-23 13:12:26 -0500329 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
Craig Lutgendeaebc92018-10-23 13:07:19 -0500330 SHARED_BY_ALL_INTF_SAME_TECH = 2; // Shared across all interfaces of the same technology used in this range
Craig Lutgenc7d7af72018-10-16 17:22:09 -0500331 }
332
333 PoolType type = 1;
334 SharingType sharing = 2;
335 fixed32 start = 3; // lower bound on IDs allocated from this pool
336 fixed32 end = 4; // upper bound on IDs allocated from this pool
337 }
Craig Lutgendeaebc92018-10-23 13:07:19 -0500338 repeated Pool pools = 3;
Craig Lutgenc7d7af72018-10-16 17:22:09 -0500339 }
340 repeated DeviceResourceRanges ranges = 15;
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400341}
342
Shad Ansari2825d012018-02-22 23:57:46 +0000343message Classifier {
344 fixed32 o_tpid = 1;
345 fixed32 o_vid = 2;
346 fixed32 i_tpid = 3;
347 fixed32 i_vid = 4;
348 fixed32 o_pbits = 5;
349 fixed32 i_pbits = 6;
350 fixed32 eth_type = 7;
351 bytes dst_mac = 8;
352 bytes src_mac = 9;
353 fixed32 ip_proto = 10;
354 fixed32 dst_ip = 11;
355 fixed32 src_ip = 12;
356 fixed32 src_port = 13;
357 fixed32 dst_port = 14;
358 string pkt_tag_type = 15; // untagged, single_tag, double_tag
359}
360
361message ActionCmd {
362 bool add_outer_tag = 1;
363 bool remove_outer_tag = 2;
364 bool trap_to_host = 3;
365}
366
367message Action {
368 ActionCmd cmd = 1;
369 fixed32 o_vid = 2;
370 fixed32 o_pbits = 3;
371 fixed32 o_tpid = 4;
372 fixed32 i_vid = 5;
373 fixed32 i_pbits = 6;
374 fixed32 i_tpid = 7;
375}
376
377message Flow {
Shad Ansarifd0111d2018-09-13 21:33:06 +0000378 sfixed32 access_intf_id = 1;
379 sfixed32 onu_id = 2;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000380 sfixed32 uni_id = 11;
Shad Ansari2825d012018-02-22 23:57:46 +0000381 fixed32 flow_id = 3;
382 string flow_type = 4; // upstream, downstream, broadcast, multicast
Shad Ansarifd0111d2018-09-13 21:33:06 +0000383 sfixed32 alloc_id = 10;
384 sfixed32 network_intf_id = 5;
385 sfixed32 gemport_id = 6;
Shad Ansari2825d012018-02-22 23:57:46 +0000386 Classifier classifier = 7;
387 Action action = 8;
Shad Ansarifd0111d2018-09-13 21:33:06 +0000388 sfixed32 priority = 9;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000389 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
390 fixed32 port_no = 13; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
Shad Ansari2825d012018-02-22 23:57:46 +0000391}
392
393message SerialNumber {
394 bytes vendor_id = 1;
395 bytes vendor_specific = 2;
396}
397
Nicolas Palpacuer33f1a822018-06-13 12:36:36 -0400398message PortStatistics {
399 fixed32 intf_id = 1;
400 fixed64 rx_bytes = 2;
401 fixed64 rx_packets = 3;
402 fixed64 rx_ucast_packets = 4;
403 fixed64 rx_mcast_packets = 5;
404 fixed64 rx_bcast_packets = 6;
405 fixed64 rx_error_packets = 7;
406 fixed64 tx_bytes = 8;
407 fixed64 tx_packets = 9;
408 fixed64 tx_ucast_packets = 10;
409 fixed64 tx_mcast_packets = 11;
410 fixed64 tx_bcast_packets = 12;
411 fixed64 tx_error_packets = 13;
412 fixed64 rx_crc_errors = 14;
413 fixed64 bip_errors = 15;
414 fixed32 timestamp = 16;
415}
416
417message FlowStatistics {
418 fixed32 flow_id = 1;
419 fixed64 rx_bytes = 2;
420 fixed64 rx_packets = 3;
421 fixed64 tx_bytes = 8;
422 fixed64 tx_packets = 9;
423 fixed32 timestamp = 16;
424}
425
Shad Ansari905b8402018-07-03 00:04:50 +0000426message LosIndication {
427 fixed32 intf_id = 1;
428 string status = 2;
429}
430
431message DyingGaspIndication {
432 fixed32 intf_id = 1;
433 fixed32 onu_id = 2;
434 string status = 3;
435}
436
Nicolas Palpacuer16138de2018-07-03 14:35:18 -0400437message OnuAlarmIndication {
438 fixed32 intf_id = 1;
439 fixed32 onu_id = 2;
440 string los_status = 3;
441 string lob_status = 4;
442 string lopc_miss_status = 5;
443 string lopc_mic_error_status = 6;
444}
445
446message OnuStartupFailureIndication {
447 fixed32 intf_id = 1;
448 fixed32 onu_id = 2;
449 string status = 3;
450}
451
452message OnuSignalDegradeIndication {
453 fixed32 intf_id = 1;
454 fixed32 onu_id = 2;
455 string status = 3;
456 fixed32 inverse_bit_error_rate = 4;
457}
458
459message OnuDriftOfWindowIndication {
460 fixed32 intf_id = 1;
461 fixed32 onu_id = 2;
462 string status = 3;
463 fixed32 drift = 4;
464 fixed32 new_eqd = 5;
465}
466
467message OnuLossOfOmciChannelIndication {
468 fixed32 intf_id = 1;
469 fixed32 onu_id = 2;
470 string status = 3;
471}
472
473message OnuSignalsFailureIndication {
474 fixed32 intf_id = 1;
475 fixed32 onu_id = 2;
476 string status = 3;
477 fixed32 inverse_bit_error_rate = 4;
478}
479
480message OnuTransmissionInterferenceWarning {
481 fixed32 intf_id = 1;
482 fixed32 onu_id = 2;
483 string status = 3;
484 fixed32 drift = 4;
485}
486
487message OnuActivationFailureIndication {
488 fixed32 intf_id = 1;
489 fixed32 onu_id = 2;
490}
491
492message OnuProcessingErrorIndication {
493 fixed32 intf_id = 1;
494 fixed32 onu_id = 2;
495}
496
Shad Ansari2825d012018-02-22 23:57:46 +0000497message Empty {}