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