blob: 00509f6ef5fcac33026ea7d6532dd5f0a63f3b4e [file] [log] [blame]
Shad Ansari19249582018-04-30 04:31:00 +00001// 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";
16package openolt;
17import "google/api/annotations.proto";
18
19service Openolt {
20
Nicolas Palpacuere3fc0d22018-08-02 16:51:05 -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 Ansari19249582018-04-30 04:31:00 +000035 rpc ActivateOnu(Onu) returns (Empty) {
36 option (google.api.http) = {
37 post: "/v1/EnableOnu"
38 body: "*"
39 };
40 }
41
Jonathan Davis70c21812018-07-19 15:32:10 -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 Ansari19249582018-04-30 04:31:00 +000056 rpc OmciMsgOut(OmciMsg) returns (Empty) {
57 option (google.api.http) = {
58 post: "/v1/OmciMsgOut"
59 body: "*"
60 };
61 }
62
63 rpc OnuPacketOut(OnuPacket) returns (Empty) {
64 option (google.api.http) = {
65 post: "/v1/OnuPacketOut"
66 body: "*"
67 };
68 }
69
Nicolas Palpacuerb78def42018-06-07 12:55:26 -040070 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
71 option (google.api.http) = {
72 post: "/v1/UplinkPacketOut"
73 body: "*"
74 };
75 }
76
Shad Ansari19249582018-04-30 04:31:00 +000077 rpc FlowAdd(Flow) returns (Empty) {
78 option (google.api.http) = {
79 post: "/v1/FlowAdd"
80 body: "*"
81 };
82 }
83
Nicolas Palpacueredfaa0c2018-07-05 15:05:27 -040084 rpc FlowRemove(Flow) returns (Empty) {
85 option (google.api.http) = {
86 post: "/v1/FlowRemove"
87 body: "*"
88 };
89 }
90
nick7be062f2018-05-25 17:52:56 -040091 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
92 option (google.api.http) = {
93 post: "/v1/HeartbeatCheck"
94 body: "*"
95 };
96 }
97
Nicolas Palpacuer05ea0ea2018-07-06 11:47:21 -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 }
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400111
Nicolas Palpacuer45180662018-08-02 14:01:51 -0400112 rpc Reboot(Empty) returns (Empty) {
113 option (google.api.http) = {
114 post: "/v1/Reboot"
115 body: "*"
116 };
117 }
118
Shad Ansari19249582018-04-30 04:31:00 +0000119 rpc EnableIndication(Empty) returns (stream Indication) {}
120}
121
122message Indication {
123 oneof data {
124 OltIndication olt_ind = 1;
125 IntfIndication intf_ind = 2;
126 IntfOperIndication intf_oper_ind = 3;
127 OnuDiscIndication onu_disc_ind = 4;
128 OnuIndication onu_ind = 5;
129 OmciIndication omci_ind = 6;
130 PacketIndication pkt_ind = 7;
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400131 PortStatistics port_stats = 8;
132 FlowStatistics flow_stats = 9;
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400133 AlarmIndication alarm_ind= 10;
134 }
135}
136
137message AlarmIndication {
138 oneof data {
139 LosIndication los_ind = 1;
140 DyingGaspIndication dying_gasp_ind = 2;
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400141 OnuAlarmIndication onu_alarm_ind = 3;
142 OnuStartupFailureIndication onu_startup_fail_ind = 4;
143 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
144 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
145 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
146 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
147 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
148 OnuActivationFailureIndication onu_activation_fail_ind = 10;
149 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Shad Ansari19249582018-04-30 04:31:00 +0000150 }
151}
152
153message OltIndication {
154 string oper_state = 1; // up, down
Shad Ansari19249582018-04-30 04:31:00 +0000155}
156
157message IntfIndication {
158 fixed32 intf_id = 1;
159 string oper_state = 2; // up, down
160}
161
162message OnuDiscIndication {
163 fixed32 intf_id = 1;
164 SerialNumber serial_number = 2;
165}
166
167message OnuIndication {
168 fixed32 intf_id = 1;
169 fixed32 onu_id = 2;
170 string oper_state = 3; // up, down
Shad Ansarife9d9422018-05-22 23:25:02 +0000171 string admin_state = 5; // up, down
172 SerialNumber serial_number = 4;
Shad Ansari19249582018-04-30 04:31:00 +0000173}
174
175message IntfOperIndication {
176 string type = 1; // nni, pon
177 fixed32 intf_id = 2;
178 string oper_state = 3; // up, down
179}
180
181message OmciIndication {
182 fixed32 intf_id = 1;
183 fixed32 onu_id = 2;
184 bytes pkt = 3;
185}
186
187message PacketIndication {
188 fixed32 intf_id = 1;
189 fixed32 gemport_id = 2;
190 fixed32 flow_id = 3;
191 bytes pkt = 4;
192}
193
Nicolas Palpacuer05ea0ea2018-07-06 11:47:21 -0400194message Interface {
195 fixed32 intf_id = 1;
196}
197
nick7be062f2018-05-25 17:52:56 -0400198message Heartbeat {
199 fixed32 heartbeat_signature = 1;
200}
201
Shad Ansari19249582018-04-30 04:31:00 +0000202message Onu {
203 fixed32 intf_id = 1;
204 fixed32 onu_id = 2;
205 SerialNumber serial_number = 3;
Shad Ansari06101952018-07-25 00:22:09 +0000206 fixed32 pir = 4; // peak information rate assigned to onu
Shad Ansari19249582018-04-30 04:31:00 +0000207}
208
209message OmciMsg {
210 fixed32 intf_id = 1;
211 fixed32 onu_id = 2;
212 bytes pkt = 3;
213}
214
215message OnuPacket {
216 fixed32 intf_id = 1;
217 fixed32 onu_id = 2;
218 bytes pkt = 3;
219}
220
Nicolas Palpacuerb78def42018-06-07 12:55:26 -0400221message UplinkPacket {
222 fixed32 intf_id = 1;
223 bytes pkt = 2;
224}
225
Shad Ansari19249582018-04-30 04:31:00 +0000226message Classifier {
227 fixed32 o_tpid = 1;
228 fixed32 o_vid = 2;
229 fixed32 i_tpid = 3;
230 fixed32 i_vid = 4;
231 fixed32 o_pbits = 5;
232 fixed32 i_pbits = 6;
233 fixed32 eth_type = 7;
234 bytes dst_mac = 8;
235 bytes src_mac = 9;
236 fixed32 ip_proto = 10;
237 fixed32 dst_ip = 11;
238 fixed32 src_ip = 12;
239 fixed32 src_port = 13;
240 fixed32 dst_port = 14;
241 string pkt_tag_type = 15; // untagged, single_tag, double_tag
242}
243
244message ActionCmd {
245 bool add_outer_tag = 1;
246 bool remove_outer_tag = 2;
247 bool trap_to_host = 3;
248}
249
250message Action {
251 ActionCmd cmd = 1;
252 fixed32 o_vid = 2;
253 fixed32 o_pbits = 3;
254 fixed32 o_tpid = 4;
255 fixed32 i_vid = 5;
256 fixed32 i_pbits = 6;
257 fixed32 i_tpid = 7;
258}
259
260message Flow {
261 fixed32 access_intf_id = 1;
262 fixed32 onu_id = 2;
263 fixed32 flow_id = 3;
264 string flow_type = 4; // upstream, downstream, broadcast, multicast
265 fixed32 network_intf_id = 5;
266 fixed32 gemport_id = 6;
267 Classifier classifier = 7;
268 Action action = 8;
Nicolas Palpacuerd6cf5aa2018-07-16 15:14:39 -0400269 fixed32 priority = 9;
Shad Ansari19249582018-04-30 04:31:00 +0000270}
271
272message SerialNumber {
273 bytes vendor_id = 1;
274 bytes vendor_specific = 2;
275}
276
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400277message PortStatistics {
278 fixed32 intf_id = 1;
279 fixed64 rx_bytes = 2;
280 fixed64 rx_packets = 3;
281 fixed64 rx_ucast_packets = 4;
282 fixed64 rx_mcast_packets = 5;
283 fixed64 rx_bcast_packets = 6;
284 fixed64 rx_error_packets = 7;
285 fixed64 tx_bytes = 8;
286 fixed64 tx_packets = 9;
287 fixed64 tx_ucast_packets = 10;
288 fixed64 tx_mcast_packets = 11;
289 fixed64 tx_bcast_packets = 12;
290 fixed64 tx_error_packets = 13;
291 fixed64 rx_crc_errors = 14;
292 fixed64 bip_errors = 15;
293 fixed32 timestamp = 16;
294}
295
296message FlowStatistics {
297 fixed32 flow_id = 1;
298 fixed64 rx_bytes = 2;
299 fixed64 rx_packets = 3;
300 fixed64 tx_bytes = 8;
301 fixed64 tx_packets = 9;
302 fixed32 timestamp = 16;
303}
304
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400305message LosIndication {
306 fixed32 intf_id = 1;
307 string status = 2;
308}
309
310message DyingGaspIndication {
311 fixed32 intf_id = 1;
312 fixed32 onu_id = 2;
313 string status = 3;
314}
315
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400316message OnuAlarmIndication {
317 fixed32 intf_id = 1;
318 fixed32 onu_id = 2;
319 string los_status = 3;
320 string lob_status = 4;
321 string lopc_miss_status = 5;
322 string lopc_mic_error_status = 6;
323}
324
325message OnuStartupFailureIndication {
326 fixed32 intf_id = 1;
327 fixed32 onu_id = 2;
328 string status = 3;
329}
330
331message OnuSignalDegradeIndication {
332 fixed32 intf_id = 1;
333 fixed32 onu_id = 2;
334 string status = 3;
335 fixed32 inverse_bit_error_rate = 4;
336}
337
338message OnuDriftOfWindowIndication {
339 fixed32 intf_id = 1;
340 fixed32 onu_id = 2;
341 string status = 3;
342 fixed32 drift = 4;
343 fixed32 new_eqd = 5;
344}
345
346message OnuLossOfOmciChannelIndication {
347 fixed32 intf_id = 1;
348 fixed32 onu_id = 2;
349 string status = 3;
350}
351
352message OnuSignalsFailureIndication {
353 fixed32 intf_id = 1;
354 fixed32 onu_id = 2;
355 string status = 3;
356 fixed32 inverse_bit_error_rate = 4;
357}
358
359message OnuTransmissionInterferenceWarning {
360 fixed32 intf_id = 1;
361 fixed32 onu_id = 2;
362 string status = 3;
363 fixed32 drift = 4;
364}
365
366message OnuActivationFailureIndication {
367 fixed32 intf_id = 1;
368 fixed32 onu_id = 2;
369}
370
371message OnuProcessingErrorIndication {
372 fixed32 intf_id = 1;
373 fixed32 onu_id = 2;
374}
375
376
Shad Ansari19249582018-04-30 04:31:00 +0000377message Empty {}