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