blob: 56d87f43f15aa8d0979b404afac11befd9e5785d [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 Palpacuer0f19b1a2018-06-07 17:29:31 -040063
Shad Ansari19249582018-04-30 04:31:00 +000064 rpc EnableIndication(Empty) returns (stream Indication) {}
65}
66
67message Indication {
68 oneof data {
69 OltIndication olt_ind = 1;
70 IntfIndication intf_ind = 2;
71 IntfOperIndication intf_oper_ind = 3;
72 OnuDiscIndication onu_disc_ind = 4;
73 OnuIndication onu_ind = 5;
74 OmciIndication omci_ind = 6;
75 PacketIndication pkt_ind = 7;
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040076 PortStatistics port_stats = 8;
77 FlowStatistics flow_stats = 9;
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -040078 AlarmIndication alarm_ind= 10;
79 }
80}
81
82message AlarmIndication {
83 oneof data {
84 LosIndication los_ind = 1;
85 DyingGaspIndication dying_gasp_ind = 2;
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -040086 OnuAlarmIndication onu_alarm_ind = 3;
87 OnuStartupFailureIndication onu_startup_fail_ind = 4;
88 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
89 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
90 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
91 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
92 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
93 OnuActivationFailureIndication onu_activation_fail_ind = 10;
94 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Shad Ansari19249582018-04-30 04:31:00 +000095 }
96}
97
98message OltIndication {
99 string oper_state = 1; // up, down
Shad Ansari19249582018-04-30 04:31:00 +0000100}
101
102message IntfIndication {
103 fixed32 intf_id = 1;
104 string oper_state = 2; // up, down
105}
106
107message OnuDiscIndication {
108 fixed32 intf_id = 1;
109 SerialNumber serial_number = 2;
110}
111
112message OnuIndication {
113 fixed32 intf_id = 1;
114 fixed32 onu_id = 2;
115 string oper_state = 3; // up, down
Shad Ansarife9d9422018-05-22 23:25:02 +0000116 string admin_state = 5; // up, down
117 SerialNumber serial_number = 4;
Shad Ansari19249582018-04-30 04:31:00 +0000118}
119
120message IntfOperIndication {
121 string type = 1; // nni, pon
122 fixed32 intf_id = 2;
123 string oper_state = 3; // up, down
124}
125
126message OmciIndication {
127 fixed32 intf_id = 1;
128 fixed32 onu_id = 2;
129 bytes pkt = 3;
130}
131
132message PacketIndication {
133 fixed32 intf_id = 1;
134 fixed32 gemport_id = 2;
135 fixed32 flow_id = 3;
136 bytes pkt = 4;
137}
138
nick7be062f2018-05-25 17:52:56 -0400139message Heartbeat {
140 fixed32 heartbeat_signature = 1;
141}
142
Shad Ansari19249582018-04-30 04:31:00 +0000143message Onu {
144 fixed32 intf_id = 1;
145 fixed32 onu_id = 2;
146 SerialNumber serial_number = 3;
147}
148
149message OmciMsg {
150 fixed32 intf_id = 1;
151 fixed32 onu_id = 2;
152 bytes pkt = 3;
153}
154
155message OnuPacket {
156 fixed32 intf_id = 1;
157 fixed32 onu_id = 2;
158 bytes pkt = 3;
159}
160
Nicolas Palpacuerb78def42018-06-07 12:55:26 -0400161message UplinkPacket {
162 fixed32 intf_id = 1;
163 bytes pkt = 2;
164}
165
Shad Ansari19249582018-04-30 04:31:00 +0000166message Classifier {
167 fixed32 o_tpid = 1;
168 fixed32 o_vid = 2;
169 fixed32 i_tpid = 3;
170 fixed32 i_vid = 4;
171 fixed32 o_pbits = 5;
172 fixed32 i_pbits = 6;
173 fixed32 eth_type = 7;
174 bytes dst_mac = 8;
175 bytes src_mac = 9;
176 fixed32 ip_proto = 10;
177 fixed32 dst_ip = 11;
178 fixed32 src_ip = 12;
179 fixed32 src_port = 13;
180 fixed32 dst_port = 14;
181 string pkt_tag_type = 15; // untagged, single_tag, double_tag
182}
183
184message ActionCmd {
185 bool add_outer_tag = 1;
186 bool remove_outer_tag = 2;
187 bool trap_to_host = 3;
188}
189
190message Action {
191 ActionCmd cmd = 1;
192 fixed32 o_vid = 2;
193 fixed32 o_pbits = 3;
194 fixed32 o_tpid = 4;
195 fixed32 i_vid = 5;
196 fixed32 i_pbits = 6;
197 fixed32 i_tpid = 7;
198}
199
200message Flow {
201 fixed32 access_intf_id = 1;
202 fixed32 onu_id = 2;
203 fixed32 flow_id = 3;
204 string flow_type = 4; // upstream, downstream, broadcast, multicast
205 fixed32 network_intf_id = 5;
206 fixed32 gemport_id = 6;
207 Classifier classifier = 7;
208 Action action = 8;
209}
210
211message SerialNumber {
212 bytes vendor_id = 1;
213 bytes vendor_specific = 2;
214}
215
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400216message PortStatistics {
217 fixed32 intf_id = 1;
218 fixed64 rx_bytes = 2;
219 fixed64 rx_packets = 3;
220 fixed64 rx_ucast_packets = 4;
221 fixed64 rx_mcast_packets = 5;
222 fixed64 rx_bcast_packets = 6;
223 fixed64 rx_error_packets = 7;
224 fixed64 tx_bytes = 8;
225 fixed64 tx_packets = 9;
226 fixed64 tx_ucast_packets = 10;
227 fixed64 tx_mcast_packets = 11;
228 fixed64 tx_bcast_packets = 12;
229 fixed64 tx_error_packets = 13;
230 fixed64 rx_crc_errors = 14;
231 fixed64 bip_errors = 15;
232 fixed32 timestamp = 16;
233}
234
235message FlowStatistics {
236 fixed32 flow_id = 1;
237 fixed64 rx_bytes = 2;
238 fixed64 rx_packets = 3;
239 fixed64 tx_bytes = 8;
240 fixed64 tx_packets = 9;
241 fixed32 timestamp = 16;
242}
243
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400244message LosIndication {
245 fixed32 intf_id = 1;
246 string status = 2;
247}
248
249message DyingGaspIndication {
250 fixed32 intf_id = 1;
251 fixed32 onu_id = 2;
252 string status = 3;
253}
254
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400255message OnuAlarmIndication {
256 fixed32 intf_id = 1;
257 fixed32 onu_id = 2;
258 string los_status = 3;
259 string lob_status = 4;
260 string lopc_miss_status = 5;
261 string lopc_mic_error_status = 6;
262}
263
264message OnuStartupFailureIndication {
265 fixed32 intf_id = 1;
266 fixed32 onu_id = 2;
267 string status = 3;
268}
269
270message OnuSignalDegradeIndication {
271 fixed32 intf_id = 1;
272 fixed32 onu_id = 2;
273 string status = 3;
274 fixed32 inverse_bit_error_rate = 4;
275}
276
277message OnuDriftOfWindowIndication {
278 fixed32 intf_id = 1;
279 fixed32 onu_id = 2;
280 string status = 3;
281 fixed32 drift = 4;
282 fixed32 new_eqd = 5;
283}
284
285message OnuLossOfOmciChannelIndication {
286 fixed32 intf_id = 1;
287 fixed32 onu_id = 2;
288 string status = 3;
289}
290
291message OnuSignalsFailureIndication {
292 fixed32 intf_id = 1;
293 fixed32 onu_id = 2;
294 string status = 3;
295 fixed32 inverse_bit_error_rate = 4;
296}
297
298message OnuTransmissionInterferenceWarning {
299 fixed32 intf_id = 1;
300 fixed32 onu_id = 2;
301 string status = 3;
302 fixed32 drift = 4;
303}
304
305message OnuActivationFailureIndication {
306 fixed32 intf_id = 1;
307 fixed32 onu_id = 2;
308}
309
310message OnuProcessingErrorIndication {
311 fixed32 intf_id = 1;
312 fixed32 onu_id = 2;
313}
314
315
Shad Ansari19249582018-04-30 04:31:00 +0000316message Empty {}