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