Merge "Migrate computev3 API tests to resource_* fixtures"
diff --git a/tempest/api/compute/v3/admin/test_agents.py b/tempest/api/compute/v3/admin/test_agents.py
index 9d01b71..b7c0011 100644
--- a/tempest/api/compute/v3/admin/test_agents.py
+++ b/tempest/api/compute/v3/admin/test_agents.py
@@ -23,8 +23,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(AgentsAdminV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(AgentsAdminV3Test, cls).resource_setup()
cls.client = cls.agents_admin_client
@test.attr(type='gate')
diff --git a/tempest/api/compute/v3/admin/test_aggregates.py b/tempest/api/compute/v3/admin/test_aggregates.py
index 886b6a7..1beeb13 100644
--- a/tempest/api/compute/v3/admin/test_aggregates.py
+++ b/tempest/api/compute/v3/admin/test_aggregates.py
@@ -28,8 +28,8 @@
_host_key = 'os-extended-server-attributes:host'
@classmethod
- def setUpClass(cls):
- super(AggregatesAdminV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(AggregatesAdminV3Test, cls).resource_setup()
cls.client = cls.aggregates_admin_client
cls.aggregate_name_prefix = 'test_aggregate_'
cls.az_name_prefix = 'test_az_'
diff --git a/tempest/api/compute/v3/admin/test_aggregates_negative.py b/tempest/api/compute/v3/admin/test_aggregates_negative.py
index 1505f74..093963f 100644
--- a/tempest/api/compute/v3/admin/test_aggregates_negative.py
+++ b/tempest/api/compute/v3/admin/test_aggregates_negative.py
@@ -27,8 +27,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(AggregatesAdminNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(AggregatesAdminNegativeV3Test, cls).resource_setup()
cls.client = cls.aggregates_admin_client
cls.user_client = cls.aggregates_client
cls.aggregate_name_prefix = 'test_aggregate_'
diff --git a/tempest/api/compute/v3/admin/test_availability_zone_negative.py b/tempest/api/compute/v3/admin/test_availability_zone_negative.py
index b012e65..56cdd6c 100644
--- a/tempest/api/compute/v3/admin/test_availability_zone_negative.py
+++ b/tempest/api/compute/v3/admin/test_availability_zone_negative.py
@@ -25,8 +25,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(AZAdminNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(AZAdminNegativeV3Test, cls).resource_setup()
cls.client = cls.availability_zone_admin_client
cls.non_adm_client = cls.availability_zone_client
diff --git a/tempest/api/compute/v3/admin/test_flavors.py b/tempest/api/compute/v3/admin/test_flavors.py
index 09d76b8..f307907 100644
--- a/tempest/api/compute/v3/admin/test_flavors.py
+++ b/tempest/api/compute/v3/admin/test_flavors.py
@@ -28,8 +28,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(FlavorsAdminV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(FlavorsAdminV3Test, cls).resource_setup()
cls.client = cls.flavors_admin_client
cls.user_client = cls.flavors_client
diff --git a/tempest/api/compute/v3/admin/test_flavors_access.py b/tempest/api/compute/v3/admin/test_flavors_access.py
index 09b6ebd..c79e591 100644
--- a/tempest/api/compute/v3/admin/test_flavors_access.py
+++ b/tempest/api/compute/v3/admin/test_flavors_access.py
@@ -26,8 +26,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(FlavorsAccessV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(FlavorsAccessV3Test, cls).resource_setup()
cls.client = cls.flavors_admin_client
admin_client = cls._get_identity_admin_client()
diff --git a/tempest/api/compute/v3/admin/test_flavors_access_negative.py b/tempest/api/compute/v3/admin/test_flavors_access_negative.py
index 0fdfabd..87e8cbf 100644
--- a/tempest/api/compute/v3/admin/test_flavors_access_negative.py
+++ b/tempest/api/compute/v3/admin/test_flavors_access_negative.py
@@ -29,8 +29,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(FlavorsAccessNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(FlavorsAccessNegativeV3Test, cls).resource_setup()
cls.client = cls.flavors_admin_client
cls.tenant_id = cls.client.tenant_id
diff --git a/tempest/api/compute/v3/admin/test_flavors_extra_specs.py b/tempest/api/compute/v3/admin/test_flavors_extra_specs.py
index 29cd8db..24844b1 100644
--- a/tempest/api/compute/v3/admin/test_flavors_extra_specs.py
+++ b/tempest/api/compute/v3/admin/test_flavors_extra_specs.py
@@ -27,8 +27,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(FlavorsExtraSpecsV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(FlavorsExtraSpecsV3Test, cls).resource_setup()
cls.client = cls.flavors_admin_client
flavor_name = data_utils.rand_name('test_flavor')
@@ -48,10 +48,10 @@
swap=swap, rxtx=rxtx)
@classmethod
- def tearDownClass(cls):
+ def resource_cleanup(cls):
resp, body = cls.client.delete_flavor(cls.flavor['id'])
cls.client.wait_for_resource_deletion(cls.flavor['id'])
- super(FlavorsExtraSpecsV3Test, cls).tearDownClass()
+ super(FlavorsExtraSpecsV3Test, cls).resource_cleanup()
@test.attr(type='gate')
def test_flavor_set_get_update_show_unset_keys(self):
diff --git a/tempest/api/compute/v3/admin/test_flavors_extra_specs_negative.py b/tempest/api/compute/v3/admin/test_flavors_extra_specs_negative.py
index e9c04a3..5fcd7a4 100644
--- a/tempest/api/compute/v3/admin/test_flavors_extra_specs_negative.py
+++ b/tempest/api/compute/v3/admin/test_flavors_extra_specs_negative.py
@@ -28,8 +28,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(FlavorsExtraSpecsNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(FlavorsExtraSpecsNegativeV3Test, cls).resource_setup()
cls.client = cls.flavors_admin_client
flavor_name = data_utils.rand_name('test_flavor')
@@ -49,10 +49,10 @@
swap=swap, rxtx=rxtx)
@classmethod
- def tearDownClass(cls):
+ def resource_cleanup(cls):
resp, body = cls.client.delete_flavor(cls.flavor['id'])
cls.client.wait_for_resource_deletion(cls.flavor['id'])
- super(FlavorsExtraSpecsNegativeV3Test, cls).tearDownClass()
+ super(FlavorsExtraSpecsNegativeV3Test, cls).resource_cleanup()
@test.attr(type=['negative', 'gate'])
def test_flavor_non_admin_set_keys(self):
diff --git a/tempest/api/compute/v3/admin/test_flavors_negative.py b/tempest/api/compute/v3/admin/test_flavors_negative.py
index 6d3308e..426d13e 100644
--- a/tempest/api/compute/v3/admin/test_flavors_negative.py
+++ b/tempest/api/compute/v3/admin/test_flavors_negative.py
@@ -28,8 +28,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(FlavorsAdminNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(FlavorsAdminNegativeV3Test, cls).resource_setup()
cls.client = cls.flavors_admin_client
cls.user_client = cls.flavors_client
diff --git a/tempest/api/compute/v3/admin/test_hosts.py b/tempest/api/compute/v3/admin/test_hosts.py
index 8cb1f23..898a704 100644
--- a/tempest/api/compute/v3/admin/test_hosts.py
+++ b/tempest/api/compute/v3/admin/test_hosts.py
@@ -24,8 +24,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(HostsAdminV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(HostsAdminV3Test, cls).resource_setup()
cls.client = cls.hosts_admin_client
@test.attr(type='gate')
diff --git a/tempest/api/compute/v3/admin/test_hosts_negative.py b/tempest/api/compute/v3/admin/test_hosts_negative.py
index 79cd97f..2b82baa 100644
--- a/tempest/api/compute/v3/admin/test_hosts_negative.py
+++ b/tempest/api/compute/v3/admin/test_hosts_negative.py
@@ -25,8 +25,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(HostsAdminNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(HostsAdminNegativeV3Test, cls).resource_setup()
cls.client = cls.hosts_admin_client
cls.non_admin_client = cls.hosts_client
diff --git a/tempest/api/compute/v3/admin/test_hypervisor.py b/tempest/api/compute/v3/admin/test_hypervisor.py
index 9a23789..831e20f 100644
--- a/tempest/api/compute/v3/admin/test_hypervisor.py
+++ b/tempest/api/compute/v3/admin/test_hypervisor.py
@@ -24,8 +24,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(HypervisorAdminV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(HypervisorAdminV3Test, cls).resource_setup()
cls.client = cls.hypervisor_admin_client
def _list_hypervisors(self):
diff --git a/tempest/api/compute/v3/admin/test_hypervisor_negative.py b/tempest/api/compute/v3/admin/test_hypervisor_negative.py
index ae4df15..df23b46 100644
--- a/tempest/api/compute/v3/admin/test_hypervisor_negative.py
+++ b/tempest/api/compute/v3/admin/test_hypervisor_negative.py
@@ -28,8 +28,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(HypervisorAdminNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(HypervisorAdminNegativeV3Test, cls).resource_setup()
cls.client = cls.hypervisor_admin_client
cls.non_adm_client = cls.hypervisor_client
diff --git a/tempest/api/compute/v3/admin/test_quotas.py b/tempest/api/compute/v3/admin/test_quotas.py
index 19c31fe..3dad45c 100644
--- a/tempest/api/compute/v3/admin/test_quotas.py
+++ b/tempest/api/compute/v3/admin/test_quotas.py
@@ -25,8 +25,8 @@
force_tenant_isolation = True
@classmethod
- def setUpClass(cls):
- super(QuotasAdminV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(QuotasAdminV3Test, cls).resource_setup()
cls.client = cls.quotas_client
cls.adm_client = cls.quotas_admin_client
diff --git a/tempest/api/compute/v3/admin/test_quotas_negative.py b/tempest/api/compute/v3/admin/test_quotas_negative.py
index e115e7b..86abcab 100644
--- a/tempest/api/compute/v3/admin/test_quotas_negative.py
+++ b/tempest/api/compute/v3/admin/test_quotas_negative.py
@@ -23,8 +23,8 @@
force_tenant_isolation = True
@classmethod
- def setUpClass(cls):
- super(QuotasAdminNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(QuotasAdminNegativeV3Test, cls).resource_setup()
cls.client = cls.quotas_client
cls.adm_client = cls.quotas_admin_client
diff --git a/tempest/api/compute/v3/admin/test_servers.py b/tempest/api/compute/v3/admin/test_servers.py
index d99c329..36ea7ba 100644
--- a/tempest/api/compute/v3/admin/test_servers.py
+++ b/tempest/api/compute/v3/admin/test_servers.py
@@ -26,9 +26,8 @@
_host_key = 'os-extended-server-attributes:host'
@classmethod
- @test.safe_setup
- def setUpClass(cls):
- super(ServersAdminV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ServersAdminV3Test, cls).resource_setup()
cls.client = cls.servers_admin_client
cls.non_admin_client = cls.servers_client
cls.flavors_client = cls.flavors_admin_client
diff --git a/tempest/api/compute/v3/admin/test_servers_negative.py b/tempest/api/compute/v3/admin/test_servers_negative.py
index 070dc2b..e48432b 100644
--- a/tempest/api/compute/v3/admin/test_servers_negative.py
+++ b/tempest/api/compute/v3/admin/test_servers_negative.py
@@ -32,8 +32,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(ServersAdminNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ServersAdminNegativeV3Test, cls).resource_setup()
cls.client = cls.servers_admin_client
cls.non_adm_client = cls.servers_client
cls.flavors_client = cls.flavors_admin_client
diff --git a/tempest/api/compute/v3/admin/test_services.py b/tempest/api/compute/v3/admin/test_services.py
index e6efb70..f1c3b9a 100644
--- a/tempest/api/compute/v3/admin/test_services.py
+++ b/tempest/api/compute/v3/admin/test_services.py
@@ -25,8 +25,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(ServicesAdminV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ServicesAdminV3Test, cls).resource_setup()
cls.client = cls.services_admin_client
@test.attr(type='gate')
diff --git a/tempest/api/compute/v3/admin/test_services_negative.py b/tempest/api/compute/v3/admin/test_services_negative.py
index 6ac78d4..1f9f2b1 100644
--- a/tempest/api/compute/v3/admin/test_services_negative.py
+++ b/tempest/api/compute/v3/admin/test_services_negative.py
@@ -26,8 +26,8 @@
"""
@classmethod
- def setUpClass(cls):
- super(ServicesAdminNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ServicesAdminNegativeV3Test, cls).resource_setup()
cls.client = cls.services_admin_client
cls.non_admin_client = cls.services_client
diff --git a/tempest/api/compute/v3/flavors/test_flavors_negative.py b/tempest/api/compute/v3/flavors/test_flavors_negative.py
index cdf018f..2dd7b71 100644
--- a/tempest/api/compute/v3/flavors/test_flavors_negative.py
+++ b/tempest/api/compute/v3/flavors/test_flavors_negative.py
@@ -35,6 +35,6 @@
_schema = flavors.flavors_details
@classmethod
- def setUpClass(cls):
- super(FlavorDetailsNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(FlavorDetailsNegativeV3Test, cls).resource_setup()
cls.set_resource("flavor", cls.flavor_ref)
diff --git a/tempest/api/compute/v3/images/test_images.py b/tempest/api/compute/v3/images/test_images.py
index bb81626..a234a22 100644
--- a/tempest/api/compute/v3/images/test_images.py
+++ b/tempest/api/compute/v3/images/test_images.py
@@ -23,8 +23,8 @@
class ImagesV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
- super(ImagesV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ImagesV3Test, cls).resource_setup()
if not CONF.service_available.glance:
skip_msg = ("%s skipped as glance is not available" % cls.__name__)
raise cls.skipException(skip_msg)
diff --git a/tempest/api/compute/v3/images/test_images_negative.py b/tempest/api/compute/v3/images/test_images_negative.py
index 0705bdc..83e9436 100644
--- a/tempest/api/compute/v3/images/test_images_negative.py
+++ b/tempest/api/compute/v3/images/test_images_negative.py
@@ -24,8 +24,8 @@
class ImagesNegativeV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
- super(ImagesNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ImagesNegativeV3Test, cls).resource_setup()
if not CONF.service_available.glance:
skip_msg = ("%s skipped as glance is not available" % cls.__name__)
raise cls.skipException(skip_msg)
diff --git a/tempest/api/compute/v3/images/test_images_oneserver.py b/tempest/api/compute/v3/images/test_images_oneserver.py
index edf91a7..87e730c 100644
--- a/tempest/api/compute/v3/images/test_images_oneserver.py
+++ b/tempest/api/compute/v3/images/test_images_oneserver.py
@@ -47,9 +47,8 @@
super(ImagesOneServerV3Test, self).tearDown()
@classmethod
- @test.safe_setup
- def setUpClass(cls):
- super(ImagesOneServerV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ImagesOneServerV3Test, cls).resource_setup()
cls.client = cls.images_client
if not CONF.service_available.glance:
skip_msg = ("%s skipped as glance is not available" % cls.__name__)
diff --git a/tempest/api/compute/v3/images/test_images_oneserver_negative.py b/tempest/api/compute/v3/images/test_images_oneserver_negative.py
index 544a5a5..5892cd7 100644
--- a/tempest/api/compute/v3/images/test_images_oneserver_negative.py
+++ b/tempest/api/compute/v3/images/test_images_oneserver_negative.py
@@ -55,9 +55,8 @@
self.__class__.server_id = self.rebuild_server(self.server_id)
@classmethod
- @test.safe_setup
- def setUpClass(cls):
- super(ImagesOneServerNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ImagesOneServerNegativeV3Test, cls).resource_setup()
cls.client = cls.images_client
if not CONF.service_available.glance:
skip_msg = ("%s skipped as glance is not available" % cls.__name__)
diff --git a/tempest/api/compute/v3/keypairs/test_keypairs_negative.py b/tempest/api/compute/v3/keypairs/test_keypairs_negative.py
index e426b85..1f7206a 100644
--- a/tempest/api/compute/v3/keypairs/test_keypairs_negative.py
+++ b/tempest/api/compute/v3/keypairs/test_keypairs_negative.py
@@ -23,8 +23,8 @@
class KeyPairsNegativeV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
- super(KeyPairsNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(KeyPairsNegativeV3Test, cls).resource_setup()
cls.client = cls.keypairs_client
def _create_keypair(self, keypair_name, pub_key=None):
diff --git a/tempest/api/compute/v3/servers/test_attach_interfaces.py b/tempest/api/compute/v3/servers/test_attach_interfaces.py
index c2cf7e0..d4d4fca 100644
--- a/tempest/api/compute/v3/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/v3/servers/test_attach_interfaces.py
@@ -26,14 +26,14 @@
class AttachInterfacesV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.service_available.neutron:
raise cls.skipException("Neutron is required")
if not CONF.compute_feature_enabled.interface_attach:
raise cls.skipException("Interface attachment is not available.")
# This test class requires network and subnet
cls.set_network_resources(network=True, subnet=True)
- super(AttachInterfacesV3Test, cls).setUpClass()
+ super(AttachInterfacesV3Test, cls).resource_setup()
cls.client = cls.interfaces_client
def _check_interface(self, iface, port_id=None, network_id=None,
diff --git a/tempest/api/compute/v3/servers/test_attach_volume.py b/tempest/api/compute/v3/servers/test_attach_volume.py
index e994c7f..76b5549 100644
--- a/tempest/api/compute/v3/servers/test_attach_volume.py
+++ b/tempest/api/compute/v3/servers/test_attach_volume.py
@@ -32,9 +32,9 @@
self.attached = False
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
cls.prepare_instance_network()
- super(AttachVolumeV3Test, cls).setUpClass()
+ super(AttachVolumeV3Test, cls).resource_setup()
cls.device = CONF.compute.volume_device_name
if not CONF.service_available.cinder:
skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
diff --git a/tempest/api/compute/v3/servers/test_create_server.py b/tempest/api/compute/v3/servers/test_create_server.py
index c59fe91..bcd6176 100644
--- a/tempest/api/compute/v3/servers/test_create_server.py
+++ b/tempest/api/compute/v3/servers/test_create_server.py
@@ -31,9 +31,9 @@
disk_config = 'AUTO'
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
cls.prepare_instance_network()
- super(ServersV3Test, cls).setUpClass()
+ super(ServersV3Test, cls).resource_setup()
cls.meta = {'hello': 'world'}
cls.accessIPv4 = '1.1.1.1'
cls.accessIPv6 = '0000:0000:0000:0000:0000:babe:220.12.22.2'
@@ -108,9 +108,9 @@
disk_config = 'AUTO'
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
cls.prepare_instance_network()
- super(ServersWithSpecificFlavorV3Test, cls).setUpClass()
+ super(ServersWithSpecificFlavorV3Test, cls).resource_setup()
cls.client = cls.servers_client
cls.flavor_client = cls.flavors_admin_client
@@ -192,8 +192,8 @@
disk_config = 'MANUAL'
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.compute_feature_enabled.disk_config:
msg = "DiskConfig extension not enabled."
raise cls.skipException(msg)
- super(ServersV3TestManualDisk, cls).setUpClass()
+ super(ServersV3TestManualDisk, cls).resource_setup()
diff --git a/tempest/api/compute/v3/servers/test_delete_server.py b/tempest/api/compute/v3/servers/test_delete_server.py
index e2b47ee..ab10b4c 100644
--- a/tempest/api/compute/v3/servers/test_delete_server.py
+++ b/tempest/api/compute/v3/servers/test_delete_server.py
@@ -26,8 +26,8 @@
# for preventing "Quota exceeded for instances".
@classmethod
- def setUpClass(cls):
- super(DeleteServersV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(DeleteServersV3Test, cls).resource_setup()
cls.client = cls.servers_client
@test.attr(type='gate')
@@ -128,8 +128,8 @@
# for preventing "Quota exceeded for instances".
@classmethod
- def setUpClass(cls):
- super(DeleteServersAdminV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(DeleteServersAdminV3Test, cls).resource_setup()
cls.non_admin_client = cls.servers_client
cls.admin_client = cls.servers_admin_client
diff --git a/tempest/api/compute/v3/servers/test_instance_actions.py b/tempest/api/compute/v3/servers/test_instance_actions.py
index 4c2dcbe..227f6cd 100644
--- a/tempest/api/compute/v3/servers/test_instance_actions.py
+++ b/tempest/api/compute/v3/servers/test_instance_actions.py
@@ -20,8 +20,8 @@
class InstanceActionsV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
- super(InstanceActionsV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(InstanceActionsV3Test, cls).resource_setup()
cls.client = cls.servers_client
resp, server = cls.create_test_server(wait_until='ACTIVE')
cls.resp = resp
diff --git a/tempest/api/compute/v3/servers/test_instance_actions_negative.py b/tempest/api/compute/v3/servers/test_instance_actions_negative.py
index 0b2c6f9..b9d4be2 100644
--- a/tempest/api/compute/v3/servers/test_instance_actions_negative.py
+++ b/tempest/api/compute/v3/servers/test_instance_actions_negative.py
@@ -22,8 +22,8 @@
class InstanceActionsNegativeV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
- super(InstanceActionsNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(InstanceActionsNegativeV3Test, cls).resource_setup()
cls.client = cls.servers_client
resp, server = cls.create_test_server(wait_until='ACTIVE')
cls.server_id = server['id']
diff --git a/tempest/api/compute/v3/servers/test_list_server_filters.py b/tempest/api/compute/v3/servers/test_list_server_filters.py
index 778b033..209d293 100644
--- a/tempest/api/compute/v3/servers/test_list_server_filters.py
+++ b/tempest/api/compute/v3/servers/test_list_server_filters.py
@@ -26,10 +26,9 @@
class ListServerFiltersV3Test(base.BaseV3ComputeTest):
@classmethod
- @test.safe_setup
- def setUpClass(cls):
+ def resource_setup(cls):
cls.set_network_resources(network=True, subnet=True, dhcp=True)
- super(ListServerFiltersV3Test, cls).setUpClass()
+ super(ListServerFiltersV3Test, cls).resource_setup()
cls.client = cls.servers_client
# Check to see if the alternate image ref actually exists...
diff --git a/tempest/api/compute/v3/servers/test_list_servers_negative.py b/tempest/api/compute/v3/servers/test_list_servers_negative.py
index 18e5c67..67e1155 100644
--- a/tempest/api/compute/v3/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/v3/servers/test_list_servers_negative.py
@@ -26,9 +26,8 @@
force_tenant_isolation = True
@classmethod
- @test.safe_setup
- def setUpClass(cls):
- super(ListServersNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ListServersNegativeV3Test, cls).resource_setup()
cls.client = cls.servers_client
# The following servers are created for use
diff --git a/tempest/api/compute/v3/servers/test_server_actions.py b/tempest/api/compute/v3/servers/test_server_actions.py
index 538507f..a4e8dba 100644
--- a/tempest/api/compute/v3/servers/test_server_actions.py
+++ b/tempest/api/compute/v3/servers/test_server_actions.py
@@ -51,9 +51,9 @@
super(ServerActionsV3Test, self).tearDown()
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
cls.prepare_instance_network()
- super(ServerActionsV3Test, cls).setUpClass()
+ super(ServerActionsV3Test, cls).resource_setup()
cls.client = cls.servers_client
cls.server_id = cls.rebuild_server(None)
diff --git a/tempest/api/compute/v3/servers/test_server_addresses.py b/tempest/api/compute/v3/servers/test_server_addresses.py
index efd7500..0590146 100644
--- a/tempest/api/compute/v3/servers/test_server_addresses.py
+++ b/tempest/api/compute/v3/servers/test_server_addresses.py
@@ -23,10 +23,10 @@
class ServerAddressesV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
# This test module might use a network and a subnet
cls.set_network_resources(network=True, subnet=True)
- super(ServerAddressesV3Test, cls).setUpClass()
+ super(ServerAddressesV3Test, cls).resource_setup()
cls.client = cls.servers_client
resp, cls.server = cls.create_test_server(wait_until='ACTIVE')
diff --git a/tempest/api/compute/v3/servers/test_server_addresses_negative.py b/tempest/api/compute/v3/servers/test_server_addresses_negative.py
index 8a9877b..7a1b6fc 100644
--- a/tempest/api/compute/v3/servers/test_server_addresses_negative.py
+++ b/tempest/api/compute/v3/servers/test_server_addresses_negative.py
@@ -23,10 +23,10 @@
_interface = 'json'
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
# This test module might use a network and a subnet
cls.set_network_resources(network=True, subnet=True)
- super(ServerAddressesV3NegativeTest, cls).setUpClass()
+ super(ServerAddressesV3NegativeTest, cls).resource_setup()
cls.client = cls.servers_client
resp, cls.server = cls.create_test_server(wait_until='ACTIVE')
diff --git a/tempest/api/compute/v3/servers/test_server_metadata.py b/tempest/api/compute/v3/servers/test_server_metadata.py
index c5443ee..ccdfbad 100644
--- a/tempest/api/compute/v3/servers/test_server_metadata.py
+++ b/tempest/api/compute/v3/servers/test_server_metadata.py
@@ -20,8 +20,8 @@
class ServerMetadataV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
- super(ServerMetadataV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ServerMetadataV3Test, cls).resource_setup()
cls.client = cls.servers_client
cls.quotas = cls.quotas_client
resp, server = cls.create_test_server(meta={}, wait_until='ACTIVE')
diff --git a/tempest/api/compute/v3/servers/test_server_metadata_negative.py b/tempest/api/compute/v3/servers/test_server_metadata_negative.py
index f746be3..036b126 100644
--- a/tempest/api/compute/v3/servers/test_server_metadata_negative.py
+++ b/tempest/api/compute/v3/servers/test_server_metadata_negative.py
@@ -21,8 +21,8 @@
class ServerMetadataV3NegativeTest(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
- super(ServerMetadataV3NegativeTest, cls).setUpClass()
+ def resource_setup(cls):
+ super(ServerMetadataV3NegativeTest, cls).resource_setup()
cls.client = cls.servers_client
cls.quotas = cls.quotas_client
cls.tenant_id = cls.client.tenant_id
diff --git a/tempest/api/compute/v3/servers/test_server_password.py b/tempest/api/compute/v3/servers/test_server_password.py
index fc0b145..bb0e310 100644
--- a/tempest/api/compute/v3/servers/test_server_password.py
+++ b/tempest/api/compute/v3/servers/test_server_password.py
@@ -21,8 +21,8 @@
class ServerPasswordV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
- super(ServerPasswordV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ServerPasswordV3Test, cls).resource_setup()
cls.client = cls.servers_client
resp, cls.server = cls.create_test_server(wait_until="ACTIVE")
diff --git a/tempest/api/compute/v3/servers/test_server_rescue.py b/tempest/api/compute/v3/servers/test_server_rescue.py
index da58f26..ae21a7e 100644
--- a/tempest/api/compute/v3/servers/test_server_rescue.py
+++ b/tempest/api/compute/v3/servers/test_server_rescue.py
@@ -23,11 +23,11 @@
class ServerRescueV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.compute_feature_enabled.rescue:
msg = "Server rescue not available."
raise cls.skipException(msg)
- super(ServerRescueV3Test, cls).setUpClass()
+ super(ServerRescueV3Test, cls).resource_setup()
# Server for positive tests
resp, server = cls.create_test_server(wait_until='BUILD')
diff --git a/tempest/api/compute/v3/servers/test_server_rescue_negative.py b/tempest/api/compute/v3/servers/test_server_rescue_negative.py
index 6d192a3..db26298 100644
--- a/tempest/api/compute/v3/servers/test_server_rescue_negative.py
+++ b/tempest/api/compute/v3/servers/test_server_rescue_negative.py
@@ -26,13 +26,12 @@
class ServerRescueNegativeV3Test(base.BaseV3ComputeTest):
@classmethod
- @test.safe_setup
- def setUpClass(cls):
+ def resource_setup(cls):
if not CONF.compute_feature_enabled.rescue:
msg = "Server rescue not available."
raise cls.skipException(msg)
- super(ServerRescueNegativeV3Test, cls).setUpClass()
+ super(ServerRescueNegativeV3Test, cls).resource_setup()
cls.device = CONF.compute.volume_device_name
# Create a volume and wait for it to become ready for attach
@@ -55,10 +54,10 @@
cls.servers_client.wait_for_server_status(cls.server_id, 'ACTIVE')
@classmethod
- def tearDownClass(cls):
+ def resource_cleanup(cls):
if hasattr(cls, 'volume'):
cls.delete_volume(cls.volume['id'])
- super(ServerRescueNegativeV3Test, cls).tearDownClass()
+ super(ServerRescueNegativeV3Test, cls).resource_cleanup()
def _detach(self, server_id, volume_id):
self.servers_client.detach_volume(server_id, volume_id)
diff --git a/tempest/api/compute/v3/servers/test_servers.py b/tempest/api/compute/v3/servers/test_servers.py
index 426ee8d..e09f4a8 100644
--- a/tempest/api/compute/v3/servers/test_servers.py
+++ b/tempest/api/compute/v3/servers/test_servers.py
@@ -21,8 +21,8 @@
class ServersV3Test(base.BaseV3ComputeTest):
@classmethod
- def setUpClass(cls):
- super(ServersV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ServersV3Test, cls).resource_setup()
cls.client = cls.servers_client
def tearDown(self):
diff --git a/tempest/api/compute/v3/servers/test_servers_negative.py b/tempest/api/compute/v3/servers/test_servers_negative.py
index f8ff7c8..30ac0ac 100644
--- a/tempest/api/compute/v3/servers/test_servers_negative.py
+++ b/tempest/api/compute/v3/servers/test_servers_negative.py
@@ -42,8 +42,8 @@
super(ServersNegativeV3Test, self).tearDown()
@classmethod
- def setUpClass(cls):
- super(ServersNegativeV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(ServersNegativeV3Test, cls).resource_setup()
cls.client = cls.servers_client
if CONF.compute.allow_tenant_isolation:
cls.alt_os = clients.Manager(cls.isolated_creds.get_alt_creds())
diff --git a/tempest/api/compute/v3/test_live_block_migration.py b/tempest/api/compute/v3/test_live_block_migration.py
index 6ca37e6..d6231b7 100644
--- a/tempest/api/compute/v3/test_live_block_migration.py
+++ b/tempest/api/compute/v3/test_live_block_migration.py
@@ -26,8 +26,8 @@
_host_key = 'os-extended-server-attributes:host'
@classmethod
- def setUpClass(cls):
- super(LiveBlockMigrationV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(LiveBlockMigrationV3Test, cls).resource_setup()
cls.admin_hosts_client = cls.hosts_admin_client
cls.admin_servers_client = cls.servers_admin_client
diff --git a/tempest/api/compute/v3/test_live_block_migration_negative.py b/tempest/api/compute/v3/test_live_block_migration_negative.py
index b4ec505..93127f3 100644
--- a/tempest/api/compute/v3/test_live_block_migration_negative.py
+++ b/tempest/api/compute/v3/test_live_block_migration_negative.py
@@ -27,8 +27,8 @@
_host_key = 'os-extended-server-attributes:host'
@classmethod
- def setUpClass(cls):
- super(LiveBlockMigrationV3NegativeTest, cls).setUpClass()
+ def resource_setup(cls):
+ super(LiveBlockMigrationV3NegativeTest, cls).resource_setup()
if not CONF.compute_feature_enabled.live_migration:
raise cls.skipException("Live migration is not enabled")
diff --git a/tempest/api/compute/v3/test_quotas.py b/tempest/api/compute/v3/test_quotas.py
index ecf70cf..f6d8b3f 100644
--- a/tempest/api/compute/v3/test_quotas.py
+++ b/tempest/api/compute/v3/test_quotas.py
@@ -26,8 +26,8 @@
super(QuotasV3Test, self).setUp()
@classmethod
- def setUpClass(cls):
- super(QuotasV3Test, cls).setUpClass()
+ def resource_setup(cls):
+ super(QuotasV3Test, cls).resource_setup()
cls.client = cls.quotas_client
cls.tenant_id = cls.client.tenant_id
cls.user_id = cls.client.user_id