]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
ML2: Use same port binding logic for DVR ports as non-DVR ports
authorRobert Kukura <kukura@noironetworks.com>
Thu, 29 Jan 2015 22:13:00 +0000 (17:13 -0500)
committerRobert Kukura <kukura@noironetworks.com>
Tue, 3 Feb 2015 16:41:47 +0000 (11:41 -0500)
commitf9cdb351c991adca4b0ed5fdcec1dc1d765adbda
treea4ce0b8a6ed2173008b9ba01f65900d6fca1f514
parent014b4be5688479661c5b185224a1d279f95e4b94
ML2: Use same port binding logic for DVR ports as non-DVR ports

DVR ports are now bound using the same function,
Ml2Plugin._bind_port_if_needed(), that is used to bind non-DVR ports,
so that concurrent binding attempts are properly handled and mechanism
driver update_port_precommit() and update_port_postcommit() methods
are called. The Ml2Plugin._commit_dvr_port_binding() function is
eliminated, and the DvrPortContext class has been folded into the
PortContext class, reducing duplicated logic.

A followup patch will address the duplication of ML2 DB schema for DVR
and further reduce the duplicated and special-case port binding logic
supporting DVR.

Closes-Bug: 1415526
Closes-Bug: 1416783
Partial-Bug: 1367391

Change-Id: Ic32241297c5f8c67dc77d0af836b1cc0a5df988a
neutron/plugins/ml2/driver_context.py
neutron/plugins/ml2/plugin.py
neutron/tests/unit/ml2/test_driver_context.py
neutron/tests/unit/ml2/test_ml2_plugin.py
neutron/tests/unit/ml2/test_port_binding.py