blob: c4d4fd00e6a80b952754b7b20dd6fde715bbf000 [file] [log] [blame]
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +09001// 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
Keita NISHIMOTO26dab092018-07-06 09:52:45 +090021 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
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +090035 rpc ActivateOnu(Onu) returns (Empty) {
36 option (google.api.http) = {
37 post: "/v1/EnableOnu"
38 body: "*"
39 };
40 }
41
Keita NISHIMOTO26dab092018-07-06 09:52:45 +090042 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
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +090056 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
Keita NISHIMOTO26dab092018-07-06 09:52:45 +090070 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
71 option (google.api.http) = {
72 post: "/v1/UplinkPacketOut"
73 body: "*"
74 };
75 }
76
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +090077 rpc FlowAdd(Flow) returns (Empty) {
78 option (google.api.http) = {
79 post: "/v1/FlowAdd"
80 body: "*"
81 };
82 }
83
84 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
85 option (google.api.http) = {
86 post: "/v1/HeartbeatCheck"
87 body: "*"
88 };
89 }
90
Keita NISHIMOTO26dab092018-07-06 09:52:45 +090091 rpc EnablePonIf(Interface) returns (Empty) {
92 option (google.api.http) = {
93 post: "/v1/EnablePonIf"
94 body: "*"
95 };
96 }
97
98 rpc DisablePonIf(Interface) returns (Empty) {
99 option (google.api.http) = {
100 post: "/v1/DisablePonIf"
101 body: "*"
102 };
103 }
104
105 rpc Reboot(Empty) returns (Empty) {
106 option (google.api.http) = {
107 post: "/v1/Reboot"
108 body: "*"
109 };
110 }
111
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900112 rpc EnableIndication(Empty) returns (stream Indication) {}
113}
114
115message Indication {
116 oneof data {
117 OltIndication olt_ind = 1;
118 IntfIndication intf_ind = 2;
119 IntfOperIndication intf_oper_ind = 3;
120 OnuDiscIndication onu_disc_ind = 4;
121 OnuIndication onu_ind = 5;
122 OmciIndication omci_ind = 6;
123 PacketIndication pkt_ind = 7;
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900124 PortStatistics port_stats = 8;
125 FlowStatistics flow_stats = 9;
126 AlarmIndication alarm_ind= 10;
127 }
128}
129
130message AlarmIndication {
131 oneof data {
132 LosIndication los_ind = 1;
133 DyingGaspIndication dying_gasp_ind = 2;
134 OnuAlarmIndication onu_alarm_ind = 3;
135 OnuStartupFailureIndication onu_startup_fail_ind = 4;
136 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
137 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
138 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
139 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
140 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
141 OnuActivationFailureIndication onu_activation_fail_ind = 10;
142 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900143 }
144}
145
146message OltIndication {
147 string oper_state = 1; // up, down
148}
149
150message IntfIndication {
151 fixed32 intf_id = 1;
152 string oper_state = 2; // up, down
153}
154
155message OnuDiscIndication {
156 fixed32 intf_id = 1;
157 SerialNumber serial_number = 2;
158}
159
160message OnuIndication {
161 fixed32 intf_id = 1;
162 fixed32 onu_id = 2;
163 string oper_state = 3; // up, down
164 string admin_state = 5; // up, down
165 SerialNumber serial_number = 4;
166}
167
168message IntfOperIndication {
169 string type = 1; // nni, pon
170 fixed32 intf_id = 2;
171 string oper_state = 3; // up, down
172}
173
174message OmciIndication {
175 fixed32 intf_id = 1;
176 fixed32 onu_id = 2;
177 bytes pkt = 3;
178}
179
180message PacketIndication {
181 fixed32 intf_id = 1;
182 fixed32 gemport_id = 2;
183 fixed32 flow_id = 3;
184 bytes pkt = 4;
185}
186
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900187message Interface {
188 fixed32 intf_id = 1;
189}
190
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900191message Heartbeat {
192 fixed32 heartbeat_signature = 1;
193}
194
195message Onu {
196 fixed32 intf_id = 1;
197 fixed32 onu_id = 2;
198 SerialNumber serial_number = 3;
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900199 fixed32 pir = 4; // peak information rate assigned to onu
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900200}
201
202message OmciMsg {
203 fixed32 intf_id = 1;
204 fixed32 onu_id = 2;
205 bytes pkt = 3;
206}
207
208message OnuPacket {
209 fixed32 intf_id = 1;
210 fixed32 onu_id = 2;
211 bytes pkt = 3;
212}
213
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900214message UplinkPacket {
215 fixed32 intf_id = 1;
216 bytes pkt = 2;
217}
218
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900219message Classifier {
220 fixed32 o_tpid = 1;
221 fixed32 o_vid = 2;
222 fixed32 i_tpid = 3;
223 fixed32 i_vid = 4;
224 fixed32 o_pbits = 5;
225 fixed32 i_pbits = 6;
226 fixed32 eth_type = 7;
227 bytes dst_mac = 8;
228 bytes src_mac = 9;
229 fixed32 ip_proto = 10;
230 fixed32 dst_ip = 11;
231 fixed32 src_ip = 12;
232 fixed32 src_port = 13;
233 fixed32 dst_port = 14;
234 string pkt_tag_type = 15; // untagged, single_tag, double_tag
235}
236
237message ActionCmd {
238 bool add_outer_tag = 1;
239 bool remove_outer_tag = 2;
240 bool trap_to_host = 3;
241}
242
243message Action {
244 ActionCmd cmd = 1;
245 fixed32 o_vid = 2;
246 fixed32 o_pbits = 3;
247 fixed32 o_tpid = 4;
248 fixed32 i_vid = 5;
249 fixed32 i_pbits = 6;
250 fixed32 i_tpid = 7;
251}
252
253message Flow {
254 fixed32 access_intf_id = 1;
255 fixed32 onu_id = 2;
256 fixed32 flow_id = 3;
257 string flow_type = 4; // upstream, downstream, broadcast, multicast
258 fixed32 network_intf_id = 5;
259 fixed32 gemport_id = 6;
260 Classifier classifier = 7;
261 Action action = 8;
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900262 fixed32 priority = 9;
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900263}
264
265message SerialNumber {
266 bytes vendor_id = 1;
267 bytes vendor_specific = 2;
268}
269
Keita NISHIMOTO26dab092018-07-06 09:52:45 +0900270message PortStatistics {
271 fixed32 intf_id = 1;
272 fixed64 rx_bytes = 2;
273 fixed64 rx_packets = 3;
274 fixed64 rx_ucast_packets = 4;
275 fixed64 rx_mcast_packets = 5;
276 fixed64 rx_bcast_packets = 6;
277 fixed64 rx_error_packets = 7;
278 fixed64 tx_bytes = 8;
279 fixed64 tx_packets = 9;
280 fixed64 tx_ucast_packets = 10;
281 fixed64 tx_mcast_packets = 11;
282 fixed64 tx_bcast_packets = 12;
283 fixed64 tx_error_packets = 13;
284 fixed64 rx_crc_errors = 14;
285 fixed64 bip_errors = 15;
286 fixed32 timestamp = 16;
287}
288
289message FlowStatistics {
290 fixed32 flow_id = 1;
291 fixed64 rx_bytes = 2;
292 fixed64 rx_packets = 3;
293 fixed64 tx_bytes = 8;
294 fixed64 tx_packets = 9;
295 fixed32 timestamp = 16;
296}
297
298message LosIndication {
299 fixed32 intf_id = 1;
300 string status = 2;
301}
302
303message DyingGaspIndication {
304 fixed32 intf_id = 1;
305 fixed32 onu_id = 2;
306 string status = 3;
307}
308
309message OnuAlarmIndication {
310 fixed32 intf_id = 1;
311 fixed32 onu_id = 2;
312 string los_status = 3;
313 string lob_status = 4;
314 string lopc_miss_status = 5;
315 string lopc_mic_error_status = 6;
316}
317
318message OnuStartupFailureIndication {
319 fixed32 intf_id = 1;
320 fixed32 onu_id = 2;
321 string status = 3;
322}
323
324message OnuSignalDegradeIndication {
325 fixed32 intf_id = 1;
326 fixed32 onu_id = 2;
327 string status = 3;
328 fixed32 inverse_bit_error_rate = 4;
329}
330
331message OnuDriftOfWindowIndication {
332 fixed32 intf_id = 1;
333 fixed32 onu_id = 2;
334 string status = 3;
335 fixed32 drift = 4;
336 fixed32 new_eqd = 5;
337}
338
339message OnuLossOfOmciChannelIndication {
340 fixed32 intf_id = 1;
341 fixed32 onu_id = 2;
342 string status = 3;
343}
344
345message OnuSignalsFailureIndication {
346 fixed32 intf_id = 1;
347 fixed32 onu_id = 2;
348 string status = 3;
349 fixed32 inverse_bit_error_rate = 4;
350}
351
352message OnuTransmissionInterferenceWarning {
353 fixed32 intf_id = 1;
354 fixed32 onu_id = 2;
355 string status = 3;
356 fixed32 drift = 4;
357}
358
359message OnuActivationFailureIndication {
360 fixed32 intf_id = 1;
361 fixed32 onu_id = 2;
362}
363
364message OnuProcessingErrorIndication {
365 fixed32 intf_id = 1;
366 fixed32 onu_id = 2;
367}
368
369
Keita NISHIMOTOd771cd12018-06-07 08:37:24 +0900370message Empty {}