blob: 8c690677250c20e1960feee39929fb3e2076283c [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
Shad Ansari2825d012018-02-22 23:57:46 +000057 rpc OmciMsgOut(OmciMsg) returns (Empty) {
58 option (google.api.http) = {
59 post: "/v1/OmciMsgOut"
60 body: "*"
61 };
62 }
63
Shad Ansari0346f0d2018-04-26 06:54:09 +000064 rpc OnuPacketOut(OnuPacket) returns (Empty) {
65 option (google.api.http) = {
66 post: "/v1/OnuPacketOut"
67 body: "*"
68 };
69 }
70
Nicolas Palpacuer7d902812018-06-07 16:17:09 -040071 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
72 option (google.api.http) = {
73 post: "/v1/UplinkPacketOut"
74 body: "*"
75 };
76 }
77
Shad Ansari2825d012018-02-22 23:57:46 +000078 rpc FlowAdd(Flow) returns (Empty) {
79 option (google.api.http) = {
80 post: "/v1/FlowAdd"
81 body: "*"
82 };
83 }
84
Nicolas Palpacuer0c7c3162018-08-08 11:27:57 -040085 rpc FlowRemove(Flow) returns (Empty) {
86 option (google.api.http) = {
87 post: "/v1/FlowRemove"
88 body: "*"
89 };
90 }
91
nick47b74372018-05-25 18:22:49 -040092 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
93 option (google.api.http) = {
94 post: "/v1/HeartbeatCheck"
95 body: "*"
96 };
97 }
98
Nicolas Palpacuer3d5a58a2018-07-06 11:50:17 -040099 rpc EnablePonIf(Interface) returns (Empty) {
100 option (google.api.http) = {
101 post: "/v1/EnablePonIf"
102 body: "*"
103 };
104 }
105
e9748942019-07-01 22:26:59 +0000106 rpc GetPonIf(Interface) returns (IntfIndication) { }
107
Nicolas Palpacuer3d5a58a2018-07-06 11:50:17 -0400108 rpc DisablePonIf(Interface) returns (Empty) {
109 option (google.api.http) = {
110 post: "/v1/DisablePonIf"
111 body: "*"
112 };
113 }
Shad Ansari905b8402018-07-03 00:04:50 +0000114
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400115 rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
116 option (google.api.http) = {
117 post: "/v1/GetDeviceInfo"
118 body: "*"
119 };
120 }
121
Nicolas Palpacuerfd365ac2018-08-02 11:37:37 -0400122 rpc Reboot(Empty) returns (Empty) {
123 option (google.api.http) = {
124 post: "/v1/Reboot"
125 body: "*"
126 };
127 }
128
Nicolas Palpacuer30027f42018-09-06 15:55:54 -0400129 rpc CollectStatistics(Empty) returns (Empty) {
130 option (google.api.http) = {
131 post: "/v1/CollectStatistics"
132 body: "*"
133 };
134 }
135
Girish Gowdru841708f2019-02-08 04:29:48 -0800136 rpc CreateTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Girish Gowdruab836e92018-10-25 01:17:57 -0700137 option (google.api.http) = {
Girish Gowdru841708f2019-02-08 04:29:48 -0800138 post: "/v1/CreateTrafficSchedulers"
Girish Gowdruab836e92018-10-25 01:17:57 -0700139 body: "*"
140 };
141 }
142
Girish Gowdru841708f2019-02-08 04:29:48 -0800143 rpc RemoveTrafficSchedulers(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/RemoveTrafficSchedulers"
146 body: "*"
147 };
148 }
149
150 rpc CreateTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
151 option (google.api.http) = {
152 post: "/v1/CreateTrafficQueues"
153 body: "*"
154 };
155 }
156
157 rpc RemoveTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
158 option (google.api.http) = {
159 post: "/v1/RemoveTrafficQueues"
Girish Gowdruab836e92018-10-25 01:17:57 -0700160 body: "*"
161 };
162 }
163
Shad Ansari2825d012018-02-22 23:57:46 +0000164 rpc EnableIndication(Empty) returns (stream Indication) {}
165}
166
167message Indication {
168 oneof data {
169 OltIndication olt_ind = 1;
170 IntfIndication intf_ind = 2;
171 IntfOperIndication intf_oper_ind = 3;
172 OnuDiscIndication onu_disc_ind = 4;
173 OnuIndication onu_ind = 5;
174 OmciIndication omci_ind = 6;
Shad Ansari42db7342018-04-25 21:39:46 +0000175 PacketIndication pkt_ind = 7;
Nicolas Palpacuer33f1a822018-06-13 12:36:36 -0400176 PortStatistics port_stats = 8;
177 FlowStatistics flow_stats = 9;
Shad Ansari905b8402018-07-03 00:04:50 +0000178 AlarmIndication alarm_ind= 10;
179 }
180}
181
182message AlarmIndication {
183 oneof data {
184 LosIndication los_ind = 1;
185 DyingGaspIndication dying_gasp_ind = 2;
Nicolas Palpacuer16138de2018-07-03 14:35:18 -0400186 OnuAlarmIndication onu_alarm_ind = 3;
187 OnuStartupFailureIndication onu_startup_fail_ind = 4;
188 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
189 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
190 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
191 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
192 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
193 OnuActivationFailureIndication onu_activation_fail_ind = 10;
194 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Shad Ansari2825d012018-02-22 23:57:46 +0000195 }
196}
197
198message OltIndication {
199 string oper_state = 1; // up, down
200}
201
202message IntfIndication {
203 fixed32 intf_id = 1;
204 string oper_state = 2; // up, down
205}
206
207message OnuDiscIndication {
208 fixed32 intf_id = 1;
209 SerialNumber serial_number = 2;
210}
211
212message OnuIndication {
213 fixed32 intf_id = 1;
214 fixed32 onu_id = 2;
215 string oper_state = 3; // up, down
Nicolas Palpacuer65de6a42018-05-22 17:28:29 -0400216 string admin_state = 5; // up, down
Shad Ansari2825d012018-02-22 23:57:46 +0000217 SerialNumber serial_number = 4;
218}
219
220message IntfOperIndication {
221 string type = 1; // nni, pon
222 fixed32 intf_id = 2;
223 string oper_state = 3; // up, down
224}
225
226message OmciIndication {
227 fixed32 intf_id = 1;
228 fixed32 onu_id = 2;
229 bytes pkt = 3;
230}
231
Shad Ansari42db7342018-04-25 21:39:46 +0000232message PacketIndication {
Shad Ansari0ff82622018-09-30 09:32:04 +0000233 string intf_type = 5; // nni, pon, unknown
Shad Ansari42db7342018-04-25 21:39:46 +0000234 fixed32 intf_id = 1;
235 fixed32 gemport_id = 2;
236 fixed32 flow_id = 3;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000237 fixed32 port_no = 6;
238 fixed64 cookie = 7;
Shad Ansari42db7342018-04-25 21:39:46 +0000239 bytes pkt = 4;
240}
241
Nicolas Palpacuer3d5a58a2018-07-06 11:50:17 -0400242message Interface {
243 fixed32 intf_id = 1;
244}
245
nick47b74372018-05-25 18:22:49 -0400246message Heartbeat {
247 fixed32 heartbeat_signature = 1;
248}
249
Shad Ansari2825d012018-02-22 23:57:46 +0000250message Onu {
251 fixed32 intf_id = 1;
252 fixed32 onu_id = 2;
253 SerialNumber serial_number = 3;
Shad Ansari3cd9bf22018-07-25 19:29:39 +0000254 fixed32 pir = 4; // peak information rate assigned to onu
Shad Ansari2825d012018-02-22 23:57:46 +0000255}
256
257message OmciMsg {
258 fixed32 intf_id = 1;
259 fixed32 onu_id = 2;
260 bytes pkt = 3;
261}
262
Shad Ansari0346f0d2018-04-26 06:54:09 +0000263message OnuPacket {
264 fixed32 intf_id = 1;
265 fixed32 onu_id = 2;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000266 fixed32 port_no = 4;
Girish Gowdru841708f2019-02-08 04:29:48 -0800267 fixed32 gemport_id = 5;
Shad Ansari0346f0d2018-04-26 06:54:09 +0000268 bytes pkt = 3;
269}
270
Nicolas Palpacuer7d902812018-06-07 16:17:09 -0400271message UplinkPacket {
272 fixed32 intf_id = 1;
273 bytes pkt = 2;
274}
275
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400276message DeviceInfo {
277 string vendor = 1;
278 string model = 2;
279 string hardware_version = 3;
280 string firmware_version = 4;
Craig Lutgen109d4072018-12-11 17:01:16 -0600281 string device_id = 16;
282 string device_serial_number = 17;
Craig Lutgenc7d7af72018-10-16 17:22:09 -0500283
284 // Total number of pon intf ports on the device
285 fixed32 pon_ports = 12;
286
287 // If using global per-device technology profile. To be deprecated
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400288 string technology = 5;
289 fixed32 onu_id_start = 6;
290 fixed32 onu_id_end = 7;
291 fixed32 alloc_id_start = 8;
292 fixed32 alloc_id_end = 9;
293 fixed32 gemport_id_start = 10;
294 fixed32 gemport_id_end = 11;
Craig Lutgenc7d7af72018-10-16 17:22:09 -0500295 fixed32 flow_id_start = 13;
296 fixed32 flow_id_end = 14;
297
298 message DeviceResourceRanges {
299
300 // List of 0 or more intf_ids that use the same technology and pools.
301 // If 0 intf_ids supplied, it implies ALL interfaces
302 repeated fixed32 intf_ids = 1;
303
304 // Technology profile for this pool
305 string technology = 2;
306
307 message Pool {
308 enum PoolType {
309 ONU_ID = 0;
310 ALLOC_ID = 1;
311 GEMPORT_ID = 2;
312 FLOW_ID = 3;
313 }
314
315 enum SharingType {
316 DEDICATED_PER_INTF = 0;
Craig Lutgen1dd47082018-10-23 13:12:26 -0500317 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
Craig Lutgendeaebc92018-10-23 13:07:19 -0500318 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 -0500319 }
320
321 PoolType type = 1;
322 SharingType sharing = 2;
323 fixed32 start = 3; // lower bound on IDs allocated from this pool
324 fixed32 end = 4; // upper bound on IDs allocated from this pool
325 }
Craig Lutgendeaebc92018-10-23 13:07:19 -0500326 repeated Pool pools = 3;
Craig Lutgenc7d7af72018-10-16 17:22:09 -0500327 }
328 repeated DeviceResourceRanges ranges = 15;
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400329}
330
Shad Ansari2825d012018-02-22 23:57:46 +0000331message Classifier {
332 fixed32 o_tpid = 1;
333 fixed32 o_vid = 2;
334 fixed32 i_tpid = 3;
335 fixed32 i_vid = 4;
336 fixed32 o_pbits = 5;
337 fixed32 i_pbits = 6;
338 fixed32 eth_type = 7;
339 bytes dst_mac = 8;
340 bytes src_mac = 9;
341 fixed32 ip_proto = 10;
342 fixed32 dst_ip = 11;
343 fixed32 src_ip = 12;
344 fixed32 src_port = 13;
345 fixed32 dst_port = 14;
346 string pkt_tag_type = 15; // untagged, single_tag, double_tag
347}
348
349message ActionCmd {
350 bool add_outer_tag = 1;
351 bool remove_outer_tag = 2;
352 bool trap_to_host = 3;
353}
354
355message Action {
356 ActionCmd cmd = 1;
357 fixed32 o_vid = 2;
358 fixed32 o_pbits = 3;
359 fixed32 o_tpid = 4;
360 fixed32 i_vid = 5;
361 fixed32 i_pbits = 6;
362 fixed32 i_tpid = 7;
363}
364
365message Flow {
Shad Ansarifd0111d2018-09-13 21:33:06 +0000366 sfixed32 access_intf_id = 1;
367 sfixed32 onu_id = 2;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000368 sfixed32 uni_id = 11;
Shad Ansari2825d012018-02-22 23:57:46 +0000369 fixed32 flow_id = 3;
370 string flow_type = 4; // upstream, downstream, broadcast, multicast
Shad Ansarifd0111d2018-09-13 21:33:06 +0000371 sfixed32 alloc_id = 10;
372 sfixed32 network_intf_id = 5;
373 sfixed32 gemport_id = 6;
Shad Ansari2825d012018-02-22 23:57:46 +0000374 Classifier classifier = 7;
375 Action action = 8;
Shad Ansarifd0111d2018-09-13 21:33:06 +0000376 sfixed32 priority = 9;
Craig Lutgenabd9c842018-11-15 23:58:27 +0000377 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
378 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 +0000379}
380
381message SerialNumber {
382 bytes vendor_id = 1;
383 bytes vendor_specific = 2;
384}
385
Nicolas Palpacuer33f1a822018-06-13 12:36:36 -0400386message PortStatistics {
387 fixed32 intf_id = 1;
388 fixed64 rx_bytes = 2;
389 fixed64 rx_packets = 3;
390 fixed64 rx_ucast_packets = 4;
391 fixed64 rx_mcast_packets = 5;
392 fixed64 rx_bcast_packets = 6;
393 fixed64 rx_error_packets = 7;
394 fixed64 tx_bytes = 8;
395 fixed64 tx_packets = 9;
396 fixed64 tx_ucast_packets = 10;
397 fixed64 tx_mcast_packets = 11;
398 fixed64 tx_bcast_packets = 12;
399 fixed64 tx_error_packets = 13;
400 fixed64 rx_crc_errors = 14;
401 fixed64 bip_errors = 15;
402 fixed32 timestamp = 16;
403}
404
405message FlowStatistics {
406 fixed32 flow_id = 1;
407 fixed64 rx_bytes = 2;
408 fixed64 rx_packets = 3;
409 fixed64 tx_bytes = 8;
410 fixed64 tx_packets = 9;
411 fixed32 timestamp = 16;
412}
413
Shad Ansari905b8402018-07-03 00:04:50 +0000414message LosIndication {
415 fixed32 intf_id = 1;
416 string status = 2;
417}
418
419message DyingGaspIndication {
420 fixed32 intf_id = 1;
421 fixed32 onu_id = 2;
422 string status = 3;
423}
424
Nicolas Palpacuer16138de2018-07-03 14:35:18 -0400425message OnuAlarmIndication {
426 fixed32 intf_id = 1;
427 fixed32 onu_id = 2;
428 string los_status = 3;
429 string lob_status = 4;
430 string lopc_miss_status = 5;
431 string lopc_mic_error_status = 6;
432}
433
434message OnuStartupFailureIndication {
435 fixed32 intf_id = 1;
436 fixed32 onu_id = 2;
437 string status = 3;
438}
439
440message OnuSignalDegradeIndication {
441 fixed32 intf_id = 1;
442 fixed32 onu_id = 2;
443 string status = 3;
444 fixed32 inverse_bit_error_rate = 4;
445}
446
447message OnuDriftOfWindowIndication {
448 fixed32 intf_id = 1;
449 fixed32 onu_id = 2;
450 string status = 3;
451 fixed32 drift = 4;
452 fixed32 new_eqd = 5;
453}
454
455message OnuLossOfOmciChannelIndication {
456 fixed32 intf_id = 1;
457 fixed32 onu_id = 2;
458 string status = 3;
459}
460
461message OnuSignalsFailureIndication {
462 fixed32 intf_id = 1;
463 fixed32 onu_id = 2;
464 string status = 3;
465 fixed32 inverse_bit_error_rate = 4;
466}
467
468message OnuTransmissionInterferenceWarning {
469 fixed32 intf_id = 1;
470 fixed32 onu_id = 2;
471 string status = 3;
472 fixed32 drift = 4;
473}
474
475message OnuActivationFailureIndication {
476 fixed32 intf_id = 1;
477 fixed32 onu_id = 2;
478}
479
480message OnuProcessingErrorIndication {
481 fixed32 intf_id = 1;
482 fixed32 onu_id = 2;
483}
484
Shad Ansari2825d012018-02-22 23:57:46 +0000485message Empty {}