]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Replace openvswitch plugin's VlanMap with vlan_ids DB table.
authorBob Kukura <rkukura@redhat.com>
Mon, 30 Jul 2012 18:52:06 +0000 (14:52 -0400)
committerBob Kukura <rkukura@redhat.com>
Fri, 3 Aug 2012 21:29:45 +0000 (17:29 -0400)
commit88078250028d50b6d726a6bdf79874a2f4e9abce
treebf36f7d084741f9c75fe518644733cebd3676341
parentd326ec0088e2e0d464402164c0d4b5850227fcac
Replace openvswitch plugin's VlanMap with vlan_ids DB table.

Fixes bug 1023167.

The openswitch plugin's in-memory VlanMap is replaced with a vlan_ids
DB table similar to that used by the linuxbridge plugin. This will
prevent conflicting VLAN assignments if multiple server replicas are
run, and also sets the stage for phase 2 of the provider-networks BP
implementation that will add support for multiple physical
networks.

Unlike with the current linuxbridge plugin, the contents of the
openvswitch plugin's vlan_ids table are properly updated at startup in
case the vlan_min or vlan_max configuration variables have changed.

A new test_ovs_db test case has been added.

The primary key of the vlan_bindings table is changed from the vlan_id
to the network_id, which is now a foreign key, and network deletion is
now properly handled.

The net_id has been removed from the VlanIdInUse exception, requiring
a minor update to the linuxbridge plugin. The new NoNetworksAvailable
exception, with ResourceExhausted as its base class, is returned when
no more VLANs are available.

Change-Id: I65a2347dea5366cc0d15d98a88f40e42e1a45f4c
quantum/api/v2/base.py
quantum/common/exceptions.py
quantum/plugins/linuxbridge/db/l2network_db.py
quantum/plugins/linuxbridge/lb_quantum_plugin.py
quantum/plugins/linuxbridge/tests/unit/test_database.py
quantum/plugins/openvswitch/ovs_db_v2.py
quantum/plugins/openvswitch/ovs_models_v2.py
quantum/plugins/openvswitch/ovs_quantum_plugin.py
quantum/plugins/openvswitch/tests/unit/test_ovs_db.py [new file with mode: 0644]
quantum/plugins/openvswitch/tests/unit/test_vlan_map.py