Add reverse map for nvp and associated test cases
This commit is contained in:
parent
f7ffeee2ed
commit
fc20cbcb48
@ -78,8 +78,9 @@ def remap_plugin(plugin):
|
|||||||
''' Remaps plugin name for renames/switches in packaging '''
|
''' Remaps plugin name for renames/switches in packaging '''
|
||||||
release = get_os_codename_install_source(config('openstack-origin'))
|
release = get_os_codename_install_source(config('openstack-origin'))
|
||||||
if plugin == 'nvp' and release >= 'icehouse':
|
if plugin == 'nvp' and release >= 'icehouse':
|
||||||
# Remap nvp plugin to nsx for releases >= icehouse
|
|
||||||
plugin = 'nsx'
|
plugin = 'nsx'
|
||||||
|
elif plugin == 'nsx' and release < 'icehouse':
|
||||||
|
plugin = 'nvp'
|
||||||
return plugin
|
return plugin
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ ovs_use_veth = True
|
|||||||
{% if instance_mtu -%}
|
{% if instance_mtu -%}
|
||||||
dnsmasq_config_file = /etc/neutron/dnsmasq.conf
|
dnsmasq_config_file = /etc/neutron/dnsmasq.conf
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{% if plugin == 'nvp' -%}
|
{% if plugin == 'nvp' or plugin == 'nsx' -%}
|
||||||
enable_metadata_network = True
|
enable_metadata_network = True
|
||||||
enable_isolated_metadata = True
|
enable_isolated_metadata = True
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
@ -308,10 +308,12 @@ class TestMisc(CharmTestCase):
|
|||||||
def test_remap_plugin(self):
|
def test_remap_plugin(self):
|
||||||
self.get_os_codename_install_source.return_value = 'havana'
|
self.get_os_codename_install_source.return_value = 'havana'
|
||||||
self.assertEquals(quantum_contexts.remap_plugin('nvp'), 'nvp')
|
self.assertEquals(quantum_contexts.remap_plugin('nvp'), 'nvp')
|
||||||
|
self.assertEquals(quantum_contexts.remap_plugin('nsx'), 'nvp')
|
||||||
|
|
||||||
def test_remap_plugin_icehouse(self):
|
def test_remap_plugin_icehouse(self):
|
||||||
self.get_os_codename_install_source.return_value = 'icehouse'
|
self.get_os_codename_install_source.return_value = 'icehouse'
|
||||||
self.assertEquals(quantum_contexts.remap_plugin('nvp'), 'nsx')
|
self.assertEquals(quantum_contexts.remap_plugin('nvp'), 'nsx')
|
||||||
|
self.assertEquals(quantum_contexts.remap_plugin('nsx'), 'nsx')
|
||||||
|
|
||||||
def test_remap_plugin_noop(self):
|
def test_remap_plugin_noop(self):
|
||||||
self.get_os_codename_install_source.return_value = 'icehouse'
|
self.get_os_codename_install_source.return_value = 'icehouse'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user