Merge "Add parametric tests of Swift container API"
diff --git a/tempest/api/compute/v3/admin/test_aggregates.py b/tempest/api/compute/v3/admin/test_aggregates.py
index 956eddd..205b7a4 100644
--- a/tempest/api/compute/v3/admin/test_aggregates.py
+++ b/tempest/api/compute/v3/admin/test_aggregates.py
@@ -19,7 +19,7 @@
from tempest import test
-class AggregatesAdminV3TestJSON(base.BaseV3ComputeAdminTest):
+class AggregatesAdminV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Aggregates API that require admin privileges
@@ -30,7 +30,7 @@
@classmethod
def setUpClass(cls):
- super(AggregatesAdminV3TestJSON, cls).setUpClass()
+ super(AggregatesAdminV3Test, cls).setUpClass()
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_aggregates_negative.py b/tempest/api/compute/v3/admin/test_aggregates_negative.py
index da3568a..078056a 100644
--- a/tempest/api/compute/v3/admin/test_aggregates_negative.py
+++ b/tempest/api/compute/v3/admin/test_aggregates_negative.py
@@ -20,7 +20,7 @@
from tempest import test
-class AggregatesAdminNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+class AggregatesAdminNegativeV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Aggregates API that require admin privileges
@@ -30,7 +30,7 @@
@classmethod
def setUpClass(cls):
- super(AggregatesAdminNegativeV3TestJSON, cls).setUpClass()
+ super(AggregatesAdminNegativeV3Test, cls).setUpClass()
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.py b/tempest/api/compute/v3/admin/test_availability_zone.py
index 5ced2b1..57ac869 100644
--- a/tempest/api/compute/v3/admin/test_availability_zone.py
+++ b/tempest/api/compute/v3/admin/test_availability_zone.py
@@ -17,7 +17,7 @@
from tempest.test import attr
-class AZAdminV3TestJSON(base.BaseV3ComputeAdminTest):
+class AZAdminV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Availability Zone API List
@@ -27,7 +27,7 @@
@classmethod
def setUpClass(cls):
- super(AZAdminV3TestJSON, cls).setUpClass()
+ super(AZAdminV3Test, cls).setUpClass()
cls.client = cls.availability_zone_admin_client
cls.non_adm_client = cls.availability_zone_client
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 60cd1d6..180f298 100644
--- a/tempest/api/compute/v3/admin/test_availability_zone_negative.py
+++ b/tempest/api/compute/v3/admin/test_availability_zone_negative.py
@@ -18,7 +18,7 @@
from tempest.test import attr
-class AZAdminNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+class AZAdminNegativeV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Availability Zone API List
@@ -28,7 +28,7 @@
@classmethod
def setUpClass(cls):
- super(AZAdminNegativeV3TestJSON, cls).setUpClass()
+ super(AZAdminNegativeV3Test, cls).setUpClass()
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_access.py b/tempest/api/compute/v3/admin/test_flavors_access.py
index 23f5cd1..43dc726 100644
--- a/tempest/api/compute/v3/admin/test_flavors_access.py
+++ b/tempest/api/compute/v3/admin/test_flavors_access.py
@@ -18,7 +18,7 @@
from tempest import test
-class FlavorsAccessV3TestJSON(base.BaseV3ComputeAdminTest):
+class FlavorsAccessV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Flavor Access API extension.
@@ -29,7 +29,7 @@
@classmethod
def setUpClass(cls):
- super(FlavorsAccessV3TestJSON, cls).setUpClass()
+ super(FlavorsAccessV3Test, cls).setUpClass()
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 1f8a4cb..6a2e826 100644
--- a/tempest/api/compute/v3/admin/test_flavors_access_negative.py
+++ b/tempest/api/compute/v3/admin/test_flavors_access_negative.py
@@ -21,7 +21,7 @@
from tempest import test
-class FlavorsAccessNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+class FlavorsAccessNegativeV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Flavor Access API extension.
@@ -32,7 +32,7 @@
@classmethod
def setUpClass(cls):
- super(FlavorsAccessNegativeV3TestJSON, cls).setUpClass()
+ super(FlavorsAccessNegativeV3Test, cls).setUpClass()
cls.client = cls.flavors_admin_client
admin_client = cls._get_identity_admin_client()
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 0363fcb..4d22027 100644
--- a/tempest/api/compute/v3/admin/test_flavors_extra_specs.py
+++ b/tempest/api/compute/v3/admin/test_flavors_extra_specs.py
@@ -18,7 +18,7 @@
from tempest import test
-class FlavorsExtraSpecsV3TestJSON(base.BaseV3ComputeAdminTest):
+class FlavorsExtraSpecsV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Flavor Extra Spec API extension.
@@ -30,7 +30,7 @@
@classmethod
def setUpClass(cls):
- super(FlavorsExtraSpecsV3TestJSON, cls).setUpClass()
+ super(FlavorsExtraSpecsV3Test, cls).setUpClass()
cls.client = cls.flavors_admin_client
flavor_name = data_utils.rand_name('test_flavor')
@@ -53,7 +53,7 @@
def tearDownClass(cls):
resp, body = cls.client.delete_flavor(cls.flavor['id'])
cls.client.wait_for_resource_deletion(cls.flavor['id'])
- super(FlavorsExtraSpecsV3TestJSON, cls).tearDownClass()
+ super(FlavorsExtraSpecsV3Test, cls).tearDownClass()
@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 0f300a1..98e6e3d 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
@@ -20,7 +20,7 @@
from tempest import test
-class FlavorsExtraSpecsNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+class FlavorsExtraSpecsNegativeV3Test(base.BaseV3ComputeAdminTest):
"""
Negative Tests Flavor Extra Spec API extension.
@@ -31,7 +31,7 @@
@classmethod
def setUpClass(cls):
- super(FlavorsExtraSpecsNegativeV3TestJSON, cls).setUpClass()
+ super(FlavorsExtraSpecsNegativeV3Test, cls).setUpClass()
cls.client = cls.flavors_admin_client
flavor_name = data_utils.rand_name('test_flavor')
@@ -54,7 +54,7 @@
def tearDownClass(cls):
resp, body = cls.client.delete_flavor(cls.flavor['id'])
cls.client.wait_for_resource_deletion(cls.flavor['id'])
- super(FlavorsExtraSpecsNegativeV3TestJSON, cls).tearDownClass()
+ super(FlavorsExtraSpecsNegativeV3Test, cls).tearDownClass()
@test.attr(type=['negative', 'gate'])
def test_flavor_non_admin_set_keys(self):
diff --git a/tempest/api/compute/v3/admin/test_hosts.py b/tempest/api/compute/v3/admin/test_hosts.py
index 8199ee8..2c9369f 100644
--- a/tempest/api/compute/v3/admin/test_hosts.py
+++ b/tempest/api/compute/v3/admin/test_hosts.py
@@ -17,7 +17,7 @@
from tempest import test
-class HostsAdminV3TestJSON(base.BaseV3ComputeAdminTest):
+class HostsAdminV3Test(base.BaseV3ComputeAdminTest):
"""
Tests hosts API using admin privileges.
@@ -27,7 +27,7 @@
@classmethod
def setUpClass(cls):
- super(HostsAdminV3TestJSON, cls).setUpClass()
+ super(HostsAdminV3Test, cls).setUpClass()
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 aa50618..ac5d7de 100644
--- a/tempest/api/compute/v3/admin/test_hosts_negative.py
+++ b/tempest/api/compute/v3/admin/test_hosts_negative.py
@@ -18,7 +18,7 @@
from tempest import test
-class HostsAdminNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+class HostsAdminNegativeV3Test(base.BaseV3ComputeAdminTest):
"""
Tests hosts API using admin privileges.
@@ -28,7 +28,7 @@
@classmethod
def setUpClass(cls):
- super(HostsAdminNegativeV3TestJSON, cls).setUpClass()
+ super(HostsAdminNegativeV3Test, cls).setUpClass()
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 8bd4abb..0f96bba 100644
--- a/tempest/api/compute/v3/admin/test_hypervisor.py
+++ b/tempest/api/compute/v3/admin/test_hypervisor.py
@@ -17,7 +17,7 @@
from tempest.test import attr
-class HypervisorAdminV3TestJSON(base.BaseV3ComputeAdminTest):
+class HypervisorAdminV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Hypervisors API that require admin privileges
@@ -27,7 +27,7 @@
@classmethod
def setUpClass(cls):
- super(HypervisorAdminV3TestJSON, cls).setUpClass()
+ super(HypervisorAdminV3Test, cls).setUpClass()
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 63e8cae..aee354a 100644
--- a/tempest/api/compute/v3/admin/test_hypervisor_negative.py
+++ b/tempest/api/compute/v3/admin/test_hypervisor_negative.py
@@ -21,7 +21,7 @@
from tempest.test import attr
-class HypervisorAdminNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+class HypervisorAdminNegativeV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Hypervisors API that require admin privileges
@@ -31,7 +31,7 @@
@classmethod
def setUpClass(cls):
- super(HypervisorAdminNegativeV3TestJSON, cls).setUpClass()
+ super(HypervisorAdminNegativeV3Test, cls).setUpClass()
cls.client = cls.hypervisor_admin_client
cls.non_adm_client = cls.hypervisor_client
diff --git a/tempest/api/compute/v3/admin/test_instance_usage_audit_log.py b/tempest/api/compute/v3/admin/test_instance_usage_audit_log.py
index 9651338..a86b7f5 100644
--- a/tempest/api/compute/v3/admin/test_instance_usage_audit_log.py
+++ b/tempest/api/compute/v3/admin/test_instance_usage_audit_log.py
@@ -20,13 +20,13 @@
from tempest import test
-class InstanceUsageAuditLogV3TestJSON(base.BaseV3ComputeAdminTest):
+class InstanceUsageAuditLogV3Test(base.BaseV3ComputeAdminTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(InstanceUsageAuditLogV3TestJSON, cls).setUpClass()
+ super(InstanceUsageAuditLogV3Test, cls).setUpClass()
cls.adm_client = cls.instance_usages_audit_log_admin_client
@test.attr(type='gate')
diff --git a/tempest/api/compute/v3/admin/test_instance_usage_audit_log_negative.py b/tempest/api/compute/v3/admin/test_instance_usage_audit_log_negative.py
index 8ed1a98..0438825 100644
--- a/tempest/api/compute/v3/admin/test_instance_usage_audit_log_negative.py
+++ b/tempest/api/compute/v3/admin/test_instance_usage_audit_log_negative.py
@@ -18,13 +18,13 @@
from tempest import test
-class InstanceUsageLogNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+class InstanceUsageLogNegativeV3Test(base.BaseV3ComputeAdminTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(InstanceUsageLogNegativeV3TestJSON, cls).setUpClass()
+ super(InstanceUsageLogNegativeV3Test, cls).setUpClass()
cls.adm_client = cls.instance_usages_audit_log_admin_client
@test.attr(type=['negative', 'gate'])
diff --git a/tempest/api/compute/v3/admin/test_quotas.py b/tempest/api/compute/v3/admin/test_quotas.py
index ad3519d..ccb9d8e 100644
--- a/tempest/api/compute/v3/admin/test_quotas.py
+++ b/tempest/api/compute/v3/admin/test_quotas.py
@@ -22,13 +22,13 @@
CONF = config.CONF
-class QuotasAdminV3TestJSON(base.BaseV3ComputeAdminTest):
+class QuotasAdminV3Test(base.BaseV3ComputeAdminTest):
_interface = 'json'
force_tenant_isolation = True
@classmethod
def setUpClass(cls):
- super(QuotasAdminV3TestJSON, cls).setUpClass()
+ super(QuotasAdminV3Test, cls).setUpClass()
cls.auth_url = CONF.identity.uri
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 a8e1a0a..ef9eedc 100644
--- a/tempest/api/compute/v3/admin/test_servers.py
+++ b/tempest/api/compute/v3/admin/test_servers.py
@@ -20,7 +20,7 @@
from tempest.test import skip_because
-class ServersAdminV3TestJSON(base.BaseV3ComputeAdminTest):
+class ServersAdminV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Servers API using admin privileges
@@ -30,7 +30,7 @@
@classmethod
def setUpClass(cls):
- super(ServersAdminV3TestJSON, cls).setUpClass()
+ super(ServersAdminV3Test, cls).setUpClass()
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 a86bdfc..a6a5736 100644
--- a/tempest/api/compute/v3/admin/test_servers_negative.py
+++ b/tempest/api/compute/v3/admin/test_servers_negative.py
@@ -20,7 +20,7 @@
from tempest.test import attr
-class ServersAdminNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+class ServersAdminNegativeV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Servers API using admin privileges
@@ -30,7 +30,7 @@
@classmethod
def setUpClass(cls):
- super(ServersAdminNegativeV3TestJSON, cls).setUpClass()
+ super(ServersAdminNegativeV3Test, cls).setUpClass()
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 9e55e78..8d6e549 100644
--- a/tempest/api/compute/v3/admin/test_services.py
+++ b/tempest/api/compute/v3/admin/test_services.py
@@ -18,7 +18,7 @@
from tempest.test import attr
-class ServicesAdminV3TestJSON(base.BaseV3ComputeAdminTest):
+class ServicesAdminV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Services API. List and Enable/Disable require admin privileges.
@@ -28,7 +28,7 @@
@classmethod
def setUpClass(cls):
- super(ServicesAdminV3TestJSON, cls).setUpClass()
+ super(ServicesAdminV3Test, cls).setUpClass()
cls.client = cls.services_admin_client
@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 1382347..c270842 100644
--- a/tempest/api/compute/v3/admin/test_services_negative.py
+++ b/tempest/api/compute/v3/admin/test_services_negative.py
@@ -19,7 +19,7 @@
from tempest.test import attr
-class ServicesAdminNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+class ServicesAdminNegativeV3Test(base.BaseV3ComputeAdminTest):
"""
Tests Services API. List and Enable/Disable require admin privileges.
@@ -29,7 +29,7 @@
@classmethod
def setUpClass(cls):
- super(ServicesAdminNegativeV3TestJSON, cls).setUpClass()
+ super(ServicesAdminNegativeV3Test, cls).setUpClass()
cls.client = cls.services_admin_client
cls.non_admin_client = cls.services_client
diff --git a/tempest/api/compute/v3/admin/test_simple_tenant_usage.py b/tempest/api/compute/v3/admin/test_simple_tenant_usage.py
index 7ee835b..e16332f 100644
--- a/tempest/api/compute/v3/admin/test_simple_tenant_usage.py
+++ b/tempest/api/compute/v3/admin/test_simple_tenant_usage.py
@@ -21,13 +21,13 @@
import time
-class TenantUsagesV3TestJSON(base.BaseV3ComputeAdminTest):
+class TenantUsagesV3Test(base.BaseV3ComputeAdminTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(TenantUsagesV3TestJSON, cls).setUpClass()
+ super(TenantUsagesV3Test, cls).setUpClass()
cls.adm_client = cls.tenant_usages_admin_client
cls.client = cls.tenant_usages_client
cls.identity_client = cls._get_identity_admin_client()
diff --git a/tempest/api/compute/v3/admin/test_simple_tenant_usage_negative.py b/tempest/api/compute/v3/admin/test_simple_tenant_usage_negative.py
index 00068dc..17849c5 100644
--- a/tempest/api/compute/v3/admin/test_simple_tenant_usage_negative.py
+++ b/tempest/api/compute/v3/admin/test_simple_tenant_usage_negative.py
@@ -21,13 +21,13 @@
from tempest.test import attr
-class TenantUsagesNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+class TenantUsagesNegativeV3Test(base.BaseV3ComputeAdminTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(TenantUsagesNegativeV3TestJSON, cls).setUpClass()
+ super(TenantUsagesNegativeV3Test, cls).setUpClass()
cls.adm_client = cls.os_adm.tenant_usages_client
cls.client = cls.os.tenant_usages_client
cls.identity_client = cls._get_identity_admin_client()
diff --git a/tempest/api/compute/v3/certificates/test_certificates.py b/tempest/api/compute/v3/certificates/test_certificates.py
index b24f4d8..5c980c0 100644
--- a/tempest/api/compute/v3/certificates/test_certificates.py
+++ b/tempest/api/compute/v3/certificates/test_certificates.py
@@ -17,7 +17,7 @@
from tempest.test import attr
-class CertificatesV3TestJSON(base.BaseV3ComputeTest):
+class CertificatesV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@attr(type='gate')
diff --git a/tempest/api/compute/v3/images/test_image_metadata.py b/tempest/api/compute/v3/images/test_image_metadata.py
index e9ca04a..cd4e5e7 100644
--- a/tempest/api/compute/v3/images/test_image_metadata.py
+++ b/tempest/api/compute/v3/images/test_image_metadata.py
@@ -21,12 +21,12 @@
CONF = config.CONF
-class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
+class ImagesMetadataTest(base.BaseV2ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(ImagesMetadataTestJSON, cls).setUpClass()
+ super(ImagesMetadataTest, cls).setUpClass()
if not CONF.service_available.glance:
skip_msg = ("%s skipped as glance is not available" % cls.__name__)
raise cls.skipException(skip_msg)
@@ -47,10 +47,10 @@
@classmethod
def tearDownClass(cls):
cls.client.delete_image(cls.image_id)
- super(ImagesMetadataTestJSON, cls).tearDownClass()
+ super(ImagesMetadataTest, cls).tearDownClass()
def setUp(self):
- super(ImagesMetadataTestJSON, self).setUp()
+ super(ImagesMetadataTest, self).setUp()
meta = {'key1': 'value1', 'key2': 'value2'}
resp, _ = self.client.set_image_metadata(self.image_id, meta)
self.assertEqual(resp.status, 200)
diff --git a/tempest/api/compute/v3/images/test_image_metadata_negative.py b/tempest/api/compute/v3/images/test_image_metadata_negative.py
index 6e7cc8f..e76af2c 100644
--- a/tempest/api/compute/v3/images/test_image_metadata_negative.py
+++ b/tempest/api/compute/v3/images/test_image_metadata_negative.py
@@ -19,12 +19,12 @@
from tempest.test import attr
-class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
+class ImagesMetadataTest(base.BaseV2ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(ImagesMetadataTestJSON, cls).setUpClass()
+ super(ImagesMetadataTest, cls).setUpClass()
cls.client = cls.images_client
@attr(type=['negative', 'gate'])
diff --git a/tempest/api/compute/v3/images/test_images.py b/tempest/api/compute/v3/images/test_images.py
index 4ef6f25..bbb84fb 100644
--- a/tempest/api/compute/v3/images/test_images.py
+++ b/tempest/api/compute/v3/images/test_images.py
@@ -22,12 +22,12 @@
CONF = config.CONF
-class ImagesV3TestJSON(base.BaseV3ComputeTest):
+class ImagesV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(ImagesV3TestJSON, cls).setUpClass()
+ super(ImagesV3Test, cls).setUpClass()
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 992d158..18772df 100644
--- a/tempest/api/compute/v3/images/test_images_oneserver.py
+++ b/tempest/api/compute/v3/images/test_images_oneserver.py
@@ -26,7 +26,7 @@
LOG = logging.getLogger(__name__)
-class ImagesOneServerTestJSON(base.BaseV2ComputeTest):
+class ImagesOneServerTest(base.BaseV2ComputeTest):
_interface = 'json'
def tearDown(self):
@@ -34,12 +34,12 @@
for image_id in self.image_ids:
self.client.delete_image(image_id)
self.image_ids.remove(image_id)
- super(ImagesOneServerTestJSON, self).tearDown()
+ super(ImagesOneServerTest, self).tearDown()
def setUp(self):
# NOTE(afazekas): Normally we use the same server with all test cases,
# but if it has an issue, we build a new one
- super(ImagesOneServerTestJSON, self).setUp()
+ super(ImagesOneServerTest, self).setUp()
# Check if the server is in a clean state after test
try:
self.servers_client.wait_for_server_status(self.server_id,
@@ -53,7 +53,7 @@
@classmethod
def setUpClass(cls):
- super(ImagesOneServerTestJSON, cls).setUpClass()
+ super(ImagesOneServerTest, cls).setUpClass()
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 3404823..bc276d1 100644
--- a/tempest/api/compute/v3/images/test_images_oneserver_negative.py
+++ b/tempest/api/compute/v3/images/test_images_oneserver_negative.py
@@ -28,7 +28,7 @@
LOG = logging.getLogger(__name__)
-class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest):
+class ImagesOneServerNegativeTest(base.BaseV2ComputeTest):
_interface = 'json'
def tearDown(self):
@@ -36,12 +36,12 @@
for image_id in self.image_ids:
self.client.delete_image(image_id)
self.image_ids.remove(image_id)
- super(ImagesOneServerNegativeTestJSON, self).tearDown()
+ super(ImagesOneServerNegativeTest, self).tearDown()
def setUp(self):
# NOTE(afazekas): Normally we use the same server with all test cases,
# but if it has an issue, we build a new one
- super(ImagesOneServerNegativeTestJSON, self).setUp()
+ super(ImagesOneServerNegativeTest, self).setUp()
# Check if the server is in a clean state after test
try:
self.servers_client.wait_for_server_status(self.server_id,
@@ -58,7 +58,7 @@
@classmethod
def setUpClass(cls):
- super(ImagesOneServerNegativeTestJSON, cls).setUpClass()
+ super(ImagesOneServerNegativeTest, cls).setUpClass()
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_list_image_filters.py b/tempest/api/compute/v3/images/test_list_image_filters.py
index 82b9625..457ca53 100644
--- a/tempest/api/compute/v3/images/test_list_image_filters.py
+++ b/tempest/api/compute/v3/images/test_list_image_filters.py
@@ -24,12 +24,12 @@
LOG = logging.getLogger(__name__)
-class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
+class ListImageFiltersTest(base.BaseV2ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(ListImageFiltersTestJSON, cls).setUpClass()
+ super(ListImageFiltersTest, cls).setUpClass()
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/keypairs/test_keypairs.py b/tempest/api/compute/v3/keypairs/test_keypairs.py
index 4aef8b1..8eef811 100644
--- a/tempest/api/compute/v3/keypairs/test_keypairs.py
+++ b/tempest/api/compute/v3/keypairs/test_keypairs.py
@@ -18,12 +18,12 @@
from tempest import test
-class KeyPairsV3TestJSON(base.BaseV3ComputeTest):
+class KeyPairsV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(KeyPairsV3TestJSON, cls).setUpClass()
+ super(KeyPairsV3Test, cls).setUpClass()
cls.client = cls.keypairs_client
def _delete_keypair(self, keypair_name):
diff --git a/tempest/api/compute/v3/keypairs/test_keypairs_negative.py b/tempest/api/compute/v3/keypairs/test_keypairs_negative.py
index 87f62b7..ae22ccc 100644
--- a/tempest/api/compute/v3/keypairs/test_keypairs_negative.py
+++ b/tempest/api/compute/v3/keypairs/test_keypairs_negative.py
@@ -20,12 +20,12 @@
from tempest import test
-class KeyPairsNegativeV3TestJSON(base.BaseV3ComputeTest):
+class KeyPairsNegativeV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(KeyPairsNegativeV3TestJSON, cls).setUpClass()
+ super(KeyPairsNegativeV3Test, cls).setUpClass()
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 634d06f..272cb53 100644
--- a/tempest/api/compute/v3/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/v3/servers/test_attach_interfaces.py
@@ -23,7 +23,7 @@
CONF = config.CONF
-class AttachInterfacesV3TestJSON(base.BaseV3ComputeTest):
+class AttachInterfacesV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@classmethod
@@ -32,7 +32,7 @@
raise cls.skipException("Neutron is required")
# This test class requires network and subnet
cls.set_network_resources(network=True, subnet=True)
- super(AttachInterfacesV3TestJSON, cls).setUpClass()
+ super(AttachInterfacesV3Test, cls).setUpClass()
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 6ae74ff..d693be5 100644
--- a/tempest/api/compute/v3/servers/test_attach_volume.py
+++ b/tempest/api/compute/v3/servers/test_attach_volume.py
@@ -23,19 +23,19 @@
CONF = config.CONF
-class AttachVolumeV3TestJSON(base.BaseV3ComputeTest):
+class AttachVolumeV3Test(base.BaseV3ComputeTest):
_interface = 'json'
run_ssh = CONF.compute.run_ssh
def __init__(self, *args, **kwargs):
- super(AttachVolumeV3TestJSON, self).__init__(*args, **kwargs)
+ super(AttachVolumeV3Test, self).__init__(*args, **kwargs)
self.server = None
self.volume = None
self.attached = False
@classmethod
def setUpClass(cls):
- super(AttachVolumeV3TestJSON, cls).setUpClass()
+ super(AttachVolumeV3Test, cls).setUpClass()
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 cb02894..7a4c877 100644
--- a/tempest/api/compute/v3/servers/test_create_server.py
+++ b/tempest/api/compute/v3/servers/test_create_server.py
@@ -27,14 +27,14 @@
CONF = config.CONF
-class ServersV3TestJSON(base.BaseV3ComputeTest):
+class ServersV3Test(base.BaseV3ComputeTest):
_interface = 'json'
run_ssh = CONF.compute.run_ssh
disk_config = 'AUTO'
@classmethod
def setUpClass(cls):
- super(ServersV3TestJSON, cls).setUpClass()
+ super(ServersV3Test, cls).setUpClass()
cls.meta = {'hello': 'world'}
cls.accessIPv4 = '1.1.1.1'
cls.accessIPv6 = '0000:0000:0000:0000:0000:babe:220.12.22.2'
@@ -115,14 +115,14 @@
self.assertTrue(linux_client.hostname_equals_servername(self.name))
-class ServersWithSpecificFlavorV3TestJSON(base.BaseV3ComputeAdminTest):
+class ServersWithSpecificFlavorV3Test(base.BaseV3ComputeAdminTest):
_interface = 'json'
run_ssh = CONF.compute.run_ssh
disk_config = 'AUTO'
@classmethod
def setUpClass(cls):
- super(ServersWithSpecificFlavorV3TestJSON, cls).setUpClass()
+ super(ServersWithSpecificFlavorV3Test, cls).setUpClass()
cls.meta = {'hello': 'world'}
cls.accessIPv4 = '1.1.1.1'
cls.accessIPv6 = '0000:0000:0000:0000:0000:babe:220.12.22.2'
@@ -213,7 +213,7 @@
self.assertEqual(partition_num + 1, linux_client.get_partitions())
-class ServersV3TestManualDisk(ServersV3TestJSON):
+class ServersV3TestManualDisk(ServersV3Test):
disk_config = 'MANUAL'
@classmethod
diff --git a/tempest/api/compute/v3/servers/test_instance_actions.py b/tempest/api/compute/v3/servers/test_instance_actions.py
index dd5dd30..d536871 100644
--- a/tempest/api/compute/v3/servers/test_instance_actions.py
+++ b/tempest/api/compute/v3/servers/test_instance_actions.py
@@ -18,12 +18,12 @@
from tempest.test import attr
-class InstanceActionsV3TestJSON(base.BaseV3ComputeTest):
+class InstanceActionsV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(InstanceActionsV3TestJSON, cls).setUpClass()
+ super(InstanceActionsV3Test, cls).setUpClass()
cls.client = cls.servers_client
resp, server = cls.create_test_server(wait_until='ACTIVE')
cls.request_id = resp['x-compute-request-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 86ac497..9082eda 100644
--- a/tempest/api/compute/v3/servers/test_list_server_filters.py
+++ b/tempest/api/compute/v3/servers/test_list_server_filters.py
@@ -24,12 +24,12 @@
CONF = config.CONF
-class ListServerFiltersV3TestJSON(base.BaseV3ComputeTest):
+class ListServerFiltersV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(ListServerFiltersV3TestJSON, cls).setUpClass()
+ super(ListServerFiltersV3Test, cls).setUpClass()
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 23f2bda..09e1bb6 100644
--- a/tempest/api/compute/v3/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/v3/servers/test_list_servers_negative.py
@@ -20,13 +20,13 @@
from tempest.test import attr
-class ListServersNegativeV3TestJSON(base.BaseV3ComputeTest):
+class ListServersNegativeV3Test(base.BaseV3ComputeTest):
_interface = 'json'
force_tenant_isolation = True
@classmethod
def setUpClass(cls):
- super(ListServersNegativeV3TestJSON, cls).setUpClass()
+ super(ListServersNegativeV3Test, cls).setUpClass()
cls.client = cls.servers_client
# The following servers are created for use
diff --git a/tempest/api/compute/v3/servers/test_multiple_create.py b/tempest/api/compute/v3/servers/test_multiple_create.py
index 429a8ba..f1ae5f8 100644
--- a/tempest/api/compute/v3/servers/test_multiple_create.py
+++ b/tempest/api/compute/v3/servers/test_multiple_create.py
@@ -19,7 +19,7 @@
from tempest import test
-class MultipleCreateV3TestJSON(base.BaseV3ComputeTest):
+class MultipleCreateV3Test(base.BaseV3ComputeTest):
_interface = 'json'
_name = 'multiple-create-test'
diff --git a/tempest/api/compute/v3/servers/test_server_actions.py b/tempest/api/compute/v3/servers/test_server_actions.py
index b8dc85b..0dae796 100644
--- a/tempest/api/compute/v3/servers/test_server_actions.py
+++ b/tempest/api/compute/v3/servers/test_server_actions.py
@@ -28,7 +28,7 @@
CONF = config.CONF
-class ServerActionsV3TestJSON(base.BaseV3ComputeTest):
+class ServerActionsV3Test(base.BaseV3ComputeTest):
_interface = 'json'
resize_available = CONF.compute_feature_enabled.resize
run_ssh = CONF.compute.run_ssh
@@ -36,7 +36,7 @@
def setUp(self):
# NOTE(afazekas): Normally we use the same server with all test cases,
# but if it has an issue, we build a new one
- super(ServerActionsV3TestJSON, self).setUp()
+ super(ServerActionsV3Test, self).setUp()
# Check if the server is in a clean state after test
try:
self.client.wait_for_server_status(self.server_id, 'ACTIVE')
@@ -46,7 +46,7 @@
@classmethod
def setUpClass(cls):
- super(ServerActionsV3TestJSON, cls).setUpClass()
+ super(ServerActionsV3Test, cls).setUpClass()
cls.client = cls.servers_client
cls.server_id = cls.rebuild_server(None)
diff --git a/tempest/api/compute/v3/servers/test_server_metadata.py b/tempest/api/compute/v3/servers/test_server_metadata.py
index 00549eb..13c82dd 100644
--- a/tempest/api/compute/v3/servers/test_server_metadata.py
+++ b/tempest/api/compute/v3/servers/test_server_metadata.py
@@ -17,12 +17,12 @@
from tempest import test
-class ServerMetadataV3TestJSON(base.BaseV3ComputeTest):
+class ServerMetadataV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(ServerMetadataV3TestJSON, cls).setUpClass()
+ super(ServerMetadataV3Test, cls).setUpClass()
cls.client = cls.servers_client
cls.quotas = cls.quotas_client
cls.admin_client = cls._get_identity_admin_client()
@@ -34,7 +34,7 @@
cls.server_id = server['id']
def setUp(self):
- super(ServerMetadataV3TestJSON, self).setUp()
+ super(ServerMetadataV3Test, self).setUp()
meta = {'key1': 'value1', 'key2': 'value2'}
resp, _ = self.client.set_server_metadata(self.server_id, meta)
self.assertEqual(resp.status, 200)
diff --git a/tempest/api/compute/v3/servers/test_server_rescue.py b/tempest/api/compute/v3/servers/test_server_rescue.py
index 99e8f68..f8be1c1 100644
--- a/tempest/api/compute/v3/servers/test_server_rescue.py
+++ b/tempest/api/compute/v3/servers/test_server_rescue.py
@@ -18,12 +18,12 @@
from tempest.test import attr
-class ServerRescueV3TestJSON(base.BaseV3ComputeTest):
+class ServerRescueV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(ServerRescueV3TestJSON, cls).setUpClass()
+ super(ServerRescueV3Test, cls).setUpClass()
cls.device = 'vdf'
# Create a volume and wait for it to become ready for attach
@@ -58,17 +58,17 @@
cls.servers_client.wait_for_server_status(cls.rescue_id, 'RESCUE')
def setUp(self):
- super(ServerRescueV3TestJSON, self).setUp()
+ super(ServerRescueV3Test, self).setUp()
@classmethod
def tearDownClass(cls):
client = cls.volumes_client
client.delete_volume(str(cls.volume_to_attach['id']).strip())
client.delete_volume(str(cls.volume_to_detach['id']).strip())
- super(ServerRescueV3TestJSON, cls).tearDownClass()
+ super(ServerRescueV3Test, cls).tearDownClass()
def tearDown(self):
- super(ServerRescueV3TestJSON, self).tearDown()
+ super(ServerRescueV3Test, self).tearDown()
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 c476b78..dc64c40 100644
--- a/tempest/api/compute/v3/servers/test_servers.py
+++ b/tempest/api/compute/v3/servers/test_servers.py
@@ -18,17 +18,17 @@
from tempest import test
-class ServersV3TestJSON(base.BaseV3ComputeTest):
+class ServersV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(ServersV3TestJSON, cls).setUpClass()
+ super(ServersV3Test, cls).setUpClass()
cls.client = cls.servers_client
def tearDown(self):
self.clear_servers()
- super(ServersV3TestJSON, self).tearDown()
+ super(ServersV3Test, self).tearDown()
@test.attr(type='gate')
def test_create_server_with_admin_password(self):
diff --git a/tempest/api/compute/v3/servers/test_servers_negative.py b/tempest/api/compute/v3/servers/test_servers_negative.py
index 191701e..c153699 100644
--- a/tempest/api/compute/v3/servers/test_servers_negative.py
+++ b/tempest/api/compute/v3/servers/test_servers_negative.py
@@ -26,11 +26,11 @@
CONF = config.CONF
-class ServersNegativeV3TestJSON(base.BaseV3ComputeTest):
+class ServersNegativeV3Test(base.BaseV3ComputeTest):
_interface = 'json'
def setUp(self):
- super(ServersNegativeV3TestJSON, self).setUp()
+ super(ServersNegativeV3Test, self).setUp()
try:
self.client.wait_for_server_status(self.server_id, 'ACTIVE')
except Exception:
@@ -38,7 +38,7 @@
@classmethod
def setUpClass(cls):
- super(ServersNegativeV3TestJSON, cls).setUpClass()
+ super(ServersNegativeV3Test, cls).setUpClass()
cls.client = cls.servers_client
cls.alt_os = clients.AltManager()
cls.alt_client = cls.alt_os.servers_v3_client
diff --git a/tempest/api/compute/v3/test_extensions.py b/tempest/api/compute/v3/test_extensions.py
index 775d70a..09f5ab4 100644
--- a/tempest/api/compute/v3/test_extensions.py
+++ b/tempest/api/compute/v3/test_extensions.py
@@ -24,7 +24,7 @@
LOG = logging.getLogger(__name__)
-class ExtensionsV3TestJSON(base.BaseV3ComputeTest):
+class ExtensionsV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@test.attr(type='gate')
diff --git a/tempest/api/compute/v3/test_live_block_migration.py b/tempest/api/compute/v3/test_live_block_migration.py
index c881206..144cadb 100644
--- a/tempest/api/compute/v3/test_live_block_migration.py
+++ b/tempest/api/compute/v3/test_live_block_migration.py
@@ -26,13 +26,13 @@
CONF = config.CONF
-class LiveBlockMigrationV3TestJSON(base.BaseV3ComputeAdminTest):
+class LiveBlockMigrationV3Test(base.BaseV3ComputeAdminTest):
_host_key = 'os-extended-server-attributes:host'
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(LiveBlockMigrationV3TestJSON, cls).setUpClass()
+ super(LiveBlockMigrationV3Test, cls).setUpClass()
cls.admin_hosts_client = cls.hosts_admin_client
cls.admin_servers_client = cls.servers_admin_client
@@ -161,4 +161,4 @@
for server_id in cls.created_server_ids:
cls.servers_client.delete_server(server_id)
- super(LiveBlockMigrationV3TestJSON, cls).tearDownClass()
+ super(LiveBlockMigrationV3Test, cls).tearDownClass()
diff --git a/tempest/api/compute/v3/test_quotas.py b/tempest/api/compute/v3/test_quotas.py
index 1cbfa2b..33b90ff 100644
--- a/tempest/api/compute/v3/test_quotas.py
+++ b/tempest/api/compute/v3/test_quotas.py
@@ -17,12 +17,12 @@
from tempest import test
-class QuotasV3TestJSON(base.BaseV3ComputeTest):
+class QuotasV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@classmethod
def setUpClass(cls):
- super(QuotasV3TestJSON, cls).setUpClass()
+ super(QuotasV3Test, cls).setUpClass()
cls.client = cls.quotas_client
cls.admin_client = cls._get_identity_admin_client()
resp, tenants = cls.admin_client.list_tenants()
diff --git a/tempest/api/compute/v3/test_version.py b/tempest/api/compute/v3/test_version.py
index 6fbe794..9161d4d 100644
--- a/tempest/api/compute/v3/test_version.py
+++ b/tempest/api/compute/v3/test_version.py
@@ -18,7 +18,7 @@
from tempest import test
-class VersionV3TestJSON(base.BaseV3ComputeTest):
+class VersionV3Test(base.BaseV3ComputeTest):
_interface = 'json'
@test.attr(type='gate')
diff --git a/tempest/api/object_storage/test_account_bulk.py b/tempest/api/object_storage/test_account_bulk.py
new file mode 100644
index 0000000..5fde76a
--- /dev/null
+++ b/tempest/api/object_storage/test_account_bulk.py
@@ -0,0 +1,136 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 NTT Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import tarfile
+import tempfile
+
+from tempest.api.object_storage import base
+from tempest.common import custom_matchers
+from tempest import test
+
+
+class BulkTest(base.BaseObjectTest):
+
+ def setUp(self):
+ super(BulkTest, self).setUp()
+ self.containers = []
+
+ def tearDown(self):
+ self.delete_containers(self.containers)
+ super(BulkTest, self).tearDown()
+
+ def _create_archive(self):
+ # Create an archived file for bulk upload testing.
+ # Directory and files contained in the directory correspond to
+ # container and subsidiary objects.
+ tmp_dir = tempfile.mkdtemp()
+ tmp_file = tempfile.mkstemp(dir=tmp_dir)
+
+ # Extract a container name and an object name
+ container_name = tmp_dir.split("/")[-1]
+ object_name = tmp_file[1].split("/")[-1]
+
+ # Create tar file
+ tarpath = tempfile.NamedTemporaryFile(suffix=".tar")
+ tar = tarfile.open(None, 'w', tarpath)
+ tar.add(tmp_dir, arcname=container_name)
+ tar.close()
+ tarpath.flush()
+
+ return tarpath.name, container_name, object_name
+
+ @test.attr(type='gate')
+ def test_extract_archive(self):
+ # Test bulk operation of file upload with an archived file
+ filepath, container_name, object_name = self._create_archive()
+
+ params = {'extract-archive': 'tar'}
+ with open(filepath) as fh:
+ mydata = fh.read()
+ resp, body = self.account_client.create_account(data=mydata,
+ params=params)
+
+ self.containers.append(container_name)
+
+ self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+
+ # When uploading an archived file with the bulk operation, the response
+ # does not contain 'content-length' header. This is the special case,
+ # therefore the existence of response headers is checked without
+ # custom matcher.
+ self.assertIn('transfer-encoding', resp)
+ self.assertIn('content-type', resp)
+ self.assertIn('x-trans-id', resp)
+ self.assertIn('date', resp)
+
+ # Check only the format of common headers with custom matcher
+ self.assertThat(resp, custom_matchers.AreAllWellFormatted())
+
+ param = {'format': 'json'}
+ resp, body = self.account_client.list_account_containers(param)
+
+ self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+ self.assertHeaders(resp, 'Account', 'GET')
+
+ self.assertIn(container_name, [b['name'] for b in body])
+
+ param = {'format': 'json'}
+ resp, contents_list = self.container_client.list_container_contents(
+ container_name, param)
+
+ self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+ self.assertHeaders(resp, 'Container', 'GET')
+
+ self.assertIn(object_name, [c['name'] for c in contents_list])
+
+ @test.attr(type='gate')
+ def test_bulk_delete(self):
+ # Test bulk operation of deleting multiple files
+ filepath, container_name, object_name = self._create_archive()
+
+ params = {'extract-archive': 'tar'}
+ with open(filepath) as fh:
+ mydata = fh.read()
+ resp, body = self.account_client.create_account(data=mydata,
+ params=params)
+
+ data = '%s/%s\n%s' % (container_name, object_name, container_name)
+ params = {'bulk-delete': ''}
+ resp, body = self.account_client.delete_account(data=data,
+ params=params)
+
+ self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+
+ # When deleting multiple files using the bulk operation, the response
+ # does not contain 'content-length' header. This is the special case,
+ # therefore the existence of response headers is checked without
+ # custom matcher.
+ self.assertIn('transfer-encoding', resp)
+ self.assertIn('content-type', resp)
+ self.assertIn('x-trans-id', resp)
+ self.assertIn('date', resp)
+
+ # Check only the format of common headers with custom matcher
+ self.assertThat(resp, custom_matchers.AreAllWellFormatted())
+
+ # Check if a container is deleted
+ param = {'format': 'txt'}
+ resp, body = self.account_client.list_account_containers(param)
+
+ self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+ self.assertHeaders(resp, 'Account', 'GET')
+
+ self.assertNotIn(container_name, body)
diff --git a/tempest/api/volume/admin/test_snapshots_actions.py b/tempest/api/volume/admin/test_snapshots_actions.py
index 3211ef8..12fda92 100644
--- a/tempest/api/volume/admin/test_snapshots_actions.py
+++ b/tempest/api/volume/admin/test_snapshots_actions.py
@@ -64,6 +64,19 @@
status)
super(SnapshotsActionsTest, self).tearDown()
+ def _create_reset_and_force_delete_temp_snapshot(self, status=None):
+ # Create snapshot, reset snapshot status,
+ # and force delete temp snapshot
+ temp_snapshot = self.create_snapshot(self.volume['id'])
+ if status:
+ resp, body = self.admin_snapshots_client.\
+ reset_snapshot_status(temp_snapshot['id'], status)
+ self.assertEqual(202, resp.status)
+ resp_delete, volume_delete = self.admin_snapshots_client.\
+ force_delete_snapshot(temp_snapshot['id'])
+ self.assertEqual(202, resp_delete.status)
+ self.client.wait_for_resource_deletion(temp_snapshot['id'])
+
def _get_progress_alias(self):
return 'os-extended-snapshot-attributes:progress'
@@ -99,6 +112,26 @@
self.assertEqual(status, snapshot_get['status'])
self.assertEqual(progress, snapshot_get[progress_alias])
+ @attr(type='gate')
+ def test_snapshot_force_delete_when_snapshot_is_creating(self):
+ # test force delete when status of snapshot is creating
+ self._create_reset_and_force_delete_temp_snapshot('creating')
+
+ @attr(type='gate')
+ def test_snapshot_force_delete_when_snapshot_is_deleting(self):
+ # test force delete when status of snapshot is deleting
+ self._create_reset_and_force_delete_temp_snapshot('deleting')
+
+ @attr(type='gate')
+ def test_snapshot_force_delete_when_snapshot_is_error(self):
+ # test force delete when status of snapshot is error
+ self._create_reset_and_force_delete_temp_snapshot('error')
+
+ @attr(type='gate')
+ def test_snapshot_force_delete_when_snapshot_is_error_deleting(self):
+ # test force delete when status of snapshot is error_deleting
+ self._create_reset_and_force_delete_temp_snapshot('error_deleting')
+
class SnapshotsActionsTestXML(SnapshotsActionsTest):
_interface = "xml"
diff --git a/tempest/common/custom_matchers.py b/tempest/common/custom_matchers.py
index a02c967..4a7921f 100644
--- a/tempest/common/custom_matchers.py
+++ b/tempest/common/custom_matchers.py
@@ -131,6 +131,8 @@
return InvalidFormat(key, value)
elif key == 'etag' and not value.isalnum():
return InvalidFormat(key, value)
+ elif key == 'transfer-encoding' and not value == 'chunked':
+ return InvalidFormat(key, value)
return None
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index 8d07545..9e9ca53 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -291,8 +291,8 @@
def get(self, url, headers=None):
return self.request('GET', url, headers)
- def delete(self, url, headers=None):
- return self.request('DELETE', url, headers)
+ def delete(self, url, headers=None, body=None):
+ return self.request('DELETE', url, headers, body)
def patch(self, url, body, headers):
return self.request('PATCH', url, headers, body)
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index be0e045..020a256 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -196,7 +196,8 @@
floating_ip = self._create_floating_ip(server, public_network_id)
self.floating_ips[floating_ip] = server
- def _check_public_network_connectivity(self, should_connect=True):
+ def _check_public_network_connectivity(self, should_connect=True,
+ msg=None):
# The target login is assumed to have been configured for
# key-based authentication by cloud-init.
ssh_login = CONF.compute.image_ssh_user
@@ -212,7 +213,10 @@
private_key,
should_connect=should_connect)
except Exception:
- LOG.exception('Public network connectivity check failed')
+ ex_msg = 'Public network connectivity check failed'
+ if msg:
+ ex_msg += ": " + msg
+ LOG.exception(ex_msg)
self._log_console_output(servers=self.servers.keys())
debug.log_ip_ns()
raise
@@ -242,6 +246,10 @@
self._check_tenant_network_connectivity()
self._check_public_network_connectivity(should_connect=True)
self._disassociate_floating_ips()
- self._check_public_network_connectivity(should_connect=False)
+ self._check_public_network_connectivity(should_connect=False,
+ msg="after disassociate "
+ "floating ip")
self._reassociate_floating_ips()
- self._check_public_network_connectivity(should_connect=True)
+ self._check_public_network_connectivity(should_connect=True,
+ msg="after re-associate "
+ "floating ip")
diff --git a/tempest/scenario/test_swift_basic_ops.py b/tempest/scenario/test_swift_basic_ops.py
index b367f7f..60df606 100644
--- a/tempest/scenario/test_swift_basic_ops.py
+++ b/tempest/scenario/test_swift_basic_ops.py
@@ -93,7 +93,7 @@
for obj in not_present_obj:
self.assertNotIn(obj, object_list)
- @services('object')
+ @services('object_storage')
def test_swift_basic_ops(self):
self._get_swift_stat()
container_name = self._create_container()
diff --git a/tempest/services/compute/json/interfaces_client.py b/tempest/services/compute/json/interfaces_client.py
index 21d3a5a..c0a2db2 100644
--- a/tempest/services/compute/json/interfaces_client.py
+++ b/tempest/services/compute/json/interfaces_client.py
@@ -39,11 +39,12 @@
fixed_ip=None):
post_body = dict(interfaceAttachment=dict())
if port_id:
- post_body['port_id'] = port_id
+ post_body['interfaceAttachment']['port_id'] = port_id
if network_id:
- post_body['net_id'] = network_id
+ post_body['interfaceAttachment']['net_id'] = network_id
if fixed_ip:
- post_body['fixed_ips'] = [dict(ip_address=fixed_ip)]
+ fip = dict(ip_address=fixed_ip)
+ post_body['interfaceAttachment']['fixed_ips'] = [fip]
post_body = json.dumps(post_body)
resp, body = self.post('servers/%s/os-interface' % server,
headers=self.headers,
diff --git a/tempest/services/compute/v3/json/interfaces_client.py b/tempest/services/compute/v3/json/interfaces_client.py
index 8f0760c..dc06395 100644
--- a/tempest/services/compute/v3/json/interfaces_client.py
+++ b/tempest/services/compute/v3/json/interfaces_client.py
@@ -38,14 +38,14 @@
def create_interface(self, server, port_id=None, network_id=None,
fixed_ip=None):
- post_body = dict(interface_attachment=dict())
+ post_body = dict()
if port_id:
post_body['port_id'] = port_id
if network_id:
post_body['net_id'] = network_id
if fixed_ip:
post_body['fixed_ips'] = [dict(ip_address=fixed_ip)]
- post_body = json.dumps(post_body)
+ post_body = json.dumps({'interface_attachment': post_body})
resp, body = self.post('servers/%s/os-attach-interfaces' % server,
headers=self.headers,
body=post_body)
diff --git a/tempest/services/object_storage/account_client.py b/tempest/services/object_storage/account_client.py
index 4c5b832..28d10aa 100644
--- a/tempest/services/object_storage/account_client.py
+++ b/tempest/services/object_storage/account_client.py
@@ -31,6 +31,37 @@
self.service = CONF.object_storage.catalog_type
self.format = 'json'
+ def create_account(self, data=None,
+ params=None,
+ metadata={},
+ remove_metadata={},
+ metadata_prefix='X-Account-Meta-',
+ remove_metadata_prefix='X-Remove-Account-Meta-'):
+ """Create an account."""
+ url = ''
+ if params:
+ url += '?%s' % urllib.urlencode(params)
+
+ headers = {}
+ for key in metadata:
+ headers[metadata_prefix + key] = metadata[key]
+ for key in remove_metadata:
+ headers[remove_metadata_prefix + key] = remove_metadata[key]
+
+ resp, body = self.put(url, data, headers)
+ return resp, body
+
+ def delete_account(self, data=None, params=None):
+ """Delete an account."""
+ url = ''
+ if params:
+ if 'bulk-delete' in params:
+ url += 'bulk-delete&'
+ url = '?%s%s' % (url, urllib.urlencode(params))
+
+ resp, body = self.delete(url, headers=None, body=data)
+ return resp, body
+
def list_account_metadata(self):
"""
HEAD on the storage URL
@@ -91,7 +122,9 @@
url = '?' + urllib.urlencode(params)
resp, body = self.get(url)
- body = json.loads(body)
+
+ if params and params.get('format') == 'json':
+ body = json.loads(body)
return resp, body
def list_extensions(self):
diff --git a/tempest/services/volume/json/snapshots_client.py b/tempest/services/volume/json/snapshots_client.py
index a36083b..e8926bd 100644
--- a/tempest/services/volume/json/snapshots_client.py
+++ b/tempest/services/volume/json/snapshots_client.py
@@ -187,3 +187,10 @@
url = "snapshots/%s/metadata/%s" % (str(snapshot_id), str(id))
resp, body = self.delete(url, self.headers)
return resp, body
+
+ def force_delete_snapshot(self, snapshot_id):
+ """Force Delete Snapshot."""
+ post_body = json.dumps({'os-force_delete': {}})
+ resp, body = self.post('snapshots/%s/action' % snapshot_id, post_body,
+ self.headers)
+ return resp, body
diff --git a/tempest/services/volume/xml/snapshots_client.py b/tempest/services/volume/xml/snapshots_client.py
index 3e85041..5e62b6d 100644
--- a/tempest/services/volume/xml/snapshots_client.py
+++ b/tempest/services/volume/xml/snapshots_client.py
@@ -226,3 +226,12 @@
"""Delete metadata item for the snapshot."""
url = "snapshots/%s/metadata/%s" % (str(snapshot_id), str(id))
return self.delete(url)
+
+ def force_delete_snapshot(self, snapshot_id):
+ """Force Delete Snapshot."""
+ post_body = Element("os-force_delete")
+ url = 'snapshots/%s/action' % str(snapshot_id)
+ resp, body = self.post(url, str(Document(post_body)), self.headers)
+ if body:
+ body = xml_to_json(etree.fromstring(body))
+ return resp, body
diff --git a/tempest/test.py b/tempest/test.py
index 3052f55..1a3ca0d 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -67,7 +67,7 @@
exercised by a test case.
"""
valid_service_list = ['compute', 'image', 'volume', 'orchestration',
- 'network', 'identity', 'object', 'dashboard']
+ 'network', 'identity', 'object_storage', 'dashboard']
def decorator(f):
for service in args:
diff --git a/tools/verify_tempest_config.py b/tools/verify_tempest_config.py
index b393402..913c90b 100755
--- a/tools/verify_tempest_config.py
+++ b/tools/verify_tempest_config.py
@@ -127,11 +127,22 @@
"enabled extensions" % (service, extension))
+def check_service_availability(service):
+ if service == 'nova_v3':
+ service = 'nova'
+ return getattr(CONF.service_available, service)
+
+
def main(argv):
print('Running config verification...')
os = clients.ComputeAdminManager(interface='json')
results = {}
for service in ['nova', 'nova_v3', 'cinder', 'neutron']:
+ # TODO(mtreinish) make this a keystone endpoint check for available
+ # services
+ if not check_service_availability(service):
+ print("%s is not available" % service)
+ continue
results = verify_extensions(os, service, results)
verify_glance_api_versions(os)
verify_nova_api_versions(os)