Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 1 | # |
Zsolt Haraszti | 3eb27a5 | 2017-01-03 21:56:48 -0800 | [diff] [blame] | 2 | # Copyright 2017 the original author or authors. |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | """ |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 18 | Broadcom OLT/ONU adapter. |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 19 | """ |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 20 | |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 21 | from uuid import uuid4 |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 22 | import structlog |
| 23 | from twisted.internet import reactor |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 24 | from twisted.internet.defer import DeferredQueue, inlineCallbacks |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 25 | from zope.interface import implementer |
| 26 | |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 27 | from voltha.adapters.interface import IAdapterInterface |
| 28 | from voltha.core.logical_device_agent import mac_str_to_tuple |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 29 | import voltha.core.flow_decomposer as fd |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 30 | from voltha.protos import third_party |
| 31 | from voltha.protos.adapter_pb2 import Adapter |
| 32 | from voltha.protos.adapter_pb2 import AdapterConfig |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 33 | from voltha.protos.common_pb2 import LogLevel, OperStatus, ConnectStatus, \ |
| 34 | AdminState |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 35 | from voltha.protos.device_pb2 import DeviceType, DeviceTypes, Port |
| 36 | from voltha.protos.health_pb2 import HealthStatus |
| 37 | from voltha.protos.logical_device_pb2 import LogicalPort |
| 38 | from voltha.protos.openflow_13_pb2 import OFPPS_LIVE, OFPPF_FIBER, OFPPF_1GB_FD |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 39 | from voltha.protos.openflow_13_pb2 import OFPXMC_OPENFLOW_BASIC, ofp_port |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 40 | from common.frameio.frameio import hexify |
| 41 | from voltha.extensions.omci.omci import * |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 42 | |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 43 | _ = third_party |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 44 | log = structlog.get_logger() |
| 45 | |
| 46 | |
| 47 | @implementer(IAdapterInterface) |
| 48 | class BroadcomOnuAdapter(object): |
| 49 | |
| 50 | name = 'broadcom_onu' |
| 51 | |
| 52 | supported_device_types = [ |
| 53 | DeviceType( |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 54 | id=name, |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 55 | adapter=name, |
| 56 | accepts_bulk_flow_update=True |
| 57 | ) |
| 58 | ] |
| 59 | |
| 60 | def __init__(self, adapter_agent, config): |
| 61 | self.adapter_agent = adapter_agent |
| 62 | self.config = config |
| 63 | self.descriptor = Adapter( |
| 64 | id=self.name, |
| 65 | vendor='Voltha project', |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 66 | version='0.4', |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 67 | config=AdapterConfig(log_level=LogLevel.INFO) |
| 68 | ) |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 69 | self.devices_handlers = dict() # device_id -> BroadcomOnuHandler() |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 70 | |
| 71 | def start(self): |
| 72 | log.debug('starting') |
| 73 | log.info('started') |
| 74 | |
| 75 | def stop(self): |
| 76 | log.debug('stopping') |
| 77 | log.info('stopped') |
| 78 | |
| 79 | def adapter_descriptor(self): |
| 80 | return self.descriptor |
| 81 | |
| 82 | def device_types(self): |
| 83 | return DeviceTypes(items=self.supported_device_types) |
| 84 | |
| 85 | def health(self): |
| 86 | return HealthStatus(state=HealthStatus.HealthState.HEALTHY) |
| 87 | |
| 88 | def change_master_state(self, master): |
| 89 | raise NotImplementedError() |
| 90 | |
| 91 | def adopt_device(self, device): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 92 | log.info('adopt_device', device_id=device.id) |
| 93 | self.devices_handlers[device.proxy_address.channel_id] = BroadcomOnuHandler(self, device.id) |
| 94 | reactor.callLater(0, self.devices_handlers[device.proxy_address.channel_id].activate, device) |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 95 | return device |
| 96 | |
| 97 | def abandon_device(self, device): |
| 98 | raise NotImplementedError() |
| 99 | |
Khen Nursimulu | d068d81 | 2017-03-06 11:44:18 -0500 | [diff] [blame] | 100 | def disable_device(self, device): |
| 101 | raise NotImplementedError() |
| 102 | |
| 103 | def reenable_device(self, device): |
| 104 | raise NotImplementedError() |
| 105 | |
| 106 | def reboot_device(self, device): |
| 107 | raise NotImplementedError() |
| 108 | |
| 109 | def delete_device(self, device): |
| 110 | raise NotImplementedError() |
| 111 | |
| 112 | def get_device_details(self, device): |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 113 | raise NotImplementedError() |
| 114 | |
Sergio Slobodrian | ec864c6 | 2017-03-09 11:41:43 -0500 | [diff] [blame] | 115 | def update_pm_config(self, device, pm_configs): |
| 116 | raise NotImplementedError() |
| 117 | |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 118 | def update_flows_bulk(self, device, flows, groups): |
| 119 | log.info('bulk-flow-update', device_id=device.id, |
| 120 | flows=flows, groups=groups) |
| 121 | assert len(groups.items) == 0 |
| 122 | handler = self.devices_handlers[device.proxy_address.channel_id] |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 123 | return handler.update_flow_table(device, flows.items) |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 124 | |
| 125 | def update_flows_incrementally(self, device, flow_changes, group_changes): |
| 126 | raise NotImplementedError() |
| 127 | |
| 128 | def send_proxied_message(self, proxy_address, msg): |
| 129 | log.info('send-proxied-message', proxy_address=proxy_address, msg=msg) |
| 130 | |
| 131 | def receive_proxied_message(self, proxy_address, msg): |
| 132 | log.info('receive-proxied-message', proxy_address=proxy_address, |
| 133 | device_id=proxy_address.device_id, msg=hexify(msg)) |
| 134 | handler = self.devices_handlers[proxy_address.channel_id] |
| 135 | handler.receive_message(msg) |
| 136 | |
| 137 | def receive_packet_out(self, logical_device_id, egress_port_no, msg): |
| 138 | log.info('packet-out', logical_device_id=logical_device_id, |
| 139 | egress_port_no=egress_port_no, msg_len=len(msg)) |
| 140 | |
| 141 | |
| 142 | class BroadcomOnuHandler(object): |
| 143 | |
| 144 | def __init__(self, adapter, device_id): |
| 145 | self.adapter = adapter |
| 146 | self.adapter_agent = adapter.adapter_agent |
| 147 | self.device_id = device_id |
| 148 | self.log = structlog.get_logger(device_id=device_id) |
| 149 | self.incoming_messages = DeferredQueue() |
| 150 | self.proxy_address = None |
| 151 | self.tx_id = 0 |
| 152 | |
| 153 | def receive_message(self, msg): |
| 154 | self.incoming_messages.put(msg) |
| 155 | |
| 156 | def activate(self, device): |
| 157 | self.log.info('activating') |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 158 | |
| 159 | # first we verify that we got parent reference and proxy info |
| 160 | assert device.parent_id |
| 161 | assert device.proxy_address.device_id |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 162 | #assert device.proxy_address.channel_id # c-vid |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 163 | |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 164 | # register for proxied messages right away |
| 165 | self.proxy_address = device.proxy_address |
| 166 | self.adapter_agent.register_for_proxied_messages(device.proxy_address) |
| 167 | |
| 168 | # populate device info |
| 169 | device.root = True |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 170 | device.vendor = 'Broadcom' |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 171 | device.model = 'n/a' |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 172 | device.hardware_version = 'to be filled' |
| 173 | device.firmware_version = 'to be filled' |
| 174 | device.software_version = 'to be filled' |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 175 | device.connect_status = ConnectStatus.REACHABLE |
| 176 | self.adapter_agent.update_device(device) |
| 177 | |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 178 | self.adapter_agent.add_port(device.id, Port( |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 179 | port_no=100, |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 180 | label='PON port', |
| 181 | type=Port.PON_ONU, |
| 182 | admin_state=AdminState.ENABLED, |
| 183 | oper_status=OperStatus.ACTIVE, |
| 184 | peers=[ |
| 185 | Port.PeerPort( |
| 186 | device_id=device.parent_id, |
| 187 | port_no=device.parent_port_no |
| 188 | ) |
| 189 | ] |
| 190 | )) |
| 191 | |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 192 | parent_device = self.adapter_agent.get_device(device.parent_id) |
| 193 | logical_device_id = parent_device.parent_id |
| 194 | assert logical_device_id |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 195 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 196 | # query ONU for number of supported uni ports |
| 197 | # temporarily set number of ports to 1 - port #2 |
| 198 | uni_ports = (2,) |
| 199 | |
| 200 | for uni in uni_ports: |
| 201 | # register physical ports |
| 202 | uni_port = Port( |
| 203 | port_no=uni, |
| 204 | label='UNI facing Ethernet port '+str(uni), |
| 205 | type=Port.ETHERNET_UNI, |
| 206 | admin_state=AdminState.ENABLED, |
| 207 | oper_status=OperStatus.ACTIVE |
| 208 | ) |
| 209 | self.adapter_agent.add_port(device.id, uni_port) |
| 210 | |
| 211 | # add uni port to logical device |
| 212 | port_no = device.proxy_address.channel_id + uni |
| 213 | cap = OFPPF_1GB_FD | OFPPF_FIBER |
| 214 | self.adapter_agent.add_logical_port(logical_device_id, LogicalPort( |
| 215 | id='uni-{}'.format(port_no), |
| 216 | ofp_port=ofp_port( |
| 217 | port_no=port_no, |
| 218 | hw_addr=mac_str_to_tuple('00:00:00:%02x:%02x:%02x' % |
| 219 | (device.proxy_address.onu_id & 0xff, |
| 220 | (port_no >> 8) & 0xff, |
| 221 | port_no & 0xff)), |
| 222 | name='uni-{}'.format(port_no), |
| 223 | config=0, |
| 224 | state=OFPPS_LIVE, |
| 225 | curr=cap, |
| 226 | advertised=cap, |
| 227 | peer=cap, |
| 228 | curr_speed=OFPPF_1GB_FD, |
| 229 | max_speed=OFPPF_1GB_FD |
| 230 | ), |
| 231 | device_id=device.id, |
| 232 | device_port_no=uni_port.port_no |
| 233 | )) |
| 234 | |
| 235 | reactor.callLater(10, |
| 236 | self.message_exchange, |
| 237 | self.proxy_address.onu_id, |
| 238 | self.proxy_address.onu_session_id, |
| 239 | port_no) |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 240 | |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 241 | device = self.adapter_agent.get_device(device.id) |
| 242 | device.oper_status = OperStatus.ACTIVE |
| 243 | self.adapter_agent.update_device(device) |
| 244 | |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 245 | @inlineCallbacks |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 246 | def update_flow_table(self, device, flows): |
| 247 | # |
| 248 | # We need to proxy through the OLT to get to the ONU |
| 249 | # Configuration from here should be using OMCI |
| 250 | # |
| 251 | self.log.info('bulk-flow-update', device_id=device.id, flows=flows) |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 252 | |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 253 | def is_downstream(port): |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 254 | return port == 100 # Need a better way |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 255 | |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 256 | def is_upstream(port): |
| 257 | return not is_downstream(port) |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 258 | |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 259 | for flow in flows: |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 260 | _type = None |
| 261 | _port = None |
| 262 | _vlan_vid = None |
| 263 | _udp_dst = None |
| 264 | _udp_src = None |
| 265 | _ipv4_dst = None |
| 266 | _ipv4_src = None |
| 267 | _metadata = None |
| 268 | _output = None |
| 269 | _push_tpid = None |
| 270 | _field = None |
| 271 | _set_vlan_vid = None |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 272 | try: |
| 273 | _in_port = fd.get_in_port(flow) |
| 274 | assert _in_port is not None |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 275 | |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 276 | if is_downstream(_in_port): |
| 277 | self.log.info('downstream-flow') |
| 278 | elif is_upstream(_in_port): |
| 279 | self.log.info('upstream-flow') |
| 280 | else: |
| 281 | raise Exception('port should be 1 or 2 by our convention') |
| 282 | |
| 283 | _out_port = fd.get_out_port(flow) # may be None |
| 284 | self.log.info('out-port', out_port=_out_port) |
| 285 | |
| 286 | for field in fd.get_ofb_fields(flow): |
| 287 | if field.type == fd.ETH_TYPE: |
| 288 | _type = field.eth_type |
| 289 | self.log.info('field-type-eth-type', |
| 290 | eth_type=_type) |
| 291 | |
| 292 | elif field.type == fd.IP_PROTO: |
| 293 | _proto = field.ip_proto |
| 294 | self.log.info('field-type-ip-proto', |
| 295 | ip_proto=_proto) |
| 296 | |
| 297 | elif field.type == fd.IN_PORT: |
| 298 | _port = field.port |
| 299 | self.log.info('field-type-in-port', |
| 300 | in_port=_port) |
| 301 | |
| 302 | elif field.type == fd.VLAN_VID: |
| 303 | _vlan_vid = field.vlan_vid & 0xfff |
| 304 | self.log.info('field-type-vlan-vid', |
| 305 | vlan=_vlan_vid) |
| 306 | |
| 307 | elif field.type == fd.VLAN_PCP: |
| 308 | _vlan_pcp = field.vlan_pcp |
| 309 | self.log.info('field-type-vlan-pcp', |
| 310 | pcp=_vlan_pcp) |
| 311 | |
| 312 | elif field.type == fd.UDP_DST: |
| 313 | _udp_dst = field.udp_dst |
| 314 | self.log.info('field-type-udp-dst', |
| 315 | udp_dst=_udp_dst) |
| 316 | |
| 317 | elif field.type == fd.UDP_SRC: |
| 318 | _udp_src = field.udp_src |
| 319 | self.log.info('field-type-udp-src', |
| 320 | udp_src=_udp_src) |
| 321 | |
| 322 | elif field.type == fd.IPV4_DST: |
| 323 | _ipv4_dst = field.ipv4_dst |
| 324 | self.log.info('field-type-ipv4-dst', |
| 325 | ipv4_dst=_ipv4_dst) |
| 326 | |
| 327 | elif field.type == fd.IPV4_SRC: |
| 328 | _ipv4_src = field.ipv4_src |
| 329 | self.log.info('field-type-ipv4-src', |
| 330 | ipv4_dst=_ipv4_src) |
| 331 | |
| 332 | elif field.type == fd.METADATA: |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 333 | _metadata = field.table_metadata |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 334 | self.log.info('field-type-metadata', |
| 335 | metadata=_metadata) |
| 336 | |
| 337 | else: |
| 338 | raise NotImplementedError('field.type={}'.format( |
| 339 | field.type)) |
| 340 | |
| 341 | for action in fd.get_actions(flow): |
| 342 | |
| 343 | if action.type == fd.OUTPUT: |
| 344 | _output = action.output.port |
| 345 | self.log.info('action-type-output', |
| 346 | output=_output, in_port=_in_port) |
| 347 | |
| 348 | elif action.type == fd.POP_VLAN: |
| 349 | self.log.info('action-type-pop-vlan', |
| 350 | in_port=_in_port) |
| 351 | |
| 352 | elif action.type == fd.PUSH_VLAN: |
| 353 | _push_tpid = action.push.ethertype |
| 354 | log.info('action-type-push-vlan', |
| 355 | push_tpid=_push_tpid, in_port=_in_port) |
| 356 | if action.push.ethertype != 0x8100: |
| 357 | self.log.error('unhandled-tpid', |
| 358 | ethertype=action.push.ethertype) |
| 359 | |
| 360 | elif action.type == fd.SET_FIELD: |
| 361 | _field = action.set_field.field.ofb_field |
| 362 | assert (action.set_field.field.oxm_class == |
| 363 | OFPXMC_OPENFLOW_BASIC) |
| 364 | self.log.info('action-type-set-field', |
| 365 | field=_field, in_port=_in_port) |
| 366 | if _field.type == fd.VLAN_VID: |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 367 | _set_vlan_vid = _field.vlan_vid & 0xfff |
| 368 | self.log.info('set-field-type-valn-vid', _set_vlan_vid) |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 369 | else: |
| 370 | self.log.error('unsupported-action-set-field-type', |
| 371 | field_type=_field.type) |
| 372 | else: |
| 373 | log.error('unsupported-action-type', |
| 374 | action_type=action.type, in_port=_in_port) |
| 375 | |
| 376 | # |
| 377 | # All flows created from ONU adapter should be OMCI based |
| 378 | # |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 379 | if _vlan_vid == 0: |
| 380 | # allow priority tagged packets |
| 381 | # Set AR - ExtendedVlanTaggingOperationConfigData |
| 382 | # 514 - RxVlanTaggingOperationTable - add VLAN <cvid> to priority tagged pkts - c-vid |
| 383 | self.send_set_extended_vlan_tagging_operation_vlan_configuration_data_single_tag(0x202, 8, 0, 0, |
| 384 | 1, 8, _in_port) |
| 385 | yield self.wait_for_response() |
| 386 | |
| 387 | # Set AR - ExtendedVlanTaggingOperationConfigData |
| 388 | # 514 - RxVlanTaggingOperationTable - add VLAN <cvid> to priority tagged pkts - c-vid |
| 389 | self.send_set_extended_vlan_tagging_operation_vlan_configuration_data_single_tag(0x205, 8, 0, 0, |
| 390 | 1, 8, _in_port) |
| 391 | yield self.wait_for_response() |
Steve Crooks | f248e18 | 2017-02-07 10:50:24 -0500 | [diff] [blame] | 392 | |
| 393 | except Exception as e: |
| 394 | log.exception('failed-to-install-flow', e=e, flow=flow) |
| 395 | |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 396 | def get_tx_id(self): |
| 397 | self.tx_id += 1 |
| 398 | return self.tx_id |
| 399 | |
| 400 | def send_omci_message(self, frame): |
| 401 | _frame = hexify(str(frame)) |
| 402 | self.log.info('send-omci-message-%s' % _frame) |
| 403 | device = self.adapter_agent.get_device(self.device_id) |
| 404 | try: |
| 405 | self.adapter_agent.send_proxied_message(device.proxy_address, _frame) |
| 406 | except Exception as e: |
| 407 | self.log.info('send-omci-message-exception', exc=str(e)) |
| 408 | |
| 409 | def send_get_circuit_pack(self, entity_id=0): |
| 410 | frame = OmciFrame( |
| 411 | transaction_id=self.get_tx_id(), |
| 412 | message_type=OmciGet.message_id, |
| 413 | omci_message=OmciGet( |
| 414 | entity_class=CircuitPack.class_id, |
| 415 | entity_id=entity_id, |
| 416 | attributes_mask=CircuitPack.mask_for('vendor_id') |
| 417 | ) |
| 418 | ) |
| 419 | self.send_omci_message(frame) |
| 420 | |
| 421 | def send_mib_reset(self, entity_id=0): |
| 422 | frame = OmciFrame( |
| 423 | transaction_id=self.get_tx_id(), |
| 424 | message_type=OmciMibReset.message_id, |
| 425 | omci_message=OmciMibReset( |
| 426 | entity_class=OntData.class_id, |
| 427 | entity_id=entity_id |
| 428 | ) |
| 429 | ) |
| 430 | self.send_omci_message(frame) |
| 431 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 432 | def send_create_gal_ethernet_profile(self, |
| 433 | entity_id, |
| 434 | max_gem_payload_size): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 435 | frame = OmciFrame( |
| 436 | transaction_id=self.get_tx_id(), |
| 437 | message_type=OmciCreate.message_id, |
| 438 | omci_message=OmciCreate( |
| 439 | entity_class=GalEthernetProfile.class_id, |
| 440 | entity_id=entity_id, |
| 441 | data=dict( |
| 442 | max_gem_payload_size=max_gem_payload_size |
| 443 | ) |
| 444 | ) |
| 445 | ) |
| 446 | self.send_omci_message(frame) |
| 447 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 448 | def send_set_tcont(self, |
| 449 | entity_id, |
| 450 | alloc_id): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 451 | data = dict( |
| 452 | alloc_id=alloc_id |
| 453 | ) |
| 454 | frame = OmciFrame( |
| 455 | transaction_id=self.get_tx_id(), |
| 456 | message_type=OmciSet.message_id, |
| 457 | omci_message=OmciSet( |
| 458 | entity_class=Tcont.class_id, |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 459 | entity_id=entity_id, |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 460 | attributes_mask=Tcont.mask_for(*data.keys()), |
| 461 | data=data |
| 462 | ) |
| 463 | ) |
| 464 | self.send_omci_message(frame) |
| 465 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 466 | def send_create_8021p_mapper_service_profile(self, |
| 467 | entity_id): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 468 | frame = OmciFrame( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 469 | transaction_id=self.get_tx_id(), |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 470 | message_type=OmciCreate.message_id, |
| 471 | omci_message=OmciCreate( |
| 472 | entity_class=Ieee8021pMapperServiceProfile.class_id, |
| 473 | entity_id=entity_id, |
| 474 | data=dict( |
| 475 | tp_pointer=OmciNullPointer, |
| 476 | interwork_tp_pointer_for_p_bit_priority_0=OmciNullPointer, |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 477 | interwork_tp_pointer_for_p_bit_priority_1=OmciNullPointer, |
| 478 | interwork_tp_pointer_for_p_bit_priority_2=OmciNullPointer, |
| 479 | interwork_tp_pointer_for_p_bit_priority_3=OmciNullPointer, |
| 480 | interwork_tp_pointer_for_p_bit_priority_4=OmciNullPointer, |
| 481 | interwork_tp_pointer_for_p_bit_priority_5=OmciNullPointer, |
| 482 | interwork_tp_pointer_for_p_bit_priority_6=OmciNullPointer, |
| 483 | interwork_tp_pointer_for_p_bit_priority_7=OmciNullPointer |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 484 | ) |
| 485 | ) |
| 486 | ) |
| 487 | self.send_omci_message(frame) |
| 488 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 489 | def send_create_mac_bridge_service_profile(self, |
| 490 | entity_id): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 491 | frame = OmciFrame( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 492 | transaction_id=self.get_tx_id(), |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 493 | message_type=OmciCreate.message_id, |
| 494 | omci_message=OmciCreate( |
| 495 | entity_class=MacBridgeServiceProfile.class_id, |
| 496 | entity_id=entity_id, |
| 497 | data=dict( |
| 498 | spanning_tree_ind=False, |
| 499 | learning_ind=True, |
| 500 | priority=0x8000, |
| 501 | max_age=20 * 256, |
| 502 | hello_time=2 * 256, |
| 503 | forward_delay=15 * 256, |
| 504 | unknown_mac_address_discard=True |
| 505 | ) |
| 506 | ) |
| 507 | ) |
| 508 | self.send_omci_message(frame) |
| 509 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 510 | def send_create_gem_port_network_ctp(self, |
| 511 | entity_id, |
| 512 | port_id, |
| 513 | tcont_id, |
| 514 | direction, |
| 515 | tm): |
| 516 | _directions = {"upstream": 1, "downstream": 2, "bi-directional": 3} |
| 517 | if _directions.has_key(direction): |
| 518 | _direction = _directions[direction] |
| 519 | else: |
| 520 | self.log.error('invalid-gem-port-direction', direction=direction) |
| 521 | raise ValueError('Invalid GEM port direction: {_dir}'.format(_dir=direction)) |
| 522 | |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 523 | frame = OmciFrame( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 524 | transaction_id=self.get_tx_id(), |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 525 | message_type=OmciCreate.message_id, |
| 526 | omci_message=OmciCreate( |
| 527 | entity_class=GemPortNetworkCtp.class_id, |
| 528 | entity_id=entity_id, |
| 529 | data=dict( |
| 530 | port_id=port_id, |
| 531 | tcont_pointer=tcont_id, |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 532 | direction=_direction, |
| 533 | traffic_management_pointer_upstream=tm |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 534 | ) |
| 535 | ) |
| 536 | ) |
| 537 | self.send_omci_message(frame) |
| 538 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 539 | def send_create_multicast_gem_interworking_tp(self, |
| 540 | entity_id, |
| 541 | gem_port_net_ctp_id): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 542 | frame = OmciFrame( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 543 | transaction_id=self.get_tx_id(), |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 544 | message_type=OmciCreate.message_id, |
| 545 | omci_message=OmciCreate( |
| 546 | entity_class=MulticastGemInterworkingTp.class_id, |
| 547 | entity_id=entity_id, |
| 548 | data=dict( |
| 549 | gem_port_network_ctp_pointer=gem_port_net_ctp_id, |
| 550 | interworking_option=0, |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 551 | service_profile_pointer=0x1 |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 552 | ) |
| 553 | ) |
| 554 | ) |
| 555 | self.send_omci_message(frame) |
| 556 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 557 | def send_create_gem_inteworking_tp(self, |
| 558 | entity_id, |
| 559 | gem_port_net_ctp_id, |
| 560 | service_profile_id): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 561 | frame = OmciFrame( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 562 | transaction_id=self.get_tx_id(), |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 563 | message_type=OmciCreate.message_id, |
| 564 | omci_message=OmciCreate( |
| 565 | entity_class=GemInterworkingTp.class_id, |
| 566 | entity_id=entity_id, |
| 567 | data=dict( |
| 568 | gem_port_network_ctp_pointer=gem_port_net_ctp_id, |
| 569 | interworking_option=5, |
| 570 | service_profile_pointer=service_profile_id, |
| 571 | interworking_tp_pointer=0x0, |
| 572 | gal_profile_pointer=0x1 |
| 573 | ) |
| 574 | ) |
| 575 | ) |
| 576 | self.send_omci_message(frame) |
| 577 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 578 | def send_set_8021p_mapper_service_profile(self, |
| 579 | entity_id, |
| 580 | interwork_tp_id): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 581 | data = dict( |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 582 | interwork_tp_pointer_for_p_bit_priority_0=interwork_tp_id, |
| 583 | interwork_tp_pointer_for_p_bit_priority_1=interwork_tp_id, |
| 584 | interwork_tp_pointer_for_p_bit_priority_2=interwork_tp_id, |
| 585 | interwork_tp_pointer_for_p_bit_priority_3=interwork_tp_id, |
| 586 | interwork_tp_pointer_for_p_bit_priority_4=interwork_tp_id, |
| 587 | interwork_tp_pointer_for_p_bit_priority_5=interwork_tp_id, |
| 588 | interwork_tp_pointer_for_p_bit_priority_6=interwork_tp_id, |
| 589 | interwork_tp_pointer_for_p_bit_priority_7=interwork_tp_id |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 590 | ) |
| 591 | frame = OmciFrame( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 592 | transaction_id=self.get_tx_id(), |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 593 | message_type=OmciSet.message_id, |
| 594 | omci_message=OmciSet( |
| 595 | entity_class=Ieee8021pMapperServiceProfile.class_id, |
| 596 | entity_id=entity_id, |
| 597 | attributes_mask=Ieee8021pMapperServiceProfile.mask_for( |
| 598 | *data.keys()), |
| 599 | data=data |
| 600 | ) |
| 601 | ) |
| 602 | self.send_omci_message(frame) |
| 603 | |
| 604 | def send_create_mac_bridge_port_configuration_data(self, |
| 605 | entity_id, |
| 606 | bridge_id, |
| 607 | port_id, |
| 608 | tp_type, |
| 609 | tp_id): |
| 610 | frame = OmciFrame( |
| 611 | transaction_id=self.get_tx_id(), |
| 612 | message_type=OmciCreate.message_id, |
| 613 | omci_message=OmciCreate( |
| 614 | entity_class=MacBridgePortConfigurationData.class_id, |
| 615 | entity_id=entity_id, |
| 616 | data=dict( |
| 617 | bridge_id_pointer = bridge_id, |
| 618 | port_num=port_id, |
| 619 | tp_type=tp_type, |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 620 | tp_pointer=tp_id |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 621 | ) |
| 622 | ) |
| 623 | ) |
| 624 | self.send_omci_message(frame) |
| 625 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 626 | def send_create_vlan_tagging_filter_data(self, |
| 627 | entity_id, |
| 628 | vlan_id): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 629 | frame = OmciFrame( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 630 | transaction_id=self.get_tx_id(), |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 631 | message_type=OmciCreate.message_id, |
| 632 | omci_message=OmciCreate( |
| 633 | entity_class=VlanTaggingFilterData.class_id, |
| 634 | entity_id=entity_id, |
| 635 | data=dict( |
| 636 | vlan_filter_0=vlan_id, |
| 637 | forward_operation=0x10, |
| 638 | number_of_entries=1 |
| 639 | ) |
| 640 | ) |
| 641 | ) |
| 642 | self.send_omci_message(frame) |
| 643 | |
Steve Crooks | 46d6430 | 2017-03-10 15:11:06 -0500 | [diff] [blame] | 644 | def send_create_extended_vlan_tagging_operation_configuration_data(self, |
| 645 | entity_id, |
| 646 | assoc_type, |
| 647 | assoc_me): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 648 | frame = OmciFrame( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 649 | transaction_id=self.get_tx_id(), |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 650 | message_type=OmciCreate.message_id, |
| 651 | omci_message=OmciCreate( |
| 652 | entity_class= |
| 653 | ExtendedVlanTaggingOperationConfigurationData.class_id, |
| 654 | entity_id=entity_id, |
| 655 | data=dict( |
Steve Crooks | 46d6430 | 2017-03-10 15:11:06 -0500 | [diff] [blame] | 656 | association_type=assoc_type, |
| 657 | associated_me_pointer=assoc_me |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 658 | ) |
| 659 | ) |
| 660 | ) |
| 661 | self.send_omci_message(frame) |
| 662 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 663 | def send_set_extended_vlan_tagging_operation_tpid_configuration_data(self, |
| 664 | entity_id, |
| 665 | input_tpid, |
| 666 | output_tpid): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 667 | data = dict( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 668 | input_tpid=input_tpid, |
| 669 | output_tpid=output_tpid, |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 670 | downstream_mode=0, # inverse of upstream |
| 671 | ) |
| 672 | frame = OmciFrame( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 673 | transaction_id=self.get_tx_id(), |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 674 | message_type=OmciSet.message_id, |
| 675 | omci_message=OmciSet( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 676 | entity_class= |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 677 | ExtendedVlanTaggingOperationConfigurationData.class_id, |
| 678 | entity_id=entity_id, |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 679 | attributes_mask= |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 680 | ExtendedVlanTaggingOperationConfigurationData.mask_for( |
| 681 | *data.keys()), |
| 682 | data=data |
| 683 | ) |
| 684 | ) |
| 685 | self.send_omci_message(frame) |
| 686 | |
Steve Crooks | a9d0a7c | 2017-03-28 22:40:01 -0400 | [diff] [blame] | 687 | def send_set_extended_vlan_tagging_operation_vlan_configuration_data_untagged(self, |
| 688 | entity_id, |
| 689 | filter_inner_vid, |
| 690 | treatment_inner_vid): |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 691 | data = dict( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 692 | received_frame_vlan_tagging_operation_table= |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 693 | VlanTaggingOperation( |
| 694 | filter_outer_priority=15, |
Steve Crooks | 46d6430 | 2017-03-10 15:11:06 -0500 | [diff] [blame] | 695 | filter_outer_vid=4096, |
| 696 | filter_outer_tpid_de=0, |
| 697 | |
| 698 | filter_inner_priority=15, |
| 699 | filter_inner_vid=filter_inner_vid, |
| 700 | filter_inner_tpid_de=0, |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 701 | filter_ether_type=0, |
Steve Crooks | 46d6430 | 2017-03-10 15:11:06 -0500 | [diff] [blame] | 702 | |
| 703 | treatment_tags_to_remove=0, |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 704 | treatment_outer_priority=15, |
Steve Crooks | 46d6430 | 2017-03-10 15:11:06 -0500 | [diff] [blame] | 705 | treatment_outer_vid=0, |
| 706 | treatment_outer_tpid_de=0, |
| 707 | |
| 708 | treatment_inner_priority=0, |
| 709 | treatment_inner_vid=treatment_inner_vid, |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 710 | treatment_inner_tpid_de=4 |
| 711 | ) |
| 712 | ) |
| 713 | frame = OmciFrame( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 714 | transaction_id=self.get_tx_id(), |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 715 | message_type=OmciSet.message_id, |
| 716 | omci_message=OmciSet( |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 717 | entity_class= |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 718 | ExtendedVlanTaggingOperationConfigurationData.class_id, |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 719 | entity_id=entity_id, |
| 720 | attributes_mask= |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 721 | ExtendedVlanTaggingOperationConfigurationData.mask_for( |
| 722 | *data.keys()), |
| 723 | data=data |
| 724 | ) |
| 725 | ) |
| 726 | self.send_omci_message(frame) |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 727 | |
Steve Crooks | a9d0a7c | 2017-03-28 22:40:01 -0400 | [diff] [blame] | 728 | def send_set_extended_vlan_tagging_operation_vlan_configuration_data_single_tag(self, |
| 729 | entity_id, |
| 730 | filter_inner_priority, |
| 731 | filter_inner_vid, |
| 732 | filter_inner_tpid_de, |
| 733 | treatment_tags_to_remove, |
| 734 | treatment_inner_priority, |
| 735 | treatment_inner_vid): |
| 736 | data = dict( |
| 737 | received_frame_vlan_tagging_operation_table= |
| 738 | VlanTaggingOperation( |
| 739 | filter_outer_priority=15, |
| 740 | filter_outer_vid=4096, |
| 741 | filter_outer_tpid_de=0, |
| 742 | |
| 743 | filter_inner_priority=filter_inner_priority, |
| 744 | filter_inner_vid=filter_inner_vid, |
| 745 | filter_inner_tpid_de=filter_inner_tpid_de, |
| 746 | filter_ether_type=0, |
| 747 | |
| 748 | treatment_tags_to_remove=treatment_tags_to_remove, |
| 749 | treatment_outer_priority=15, |
| 750 | treatment_outer_vid=0, |
| 751 | treatment_outer_tpid_de=0, |
| 752 | |
| 753 | treatment_inner_priority=treatment_inner_priority, |
| 754 | treatment_inner_vid=treatment_inner_vid, |
| 755 | treatment_inner_tpid_de=4 |
| 756 | ) |
| 757 | ) |
| 758 | frame = OmciFrame( |
| 759 | transaction_id=self.get_tx_id(), |
| 760 | message_type=OmciSet.message_id, |
| 761 | omci_message=OmciSet( |
| 762 | entity_class= |
| 763 | ExtendedVlanTaggingOperationConfigurationData.class_id, |
| 764 | entity_id=entity_id, |
| 765 | attributes_mask= |
| 766 | ExtendedVlanTaggingOperationConfigurationData.mask_for( |
| 767 | *data.keys()), |
| 768 | data=data |
| 769 | ) |
| 770 | ) |
| 771 | self.send_omci_message(frame) |
| 772 | |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 773 | def send_create_multicast_operations_profile(self, |
| 774 | entity_id, |
| 775 | igmp_ver): |
| 776 | frame = OmciFrame( |
| 777 | transaction_id=self.get_tx_id(), |
| 778 | message_type=OmciCreate.message_id, |
| 779 | omci_message=OmciCreate( |
| 780 | entity_class= |
| 781 | MulticastOperationsProfile.class_id, |
| 782 | entity_id=entity_id, |
| 783 | data=dict( |
| 784 | igmp_version=igmp_ver, |
| 785 | igmp_function=0, |
| 786 | immediate_leave=0 |
| 787 | ) |
| 788 | ) |
| 789 | ) |
| 790 | self.send_omci_message(frame) |
| 791 | |
| 792 | def send_set_multicast_operations_profile_acl_row0(self, |
| 793 | entity_id, |
| 794 | acl_table, |
| 795 | row_key, |
| 796 | gem_port, |
| 797 | vlan, |
| 798 | src_ip, |
| 799 | dst_ip_start, |
| 800 | dst_ip_end): |
| 801 | row0 = AccessControlRow0( |
| 802 | set_ctrl=1, |
| 803 | row_part_id=0, |
| 804 | test=0, |
| 805 | row_key=row_key, |
| 806 | gem_port_id=gem_port, |
| 807 | vlan_id=vlan, |
| 808 | src_ip=src_ip, |
| 809 | dst_ip_start=dst_ip_start, |
| 810 | dst_ip_end=dst_ip_end, |
| 811 | ipm_group_bw=0 |
| 812 | ) |
| 813 | |
| 814 | if acl_table == 'dynamic': |
| 815 | data = dict( |
| 816 | dynamic_access_control_list_table=row0 |
| 817 | ) |
| 818 | else: |
| 819 | data = dict( |
| 820 | static_access_control_list_table=row0 |
| 821 | ) |
| 822 | |
| 823 | frame = OmciFrame( |
| 824 | transaction_id=self.get_tx_id(), |
| 825 | message_type=OmciSet.message_id, |
| 826 | omci_message=OmciSet( |
| 827 | entity_class=MulticastOperationsProfile.class_id, |
| 828 | entity_id=entity_id, |
| 829 | attributes_mask=MulticastOperationsProfile.mask_for( |
| 830 | *data.keys()), |
| 831 | data=data |
| 832 | ) |
| 833 | ) |
| 834 | self.send_omci_message(frame) |
| 835 | |
| 836 | def send_set_multicast_operations_profile_ds_igmp_mcast_tci(self, |
| 837 | entity_id, |
| 838 | ctrl_type, |
| 839 | tci): |
| 840 | data = dict( |
| 841 | ds_igmp_mcast_tci= |
| 842 | DownstreamIgmpMulticastTci( |
| 843 | ctrl_type=ctrl_type, |
| 844 | tci=tci |
| 845 | ) |
| 846 | ) |
| 847 | frame = OmciFrame( |
| 848 | transaction_id=self.get_tx_id(), |
| 849 | message_type=OmciSet.message_id, |
| 850 | omci_message=OmciSet( |
| 851 | entity_class=MulticastOperationsProfile.class_id, |
| 852 | entity_id=entity_id, |
| 853 | attributes_mask=MulticastOperationsProfile.mask_for( |
| 854 | *data.keys()), |
| 855 | data=data |
| 856 | ) |
| 857 | ) |
| 858 | self.send_omci_message(frame) |
| 859 | |
| 860 | def send_create_multicast_subscriber_config_info(self, |
| 861 | entity_id, |
| 862 | me_type, |
| 863 | mcast_oper_profile): |
| 864 | frame = OmciFrame( |
| 865 | transaction_id=self.get_tx_id(), |
| 866 | message_type=OmciCreate.message_id, |
| 867 | omci_message=OmciCreate( |
| 868 | entity_class= |
| 869 | MulticastSubscriberConfigInfo.class_id, |
| 870 | entity_id=entity_id, |
| 871 | data=dict( |
| 872 | me_type=me_type, |
| 873 | mcast_operations_profile_pointer=mcast_oper_profile |
| 874 | ) |
| 875 | ) |
| 876 | ) |
| 877 | self.send_omci_message(frame) |
| 878 | |
| 879 | def send_set_multicast_subscriber_config_info(self, |
| 880 | entity_id, |
| 881 | max_groups=0, |
| 882 | max_mcast_bw=0, |
| 883 | bw_enforcement=0): |
| 884 | data = dict( |
| 885 | max_simultaneous_groups=max_groups, |
| 886 | max_multicast_bandwidth=max_mcast_bw, |
| 887 | bandwidth_enforcement=bw_enforcement |
| 888 | ) |
| 889 | frame = OmciFrame( |
| 890 | transaction_id=self.get_tx_id(), |
| 891 | message_type=OmciSet.message_id, |
| 892 | omci_message=OmciSet( |
| 893 | entity_class=MulticastSubscriberConfigInfo.class_id, |
| 894 | entity_id=entity_id, |
| 895 | attributes_mask=MulticastSubscriberConfigInfo.mask_for( |
| 896 | *data.keys()), |
| 897 | data=data |
| 898 | ) |
| 899 | ) |
| 900 | self.send_omci_message(frame) |
| 901 | |
| 902 | def send_set_multicast_service_package(self, |
| 903 | entity_id, |
| 904 | row_key, |
| 905 | vid_uni, |
| 906 | max_groups, |
| 907 | max_mcast_bw, |
| 908 | mcast_oper_profile): |
| 909 | data = dict( |
| 910 | multicast_service_package_table= |
| 911 | MulticastServicePackage( |
| 912 | set_ctrl=1, |
| 913 | row_key=row_key, |
| 914 | |
| 915 | vid_uni=vid_uni, |
| 916 | max_simultaneous_groups=max_groups, |
| 917 | max_multicast_bw=max_mcast_bw, |
| 918 | mcast_operations_profile_pointer=mcast_oper_profile |
| 919 | ) |
| 920 | ) |
| 921 | frame = OmciFrame( |
| 922 | transaction_id=self.get_tx_id(), |
| 923 | message_type=OmciSet.message_id, |
| 924 | omci_message=OmciSet( |
| 925 | entity_class=MulticastSubscriberConfigInfo.class_id, |
| 926 | entity_id=entity_id, |
| 927 | attributes_mask=MulticastSubscriberConfigInfo.mask_for( |
| 928 | *data.keys()), |
| 929 | data=data |
| 930 | ) |
| 931 | ) |
| 932 | self.send_omci_message(frame) |
| 933 | |
| 934 | def send_set_multicast_allowed_preview_groups_row0(self, |
| 935 | entity_id, |
| 936 | row_key, |
| 937 | src_ip, |
| 938 | vlan_id_ani, |
| 939 | vlan_id_uni): |
| 940 | data = dict( |
| 941 | allowed_preview_groups_table= |
| 942 | AllowedPreviewGroupsRow0( |
| 943 | set_ctrl=1, |
| 944 | row_part_id=0, |
| 945 | row_key=row_key, |
| 946 | |
| 947 | src_ip=src_ip, |
| 948 | vlan_id_ani=vlan_id_ani, |
| 949 | vlan_id_uni=vlan_id_uni |
| 950 | ) |
| 951 | ) |
| 952 | frame = OmciFrame( |
| 953 | transaction_id=self.get_tx_id(), |
| 954 | message_type=OmciSet.message_id, |
| 955 | omci_message=OmciSet( |
| 956 | entity_class=MulticastSubscriberConfigInfo.class_id, |
| 957 | entity_id=entity_id, |
| 958 | attributes_mask=MulticastSubscriberConfigInfo.mask_for( |
| 959 | *data.keys()), |
| 960 | data=data |
| 961 | ) |
| 962 | ) |
| 963 | self.send_omci_message(frame) |
| 964 | |
| 965 | def send_set_multicast_allowed_preview_groups_row1(self, |
| 966 | entity_id, |
| 967 | row_key, |
| 968 | dst_ip, |
| 969 | duration, |
| 970 | time_left): |
| 971 | data = dict( |
| 972 | allowed_preview_groups_table= |
| 973 | AllowedPreviewGroupsRow1( |
| 974 | set_ctrl=1, |
| 975 | row_part_id=1, |
| 976 | row_key=row_key, |
| 977 | |
| 978 | dst_ip=dst_ip, |
| 979 | duration=duration, |
| 980 | time_left=time_left |
| 981 | ) |
| 982 | ) |
| 983 | frame = OmciFrame( |
| 984 | transaction_id=self.get_tx_id(), |
| 985 | message_type=OmciSet.message_id, |
| 986 | omci_message=OmciSet( |
| 987 | entity_class=MulticastSubscriberConfigInfo.class_id, |
| 988 | entity_id=entity_id, |
| 989 | attributes_mask=MulticastSubscriberConfigInfo.mask_for( |
| 990 | *data.keys()), |
| 991 | data=data |
| 992 | ) |
| 993 | ) |
| 994 | self.send_omci_message(frame) |
| 995 | |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 996 | @inlineCallbacks |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 997 | def wait_for_response(self): |
| 998 | log.info('wait-for-response') |
| 999 | try: |
| 1000 | response = yield self.incoming_messages.get() |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 1001 | log.info('got-response') |
| 1002 | # resp = OmciFrame(response) |
| 1003 | # resp.show() |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1004 | except Exception as e: |
| 1005 | self.log.info('wait-for-response-exception', exc=str(e)) |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 1006 | |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1007 | @inlineCallbacks |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1008 | def message_exchange(self, onu, gem, cvid): |
| 1009 | log.info('message_exchange', onu=onu, gem=gem, cvid=cvid) |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 1010 | # reset incoming message queue |
| 1011 | while self.incoming_messages.pending: |
| 1012 | _ = yield self.incoming_messages.get() |
| 1013 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1014 | tcont = gem |
| 1015 | |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 1016 | # construct message |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1017 | # MIB Reset - OntData - 0 |
| 1018 | self.send_mib_reset() |
| 1019 | yield self.wait_for_response() |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 1020 | |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1021 | # Create AR - GalEthernetProfile - 1 |
| 1022 | self.send_create_gal_ethernet_profile(1, 48) |
| 1023 | yield self.wait_for_response() |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 1024 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1025 | # TCONT config |
| 1026 | # Set AR - TCont - 32769 - (1025 or 1026) |
| 1027 | self.send_set_tcont(0x8001, tcont) |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1028 | yield self.wait_for_response() |
Zsolt Haraszti | cc153aa | 2016-12-14 02:28:59 -0800 | [diff] [blame] | 1029 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1030 | # Mapper Service config |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1031 | # Create AR - 802.1pMapperServiceProfile - 32769 |
| 1032 | self.send_create_8021p_mapper_service_profile(0x8001) |
| 1033 | yield self.wait_for_response() |
| 1034 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1035 | # MAC Bridge Service config |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1036 | # Create AR - MacBridgeServiceProfile - 513 |
| 1037 | self.send_create_mac_bridge_service_profile(0x201) |
| 1038 | yield self.wait_for_response() |
| 1039 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1040 | # GEM Port Network CTP config |
| 1041 | # Create AR - GemPortNetworkCtp - 257 - <gem> - 32769 |
| 1042 | self.send_create_gem_port_network_ctp(0x101, gem, 0x8001, "bi-directional", 0x100) |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 1043 | yield self.wait_for_response() |
| 1044 | |
| 1045 | # Create AR - GemPortNetworkCtp - 260 - 4000 - 0 |
| 1046 | self.send_create_gem_port_network_ctp(0x104, 0x0FA0, 0, "downstream", 0) |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1047 | yield self.wait_for_response() |
| 1048 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1049 | # Multicast GEM Interworking config |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1050 | # Create AR - MulticastGemInterworkingTp - 6 - 260 |
| 1051 | self.send_create_multicast_gem_interworking_tp(0x6, 0x104) |
| 1052 | yield self.wait_for_response() |
| 1053 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1054 | # GEM Interworking config |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1055 | # Create AR - GemInterworkingTp - 32770 - 257 -32769 - 1 |
| 1056 | self.send_create_gem_inteworking_tp(0x8002, 0x101, 0x8001) |
| 1057 | yield self.wait_for_response() |
| 1058 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1059 | # Mapper Service Profile config |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1060 | # Set AR - 802.1pMapperServiceProfile - 32769 - 32770 |
| 1061 | self.send_set_8021p_mapper_service_profile(0x8001, 0x8002) |
| 1062 | yield self.wait_for_response() |
| 1063 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1064 | # MAC Bridge Port config |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1065 | # Create AR - MacBridgePortConfigData - 8450 - 513 - 3 - 3 - 32769 |
| 1066 | self.send_create_mac_bridge_port_configuration_data(0x2102, 0x201, 3, 3, 0x8001) |
| 1067 | yield self.wait_for_response() |
| 1068 | |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1069 | # Create AR - MacBridgePortConfigData - 9000 - 513 - 6 - 6 - 6 |
| 1070 | self.send_create_mac_bridge_port_configuration_data(0x2328, 0x201, 6, 6, 6) |
| 1071 | yield self.wait_for_response() |
| 1072 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1073 | # VLAN Tagging Filter config |
| 1074 | # Create AR - VlanTaggingFilterData - 8450 - c-vid |
| 1075 | self.send_create_vlan_tagging_filter_data(0x2102, cvid) |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1076 | yield self.wait_for_response() |
| 1077 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1078 | # Multicast Operation Profile config |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 1079 | # Create AR - MulticastOperationsProfile |
| 1080 | self.send_create_multicast_operations_profile(0x201, 3) |
| 1081 | yield self.wait_for_response() |
| 1082 | |
| 1083 | # Set AR - MulticastOperationsProfile - Dynamic Access Control List table |
| 1084 | self.send_set_multicast_operations_profile_acl_row0(0x201, |
| 1085 | 'dynamic', |
| 1086 | 0, |
| 1087 | 0x0fa0, |
| 1088 | 0x0fa0, |
| 1089 | '0.0.0.0', |
| 1090 | '224.0.0.0', |
| 1091 | '239.255.255.255') |
| 1092 | yield self.wait_for_response() |
| 1093 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1094 | # Multicast Subscriber config |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 1095 | # Create AR - MulticastSubscriberConfigInfo |
| 1096 | self.send_create_multicast_subscriber_config_info(0x201, 0, 0x201) |
| 1097 | yield self.wait_for_response() |
| 1098 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1099 | # Multicast Operation Profile config |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 1100 | # Set AR - MulticastOperationsProfile - Downstream IGMP Multicast TCI |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1101 | self.send_set_multicast_operations_profile_ds_igmp_mcast_tci(0x201, 4, cvid) |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 1102 | yield self.wait_for_response() |
| 1103 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1104 | # Port 2 |
| 1105 | # Extended VLAN Tagging Operation config |
| 1106 | # Create AR - ExtendedVlanTaggingOperationConfigData - 514 - 2 - 0x102 |
| 1107 | # TODO: add entry here for additional UNI interfaces |
Steve Crooks | 9e85ce8 | 2017-03-20 12:00:53 -0400 | [diff] [blame] | 1108 | self.send_create_extended_vlan_tagging_operation_configuration_data(0x202, 2, 0x102) |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1109 | yield self.wait_for_response() |
| 1110 | |
| 1111 | # Set AR - ExtendedVlanTaggingOperationConfigData - 514 - 8100 - 8100 |
Steve Crooks | 46d6430 | 2017-03-10 15:11:06 -0500 | [diff] [blame] | 1112 | self.send_set_extended_vlan_tagging_operation_tpid_configuration_data(0x202, 0x8100, 0x8100) |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1113 | yield self.wait_for_response() |
| 1114 | |
Steve Crooks | 46d6430 | 2017-03-10 15:11:06 -0500 | [diff] [blame] | 1115 | # Set AR - ExtendedVlanTaggingOperationConfigData |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1116 | # 514 - RxVlanTaggingOperationTable - add VLAN <cvid> to priority tagged pkts - c-vid |
| 1117 | #self.send_set_extended_vlan_tagging_operation_vlan_configuration_data_single_tag(0x202, 8, 0, 0, 1, 8, cvid) |
Steve Crooks | a9d0a7c | 2017-03-28 22:40:01 -0400 | [diff] [blame] | 1118 | #yield self.wait_for_response() |
| 1119 | |
| 1120 | # Set AR - ExtendedVlanTaggingOperationConfigData |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1121 | # 514 - RxVlanTaggingOperationTable - add VLAN <cvid> to untagged pkts - c-vid |
| 1122 | self.send_set_extended_vlan_tagging_operation_vlan_configuration_data_untagged(0x202, 0x1000, cvid) |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1123 | yield self.wait_for_response() |
| 1124 | |
Steve Crooks | 9b160d7 | 2017-03-31 10:48:29 -0500 | [diff] [blame^] | 1125 | # MAC Bridge Port config |
| 1126 | # Create AR - MacBridgePortConfigData - 513 - 513 - 1 - 1 - 0x102 |
| 1127 | # TODO: add more entries here for other UNI ports |
| 1128 | self.send_create_mac_bridge_port_configuration_data(0x201, 0x201, 2, 1, 0x102) |
| 1129 | yield self.wait_for_response() |
| 1130 | |
| 1131 | # Port 5 |
| 1132 | # Extended VLAN Tagging Operation config |
| 1133 | # Create AR - ExtendedVlanTaggingOperationConfigData - 514 - 2 - 0x102 |
| 1134 | # TODO: add entry here for additional UNI interfaces |
| 1135 | self.send_create_extended_vlan_tagging_operation_configuration_data(0x205, 2, 0x105) |
| 1136 | yield self.wait_for_response() |
| 1137 | |
| 1138 | # Set AR - ExtendedVlanTaggingOperationConfigData - 514 - 8100 - 8100 |
| 1139 | self.send_set_extended_vlan_tagging_operation_tpid_configuration_data(0x205, 0x8100, 0x8100) |
| 1140 | yield self.wait_for_response() |
| 1141 | |
| 1142 | # Set AR - ExtendedVlanTaggingOperationConfigData |
| 1143 | # 514 - RxVlanTaggingOperationTable - add VLAN <cvid> to priority tagged pkts - c-vid |
| 1144 | #self.send_set_extended_vlan_tagging_operation_vlan_configuration_data_single_tag(0x205, 8, 0, 0, 1, 8, cvid) |
| 1145 | #yield self.wait_for_response() |
| 1146 | |
| 1147 | # Set AR - ExtendedVlanTaggingOperationConfigData |
| 1148 | # 514 - RxVlanTaggingOperationTable - add VLAN <cvid> to untagged pkts - c-vid |
| 1149 | self.send_set_extended_vlan_tagging_operation_vlan_configuration_data_untagged(0x205, 0x1000, cvid) |
| 1150 | yield self.wait_for_response() |
| 1151 | |
| 1152 | # MAC Bridge Port config |
| 1153 | # Create AR - MacBridgePortConfigData - 513 - 513 - 1 - 1 - 0x102 |
| 1154 | # TODO: add more entries here for other UNI ports |
| 1155 | self.send_create_mac_bridge_port_configuration_data(0x205, 0x201, 5, 1, 0x105) |
Steve Crooks | 3c2c758 | 2017-01-10 15:02:26 -0600 | [diff] [blame] | 1156 | yield self.wait_for_response() |