blob: 2ee2346567116bbc6d518686984f65bf769f9d48 [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 Palpacuer65d04472018-09-06 15:53:37 -0400112 rpc CollectStatistics(Empty) returns (Empty) {
113 option (google.api.http) = {
114 post: "/v1/CollectStatistics"
115 body: "*"
116 };
117 }
118
Nicolas Palpacuer45180662018-08-02 14:01:51 -0400119 rpc Reboot(Empty) returns (Empty) {
120 option (google.api.http) = {
121 post: "/v1/Reboot"
122 body: "*"
123 };
124 }
125
Shad Ansari19249582018-04-30 04:31:00 +0000126 rpc EnableIndication(Empty) returns (stream Indication) {}
127}
128
129message Indication {
130 oneof data {
131 OltIndication olt_ind = 1;
132 IntfIndication intf_ind = 2;
133 IntfOperIndication intf_oper_ind = 3;
134 OnuDiscIndication onu_disc_ind = 4;
135 OnuIndication onu_ind = 5;
136 OmciIndication omci_ind = 6;
137 PacketIndication pkt_ind = 7;
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400138 PortStatistics port_stats = 8;
139 FlowStatistics flow_stats = 9;
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400140 AlarmIndication alarm_ind= 10;
141 }
142}
143
144message AlarmIndication {
145 oneof data {
146 LosIndication los_ind = 1;
147 DyingGaspIndication dying_gasp_ind = 2;
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400148 OnuAlarmIndication onu_alarm_ind = 3;
149 OnuStartupFailureIndication onu_startup_fail_ind = 4;
150 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
151 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
152 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
153 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
154 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
155 OnuActivationFailureIndication onu_activation_fail_ind = 10;
156 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Shad Ansari19249582018-04-30 04:31:00 +0000157 }
158}
159
160message OltIndication {
161 string oper_state = 1; // up, down
Shad Ansari19249582018-04-30 04:31:00 +0000162}
163
164message IntfIndication {
165 fixed32 intf_id = 1;
166 string oper_state = 2; // up, down
167}
168
169message OnuDiscIndication {
170 fixed32 intf_id = 1;
171 SerialNumber serial_number = 2;
172}
173
174message OnuIndication {
175 fixed32 intf_id = 1;
176 fixed32 onu_id = 2;
177 string oper_state = 3; // up, down
Shad Ansarife9d9422018-05-22 23:25:02 +0000178 string admin_state = 5; // up, down
179 SerialNumber serial_number = 4;
Shad Ansari19249582018-04-30 04:31:00 +0000180}
181
182message IntfOperIndication {
183 string type = 1; // nni, pon
184 fixed32 intf_id = 2;
185 string oper_state = 3; // up, down
186}
187
188message OmciIndication {
189 fixed32 intf_id = 1;
190 fixed32 onu_id = 2;
191 bytes pkt = 3;
192}
193
194message PacketIndication {
195 fixed32 intf_id = 1;
196 fixed32 gemport_id = 2;
197 fixed32 flow_id = 3;
198 bytes pkt = 4;
199}
200
Nicolas Palpacuer05ea0ea2018-07-06 11:47:21 -0400201message Interface {
202 fixed32 intf_id = 1;
203}
204
nick7be062f2018-05-25 17:52:56 -0400205message Heartbeat {
206 fixed32 heartbeat_signature = 1;
207}
208
Shad Ansari19249582018-04-30 04:31:00 +0000209message Onu {
210 fixed32 intf_id = 1;
211 fixed32 onu_id = 2;
212 SerialNumber serial_number = 3;
Shad Ansari06101952018-07-25 00:22:09 +0000213 fixed32 pir = 4; // peak information rate assigned to onu
Girish Gowdru1cdf6ce2018-08-27 02:43:02 -0700214 fixed32 agg_port_id = 5;
215 fixed32 sched_id = 6;
Shad Ansari19249582018-04-30 04:31:00 +0000216}
217
218message OmciMsg {
219 fixed32 intf_id = 1;
220 fixed32 onu_id = 2;
221 bytes pkt = 3;
222}
223
224message OnuPacket {
225 fixed32 intf_id = 1;
226 fixed32 onu_id = 2;
227 bytes pkt = 3;
228}
229
Nicolas Palpacuerb78def42018-06-07 12:55:26 -0400230message UplinkPacket {
231 fixed32 intf_id = 1;
232 bytes pkt = 2;
233}
234
Shad Ansari19249582018-04-30 04:31:00 +0000235message Classifier {
236 fixed32 o_tpid = 1;
237 fixed32 o_vid = 2;
238 fixed32 i_tpid = 3;
239 fixed32 i_vid = 4;
240 fixed32 o_pbits = 5;
241 fixed32 i_pbits = 6;
242 fixed32 eth_type = 7;
243 bytes dst_mac = 8;
244 bytes src_mac = 9;
245 fixed32 ip_proto = 10;
246 fixed32 dst_ip = 11;
247 fixed32 src_ip = 12;
248 fixed32 src_port = 13;
249 fixed32 dst_port = 14;
250 string pkt_tag_type = 15; // untagged, single_tag, double_tag
251}
252
253message ActionCmd {
254 bool add_outer_tag = 1;
255 bool remove_outer_tag = 2;
256 bool trap_to_host = 3;
257}
258
259message Action {
260 ActionCmd cmd = 1;
261 fixed32 o_vid = 2;
262 fixed32 o_pbits = 3;
263 fixed32 o_tpid = 4;
264 fixed32 i_vid = 5;
265 fixed32 i_pbits = 6;
266 fixed32 i_tpid = 7;
267}
268
269message Flow {
270 fixed32 access_intf_id = 1;
271 fixed32 onu_id = 2;
272 fixed32 flow_id = 3;
273 string flow_type = 4; // upstream, downstream, broadcast, multicast
274 fixed32 network_intf_id = 5;
275 fixed32 gemport_id = 6;
Girish Gowdru1cdf6ce2018-08-27 02:43:02 -0700276 fixed32 alloc_id = 10;
Shad Ansari19249582018-04-30 04:31:00 +0000277 Classifier classifier = 7;
278 Action action = 8;
Nicolas Palpacuerd6cf5aa2018-07-16 15:14:39 -0400279 fixed32 priority = 9;
Shad Ansari19249582018-04-30 04:31:00 +0000280}
281
282message SerialNumber {
283 bytes vendor_id = 1;
284 bytes vendor_specific = 2;
285}
286
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400287message PortStatistics {
288 fixed32 intf_id = 1;
289 fixed64 rx_bytes = 2;
290 fixed64 rx_packets = 3;
291 fixed64 rx_ucast_packets = 4;
292 fixed64 rx_mcast_packets = 5;
293 fixed64 rx_bcast_packets = 6;
294 fixed64 rx_error_packets = 7;
295 fixed64 tx_bytes = 8;
296 fixed64 tx_packets = 9;
297 fixed64 tx_ucast_packets = 10;
298 fixed64 tx_mcast_packets = 11;
299 fixed64 tx_bcast_packets = 12;
300 fixed64 tx_error_packets = 13;
301 fixed64 rx_crc_errors = 14;
302 fixed64 bip_errors = 15;
303 fixed32 timestamp = 16;
304}
305
306message FlowStatistics {
307 fixed32 flow_id = 1;
308 fixed64 rx_bytes = 2;
309 fixed64 rx_packets = 3;
310 fixed64 tx_bytes = 8;
311 fixed64 tx_packets = 9;
312 fixed32 timestamp = 16;
313}
314
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400315message LosIndication {
316 fixed32 intf_id = 1;
317 string status = 2;
318}
319
320message DyingGaspIndication {
321 fixed32 intf_id = 1;
322 fixed32 onu_id = 2;
323 string status = 3;
324}
325
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400326message OnuAlarmIndication {
327 fixed32 intf_id = 1;
328 fixed32 onu_id = 2;
329 string los_status = 3;
330 string lob_status = 4;
331 string lopc_miss_status = 5;
332 string lopc_mic_error_status = 6;
333}
334
335message OnuStartupFailureIndication {
336 fixed32 intf_id = 1;
337 fixed32 onu_id = 2;
338 string status = 3;
339}
340
341message OnuSignalDegradeIndication {
342 fixed32 intf_id = 1;
343 fixed32 onu_id = 2;
344 string status = 3;
345 fixed32 inverse_bit_error_rate = 4;
346}
347
348message OnuDriftOfWindowIndication {
349 fixed32 intf_id = 1;
350 fixed32 onu_id = 2;
351 string status = 3;
352 fixed32 drift = 4;
353 fixed32 new_eqd = 5;
354}
355
356message OnuLossOfOmciChannelIndication {
357 fixed32 intf_id = 1;
358 fixed32 onu_id = 2;
359 string status = 3;
360}
361
362message OnuSignalsFailureIndication {
363 fixed32 intf_id = 1;
364 fixed32 onu_id = 2;
365 string status = 3;
366 fixed32 inverse_bit_error_rate = 4;
367}
368
369message OnuTransmissionInterferenceWarning {
370 fixed32 intf_id = 1;
371 fixed32 onu_id = 2;
372 string status = 3;
373 fixed32 drift = 4;
374}
375
376message OnuActivationFailureIndication {
377 fixed32 intf_id = 1;
378 fixed32 onu_id = 2;
379}
380
381message OnuProcessingErrorIndication {
382 fixed32 intf_id = 1;
383 fixed32 onu_id = 2;
384}
385
386
Shad Ansari19249582018-04-30 04:31:00 +0000387message Empty {}