Merge "NSX: allow net-migration only in combined mode"
This commit is contained in:
commit
fc832a0cd7
17
neutron/tests/unit/vmware/etc/nsx.ini.combined.test
Normal file
17
neutron/tests/unit/vmware/etc/nsx.ini.combined.test
Normal file
@ -0,0 +1,17 @@
|
||||
[DEFAULT]
|
||||
default_tz_uuid = fake_tz_uuid
|
||||
nova_zone_id = whatever
|
||||
nsx_controllers = fake_1, fake_2
|
||||
nsx_user = foo
|
||||
nsx_password = bar
|
||||
default_l3_gw_service_uuid = whatever
|
||||
default_l2_gw_service_uuid = whatever
|
||||
default_service_cluster_uuid = whatever
|
||||
default_interface_name = whatever
|
||||
req_timeout = 14
|
||||
http_timeout = 13
|
||||
redirects = 12
|
||||
retries = 11
|
||||
|
||||
[NSX]
|
||||
agent_mode = combined
|
@ -34,6 +34,7 @@ BASE_CONF_PATH = vmware.get_fake_conf('neutron.conf.test')
|
||||
NSX_INI_PATH = vmware.get_fake_conf('nsx.ini.basic.test')
|
||||
NSX_INI_FULL_PATH = vmware.get_fake_conf('nsx.ini.full.test')
|
||||
NSX_INI_AGENTLESS_PATH = vmware.get_fake_conf('nsx.ini.agentless.test')
|
||||
NSX_INI_COMBINED_PATH = vmware.get_fake_conf('nsx.ini.combined.test')
|
||||
NVP_INI_DEPR_PATH = vmware.get_fake_conf('nvp.ini.full.test')
|
||||
|
||||
|
||||
@ -158,6 +159,8 @@ class ConfigurationTest(base.BaseTestCase):
|
||||
plugin.supported_extension_aliases)
|
||||
self.assertNotIn('dhcp_agent_scheduler',
|
||||
plugin.supported_extension_aliases)
|
||||
self.assertNotIn('lsn',
|
||||
plugin.supported_extension_aliases)
|
||||
|
||||
def test_agentless_extensions_version_fail(self):
|
||||
self.config_parse(args=['--config-file', BASE_CONF_PATH,
|
||||
@ -198,6 +201,26 @@ class ConfigurationTest(base.BaseTestCase):
|
||||
self.assertIn('dhcp_agent_scheduler',
|
||||
plugin.supported_extension_aliases)
|
||||
|
||||
def test_combined_extensions(self):
|
||||
self.config_parse(args=['--config-file', BASE_CONF_PATH,
|
||||
'--config-file', NSX_INI_COMBINED_PATH])
|
||||
cfg.CONF.set_override('core_plugin', vmware.PLUGIN_NAME)
|
||||
self.assertEqual(config.AgentModes.COMBINED,
|
||||
cfg.CONF.NSX.agent_mode)
|
||||
with mock.patch.object(client.NsxApiClient,
|
||||
'get_version',
|
||||
return_value=version.Version("4.2")):
|
||||
with mock.patch.object(lsnlib,
|
||||
'service_cluster_exists',
|
||||
return_value=True):
|
||||
plugin = manager.NeutronManager().get_plugin()
|
||||
self.assertIn('agent',
|
||||
plugin.supported_extension_aliases)
|
||||
self.assertIn('dhcp_agent_scheduler',
|
||||
plugin.supported_extension_aliases)
|
||||
self.assertIn('lsn',
|
||||
plugin.supported_extension_aliases)
|
||||
|
||||
|
||||
class OldNVPConfigurationTest(base.BaseTestCase):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user