blob: 415791d265e8b76584ee3c3b5927ce93b647b81c [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
e9748942019-07-01 22:26:59 +0000113 rpc GetPonIf(Interface) returns (IntfIndication) { }
114
Nicolas Palpacuer3d5a58a2018-07-06 11:50:17 -0400115 rpc DisablePonIf(Interface) returns (Empty) {
116 option (google.api.http) = {
117 post: "/v1/DisablePonIf"
118 body: "*"
119 };
120 }
Shad Ansari905b8402018-07-03 00:04:50 +0000121
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400122 rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
123 option (google.api.http) = {
124 post: "/v1/GetDeviceInfo"
125 body: "*"
126 };
127 }
128
Nicolas Palpacuerfd365ac2018-08-02 11:37:37 -0400129 rpc Reboot(Empty) returns (Empty) {
130 option (google.api.http) = {
131 post: "/v1/Reboot"
132 body: "*"
133 };
134 }
135
Nicolas Palpacuer30027f42018-09-06 15:55:54 -0400136 rpc CollectStatistics(Empty) returns (Empty) {
137 option (google.api.http) = {
138 post: "/v1/CollectStatistics"
139 body: "*"
140 };
141 }
142
Girish Gowdru841708f2019-02-08 04:29:48 -0800143 rpc CreateTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Girish Gowdruab836e92018-10-25 01:17:57 -0700144 option (google.api.http) = {
Girish Gowdru841708f2019-02-08 04:29:48 -0800145 post: "/v1/CreateTrafficSchedulers"
Girish Gowdruab836e92018-10-25 01:17:57 -0700146 body: "*"
147 };
148 }
149
Girish Gowdru841708f2019-02-08 04:29:48 -0800150 rpc RemoveTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Girish Gowdruab836e92018-10-25 01:17:57 -0700151 option (google.api.http) = {
Girish Gowdru841708f2019-02-08 04:29:48 -0800152 post: "/v1/RemoveTrafficSchedulers"
153 body: "*"
154 };
155 }
156
157 rpc CreateTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
158 option (google.api.http) = {
159 post: "/v1/CreateTrafficQueues"
160 body: "*"
161 };
162 }
163
164 rpc RemoveTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
165 option (google.api.http) = {
166 post: "/v1/RemoveTrafficQueues"
Girish Gowdruab836e92018-10-25 01:17:57 -0700167 body: "*"
168 };
169 }
170
Shad Ansari2825d012018-02-22 23:57:46 +0000171 rpc EnableIndication(Empty) returns (stream Indication) {}
172}
173
174message Indication {
175 oneof data {
176 OltIndication olt_ind = 1;
177 IntfIndication intf_ind = 2;
178 IntfOperIndication intf_oper_ind = 3;
179 OnuDiscIndication onu_disc_ind = 4;
180 OnuIndication onu_ind = 5;
181 OmciIndication omci_ind = 6;
Shad Ansari42db7342018-04-25 21:39:46 +0000182 PacketIndication pkt_ind = 7;
Nicolas Palpacuer33f1a822018-06-13 12:36:36 -0400183 PortStatistics port_stats = 8;
184 FlowStatistics flow_stats = 9;
Shad Ansari905b8402018-07-03 00:04:50 +0000185 AlarmIndication alarm_ind= 10;
186 }
187}
188
189message AlarmIndication {
190 oneof data {
191 LosIndication los_ind = 1;
192 DyingGaspIndication dying_gasp_ind = 2;
Nicolas Palpacuer16138de2018-07-03 14:35:18 -0400193 OnuAlarmIndication onu_alarm_ind = 3;
194 OnuStartupFailureIndication onu_startup_fail_ind = 4;
195 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
196 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
197 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
198 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
199 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
200 OnuActivationFailureIndication onu_activation_fail_ind = 10;
201 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Shad Ansari2825d012018-02-22 23:57:46 +0000202 }
203}
204
205message OltIndication {
206 string oper_state = 1; // up, down
207}
208
209message IntfIndication {
210 fixed32 intf_id = 1;
211 string oper_state = 2; // up, down
212}
213
214message OnuDiscIndication {
215 fixed32 intf_id = 1;
216 SerialNumber serial_number = 2;
217}
218
219message OnuIndication {
220 fixed32 intf_id = 1;
221 fixed32 onu_id = 2;
222 string oper_state = 3; // up, down
Nicolas Palpacuer65de6a42018-05-22 17:28:29 -0400223 string admin_state = 5; // up, down
Shad Ansari2825d012018-02-22 23:57:46 +0000224 SerialNumber serial_number = 4;
225}
226
227message IntfOperIndication {
228 string type = 1; // nni, pon
229 fixed32 intf_id = 2;
230 string oper_state = 3; // up, down
231}
232
233message OmciIndication {
234 fixed32 intf_id = 1;
235 fixed32 onu_id = 2;
236 bytes pkt = 3;
237}
238
Shad Ansari42db7342018-04-25 21:39:46 +0000239message PacketIndication {
Shad Ansari0ff82622018-09-30 09:32:04 +0000240 string intf_type = 5; // nni, pon, unknown
Shad Ansari42db7342018-04-25 21:39:46 +0000241 fixed32 intf_id = 1;
242 fixed32 gemport_id = 2;
243 fixed32 flow_id = 3;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000244 fixed32 port_no = 6;
245 fixed64 cookie = 7;
Shad Ansari42db7342018-04-25 21:39:46 +0000246 bytes pkt = 4;
247}
248
Nicolas Palpacuer3d5a58a2018-07-06 11:50:17 -0400249message Interface {
250 fixed32 intf_id = 1;
251}
252
nick47b74372018-05-25 18:22:49 -0400253message Heartbeat {
254 fixed32 heartbeat_signature = 1;
255}
256
Shad Ansari2825d012018-02-22 23:57:46 +0000257message Onu {
258 fixed32 intf_id = 1;
259 fixed32 onu_id = 2;
260 SerialNumber serial_number = 3;
Shad Ansari3cd9bf22018-07-25 19:29:39 +0000261 fixed32 pir = 4; // peak information rate assigned to onu
Shad Ansari2825d012018-02-22 23:57:46 +0000262}
263
264message OmciMsg {
265 fixed32 intf_id = 1;
266 fixed32 onu_id = 2;
267 bytes pkt = 3;
268}
269
Shad Ansari0346f0d2018-04-26 06:54:09 +0000270message OnuPacket {
271 fixed32 intf_id = 1;
272 fixed32 onu_id = 2;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000273 fixed32 port_no = 4;
Girish Gowdru841708f2019-02-08 04:29:48 -0800274 fixed32 gemport_id = 5;
Shad Ansari0346f0d2018-04-26 06:54:09 +0000275 bytes pkt = 3;
276}
277
Nicolas Palpacuer7d902812018-06-07 16:17:09 -0400278message UplinkPacket {
279 fixed32 intf_id = 1;
280 bytes pkt = 2;
281}
282
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400283message DeviceInfo {
284 string vendor = 1;
285 string model = 2;
286 string hardware_version = 3;
287 string firmware_version = 4;
Craig Lutgen109d4072018-12-11 17:01:16 -0600288 string device_id = 16;
289 string device_serial_number = 17;
Craig Lutgenc7d7af72018-10-16 17:22:09 -0500290
291 // Total number of pon intf ports on the device
292 fixed32 pon_ports = 12;
293
294 // If using global per-device technology profile. To be deprecated
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400295 string technology = 5;
296 fixed32 onu_id_start = 6;
297 fixed32 onu_id_end = 7;
298 fixed32 alloc_id_start = 8;
299 fixed32 alloc_id_end = 9;
300 fixed32 gemport_id_start = 10;
301 fixed32 gemport_id_end = 11;
Craig Lutgenc7d7af72018-10-16 17:22:09 -0500302 fixed32 flow_id_start = 13;
303 fixed32 flow_id_end = 14;
304
305 message DeviceResourceRanges {
306
307 // List of 0 or more intf_ids that use the same technology and pools.
308 // If 0 intf_ids supplied, it implies ALL interfaces
309 repeated fixed32 intf_ids = 1;
310
311 // Technology profile for this pool
312 string technology = 2;
313
314 message Pool {
315 enum PoolType {
316 ONU_ID = 0;
317 ALLOC_ID = 1;
318 GEMPORT_ID = 2;
319 FLOW_ID = 3;
320 }
321
322 enum SharingType {
323 DEDICATED_PER_INTF = 0;
Craig Lutgen1dd47082018-10-23 13:12:26 -0500324 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
Craig Lutgendeaebc92018-10-23 13:07:19 -0500325 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 -0500326 }
327
328 PoolType type = 1;
329 SharingType sharing = 2;
330 fixed32 start = 3; // lower bound on IDs allocated from this pool
331 fixed32 end = 4; // upper bound on IDs allocated from this pool
332 }
Craig Lutgendeaebc92018-10-23 13:07:19 -0500333 repeated Pool pools = 3;
Craig Lutgenc7d7af72018-10-16 17:22:09 -0500334 }
335 repeated DeviceResourceRanges ranges = 15;
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400336}
337
Shad Ansari2825d012018-02-22 23:57:46 +0000338message Classifier {
339 fixed32 o_tpid = 1;
340 fixed32 o_vid = 2;
341 fixed32 i_tpid = 3;
342 fixed32 i_vid = 4;
343 fixed32 o_pbits = 5;
344 fixed32 i_pbits = 6;
345 fixed32 eth_type = 7;
346 bytes dst_mac = 8;
347 bytes src_mac = 9;
348 fixed32 ip_proto = 10;
349 fixed32 dst_ip = 11;
350 fixed32 src_ip = 12;
351 fixed32 src_port = 13;
352 fixed32 dst_port = 14;
353 string pkt_tag_type = 15; // untagged, single_tag, double_tag
354}
355
356message ActionCmd {
357 bool add_outer_tag = 1;
358 bool remove_outer_tag = 2;
359 bool trap_to_host = 3;
360}
361
362message Action {
363 ActionCmd cmd = 1;
364 fixed32 o_vid = 2;
365 fixed32 o_pbits = 3;
366 fixed32 o_tpid = 4;
367 fixed32 i_vid = 5;
368 fixed32 i_pbits = 6;
369 fixed32 i_tpid = 7;
370}
371
372message Flow {
Shad Ansarifd0111d2018-09-13 21:33:06 +0000373 sfixed32 access_intf_id = 1;
374 sfixed32 onu_id = 2;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000375 sfixed32 uni_id = 11;
Shad Ansari2825d012018-02-22 23:57:46 +0000376 fixed32 flow_id = 3;
377 string flow_type = 4; // upstream, downstream, broadcast, multicast
Shad Ansarifd0111d2018-09-13 21:33:06 +0000378 sfixed32 alloc_id = 10;
379 sfixed32 network_intf_id = 5;
380 sfixed32 gemport_id = 6;
Shad Ansari2825d012018-02-22 23:57:46 +0000381 Classifier classifier = 7;
382 Action action = 8;
Shad Ansarifd0111d2018-09-13 21:33:06 +0000383 sfixed32 priority = 9;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000384 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
385 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 +0000386}
387
388message SerialNumber {
389 bytes vendor_id = 1;
390 bytes vendor_specific = 2;
391}
392
Nicolas Palpacuer33f1a822018-06-13 12:36:36 -0400393message PortStatistics {
394 fixed32 intf_id = 1;
395 fixed64 rx_bytes = 2;
396 fixed64 rx_packets = 3;
397 fixed64 rx_ucast_packets = 4;
398 fixed64 rx_mcast_packets = 5;
399 fixed64 rx_bcast_packets = 6;
400 fixed64 rx_error_packets = 7;
401 fixed64 tx_bytes = 8;
402 fixed64 tx_packets = 9;
403 fixed64 tx_ucast_packets = 10;
404 fixed64 tx_mcast_packets = 11;
405 fixed64 tx_bcast_packets = 12;
406 fixed64 tx_error_packets = 13;
407 fixed64 rx_crc_errors = 14;
408 fixed64 bip_errors = 15;
409 fixed32 timestamp = 16;
410}
411
412message FlowStatistics {
413 fixed32 flow_id = 1;
414 fixed64 rx_bytes = 2;
415 fixed64 rx_packets = 3;
416 fixed64 tx_bytes = 8;
417 fixed64 tx_packets = 9;
418 fixed32 timestamp = 16;
419}
420
Shad Ansari905b8402018-07-03 00:04:50 +0000421message LosIndication {
422 fixed32 intf_id = 1;
423 string status = 2;
424}
425
426message DyingGaspIndication {
427 fixed32 intf_id = 1;
428 fixed32 onu_id = 2;
429 string status = 3;
430}
431
Nicolas Palpacuer16138de2018-07-03 14:35:18 -0400432message OnuAlarmIndication {
433 fixed32 intf_id = 1;
434 fixed32 onu_id = 2;
435 string los_status = 3;
436 string lob_status = 4;
437 string lopc_miss_status = 5;
438 string lopc_mic_error_status = 6;
439}
440
441message OnuStartupFailureIndication {
442 fixed32 intf_id = 1;
443 fixed32 onu_id = 2;
444 string status = 3;
445}
446
447message OnuSignalDegradeIndication {
448 fixed32 intf_id = 1;
449 fixed32 onu_id = 2;
450 string status = 3;
451 fixed32 inverse_bit_error_rate = 4;
452}
453
454message OnuDriftOfWindowIndication {
455 fixed32 intf_id = 1;
456 fixed32 onu_id = 2;
457 string status = 3;
458 fixed32 drift = 4;
459 fixed32 new_eqd = 5;
460}
461
462message OnuLossOfOmciChannelIndication {
463 fixed32 intf_id = 1;
464 fixed32 onu_id = 2;
465 string status = 3;
466}
467
468message OnuSignalsFailureIndication {
469 fixed32 intf_id = 1;
470 fixed32 onu_id = 2;
471 string status = 3;
472 fixed32 inverse_bit_error_rate = 4;
473}
474
475message OnuTransmissionInterferenceWarning {
476 fixed32 intf_id = 1;
477 fixed32 onu_id = 2;
478 string status = 3;
479 fixed32 drift = 4;
480}
481
482message OnuActivationFailureIndication {
483 fixed32 intf_id = 1;
484 fixed32 onu_id = 2;
485}
486
487message OnuProcessingErrorIndication {
488 fixed32 intf_id = 1;
489 fixed32 onu_id = 2;
490}
491
Shad Ansari2825d012018-02-22 23:57:46 +0000492message Empty {}