blob: 11407484b305c622d924cfa7fbe6652c02347125 [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
21 rpc ActivateOnu(Onu) returns (Empty) {
22 option (google.api.http) = {
23 post: "/v1/EnableOnu"
24 body: "*"
25 };
26 }
27
Jonathan Davis70c21812018-07-19 15:32:10 -040028 rpc DeactivateOnu(Onu) returns (Empty) {
29 option (google.api.http) = {
30 post: "/v1/DisableOnu"
31 body: "*"
32 };
33 }
34
35 rpc DeleteOnu(Onu) returns (Empty) {
36 option (google.api.http) = {
37 post: "/v1/DeleteOnu"
38 body: "*"
39 };
40 }
41
Shad Ansari19249582018-04-30 04:31:00 +000042 rpc OmciMsgOut(OmciMsg) returns (Empty) {
43 option (google.api.http) = {
44 post: "/v1/OmciMsgOut"
45 body: "*"
46 };
47 }
48
49 rpc OnuPacketOut(OnuPacket) returns (Empty) {
50 option (google.api.http) = {
51 post: "/v1/OnuPacketOut"
52 body: "*"
53 };
54 }
55
Nicolas Palpacuerb78def42018-06-07 12:55:26 -040056 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
57 option (google.api.http) = {
58 post: "/v1/UplinkPacketOut"
59 body: "*"
60 };
61 }
62
Shad Ansari19249582018-04-30 04:31:00 +000063 rpc FlowAdd(Flow) returns (Empty) {
64 option (google.api.http) = {
65 post: "/v1/FlowAdd"
66 body: "*"
67 };
68 }
69
nick7be062f2018-05-25 17:52:56 -040070 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
71 option (google.api.http) = {
72 post: "/v1/HeartbeatCheck"
73 body: "*"
74 };
75 }
76
Nicolas Palpacuer05ea0ea2018-07-06 11:47:21 -040077 rpc EnablePonIf(Interface) returns (Empty) {
78 option (google.api.http) = {
79 post: "/v1/EnablePonIf"
80 body: "*"
81 };
82 }
83
84 rpc DisablePonIf(Interface) returns (Empty) {
85 option (google.api.http) = {
86 post: "/v1/DisablePonIf"
87 body: "*"
88 };
89 }
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040090
Shad Ansari19249582018-04-30 04:31:00 +000091 rpc EnableIndication(Empty) returns (stream Indication) {}
92}
93
94message Indication {
95 oneof data {
96 OltIndication olt_ind = 1;
97 IntfIndication intf_ind = 2;
98 IntfOperIndication intf_oper_ind = 3;
99 OnuDiscIndication onu_disc_ind = 4;
100 OnuIndication onu_ind = 5;
101 OmciIndication omci_ind = 6;
102 PacketIndication pkt_ind = 7;
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400103 PortStatistics port_stats = 8;
104 FlowStatistics flow_stats = 9;
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400105 AlarmIndication alarm_ind= 10;
106 }
107}
108
109message AlarmIndication {
110 oneof data {
111 LosIndication los_ind = 1;
112 DyingGaspIndication dying_gasp_ind = 2;
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400113 OnuAlarmIndication onu_alarm_ind = 3;
114 OnuStartupFailureIndication onu_startup_fail_ind = 4;
115 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
116 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
117 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
118 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
119 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
120 OnuActivationFailureIndication onu_activation_fail_ind = 10;
121 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Shad Ansari19249582018-04-30 04:31:00 +0000122 }
123}
124
125message OltIndication {
126 string oper_state = 1; // up, down
Shad Ansari19249582018-04-30 04:31:00 +0000127}
128
129message IntfIndication {
130 fixed32 intf_id = 1;
131 string oper_state = 2; // up, down
132}
133
134message OnuDiscIndication {
135 fixed32 intf_id = 1;
136 SerialNumber serial_number = 2;
137}
138
139message OnuIndication {
140 fixed32 intf_id = 1;
141 fixed32 onu_id = 2;
142 string oper_state = 3; // up, down
Shad Ansarife9d9422018-05-22 23:25:02 +0000143 string admin_state = 5; // up, down
144 SerialNumber serial_number = 4;
Shad Ansari19249582018-04-30 04:31:00 +0000145}
146
147message IntfOperIndication {
148 string type = 1; // nni, pon
149 fixed32 intf_id = 2;
150 string oper_state = 3; // up, down
151}
152
153message OmciIndication {
154 fixed32 intf_id = 1;
155 fixed32 onu_id = 2;
156 bytes pkt = 3;
157}
158
159message PacketIndication {
160 fixed32 intf_id = 1;
161 fixed32 gemport_id = 2;
162 fixed32 flow_id = 3;
163 bytes pkt = 4;
164}
165
Nicolas Palpacuer05ea0ea2018-07-06 11:47:21 -0400166message Interface {
167 fixed32 intf_id = 1;
168}
169
nick7be062f2018-05-25 17:52:56 -0400170message Heartbeat {
171 fixed32 heartbeat_signature = 1;
172}
173
Shad Ansari19249582018-04-30 04:31:00 +0000174message Onu {
175 fixed32 intf_id = 1;
176 fixed32 onu_id = 2;
177 SerialNumber serial_number = 3;
178}
179
180message OmciMsg {
181 fixed32 intf_id = 1;
182 fixed32 onu_id = 2;
183 bytes pkt = 3;
184}
185
186message OnuPacket {
187 fixed32 intf_id = 1;
188 fixed32 onu_id = 2;
189 bytes pkt = 3;
190}
191
Nicolas Palpacuerb78def42018-06-07 12:55:26 -0400192message UplinkPacket {
193 fixed32 intf_id = 1;
194 bytes pkt = 2;
195}
196
Shad Ansari19249582018-04-30 04:31:00 +0000197message Classifier {
198 fixed32 o_tpid = 1;
199 fixed32 o_vid = 2;
200 fixed32 i_tpid = 3;
201 fixed32 i_vid = 4;
202 fixed32 o_pbits = 5;
203 fixed32 i_pbits = 6;
204 fixed32 eth_type = 7;
205 bytes dst_mac = 8;
206 bytes src_mac = 9;
207 fixed32 ip_proto = 10;
208 fixed32 dst_ip = 11;
209 fixed32 src_ip = 12;
210 fixed32 src_port = 13;
211 fixed32 dst_port = 14;
212 string pkt_tag_type = 15; // untagged, single_tag, double_tag
213}
214
215message ActionCmd {
216 bool add_outer_tag = 1;
217 bool remove_outer_tag = 2;
218 bool trap_to_host = 3;
219}
220
221message Action {
222 ActionCmd cmd = 1;
223 fixed32 o_vid = 2;
224 fixed32 o_pbits = 3;
225 fixed32 o_tpid = 4;
226 fixed32 i_vid = 5;
227 fixed32 i_pbits = 6;
228 fixed32 i_tpid = 7;
229}
230
231message Flow {
232 fixed32 access_intf_id = 1;
233 fixed32 onu_id = 2;
234 fixed32 flow_id = 3;
235 string flow_type = 4; // upstream, downstream, broadcast, multicast
236 fixed32 network_intf_id = 5;
237 fixed32 gemport_id = 6;
238 Classifier classifier = 7;
239 Action action = 8;
Nicolas Palpacuerd6cf5aa2018-07-16 15:14:39 -0400240 fixed32 priority = 9;
Shad Ansari19249582018-04-30 04:31:00 +0000241}
242
243message SerialNumber {
244 bytes vendor_id = 1;
245 bytes vendor_specific = 2;
246}
247
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400248message PortStatistics {
249 fixed32 intf_id = 1;
250 fixed64 rx_bytes = 2;
251 fixed64 rx_packets = 3;
252 fixed64 rx_ucast_packets = 4;
253 fixed64 rx_mcast_packets = 5;
254 fixed64 rx_bcast_packets = 6;
255 fixed64 rx_error_packets = 7;
256 fixed64 tx_bytes = 8;
257 fixed64 tx_packets = 9;
258 fixed64 tx_ucast_packets = 10;
259 fixed64 tx_mcast_packets = 11;
260 fixed64 tx_bcast_packets = 12;
261 fixed64 tx_error_packets = 13;
262 fixed64 rx_crc_errors = 14;
263 fixed64 bip_errors = 15;
264 fixed32 timestamp = 16;
265}
266
267message FlowStatistics {
268 fixed32 flow_id = 1;
269 fixed64 rx_bytes = 2;
270 fixed64 rx_packets = 3;
271 fixed64 tx_bytes = 8;
272 fixed64 tx_packets = 9;
273 fixed32 timestamp = 16;
274}
275
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400276message LosIndication {
277 fixed32 intf_id = 1;
278 string status = 2;
279}
280
281message DyingGaspIndication {
282 fixed32 intf_id = 1;
283 fixed32 onu_id = 2;
284 string status = 3;
285}
286
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400287message OnuAlarmIndication {
288 fixed32 intf_id = 1;
289 fixed32 onu_id = 2;
290 string los_status = 3;
291 string lob_status = 4;
292 string lopc_miss_status = 5;
293 string lopc_mic_error_status = 6;
294}
295
296message OnuStartupFailureIndication {
297 fixed32 intf_id = 1;
298 fixed32 onu_id = 2;
299 string status = 3;
300}
301
302message OnuSignalDegradeIndication {
303 fixed32 intf_id = 1;
304 fixed32 onu_id = 2;
305 string status = 3;
306 fixed32 inverse_bit_error_rate = 4;
307}
308
309message OnuDriftOfWindowIndication {
310 fixed32 intf_id = 1;
311 fixed32 onu_id = 2;
312 string status = 3;
313 fixed32 drift = 4;
314 fixed32 new_eqd = 5;
315}
316
317message OnuLossOfOmciChannelIndication {
318 fixed32 intf_id = 1;
319 fixed32 onu_id = 2;
320 string status = 3;
321}
322
323message OnuSignalsFailureIndication {
324 fixed32 intf_id = 1;
325 fixed32 onu_id = 2;
326 string status = 3;
327 fixed32 inverse_bit_error_rate = 4;
328}
329
330message OnuTransmissionInterferenceWarning {
331 fixed32 intf_id = 1;
332 fixed32 onu_id = 2;
333 string status = 3;
334 fixed32 drift = 4;
335}
336
337message OnuActivationFailureIndication {
338 fixed32 intf_id = 1;
339 fixed32 onu_id = 2;
340}
341
342message OnuProcessingErrorIndication {
343 fixed32 intf_id = 1;
344 fixed32 onu_id = 2;
345}
346
347
Shad Ansari19249582018-04-30 04:31:00 +0000348message Empty {}