blob: 8fd57891fff84104251d21e625368ab94d86de18 [file] [log] [blame]
David K. Bainbridge24ff0232019-04-30 13:26:19 -07001// 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";
16
17option go_package = "github.com/opencord/voltha-protos/go/openolt";
18
19package openolt;
20import "google/api/annotations.proto";
Manikkaraj kb1a10922019-07-29 12:10:34 -040021import public "voltha_protos/tech_profile.proto";
David K. Bainbridge24ff0232019-04-30 13:26:19 -070022
23service Openolt {
24
25 rpc DisableOlt(Empty) returns (Empty) {
26 option (google.api.http) = {
27 post: "/v1/Disable"
28 body: "*"
29 };
30 }
31
32 rpc ReenableOlt(Empty) returns (Empty) {
33 option (google.api.http) = {
34 post: "/v1/Reenable"
35 body: "*"
36 };
37 }
38
39 rpc ActivateOnu(Onu) returns (Empty) {
40 option (google.api.http) = {
41 post: "/v1/EnableOnu"
42 body: "*"
43 };
44 }
45
46 rpc DeactivateOnu(Onu) returns (Empty) {
47 option (google.api.http) = {
48 post: "/v1/DisableOnu"
49 body: "*"
50 };
51 }
52
53 rpc DeleteOnu(Onu) returns (Empty) {
54 option (google.api.http) = {
55 post: "/v1/DeleteOnu"
56 body: "*"
57 };
58 }
59
60 rpc OmciMsgOut(OmciMsg) returns (Empty) {
61 option (google.api.http) = {
62 post: "/v1/OmciMsgOut"
63 body: "*"
64 };
65 }
66
67 rpc OnuPacketOut(OnuPacket) returns (Empty) {
68 option (google.api.http) = {
69 post: "/v1/OnuPacketOut"
70 body: "*"
71 };
72 }
73
74 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
75 option (google.api.http) = {
76 post: "/v1/UplinkPacketOut"
77 body: "*"
78 };
79 }
80
81 rpc FlowAdd(Flow) returns (Empty) {
82 option (google.api.http) = {
83 post: "/v1/FlowAdd"
84 body: "*"
85 };
86 }
87
88 rpc FlowRemove(Flow) returns (Empty) {
89 option (google.api.http) = {
90 post: "/v1/FlowRemove"
91 body: "*"
92 };
93 }
94
95 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
96 option (google.api.http) = {
97 post: "/v1/HeartbeatCheck"
98 body: "*"
99 };
100 }
101
102 rpc EnablePonIf(Interface) returns (Empty) {
103 option (google.api.http) = {
104 post: "/v1/EnablePonIf"
105 body: "*"
106 };
107 }
108
109 rpc DisablePonIf(Interface) returns (Empty) {
110 option (google.api.http) = {
111 post: "/v1/DisablePonIf"
112 body: "*"
113 };
114 }
115
116 rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
117 option (google.api.http) = {
118 post: "/v1/GetDeviceInfo"
119 body: "*"
120 };
121 }
122
123 rpc Reboot(Empty) returns (Empty) {
124 option (google.api.http) = {
125 post: "/v1/Reboot"
126 body: "*"
127 };
128 }
129
130 rpc CollectStatistics(Empty) returns (Empty) {
131 option (google.api.http) = {
132 post: "/v1/CollectStatistics"
133 body: "*"
134 };
135 }
136
Manikkaraj kb1a10922019-07-29 12:10:34 -0400137 rpc CreateTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
David K. Bainbridge24ff0232019-04-30 13:26:19 -0700138 option (google.api.http) = {
Manikkaraj kb1a10922019-07-29 12:10:34 -0400139 post: "/v1/CreateTrafficSchedulers"
David K. Bainbridge24ff0232019-04-30 13:26:19 -0700140 body: "*"
141 };
142 }
143
Manikkaraj kb1a10922019-07-29 12:10:34 -0400144 rpc RemoveTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
David K. Bainbridge24ff0232019-04-30 13:26:19 -0700145 option (google.api.http) = {
Manikkaraj kb1a10922019-07-29 12:10:34 -0400146 post: "/v1/RemoveTrafficSchedulers"
147 body: "*"
148 };
149 }
150
151 rpc CreateTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
152 option (google.api.http) = {
153 post: "/v1/CreateTrafficQueues"
154 body: "*"
155 };
156 }
157
158 rpc RemoveTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
159 option (google.api.http) = {
160 post: "/v1/RemoveTrafficQueues"
David K. Bainbridge24ff0232019-04-30 13:26:19 -0700161 body: "*"
162 };
163 }
164
165 rpc EnableIndication(Empty) returns (stream Indication) {}
166}
167
168message Indication {
169 oneof data {
170 OltIndication olt_ind = 1;
171 IntfIndication intf_ind = 2;
172 IntfOperIndication intf_oper_ind = 3;
173 OnuDiscIndication onu_disc_ind = 4;
174 OnuIndication onu_ind = 5;
175 OmciIndication omci_ind = 6;
176 PacketIndication pkt_ind = 7;
177 PortStatistics port_stats = 8;
178 FlowStatistics flow_stats = 9;
179 AlarmIndication alarm_ind= 10;
180 }
181}
182
183message AlarmIndication {
184 oneof data {
185 LosIndication los_ind = 1;
186 DyingGaspIndication dying_gasp_ind = 2;
187 OnuAlarmIndication onu_alarm_ind = 3;
188 OnuStartupFailureIndication onu_startup_fail_ind = 4;
189 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
190 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
191 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
192 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
193 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
194 OnuActivationFailureIndication onu_activation_fail_ind = 10;
195 OnuProcessingErrorIndication onu_processing_error_ind = 11;
196 }
197}
198
199message OltIndication {
200 string oper_state = 1; // up, down
201}
202
203message IntfIndication {
204 fixed32 intf_id = 1;
205 string oper_state = 2; // up, down
206}
207
208message OnuDiscIndication {
209 fixed32 intf_id = 1;
210 SerialNumber serial_number = 2;
211}
212
213message OnuIndication {
214 fixed32 intf_id = 1;
215 fixed32 onu_id = 2;
216 string oper_state = 3; // up, down
217 string admin_state = 5; // up, down
218 SerialNumber serial_number = 4;
219}
220
221message IntfOperIndication {
222 string type = 1; // nni, pon
223 fixed32 intf_id = 2;
224 string oper_state = 3; // up, down
225}
226
227message OmciIndication {
228 fixed32 intf_id = 1;
229 fixed32 onu_id = 2;
230 bytes pkt = 3;
231}
232
233message PacketIndication {
234 string intf_type = 5; // nni, pon, unknown
235 fixed32 intf_id = 1;
236 fixed32 gemport_id = 2;
237 fixed32 flow_id = 3;
238 fixed32 port_no = 6;
239 fixed64 cookie = 7;
240 bytes pkt = 4;
241}
242
243message Interface {
244 fixed32 intf_id = 1;
245}
246
247message Heartbeat {
248 fixed32 heartbeat_signature = 1;
249}
250
251message Onu {
252 fixed32 intf_id = 1;
253 fixed32 onu_id = 2;
254 SerialNumber serial_number = 3;
255 fixed32 pir = 4; // peak information rate assigned to onu
256}
257
258message OmciMsg {
259 fixed32 intf_id = 1;
260 fixed32 onu_id = 2;
261 bytes pkt = 3;
262}
263
264message OnuPacket {
265 fixed32 intf_id = 1;
266 fixed32 onu_id = 2;
267 fixed32 port_no = 4;
Manikkaraj kb1a10922019-07-29 12:10:34 -0400268 fixed32 gemport_id = 5;
David K. Bainbridge24ff0232019-04-30 13:26:19 -0700269 bytes pkt = 3;
270}
271
272message UplinkPacket {
273 fixed32 intf_id = 1;
274 bytes pkt = 2;
275}
276
277message DeviceInfo {
278 string vendor = 1;
279 string model = 2;
280 string hardware_version = 3;
281 string firmware_version = 4;
282 string device_id = 16;
283 string device_serial_number = 17;
284
285 // Total number of pon intf ports on the device
286 fixed32 pon_ports = 12;
287
288 // If using global per-device technology profile. To be deprecated
289 string technology = 5;
290 fixed32 onu_id_start = 6;
291 fixed32 onu_id_end = 7;
292 fixed32 alloc_id_start = 8;
293 fixed32 alloc_id_end = 9;
294 fixed32 gemport_id_start = 10;
295 fixed32 gemport_id_end = 11;
296 fixed32 flow_id_start = 13;
297 fixed32 flow_id_end = 14;
298
299 message DeviceResourceRanges {
300
301 // List of 0 or more intf_ids that use the same technology and pools.
302 // If 0 intf_ids supplied, it implies ALL interfaces
303 repeated fixed32 intf_ids = 1;
304
305 // Technology profile for this pool
306 string technology = 2;
307
308 message Pool {
309 enum PoolType {
310 ONU_ID = 0;
311 ALLOC_ID = 1;
312 GEMPORT_ID = 2;
313 FLOW_ID = 3;
314 }
315
316 enum SharingType {
317 DEDICATED_PER_INTF = 0;
318 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
319 SHARED_BY_ALL_INTF_SAME_TECH = 2; // Shared across all interfaces of the same technology used in this range
320 }
321
322 PoolType type = 1;
323 SharingType sharing = 2;
324 fixed32 start = 3; // lower bound on IDs allocated from this pool
325 fixed32 end = 4; // upper bound on IDs allocated from this pool
326 }
327 repeated Pool pools = 3;
328 }
329 repeated DeviceResourceRanges ranges = 15;
330}
331
332message Classifier {
333 fixed32 o_tpid = 1;
334 fixed32 o_vid = 2;
335 fixed32 i_tpid = 3;
336 fixed32 i_vid = 4;
337 fixed32 o_pbits = 5;
338 fixed32 i_pbits = 6;
339 fixed32 eth_type = 7;
340 bytes dst_mac = 8;
341 bytes src_mac = 9;
342 fixed32 ip_proto = 10;
343 fixed32 dst_ip = 11;
344 fixed32 src_ip = 12;
345 fixed32 src_port = 13;
346 fixed32 dst_port = 14;
347 string pkt_tag_type = 15; // untagged, single_tag, double_tag
348}
349
350message ActionCmd {
351 bool add_outer_tag = 1;
352 bool remove_outer_tag = 2;
353 bool trap_to_host = 3;
354}
355
356message Action {
357 ActionCmd cmd = 1;
358 fixed32 o_vid = 2;
359 fixed32 o_pbits = 3;
360 fixed32 o_tpid = 4;
361 fixed32 i_vid = 5;
362 fixed32 i_pbits = 6;
363 fixed32 i_tpid = 7;
364}
365
366message Flow {
367 sfixed32 access_intf_id = 1;
368 sfixed32 onu_id = 2;
369 sfixed32 uni_id = 11;
370 fixed32 flow_id = 3;
371 string flow_type = 4; // upstream, downstream, broadcast, multicast
372 sfixed32 alloc_id = 10;
373 sfixed32 network_intf_id = 5;
374 sfixed32 gemport_id = 6;
375 Classifier classifier = 7;
376 Action action = 8;
377 sfixed32 priority = 9;
378 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
379 fixed32 port_no = 13; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
380}
381
382message SerialNumber {
383 bytes vendor_id = 1;
384 bytes vendor_specific = 2;
385}
386
387message PortStatistics {
388 fixed32 intf_id = 1;
389 fixed64 rx_bytes = 2;
390 fixed64 rx_packets = 3;
391 fixed64 rx_ucast_packets = 4;
392 fixed64 rx_mcast_packets = 5;
393 fixed64 rx_bcast_packets = 6;
394 fixed64 rx_error_packets = 7;
395 fixed64 tx_bytes = 8;
396 fixed64 tx_packets = 9;
397 fixed64 tx_ucast_packets = 10;
398 fixed64 tx_mcast_packets = 11;
399 fixed64 tx_bcast_packets = 12;
400 fixed64 tx_error_packets = 13;
401 fixed64 rx_crc_errors = 14;
402 fixed64 bip_errors = 15;
403 fixed32 timestamp = 16;
404}
405
406message FlowStatistics {
407 fixed32 flow_id = 1;
408 fixed64 rx_bytes = 2;
409 fixed64 rx_packets = 3;
410 fixed64 tx_bytes = 8;
411 fixed64 tx_packets = 9;
412 fixed32 timestamp = 16;
413}
414
415message LosIndication {
416 fixed32 intf_id = 1;
417 string status = 2;
418}
419
420message DyingGaspIndication {
421 fixed32 intf_id = 1;
422 fixed32 onu_id = 2;
423 string status = 3;
424}
425
426message OnuAlarmIndication {
427 fixed32 intf_id = 1;
428 fixed32 onu_id = 2;
429 string los_status = 3;
430 string lob_status = 4;
431 string lopc_miss_status = 5;
432 string lopc_mic_error_status = 6;
433}
434
435message OnuStartupFailureIndication {
436 fixed32 intf_id = 1;
437 fixed32 onu_id = 2;
438 string status = 3;
439}
440
441message OnuSignalDegradeIndication {
442 fixed32 intf_id = 1;
443 fixed32 onu_id = 2;
444 string status = 3;
445 fixed32 inverse_bit_error_rate = 4;
446}
447
448message OnuDriftOfWindowIndication {
449 fixed32 intf_id = 1;
450 fixed32 onu_id = 2;
451 string status = 3;
452 fixed32 drift = 4;
453 fixed32 new_eqd = 5;
454}
455
456message OnuLossOfOmciChannelIndication {
457 fixed32 intf_id = 1;
458 fixed32 onu_id = 2;
459 string status = 3;
460}
461
462message OnuSignalsFailureIndication {
463 fixed32 intf_id = 1;
464 fixed32 onu_id = 2;
465 string status = 3;
466 fixed32 inverse_bit_error_rate = 4;
467}
468
469message OnuTransmissionInterferenceWarning {
470 fixed32 intf_id = 1;
471 fixed32 onu_id = 2;
472 string status = 3;
473 fixed32 drift = 4;
474}
475
476message OnuActivationFailureIndication {
477 fixed32 intf_id = 1;
478 fixed32 onu_id = 2;
479}
480
481message OnuProcessingErrorIndication {
482 fixed32 intf_id = 1;
483 fixed32 onu_id = 2;
484}
485
David K. Bainbridge24ff0232019-04-30 13:26:19 -0700486message Empty {}