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 | |
| 21 | rpc ActivateOnu(Onu) returns (Empty) { |
| 22 | option (google.api.http) = { |
| 23 | post: "/v1/EnableOnu" |
| 24 | body: "*" |
| 25 | }; |
| 26 | } |
| 27 | |
Jonathan Davis | 70c2181 | 2018-07-19 15:32:10 -0400 | [diff] [blame] | 28 | rpc DeactivateOnu(Onu) returns (Empty) { |
| 29 | option (google.api.http) = { |
| 30 | post: "/v1/DisableOnu" |
| 31 | body: "*" |
| 32 | }; |
| 33 | } |
| 34 | |
| 35 | rpc DeleteOnu(Onu) returns (Empty) { |
| 36 | option (google.api.http) = { |
| 37 | post: "/v1/DeleteOnu" |
| 38 | body: "*" |
| 39 | }; |
| 40 | } |
| 41 | |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 42 | rpc OmciMsgOut(OmciMsg) returns (Empty) { |
| 43 | option (google.api.http) = { |
| 44 | post: "/v1/OmciMsgOut" |
| 45 | body: "*" |
| 46 | }; |
| 47 | } |
| 48 | |
| 49 | rpc OnuPacketOut(OnuPacket) returns (Empty) { |
| 50 | option (google.api.http) = { |
| 51 | post: "/v1/OnuPacketOut" |
| 52 | body: "*" |
| 53 | }; |
| 54 | } |
| 55 | |
Nicolas Palpacuer | b78def4 | 2018-06-07 12:55:26 -0400 | [diff] [blame] | 56 | rpc UplinkPacketOut(UplinkPacket) returns (Empty) { |
| 57 | option (google.api.http) = { |
| 58 | post: "/v1/UplinkPacketOut" |
| 59 | body: "*" |
| 60 | }; |
| 61 | } |
| 62 | |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 63 | rpc FlowAdd(Flow) returns (Empty) { |
| 64 | option (google.api.http) = { |
| 65 | post: "/v1/FlowAdd" |
| 66 | body: "*" |
| 67 | }; |
| 68 | } |
| 69 | |
nick | 7be062f | 2018-05-25 17:52:56 -0400 | [diff] [blame] | 70 | rpc HeartbeatCheck(Empty) returns (Heartbeat) { |
| 71 | option (google.api.http) = { |
| 72 | post: "/v1/HeartbeatCheck" |
| 73 | body: "*" |
| 74 | }; |
| 75 | } |
| 76 | |
Nicolas Palpacuer | 05ea0ea | 2018-07-06 11:47:21 -0400 | [diff] [blame] | 77 | rpc EnablePonIf(Interface) returns (Empty) { |
| 78 | option (google.api.http) = { |
| 79 | post: "/v1/EnablePonIf" |
| 80 | body: "*" |
| 81 | }; |
| 82 | } |
| 83 | |
| 84 | rpc DisablePonIf(Interface) returns (Empty) { |
| 85 | option (google.api.http) = { |
| 86 | post: "/v1/DisablePonIf" |
| 87 | body: "*" |
| 88 | }; |
| 89 | } |
Nicolas Palpacuer | 0f19b1a | 2018-06-07 17:29:31 -0400 | [diff] [blame] | 90 | |
Nicolas Palpacuer | 4518066 | 2018-08-02 14:01:51 -0400 | [diff] [blame^] | 91 | rpc Reboot(Empty) returns (Empty) { |
| 92 | option (google.api.http) = { |
| 93 | post: "/v1/Reboot" |
| 94 | body: "*" |
| 95 | }; |
| 96 | } |
| 97 | |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 98 | rpc EnableIndication(Empty) returns (stream Indication) {} |
| 99 | } |
| 100 | |
| 101 | message Indication { |
| 102 | oneof data { |
| 103 | OltIndication olt_ind = 1; |
| 104 | IntfIndication intf_ind = 2; |
| 105 | IntfOperIndication intf_oper_ind = 3; |
| 106 | OnuDiscIndication onu_disc_ind = 4; |
| 107 | OnuIndication onu_ind = 5; |
| 108 | OmciIndication omci_ind = 6; |
| 109 | PacketIndication pkt_ind = 7; |
Nicolas Palpacuer | 0f19b1a | 2018-06-07 17:29:31 -0400 | [diff] [blame] | 110 | PortStatistics port_stats = 8; |
| 111 | FlowStatistics flow_stats = 9; |
Nicolas Palpacuer | a32f4c3 | 2018-06-28 12:55:10 -0400 | [diff] [blame] | 112 | AlarmIndication alarm_ind= 10; |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | message AlarmIndication { |
| 117 | oneof data { |
| 118 | LosIndication los_ind = 1; |
| 119 | DyingGaspIndication dying_gasp_ind = 2; |
Nicolas Palpacuer | de4325b | 2018-07-03 11:18:42 -0400 | [diff] [blame] | 120 | OnuAlarmIndication onu_alarm_ind = 3; |
| 121 | OnuStartupFailureIndication onu_startup_fail_ind = 4; |
| 122 | OnuSignalDegradeIndication onu_signal_degrade_ind = 5; |
| 123 | OnuDriftOfWindowIndication onu_drift_of_window_ind = 6; |
| 124 | OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7; |
| 125 | OnuSignalsFailureIndication onu_signals_fail_ind = 8; |
| 126 | OnuTransmissionInterferenceWarning onu_tiwi_ind = 9; |
| 127 | OnuActivationFailureIndication onu_activation_fail_ind = 10; |
| 128 | OnuProcessingErrorIndication onu_processing_error_ind = 11; |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 129 | } |
| 130 | } |
| 131 | |
| 132 | message OltIndication { |
| 133 | string oper_state = 1; // up, down |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 134 | } |
| 135 | |
| 136 | message IntfIndication { |
| 137 | fixed32 intf_id = 1; |
| 138 | string oper_state = 2; // up, down |
| 139 | } |
| 140 | |
| 141 | message OnuDiscIndication { |
| 142 | fixed32 intf_id = 1; |
| 143 | SerialNumber serial_number = 2; |
| 144 | } |
| 145 | |
| 146 | message OnuIndication { |
| 147 | fixed32 intf_id = 1; |
| 148 | fixed32 onu_id = 2; |
| 149 | string oper_state = 3; // up, down |
Shad Ansari | fe9d942 | 2018-05-22 23:25:02 +0000 | [diff] [blame] | 150 | string admin_state = 5; // up, down |
| 151 | SerialNumber serial_number = 4; |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 152 | } |
| 153 | |
| 154 | message IntfOperIndication { |
| 155 | string type = 1; // nni, pon |
| 156 | fixed32 intf_id = 2; |
| 157 | string oper_state = 3; // up, down |
| 158 | } |
| 159 | |
| 160 | message OmciIndication { |
| 161 | fixed32 intf_id = 1; |
| 162 | fixed32 onu_id = 2; |
| 163 | bytes pkt = 3; |
| 164 | } |
| 165 | |
| 166 | message PacketIndication { |
| 167 | fixed32 intf_id = 1; |
| 168 | fixed32 gemport_id = 2; |
| 169 | fixed32 flow_id = 3; |
| 170 | bytes pkt = 4; |
| 171 | } |
| 172 | |
Nicolas Palpacuer | 05ea0ea | 2018-07-06 11:47:21 -0400 | [diff] [blame] | 173 | message Interface { |
| 174 | fixed32 intf_id = 1; |
| 175 | } |
| 176 | |
nick | 7be062f | 2018-05-25 17:52:56 -0400 | [diff] [blame] | 177 | message Heartbeat { |
| 178 | fixed32 heartbeat_signature = 1; |
| 179 | } |
| 180 | |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 181 | message Onu { |
| 182 | fixed32 intf_id = 1; |
| 183 | fixed32 onu_id = 2; |
| 184 | SerialNumber serial_number = 3; |
Shad Ansari | 0610195 | 2018-07-25 00:22:09 +0000 | [diff] [blame] | 185 | fixed32 pir = 4; // peak information rate assigned to onu |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 186 | } |
| 187 | |
| 188 | message OmciMsg { |
| 189 | fixed32 intf_id = 1; |
| 190 | fixed32 onu_id = 2; |
| 191 | bytes pkt = 3; |
| 192 | } |
| 193 | |
| 194 | message OnuPacket { |
| 195 | fixed32 intf_id = 1; |
| 196 | fixed32 onu_id = 2; |
| 197 | bytes pkt = 3; |
| 198 | } |
| 199 | |
Nicolas Palpacuer | b78def4 | 2018-06-07 12:55:26 -0400 | [diff] [blame] | 200 | message UplinkPacket { |
| 201 | fixed32 intf_id = 1; |
| 202 | bytes pkt = 2; |
| 203 | } |
| 204 | |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 205 | message Classifier { |
| 206 | fixed32 o_tpid = 1; |
| 207 | fixed32 o_vid = 2; |
| 208 | fixed32 i_tpid = 3; |
| 209 | fixed32 i_vid = 4; |
| 210 | fixed32 o_pbits = 5; |
| 211 | fixed32 i_pbits = 6; |
| 212 | fixed32 eth_type = 7; |
| 213 | bytes dst_mac = 8; |
| 214 | bytes src_mac = 9; |
| 215 | fixed32 ip_proto = 10; |
| 216 | fixed32 dst_ip = 11; |
| 217 | fixed32 src_ip = 12; |
| 218 | fixed32 src_port = 13; |
| 219 | fixed32 dst_port = 14; |
| 220 | string pkt_tag_type = 15; // untagged, single_tag, double_tag |
| 221 | } |
| 222 | |
| 223 | message ActionCmd { |
| 224 | bool add_outer_tag = 1; |
| 225 | bool remove_outer_tag = 2; |
| 226 | bool trap_to_host = 3; |
| 227 | } |
| 228 | |
| 229 | message Action { |
| 230 | ActionCmd cmd = 1; |
| 231 | fixed32 o_vid = 2; |
| 232 | fixed32 o_pbits = 3; |
| 233 | fixed32 o_tpid = 4; |
| 234 | fixed32 i_vid = 5; |
| 235 | fixed32 i_pbits = 6; |
| 236 | fixed32 i_tpid = 7; |
| 237 | } |
| 238 | |
| 239 | message Flow { |
| 240 | fixed32 access_intf_id = 1; |
| 241 | fixed32 onu_id = 2; |
| 242 | fixed32 flow_id = 3; |
| 243 | string flow_type = 4; // upstream, downstream, broadcast, multicast |
| 244 | fixed32 network_intf_id = 5; |
| 245 | fixed32 gemport_id = 6; |
| 246 | Classifier classifier = 7; |
| 247 | Action action = 8; |
Nicolas Palpacuer | d6cf5aa | 2018-07-16 15:14:39 -0400 | [diff] [blame] | 248 | fixed32 priority = 9; |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 249 | } |
| 250 | |
| 251 | message SerialNumber { |
| 252 | bytes vendor_id = 1; |
| 253 | bytes vendor_specific = 2; |
| 254 | } |
| 255 | |
Nicolas Palpacuer | 0f19b1a | 2018-06-07 17:29:31 -0400 | [diff] [blame] | 256 | message PortStatistics { |
| 257 | fixed32 intf_id = 1; |
| 258 | fixed64 rx_bytes = 2; |
| 259 | fixed64 rx_packets = 3; |
| 260 | fixed64 rx_ucast_packets = 4; |
| 261 | fixed64 rx_mcast_packets = 5; |
| 262 | fixed64 rx_bcast_packets = 6; |
| 263 | fixed64 rx_error_packets = 7; |
| 264 | fixed64 tx_bytes = 8; |
| 265 | fixed64 tx_packets = 9; |
| 266 | fixed64 tx_ucast_packets = 10; |
| 267 | fixed64 tx_mcast_packets = 11; |
| 268 | fixed64 tx_bcast_packets = 12; |
| 269 | fixed64 tx_error_packets = 13; |
| 270 | fixed64 rx_crc_errors = 14; |
| 271 | fixed64 bip_errors = 15; |
| 272 | fixed32 timestamp = 16; |
| 273 | } |
| 274 | |
| 275 | message FlowStatistics { |
| 276 | fixed32 flow_id = 1; |
| 277 | fixed64 rx_bytes = 2; |
| 278 | fixed64 rx_packets = 3; |
| 279 | fixed64 tx_bytes = 8; |
| 280 | fixed64 tx_packets = 9; |
| 281 | fixed32 timestamp = 16; |
| 282 | } |
| 283 | |
Nicolas Palpacuer | a32f4c3 | 2018-06-28 12:55:10 -0400 | [diff] [blame] | 284 | message LosIndication { |
| 285 | fixed32 intf_id = 1; |
| 286 | string status = 2; |
| 287 | } |
| 288 | |
| 289 | message DyingGaspIndication { |
| 290 | fixed32 intf_id = 1; |
| 291 | fixed32 onu_id = 2; |
| 292 | string status = 3; |
| 293 | } |
| 294 | |
Nicolas Palpacuer | de4325b | 2018-07-03 11:18:42 -0400 | [diff] [blame] | 295 | message OnuAlarmIndication { |
| 296 | fixed32 intf_id = 1; |
| 297 | fixed32 onu_id = 2; |
| 298 | string los_status = 3; |
| 299 | string lob_status = 4; |
| 300 | string lopc_miss_status = 5; |
| 301 | string lopc_mic_error_status = 6; |
| 302 | } |
| 303 | |
| 304 | message OnuStartupFailureIndication { |
| 305 | fixed32 intf_id = 1; |
| 306 | fixed32 onu_id = 2; |
| 307 | string status = 3; |
| 308 | } |
| 309 | |
| 310 | message OnuSignalDegradeIndication { |
| 311 | fixed32 intf_id = 1; |
| 312 | fixed32 onu_id = 2; |
| 313 | string status = 3; |
| 314 | fixed32 inverse_bit_error_rate = 4; |
| 315 | } |
| 316 | |
| 317 | message OnuDriftOfWindowIndication { |
| 318 | fixed32 intf_id = 1; |
| 319 | fixed32 onu_id = 2; |
| 320 | string status = 3; |
| 321 | fixed32 drift = 4; |
| 322 | fixed32 new_eqd = 5; |
| 323 | } |
| 324 | |
| 325 | message OnuLossOfOmciChannelIndication { |
| 326 | fixed32 intf_id = 1; |
| 327 | fixed32 onu_id = 2; |
| 328 | string status = 3; |
| 329 | } |
| 330 | |
| 331 | message OnuSignalsFailureIndication { |
| 332 | fixed32 intf_id = 1; |
| 333 | fixed32 onu_id = 2; |
| 334 | string status = 3; |
| 335 | fixed32 inverse_bit_error_rate = 4; |
| 336 | } |
| 337 | |
| 338 | message OnuTransmissionInterferenceWarning { |
| 339 | fixed32 intf_id = 1; |
| 340 | fixed32 onu_id = 2; |
| 341 | string status = 3; |
| 342 | fixed32 drift = 4; |
| 343 | } |
| 344 | |
| 345 | message OnuActivationFailureIndication { |
| 346 | fixed32 intf_id = 1; |
| 347 | fixed32 onu_id = 2; |
| 348 | } |
| 349 | |
| 350 | message OnuProcessingErrorIndication { |
| 351 | fixed32 intf_id = 1; |
| 352 | fixed32 onu_id = 2; |
| 353 | } |
| 354 | |
| 355 | |
Shad Ansari | 1924958 | 2018-04-30 04:31:00 +0000 | [diff] [blame] | 356 | message Empty {} |