update for nvp support
This commit is contained in:
parent
812a18652b
commit
4d891fd2b7
@ -80,7 +80,6 @@ NEUTRON_GATEWAY_PKGS = {
|
||||
"nova-api-metadata"
|
||||
],
|
||||
NVP: [
|
||||
"openvswitch-switch",
|
||||
"neutron-dhcp-agent",
|
||||
'python-mysqldb',
|
||||
'python-oslo.config', # Force upgrade
|
||||
@ -95,7 +94,7 @@ GATEWAY_PKGS = {
|
||||
|
||||
EARLY_PACKAGES = {
|
||||
OVS: ['openvswitch-datapath-dkms'],
|
||||
NVP: ['openvswitch-datapath-dkms']
|
||||
NVP: []
|
||||
}
|
||||
|
||||
|
||||
@ -396,13 +395,11 @@ def do_openstack_upgrade(configs):
|
||||
|
||||
|
||||
def configure_ovs():
|
||||
if not service_running('openvswitch-switch'):
|
||||
full_restart()
|
||||
if config('plugin') == OVS:
|
||||
if not service_running('openvswitch-switch'):
|
||||
full_restart()
|
||||
add_bridge(INT_BRIDGE)
|
||||
add_bridge(EXT_BRIDGE)
|
||||
ext_port = config('ext-port')
|
||||
if ext_port:
|
||||
add_bridge_port(EXT_BRIDGE, ext_port)
|
||||
if config('plugin') == NVP:
|
||||
add_bridge(INT_BRIDGE)
|
||||
|
@ -60,7 +60,7 @@ class TestQuantumUtils(CharmTestCase):
|
||||
self.config.return_value = 'nvp'
|
||||
self.assertEquals(
|
||||
quantum_utils.get_early_packages(),
|
||||
['openvswitch-datapath-dkms', 'linux-headers-2.6.18'])
|
||||
[])
|
||||
|
||||
@patch.object(quantum_utils, 'EARLY_PACKAGES')
|
||||
def test_get_early_packages_no_dkms(self, _early_packages):
|
||||
@ -76,6 +76,7 @@ class TestQuantumUtils(CharmTestCase):
|
||||
self.assertNotEqual(quantum_utils.get_packages(), [])
|
||||
|
||||
def test_configure_ovs_starts_service_if_required(self):
|
||||
self.config.return_value = 'ovs'
|
||||
self.service_running.return_value = False
|
||||
quantum_utils.configure_ovs()
|
||||
self.assertTrue(self.full_restart.called)
|
||||
@ -96,11 +97,6 @@ class TestQuantumUtils(CharmTestCase):
|
||||
])
|
||||
self.add_bridge_port.assert_called_with('br-ex', 'eth0')
|
||||
|
||||
def test_configure_ovs_nvp(self):
|
||||
self.config.return_value = 'nvp'
|
||||
quantum_utils.configure_ovs()
|
||||
self.add_bridge.assert_called_with('br-int')
|
||||
|
||||
def test_do_openstack_upgrade(self):
|
||||
self.config.side_effect = self.test_config.get
|
||||
self.test_config.set('openstack-origin', 'cloud:precise-havana')
|
||||
|
Loading…
x
Reference in New Issue
Block a user