blob: 037684907e41b6d57dde58833e66396c66df55b6 [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
Scott Baker383964b2019-11-01 14:26:07 -070017option go_package = "github.com/opencord/voltha-protos/v2/go/openolt";
William Kurkian7c151592019-03-27 09:36:15 -040018
Zack Williams52209662019-02-07 10:15:31 -070019package openolt;
20import "google/api/annotations.proto";
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -040021import public "voltha_protos/tech_profile.proto";
Zack Williams52209662019-02-07 10:15:31 -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
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400137 rpc CreateTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700138 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400139 post: "/v1/CreateTrafficSchedulers"
Zack Williams52209662019-02-07 10:15:31 -0700140 body: "*"
141 };
142 }
143
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400144 rpc RemoveTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Zack Williams52209662019-02-07 10:15:31 -0700145 option (google.api.http) = {
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -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"
Zack Williams52209662019-02-07 10:15:31 -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;
Naga Manjunath0a734252019-11-21 19:00:23 +0530196 OnuLossOfKeySyncFailureIndication onu_loss_of_sync_fail_ind = 12;
197 OnuItuPonStatsIndication onu_itu_pon_stats_ind = 13;
Zack Williams52209662019-02-07 10:15:31 -0700198 }
199}
200
201message OltIndication {
202 string oper_state = 1; // up, down
203}
204
205message IntfIndication {
206 fixed32 intf_id = 1;
207 string oper_state = 2; // up, down
208}
209
210message OnuDiscIndication {
211 fixed32 intf_id = 1;
212 SerialNumber serial_number = 2;
213}
214
215message OnuIndication {
216 fixed32 intf_id = 1;
217 fixed32 onu_id = 2;
218 string oper_state = 3; // up, down
219 string admin_state = 5; // up, down
220 SerialNumber serial_number = 4;
221}
222
223message IntfOperIndication {
224 string type = 1; // nni, pon
225 fixed32 intf_id = 2;
226 string oper_state = 3; // up, down
227}
228
229message OmciIndication {
230 fixed32 intf_id = 1;
231 fixed32 onu_id = 2;
232 bytes pkt = 3;
233}
234
235message PacketIndication {
236 string intf_type = 5; // nni, pon, unknown
237 fixed32 intf_id = 1;
238 fixed32 gemport_id = 2;
239 fixed32 flow_id = 3;
240 fixed32 port_no = 6;
241 fixed64 cookie = 7;
242 bytes pkt = 4;
243}
244
245message Interface {
246 fixed32 intf_id = 1;
247}
248
249message Heartbeat {
250 fixed32 heartbeat_signature = 1;
251}
252
253message Onu {
254 fixed32 intf_id = 1;
255 fixed32 onu_id = 2;
256 SerialNumber serial_number = 3;
257 fixed32 pir = 4; // peak information rate assigned to onu
258}
259
260message OmciMsg {
261 fixed32 intf_id = 1;
262 fixed32 onu_id = 2;
263 bytes pkt = 3;
264}
265
266message OnuPacket {
267 fixed32 intf_id = 1;
268 fixed32 onu_id = 2;
269 fixed32 port_no = 4;
Abhilash Laxmeshwardfbb74d2019-07-23 08:03:08 -0400270 fixed32 gemport_id = 5;
Zack Williams52209662019-02-07 10:15:31 -0700271 bytes pkt = 3;
272}
273
274message UplinkPacket {
275 fixed32 intf_id = 1;
276 bytes pkt = 2;
277}
278
279message DeviceInfo {
280 string vendor = 1;
281 string model = 2;
282 string hardware_version = 3;
283 string firmware_version = 4;
284 string device_id = 16;
285 string device_serial_number = 17;
286
287 // Total number of pon intf ports on the device
288 fixed32 pon_ports = 12;
289
290 // If using global per-device technology profile. To be deprecated
291 string technology = 5;
292 fixed32 onu_id_start = 6;
293 fixed32 onu_id_end = 7;
294 fixed32 alloc_id_start = 8;
295 fixed32 alloc_id_end = 9;
296 fixed32 gemport_id_start = 10;
297 fixed32 gemport_id_end = 11;
298 fixed32 flow_id_start = 13;
299 fixed32 flow_id_end = 14;
300
301 message DeviceResourceRanges {
302
303 // List of 0 or more intf_ids that use the same technology and pools.
304 // If 0 intf_ids supplied, it implies ALL interfaces
305 repeated fixed32 intf_ids = 1;
306
307 // Technology profile for this pool
308 string technology = 2;
309
310 message Pool {
311 enum PoolType {
312 ONU_ID = 0;
313 ALLOC_ID = 1;
314 GEMPORT_ID = 2;
315 FLOW_ID = 3;
316 }
317
318 enum SharingType {
319 DEDICATED_PER_INTF = 0;
320 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
321 SHARED_BY_ALL_INTF_SAME_TECH = 2; // Shared across all interfaces of the same technology used in this range
322 }
323
324 PoolType type = 1;
325 SharingType sharing = 2;
326 fixed32 start = 3; // lower bound on IDs allocated from this pool
327 fixed32 end = 4; // upper bound on IDs allocated from this pool
328 }
329 repeated Pool pools = 3;
330 }
331 repeated DeviceResourceRanges ranges = 15;
332}
333
334message Classifier {
335 fixed32 o_tpid = 1;
336 fixed32 o_vid = 2;
337 fixed32 i_tpid = 3;
338 fixed32 i_vid = 4;
339 fixed32 o_pbits = 5;
340 fixed32 i_pbits = 6;
341 fixed32 eth_type = 7;
342 bytes dst_mac = 8;
343 bytes src_mac = 9;
344 fixed32 ip_proto = 10;
345 fixed32 dst_ip = 11;
346 fixed32 src_ip = 12;
347 fixed32 src_port = 13;
348 fixed32 dst_port = 14;
349 string pkt_tag_type = 15; // untagged, single_tag, double_tag
350}
351
352message ActionCmd {
353 bool add_outer_tag = 1;
354 bool remove_outer_tag = 2;
355 bool trap_to_host = 3;
356}
357
358message Action {
359 ActionCmd cmd = 1;
360 fixed32 o_vid = 2;
361 fixed32 o_pbits = 3;
362 fixed32 o_tpid = 4;
363 fixed32 i_vid = 5;
364 fixed32 i_pbits = 6;
365 fixed32 i_tpid = 7;
366}
367
368message Flow {
369 sfixed32 access_intf_id = 1;
370 sfixed32 onu_id = 2;
371 sfixed32 uni_id = 11;
372 fixed32 flow_id = 3;
373 string flow_type = 4; // upstream, downstream, broadcast, multicast
374 sfixed32 alloc_id = 10;
375 sfixed32 network_intf_id = 5;
376 sfixed32 gemport_id = 6;
377 Classifier classifier = 7;
378 Action action = 8;
379 sfixed32 priority = 9;
380 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
381 fixed32 port_no = 13; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
382}
383
384message SerialNumber {
385 bytes vendor_id = 1;
386 bytes vendor_specific = 2;
387}
388
389message PortStatistics {
390 fixed32 intf_id = 1;
391 fixed64 rx_bytes = 2;
392 fixed64 rx_packets = 3;
393 fixed64 rx_ucast_packets = 4;
394 fixed64 rx_mcast_packets = 5;
395 fixed64 rx_bcast_packets = 6;
396 fixed64 rx_error_packets = 7;
397 fixed64 tx_bytes = 8;
398 fixed64 tx_packets = 9;
399 fixed64 tx_ucast_packets = 10;
400 fixed64 tx_mcast_packets = 11;
401 fixed64 tx_bcast_packets = 12;
402 fixed64 tx_error_packets = 13;
403 fixed64 rx_crc_errors = 14;
404 fixed64 bip_errors = 15;
405 fixed32 timestamp = 16;
406}
407
408message FlowStatistics {
409 fixed32 flow_id = 1;
410 fixed64 rx_bytes = 2;
411 fixed64 rx_packets = 3;
412 fixed64 tx_bytes = 8;
413 fixed64 tx_packets = 9;
414 fixed32 timestamp = 16;
415}
416
417message LosIndication {
418 fixed32 intf_id = 1;
419 string status = 2;
420}
421
422message DyingGaspIndication {
423 fixed32 intf_id = 1;
424 fixed32 onu_id = 2;
425 string status = 3;
426}
427
428message OnuAlarmIndication {
429 fixed32 intf_id = 1;
430 fixed32 onu_id = 2;
431 string los_status = 3;
432 string lob_status = 4;
433 string lopc_miss_status = 5;
434 string lopc_mic_error_status = 6;
Naga Manjunath0a734252019-11-21 19:00:23 +0530435 string lofi_status = 7;
436 string loami_status = 8;
Zack Williams52209662019-02-07 10:15:31 -0700437}
438
439message OnuStartupFailureIndication {
440 fixed32 intf_id = 1;
441 fixed32 onu_id = 2;
442 string status = 3;
443}
444
445message OnuSignalDegradeIndication {
446 fixed32 intf_id = 1;
447 fixed32 onu_id = 2;
448 string status = 3;
449 fixed32 inverse_bit_error_rate = 4;
450}
451
452message OnuDriftOfWindowIndication {
453 fixed32 intf_id = 1;
454 fixed32 onu_id = 2;
455 string status = 3;
456 fixed32 drift = 4;
457 fixed32 new_eqd = 5;
458}
459
460message OnuLossOfOmciChannelIndication {
461 fixed32 intf_id = 1;
462 fixed32 onu_id = 2;
463 string status = 3;
464}
465
466message OnuSignalsFailureIndication {
467 fixed32 intf_id = 1;
468 fixed32 onu_id = 2;
469 string status = 3;
470 fixed32 inverse_bit_error_rate = 4;
471}
472
473message OnuTransmissionInterferenceWarning {
474 fixed32 intf_id = 1;
475 fixed32 onu_id = 2;
476 string status = 3;
477 fixed32 drift = 4;
478}
479
480message OnuActivationFailureIndication {
481 fixed32 intf_id = 1;
482 fixed32 onu_id = 2;
Naga Manjunath0a734252019-11-21 19:00:23 +0530483 fixed32 fail_reason = 3;
484}
485
486message OnuLossOfKeySyncFailureIndication {
487 fixed32 intf_id = 1;
488 fixed32 onu_id = 2;
489 string status = 3;
490}
491
492message OnuItuPonStatsIndication{
493 fixed32 intf_id = 1;
494 fixed32 onu_id = 2;
495 fixed32 rdi_errors = 3;
Zack Williams52209662019-02-07 10:15:31 -0700496}
497
498message OnuProcessingErrorIndication {
499 fixed32 intf_id = 1;
500 fixed32 onu_id = 2;
501}
502
Zack Williams52209662019-02-07 10:15:31 -0700503message Empty {}