Remove use of 'cls.enabled = False'

Various network scenario tests have been setting this attribute
when raising skip exceptions.  It appears to no longer be used for
anything and can be removed.

Change-Id: I368f9e08cba6372010b9fed47f7730160e9d60b1
This commit is contained in:
Adam Gandelman 2014-12-12 11:03:14 -08:00
parent 59101f7ea3
commit 721f80d90d
5 changed files with 1 additions and 8 deletions

View File

@ -48,12 +48,10 @@ class TestLoadBalancerBasic(manager.NetworkScenarioTest):
cfg = config.network
if not test.is_extension_enabled('lbaas', 'network'):
msg = 'LBaaS Extension is not enabled'
cls.enabled = False
raise cls.skipException(msg)
if not (cfg.tenant_networks_reachable or cfg.public_network_id):
msg = ('Either tenant_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False
raise cls.skipException(msg)
@classmethod

View File

@ -46,7 +46,6 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
or CONF.network.public_network_id):
msg = ('Either tenant_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False
raise cls.skipException(msg)
@classmethod

View File

@ -83,7 +83,6 @@ class TestNetworkBasicOps(manager.NetworkScenarioTest):
or CONF.network.public_network_id):
msg = ('Either tenant_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False
raise cls.skipException(msg)
@classmethod

View File

@ -42,14 +42,13 @@ class TestGettingAddress(manager.NetworkScenarioTest):
def check_preconditions(cls):
if not (CONF.network_feature_enabled.ipv6
and CONF.network_feature_enabled.ipv6_subnet_attributes):
cls.enabled = False
raise cls.skipException('IPv6 or its attributes not supported')
if not (CONF.network.tenant_networks_reachable
or CONF.network.public_network_id):
msg = ('Either tenant_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False
raise cls.skipException(msg)
super(TestGettingAddress, cls).check_preconditions()
def setUp(self):

View File

@ -116,14 +116,12 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
def check_preconditions(cls):
if CONF.baremetal.driver_enabled:
msg = ('Not currently supported by baremetal.')
cls.enabled = False
raise cls.skipException(msg)
super(TestSecurityGroupsBasicOps, cls).check_preconditions()
if not (CONF.network.tenant_networks_reachable or
CONF.network.public_network_id):
msg = ('Either tenant_networks_reachable must be "true", or '
'public_network_id must be defined.')
cls.enabled = False
raise cls.skipException(msg)
@classmethod