blob: f87d8a40af393fab0b4eff892e0566b3e841b8cd [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";
Girish Gowdruc8ed2ef2019-02-13 08:18:44 -080018import "tech_profile.proto";
Shad Ansari19249582018-04-30 04:31:00 +000019
20service Openolt {
21
Nicolas Palpacuere3fc0d22018-08-02 16:51:05 -040022 rpc DisableOlt(Empty) returns (Empty) {
23 option (google.api.http) = {
24 post: "/v1/Disable"
25 body: "*"
26 };
27 }
28
29 rpc ReenableOlt(Empty) returns (Empty) {
30 option (google.api.http) = {
31 post: "/v1/Reenable"
32 body: "*"
33 };
34 }
35
Shad Ansari19249582018-04-30 04:31:00 +000036 rpc ActivateOnu(Onu) returns (Empty) {
37 option (google.api.http) = {
38 post: "/v1/EnableOnu"
39 body: "*"
40 };
41 }
42
Jonathan Davis70c21812018-07-19 15:32:10 -040043 rpc DeactivateOnu(Onu) returns (Empty) {
44 option (google.api.http) = {
45 post: "/v1/DisableOnu"
46 body: "*"
47 };
48 }
49
50 rpc DeleteOnu(Onu) returns (Empty) {
51 option (google.api.http) = {
52 post: "/v1/DeleteOnu"
53 body: "*"
54 };
55 }
56
Shad Ansari19249582018-04-30 04:31:00 +000057 rpc OmciMsgOut(OmciMsg) returns (Empty) {
58 option (google.api.http) = {
59 post: "/v1/OmciMsgOut"
60 body: "*"
61 };
62 }
63
64 rpc OnuPacketOut(OnuPacket) returns (Empty) {
65 option (google.api.http) = {
66 post: "/v1/OnuPacketOut"
67 body: "*"
68 };
69 }
70
Nicolas Palpacuerb78def42018-06-07 12:55:26 -040071 rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
72 option (google.api.http) = {
73 post: "/v1/UplinkPacketOut"
74 body: "*"
75 };
76 }
77
Shad Ansari19249582018-04-30 04:31:00 +000078 rpc FlowAdd(Flow) returns (Empty) {
79 option (google.api.http) = {
80 post: "/v1/FlowAdd"
81 body: "*"
82 };
83 }
84
Nicolas Palpacueredfaa0c2018-07-05 15:05:27 -040085 rpc FlowRemove(Flow) returns (Empty) {
86 option (google.api.http) = {
87 post: "/v1/FlowRemove"
88 body: "*"
89 };
90 }
91
nick7be062f2018-05-25 17:52:56 -040092 rpc HeartbeatCheck(Empty) returns (Heartbeat) {
93 option (google.api.http) = {
94 post: "/v1/HeartbeatCheck"
95 body: "*"
96 };
97 }
98
Nicolas Palpacuer05ea0ea2018-07-06 11:47:21 -040099 rpc EnablePonIf(Interface) returns (Empty) {
100 option (google.api.http) = {
101 post: "/v1/EnablePonIf"
102 body: "*"
103 };
104 }
105
106 rpc DisablePonIf(Interface) returns (Empty) {
107 option (google.api.http) = {
108 post: "/v1/DisablePonIf"
109 body: "*"
110 };
111 }
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400112
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400113 rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
114 option (google.api.http) = {
115 post: "/v1/GetDeviceInfo"
116 body: "*"
117 };
118 }
119
Nicolas Palpacuer45180662018-08-02 14:01:51 -0400120 rpc Reboot(Empty) returns (Empty) {
121 option (google.api.http) = {
122 post: "/v1/Reboot"
123 body: "*"
124 };
125 }
126
Shad Ansari39739bc2018-09-13 21:38:37 +0000127 rpc CollectStatistics(Empty) returns (Empty) {
128 option (google.api.http) = {
129 post: "/v1/CollectStatistics"
130 body: "*"
131 };
132 }
133
Girish Gowdruc8ed2ef2019-02-13 08:18:44 -0800134 rpc CreateTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700135 option (google.api.http) = {
Girish Gowdruc8ed2ef2019-02-13 08:18:44 -0800136 post: "/v1/CreateTrafficSchedulers"
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700137 body: "*"
138 };
139 }
140
Girish Gowdruc8ed2ef2019-02-13 08:18:44 -0800141 rpc RemoveTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700142 option (google.api.http) = {
Girish Gowdruc8ed2ef2019-02-13 08:18:44 -0800143 post: "/v1/RemoveTrafficSchedulers"
144 body: "*"
145 };
146 }
147
148 rpc CreateTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
149 option (google.api.http) = {
150 post: "/v1/CreateTrafficQueues"
151 body: "*"
152 };
153 }
154
155 rpc RemoveTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
156 option (google.api.http) = {
157 post: "/v1/RemoveTrafficQueues"
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700158 body: "*"
159 };
160 }
161
Shad Ansari19249582018-04-30 04:31:00 +0000162 rpc EnableIndication(Empty) returns (stream Indication) {}
163}
164
165message Indication {
166 oneof data {
167 OltIndication olt_ind = 1;
168 IntfIndication intf_ind = 2;
169 IntfOperIndication intf_oper_ind = 3;
170 OnuDiscIndication onu_disc_ind = 4;
171 OnuIndication onu_ind = 5;
172 OmciIndication omci_ind = 6;
173 PacketIndication pkt_ind = 7;
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400174 PortStatistics port_stats = 8;
175 FlowStatistics flow_stats = 9;
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400176 AlarmIndication alarm_ind= 10;
177 }
178}
179
180message AlarmIndication {
181 oneof data {
182 LosIndication los_ind = 1;
183 DyingGaspIndication dying_gasp_ind = 2;
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400184 OnuAlarmIndication onu_alarm_ind = 3;
185 OnuStartupFailureIndication onu_startup_fail_ind = 4;
186 OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
187 OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
188 OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
189 OnuSignalsFailureIndication onu_signals_fail_ind = 8;
190 OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
191 OnuActivationFailureIndication onu_activation_fail_ind = 10;
192 OnuProcessingErrorIndication onu_processing_error_ind = 11;
Shad Ansari19249582018-04-30 04:31:00 +0000193 }
194}
195
196message OltIndication {
197 string oper_state = 1; // up, down
Shad Ansari19249582018-04-30 04:31:00 +0000198}
199
200message IntfIndication {
201 fixed32 intf_id = 1;
202 string oper_state = 2; // up, down
203}
204
205message OnuDiscIndication {
206 fixed32 intf_id = 1;
207 SerialNumber serial_number = 2;
208}
209
210message OnuIndication {
211 fixed32 intf_id = 1;
212 fixed32 onu_id = 2;
213 string oper_state = 3; // up, down
Shad Ansarife9d9422018-05-22 23:25:02 +0000214 string admin_state = 5; // up, down
215 SerialNumber serial_number = 4;
Shad Ansari19249582018-04-30 04:31:00 +0000216}
217
218message IntfOperIndication {
219 string type = 1; // nni, pon
220 fixed32 intf_id = 2;
221 string oper_state = 3; // up, down
222}
223
224message OmciIndication {
225 fixed32 intf_id = 1;
226 fixed32 onu_id = 2;
227 bytes pkt = 3;
228}
229
230message PacketIndication {
Shad Ansariebc80362018-09-30 09:33:35 +0000231 string intf_type = 5; // nni, pon, unknown
Shad Ansari19249582018-04-30 04:31:00 +0000232 fixed32 intf_id = 1;
233 fixed32 gemport_id = 2;
234 fixed32 flow_id = 3;
Craig Lutgen967a1d02018-11-27 10:41:51 -0600235 fixed32 port_no = 6;
236 fixed64 cookie = 7;
Shad Ansari19249582018-04-30 04:31:00 +0000237 bytes pkt = 4;
238}
239
Nicolas Palpacuer05ea0ea2018-07-06 11:47:21 -0400240message Interface {
241 fixed32 intf_id = 1;
242}
243
nick7be062f2018-05-25 17:52:56 -0400244message Heartbeat {
245 fixed32 heartbeat_signature = 1;
246}
247
Shad Ansari19249582018-04-30 04:31:00 +0000248message Onu {
249 fixed32 intf_id = 1;
250 fixed32 onu_id = 2;
251 SerialNumber serial_number = 3;
Shad Ansari06101952018-07-25 00:22:09 +0000252 fixed32 pir = 4; // peak information rate assigned to onu
Shad Ansari19249582018-04-30 04:31:00 +0000253}
254
255message OmciMsg {
256 fixed32 intf_id = 1;
257 fixed32 onu_id = 2;
258 bytes pkt = 3;
259}
260
261message OnuPacket {
262 fixed32 intf_id = 1;
263 fixed32 onu_id = 2;
Craig Lutgenecd353a2018-12-12 22:33:17 -0600264 fixed32 port_no = 4;
Girish Gowdruc8ed2ef2019-02-13 08:18:44 -0800265 fixed32 gemport_id = 5;
Shad Ansari19249582018-04-30 04:31:00 +0000266 bytes pkt = 3;
267}
268
Nicolas Palpacuerb78def42018-06-07 12:55:26 -0400269message UplinkPacket {
270 fixed32 intf_id = 1;
271 bytes pkt = 2;
Jason Huangd33b4d82019-05-15 18:22:57 +0800272 fixed32 flow_id = 3;
Nicolas Palpacuerb78def42018-06-07 12:55:26 -0400273}
274
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400275message DeviceInfo {
276 string vendor = 1;
277 string model = 2;
278 string hardware_version = 3;
279 string firmware_version = 4;
Craig Lutgen967a1d02018-11-27 10:41:51 -0600280 string device_id = 16;
281 string device_serial_number = 17;
Craig Lutgene4a202f2018-10-16 17:19:30 -0500282
283 // Total number of pon intf ports on the device
284 fixed32 pon_ports = 12;
285
286 // If using global per-device technology profile. To be deprecated
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400287 string technology = 5;
288 fixed32 onu_id_start = 6;
289 fixed32 onu_id_end = 7;
290 fixed32 alloc_id_start = 8;
291 fixed32 alloc_id_end = 9;
292 fixed32 gemport_id_start = 10;
293 fixed32 gemport_id_end = 11;
Craig Lutgene4a202f2018-10-16 17:19:30 -0500294 fixed32 flow_id_start = 13;
295 fixed32 flow_id_end = 14;
296
297 message DeviceResourceRanges {
298
299 // List of 0 or more intf_ids that use the same technology and pools.
300 // If 0 intf_ids supplied, it implies ALL interfaces
301 repeated fixed32 intf_ids = 1;
302
303 // Technology profile for this pool
304 string technology = 2;
305
306 message Pool {
307 enum PoolType {
308 ONU_ID = 0;
309 ALLOC_ID = 1;
310 GEMPORT_ID = 2;
311 FLOW_ID = 3;
312 }
313
314 enum SharingType {
315 DEDICATED_PER_INTF = 0;
Girish Gowdru7c4ec2d2018-10-25 00:29:54 -0700316 SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
Craig Lutgenb2601f02018-10-23 13:04:31 -0500317 SHARED_BY_ALL_INTF_SAME_TECH = 2; // Shared across all interfaces of the same technology used in this range
Craig Lutgene4a202f2018-10-16 17:19:30 -0500318 }
319
320 PoolType type = 1;
321 SharingType sharing = 2;
322 fixed32 start = 3; // lower bound on IDs allocated from this pool
323 fixed32 end = 4; // upper bound on IDs allocated from this pool
324 }
Craig Lutgenb2601f02018-10-23 13:04:31 -0500325 repeated Pool pools = 3;
Craig Lutgene4a202f2018-10-16 17:19:30 -0500326 }
327 repeated DeviceResourceRanges ranges = 15;
Nicolas Palpacuerdff96792018-09-06 14:59:32 -0400328}
329
Shad Ansari19249582018-04-30 04:31:00 +0000330message Classifier {
331 fixed32 o_tpid = 1;
332 fixed32 o_vid = 2;
333 fixed32 i_tpid = 3;
334 fixed32 i_vid = 4;
335 fixed32 o_pbits = 5;
336 fixed32 i_pbits = 6;
337 fixed32 eth_type = 7;
338 bytes dst_mac = 8;
339 bytes src_mac = 9;
340 fixed32 ip_proto = 10;
341 fixed32 dst_ip = 11;
342 fixed32 src_ip = 12;
343 fixed32 src_port = 13;
344 fixed32 dst_port = 14;
345 string pkt_tag_type = 15; // untagged, single_tag, double_tag
346}
347
348message ActionCmd {
349 bool add_outer_tag = 1;
350 bool remove_outer_tag = 2;
351 bool trap_to_host = 3;
352}
353
354message Action {
355 ActionCmd cmd = 1;
356 fixed32 o_vid = 2;
357 fixed32 o_pbits = 3;
358 fixed32 o_tpid = 4;
359 fixed32 i_vid = 5;
360 fixed32 i_pbits = 6;
361 fixed32 i_tpid = 7;
362}
363
364message Flow {
Shad Ansari39739bc2018-09-13 21:38:37 +0000365 sfixed32 access_intf_id = 1;
366 sfixed32 onu_id = 2;
Craig Lutgen967a1d02018-11-27 10:41:51 -0600367 sfixed32 uni_id = 11;
Shad Ansari19249582018-04-30 04:31:00 +0000368 fixed32 flow_id = 3;
369 string flow_type = 4; // upstream, downstream, broadcast, multicast
Shad Ansari39739bc2018-09-13 21:38:37 +0000370 sfixed32 alloc_id = 10;
371 sfixed32 network_intf_id = 5;
372 sfixed32 gemport_id = 6;
Shad Ansari19249582018-04-30 04:31:00 +0000373 Classifier classifier = 7;
374 Action action = 8;
Shad Ansari39739bc2018-09-13 21:38:37 +0000375 sfixed32 priority = 9;
Craig Lutgen967a1d02018-11-27 10:41:51 -0600376 fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
377 fixed32 port_no = 13; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
Shad Ansari19249582018-04-30 04:31:00 +0000378}
379
380message SerialNumber {
381 bytes vendor_id = 1;
382 bytes vendor_specific = 2;
383}
384
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -0400385message PortStatistics {
386 fixed32 intf_id = 1;
387 fixed64 rx_bytes = 2;
388 fixed64 rx_packets = 3;
389 fixed64 rx_ucast_packets = 4;
390 fixed64 rx_mcast_packets = 5;
391 fixed64 rx_bcast_packets = 6;
392 fixed64 rx_error_packets = 7;
393 fixed64 tx_bytes = 8;
394 fixed64 tx_packets = 9;
395 fixed64 tx_ucast_packets = 10;
396 fixed64 tx_mcast_packets = 11;
397 fixed64 tx_bcast_packets = 12;
398 fixed64 tx_error_packets = 13;
399 fixed64 rx_crc_errors = 14;
400 fixed64 bip_errors = 15;
401 fixed32 timestamp = 16;
402}
403
404message FlowStatistics {
405 fixed32 flow_id = 1;
406 fixed64 rx_bytes = 2;
407 fixed64 rx_packets = 3;
408 fixed64 tx_bytes = 8;
409 fixed64 tx_packets = 9;
410 fixed32 timestamp = 16;
411}
412
Nicolas Palpacuera32f4c32018-06-28 12:55:10 -0400413message LosIndication {
414 fixed32 intf_id = 1;
415 string status = 2;
416}
417
418message DyingGaspIndication {
419 fixed32 intf_id = 1;
420 fixed32 onu_id = 2;
421 string status = 3;
422}
423
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400424message OnuAlarmIndication {
425 fixed32 intf_id = 1;
426 fixed32 onu_id = 2;
427 string los_status = 3;
428 string lob_status = 4;
429 string lopc_miss_status = 5;
430 string lopc_mic_error_status = 6;
431}
432
433message OnuStartupFailureIndication {
434 fixed32 intf_id = 1;
435 fixed32 onu_id = 2;
436 string status = 3;
437}
438
439message OnuSignalDegradeIndication {
440 fixed32 intf_id = 1;
441 fixed32 onu_id = 2;
442 string status = 3;
443 fixed32 inverse_bit_error_rate = 4;
444}
445
446message OnuDriftOfWindowIndication {
447 fixed32 intf_id = 1;
448 fixed32 onu_id = 2;
449 string status = 3;
450 fixed32 drift = 4;
451 fixed32 new_eqd = 5;
452}
453
454message OnuLossOfOmciChannelIndication {
455 fixed32 intf_id = 1;
456 fixed32 onu_id = 2;
457 string status = 3;
458}
459
460message OnuSignalsFailureIndication {
461 fixed32 intf_id = 1;
462 fixed32 onu_id = 2;
463 string status = 3;
464 fixed32 inverse_bit_error_rate = 4;
465}
466
467message OnuTransmissionInterferenceWarning {
468 fixed32 intf_id = 1;
469 fixed32 onu_id = 2;
470 string status = 3;
471 fixed32 drift = 4;
472}
473
474message OnuActivationFailureIndication {
475 fixed32 intf_id = 1;
476 fixed32 onu_id = 2;
Jason Huangb1fad572019-05-28 19:02:30 +0800477 fixed32 fail_reason = 3;
Nicolas Palpacuerde4325b2018-07-03 11:18:42 -0400478}
479
480message OnuProcessingErrorIndication {
481 fixed32 intf_id = 1;
482 fixed32 onu_id = 2;
483}
484
Shad Ansari19249582018-04-30 04:31:00 +0000485message Empty {}
Girish Gowdruc8ed2ef2019-02-13 08:18:44 -0800486