blob: 6c36de4eda3f036010cdf82863adbe218164e953 [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";
18
19service Openolt {
20
Nicolas Palpacuer62dbb9c2018-08-02 15:03:35 -040021 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
Shad Ansari2825d012018-02-22 23:57:46 +000035 rpc ActivateOnu(Onu) returns (Empty) {
36 option (google.api.http) = {
37 post: "/v1/EnableOnu"
38 body: "*"
39 };
40 }
41
Jonathan Davisb45bb372018-07-19 15:05:15 -040042 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
Shad Ansari2825d012018-02-22 23:57:46 +000056 rpc OmciMsgOut(OmciMsg) returns (Empty) {
57 option (google.api.http) = {
58 post: "/v1/OmciMsgOut"
59 body: "*"
60 };
61 }
62
Shad Ansari0346f0d2018-04-26 06:54:09 +000063 rpc OnuPacketOut(OnuPacket) returns (Empty) {
64 option (google.api.http) = {
65 post: "/v1/OnuPacketOut"
66 body: "*"
67 };
68 }
69
Nicolas Palpacuer7d902812018-06-07 16:17:09 -040070 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
71 option (google.api.http) = {
72 post: "/v1/UplinkPacketOut"
73 body: "*"
74 };
75 }
76
Shad Ansari2825d012018-02-22 23:57:46 +000077 rpc FlowAdd(Flow) returns (Empty) {
78 option (google.api.http) = {
79 post: "/v1/FlowAdd"
80 body: "*"
81 };
82 }
83
Nicolas Palpacuer0c7c3162018-08-08 11:27:57 -040084 rpc FlowRemove(Flow) returns (Empty) {
85 option (google.api.http) = {
86 post: "/v1/FlowRemove"
87 body: "*"
88 };
89 }
90
nick47b74372018-05-25 18:22:49 -040091 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
92 option (google.api.http) = {
93 post: "/v1/HeartbeatCheck"
94 body: "*"
95 };
96 }
97
Nicolas Palpacuer3d5a58a2018-07-06 11:50:17 -040098 rpc EnablePonIf(Interface) returns (Empty) {
99 option (google.api.http) = {
100 post: "/v1/EnablePonIf"
101 body: "*"
102 };
103 }
104
105 rpc DisablePonIf(Interface) returns (Empty) {
106 option (google.api.http) = {
107 post: "/v1/DisablePonIf"
108 body: "*"
109 };
110 }
Shad Ansari905b8402018-07-03 00:04:50 +0000111
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400112 rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
113 option (google.api.http) = {
114 post: "/v1/GetDeviceInfo"
115 body: "*"
116 };
117 }
118
Nicolas Palpacuerfd365ac2018-08-02 11:37:37 -0400119 rpc Reboot(Empty) returns (Empty) {
120 option (google.api.http) = {
121 post: "/v1/Reboot"
122 body: "*"
123 };
124 }
125
Nicolas Palpacuer30027f42018-09-06 15:55:54 -0400126 rpc CollectStatistics(Empty) returns (Empty) {
127 option (google.api.http) = {
128 post: "/v1/CollectStatistics"
129 body: "*"
130 };
131 }
132
Shad Ansari2825d012018-02-22 23:57:46 +0000133 rpc EnableIndication(Empty) returns (stream Indication) {}
134}
135
136message Indication {
137 oneof data {
138 OltIndication olt_ind = 1;
139 IntfIndication intf_ind = 2;
140 IntfOperIndication intf_oper_ind = 3;
141 OnuDiscIndication onu_disc_ind = 4;
142 OnuIndication onu_ind = 5;
143 OmciIndication omci_ind = 6;
Shad Ansari42db7342018-04-25 21:39:46 +0000144 PacketIndication pkt_ind = 7;
Nicolas Palpacuer33f1a822018-06-13 12:36:36 -0400145 PortStatistics port_stats = 8;
146 FlowStatistics flow_stats = 9;
Shad Ansari905b8402018-07-03 00:04:50 +0000147 AlarmIndication alarm_ind= 10;
148 }
149}
150
151message AlarmIndication {
152 oneof data {
153 LosIndication los_ind = 1;
154 DyingGaspIndication dying_gasp_ind = 2;
Nicolas Palpacuer16138de2018-07-03 14:35:18 -0400155 OnuAlarmIndication onu_alarm_ind = 3;
156 OnuStartupFailureIndication onu_startup_fail_ind = 4;
157 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
158 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
159 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
160 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
161 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
162 OnuActivationFailureIndication onu_activation_fail_ind = 10;
163 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Shad Ansari2825d012018-02-22 23:57:46 +0000164 }
165}
166
167message OltIndication {
168 string oper_state = 1; // up, down
169}
170
171message IntfIndication {
172 fixed32 intf_id = 1;
173 string oper_state = 2; // up, down
174}
175
176message OnuDiscIndication {
177 fixed32 intf_id = 1;
178 SerialNumber serial_number = 2;
179}
180
181message OnuIndication {
182 fixed32 intf_id = 1;
183 fixed32 onu_id = 2;
184 string oper_state = 3; // up, down
Nicolas Palpacuer65de6a42018-05-22 17:28:29 -0400185 string admin_state = 5; // up, down
Shad Ansari2825d012018-02-22 23:57:46 +0000186 SerialNumber serial_number = 4;
187}
188
189message IntfOperIndication {
190 string type = 1; // nni, pon
191 fixed32 intf_id = 2;
192 string oper_state = 3; // up, down
193}
194
195message OmciIndication {
196 fixed32 intf_id = 1;
197 fixed32 onu_id = 2;
198 bytes pkt = 3;
199}
200
Shad Ansari42db7342018-04-25 21:39:46 +0000201message PacketIndication {
202 fixed32 intf_id = 1;
203 fixed32 gemport_id = 2;
204 fixed32 flow_id = 3;
205 bytes pkt = 4;
206}
207
Nicolas Palpacuer3d5a58a2018-07-06 11:50:17 -0400208message Interface {
209 fixed32 intf_id = 1;
210}
211
nick47b74372018-05-25 18:22:49 -0400212message Heartbeat {
213 fixed32 heartbeat_signature = 1;
214}
215
Shad Ansari2825d012018-02-22 23:57:46 +0000216message Onu {
217 fixed32 intf_id = 1;
218 fixed32 onu_id = 2;
219 SerialNumber serial_number = 3;
Shad Ansari3cd9bf22018-07-25 19:29:39 +0000220 fixed32 pir = 4; // peak information rate assigned to onu
Girish Gowdru141ced82018-09-17 20:19:14 -0700221 fixed32 agg_port_id = 5;
222 fixed32 sched_id = 6;
223
Shad Ansari2825d012018-02-22 23:57:46 +0000224}
225
226message OmciMsg {
227 fixed32 intf_id = 1;
228 fixed32 onu_id = 2;
229 bytes pkt = 3;
230}
231
Shad Ansari0346f0d2018-04-26 06:54:09 +0000232message OnuPacket {
233 fixed32 intf_id = 1;
234 fixed32 onu_id = 2;
235 bytes pkt = 3;
236}
237
Nicolas Palpacuer7d902812018-06-07 16:17:09 -0400238message UplinkPacket {
239 fixed32 intf_id = 1;
240 bytes pkt = 2;
241}
242
Nicolas Palpacuer33c2d3d2018-09-06 15:01:14 -0400243message DeviceInfo {
244 string vendor = 1;
245 string model = 2;
246 string hardware_version = 3;
247 string firmware_version = 4;
248 string technology = 5;
249 fixed32 onu_id_start = 6;
250 fixed32 onu_id_end = 7;
251 fixed32 alloc_id_start = 8;
252 fixed32 alloc_id_end = 9;
253 fixed32 gemport_id_start = 10;
254 fixed32 gemport_id_end = 11;
255 fixed32 pon_ports = 12;
256}
257
Shad Ansari2825d012018-02-22 23:57:46 +0000258message Classifier {
259 fixed32 o_tpid = 1;
260 fixed32 o_vid = 2;
261 fixed32 i_tpid = 3;
262 fixed32 i_vid = 4;
263 fixed32 o_pbits = 5;
264 fixed32 i_pbits = 6;
265 fixed32 eth_type = 7;
266 bytes dst_mac = 8;
267 bytes src_mac = 9;
268 fixed32 ip_proto = 10;
269 fixed32 dst_ip = 11;
270 fixed32 src_ip = 12;
271 fixed32 src_port = 13;
272 fixed32 dst_port = 14;
273 string pkt_tag_type = 15; // untagged, single_tag, double_tag
274}
275
276message ActionCmd {
277 bool add_outer_tag = 1;
278 bool remove_outer_tag = 2;
279 bool trap_to_host = 3;
280}
281
282message Action {
283 ActionCmd cmd = 1;
284 fixed32 o_vid = 2;
285 fixed32 o_pbits = 3;
286 fixed32 o_tpid = 4;
287 fixed32 i_vid = 5;
288 fixed32 i_pbits = 6;
289 fixed32 i_tpid = 7;
290}
291
292message Flow {
Shad Ansarifd0111d2018-09-13 21:33:06 +0000293 sfixed32 access_intf_id = 1;
294 sfixed32 onu_id = 2;
Shad Ansari2825d012018-02-22 23:57:46 +0000295 fixed32 flow_id = 3;
296 string flow_type = 4; // upstream, downstream, broadcast, multicast
Shad Ansarifd0111d2018-09-13 21:33:06 +0000297 sfixed32 alloc_id = 10;
298 sfixed32 network_intf_id = 5;
299 sfixed32 gemport_id = 6;
Shad Ansari2825d012018-02-22 23:57:46 +0000300 Classifier classifier = 7;
301 Action action = 8;
Shad Ansarifd0111d2018-09-13 21:33:06 +0000302 sfixed32 priority = 9;
Shad Ansari2825d012018-02-22 23:57:46 +0000303}
304
305message SerialNumber {
306 bytes vendor_id = 1;
307 bytes vendor_specific = 2;
308}
309
Nicolas Palpacuer33f1a822018-06-13 12:36:36 -0400310message PortStatistics {
311 fixed32 intf_id = 1;
312 fixed64 rx_bytes = 2;
313 fixed64 rx_packets = 3;
314 fixed64 rx_ucast_packets = 4;
315 fixed64 rx_mcast_packets = 5;
316 fixed64 rx_bcast_packets = 6;
317 fixed64 rx_error_packets = 7;
318 fixed64 tx_bytes = 8;
319 fixed64 tx_packets = 9;
320 fixed64 tx_ucast_packets = 10;
321 fixed64 tx_mcast_packets = 11;
322 fixed64 tx_bcast_packets = 12;
323 fixed64 tx_error_packets = 13;
324 fixed64 rx_crc_errors = 14;
325 fixed64 bip_errors = 15;
326 fixed32 timestamp = 16;
327}
328
329message FlowStatistics {
330 fixed32 flow_id = 1;
331 fixed64 rx_bytes = 2;
332 fixed64 rx_packets = 3;
333 fixed64 tx_bytes = 8;
334 fixed64 tx_packets = 9;
335 fixed32 timestamp = 16;
336}
337
Shad Ansari905b8402018-07-03 00:04:50 +0000338message LosIndication {
339 fixed32 intf_id = 1;
340 string status = 2;
341}
342
343message DyingGaspIndication {
344 fixed32 intf_id = 1;
345 fixed32 onu_id = 2;
346 string status = 3;
347}
348
Nicolas Palpacuer16138de2018-07-03 14:35:18 -0400349message OnuAlarmIndication {
350 fixed32 intf_id = 1;
351 fixed32 onu_id = 2;
352 string los_status = 3;
353 string lob_status = 4;
354 string lopc_miss_status = 5;
355 string lopc_mic_error_status = 6;
356}
357
358message OnuStartupFailureIndication {
359 fixed32 intf_id = 1;
360 fixed32 onu_id = 2;
361 string status = 3;
362}
363
364message OnuSignalDegradeIndication {
365 fixed32 intf_id = 1;
366 fixed32 onu_id = 2;
367 string status = 3;
368 fixed32 inverse_bit_error_rate = 4;
369}
370
371message OnuDriftOfWindowIndication {
372 fixed32 intf_id = 1;
373 fixed32 onu_id = 2;
374 string status = 3;
375 fixed32 drift = 4;
376 fixed32 new_eqd = 5;
377}
378
379message OnuLossOfOmciChannelIndication {
380 fixed32 intf_id = 1;
381 fixed32 onu_id = 2;
382 string status = 3;
383}
384
385message OnuSignalsFailureIndication {
386 fixed32 intf_id = 1;
387 fixed32 onu_id = 2;
388 string status = 3;
389 fixed32 inverse_bit_error_rate = 4;
390}
391
392message OnuTransmissionInterferenceWarning {
393 fixed32 intf_id = 1;
394 fixed32 onu_id = 2;
395 string status = 3;
396 fixed32 drift = 4;
397}
398
399message OnuActivationFailureIndication {
400 fixed32 intf_id = 1;
401 fixed32 onu_id = 2;
402}
403
404message OnuProcessingErrorIndication {
405 fixed32 intf_id = 1;
406 fixed32 onu_id = 2;
407}
408
409
Shad Ansari2825d012018-02-22 23:57:46 +0000410message Empty {}