]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add unit tests for ML2 DVR port binding and fix PortContext inconsistencies
authorRobert Kukura <kukura@noironetworks.com>
Wed, 1 Apr 2015 21:11:59 +0000 (17:11 -0400)
committerRobert Kukura <kukura@noironetworks.com>
Mon, 11 May 2015 21:03:31 +0000 (17:03 -0400)
commit922dae45d0a223f9256bdff1faa65d469cbc9275
treeb58c1b64e256426b1a6cc7b3862f8cf8a02fb513
parent62ccf394c21eed132277b87b2428632efb07f1b0
Add unit tests for ML2 DVR port binding and fix PortContext inconsistencies

Extends the existing ML2 port binding unit tests to cover the
distributed port bindings used for DVR. Within the test mechanism
driver, bindings are tracked per-host, and additional assertions are
added.

Fixes issues with PortContext attributes that were exposed by these
new tests. Adds new vif_type, original_vif_type, vif_details, and
original_vif_details PortContext attributes, similar to the exising
host, original_host, status, and original_status attributes, to
reflect host-specific details of distributed (or normal) port
bindings. Also fixes original_host and original_status to return None
when in the context of an operation other than an update, and fixes
original_host to reflect the specific host being bound for a
distributed port.

Closes-bug: 1453943
Closes-bug: 1453955
Change-Id: I467db0d48e4b82fdaad8d851e294e639a84a8160
neutron/plugins/ml2/driver_api.py
neutron/plugins/ml2/driver_context.py
neutron/plugins/ml2/plugin.py
neutron/plugins/ml2/rpc.py
neutron/tests/unit/plugins/ml2/_test_mech_agent.py
neutron/tests/unit/plugins/ml2/drivers/mechanism_logger.py
neutron/tests/unit/plugins/ml2/drivers/mechanism_test.py
neutron/tests/unit/plugins/ml2/test_port_binding.py