Add a skip check to make sure that vlan is actually in available_type_drivers

Change-Id: I25f08dbf79ae105f6e69aee3ef948c200c9fb7ec
This commit is contained in:
lianghao 2017-04-18 15:07:01 +08:00
parent 4bffb7defb
commit c11bb0ad05
1 changed files with 3 additions and 0 deletions

View File

@ -231,6 +231,9 @@ class TrunkTestInheritJSONBase(TrunkTestJSONBase):
if not test.is_extension_enabled(ext, 'network'):
msg = "%s extension not enabled." % ext
raise cls.skipException(msg)
if ("vlan" not in
config.CONF.neutron_plugin_options.available_type_drivers):
raise cls.skipException("VLAN type_driver is not enabled")
if not config.CONF.neutron_plugin_options.provider_vlans:
raise cls.skipException("No provider VLAN networks available")