Make Quantum plugin fill in the 'bridge' name

There is a comment in the quantum driver code that says it
ignores the 'bridge' name field. This is misleading, because
the bridge name is still required by any virt drivers when
configuring VIFs so they know how to connect them.

Currently the libvirt Bridge driver invents a bridge name
based on 'qbr' and network['id'], while the OVS drivers
use the libvirt_ovs_bridge config. Move this logic into
the Quantum driver, renaming the config option to
quantum_ovs_bridge. The config option should go away completely
once Quantum can pass across the name, as it does for vif_type

Blueprint: libvirt-vif-driver
Change-Id: Ib043e1e6af5712ae1d1665cdca2e9fdbc89d4351
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2013-01-04 12:22:20 +00:00
parent 3dca180e08
commit e08e48dfde

View File

@@ -229,7 +229,7 @@ class LibvirtVifTestCase(test.TestCase):
self.assertEqual(node.get("type"), "bridge")
br_name = node.find("source").get("bridge")
self.assertEqual(br_name, CONF.libvirt_ovs_bridge)
self.assertEqual(br_name, "br0")
mac = node.find("mac").get("address")
self.assertEqual(mac, self.mapping['mac'])
vp = node.find("virtualport")
@@ -257,7 +257,7 @@ class LibvirtVifTestCase(test.TestCase):
mac = node.find("mac").get("address")
self.assertEqual(mac, self.mapping['mac'])
br_name = node.find("source").get("bridge")
self.assertTrue(br_name.startswith("brq"))
self.assertEqual(br_name, "br0")
def test_quantum_hybrid_driver(self):
d = vif.LibvirtHybridOVSBridgeDriver()