Merge "Add XML support to the limits client."
diff --git a/tempest/tests/compute/admin/test_flavors.py b/tempest/tests/compute/admin/test_flavors.py
index dd2edbd..eac33f1 100644
--- a/tempest/tests/compute/admin/test_flavors.py
+++ b/tempest/tests/compute/admin/test_flavors.py
@@ -17,6 +17,7 @@
import nose
from nose.plugins.attrib import attr
+import unittest2 as unittest
from tempest import exceptions
from tempest.tests.compute.base import BaseComputeAdminTest
@@ -47,6 +48,7 @@
cls.rxtx = 1
@attr(type='positive')
+ @unittest.skip("Until Bug 1042539 is fixed")
def test_create_flavor(self):
"""Create a flavor and ensure it is listed
This operation requires the user to have 'admin' role"""
@@ -77,6 +79,7 @@
self.assertEqual(resp.status, 202)
@attr(type='positive')
+ @unittest.skip("Until Bug 1042539 is fixed")
def test_create_flavor_verify_entry_in_list_details(self):
"""Create a flavor and ensure it's details are listed
This operation requires the user to have 'admin' role"""
@@ -101,6 +104,7 @@
self.assertEqual(resp.status, 202)
@attr(type='negative')
+ @unittest.skip("Until Bug 1042539 is fixed")
def test_get_flavor_details_for_deleted_flavor(self):
"""Delete a flavor and ensure it is not listed"""
# Create a test flavor
diff --git a/tempest/tests/compute/test_attach_volume.py b/tempest/tests/compute/test_attach_volume.py
index 07bd7aa..7fe86dd 100644
--- a/tempest/tests/compute/test_attach_volume.py
+++ b/tempest/tests/compute/test_attach_volume.py
@@ -22,16 +22,15 @@
from tempest.common.utils.data_utils import rand_name
from tempest.common.utils.linux.remote_client import RemoteClient
from tempest import openstack
-from tempest.tests.compute.base import BaseComputeTest
+from tempest.tests.compute import base
-class TestAttachVolume(BaseComputeTest):
+class AttachVolumeTest(object):
run_ssh = tempest.config.TempestConfig().compute.run_ssh
- @classmethod
+ @staticmethod
def setUpClass(cls):
- super(TestAttachVolume, cls).setUpClass()
cls.device = 'vdb'
def _detach(self, server_id, volume_id):
@@ -108,3 +107,19 @@
if attached:
self._detach(server['id'], volume['id'])
self._delete(server['id'], volume['id'])
+
+
+class TestAttachVolumeJSON(base.BaseComputeTestJSON,
+ AttachVolumeTest):
+ @classmethod
+ def setUpClass(cls):
+ super(TestAttachVolumeJSON, cls).setUpClass()
+ AttachVolumeTest.setUpClass(cls)
+
+
+class TestAttachVolumeXML(base.BaseComputeTestXML,
+ AttachVolumeTest):
+ @classmethod
+ def setUpClass(cls):
+ super(TestAttachVolumeXML, cls).setUpClass()
+ AttachVolumeTest.setUpClass(cls)
diff --git a/tempest/tests/compute/test_create_server.py b/tempest/tests/compute/test_create_server.py
index 9cc3e45..d912456 100644
--- a/tempest/tests/compute/test_create_server.py
+++ b/tempest/tests/compute/test_create_server.py
@@ -23,16 +23,15 @@
import tempest.config
from tempest.common.utils.data_utils import rand_name
from tempest.common.utils.linux.remote_client import RemoteClient
-from tempest.tests.compute.base import BaseComputeTest
+from tempest.tests.compute import base
-class ServersTest(BaseComputeTest):
+class ServersTest(object):
run_ssh = tempest.config.TempestConfig().compute.run_ssh
- @classmethod
+ @staticmethod
def setUpClass(cls):
- super(ServersTest, cls).setUpClass()
cls.meta = {'hello': 'world'}
cls.accessIPv4 = '1.1.1.1'
cls.accessIPv6 = '::babe:220.12.22.2'
@@ -52,10 +51,9 @@
cls.client.wait_for_server_status(cls.server_initial['id'], 'ACTIVE')
resp, cls.server = cls.client.get_server(cls.server_initial['id'])
- @classmethod
+ @staticmethod
def tearDownClass(cls):
cls.client.delete_server(cls.server_initial['id'])
- super(ServersTest, cls).tearDownClass()
@attr(type='smoke')
def test_create_server_response(self):
@@ -115,3 +113,29 @@
"""Verify the instance host name is the same as the server name"""
linux_client = RemoteClient(self.server, self.ssh_user, self.password)
self.assertTrue(linux_client.hostname_equals_servername(self.name))
+
+
+class ServersTestJSON(base.BaseComputeTestJSON,
+ ServersTest):
+ @classmethod
+ def setUpClass(cls):
+ super(ServersTestJSON, cls).setUpClass()
+ ServersTest.setUpClass(cls)
+
+ @classmethod
+ def tearDownClass(cls):
+ ServersTest.tearDownClass(cls)
+ super(ServersTestJSON, cls).tearDownClass()
+
+
+class ServersTestXML(base.BaseComputeTestXML,
+ ServersTest):
+ @classmethod
+ def setUpClass(cls):
+ super(ServersTestXML, cls).setUpClass()
+ ServersTest.setUpClass(cls)
+
+ @classmethod
+ def tearDownClass(cls):
+ ServersTest.tearDownClass(cls)
+ super(ServersTestXML, cls).tearDownClass()
diff --git a/tempest/tests/compute/test_images.py b/tempest/tests/compute/test_images.py
index 3dde19f..c969a0c 100644
--- a/tempest/tests/compute/test_images.py
+++ b/tempest/tests/compute/test_images.py
@@ -22,31 +22,11 @@
import tempest.config
from tempest import exceptions
from tempest import openstack
-from tempest.tests.compute.base import BaseComputeTest
+from tempest.tests.compute import base
from tempest.tests import compute
-class ImagesTest(BaseComputeTest):
-
- @classmethod
- def setUpClass(cls):
- super(ImagesTest, cls).setUpClass()
- cls.client = cls.images_client
- cls.servers_client = cls.servers_client
-
- cls.image_ids = []
-
- if compute.MULTI_USER:
- if cls.config.compute.allow_tenant_isolation:
- creds = cls._get_isolated_creds()
- username, tenant_name, password = creds
- cls.alt_manager = openstack.Manager(username=username,
- password=password,
- tenant_name=tenant_name)
- else:
- # Use the alt_XXX credentials in the config file
- cls.alt_manager = openstack.AltManager()
- cls.alt_client = cls.alt_manager.images_client
+class ImagesTestBase(object):
def tearDown(self):
"""Terminate test instances created after a test is executed"""
@@ -392,3 +372,55 @@
self.image_ids.remove(image_id)
self.assertRaises(exceptions.NotFound, self.client.get_image, image_id)
+
+
+class ImagesTestJSON(base.BaseComputeTestJSON,
+ ImagesTestBase):
+ def tearDown(self):
+ ImagesTestBase.tearDown(self)
+
+ @classmethod
+ def setUpClass(cls):
+ super(ImagesTestJSON, cls).setUpClass()
+ cls.client = cls.images_client
+ cls.servers_client = cls.servers_client
+
+ cls.image_ids = []
+
+ if compute.MULTI_USER:
+ if cls.config.compute.allow_tenant_isolation:
+ creds = cls._get_isolated_creds()
+ username, tenant_name, password = creds
+ cls.alt_manager = openstack.Manager(username=username,
+ password=password,
+ tenant_name=tenant_name)
+ else:
+ # Use the alt_XXX credentials in the config file
+ cls.alt_manager = openstack.AltManager()
+ cls.alt_client = cls.alt_manager.images_client
+
+
+class ImagesTestXML(base.BaseComputeTestXML,
+ ImagesTestBase):
+ def tearDown(self):
+ ImagesTestBase.tearDown(self)
+
+ @classmethod
+ def setUpClass(cls):
+ super(ImagesTestXML, cls).setUpClass()
+ cls.client = cls.images_client
+ cls.servers_client = cls.servers_client
+
+ cls.image_ids = []
+
+ if compute.MULTI_USER:
+ if cls.config.compute.allow_tenant_isolation:
+ creds = cls._get_isolated_creds()
+ username, tenant_name, password = creds
+ cls.alt_manager = openstack.Manager(username=username,
+ password=password,
+ tenant_name=tenant_name)
+ else:
+ # Use the alt_XXX credentials in the config file
+ cls.alt_manager = openstack.AltManager()
+ cls.alt_client = cls.alt_manager.images_client
diff --git a/tempest/tests/compute/test_list_server_filters.py b/tempest/tests/compute/test_list_server_filters.py
index c06a63e..a1e13c7 100644
--- a/tempest/tests/compute/test_list_server_filters.py
+++ b/tempest/tests/compute/test_list_server_filters.py
@@ -21,17 +21,16 @@
from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
-from tempest.tests.compute.base import BaseComputeTest
+from tempest.tests.compute import base
from tempest.tests import utils
import nose
-class ListServerFiltersTest(BaseComputeTest):
+class ListServerFiltersTest(object):
- @classmethod
+ @staticmethod
def setUpClass(cls):
raise nose.SkipTest("Until Bug 1039753 is fixed")
- super(ListServerFiltersTest, cls).setUpClass()
cls.client = cls.servers_client
# Check to see if the alternate image ref actually exists...
@@ -82,12 +81,11 @@
cls.s2_min = cls._convert_to_min_details(cls.s2)
cls.s3_min = cls._convert_to_min_details(cls.s3)
- @classmethod
+ @staticmethod
def tearDownClass(cls):
cls.client.delete_server(cls.s1['id'])
cls.client.delete_server(cls.s2['id'])
cls.client.delete_server(cls.s3['id'])
- super(ListServerFiltersTest, cls).tearDownClass()
def _server_id_in_results(self, server_id, results):
ids = [row['id'] for row in results]
@@ -204,3 +202,29 @@
min_detail['links'] = server['links']
min_detail['id'] = server['id']
return min_detail
+
+
+class ListServerFiltersTestJSON(base.BaseComputeTestJSON,
+ ListServerFiltersTest):
+ @classmethod
+ def setUpClass(cls):
+ super(ListServerFiltersTestJSON, cls).setUpClass()
+ ListServerFiltersTest.setUpClass(cls)
+
+ @classmethod
+ def tearDownClass(cls):
+ super(ListServerFiltersTestJSON, cls).tearDownClass()
+ ListServerFiltersTest.tearDownClass(cls)
+
+
+class ListServerFiltersTestXML(base.BaseComputeTestXML,
+ ListServerFiltersTest):
+ @classmethod
+ def setUpClass(cls):
+ super(ListServerFiltersTestXML, cls).setUpClass()
+ ListServerFiltersTest.setUpClass(cls)
+
+ @classmethod
+ def tearDownClass(cls):
+ super(ListServerFiltersTestXML, cls).tearDownClass()
+ ListServerFiltersTest.tearDownClass(cls)
diff --git a/tempest/tests/compute/test_security_groups.py b/tempest/tests/compute/test_security_groups.py
index f5d9848..4444d62 100644
--- a/tempest/tests/compute/test_security_groups.py
+++ b/tempest/tests/compute/test_security_groups.py
@@ -19,14 +19,13 @@
from tempest import exceptions
from tempest.common.utils.data_utils import rand_name
-from tempest.tests.compute.base import BaseComputeTest
+from tempest.tests.compute import base
-class SecurityGroupsTest(BaseComputeTest):
+class SecurityGroupsTest(object):
- @classmethod
+ @staticmethod
def setUpClass(cls):
- super(SecurityGroupsTest, cls).setUpClass()
cls.client = cls.security_groups_client
@attr(type='positive')
@@ -311,3 +310,19 @@
self.client.delete_security_group(sg2_id)
self.assertEqual(202, resp.status)
+
+
+class SecurityGroupsTestJSON(base.BaseComputeTestJSON,
+ SecurityGroupsTest):
+ @classmethod
+ def setUpClass(cls):
+ super(SecurityGroupsTestJSON, cls).setUpClass()
+ SecurityGroupsTest.setUpClass(cls)
+
+
+class SecurityGroupsTestXML(base.BaseComputeTestXML,
+ SecurityGroupsTest):
+ @classmethod
+ def setUpClass(cls):
+ super(SecurityGroupsTestXML, cls).setUpClass()
+ SecurityGroupsTest.setUpClass(cls)