]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Make sure datapath_type is updated on bridges changed
authorTerry Wilson <twilson@redhat.com>
Wed, 6 Jan 2016 07:19:31 +0000 (01:19 -0600)
committerTerry Wilson <twilson@redhat.com>
Tue, 12 Jan 2016 16:10:49 +0000 (16:10 +0000)
commit71fa1820008b998809890c52b366c8acf9cb72a4
treec5d675ee1a1e47c34e9fc95a981172b581f0a6ed
parent8e5424865386dfce5c01864a63474711caad760b
Make sure datapath_type is updated on bridges changed

When changing datapath_type in the config, physical and tunnel bridges
do not have their datapath_type updated. Calling create() on already
created bridges should be safe as it passes '--may-exist' when adding
the bridge, which will do nothing if the bridge already exists, but
the second part of the transaction will still update things like
datapath_type.

It should be noted that ancillary bridges (like br-ex) are not
modified by this patch as datapath_type was never applied to them to
begin with.

Incidentally, the native and vsctl versions behaved slightly
differently when handling datapath_type: vsctl builds the multi-cmd
transaction with add-br ... -- set ..., so that the second cmd would
actually complete. The native just bailed if may_exist and the bridge
existed. This is fixed as part of this patch.

Change-Id: Ib8bc817c7bc724d80193d0ca7af480a7ea103f77
Closes-Bug: 1532273
neutron/agent/ovsdb/native/commands.py
neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/functional/agent/l2/base.py
neutron/tests/functional/agent/test_l2_ovs_agent.py
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py