diff --git a/etc/logging.conf.sample b/etc/logging.conf.sample
index 3b468f1..cdeedef 100644
--- a/etc/logging.conf.sample
+++ b/etc/logging.conf.sample
@@ -1,46 +1,40 @@
 [loggers]
-keys=root,tempest,tempest_stress
+keys=root,tempest_stress
 
 [handlers]
-keys=file,syslog,devel
+keys=file,devel,syslog
 
 [formatters]
-keys=default,tests
+keys=simple,tests
 
 [logger_root]
-level=NOTSET
-handlers=syslog
-
-[logger_tempest]
 level=DEBUG
 handlers=file
-qualname=tempest
 
 [logger_tempest_stress]
-level=INFO
+level=DEBUG
 handlers=file,devel
 qualname=tempest.stress
 
 [handler_file]
 class=FileHandler
 level=DEBUG
+args=('tempest.log', 'w+')
 formatter=tests
-args=('tempest.log', 'w')
 
 [handler_syslog]
 class=handlers.SysLogHandler
 level=ERROR
-formatter = default
 args = ('/dev/log', handlers.SysLogHandler.LOG_USER)
 
 [handler_devel]
 class=StreamHandler
 level=DEBUG
-formatter=default
 args=(sys.stdout,)
-
-[formatter_default]
-format=%(name)s: %(levelname)s: %(message)s
+formatter=simple
 
 [formatter_tests]
-class = tempest.common.log.TestsFormatter
+class = tempest.openstack.common.log.ContextFormatter
+
+[formatter_simple]
+format=%(asctime)s.%(msecs)03d %(process)d %(levelname)s: %(message)s
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index ee2da40..068a666 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -391,6 +391,20 @@
 #endpoint_type=publicURL
 
 
+[database]
+
+#
+# Options defined in tempest.config
+#
+
+# Catalog type of the Database service. (string value)
+#catalog_type=database
+
+# Valid primary flavor to use in database tests. (string
+# value)
+#db_flavor_ref=1
+
+
 [debug]
 
 #
@@ -548,6 +562,16 @@
 #ssh_user_regex=[["^.*[Cc]irros.*$", "root"]]
 
 
+[negative]
+
+#
+# Options defined in tempest.config
+#
+
+# Test generator class for all negative tests (string value)
+#test_generator=tempest.common.generator.negative_generator.NegativeTestGenerator
+
+
 [network]
 
 #
@@ -574,9 +598,6 @@
 # The mask bits for tenant ipv4 subnets (integer value)
 #tenant_network_mask_bits=28
 
-# Allow the execution of IPv6 tests (boolean value)
-#ipv6_enabled=true
-
 # The cidr block to allocate tenant ipv6 subnets from (string
 # value)
 #tenant_network_v6_cidr=2003::/64
@@ -603,6 +624,9 @@
 # Options defined in tempest.config
 #
 
+# Allow the execution of IPv6 tests (boolean value)
+#ipv6=true
+
 # A list of enabled network extensions with a special entry
 # all which indicates every extension is enabled (list value)
 #api_extensions=all
@@ -679,7 +703,7 @@
 
 # Timeout in seconds to wait for a stack to build. (integer
 # value)
-#build_timeout=300
+#build_timeout=600
 
 # Instance type for tests. Needs to be big enough for a full
 # OS plus the test workload (string value)
@@ -698,6 +722,16 @@
 #max_template_size=524288
 
 
+[queuing]
+
+#
+# Options defined in tempest.config
+#
+
+# Catalog type of the Queuing service. (string value)
+#catalog_type=queuing
+
+
 [scenario]
 
 #
@@ -773,6 +807,14 @@
 # value)
 #ironic=false
 
+# Whether or not Trove is expected to be available (boolean
+# value)
+#trove=false
+
+# Whether or not Marconi is expected to be available (boolean
+# value)
+#marconi=false
+
 
 [stress]
 
diff --git a/requirements.txt b/requirements.txt
index 0bddca3..48d1b12 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -9,7 +9,7 @@
 netaddr>=0.7.6
 python-glanceclient>=0.9.0
 python-keystoneclient>=0.6.0
-python-novaclient>=2.15.0
+python-novaclient>=2.17.0
 python-neutronclient>=2.3.4,<3
 python-cinderclient>=1.0.6
 python-heatclient>=0.2.3
diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py
index 6797005..fb249e5 100644
--- a/tempest/api/compute/admin/test_aggregates.py
+++ b/tempest/api/compute/admin/test_aggregates.py
@@ -16,7 +16,7 @@
 from tempest.api.compute import base
 from tempest.common import tempest_fixtures as fixtures
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class AggregatesAdminTestJSON(base.BaseV2ComputeAdminTest):
@@ -39,7 +39,7 @@
                     filter(lambda y: y['service'] == 'compute', hosts_all))
         cls.host = hosts[0]
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_aggregate_create_delete(self):
         # Create and delete an aggregate.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -52,7 +52,7 @@
         self.assertEqual(200, resp.status)
         self.client.wait_for_resource_deletion(aggregate['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_aggregate_create_delete_with_az(self):
         # Create and delete an aggregate.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -67,7 +67,7 @@
         self.assertEqual(200, resp.status)
         self.client.wait_for_resource_deletion(aggregate['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_aggregate_create_verify_entry_in_list(self):
         # Create an aggregate and ensure it is listed.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -80,7 +80,7 @@
                       map(lambda x: (x['id'], x['availability_zone']),
                           aggregates))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_aggregate_create_update_metadata_get_details(self):
         # Create an aggregate and ensure its details are returned.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -105,7 +105,7 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(meta, body["metadata"])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_aggregate_create_update_with_az(self):
         # Update an aggregate and ensure properties are updated correctly
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -137,7 +137,7 @@
                          (x['id'], x['name'], x['availability_zone']),
                           aggregates))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_aggregate_add_remove_host(self):
         # Add an host to the given aggregate and remove.
         self.useFixture(fixtures.LockFixture('availability_zone'))
@@ -159,7 +159,7 @@
                          body['availability_zone'])
         self.assertNotIn(self.host, body['hosts'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_aggregate_add_host_list(self):
         # Add an host to the given aggregate and list.
         self.useFixture(fixtures.LockFixture('availability_zone'))
@@ -177,7 +177,7 @@
         self.assertIsNone(agg['availability_zone'])
         self.assertIn(self.host, agg['hosts'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_aggregate_add_host_get_details(self):
         # Add an host to the given aggregate and get details.
         self.useFixture(fixtures.LockFixture('availability_zone'))
@@ -192,7 +192,7 @@
         self.assertIsNone(body['availability_zone'])
         self.assertIn(self.host, body['hosts'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_aggregate_add_host_create_server_with_az(self):
         # Add an host to the given aggregate and create a server.
         self.useFixture(fixtures.LockFixture('availability_zone'))
diff --git a/tempest/api/compute/admin/test_aggregates_negative.py b/tempest/api/compute/admin/test_aggregates_negative.py
index 3d34d47..690f2ab 100644
--- a/tempest/api/compute/admin/test_aggregates_negative.py
+++ b/tempest/api/compute/admin/test_aggregates_negative.py
@@ -17,7 +17,7 @@
 from tempest.common import tempest_fixtures as fixtures
 from tempest.common.utils import data_utils
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class AggregatesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@@ -39,7 +39,7 @@
                     filter(lambda y: y['service'] == 'compute', hosts_all))
         cls.host = hosts[0]
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_create_as_user(self):
         # Regular user is not allowed to create an aggregate.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -47,14 +47,14 @@
                           self.user_client.create_aggregate,
                           name=aggregate_name)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_create_aggregate_name_length_less_than_1(self):
         # the length of aggregate name should >= 1 and <=255
         self.assertRaises(exceptions.BadRequest,
                           self.client.create_aggregate,
                           name='')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_create_aggregate_name_length_exceeds_255(self):
         # the length of aggregate name should >= 1 and <=255
         aggregate_name = 'a' * 256
@@ -62,7 +62,7 @@
                           self.client.create_aggregate,
                           name=aggregate_name)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_create_with_existent_aggregate_name(self):
         # creating an aggregate with existent aggregate name is forbidden
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -74,7 +74,7 @@
                           self.client.create_aggregate,
                           name=aggregate_name)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_delete_as_user(self):
         # Regular user is not allowed to delete an aggregate.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -86,13 +86,13 @@
                           self.user_client.delete_aggregate,
                           aggregate['id'])
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_list_as_user(self):
         # Regular user is not allowed to list aggregates.
         self.assertRaises(exceptions.Unauthorized,
                           self.user_client.list_aggregates)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_get_details_as_user(self):
         # Regular user is not allowed to get aggregate details.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -104,19 +104,19 @@
                           self.user_client.get_aggregate,
                           aggregate['id'])
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_delete_with_invalid_id(self):
         # Delete an aggregate with invalid id should raise exceptions.
         self.assertRaises(exceptions.NotFound,
                           self.client.delete_aggregate, -1)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_get_details_with_invalid_id(self):
         # Get aggregate details with invalid id should raise exceptions.
         self.assertRaises(exceptions.NotFound,
                           self.client.get_aggregate, -1)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_add_non_exist_host(self):
         # Adding a non-exist host to an aggregate should raise exceptions.
         resp, hosts_all = self.os_adm.hosts_client.list_hosts()
@@ -133,7 +133,7 @@
         self.assertRaises(exceptions.NotFound, self.client.add_host,
                           aggregate['id'], non_exist_host)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_add_host_as_user(self):
         # Regular user is not allowed to add a host to an aggregate.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -145,7 +145,7 @@
                           self.user_client.add_host,
                           aggregate['id'], self.host)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_add_existent_host(self):
         self.useFixture(fixtures.LockFixture('availability_zone'))
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
@@ -160,7 +160,7 @@
         self.assertRaises(exceptions.Conflict, self.client.add_host,
                           aggregate['id'], self.host)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_remove_host_as_user(self):
         # Regular user is not allowed to remove a host from an aggregate.
         self.useFixture(fixtures.LockFixture('availability_zone'))
@@ -176,7 +176,7 @@
                           self.user_client.remove_host,
                           aggregate['id'], self.host)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_aggregate_remove_nonexistent_host(self):
         non_exist_host = data_utils.rand_name('nonexist_host_')
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
diff --git a/tempest/api/compute/admin/test_availability_zone.py b/tempest/api/compute/admin/test_availability_zone.py
index 1387261..3c06624 100644
--- a/tempest/api/compute/admin/test_availability_zone.py
+++ b/tempest/api/compute/admin/test_availability_zone.py
@@ -14,7 +14,7 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest.test import attr
+from tempest import test
 
 
 class AZAdminTestJSON(base.BaseV2ComputeAdminTest):
@@ -28,14 +28,14 @@
         super(AZAdminTestJSON, cls).setUpClass()
         cls.client = cls.os_adm.availability_zone_client
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_availability_zone_list(self):
         # List of availability zone
         resp, availability_zone = self.client.get_availability_zone_list()
         self.assertEqual(200, resp.status)
         self.assertTrue(len(availability_zone) > 0)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_availability_zone_list_detail(self):
         # List of availability zones and available services
         resp, availability_zone = \
diff --git a/tempest/api/compute/admin/test_availability_zone_negative.py b/tempest/api/compute/admin/test_availability_zone_negative.py
index 8cc8bce..ce97491 100644
--- a/tempest/api/compute/admin/test_availability_zone_negative.py
+++ b/tempest/api/compute/admin/test_availability_zone_negative.py
@@ -14,7 +14,7 @@
 
 from tempest.api.compute import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class AZAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@@ -28,7 +28,7 @@
         super(AZAdminNegativeTestJSON, cls).setUpClass()
         cls.non_adm_client = cls.availability_zone_client
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_availability_zone_list_detail_with_non_admin_user(self):
         # List of availability zones and available services with
         # non-administrator user
diff --git a/tempest/api/compute/admin/test_fixed_ips.py b/tempest/api/compute/admin/test_fixed_ips.py
index 00bb9c3..b0692b1 100644
--- a/tempest/api/compute/admin/test_fixed_ips.py
+++ b/tempest/api/compute/admin/test_fixed_ips.py
@@ -15,7 +15,7 @@
 
 from tempest.api.compute import base
 from tempest import config
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -39,18 +39,18 @@
             if cls.ip:
                 break
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_fixed_ip_details(self):
         resp, fixed_ip = self.client.get_fixed_ip_details(self.ip)
         self.assertEqual(fixed_ip['address'], self.ip)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_set_reserve(self):
         body = {"reserve": "None"}
         resp, body = self.client.reserve_fixed_ip(self.ip, body)
         self.assertEqual(resp.status, 202)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_set_unreserve(self):
         body = {"unreserve": "None"}
         resp, body = self.client.reserve_fixed_ip(self.ip, body)
diff --git a/tempest/api/compute/admin/test_fixed_ips_negative.py b/tempest/api/compute/admin/test_fixed_ips_negative.py
index 0faedb2..3fb3829 100644
--- a/tempest/api/compute/admin/test_fixed_ips_negative.py
+++ b/tempest/api/compute/admin/test_fixed_ips_negative.py
@@ -15,7 +15,7 @@
 from tempest.api.compute import base
 from tempest import config
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -40,26 +40,26 @@
             if cls.ip:
                 break
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_fixed_ip_details_with_non_admin_user(self):
         self.assertRaises(exceptions.Unauthorized,
                           self.non_admin_client.get_fixed_ip_details, self.ip)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_set_reserve_with_non_admin_user(self):
         body = {"reserve": "None"}
         self.assertRaises(exceptions.Unauthorized,
                           self.non_admin_client.reserve_fixed_ip,
                           self.ip, body)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_set_unreserve_with_non_admin_user(self):
         body = {"unreserve": "None"}
         self.assertRaises(exceptions.Unauthorized,
                           self.non_admin_client.reserve_fixed_ip,
                           self.ip, body)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_set_reserve_with_invalid_ip(self):
         # NOTE(maurosr): since this exercises the same code snippet, we do it
         # only for reserve action
@@ -68,7 +68,7 @@
                           self.client.reserve_fixed_ip,
                           "my.invalid.ip", body)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_fixed_ip_with_invalid_action(self):
         body = {"invalid_action": "None"}
         self.assertRaises(exceptions.BadRequest,
diff --git a/tempest/api/compute/admin/test_hosts.py b/tempest/api/compute/admin/test_hosts.py
index b4b3139..e612566 100644
--- a/tempest/api/compute/admin/test_hosts.py
+++ b/tempest/api/compute/admin/test_hosts.py
@@ -14,7 +14,7 @@
 
 from tempest.api.compute import base
 from tempest.common import tempest_fixtures as fixtures
-from tempest.test import attr
+from tempest import test
 
 
 class HostsAdminTestJSON(base.BaseV2ComputeAdminTest):
@@ -28,13 +28,13 @@
         super(HostsAdminTestJSON, cls).setUpClass()
         cls.client = cls.os_adm.hosts_client
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_hosts(self):
         resp, hosts = self.client.list_hosts()
         self.assertEqual(200, resp.status)
         self.assertTrue(len(hosts) >= 2, str(hosts))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_hosts_with_zone(self):
         self.useFixture(fixtures.LockFixture('availability_zone'))
         resp, hosts = self.client.list_hosts()
@@ -46,7 +46,7 @@
         self.assertTrue(len(hosts) >= 1)
         self.assertIn(host, hosts)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_hosts_with_a_blank_zone(self):
         # If send the request with a blank zone, the request will be successful
         # and it will return all the hosts list
@@ -55,7 +55,7 @@
         self.assertNotEqual(0, len(hosts))
         self.assertEqual(200, resp.status)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_hosts_with_nonexistent_zone(self):
         # If send the request with a nonexistent zone, the request will be
         # successful and no hosts will be retured
@@ -64,7 +64,7 @@
         self.assertEqual(0, len(hosts))
         self.assertEqual(200, resp.status)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_show_host_detail(self):
         resp, hosts = self.client.list_hosts()
         self.assertEqual(200, resp.status)
diff --git a/tempest/api/compute/admin/test_hypervisor.py b/tempest/api/compute/admin/test_hypervisor.py
index 4e1b289..48f9ffb 100644
--- a/tempest/api/compute/admin/test_hypervisor.py
+++ b/tempest/api/compute/admin/test_hypervisor.py
@@ -14,7 +14,7 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest.test import attr
+from tempest import test
 
 
 class HypervisorAdminTestJSON(base.BaseV2ComputeAdminTest):
@@ -37,20 +37,20 @@
     def assertHypervisors(self, hypers):
         self.assertTrue(len(hypers) > 0, "No hypervisors found: %s" % hypers)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_hypervisor_list(self):
         # List of hypervisor and available hypervisors hostname
         hypers = self._list_hypervisors()
         self.assertHypervisors(hypers)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_hypervisor_list_details(self):
         # Display the details of the all hypervisor
         resp, hypers = self.client.get_hypervisor_list_details()
         self.assertEqual(200, resp.status)
         self.assertHypervisors(hypers)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_hypervisor_show_details(self):
         # Display the details of the specified hypervisor
         hypers = self._list_hypervisors()
@@ -63,7 +63,7 @@
         self.assertEqual(details['hypervisor_hostname'],
                          hypers[0]['hypervisor_hostname'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_hypervisor_show_servers(self):
         # Show instances about the specific hypervisors
         hypers = self._list_hypervisors()
@@ -74,14 +74,14 @@
         self.assertEqual(200, resp.status)
         self.assertTrue(len(hypervisors) > 0)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_hypervisor_stats(self):
         # Verify the stats of the all hypervisor
         resp, stats = self.client.get_hypervisor_stats()
         self.assertEqual(200, resp.status)
         self.assertTrue(len(stats) > 0)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_hypervisor_uptime(self):
         # Verify that GET shows the specified hypervisor uptime
         hypers = self._list_hypervisors()
@@ -101,7 +101,7 @@
             has_valid_uptime,
             "None of the hypervisors had a valid uptime: %s" % hypers)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_search_hypervisor(self):
         hypers = self._list_hypervisors()
         self.assertHypervisors(hypers)
diff --git a/tempest/api/compute/admin/test_hypervisor_negative.py b/tempest/api/compute/admin/test_hypervisor_negative.py
index be0153b..4ba8d30 100644
--- a/tempest/api/compute/admin/test_hypervisor_negative.py
+++ b/tempest/api/compute/admin/test_hypervisor_negative.py
@@ -18,7 +18,7 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class HypervisorAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@@ -39,7 +39,7 @@
         self.assertEqual(200, resp.status)
         return hypers
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_show_nonexistent_hypervisor(self):
         nonexistent_hypervisor_id = str(uuid.uuid4())
 
@@ -48,7 +48,7 @@
             self.client.get_hypervisor_show_details,
             nonexistent_hypervisor_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_show_hypervisor_with_non_admin_user(self):
         hypers = self._list_hypervisors()
         self.assertTrue(len(hypers) > 0)
@@ -58,7 +58,7 @@
             self.non_adm_client.get_hypervisor_show_details,
             hypers[0]['id'])
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_show_servers_with_non_admin_user(self):
         hypers = self._list_hypervisors()
         self.assertTrue(len(hypers) > 0)
@@ -68,7 +68,7 @@
             self.non_adm_client.get_hypervisor_servers,
             hypers[0]['id'])
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_show_servers_with_nonexistent_hypervisor(self):
         nonexistent_hypervisor_id = str(uuid.uuid4())
 
@@ -77,13 +77,13 @@
             self.client.get_hypervisor_servers,
             nonexistent_hypervisor_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_hypervisor_stats_with_non_admin_user(self):
         self.assertRaises(
             exceptions.Unauthorized,
             self.non_adm_client.get_hypervisor_stats)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_nonexistent_hypervisor_uptime(self):
         nonexistent_hypervisor_id = str(uuid.uuid4())
 
@@ -92,7 +92,7 @@
             self.client.get_hypervisor_uptime,
             nonexistent_hypervisor_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_hypervisor_uptime_with_non_admin_user(self):
         hypers = self._list_hypervisors()
         self.assertTrue(len(hypers) > 0)
@@ -102,21 +102,21 @@
             self.non_adm_client.get_hypervisor_uptime,
             hypers[0]['id'])
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_hypervisor_list_with_non_admin_user(self):
         # List of hypervisor and available services with non admin user
         self.assertRaises(
             exceptions.Unauthorized,
             self.non_adm_client.get_hypervisor_list)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_hypervisor_list_details_with_non_admin_user(self):
         # List of hypervisor details and available services with non admin user
         self.assertRaises(
             exceptions.Unauthorized,
             self.non_adm_client.get_hypervisor_list_details)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_search_nonexistent_hypervisor(self):
         nonexistent_hypervisor_name = data_utils.rand_name('test_hypervisor')
 
@@ -125,7 +125,7 @@
             self.client.search_hypervisor,
             nonexistent_hypervisor_name)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_search_hypervisor_with_non_admin_user(self):
         hypers = self._list_hypervisors()
         self.assertTrue(len(hypers) > 0)
diff --git a/tempest/api/compute/admin/test_instance_usage_audit_log.py b/tempest/api/compute/admin/test_instance_usage_audit_log.py
index 13f504f..32c8656 100644
--- a/tempest/api/compute/admin/test_instance_usage_audit_log.py
+++ b/tempest/api/compute/admin/test_instance_usage_audit_log.py
@@ -16,7 +16,7 @@
 import datetime
 
 from tempest.api.compute import base
-from tempest.test import attr
+from tempest import test
 import urllib
 
 
@@ -27,7 +27,7 @@
         super(InstanceUsageAuditLogTestJSON, cls).setUpClass()
         cls.adm_client = cls.os_adm.instance_usages_audit_log_client
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_instance_usage_audit_logs(self):
         # list instance usage audit logs
         resp, body = self.adm_client.list_instance_usage_audit_logs()
@@ -40,7 +40,7 @@
         for item in expected_items:
             self.assertIn(item, body)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_instance_usage_audit_log(self):
         # Get instance usage audit log before specified time
         now = datetime.datetime.now()
diff --git a/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py b/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py
index e128d0c..fe4a184 100644
--- a/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py
+++ b/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py
@@ -17,7 +17,7 @@
 
 from tempest.api.compute import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 import urllib
 
 
@@ -28,7 +28,7 @@
         super(InstanceUsageAuditLogNegativeTestJSON, cls).setUpClass()
         cls.adm_client = cls.os_adm.instance_usages_audit_log_client
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_instance_usage_audit_logs_with_nonadmin_user(self):
         # the instance_usage_audit_logs API just can be accessed by admin user
         self.assertRaises(exceptions.Unauthorized,
@@ -40,7 +40,7 @@
                           get_instance_usage_audit_log,
                           urllib.quote(now.strftime("%Y-%m-%d %H:%M:%S")))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_instance_usage_audit_logs_with_invalid_time(self):
         self.assertRaises(exceptions.BadRequest,
                           self.adm_client.get_instance_usage_audit_log,
diff --git a/tempest/api/compute/admin/test_security_groups.py b/tempest/api/compute/admin/test_security_groups.py
index 69ba2c2..f728d68 100644
--- a/tempest/api/compute/admin/test_security_groups.py
+++ b/tempest/api/compute/admin/test_security_groups.py
@@ -18,7 +18,7 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -42,7 +42,7 @@
     @testtools.skipIf(CONF.service_available.neutron,
                       "Skipped because neutron do not support all_tenants"
                       "search filter.")
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_security_groups_list_all_tenants_filter(self):
         # Admin can list security groups of all tenants
         # List of all security groups created
diff --git a/tempest/api/compute/admin/test_servers_negative.py b/tempest/api/compute/admin/test_servers_negative.py
index dff4aaa..797b780 100644
--- a/tempest/api/compute/admin/test_servers_negative.py
+++ b/tempest/api/compute/admin/test_servers_negative.py
@@ -17,7 +17,7 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ServersAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@@ -52,7 +52,7 @@
             flavor_id = data_utils.rand_int_id(start=1000)
         return flavor_id
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_resize_server_using_overlimit_ram(self):
         flavor_name = data_utils.rand_name("flavor-")
         flavor_id = self._get_unused_flavor_id()
@@ -70,7 +70,7 @@
                           self.servers[0]['id'],
                           flavor_ref['id'])
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_resize_server_using_overlimit_vcpus(self):
         flavor_name = data_utils.rand_name("flavor-")
         flavor_id = self._get_unused_flavor_id()
@@ -88,38 +88,38 @@
                           self.servers[0]['id'],
                           flavor_ref['id'])
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_reset_state_server_invalid_state(self):
         self.assertRaises(exceptions.BadRequest,
                           self.client.reset_state, self.s1_id,
                           state='invalid')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_reset_state_server_invalid_type(self):
         self.assertRaises(exceptions.BadRequest,
                           self.client.reset_state, self.s1_id,
                           state=1)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_reset_state_server_nonexistent_server(self):
         self.assertRaises(exceptions.NotFound,
                           self.client.reset_state, '999')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_server_diagnostics_by_non_admin(self):
         # Non-admin user can not view server diagnostics according to policy
         self.assertRaises(exceptions.Unauthorized,
                           self.non_adm_client.get_server_diagnostics,
                           self.s1_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_migrate_non_existent_server(self):
         # migrate a non existent server
         self.assertRaises(exceptions.NotFound,
                           self.client.migrate_server,
                           str(uuid.uuid4()))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_migrate_server_invalid_state(self):
         # create server.
         resp, server = self.create_test_server(wait_until='ACTIVE')
diff --git a/tempest/api/compute/admin/test_services.py b/tempest/api/compute/admin/test_services.py
index 3e45d65..9dd429b 100644
--- a/tempest/api/compute/admin/test_services.py
+++ b/tempest/api/compute/admin/test_services.py
@@ -14,8 +14,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute.api_schema import services as schema
 from tempest.api.compute import base
-from tempest.test import attr
+from tempest import test
 
 
 class ServicesAdminTestJSON(base.BaseV2ComputeAdminTest):
@@ -29,30 +30,33 @@
         super(ServicesAdminTestJSON, cls).setUpClass()
         cls.client = cls.os_adm.services_client
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_services(self):
         resp, services = self.client.list_services()
-        self.assertEqual(200, resp.status)
+        self.validate_response(schema.list_services, resp, services)
         self.assertNotEqual(0, len(services))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_service_by_service_binary_name(self):
         binary_name = 'nova-compute'
         params = {'binary': binary_name}
         resp, services = self.client.list_services(params)
-        self.assertEqual(200, resp.status)
+        self.validate_response(schema.list_services, resp, services)
         self.assertNotEqual(0, len(services))
         for service in services:
             self.assertEqual(binary_name, service['binary'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_service_by_host_name(self):
         resp, services = self.client.list_services()
+        self.validate_response(schema.list_services, resp, services)
         host_name = services[0]['host']
         services_on_host = [service for service in services if
                             service['host'] == host_name]
         params = {'host': host_name}
+
         resp, services = self.client.list_services(params)
+        self.validate_response(schema.list_services, resp, services)
 
         # we could have a periodic job checkin between the 2 service
         # lookups, so only compare binary lists.
@@ -63,14 +67,16 @@
         # on order.
         self.assertEqual(sorted(s1), sorted(s2))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_service_by_service_and_host_name(self):
         resp, services = self.client.list_services()
+        self.validate_response(schema.list_services, resp, services)
         host_name = services[0]['host']
         binary_name = services[0]['binary']
         params = {'host': host_name, 'binary': binary_name}
+
         resp, services = self.client.list_services(params)
-        self.assertEqual(200, resp.status)
+        self.validate_response(schema.list_services, resp, services)
         self.assertEqual(1, len(services))
         self.assertEqual(host_name, services[0]['host'])
         self.assertEqual(binary_name, services[0]['binary'])
diff --git a/tempest/api/compute/admin/test_services_negative.py b/tempest/api/compute/admin/test_services_negative.py
index a4bf754..c78d70d 100644
--- a/tempest/api/compute/admin/test_services_negative.py
+++ b/tempest/api/compute/admin/test_services_negative.py
@@ -14,7 +14,7 @@
 
 from tempest.api.compute import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ServicesAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@@ -29,12 +29,12 @@
         cls.client = cls.os_adm.services_client
         cls.non_admin_client = cls.services_client
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_services_with_non_admin_user(self):
         self.assertRaises(exceptions.Unauthorized,
                           self.non_admin_client.list_services)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_service_by_invalid_params(self):
         # return all services if send the request with invalid parameter
         resp, services = self.client.list_services()
@@ -43,7 +43,7 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(len(services), len(services_xxx))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_service_by_invalid_service_and_valid_host(self):
         resp, services = self.client.list_services()
         host_name = services[0]['host']
@@ -52,7 +52,7 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(0, len(services))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_service_with_valid_service_and_invalid_host(self):
         resp, services = self.client.list_services()
         binary_name = services[0]['binary']
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage.py b/tempest/api/compute/admin/test_simple_tenant_usage.py
index 2f1391b..cc8641f 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage.py
@@ -16,7 +16,7 @@
 import datetime
 
 from tempest.api.compute import base
-from tempest.test import attr
+from tempest import test
 import time
 
 
@@ -46,7 +46,7 @@
         # Returns formatted datetime
         return at.strftime('%Y-%m-%dT%H:%M:%S.%f')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_usage_all_tenants(self):
         # Get usage for all tenants
         params = {'start': self.start,
@@ -56,7 +56,7 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(len(tenant_usage), 8)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_usage_tenant(self):
         # Get usage for a specific tenant
         params = {'start': self.start,
@@ -67,7 +67,7 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(len(tenant_usage), 8)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_usage_tenant_with_non_admin_user(self):
         # Get usage for a specific tenant with non admin user
         params = {'start': self.start,
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
index 4ad3e1a..a080f2e 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
@@ -17,7 +17,7 @@
 
 from tempest.api.compute import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class TenantUsagesNegativeTestJSON(base.BaseV2ComputeAdminTest):
@@ -37,7 +37,7 @@
         # Returns formatted datetime
         return at.strftime('%Y-%m-%dT%H:%M:%S.%f')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_usage_tenant_with_empty_tenant_id(self):
         # Get usage for a specific tenant empty
         params = {'start': self.start,
@@ -46,7 +46,7 @@
                           self.adm_client.get_tenant_usage,
                           '', params)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_usage_tenant_with_invalid_date(self):
         # Get usage for tenant with invalid date
         params = {'start': self.end,
@@ -58,7 +58,7 @@
                           self.adm_client.get_tenant_usage,
                           tenant_id, params)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_usage_all_tenants_with_non_admin_user(self):
         # Get usage for all tenants with non admin user
         params = {'start': self.start,
diff --git a/tempest/api/compute/api_schema/__init__.py b/tempest/api/compute/api_schema/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/api/compute/api_schema/__init__.py
diff --git a/tempest/api/compute/api_schema/services.py b/tempest/api/compute/api_schema/services.py
new file mode 100644
index 0000000..ef5868c
--- /dev/null
+++ b/tempest/api/compute/api_schema/services.py
@@ -0,0 +1,38 @@
+# Copyright 2014 NEC Corporation.  All rights reserved.
+#
+#    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.
+
+list_services = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'array',
+        'items': {
+            'type': 'object',
+            'properties': {
+                # NOTE: Now the type of 'id' is integer, but here allows
+                # 'string' also because we will be able to change it to
+                # 'uuid' in the future.
+                'id': {'type': ['integer', 'string']},
+                'zone': {'type': 'string'},
+                'host': {'type': 'string'},
+                'state': {'type': 'string'},
+                'binary': {'type': 'string'},
+                'status': {'type': 'string'},
+                'updated_at': {'type': 'string'},
+                'disabled_reason': {'type': ['string', 'null']},
+            },
+            'required': ['id', 'zone', 'host', 'state', 'binary', 'status',
+                         'updated_at', 'disabled_reason'],
+        },
+    }
+}
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index 28d50c9..e9b9efa 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -15,6 +15,8 @@
 
 import time
 
+import jsonschema
+
 from tempest import clients
 from tempest.common.utils import data_utils
 from tempest import config
@@ -176,6 +178,25 @@
 
         return resp, body
 
+    @classmethod
+    def validate_response(cls, schema, resp, body):
+        response_code = schema['status_code']
+        if resp.status not in response_code:
+            msg = ("The status code(%s) is different than the expected "
+                   "one(%s)") % (resp.status, response_code)
+            raise exceptions.InvalidHttpSuccessCode(msg)
+        response_schema = schema.get('response_body')
+        if response_schema:
+            try:
+                jsonschema.validate(body, response_schema)
+            except jsonschema.ValidationError as ex:
+                msg = ("HTTP response body is invalid (%s)") % ex
+                raise exceptions.InvalidHTTPResponseBody(msg)
+        else:
+            if body:
+                msg = ("HTTP response body should not exist (%s)") % body
+                raise exceptions.InvalidHTTPResponseBody(msg)
+
     def wait_for(self, condition):
         """Repeatedly calls condition() until a timeout."""
         start_time = int(time.time())
@@ -315,14 +336,14 @@
                         "%s will be removed shortly" % cls.__name__)
             raise cls.skipException(skip_msg)
 
-        cls.set_network_resources()
-        super(BaseV3ComputeTest, cls).setUpClass()
         if not CONF.compute_feature_enabled.api_v3:
-            cls.tearDownClass()
             skip_msg = ("%s skipped as nova v3 api is not available" %
                         cls.__name__)
             raise cls.skipException(skip_msg)
 
+        cls.set_network_resources()
+        super(BaseV3ComputeTest, cls).setUpClass()
+
         cls.servers_client = cls.os.servers_v3_client
         cls.images_client = cls.os.image_client
         cls.flavors_client = cls.os.flavors_v3_client
diff --git a/tempest/api/compute/certificates/test_certificates.py b/tempest/api/compute/certificates/test_certificates.py
index 01fdc7c..5299d13 100644
--- a/tempest/api/compute/certificates/test_certificates.py
+++ b/tempest/api/compute/certificates/test_certificates.py
@@ -14,12 +14,12 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest.test import attr
+from tempest import test
 
 
 class CertificatesTestJSON(base.BaseV2ComputeTest):
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_and_get_root_certificate(self):
         # create certificates
         resp, create_body = self.certificates_client.create_certificate()
diff --git a/tempest/api/compute/flavors/test_flavors.py b/tempest/api/compute/flavors/test_flavors.py
index 98a8e29..6e202f6 100644
--- a/tempest/api/compute/flavors/test_flavors.py
+++ b/tempest/api/compute/flavors/test_flavors.py
@@ -14,7 +14,7 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest.test import attr
+from tempest import test
 
 
 class FlavorsTestJSON(base.BaseV2ComputeTest):
@@ -24,7 +24,7 @@
         super(FlavorsTestJSON, cls).setUpClass()
         cls.client = cls.flavors_client
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_flavors(self):
         # List of all flavors should contain the expected flavor
         resp, flavors = self.client.list_flavors()
@@ -33,34 +33,34 @@
                              'name': flavor['name']}
         self.assertIn(flavor_min_detail, flavors)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_flavors_with_detail(self):
         # Detailed list of all flavors should contain the expected flavor
         resp, flavors = self.client.list_flavors_with_detail()
         resp, flavor = self.client.get_flavor_details(self.flavor_ref)
         self.assertIn(flavor, flavors)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_get_flavor(self):
         # The expected flavor details should be returned
         resp, flavor = self.client.get_flavor_details(self.flavor_ref)
         self.assertEqual(self.flavor_ref, flavor['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_flavors_limit_results(self):
         # Only the expected number of flavors should be returned
         params = {'limit': 1}
         resp, flavors = self.client.list_flavors(params)
         self.assertEqual(1, len(flavors))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_flavors_detailed_limit_results(self):
         # Only the expected number of flavors (detailed) should be returned
         params = {'limit': 1}
         resp, flavors = self.client.list_flavors_with_detail(params)
         self.assertEqual(1, len(flavors))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_flavors_using_marker(self):
         # The list of flavors should start from the provided marker
         resp, flavors = self.client.list_flavors()
@@ -71,7 +71,7 @@
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]),
                          'The list of flavors did not start after the marker.')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_flavors_detailed_using_marker(self):
         # The list of flavors should start from the provided marker
         resp, flavors = self.client.list_flavors_with_detail()
@@ -82,7 +82,7 @@
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]),
                          'The list of flavors did not start after the marker.')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_flavors_detailed_filter_by_min_disk(self):
         # The detailed list of flavors should be filtered by disk space
         resp, flavors = self.client.list_flavors_with_detail()
@@ -93,7 +93,7 @@
         resp, flavors = self.client.list_flavors_with_detail(params)
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_flavors_detailed_filter_by_min_ram(self):
         # The detailed list of flavors should be filtered by RAM
         resp, flavors = self.client.list_flavors_with_detail()
@@ -104,7 +104,7 @@
         resp, flavors = self.client.list_flavors_with_detail(params)
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_flavors_filter_by_min_disk(self):
         # The list of flavors should be filtered by disk space
         resp, flavors = self.client.list_flavors_with_detail()
@@ -115,7 +115,7 @@
         resp, flavors = self.client.list_flavors(params)
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_flavors_filter_by_min_ram(self):
         # The list of flavors should be filtered by RAM
         resp, flavors = self.client.list_flavors_with_detail()
diff --git a/tempest/api/compute/flavors/test_flavors_negative_xml.py b/tempest/api/compute/flavors/test_flavors_negative_xml.py
index c93c7c9..bf73c0e 100644
--- a/tempest/api/compute/flavors/test_flavors_negative_xml.py
+++ b/tempest/api/compute/flavors/test_flavors_negative_xml.py
@@ -17,7 +17,7 @@
 
 from tempest.api.compute import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class FlavorsNegativeTestXML(base.BaseV2ComputeTest):
@@ -28,19 +28,19 @@
         super(FlavorsNegativeTestXML, cls).setUpClass()
         cls.client = cls.flavors_client
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_invalid_minRam_filter(self):
         self.assertRaises(exceptions.BadRequest,
                           self.client.list_flavors_with_detail,
                           {'minRam': 'invalid'})
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_invalid_minDisk_filter(self):
         self.assertRaises(exceptions.BadRequest,
                           self.client.list_flavors_with_detail,
                           {'minDisk': 'invalid'})
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_non_existent_flavor_id(self):
         # flavor details are not returned for non-existent flavors
         nonexistent_flavor_id = str(uuid.uuid4())
diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
index 0c3663e..9fc43e2 100644
--- a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
@@ -19,7 +19,7 @@
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -47,7 +47,7 @@
             if cls.non_exist_id not in cls.floating_ip_ids:
                 break
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_allocate_floating_ip_from_nonexistent_pool(self):
         # Negative test:Allocation of a new floating IP from a nonexistent_pool
         # to a project should fail
@@ -55,7 +55,7 @@
                           self.client.create_floating_ip,
                           "non_exist_pool")
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_nonexistent_floating_ip(self):
         # Negative test:Deletion of a nonexistent floating IP
         # from project should fail
@@ -64,7 +64,7 @@
         self.assertRaises(exceptions.NotFound, self.client.delete_floating_ip,
                           self.non_exist_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_associate_nonexistent_floating_ip(self):
         # Negative test:Association of a non existent floating IP
         # to specific server should fail
@@ -73,7 +73,7 @@
                           self.client.associate_floating_ip_to_server,
                           "0.0.0.0", self.server_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_dissociate_nonexistent_floating_ip(self):
         # Negative test:Dissociation of a non existent floating IP should fail
         # Dissociating non existent floating IP
@@ -81,7 +81,7 @@
                           self.client.disassociate_floating_ip_from_server,
                           "0.0.0.0", self.server_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_associate_ip_to_server_without_passing_floating_ip(self):
         # Negative test:Association of empty floating IP to specific server
         # should raise NotFound exception
diff --git a/tempest/api/compute/floating_ips/test_list_floating_ips.py b/tempest/api/compute/floating_ips/test_list_floating_ips.py
index d69e33c..94dcf61 100644
--- a/tempest/api/compute/floating_ips/test_list_floating_ips.py
+++ b/tempest/api/compute/floating_ips/test_list_floating_ips.py
@@ -14,7 +14,7 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest.test import attr
+from tempest import test
 
 
 class FloatingIPDetailsTestJSON(base.BaseV2ComputeTest):
@@ -36,7 +36,7 @@
             cls.client.delete_floating_ip(cls.floating_ip_id[i])
         super(FloatingIPDetailsTestJSON, cls).tearDownClass()
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_floating_ips(self):
         # Positive test:Should return the list of floating IPs
         resp, body = self.client.list_floating_ips()
@@ -47,7 +47,7 @@
         for i in range(3):
             self.assertIn(self.floating_ip[i], floating_ips)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_floating_ip_details(self):
         # Positive test:Should be able to GET the details of floatingIP
         # Creating a floating IP for which details are to be checked
@@ -69,7 +69,7 @@
                          body['fixed_ip'])
         self.assertEqual(floating_ip_id, body['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_floating_ip_pools(self):
         # Positive test:Should return the list of floating IP Pools
         resp, floating_ip_pools = self.client.list_floating_ip_pools()
diff --git a/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py b/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
index 5701be8..8cb2f08 100644
--- a/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
+++ b/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
@@ -19,7 +19,7 @@
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -31,7 +31,7 @@
         super(FloatingIPDetailsNegativeTestJSON, cls).setUpClass()
         cls.client = cls.floating_ips_client
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_nonexistent_floating_ip_details(self):
         # Negative test:Should not be able to GET the details
         # of non-existent floating IP
diff --git a/tempest/api/compute/images/test_image_metadata.py b/tempest/api/compute/images/test_image_metadata.py
index ad211ce..195a018 100644
--- a/tempest/api/compute/images/test_image_metadata.py
+++ b/tempest/api/compute/images/test_image_metadata.py
@@ -16,7 +16,7 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -54,14 +54,14 @@
         resp, _ = self.client.set_image_metadata(self.image_id, meta)
         self.assertEqual(resp.status, 200)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_image_metadata(self):
         # All metadata key/value pairs for an image should be returned
         resp, resp_metadata = self.client.list_image_metadata(self.image_id)
         expected = {'key1': 'value1', 'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_set_image_metadata(self):
         # The metadata for the image should match the new values
         req_metadata = {'meta2': 'value2', 'meta3': 'value3'}
@@ -71,7 +71,7 @@
         resp, resp_metadata = self.client.list_image_metadata(self.image_id)
         self.assertEqual(req_metadata, resp_metadata)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_image_metadata(self):
         # The metadata for the image should match the updated values
         req_metadata = {'key1': 'alt1', 'key3': 'value3'}
@@ -82,14 +82,14 @@
         expected = {'key1': 'alt1', 'key2': 'value2', 'key3': 'value3'}
         self.assertEqual(expected, resp_metadata)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_image_metadata_item(self):
         # The value for a specific metadata key should be returned
         resp, meta = self.client.get_image_metadata_item(self.image_id,
                                                          'key2')
         self.assertEqual('value2', meta['key2'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_set_image_metadata_item(self):
         # The value provided for the given meta item should be set for
         # the image
@@ -100,7 +100,7 @@
         expected = {'key1': 'alt', 'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_image_metadata_item(self):
         # The metadata value/key pair should be deleted from the image
         resp, body = self.client.delete_image_metadata_item(self.image_id,
diff --git a/tempest/api/compute/images/test_image_metadata_negative.py b/tempest/api/compute/images/test_image_metadata_negative.py
index 7776c57..15bb66a 100644
--- a/tempest/api/compute/images/test_image_metadata_negative.py
+++ b/tempest/api/compute/images/test_image_metadata_negative.py
@@ -16,7 +16,7 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
@@ -26,14 +26,14 @@
         super(ImagesMetadataTestJSON, cls).setUpClass()
         cls.client = cls.images_client
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_nonexistent_image_metadata(self):
         # Negative test: List on nonexistent image
         # metadata should not happen
         self.assertRaises(exceptions.NotFound, self.client.list_image_metadata,
                           data_utils.rand_uuid())
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_update_nonexistent_image_metadata(self):
         # Negative test:An update should not happen for a non-existent image
         meta = {'key1': 'alt1', 'key2': 'alt2'}
@@ -41,21 +41,21 @@
                           self.client.update_image_metadata,
                           data_utils.rand_uuid(), meta)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_nonexistent_image_metadata_item(self):
         # Negative test: Get on non-existent image should not happen
         self.assertRaises(exceptions.NotFound,
                           self.client.get_image_metadata_item,
                           data_utils.rand_uuid(), 'key2')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_set_nonexistent_image_metadata(self):
         # Negative test: Metadata should not be set to a non-existent image
         meta = {'key1': 'alt1', 'key2': 'alt2'}
         self.assertRaises(exceptions.NotFound, self.client.set_image_metadata,
                           data_utils.rand_uuid(), meta)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_set_nonexistent_image_metadata_item(self):
         # Negative test: Metadata item should not be set to a
         # nonexistent image
@@ -65,7 +65,7 @@
                           data_utils.rand_uuid(), 'key1',
                           meta)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_nonexistent_image_metadata_item(self):
         # Negative test: Shouldn't be able to delete metadata
         # item from non-existent image
diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
index ed316ef..5de2436 100644
--- a/tempest/api/compute/images/test_images.py
+++ b/tempest/api/compute/images/test_images.py
@@ -32,22 +32,6 @@
         cls.client = cls.images_client
         cls.servers_client = cls.servers_client
 
-        cls.image_ids = []
-
-    def tearDown(self):
-        """Terminate test instances created after a test is executed."""
-        for image_id in self.image_ids:
-            self.client.delete_image(image_id)
-            self.image_ids.remove(image_id)
-        super(ImagesTestJSON, self).tearDown()
-
-    def __create_image__(self, server_id, name, meta=None):
-        resp, body = self.client.create_image(server_id, name, meta)
-        image_id = data_utils.parse_image_id(resp['location'])
-        self.client.wait_for_image_status(image_id, 'ACTIVE')
-        self.image_ids.append(image_id)
-        return resp, body
-
     @test.attr(type=['negative', 'gate'])
     def test_create_image_from_deleted_server(self):
         # An image should not be created if the server instance is removed
@@ -60,8 +44,8 @@
         name = data_utils.rand_name('image')
         meta = {'image_type': 'test'}
         self.assertRaises(exceptions.NotFound,
-                          self.__create_image__,
-                          server['id'], name, meta)
+                          self.create_image_from_server,
+                          server['id'], name=name, meta=meta)
 
     @test.attr(type=['negative', 'gate'])
     def test_create_image_from_invalid_server(self):
@@ -71,8 +55,9 @@
         meta = {'image_type': 'test'}
         resp = {}
         resp['status'] = None
-        self.assertRaises(exceptions.NotFound, self.__create_image__,
-                          '!@#$%^&*()', name, meta)
+        self.assertRaises(exceptions.NotFound,
+                          self.create_image_from_server,
+                          '!@#$%^&*()', name=name, meta=meta)
 
     @test.attr(type=['negative', 'gate'])
     def test_create_image_from_stopped_server(self):
diff --git a/tempest/api/compute/images/test_list_images.py b/tempest/api/compute/images/test_list_images.py
index 4074a7a..eba331f 100644
--- a/tempest/api/compute/images/test_list_images.py
+++ b/tempest/api/compute/images/test_list_images.py
@@ -15,7 +15,7 @@
 
 from tempest.api.compute import base
 from tempest import config
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -30,20 +30,20 @@
             raise cls.skipException(skip_msg)
         cls.client = cls.images_client
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_get_image(self):
         # Returns the correct details for a single image
         resp, image = self.client.get_image(self.image_ref)
         self.assertEqual(self.image_ref, image['id'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_images(self):
         # The list of all images should contain the image
         resp, images = self.client.list_images()
         found = any([i for i in images if i['id'] == self.image_ref])
         self.assertTrue(found)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_images_with_detail(self):
         # Detailed list of all images should contain the expected images
         resp, images = self.client.list_images_with_detail()
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index c063a4e..538ebc6 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -26,7 +26,7 @@
         super(SecurityGroupsTestJSON, cls).setUpClass()
         cls.client = cls.security_groups_client
 
-    @test.attr(type='gate')
+    @test.attr(type='smoke')
     def test_security_groups_create_list_delete(self):
         # Positive test:Should return the list of Security Groups
         # Create 3 Security Groups
@@ -58,7 +58,7 @@
                          "list" % ', '.join(m_group['name']
                                             for m_group in deleted_sgs))
 
-    @test.attr(type='gate')
+    @test.attr(type='smoke')
     def test_security_group_create_get_delete(self):
         # Security Group should be created, fetched and deleted
         s_name = data_utils.rand_name('securitygroup-')
@@ -76,7 +76,7 @@
                          "The fetched Security Group is different "
                          "from the created Group")
 
-    @test.attr(type='gate')
+    @test.attr(type='smoke')
     def test_server_security_groups(self):
         # Checks that security groups may be added and linked to a server
         # and not deleted if the server is active.
@@ -122,7 +122,7 @@
         self.client.delete_security_group(sg2['id'])
         self.assertEqual(202, resp.status)
 
-    @test.attr(type='gate')
+    @test.attr(type='smoke')
     def test_update_security_groups(self):
         # Update security group name and description
         # Create a security group
diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py
index 735c7ce..aa2d32e 100644
--- a/tempest/api/compute/security_groups/test_security_groups_negative.py
+++ b/tempest/api/compute/security_groups/test_security_groups_negative.py
@@ -56,7 +56,7 @@
 
     @test.skip_because(bug="1161411",
                        condition=CONF.service_available.neutron)
-    @test.attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'smoke'])
     def test_security_group_create_with_invalid_group_name(self):
         # Negative test: Security Group should not be created with group name
         # as an empty string/with white spaces/chars more than 255
@@ -76,7 +76,7 @@
 
     @test.skip_because(bug="1161411",
                        condition=CONF.service_available.neutron)
-    @test.attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'smoke'])
     def test_security_group_create_with_invalid_group_description(self):
         # Negative test:Security Group should not be created with description
         # as an empty string/with white spaces/chars more than 255
@@ -95,7 +95,7 @@
 
     @testtools.skipIf(CONF.service_available.neutron,
                       "Neutron allows duplicate names for security groups")
-    @test.attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'smoke'])
     def test_security_group_create_with_duplicate_name(self):
         # Negative test:Security Group with duplicate name should not
         # be created
@@ -109,7 +109,7 @@
                           self.client.create_security_group, s_name,
                           s_description)
 
-    @test.attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'smoke'])
     def test_delete_the_default_security_group(self):
         # Negative test:Deletion of the "default" Security Group should Fail
         default_security_group_id = None
@@ -130,7 +130,7 @@
         self.assertRaises(exceptions.NotFound,
                           self.client.delete_security_group, non_exist_id)
 
-    @test.attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'smoke'])
     def test_delete_security_group_without_passing_id(self):
         # Negative test:Deletion of a Security Group with out passing ID
         # should Fail
@@ -139,7 +139,7 @@
 
     @testtools.skipIf(CONF.service_available.neutron,
                       "Neutron not check the security_group_id")
-    @test.attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'smoke'])
     def test_update_security_group_with_invalid_sg_id(self):
         # Update security_group with invalid sg_id should fail
         s_name = data_utils.rand_name('sg-')
@@ -152,7 +152,7 @@
 
     @testtools.skipIf(CONF.service_available.neutron,
                       "Neutron not check the security_group_name")
-    @test.attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'smoke'])
     def test_update_security_group_with_invalid_sg_name(self):
         # Update security_group with invalid sg_name should fail
         resp, securitygroup = self.create_security_group()
@@ -167,7 +167,7 @@
 
     @testtools.skipIf(CONF.service_available.neutron,
                       "Neutron not check the security_group_description")
-    @test.attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'smoke'])
     def test_update_security_group_with_invalid_sg_des(self):
         # Update security_group with invalid sg_des should fail
         resp, securitygroup = self.create_security_group()
@@ -180,7 +180,7 @@
                           self.client.update_security_group,
                           securitygroup_id, description=s_new_des)
 
-    @test.attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'smoke'])
     def test_update_non_existent_security_group(self):
         # Update a non-existent Security Group should Fail
         non_exist_id = self._generate_a_non_existent_security_group_id()
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index a21c411..f6eed00 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -16,7 +16,7 @@
 from tempest.api.compute import base
 from tempest import config
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 import time
 
@@ -106,7 +106,7 @@
 
         self.assertEqual(sorted(list1), sorted(list2))
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_create_list_show_delete_interfaces(self):
         server, ifs = self._create_server_get_interfaces()
         interface_count = len(ifs)
@@ -127,7 +127,7 @@
         _ifs = self._test_delete_interface(server, ifs)
         self.assertEqual(len(ifs) - 1, len(_ifs))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_add_remove_fixed_ip(self):
         # Add and Remove the fixed IP to server.
         server, ifs = self._create_server_get_interfaces()
diff --git a/tempest/api/compute/servers/test_disk_config.py b/tempest/api/compute/servers/test_disk_config.py
index 75a1234..332358c 100644
--- a/tempest/api/compute/servers/test_disk_config.py
+++ b/tempest/api/compute/servers/test_disk_config.py
@@ -17,7 +17,7 @@
 
 from tempest.api.compute import base
 from tempest import config
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -44,7 +44,7 @@
             resp, server = self.client.get_server(server['id'])
             self.assertEqual(disk_config, server['OS-DCF:diskConfig'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_rebuild_server_with_manual_disk_config(self):
         # A server should be rebuilt using the manual disk config option
         self._update_server_with_disk_config(disk_config='AUTO')
@@ -60,7 +60,7 @@
         resp, server = self.client.get_server(server['id'])
         self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_rebuild_server_with_auto_disk_config(self):
         # A server should be rebuilt using the auto disk config option
         self._update_server_with_disk_config(disk_config='MANUAL')
@@ -86,7 +86,7 @@
 
     @testtools.skipUnless(CONF.compute_feature_enabled.resize,
                           'Resize not available.')
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_resize_server_from_manual_to_auto(self):
         # A server should be resized from manual to auto disk config
         self._update_server_with_disk_config(disk_config='MANUAL')
@@ -103,7 +103,7 @@
 
     @testtools.skipUnless(CONF.compute_feature_enabled.resize,
                           'Resize not available.')
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_resize_server_from_auto_to_manual(self):
         # A server should be resized from auto to manual disk config
         self._update_server_with_disk_config(disk_config='AUTO')
@@ -118,7 +118,7 @@
         resp, server = self.client.get_server(self.server_id)
         self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_server_from_auto_to_manual(self):
         # A server should be updated from auto to manual disk config
         self._update_server_with_disk_config(disk_config='AUTO')
diff --git a/tempest/api/compute/servers/test_list_servers_negative.py b/tempest/api/compute/servers/test_list_servers_negative.py
index 26c5887..c825fb9 100644
--- a/tempest/api/compute/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/servers/test_list_servers_negative.py
@@ -19,7 +19,7 @@
 
 from tempest.api.compute import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ListServersNegativeTestJSON(base.BaseV2ComputeTest):
@@ -51,7 +51,7 @@
                                                ignore_error=True)
         cls.deleted_fixtures.append(srv)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_with_a_deleted_server(self):
         # Verify deleted servers do not show by default in list servers
         # List servers and verify server not returned
@@ -63,7 +63,7 @@
         self.assertEqual('200', resp['status'])
         self.assertEqual([], actual)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_non_existing_image(self):
         # Listing servers for a non existing image returns empty list
         non_existing_image = '1234abcd-zzz0-aaa9-ppp3-0987654abcde'
@@ -72,7 +72,7 @@
         self.assertEqual('200', resp['status'])
         self.assertEqual([], servers)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_non_existing_flavor(self):
         # Listing servers by non existing flavor returns empty list
         non_existing_flavor = 1234
@@ -81,7 +81,7 @@
         self.assertEqual('200', resp['status'])
         self.assertEqual([], servers)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_non_existing_server_name(self):
         # Listing servers for a non existent server name returns empty list
         non_existing_name = 'junk_server_1234'
@@ -90,7 +90,7 @@
         self.assertEqual('200', resp['status'])
         self.assertEqual([], servers)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_status_non_existing(self):
         # Return an empty list when invalid status is specified
         non_existing_status = 'BALONEY'
@@ -99,7 +99,7 @@
         self.assertEqual('200', resp['status'])
         self.assertEqual([], servers)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_servers_by_limits(self):
         # List servers by specifying limits
         resp, body = self.client.list_servers({'limit': 1})
@@ -107,26 +107,26 @@
         # when _interface='xml', one element for servers_links in servers
         self.assertEqual(1, len([x for x in body['servers'] if 'id' in x]))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_limits_greater_than_actual_count(self):
         # List servers by specifying a greater value for limit
         resp, body = self.client.list_servers({'limit': 100})
         self.assertEqual('200', resp['status'])
         self.assertEqual(len(self.existing_fixtures), len(body['servers']))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_limits_pass_string(self):
         # Return an error if a string value is passed for limit
         self.assertRaises(exceptions.BadRequest, self.client.list_servers,
                           {'limit': 'testing'})
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_limits_pass_negative_value(self):
         # Return an error if a negative value for limit is passed
         self.assertRaises(exceptions.BadRequest, self.client.list_servers,
                           {'limit': -1})
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_servers_by_changes_since(self):
         # Servers are listed by specifying changes-since date
         changes_since = {'changes-since': self.start_time.isoformat()}
@@ -139,13 +139,13 @@
                          "Number of servers %d is wrong in %s" %
                          (num_expected, body['servers']))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_changes_since_invalid_date(self):
         # Return an error when invalid date format is passed
         self.assertRaises(exceptions.BadRequest, self.client.list_servers,
                           {'changes-since': '2011/01/01'})
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_changes_since_future_date(self):
         # Return an empty list when a date in the future is passed
         changes_since = {'changes-since': '2051-01-01T12:34:00Z'}
@@ -153,7 +153,7 @@
         self.assertEqual('200', resp['status'])
         self.assertEqual(0, len(body['servers']))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_servers_detail_server_is_deleted(self):
         # Server details are not listed for a deleted server
         deleted_ids = [s['id'] for s in self.deleted_fixtures]
diff --git a/tempest/api/compute/servers/test_server_password.py b/tempest/api/compute/servers/test_server_password.py
index ad78f65..50c881a 100644
--- a/tempest/api/compute/servers/test_server_password.py
+++ b/tempest/api/compute/servers/test_server_password.py
@@ -15,7 +15,7 @@
 
 
 from tempest.api.compute import base
-from tempest.test import attr
+from tempest import test
 
 
 class ServerPasswordTestJSON(base.BaseV2ComputeTest):
@@ -26,12 +26,12 @@
         cls.client = cls.servers_client
         resp, cls.server = cls.create_test_server(wait_until="ACTIVE")
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_server_password(self):
         resp, body = self.client.get_password(self.server['id'])
         self.assertEqual(200, resp.status)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_server_password(self):
         resp, body = self.client.delete_password(self.server['id'])
         self.assertEqual(204, resp.status)
diff --git a/tempest/api/compute/servers/test_server_personality.py b/tempest/api/compute/servers/test_server_personality.py
index b581faf..b7e4e38 100644
--- a/tempest/api/compute/servers/test_server_personality.py
+++ b/tempest/api/compute/servers/test_server_personality.py
@@ -17,7 +17,7 @@
 
 from tempest.api.compute import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ServerPersonalityTestJSON(base.BaseV2ComputeTest):
@@ -28,7 +28,7 @@
         cls.client = cls.servers_client
         cls.user_client = cls.limits_client
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_personality_files_exceed_limit(self):
         # Server creation should fail if greater than the maximum allowed
         # number of files are injected into the server.
@@ -43,7 +43,7 @@
         self.assertRaises(exceptions.OverLimit, self.create_test_server,
                           personality=personality)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_can_create_server_with_max_number_personality_files(self):
         # Server should be created successfully if maximum allowed number of
         # files is injected into the server during creation.
diff --git a/tempest/api/compute/servers/test_servers.py b/tempest/api/compute/servers/test_servers.py
index 9674463..40b97d7 100644
--- a/tempest/api/compute/servers/test_servers.py
+++ b/tempest/api/compute/servers/test_servers.py
@@ -15,7 +15,7 @@
 
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class ServersTestJSON(base.BaseV2ComputeTest):
@@ -29,7 +29,7 @@
         self.clear_servers()
         super(ServersTestJSON, self).tearDown()
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_server_with_admin_password(self):
         # If an admin password is provided on server creation, the server's
         # root password should be set to that password.
@@ -38,7 +38,7 @@
         # Verify the password is set correctly in the response
         self.assertEqual('testpassword', server['adminPass'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_with_existing_server_name(self):
         # Creating a server with a name that already exists is allowed
 
@@ -57,7 +57,7 @@
         name2 = server['name']
         self.assertEqual(name1, name2)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_specify_keypair(self):
         # Specify a keypair while creating a server
 
@@ -70,7 +70,7 @@
         resp, server = self.client.get_server(server['id'])
         self.assertEqual(key_name, server['key_name'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_server_name(self):
         # The server name should be changed to the the provided value
         resp, server = self.create_test_server(wait_until='ACTIVE')
@@ -85,7 +85,7 @@
         resp, server = self.client.get_server(server['id'])
         self.assertEqual('newname', server['name'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_access_server_address(self):
         # The server's access addresses should reflect the provided values
         resp, server = self.create_test_server(wait_until='ACTIVE')
@@ -102,7 +102,7 @@
         self.assertEqual('1.1.1.1', server['accessIPv4'])
         self.assertEqual('::babe:202:202', server['accessIPv6'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_server_with_ipv6_addr_only(self):
         # Create a server without an IPv4 address(only IPv6 address).
         resp, server = self.create_test_server(accessIPv6='2001:2001::3')
diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py
index fd73cc5..7f909d7 100644
--- a/tempest/api/compute/test_authorization.py
+++ b/tempest/api/compute/test_authorization.py
@@ -19,7 +19,7 @@
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common import log as logging
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -89,31 +89,31 @@
             cls.security_client.delete_security_group(cls.security_group['id'])
         super(AuthorizationTestJSON, cls).tearDownClass()
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_server_for_alt_account_fails(self):
         # A GET request for a server on another user's account should fail
         self.assertRaises(exceptions.NotFound, self.alt_client.get_server,
                           self.server['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_server_for_alt_account_fails(self):
         # A DELETE request for another user's server should fail
         self.assertRaises(exceptions.NotFound, self.alt_client.delete_server,
                           self.server['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_server_for_alt_account_fails(self):
         # An update server request for another user's server should fail
         self.assertRaises(exceptions.NotFound, self.alt_client.update_server,
                           self.server['id'], name='test')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_server_addresses_for_alt_account_fails(self):
         # A list addresses request for another user's server should fail
         self.assertRaises(exceptions.NotFound, self.alt_client.list_addresses,
                           self.server['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_server_addresses_by_network_for_alt_account_fails(self):
         # A list address/network request for another user's server should fail
         server_id = self.server['id']
@@ -121,7 +121,7 @@
                           self.alt_client.list_addresses_by_network, server_id,
                           'public')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_servers_with_alternate_tenant(self):
         # A list on servers from one tenant should not
         # show on alternate tenant
@@ -131,44 +131,44 @@
         alt_server_ids = [s['id'] for s in body['servers']]
         self.assertNotIn(self.server['id'], alt_server_ids)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_change_password_for_alt_account_fails(self):
         # A change password request for another user's server should fail
         self.assertRaises(exceptions.NotFound, self.alt_client.change_password,
                           self.server['id'], 'newpass')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_reboot_server_for_alt_account_fails(self):
         # A reboot request for another user's server should fail
         self.assertRaises(exceptions.NotFound, self.alt_client.reboot,
                           self.server['id'], 'HARD')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_rebuild_server_for_alt_account_fails(self):
         # A rebuild request for another user's server should fail
         self.assertRaises(exceptions.NotFound, self.alt_client.rebuild,
                           self.server['id'], self.image_ref_alt)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_resize_server_for_alt_account_fails(self):
         # A resize request for another user's server should fail
         self.assertRaises(exceptions.NotFound, self.alt_client.resize,
                           self.server['id'], self.flavor_ref_alt)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_image_for_alt_account_fails(self):
         # A create image request for another user's server should fail
         self.assertRaises(exceptions.NotFound,
                           self.alt_images_client.create_image,
                           self.server['id'], 'testImage')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_server_with_unauthorized_image(self):
         # Server creation with another user's image should fail
         self.assertRaises(exceptions.BadRequest, self.alt_client.create_server,
                           'test', self.image['id'], self.flavor_ref)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_server_fails_when_tenant_incorrect(self):
         # A create server request should fail if the tenant id does not match
         # the current user
@@ -181,7 +181,7 @@
                           self.alt_client.create_server, 'test',
                           self.image['id'], self.flavor_ref)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_keypair_in_analt_user_tenant(self):
         # A create keypair request should fail if the tenant id does not match
         # the current user
@@ -204,34 +204,34 @@
                 LOG.error("Create keypair request should not happen "
                           "if the tenant id does not match the current user")
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_keypair_of_alt_account_fails(self):
         # A GET request for another user's keypair should fail
         self.assertRaises(exceptions.NotFound,
                           self.alt_keypairs_client.get_keypair,
                           self.keypairname)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_keypair_of_alt_account_fails(self):
         # A DELETE request for another user's keypair should fail
         self.assertRaises(exceptions.NotFound,
                           self.alt_keypairs_client.delete_keypair,
                           self.keypairname)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_image_for_alt_account_fails(self):
         # A GET request for an image on another user's account should fail
         self.assertRaises(exceptions.NotFound,
                           self.alt_images_client.get_image, self.image['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_image_for_alt_account_fails(self):
         # A DELETE request for another user's image should fail
         self.assertRaises(exceptions.NotFound,
                           self.alt_images_client.delete_image,
                           self.image['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_security_group_in_analt_user_tenant(self):
         # A create security group request should fail if the tenant id does not
         # match the current user
@@ -256,21 +256,21 @@
                 LOG.error("Create Security Group request should not happen if"
                           "the tenant id does not match the current user")
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_security_group_of_alt_account_fails(self):
         # A GET request for another user's security group should fail
         self.assertRaises(exceptions.NotFound,
                           self.alt_security_client.get_security_group,
                           self.security_group['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_security_group_of_alt_account_fails(self):
         # A DELETE request for another user's security group should fail
         self.assertRaises(exceptions.NotFound,
                           self.alt_security_client.delete_security_group,
                           self.security_group['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_security_group_rule_in_analt_user_tenant(self):
         # A create security group rule request should fail if the tenant id
         # does not match the current user
@@ -300,7 +300,7 @@
                           "happen if the tenant id does not match the"
                           " current user")
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_security_group_rule_of_alt_account_fails(self):
         # A DELETE request for another user's security group rule
         # should fail
@@ -308,7 +308,7 @@
                           self.alt_security_client.delete_security_group_rule,
                           self.rule['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_set_metadata_of_alt_account_server_fails(self):
         # A set metadata for another user's server should fail
         req_metadata = {'meta1': 'data1', 'meta2': 'data2'}
@@ -317,7 +317,7 @@
                           self.server['id'],
                           req_metadata)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_set_metadata_of_alt_account_image_fails(self):
         # A set metadata for another user's image should fail
         req_metadata = {'meta1': 'value1', 'meta2': 'value2'}
@@ -325,7 +325,7 @@
                           self.alt_images_client.set_image_metadata,
                           self.image['id'], req_metadata)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_metadata_of_alt_account_server_fails(self):
         # A get metadata for another user's server should fail
         req_metadata = {'meta1': 'data1'}
@@ -336,7 +336,7 @@
                           self.alt_client.get_server_metadata_item,
                           self.server['id'], 'meta1')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_metadata_of_alt_account_image_fails(self):
         # A get metadata for another user's image should fail
         req_metadata = {'meta1': 'value1'}
@@ -348,7 +348,7 @@
                           self.alt_images_client.get_image_metadata_item,
                           self.image['id'], 'meta1')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_metadata_of_alt_account_server_fails(self):
         # A delete metadata for another user's server should fail
         req_metadata = {'meta1': 'data1'}
@@ -359,7 +359,7 @@
                           self.alt_client.delete_server_metadata_item,
                           self.server['id'], 'meta1')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_metadata_of_alt_account_image_fails(self):
         # A delete metadata for another user's image should fail
         req_metadata = {'meta1': 'data1'}
@@ -371,7 +371,7 @@
                           self.alt_images_client.delete_image_metadata_item,
                           self.image['id'], 'meta1')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_console_output_of_alt_account_server_fails(self):
         # A Get Console Output for another user's server should fail
         self.assertRaises(exceptions.NotFound,
diff --git a/tempest/api/compute/test_live_block_migration.py b/tempest/api/compute/test_live_block_migration.py
index 1319f68..93ff4b0 100644
--- a/tempest/api/compute/test_live_block_migration.py
+++ b/tempest/api/compute/test_live_block_migration.py
@@ -18,7 +18,7 @@
 
 from tempest.api.compute import base
 from tempest import config
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -85,7 +85,7 @@
 
     @testtools.skipIf(not CONF.compute_feature_enabled.live_migration,
                       'Live migration not available')
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_live_block_migration(self):
         # Live block migrate an instance to another host
         if len(self._get_compute_hostnames()) < 2:
@@ -105,7 +105,7 @@
     @testtools.skipIf(not CONF.compute_feature_enabled.
                       block_migrate_cinder_iscsi,
                       'Block Live migration not configured for iSCSI')
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_iscsi_volume(self):
         # Live block migrate an instance to another host
         if len(self._get_compute_hostnames()) < 2:
diff --git a/tempest/api/compute/test_quotas.py b/tempest/api/compute/test_quotas.py
index b97ab2c..230d433 100644
--- a/tempest/api/compute/test_quotas.py
+++ b/tempest/api/compute/test_quotas.py
@@ -14,7 +14,7 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest.test import attr
+from tempest import test
 
 
 class QuotasTestJSON(base.BaseV2ComputeTest):
@@ -35,7 +35,7 @@
                                      'instances', 'security_group_rules',
                                      'cores', 'security_groups'))
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_get_quotas(self):
         # User can get the quota set for it's tenant
         expected_quota_set = self.default_quota_set | set(['id'])
@@ -45,7 +45,7 @@
                          sorted(quota_set.keys()))
         self.assertEqual(quota_set['id'], self.tenant_id)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_get_default_quotas(self):
         # User can get the default quota set for it's tenant
         expected_quota_set = self.default_quota_set | set(['id'])
@@ -55,7 +55,7 @@
                          sorted(quota_set.keys()))
         self.assertEqual(quota_set['id'], self.tenant_id)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_compare_tenant_quotas_with_default_quotas(self):
         # Tenants are created with the default quota values
         resp, defualt_quota_set = \
diff --git a/tempest/api/compute/v3/admin/test_servers.py b/tempest/api/compute/v3/admin/test_servers.py
index 7787770..fb8afe4 100644
--- a/tempest/api/compute/v3/admin/test_servers.py
+++ b/tempest/api/compute/v3/admin/test_servers.py
@@ -174,3 +174,13 @@
         resp, server = self.non_admin_client.get_server(rebuilt_server['id'])
         rebuilt_image_id = server['image']['id']
         self.assertEqual(self.image_ref_alt, rebuilt_image_id)
+
+    @test.attr(type='gate')
+    def test_reset_network_inject_network_info(self):
+        resp, server = self.create_test_server(wait_until='ACTIVE')
+        # Reset Network of a Server
+        resp, server_body = self.client.reset_network(server['id'])
+        self.assertEqual(202, resp.status)
+        # Inject the Network Info into Server
+        resp, server = self.client.inject_network_info(server['id'])
+        self.assertEqual(202, resp.status)
diff --git a/tempest/api/compute/v3/admin/test_services.py b/tempest/api/compute/v3/admin/test_services.py
index 914a2a4..0a7c7f1 100644
--- a/tempest/api/compute/v3/admin/test_services.py
+++ b/tempest/api/compute/v3/admin/test_services.py
@@ -14,6 +14,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest.api.compute.api_schema import services as schema
 from tempest.api.compute import base
 from tempest.test import attr
 
@@ -32,7 +33,7 @@
     @attr(type='gate')
     def test_list_services(self):
         resp, services = self.client.list_services()
-        self.assertEqual(200, resp.status)
+        self.validate_response(schema.list_services, resp, services)
         self.assertNotEqual(0, len(services))
 
     @attr(type='gate')
@@ -40,7 +41,7 @@
         binary_name = 'nova-compute'
         params = {'binary': binary_name}
         resp, services = self.client.list_services(params)
-        self.assertEqual(200, resp.status)
+        self.validate_response(schema.list_services, resp, services)
         self.assertNotEqual(0, len(services))
         for service in services:
             self.assertEqual(binary_name, service['binary'])
@@ -48,11 +49,14 @@
     @attr(type='gate')
     def test_get_service_by_host_name(self):
         resp, services = self.client.list_services()
+        self.validate_response(schema.list_services, resp, services)
         host_name = services[0]['host']
         services_on_host = [service for service in services if
                             service['host'] == host_name]
         params = {'host': host_name}
+
         resp, services = self.client.list_services(params)
+        self.validate_response(schema.list_services, resp, services)
 
         # we could have a periodic job checkin between the 2 service
         # lookups, so only compare binary lists.
@@ -66,11 +70,13 @@
     @attr(type='gate')
     def test_get_service_by_service_and_host_name(self):
         resp, services = self.client.list_services()
+        self.validate_response(schema.list_services, resp, services)
         host_name = services[0]['host']
         binary_name = services[0]['binary']
         params = {'host': host_name, 'binary': binary_name}
+
         resp, services = self.client.list_services(params)
-        self.assertEqual(200, resp.status)
+        self.validate_response(schema.list_services, resp, services)
         self.assertEqual(1, len(services))
         self.assertEqual(host_name, services[0]['host'])
         self.assertEqual(binary_name, services[0]['binary'])
diff --git a/tempest/api/compute/v3/images/test_images.py b/tempest/api/compute/v3/images/test_images.py
index 656f7ba..bb81626 100644
--- a/tempest/api/compute/v3/images/test_images.py
+++ b/tempest/api/compute/v3/images/test_images.py
@@ -15,7 +15,6 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -30,42 +29,8 @@
             skip_msg = ("%s skipped as glance is not available" % cls.__name__)
             raise cls.skipException(skip_msg)
         cls.client = cls.images_client
-        cls.servers_client = cls.servers_client
 
-    def __create_image__(self, server_id, name, meta=None):
-        resp, body = self.servers_client.create_image(server_id, name, meta)
-        image_id = data_utils.parse_image_id(resp['location'])
-        self.addCleanup(self.client.delete_image, image_id)
-        self.client.wait_for_image_status(image_id, 'ACTIVE')
-        return resp, body
-
-    @test.attr(type=['negative', 'gate'])
-    def test_create_image_from_deleted_server(self):
-        # An image should not be created if the server instance is removed
-        resp, server = self.create_test_server(wait_until='ACTIVE')
-
-        # Delete server before trying to create server
-        self.servers_client.delete_server(server['id'])
-        self.servers_client.wait_for_server_termination(server['id'])
-        # Create a new image after server is deleted
-        name = data_utils.rand_name('image')
-        meta = {'image_type': 'test'}
-        self.assertRaises(exceptions.NotFound,
-                          self.__create_image__,
-                          server['id'], name, meta)
-
-    @test.attr(type=['negative', 'gate'])
-    def test_create_image_from_invalid_server(self):
-        # An image should not be created with invalid server id
-        # Create a new image with invalid server id
-        name = data_utils.rand_name('image')
-        meta = {'image_type': 'test'}
-        resp = {}
-        resp['status'] = None
-        self.assertRaises(exceptions.NotFound, self.__create_image__,
-                          '!@#$%^&*()', name, meta)
-
-    @test.attr(type=['negative', 'gate'])
+    @test.attr(type='gate')
     def test_create_image_from_stopped_server(self):
         resp, server = self.create_test_server(wait_until='ACTIVE')
         self.servers_client.stop(server['id'])
@@ -89,21 +54,3 @@
                                                     wait_until='queued')
         resp, body = self.client.delete_image(image['id'])
         self.assertEqual('200', resp['status'])
-
-    @test.attr(type=['negative', 'gate'])
-    def test_create_image_specify_uuid_35_characters_or_less(self):
-        # Return an error if Image ID passed is 35 characters or less
-        snapshot_name = data_utils.rand_name('test-snap-')
-        test_uuid = ('a' * 35)
-        self.assertRaises(exceptions.NotFound,
-                          self.servers_client.create_image,
-                          test_uuid, snapshot_name)
-
-    @test.attr(type=['negative', 'gate'])
-    def test_create_image_specify_uuid_37_characters_or_more(self):
-        # Return an error if Image ID passed is 37 characters or more
-        snapshot_name = data_utils.rand_name('test-snap-')
-        test_uuid = ('a' * 37)
-        self.assertRaises(exceptions.NotFound,
-                          self.servers_client.create_image,
-                          test_uuid, snapshot_name)
diff --git a/tempest/api/compute/v3/images/test_images_negative.py b/tempest/api/compute/v3/images/test_images_negative.py
new file mode 100644
index 0000000..c38373f
--- /dev/null
+++ b/tempest/api/compute/v3/images/test_images_negative.py
@@ -0,0 +1,82 @@
+# Copyright 2014 NEC Corporation.  All rights reserved.
+#
+#    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.
+
+from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest import config
+from tempest import exceptions
+from tempest import test
+
+CONF = config.CONF
+
+
+class ImagesNegativeV3Test(base.BaseV3ComputeTest):
+
+    @classmethod
+    def setUpClass(cls):
+        super(ImagesNegativeV3Test, cls).setUpClass()
+        if not CONF.service_available.glance:
+            skip_msg = ("%s skipped as glance is not available" % cls.__name__)
+            raise cls.skipException(skip_msg)
+        cls.client = cls.images_client
+
+    def __create_image__(self, server_id, name, meta=None):
+        resp, body = self.servers_client.create_image(server_id, name, meta)
+        image_id = data_utils.parse_image_id(resp['location'])
+        self.addCleanup(self.client.delete_image, image_id)
+        self.client.wait_for_image_status(image_id, 'ACTIVE')
+        return resp, body
+
+    @test.attr(type=['negative', 'gate'])
+    def test_create_image_from_deleted_server(self):
+        # An image should not be created if the server instance is removed
+        resp, server = self.create_test_server(wait_until='ACTIVE')
+
+        # Delete server before trying to create server
+        self.servers_client.delete_server(server['id'])
+        self.servers_client.wait_for_server_termination(server['id'])
+        # Create a new image after server is deleted
+        name = data_utils.rand_name('image')
+        meta = {'image_type': 'test'}
+        self.assertRaises(exceptions.NotFound,
+                          self.__create_image__,
+                          server['id'], name, meta)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_create_image_from_nonexistent_server(self):
+        # An image should not be created with invalid server id
+        # Create a new image with invalid server id
+        nonexistent_server_id = data_utils.rand_uuid()
+        name = data_utils.rand_name('image')
+        meta = {'image_type': 'test'}
+        self.assertRaises(exceptions.NotFound, self.__create_image__,
+                          nonexistent_server_id, name, meta)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_create_image_specify_uuid_35_characters_or_less(self):
+        # Return an error if Image ID passed is 35 characters or less
+        snapshot_name = data_utils.rand_name('test-snap-')
+        test_uuid = ('a' * 35)
+        self.assertRaises(exceptions.NotFound,
+                          self.servers_client.create_image,
+                          test_uuid, snapshot_name)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_create_image_specify_uuid_37_characters_or_more(self):
+        # Return an error if Image ID passed is 37 characters or more
+        snapshot_name = data_utils.rand_name('test-snap-')
+        test_uuid = ('a' * 37)
+        self.assertRaises(exceptions.NotFound,
+                          self.servers_client.create_image,
+                          test_uuid, snapshot_name)
diff --git a/tempest/api/compute/v3/servers/test_server_rescue.py b/tempest/api/compute/v3/servers/test_server_rescue.py
index 5d7f91d..b3dcb51 100644
--- a/tempest/api/compute/v3/servers/test_server_rescue.py
+++ b/tempest/api/compute/v3/servers/test_server_rescue.py
@@ -14,9 +14,7 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest.common.utils import data_utils
-from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ServerRescueV3Test(base.BaseV3ComputeTest):
@@ -24,56 +22,14 @@
     @classmethod
     def setUpClass(cls):
         super(ServerRescueV3Test, cls).setUpClass()
-        cls.device = 'vdf'
-
-        # Create a volume and wait for it to become ready for attach
-        resp, cls.volume = cls.volumes_client.create_volume(
-            1, display_name=data_utils.rand_name(cls.__name__ + '_volume'))
-        cls.volumes_client.wait_for_volume_status(
-            cls.volume['id'], 'available')
 
         # Server for positive tests
         resp, server = cls.create_test_server(wait_until='BUILD')
-        resp, resc_server = cls.create_test_server(wait_until='ACTIVE')
         cls.server_id = server['id']
         cls.password = server['admin_password']
         cls.servers_client.wait_for_server_status(cls.server_id, 'ACTIVE')
 
-        # Server for negative tests
-        cls.rescue_id = resc_server['id']
-        cls.rescue_password = resc_server['admin_password']
-
-        cls.servers_client.rescue_server(
-            cls.rescue_id, admin_password=cls.rescue_password)
-        cls.servers_client.wait_for_server_status(cls.rescue_id, 'RESCUE')
-
-    def setUp(self):
-        super(ServerRescueV3Test, self).setUp()
-
-    @classmethod
-    def tearDownClass(cls):
-        cls.delete_volume(cls.volume['id'])
-        super(ServerRescueV3Test, cls).tearDownClass()
-
-    def tearDown(self):
-        super(ServerRescueV3Test, self).tearDown()
-
-    def _detach(self, server_id, volume_id):
-        self.servers_client.detach_volume(server_id, volume_id)
-        self.volumes_client.wait_for_volume_status(volume_id,
-                                                   'available')
-
-    def _unrescue(self, server_id):
-        resp, body = self.servers_client.unrescue_server(server_id)
-        self.assertEqual(202, resp.status)
-        self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
-
-    def _unpause(self, server_id):
-        resp, body = self.servers_client.unpause_server(server_id)
-        self.assertEqual(202, resp.status)
-        self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
-
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_rescue_unrescue_instance(self):
         resp, body = self.servers_client.rescue_server(
             self.server_id, admin_password=self.password)
@@ -82,71 +38,3 @@
         resp, body = self.servers_client.unrescue_server(self.server_id)
         self.assertEqual(202, resp.status)
         self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
-
-    @attr(type=['negative', 'gate'])
-    def test_rescue_paused_instance(self):
-        # Rescue a paused server
-        resp, body = self.servers_client.pause_server(
-            self.server_id)
-        self.addCleanup(self._unpause, self.server_id)
-        self.assertEqual(202, resp.status)
-        self.servers_client.wait_for_server_status(self.server_id, 'PAUSED')
-        self.assertRaises(exceptions.Conflict,
-                          self.servers_client.rescue_server,
-                          self.server_id)
-
-    @attr(type=['negative', 'gate'])
-    def test_rescued_vm_reboot(self):
-        self.assertRaises(exceptions.Conflict, self.servers_client.reboot,
-                          self.rescue_id, 'HARD')
-
-    @attr(type=['negative', 'gate'])
-    def test_rescue_non_existent_server(self):
-        # Rescue a non-existing server
-        self.assertRaises(exceptions.NotFound,
-                          self.servers_client.rescue_server,
-                          '999erra43')
-
-    @attr(type=['negative', 'gate'])
-    def test_rescued_vm_rebuild(self):
-        self.assertRaises(exceptions.Conflict,
-                          self.servers_client.rebuild,
-                          self.rescue_id,
-                          self.image_ref_alt)
-
-    @attr(type=['negative', 'gate'])
-    def test_rescued_vm_attach_volume(self):
-        # Rescue the server
-        self.servers_client.rescue_server(self.server_id,
-                                          admin_password=self.password)
-        self.servers_client.wait_for_server_status(self.server_id, 'RESCUE')
-        self.addCleanup(self._unrescue, self.server_id)
-
-        # Attach the volume to the server
-        self.assertRaises(exceptions.Conflict,
-                          self.servers_client.attach_volume,
-                          self.server_id,
-                          self.volume['id'],
-                          device='/dev/%s' % self.device)
-
-    @attr(type=['negative', 'gate'])
-    def test_rescued_vm_detach_volume(self):
-        # Attach the volume to the server
-        self.servers_client.attach_volume(self.server_id,
-                                          self.volume['id'],
-                                          device='/dev/%s' % self.device)
-        self.volumes_client.wait_for_volume_status(self.volume['id'], 'in-use')
-
-        # Rescue the server
-        self.servers_client.rescue_server(self.server_id,
-                                          admin_password=self.password)
-        self.servers_client.wait_for_server_status(self.server_id, 'RESCUE')
-        # addCleanup is a LIFO queue
-        self.addCleanup(self._detach, self.server_id, self.volume['id'])
-        self.addCleanup(self._unrescue, self.server_id)
-
-        # Detach the volume from the server expecting failure
-        self.assertRaises(exceptions.Conflict,
-                          self.servers_client.detach_volume,
-                          self.server_id,
-                          self.volume['id'])
diff --git a/tempest/api/compute/v3/servers/test_server_rescue_negative.py b/tempest/api/compute/v3/servers/test_server_rescue_negative.py
new file mode 100644
index 0000000..6e09376
--- /dev/null
+++ b/tempest/api/compute/v3/servers/test_server_rescue_negative.py
@@ -0,0 +1,133 @@
+# Copyright 2013 Hewlett-Packard Development Company, L.P.
+# Copyright 2014 NEC Corporation.  All rights reserved.
+#
+#    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.
+
+from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest import exceptions
+from tempest import test
+
+
+class ServerRescueNegativeV3Test(base.BaseV3ComputeTest):
+
+    @classmethod
+    def setUpClass(cls):
+        super(ServerRescueNegativeV3Test, cls).setUpClass()
+        cls.device = 'vdf'
+
+        # Create a volume and wait for it to become ready for attach
+        resp, cls.volume = cls.volumes_client.create_volume(
+            1, display_name=data_utils.rand_name(cls.__name__ + '_volume'))
+        cls.volumes_client.wait_for_volume_status(
+            cls.volume['id'], 'available')
+
+        # Server for negative tests
+        resp, server = cls.create_test_server(wait_until='BUILD')
+        resp, resc_server = cls.create_test_server(wait_until='ACTIVE')
+        cls.server_id = server['id']
+        cls.password = server['admin_password']
+        cls.rescue_id = resc_server['id']
+        cls.rescue_password = resc_server['admin_password']
+
+        cls.servers_client.rescue_server(
+            cls.rescue_id, admin_password=cls.rescue_password)
+        cls.servers_client.wait_for_server_status(cls.rescue_id, 'RESCUE')
+
+    @classmethod
+    def tearDownClass(cls):
+        cls.delete_volume(cls.volume['id'])
+        super(ServerRescueNegativeV3Test, cls).tearDownClass()
+
+    def _detach(self, server_id, volume_id):
+        self.servers_client.detach_volume(server_id, volume_id)
+        self.volumes_client.wait_for_volume_status(volume_id,
+                                                   'available')
+
+    def _unrescue(self, server_id):
+        resp, body = self.servers_client.unrescue_server(server_id)
+        self.assertEqual(202, resp.status)
+        self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
+
+    def _unpause(self, server_id):
+        resp, body = self.servers_client.unpause_server(server_id)
+        self.assertEqual(202, resp.status)
+        self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
+
+    @test.attr(type=['negative', 'gate'])
+    def test_rescue_paused_instance(self):
+        # Rescue a paused server
+        resp, body = self.servers_client.pause_server(
+            self.server_id)
+        self.addCleanup(self._unpause, self.server_id)
+        self.assertEqual(202, resp.status)
+        self.servers_client.wait_for_server_status(self.server_id, 'PAUSED')
+        self.assertRaises(exceptions.Conflict,
+                          self.servers_client.rescue_server,
+                          self.server_id)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_rescued_vm_reboot(self):
+        self.assertRaises(exceptions.Conflict, self.servers_client.reboot,
+                          self.rescue_id, 'HARD')
+
+    @test.attr(type=['negative', 'gate'])
+    def test_rescue_non_existent_server(self):
+        # Rescue a non-existing server
+        self.assertRaises(exceptions.NotFound,
+                          self.servers_client.rescue_server,
+                          data_utils.rand_uuid())
+
+    @test.attr(type=['negative', 'gate'])
+    def test_rescued_vm_rebuild(self):
+        self.assertRaises(exceptions.Conflict,
+                          self.servers_client.rebuild,
+                          self.rescue_id,
+                          self.image_ref_alt)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_rescued_vm_attach_volume(self):
+        # Rescue the server
+        self.servers_client.rescue_server(self.server_id,
+                                          admin_password=self.password)
+        self.servers_client.wait_for_server_status(self.server_id, 'RESCUE')
+        self.addCleanup(self._unrescue, self.server_id)
+
+        # Attach the volume to the server
+        self.assertRaises(exceptions.Conflict,
+                          self.servers_client.attach_volume,
+                          self.server_id,
+                          self.volume['id'],
+                          device='/dev/%s' % self.device)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_rescued_vm_detach_volume(self):
+        # Attach the volume to the server
+        self.servers_client.attach_volume(self.server_id,
+                                          self.volume['id'],
+                                          device='/dev/%s' % self.device)
+        self.volumes_client.wait_for_volume_status(self.volume['id'], 'in-use')
+
+        # Rescue the server
+        self.servers_client.rescue_server(self.server_id,
+                                          admin_password=self.password)
+        self.servers_client.wait_for_server_status(self.server_id, 'RESCUE')
+        # addCleanup is a LIFO queue
+        self.addCleanup(self._detach, self.server_id, self.volume['id'])
+        self.addCleanup(self._unrescue, self.server_id)
+
+        # Detach the volume from the server expecting failure
+        self.assertRaises(exceptions.Conflict,
+                          self.servers_client.detach_volume,
+                          self.server_id,
+                          self.volume['id'])
diff --git a/tempest/api/database/__init__.py b/tempest/api/database/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/api/database/__init__.py
diff --git a/tempest/api/database/base.py b/tempest/api/database/base.py
new file mode 100644
index 0000000..8add9ba
--- /dev/null
+++ b/tempest/api/database/base.py
@@ -0,0 +1,42 @@
+# Copyright 2014 OpenStack Foundation
+# All Rights Reserved.
+#
+#    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.
+
+from tempest import config
+from tempest.openstack.common import log as logging
+import tempest.test
+
+CONF = config.CONF
+LOG = logging.getLogger(__name__)
+
+
+class BaseDatabaseTest(tempest.test.BaseTestCase):
+    """Base test case class for all Database API tests."""
+
+    _interface = 'json'
+    force_tenant_isolation = False
+
+    @classmethod
+    def setUpClass(cls):
+        super(BaseDatabaseTest, cls).setUpClass()
+        if not CONF.service_available.trove:
+            skip_msg = ("%s skipped as trove is not available" % cls.__name__)
+            raise cls.skipException(skip_msg)
+
+        cls.catalog_type = CONF.database.catalog_type
+        cls.db_flavor_ref = CONF.database.db_flavor_ref
+
+        os = cls.get_client_manager()
+        cls.os = os
+        cls.database_flavors_client = cls.os.database_flavors_client
diff --git a/tempest/api/database/flavors/__init__.py b/tempest/api/database/flavors/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/api/database/flavors/__init__.py
diff --git a/tempest/api/database/flavors/test_flavors.py b/tempest/api/database/flavors/test_flavors.py
new file mode 100644
index 0000000..a591e8e
--- /dev/null
+++ b/tempest/api/database/flavors/test_flavors.py
@@ -0,0 +1,41 @@
+# Copyright 2014 OpenStack Foundation
+# All Rights Reserved.
+#
+#    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.
+
+from tempest.api.database import base
+from tempest import test
+
+
+class DatabaseFlavorsTest(base.BaseDatabaseTest):
+
+    @classmethod
+    def setUpClass(cls):
+        super(DatabaseFlavorsTest, cls).setUpClass()
+        cls.client = cls.database_flavors_client
+
+    @test.attr(type='smoke')
+    def test_get_db_flavor(self):
+        # The expected flavor details should be returned
+        resp, flavor = self.client.get_db_flavor_details(self.db_flavor_ref)
+        self.assertEqual(self.db_flavor_ref, str(flavor['id']))
+        self.assertIn('ram', flavor)
+        self.assertIn('links', flavor)
+        self.assertIn('name', flavor)
+
+    @test.attr(type='smoke')
+    def test_list_db_flavors(self):
+        resp, flavor = self.client.get_db_flavor_details(self.db_flavor_ref)
+        # List of all flavors should contain the expected flavor
+        resp, flavors = self.client.list_db_flavors()
+        self.assertIn(flavor, flavors)
diff --git a/tempest/api/database/flavors/test_flavors_negative.py b/tempest/api/database/flavors/test_flavors_negative.py
new file mode 100644
index 0000000..202dc48
--- /dev/null
+++ b/tempest/api/database/flavors/test_flavors_negative.py
@@ -0,0 +1,32 @@
+# Copyright 2014 OpenStack Foundation
+# All Rights Reserved.
+#
+#    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.
+
+from tempest.api.database import base
+from tempest import exceptions
+from tempest import test
+
+
+class DatabaseFlavorsNegativeTest(base.BaseDatabaseTest):
+
+    @classmethod
+    def setUpClass(cls):
+        super(DatabaseFlavorsNegativeTest, cls).setUpClass()
+        cls.client = cls.database_flavors_client
+
+    @test.attr(type=['negative', 'gate'])
+    def test_get_non_existent_db_flavor(self):
+        # flavor details are not returned for non-existent flavors
+        self.assertRaises(exceptions.NotFound,
+                          self.client.get_db_flavor_details, -1)
diff --git a/tempest/api/identity/admin/v3/test_users.py b/tempest/api/identity/admin/v3/test_users.py
index a78d542..e1d1543 100644
--- a/tempest/api/identity/admin/v3/test_users.py
+++ b/tempest/api/identity/admin/v3/test_users.py
@@ -120,6 +120,13 @@
                          ', '.join(m_project for m_project
                                    in missing_projects))
 
+    @attr(type='gate')
+    def test_get_user(self):
+        # Get a user detail
+        self.data.setup_test_v3_user()
+        resp, user = self.client.get_user(self.data.v3_user['id'])
+        self.assertEqual(self.data.v3_user['id'], user['id'])
+
 
 class UsersV3TestXML(UsersV3TestJSON):
     _interface = 'xml'
diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py
index 10f5217..a5bf248 100644
--- a/tempest/api/identity/base.py
+++ b/tempest/api/identity/base.py
@@ -153,10 +153,11 @@
             self.test_user = data_utils.rand_name('test_user_')
             self.test_password = data_utils.rand_name('pass_')
             self.test_email = self.test_user + '@testmail.tm'
-            resp, self.v3_user = self.client.create_user(self.test_user,
-                                                         self.test_password,
-                                                         self.project['id'],
-                                                         self.test_email)
+            resp, self.v3_user = self.client.create_user(
+                self.test_user,
+                password=self.test_password,
+                project_id=self.project['id'],
+                email=self.test_email)
             self.v3_users.append(self.v3_user)
 
         def setup_test_project(self):
diff --git a/tempest/api/image/v1/test_image_members.py b/tempest/api/image/v1/test_image_members.py
index e6a078e..4cbb62f 100644
--- a/tempest/api/image/v1/test_image_members.py
+++ b/tempest/api/image/v1/test_image_members.py
@@ -14,12 +14,12 @@
 
 
 from tempest.api.image import base
-from tempest.test import attr
+from tempest import test
 
 
 class ImageMembersTest(base.BaseV1ImageMembersTest):
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_add_image_member(self):
         image = self._create_image()
         resp = self.client.add_member(self.alt_tenant_id, image)
@@ -33,7 +33,7 @@
         resp, body = self.alt_img_cli.get_image(image)
         self.assertEqual(200, resp.status)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_shared_images(self):
         image = self._create_image()
         resp = self.client.add_member(self.alt_tenant_id, image)
@@ -48,7 +48,7 @@
         self.assertIn(share_image, images)
         self.assertIn(image, images)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_remove_member(self):
         image_id = self._create_image()
         resp = self.client.add_member(self.alt_tenant_id, image_id)
diff --git a/tempest/api/image/v1/test_image_members_negative.py b/tempest/api/image/v1/test_image_members_negative.py
index d68ef03..aac63b4 100644
--- a/tempest/api/image/v1/test_image_members_negative.py
+++ b/tempest/api/image/v1/test_image_members_negative.py
@@ -16,26 +16,26 @@
 from tempest.api.image import base
 from tempest.common.utils import data_utils
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ImageMembersNegativeTest(base.BaseV1ImageMembersTest):
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_add_member_with_non_existing_image(self):
         # Add member with non existing image.
         non_exist_image = data_utils.rand_uuid()
         self.assertRaises(exceptions.NotFound, self.client.add_member,
                           self.alt_tenant_id, non_exist_image)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_member_with_non_existing_image(self):
         # Delete member with non existing image.
         non_exist_image = data_utils.rand_uuid()
         self.assertRaises(exceptions.NotFound, self.client.delete_member,
                           self.alt_tenant_id, non_exist_image)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_member_with_non_existing_tenant(self):
         # Delete member with non existing tenant.
         image_id = self._create_image()
@@ -43,7 +43,7 @@
         self.assertRaises(exceptions.NotFound, self.client.delete_member,
                           non_exist_tenant, image_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_image_without_membership(self):
         # Image is hidden from another tenants.
         image_id = self._create_image()
diff --git a/tempest/api/image/v1/test_images_negative.py b/tempest/api/image/v1/test_images_negative.py
index 5695884..66556e0 100644
--- a/tempest/api/image/v1/test_images_negative.py
+++ b/tempest/api/image/v1/test_images_negative.py
@@ -15,30 +15,30 @@
 
 from tempest.api.image import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class CreateDeleteImagesNegativeTest(base.BaseV1ImageTest):
     """Here are negative tests for the deletion and creation of images."""
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_register_with_invalid_container_format(self):
         # Negative tests for invalid data supplied to POST /images
         self.assertRaises(exceptions.BadRequest, self.client.create_image,
                           'test', 'wrong', 'vhd')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_register_with_invalid_disk_format(self):
         self.assertRaises(exceptions.BadRequest, self.client.create_image,
                           'test', 'bare', 'wrong')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_image_with_invalid_image_id(self):
         # An image should not be deleted with invalid image id
         self.assertRaises(exceptions.NotFound, self.client.delete_image,
                           '!@$%^&*()')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_non_existent_image(self):
         # Return an error while trying to delete a non-existent image
 
@@ -46,24 +46,24 @@
         self.assertRaises(exceptions.NotFound, self.client.delete_image,
                           non_existent_image_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_image_blank_id(self):
         # Return an error while trying to delete an image with blank Id
         self.assertRaises(exceptions.NotFound, self.client.delete_image, '')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_image_non_hex_string_id(self):
         # Return an error while trying to delete an image with non hex id
         image_id = '11a22b9-120q-5555-cc11-00ab112223gj'
         self.assertRaises(exceptions.NotFound, self.client.delete_image,
                           image_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_image_negative_image_id(self):
         # Return an error while trying to delete an image with negative id
         self.assertRaises(exceptions.NotFound, self.client.delete_image, -1)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_image_id_is_over_35_character_limit(self):
         # Return an error while trying to delete image with id over limit
         self.assertRaises(exceptions.NotFound, self.client.delete_image,
diff --git a/tempest/api/image/v2/test_images.py b/tempest/api/image/v2/test_images.py
index d448c01..ce11911 100644
--- a/tempest/api/image/v2/test_images.py
+++ b/tempest/api/image/v2/test_images.py
@@ -19,7 +19,7 @@
 
 from tempest.api.image import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class BasicOperationsImagesTest(base.BaseV2ImageTest):
@@ -27,7 +27,7 @@
     Here we test the basic operations of images
     """
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_register_upload_get_image_file(self):
 
         """
@@ -68,7 +68,7 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(file_content, body)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_image(self):
         # Deletes an image by image_id
 
@@ -90,7 +90,7 @@
         self.assertEqual(resp.status, 200)
         self.assertNotIn(image_id, images)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_image(self):
         # Updates an image by image_id
 
@@ -176,7 +176,7 @@
                 msg = "Failed to list images by %s" % key
                 self.assertEqual(params[key], image[key], msg)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_index_no_params(self):
         # Simple test to see all fixture images returned
         resp, images_list = self.client.image_list()
@@ -186,25 +186,25 @@
         for image in self.created_images:
             self.assertIn(image, image_list)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_images_param_container_format(self):
         # Test to get all images with container_format='bare'
         params = {"container_format": "bare"}
         self._list_by_param_value_and_assert(params)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_images_param_disk_format(self):
         # Test to get all images with disk_format = raw
         params = {"disk_format": "raw"}
         self._list_by_param_value_and_assert(params)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_images_param_visibility(self):
         # Test to get all images with visibility = public
         params = {"visibility": "public"}
         self._list_by_param_value_and_assert(params)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_images_param_size(self):
         # Test to get all images by size
         image_id = self.created_images[1]
@@ -215,7 +215,7 @@
         params = {"size": image['size']}
         self._list_by_param_value_and_assert(params)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_images_param_min_max_size(self):
         # Test to get all images with size between 2000 to 3000
         image_id = self.created_images[1]
@@ -234,13 +234,13 @@
                             image_size <= params['size_max'],
                             "Failed to get images by size_min and size_max")
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_images_param_status(self):
         # Test to get all active images
         params = {"status": "active"}
         self._list_by_param_value_and_assert(params)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_images_param_limit(self):
         # Test to get images by limit
         params = {"limit": 2}
@@ -250,7 +250,7 @@
         self.assertEqual(len(images_list), params['limit'],
                          "Failed to get images by limit")
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_image_schema(self):
         # Test to get image schema
         schema = "image"
@@ -258,7 +258,7 @@
         self.assertEqual(200, resp.status)
         self.assertEqual("image", body['name'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_images_schema(self):
         # Test to get images schema
         schema = "images"
diff --git a/tempest/api/image/v2/test_images_member.py b/tempest/api/image/v2/test_images_member.py
index 530262f..f80c818 100644
--- a/tempest/api/image/v2/test_images_member.py
+++ b/tempest/api/image/v2/test_images_member.py
@@ -11,13 +11,13 @@
 #    under the License.
 
 from tempest.api.image import base
-from tempest.test import attr
+from tempest import test
 
 
 class ImagesMemberTest(base.BaseV2MemberImageTest):
     _interface = 'json'
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_image_share_accept(self):
         image_id = self._create_image()
         resp, member = self.os_img_client.add_member(image_id,
@@ -40,7 +40,7 @@
         self.assertEqual(member['image_id'], image_id)
         self.assertEqual(member['status'], 'accepted')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_image_share_reject(self):
         image_id = self._create_image()
         resp, member = self.os_img_client.add_member(image_id,
@@ -56,7 +56,7 @@
         self.assertEqual(200, resp.status)
         self.assertNotIn(image_id, self._list_image_ids_as_alt())
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_image_member(self):
         image_id = self._create_image()
         self.os_img_client.add_member(image_id,
@@ -73,7 +73,7 @@
         self.assertEqual(image_id, member['image_id'])
         self.assertEqual('accepted', member['status'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_remove_image_member(self):
         image_id = self._create_image()
         self.os_img_client.add_member(image_id,
@@ -86,3 +86,15 @@
         resp = self.os_img_client.remove_member(image_id, self.alt_tenant_id)
         self.assertEqual(204, resp.status)
         self.assertNotIn(image_id, self._list_image_ids_as_alt())
+
+    @test.attr(type='gate')
+    def test_get_image_member_schema(self):
+        resp, body = self.os_img_client.get_schema("member")
+        self.assertEqual(200, resp.status)
+        self.assertEqual("member", body['name'])
+
+    @test.attr(type='gate')
+    def test_get_image_members_schema(self):
+        resp, body = self.os_img_client.get_schema("members")
+        self.assertEqual(200, resp.status)
+        self.assertEqual("members", body['name'])
diff --git a/tempest/api/image/v2/test_images_member_negative.py b/tempest/api/image/v2/test_images_member_negative.py
index 4c7cc5a..98ef649 100644
--- a/tempest/api/image/v2/test_images_member_negative.py
+++ b/tempest/api/image/v2/test_images_member_negative.py
@@ -12,13 +12,13 @@
 
 from tempest.api.image import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ImagesMemberNegativeTest(base.BaseV2MemberImageTest):
     _interface = 'json'
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_image_share_invalid_status(self):
         image_id = self._create_image()
         resp, member = self.os_img_client.add_member(image_id,
@@ -28,7 +28,7 @@
                           self.alt_img_client.update_member_status,
                           image_id, self.alt_tenant_id, 'notavalidstatus')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_image_share_owner_cannot_accept(self):
         image_id = self._create_image()
         resp, member = self.os_img_client.add_member(image_id,
diff --git a/tempest/api/image/v2/test_images_negative.py b/tempest/api/image/v2/test_images_negative.py
index b8ba868..27ba39c 100644
--- a/tempest/api/image/v2/test_images_negative.py
+++ b/tempest/api/image/v2/test_images_negative.py
@@ -18,7 +18,7 @@
 
 from tempest.api.image import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ImagesNegativeTest(base.BaseV2ImageTest):
@@ -35,20 +35,20 @@
         ** delete the deleted image
      """
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_non_existent_image(self):
         # get the non-existent image
         non_existent_id = str(uuid.uuid4())
         self.assertRaises(exceptions.NotFound, self.client.get_image,
                           non_existent_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_image_null_id(self):
         # get image with image_id = NULL
         image_id = ""
         self.assertRaises(exceptions.NotFound, self.client.get_image, image_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_delete_deleted_image(self):
         # get and delete the deleted image
         # create and delete image
@@ -67,27 +67,27 @@
         self.assertRaises(exceptions.NotFound, self.client.delete_image,
                           image_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_non_existing_image(self):
         # delete non-existent image
         non_existent_image_id = str(uuid.uuid4())
         self.assertRaises(exceptions.NotFound, self.client.delete_image,
                           non_existent_image_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_image_null_id(self):
         # delete image with image_id=NULL
         image_id = ""
         self.assertRaises(exceptions.NotFound, self.client.delete_image,
                           image_id)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_register_with_invalid_container_format(self):
         # Negative tests for invalid data supplied to POST /images
         self.assertRaises(exceptions.BadRequest, self.client.create_image,
                           'test', 'wrong', 'vhd')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_register_with_invalid_disk_format(self):
         self.assertRaises(exceptions.BadRequest, self.client.create_image,
                           'test', 'bare', 'wrong')
diff --git a/tempest/api/image/v2/test_images_tags.py b/tempest/api/image/v2/test_images_tags.py
index f0e343d..504c0e8 100644
--- a/tempest/api/image/v2/test_images_tags.py
+++ b/tempest/api/image/v2/test_images_tags.py
@@ -14,12 +14,12 @@
 
 from tempest.api.image import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class ImagesTagsTest(base.BaseV2ImageTest):
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_delete_tags_for_image(self):
         resp, body = self.create_image(container_format='bare',
                                        disk_format='raw',
diff --git a/tempest/api/image/v2/test_images_tags_negative.py b/tempest/api/image/v2/test_images_tags_negative.py
index 0628d29..3233db7 100644
--- a/tempest/api/image/v2/test_images_tags_negative.py
+++ b/tempest/api/image/v2/test_images_tags_negative.py
@@ -17,12 +17,12 @@
 from tempest.api.image import base
 from tempest.common.utils import data_utils
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ImagesTagsNegativeTest(base.BaseV2ImageTest):
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_update_tags_for_non_existing_image(self):
         # Update tag with non existing image.
         tag = data_utils.rand_name('tag-')
@@ -30,7 +30,7 @@
         self.assertRaises(exceptions.NotFound, self.client.add_image_tag,
                           non_exist_image, tag)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_non_existing_tag(self):
         # Delete non existing tag.
         resp, body = self.create_image(container_format='bare',
diff --git a/tempest/api/network/admin/test_l3_agent_scheduler.py b/tempest/api/network/admin/test_l3_agent_scheduler.py
index 7c02787..eb397ba 100644
--- a/tempest/api/network/admin/test_l3_agent_scheduler.py
+++ b/tempest/api/network/admin/test_l3_agent_scheduler.py
@@ -26,6 +26,7 @@
 
         List routers that the given L3 agent is hosting.
         List L3 agents hosting the given router.
+        Add and Remove Router to L3 agent
 
     v2.0 of the Neutron API is assumed. It is also assumed that the following
     options are defined in the [network] section of etc/tempest.conf:
@@ -37,28 +38,49 @@
         if not test.is_extension_enabled('l3_agent_scheduler', 'network'):
             msg = "L3 Agent Scheduler Extension not enabled."
             raise cls.skipException(msg)
+        # Trying to get agent details for L3 Agent
+        resp, body = cls.admin_client.list_agents()
+        agents = body['agents']
+        for agent in agents:
+            if agent['agent_type'] == 'L3 agent':
+                cls.agent = agent
+                break
+        else:
+            msg = "L3 Agent not found"
+            raise cls.skipException(msg)
 
     @test.attr(type='smoke')
     def test_list_routers_on_l3_agent(self):
-        resp, body = self.admin_client.list_agents()
-        agents = body['agents']
-        for a in agents:
-            if a['agent_type'] == 'L3 agent':
-                agent = a
         resp, body = self.admin_client.list_routers_on_l3_agent(
-            agent['id'])
+            self.agent['id'])
         self.assertEqual('200', resp['status'])
 
     @test.attr(type='smoke')
-    def test_list_l3_agents_hosting_router(self):
-        name = data_utils.rand_name('router-')
+    def test_add_list_remove_router_on_l3_agent(self):
+        l3_agent_ids = list()
+        name = data_utils.rand_name('router1-')
         resp, router = self.client.create_router(name)
+        self.addCleanup(self.client.delete_router, router['router']['id'])
+        resp, body = self.admin_client.add_router_to_l3_agent(
+            self.agent['id'], router['router']['id'])
         self.assertEqual('201', resp['status'])
         resp, body = self.admin_client.list_l3_agents_hosting_router(
             router['router']['id'])
         self.assertEqual('200', resp['status'])
-        resp, _ = self.client.delete_router(router['router']['id'])
-        self.assertEqual(204, resp.status)
+        for agent in body['agents']:
+            l3_agent_ids.append(agent['id'])
+            self.assertIn('agent_type', agent)
+            self.assertEqual('L3 agent', agent['agent_type'])
+        self.assertIn(self.agent['id'], l3_agent_ids)
+        del l3_agent_ids[:]
+        resp, body = self.admin_client.remove_router_from_l3_agent(
+            self.agent['id'], router['router']['id'])
+        self.assertEqual('204', resp['status'])
+        resp, body = self.admin_client.list_l3_agents_hosting_router(
+            router['router']['id'])
+        for agent in body['agents']:
+            l3_agent_ids.append(agent['id'])
+        self.assertNotIn(self.agent['id'], l3_agent_ids)
 
 
 class L3AgentSchedulerTestXML(L3AgentSchedulerTestJSON):
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index 51c094e..231c4bf 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -59,7 +59,6 @@
         # Create no network resources for these test.
         cls.set_network_resources()
         super(BaseNetworkTest, cls).setUpClass()
-        os = clients.Manager(interface=cls._interface)
         if not CONF.service_available.neutron:
             raise cls.skipException("Neutron support is required")
 
@@ -152,8 +151,6 @@
             cidr = netaddr.IPNetwork(CONF.network.tenant_network_v6_cidr)
             mask_bits = CONF.network.tenant_network_v6_mask_bits
         # Find a cidr that is not in use yet and create a subnet with it
-        body = None
-        failure = None
         for subnet_cidr in cidr.subnet(mask_bits):
             try:
                 resp, body = cls.client.create_subnet(
@@ -165,12 +162,9 @@
                 is_overlapping_cidr = 'overlaps with another subnet' in str(e)
                 if not is_overlapping_cidr:
                     raise
-                # save the failure in case all of the CIDRs are overlapping
-                failure = e
-
-        if not body and failure:
-            raise failure
-
+        else:
+            message = 'Available CIDR for subnet creation could not be found'
+            raise exceptions.BuildErrorException(message)
         subnet = body['subnet']
         cls.subnets.append(subnet)
         return subnet
diff --git a/tempest/api/network/common.py b/tempest/api/network/common.py
index d68ff1a..97e120f 100644
--- a/tempest/api/network/common.py
+++ b/tempest/api/network/common.py
@@ -61,6 +61,11 @@
         super(DeletableSubnet, self).__init__(*args, **kwargs)
         self._router_ids = set()
 
+    def update(self, *args, **kwargs):
+        body = dict(subnet=dict(*args, **kwargs))
+        result = self.client.update_subnet(subnet=self.id, body=body)
+        super(DeletableSubnet, self).update(**result['subnet'])
+
     def add_to_router(self, router_id):
         self._router_ids.add(router_id)
         body = dict(subnet_id=self.id)
diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py
index 654552d..1155257 100644
--- a/tempest/api/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -18,7 +18,6 @@
 from tempest.api.network import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest.test import attr
 
 CONF = config.CONF
@@ -85,25 +84,7 @@
         updated_net = body['network']
         self.assertEqual(updated_net['name'], new_name)
         # Find a cidr that is not in use yet and create a subnet with it
-        if self._ip_version == 4:
-            cidr = netaddr.IPNetwork(CONF.network.tenant_network_cidr)
-            mask_bits = CONF.network.tenant_network_mask_bits
-        elif self._ip_version == 6:
-            cidr = netaddr.IPNetwork(CONF.network.tenant_network_v6_cidr)
-            mask_bits = CONF.network.tenant_network_v6_mask_bits
-        for subnet_cidr in cidr.subnet(mask_bits):
-            try:
-                resp, body = self.client.create_subnet(
-                    network_id=net_id,
-                    cidr=str(subnet_cidr),
-                    ip_version=self._ip_version)
-                break
-            except exceptions.BadRequest as e:
-                is_overlapping_cidr = 'overlaps with another subnet' in str(e)
-                if not is_overlapping_cidr:
-                    raise
-        self.assertEqual('201', resp['status'])
-        subnet = body['subnet']
+        subnet = self.create_subnet(network)
         subnet_id = subnet['id']
         # Verification of subnet update
         new_subnet = "New_subnet"
@@ -115,6 +96,8 @@
         # Delete subnet and network
         resp, body = self.client.delete_subnet(subnet_id)
         self.assertEqual('204', resp['status'])
+        # Remove subnet from cleanup list
+        self.subnets.pop()
         resp, body = self.client.delete_network(net_id)
         self.assertEqual('204', resp['status'])
 
@@ -472,7 +455,7 @@
     @classmethod
     def setUpClass(cls):
         super(NetworksIpV6TestJSON, cls).setUpClass()
-        if not CONF.network.ipv6_enabled:
+        if not CONF.network_feature_enabled.ipv6:
             cls.tearDownClass()
             skip_msg = "IPv6 Tests are disabled."
             raise cls.skipException(skip_msg)
diff --git a/tempest/api/network/test_security_groups.py b/tempest/api/network/test_security_groups.py
index 1d41cc9..3e26f46 100644
--- a/tempest/api/network/test_security_groups.py
+++ b/tempest/api/network/test_security_groups.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 from tempest.api.network import base_security_groups as base
+from tempest.common.utils import data_utils
 from tempest import test
 
 
@@ -41,15 +42,9 @@
         self.assertIsNotNone(found, msg)
 
     @test.attr(type='smoke')
-    def test_create_show_delete_security_group(self):
+    def test_create_list_update_show_delete_security_group(self):
         group_create_body, name = self._create_security_group()
 
-        # Show details of the created security group
-        resp, show_body = self.client.show_security_group(
-            group_create_body['security_group']['id'])
-        self.assertEqual('200', resp['status'])
-        self.assertEqual(show_body['security_group']['name'], name)
-
         # List security groups and verify if created group is there in response
         resp, list_body = self.client.list_security_groups()
         self.assertEqual('200', resp['status'])
@@ -57,6 +52,24 @@
         for secgroup in list_body['security_groups']:
             secgroup_list.append(secgroup['id'])
         self.assertIn(group_create_body['security_group']['id'], secgroup_list)
+        # Update the security group
+        new_name = data_utils.rand_name('security-')
+        new_description = data_utils.rand_name('security-description')
+        resp, update_body = self.client.update_security_group(
+            group_create_body['security_group']['id'],
+            name=new_name,
+            description=new_description)
+        # Verify if security group is updated
+        self.assertEqual('200', resp['status'])
+        self.assertEqual(update_body['security_group']['name'], new_name)
+        self.assertEqual(update_body['security_group']['description'],
+                         new_description)
+        # Show details of the updated security group
+        resp, show_body = self.client.show_security_group(
+            group_create_body['security_group']['id'])
+        self.assertEqual(show_body['security_group']['name'], new_name)
+        self.assertEqual(show_body['security_group']['description'],
+                         new_description)
 
     @test.attr(type='smoke')
     def test_create_show_delete_security_group_rule(self):
diff --git a/tempest/api/object_storage/test_account_services.py b/tempest/api/object_storage/test_account_services.py
index 7542ea1..4b895d8 100644
--- a/tempest/api/object_storage/test_account_services.py
+++ b/tempest/api/object_storage/test_account_services.py
@@ -18,10 +18,15 @@
 from six import moves
 
 from tempest.api.object_storage import base
+from tempest import clients
 from tempest.common import custom_matchers
 from tempest.common.utils import data_utils
+from tempest import config
+from tempest import exceptions
 from tempest import test
 
+CONF = config.CONF
+
 
 class AccountTest(base.BaseObjectTest):
     @classmethod
@@ -37,20 +42,109 @@
     @classmethod
     def tearDownClass(cls):
         cls.delete_containers(cls.containers)
+        cls.data.teardown_all()
         super(AccountTest, cls).tearDownClass()
 
     @test.attr(type='smoke')
     def test_list_containers(self):
         # list of all containers should not be empty
-        params = {'format': 'json'}
-        resp, container_list = \
-            self.account_client.list_account_containers(params=params)
+        resp, container_list = self.account_client.list_account_containers()
         self.assertHeaders(resp, 'Account', 'GET')
 
         self.assertIsNotNone(container_list)
-        container_names = [c['name'] for c in container_list]
         for container_name in self.containers:
-            self.assertIn(container_name, container_names)
+            self.assertIn(container_name, container_list)
+
+    @test.attr(type='smoke')
+    def test_list_no_containers(self):
+        # List request to empty account
+
+        # To test listing no containers, create new user other than
+        # the base user of this instance.
+        self.data.setup_test_user()
+
+        os_test_user = clients.Manager(
+            self.data.test_user,
+            self.data.test_password,
+            self.data.test_tenant)
+
+        # Retrieve the id of an operator role of object storage
+        test_role_id = None
+        swift_role = CONF.object_storage.operator_role
+        try:
+            _, roles = self.os_admin.identity_client.list_roles()
+            test_role_id = next(r['id'] for r in roles if r['name']
+                                == swift_role)
+        except StopIteration:
+            msg = "%s role found" % swift_role
+            raise exceptions.NotFound(msg)
+
+        # Retrieve the test_user id
+        _, users = self.os_admin.identity_client.get_users()
+        test_user_id = next(usr['id'] for usr in users if usr['name']
+                            == self.data.test_user)
+
+        # Retrieve the test_tenant id
+        _, tenants = self.os_admin.identity_client.list_tenants()
+        test_tenant_id = next(tnt['id'] for tnt in tenants if tnt['name']
+                              == self.data.test_tenant)
+
+        # Assign the newly created user the appropriate operator role
+        self.os_admin.identity_client.assign_user_role(
+            test_tenant_id,
+            test_user_id,
+            test_role_id)
+
+        resp, container_list = \
+            os_test_user.account_client.list_account_containers()
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+
+        # When sending a request to an account which has not received a PUT
+        # container request, the response does not contain 'accept-ranges'
+        # header. This is a special case, therefore the existence of response
+        # headers is checked without custom matcher.
+        self.assertIn('content-length', resp)
+        self.assertIn('x-timestamp', resp)
+        self.assertIn('x-account-bytes-used', resp)
+        self.assertIn('x-account-container-count', resp)
+        self.assertIn('x-account-object-count', 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())
+
+        self.assertEqual(len(container_list), 0)
+
+    @test.attr(type='smoke')
+    def test_list_containers_with_format_json(self):
+        # list containers setting format parameter to 'json'
+        params = {'format': 'json'}
+        resp, container_list = self.account_client.list_account_containers(
+            params=params)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertHeaders(resp, 'Account', 'GET')
+        self.assertIsNotNone(container_list)
+        self.assertTrue([c['name'] for c in container_list])
+        self.assertTrue([c['count'] for c in container_list])
+        self.assertTrue([c['bytes'] for c in container_list])
+
+    @test.attr(type='smoke')
+    def test_list_containers_with_format_xml(self):
+        # list containers setting format parameter to 'xml'
+        params = {'format': 'xml'}
+        resp, container_list = self.account_client.list_account_containers(
+            params=params)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertHeaders(resp, 'Account', 'GET')
+        self.assertIsNotNone(container_list)
+        self.assertEqual(container_list.tag, 'account')
+        self.assertTrue('name' in container_list.keys())
+        self.assertEqual(container_list.find(".//container").tag, 'container')
+        self.assertEqual(container_list.find(".//name").tag, 'name')
+        self.assertEqual(container_list.find(".//count").tag, 'count')
+        self.assertEqual(container_list.find(".//bytes").tag, 'bytes')
 
     @test.attr(type='smoke')
     def test_list_extensions(self):
@@ -109,6 +203,17 @@
         self.assertEqual(len(container_list), self.containers_count / 2)
 
     @test.attr(type='smoke')
+    def test_list_containers_with_marker_and_end_marker(self):
+        # list containers combining marker and end_marker param
+        params = {'marker': self.containers[0],
+                  'end_marker': self.containers[self.containers_count - 1]}
+        resp, container_list = self.account_client.list_account_containers(
+            params=params)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertHeaders(resp, 'Account', 'GET')
+        self.assertEqual(len(container_list), self.containers_count - 2)
+
+    @test.attr(type='smoke')
     def test_list_containers_with_limit_and_marker(self):
         # list containers combining marker and limit param
         # result are always limitated by the limit whatever the marker
@@ -123,34 +228,125 @@
             self.assertTrue(len(container_list) <= limit, str(container_list))
 
     @test.attr(type='smoke')
-    def test_list_account_metadata(self):
-        # list all account metadata
-        resp, metadata = self.account_client.list_account_metadata()
+    def test_list_containers_with_limit_and_end_marker(self):
+        # list containers combining limit and end_marker param
+        limit = random.randint(1, self.containers_count)
+        params = {'limit': limit,
+                  'end_marker': self.containers[self.containers_count / 2]}
+        resp, container_list = self.account_client.list_account_containers(
+            params=params)
         self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
-        self.assertHeaders(resp, 'Account', 'HEAD')
+        self.assertHeaders(resp, 'Account', 'GET')
+        self.assertEqual(len(container_list),
+                         min(limit, self.containers_count / 2))
 
     @test.attr(type='smoke')
-    def test_create_and_delete_account_metadata(self):
-        header = 'test-account-meta'
-        data = 'Meta!'
+    def test_list_containers_with_limit_and_marker_and_end_marker(self):
+        # list containers combining limit, marker and end_marker param
+        limit = random.randint(1, self.containers_count)
+        params = {'limit': limit,
+                  'marker': self.containers[0],
+                  'end_marker': self.containers[self.containers_count - 1]}
+        resp, container_list = self.account_client.list_account_containers(
+            params=params)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertHeaders(resp, 'Account', 'GET')
+        self.assertEqual(len(container_list),
+                         min(limit, self.containers_count - 2))
+
+    @test.attr(type='smoke')
+    def test_list_account_metadata(self):
+        # list all account metadata
+
+        # set metadata to account
+        metadata = {'test-account-meta1': 'Meta1',
+                    'test-account-meta2': 'Meta2'}
+        resp, _ = self.account_client.create_account_metadata(metadata)
+
+        resp, _ = self.account_client.list_account_metadata()
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertHeaders(resp, 'Account', 'HEAD')
+        self.assertIn('x-account-meta-test-account-meta1', resp)
+        self.assertIn('x-account-meta-test-account-meta2', resp)
+        self.account_client.delete_account_metadata(metadata)
+
+    @test.attr(type='smoke')
+    def test_list_no_account_metadata(self):
+        # list no account metadata
+        resp, _ = self.account_client.list_account_metadata()
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertHeaders(resp, 'Account', 'HEAD')
+        self.assertNotIn('x-account-meta-', str(resp))
+
+    @test.attr(type='smoke')
+    def test_update_account_metadata_with_create_metadata(self):
         # add metadata to account
-        resp, _ = self.account_client.create_account_metadata(
-            metadata={header: data})
+        metadata = {'test-account-meta1': 'Meta1'}
+        resp, _ = self.account_client.create_account_metadata(metadata)
         self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
         self.assertHeaders(resp, 'Account', 'POST')
 
-        resp, _ = self.account_client.list_account_metadata()
-        self.assertHeaders(resp, 'Account', 'HEAD')
+        resp, body = self.account_client.list_account_metadata()
+        self.assertIn('x-account-meta-test-account-meta1', resp)
+        self.assertEqual(resp['x-account-meta-test-account-meta1'],
+                         metadata['test-account-meta1'])
 
-        self.assertIn('x-account-meta-' + header, resp)
-        self.assertEqual(resp['x-account-meta-' + header], data)
+        self.account_client.delete_account_metadata(metadata)
 
+    @test.attr(type='smoke')
+    def test_update_account_metadata_with_delete_matadata(self):
         # delete metadata from account
-        resp, _ = \
-            self.account_client.delete_account_metadata(metadata=[header])
+        metadata = {'test-account-meta1': 'Meta1'}
+        self.account_client.create_account_metadata(metadata)
+        resp, _ = self.account_client.delete_account_metadata(metadata)
         self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
         self.assertHeaders(resp, 'Account', 'POST')
 
         resp, _ = self.account_client.list_account_metadata()
-        self.assertHeaders(resp, 'Account', 'HEAD')
-        self.assertNotIn('x-account-meta-' + header, resp)
+        self.assertNotIn('x-account-meta-test-account-meta1', resp)
+
+    @test.attr(type='smoke')
+    def test_update_account_metadata_with_create_matadata_key(self):
+        # if the value of metadata is not set, the metadata is not
+        # registered at a server
+        metadata = {'test-account-meta1': ''}
+        resp, _ = self.account_client.create_account_metadata(metadata)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertHeaders(resp, 'Account', 'POST')
+
+        resp, _ = self.account_client.list_account_metadata()
+        self.assertNotIn('x-account-meta-test-account-meta1', resp)
+
+    @test.attr(type='smoke')
+    def test_update_account_metadata_with_delete_matadata_key(self):
+        # Although the value of metadata is not set, the feature of
+        # deleting metadata is valid
+        metadata_1 = {'test-account-meta1': 'Meta1'}
+        self.account_client.create_account_metadata(metadata_1)
+        metadata_2 = {'test-account-meta1': ''}
+        resp, _ = self.account_client.delete_account_metadata(metadata_2)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertHeaders(resp, 'Account', 'POST')
+
+        resp, _ = self.account_client.list_account_metadata()
+        self.assertNotIn('x-account-meta-test-account-meta1', resp)
+
+    @test.attr(type='smoke')
+    def test_update_account_metadata_with_create_and_delete_metadata(self):
+        # Send a request adding and deleting metadata requests simultaneously
+        metadata_1 = {'test-account-meta1': 'Meta1'}
+        self.account_client.create_account_metadata(metadata_1)
+        metadata_2 = {'test-account-meta2': 'Meta2'}
+        resp, body = self.account_client.create_and_delete_account_metadata(
+            metadata_2,
+            metadata_1)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertHeaders(resp, 'Account', 'POST')
+
+        resp, _ = self.account_client.list_account_metadata()
+        self.assertNotIn('x-account-meta-test-account-meta1', resp)
+        self.assertIn('x-account-meta-test-account-meta2', resp)
+        self.assertEqual(resp['x-account-meta-test-account-meta2'],
+                         metadata_2['test-account-meta2'])
+
+        self.account_client.delete_account_metadata(metadata_2)
diff --git a/tempest/api/object_storage/test_object_temp_url.py b/tempest/api/object_storage/test_object_temp_url.py
index 47c270e..c597255 100644
--- a/tempest/api/object_storage/test_object_temp_url.py
+++ b/tempest/api/object_storage/test_object_temp_url.py
@@ -40,9 +40,9 @@
         # update account metadata
         cls.key = 'Meta'
         cls.metadatas = []
-        cls.metadata = {'Temp-URL-Key': cls.key}
-        cls.metadatas.append(cls.metadata)
-        cls.account_client.create_account_metadata(metadata=cls.metadata)
+        metadata = {'Temp-URL-Key': cls.key}
+        cls.metadatas.append(metadata)
+        cls.account_client.create_account_metadata(metadata=metadata)
 
         # create an object
         cls.object_name = data_utils.rand_name(name='ObjectTemp')
@@ -53,7 +53,7 @@
 
     @classmethod
     def tearDownClass(cls):
-        for metadata in cls.metadata:
+        for metadata in cls.metadatas:
             cls.account_client.delete_account_metadata(
                 metadata=metadata)
 
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index 291f0d1..18ba37b 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -73,7 +73,7 @@
       subnet_id: {get_resource: Subnet}
   Server:
     type: AWS::EC2::Instance
-    Metadata:
+    metadata:
       Name: SmokeServerNeutron
     properties:
       ImageId: {get_param: ImageId}
@@ -93,7 +93,7 @@
     type: AWS::CloudFormation::WaitConditionHandle
   WaitCondition:
     type: AWS::CloudFormation::WaitCondition
-    DependsOn: Server
+    depends_on: Server
     properties:
       Handle: {get_resource: WaitHandleNeutron}
       Timeout: '600'
diff --git a/tempest/api/orchestration/stacks/test_nova_keypair_resources.py b/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
new file mode 100644
index 0000000..9d3bf13
--- /dev/null
+++ b/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
@@ -0,0 +1,181 @@
+#    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 logging
+
+from tempest.api.orchestration import base
+from tempest.common.utils import data_utils
+from tempest.test import attr
+
+
+LOG = logging.getLogger(__name__)
+
+
+class NovaKeyPairResourcesYAMLTest(base.BaseOrchestrationTest):
+    _interface = 'json'
+    template = """
+heat_template_version: 2013-05-23
+
+description: >
+  Template which creates two key pairs.
+
+parameters:
+  KeyPairName1:
+    type: string
+    default: testkey
+
+  KeyPairName2:
+    type: string
+    default: testkey2
+
+resources:
+  KeyPairSavePrivate:
+    type: OS::Nova::KeyPair
+    properties:
+      name: { get_param: KeyPairName1 }
+      save_private_key: true
+
+  KeyPairDontSavePrivate:
+    type: OS::Nova::KeyPair
+    properties:
+      name: { get_param: KeyPairName2 }
+      save_private_key: false
+
+outputs:
+  KeyPair_PublicKey:
+    description: Public Key of generated keypair
+    value: { get_attr: [KeyPairSavePrivate, public_key] }
+
+  KeyPair_PrivateKey:
+    description: Private Key of generated keypair
+    value: { get_attr: [KeyPairSavePrivate, private_key] }
+
+  KeyPairDontSavePrivate_PublicKey:
+    description: Public Key of generated keypair
+    value: { get_attr: [KeyPairDontSavePrivate, public_key] }
+
+  KeyPairDontSavePrivate_PrivateKey:
+    description: Private Key of generated keypair
+    value: { get_attr: [KeyPairDontSavePrivate, private_key] }
+"""
+
+    @classmethod
+    def setUpClass(cls):
+        super(NovaKeyPairResourcesYAMLTest, cls).setUpClass()
+        cls.client = cls.orchestration_client
+        cls.stack_name = data_utils.rand_name('heat')
+
+        # create the stack, avoid any duplicated key.
+        cls.stack_identifier = cls.create_stack(
+            cls.stack_name,
+            cls.template,
+            parameters={
+                'KeyPairName1': cls.stack_name + '_1',
+                'KeyPairName2': cls.stack_name + '_2'
+            })
+
+        cls.stack_id = cls.stack_identifier.split('/')[1]
+        cls.client.wait_for_stack_status(cls.stack_id, 'CREATE_COMPLETE')
+        _, resources = cls.client.list_resources(cls.stack_identifier)
+        cls.test_resources = {}
+        for resource in resources:
+            cls.test_resources[resource['logical_resource_id']] = resource
+
+    @attr(type='slow')
+    def test_created_resources(self):
+        """Verifies created keypair resource."""
+        resources = [('KeyPairSavePrivate', 'OS::Nova::KeyPair'),
+                     ('KeyPairDontSavePrivate', 'OS::Nova::KeyPair')]
+
+        for resource_name, resource_type in resources:
+            resource = self.test_resources.get(resource_name, None)
+            self.assertIsInstance(resource, dict)
+            self.assertEqual(resource_name, resource['logical_resource_id'])
+            self.assertEqual(resource_type, resource['resource_type'])
+            self.assertEqual('CREATE_COMPLETE', resource['resource_status'])
+
+    @attr(type='slow')
+    def test_stack_keypairs_output(self):
+        resp, stack = self.client.get_stack(self.stack_name)
+        self.assertEqual('200', resp['status'])
+        self.assertIsInstance(stack, dict)
+
+        output_map = {}
+        for outputs in stack['outputs']:
+            output_map[outputs['output_key']] = outputs['output_value']
+        #Test that first key generated public and private keys
+        self.assertTrue('KeyPair_PublicKey' in output_map)
+        self.assertTrue("Generated by" in output_map['KeyPair_PublicKey'])
+        self.assertTrue('KeyPair_PrivateKey' in output_map)
+        self.assertTrue('-----BEGIN' in output_map['KeyPair_PrivateKey'])
+        #Test that second key generated public key, and private key is not
+        #in the output due to save_private_key = false
+        self.assertTrue('KeyPairDontSavePrivate_PublicKey' in output_map)
+        self.assertTrue('Generated by' in
+                        output_map['KeyPairDontSavePrivate_PublicKey'])
+        self.assertTrue(u'KeyPairDontSavePrivate_PrivateKey' in output_map)
+        private_key = output_map['KeyPairDontSavePrivate_PrivateKey']
+        self.assertTrue(len(private_key) == 0)
+
+
+class NovaKeyPairResourcesAWSTest(NovaKeyPairResourcesYAMLTest):
+    template = """
+{
+  "AWSTemplateFormatVersion" : "2010-09-09",
+  "Description" : "Template which create two key pairs.",
+  "Parameters" : {
+    "KeyPairName1": {
+      "Type": "String",
+      "Default": "testkey1"
+      },
+    "KeyPairName2": {
+      "Type": "String",
+      "Default": "testkey2"
+      }
+   },
+   "Resources" : {
+     "KeyPairSavePrivate": {
+       "Type": "OS::Nova::KeyPair",
+       "Properties": {
+         "name" : { "Ref" : "KeyPairName1" },
+         "save_private_key": true
+       }
+     },
+     "KeyPairDontSavePrivate": {
+       "Type": "OS::Nova::KeyPair",
+       "Properties": {
+         "name" : { "Ref" : "KeyPairName2" },
+         "save_private_key": false
+      }
+     }
+  },
+ "Outputs": {
+   "KeyPair_PublicKey": {
+     "Description": "Public Key of generated keypair.",
+     "Value": { "Fn::GetAtt" : ["KeyPairSavePrivate", "public_key"] }
+    },
+   "KeyPair_PrivateKey": {
+     "Description": "Private Key of generated keypair.",
+     "Value": { "Fn::GetAtt" : ["KeyPairSavePrivate", "private_key"] }
+   },
+   "KeyPairDontSavePrivate_PublicKey": {
+     "Description": "Public Key of generated keypair.",
+     "Value": { "Fn::GetAtt" : ["KeyPairDontSavePrivate", "public_key"] }
+   },
+  "KeyPairDontSavePrivate_PrivateKey": {
+     "Description": "Private Key of generated keypair.",
+     "Value": { "Fn::GetAtt" : ["KeyPairDontSavePrivate", "private_key"] }
+   }
+  }
+}
+"""
diff --git a/tempest/api/orchestration/stacks/test_server_cfn_init.py b/tempest/api/orchestration/stacks/test_server_cfn_init.py
index 5130f87..7e8bc2d 100644
--- a/tempest/api/orchestration/stacks/test_server_cfn_init.py
+++ b/tempest/api/orchestration/stacks/test_server_cfn_init.py
@@ -154,8 +154,8 @@
         sid = self.stack_identifier
         rid = 'SmokeServer'
 
-        # wait for server resource create to complete.
-        self.client.wait_for_resource_status(sid, rid, 'CREATE_COMPLETE')
+        # wait for create to complete.
+        self.client.wait_for_stack_status(sid, 'CREATE_COMPLETE')
 
         resp, body = self.client.get_resource(sid, rid)
         self.assertEqual('CREATE_COMPLETE', body['resource_status'])
diff --git a/tempest/api/orchestration/stacks/test_swift_resources.py b/tempest/api/orchestration/stacks/test_swift_resources.py
index 5921a7a..713cfd4 100644
--- a/tempest/api/orchestration/stacks/test_swift_resources.py
+++ b/tempest/api/orchestration/stacks/test_swift_resources.py
@@ -27,20 +27,20 @@
     _interface = 'json'
     template = """
 heat_template_version: 2013-05-23
-description: Template which creates a Swift container ressource
+description: Template which creates a Swift container resource
 
 resources:
   SwiftContainerWebsite:
-    DeletionPolicy: "Delete"
-    Type: OS::Swift::Container
-    Properties:
+    deletion_policy: "Delete"
+    type: OS::Swift::Container
+    properties:
       X-Container-Read: ".r:*"
       X-Container-Meta:
         web-index: "index.html"
         web-error: "error.html"
 
   SwiftContainer:
-    Type: OS::Swift::Container
+    type: OS::Swift::Container
 
 outputs:
   WebsiteURL:
diff --git a/tempest/api/queuing/__init__.py b/tempest/api/queuing/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/api/queuing/__init__.py
diff --git a/tempest/api/queuing/base.py b/tempest/api/queuing/base.py
new file mode 100644
index 0000000..5656850
--- /dev/null
+++ b/tempest/api/queuing/base.py
@@ -0,0 +1,49 @@
+# Copyright (c) 2014 Rackspace, Inc.
+#
+# 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.
+
+from tempest import config
+from tempest.openstack.common import log as logging
+from tempest import test
+
+CONF = config.CONF
+
+LOG = logging.getLogger(__name__)
+
+
+class BaseQueuingTest(test.BaseTestCase):
+
+    """
+    Base class for the Queuing tests that use the Tempest Marconi REST client
+
+    It is assumed that the following option is defined in the
+    [service_available] section of etc/tempest.conf
+
+        queuing as True
+    """
+
+    @classmethod
+    def setUpClass(cls):
+        super(BaseQueuingTest, cls).setUpClass()
+        if not CONF.service_available.marconi:
+            raise cls.skipException("Marconi support is required")
+        os = cls.get_client_manager()
+        cls.queuing_cfg = CONF.queuing
+        cls.client = os.queuing_client
+
+    @classmethod
+    def create_queue(cls, queue_name):
+        """Wrapper utility that returns a test queue."""
+        resp, body = cls.client.create_queue(queue_name)
+        return resp, body
diff --git a/tempest/api/queuing/test_queues.py b/tempest/api/queuing/test_queues.py
new file mode 100644
index 0000000..6934b46
--- /dev/null
+++ b/tempest/api/queuing/test_queues.py
@@ -0,0 +1,37 @@
+# Copyright (c) 2014 Rackspace, Inc.
+#
+# 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 logging
+
+from tempest.api.queuing import base
+from tempest.common.utils import data_utils
+from tempest import test
+
+
+LOG = logging.getLogger(__name__)
+
+
+class TestQueues(base.BaseQueuingTest):
+
+    @test.attr(type='smoke')
+    def test_create_queue(self):
+        # Create Queue
+        queue_name = data_utils.rand_name('test-')
+        resp, body = self.create_queue(queue_name)
+
+        self.addCleanup(self.client.delete_queue, queue_name)
+
+        self.assertEqual('201', resp['status'])
+        self.assertEqual('', body)
diff --git a/tempest/api/volume/admin/test_multi_backend.py b/tempest/api/volume/admin/test_multi_backend.py
index b0c878b..6178a1c 100644
--- a/tempest/api/volume/admin/test_multi_backend.py
+++ b/tempest/api/volume/admin/test_multi_backend.py
@@ -14,7 +14,7 @@
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest.openstack.common import log as logging
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -86,7 +86,7 @@
 
         super(VolumeMultiBackendTest, cls).tearDownClass()
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_backend_name_reporting(self):
         # this test checks if os-vol-attr:host is populated correctly after
         # the multi backend feature has been enabled
@@ -100,7 +100,7 @@
                self.volume1['id'])
         self.assertTrue(len(volume1_host.split("@")) > 1, msg)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_backend_name_distinction(self):
         # this test checks that the two volumes created at setUp don't
         # belong to the same backend (if they are, than the
diff --git a/tempest/api/volume/admin/test_snapshots_actions.py b/tempest/api/volume/admin/test_snapshots_actions.py
index 12fda92..e140ad0 100644
--- a/tempest/api/volume/admin/test_snapshots_actions.py
+++ b/tempest/api/volume/admin/test_snapshots_actions.py
@@ -15,7 +15,7 @@
 
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class SnapshotsActionsTest(base.BaseVolumeV1AdminTest):
@@ -80,7 +80,7 @@
     def _get_progress_alias(self):
         return 'os-extended-snapshot-attributes:progress'
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_reset_snapshot_status(self):
         # Reset snapshot status to creating
         status = 'creating'
@@ -92,7 +92,7 @@
         self.assertEqual(200, resp_get.status)
         self.assertEqual(status, snapshot_get['status'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_snapshot_status(self):
         # Reset snapshot status to creating
         status = 'creating'
@@ -112,22 +112,22 @@
         self.assertEqual(status, snapshot_get['status'])
         self.assertEqual(progress, snapshot_get[progress_alias])
 
-    @attr(type='gate')
+    @test.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')
+    @test.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')
+    @test.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')
+    @test.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')
diff --git a/tempest/api/volume/admin/test_volume_hosts.py b/tempest/api/volume/admin/test_volume_hosts.py
index 5c311e1..01ba915 100644
--- a/tempest/api/volume/admin/test_volume_hosts.py
+++ b/tempest/api/volume/admin/test_volume_hosts.py
@@ -14,13 +14,13 @@
 #    under the License.
 
 from tempest.api.volume import base
-from tempest.test import attr
+from tempest import test
 
 
 class VolumeHostsAdminTestsJSON(base.BaseVolumeV1AdminTest):
     _interface = "json"
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_hosts(self):
         resp, hosts = self.hosts_client.list_hosts()
         self.assertEqual(200, resp.status)
diff --git a/tempest/api/volume/admin/test_volume_quotas.py b/tempest/api/volume/admin/test_volume_quotas.py
new file mode 100644
index 0000000..31f6730
--- /dev/null
+++ b/tempest/api/volume/admin/test_volume_quotas.py
@@ -0,0 +1,99 @@
+# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
+#
+# Author: Sylvain Baubeau <sylvain.baubeau@enovance.com>
+#
+#    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.
+
+from tempest.api.volume import base
+from tempest import test
+
+QUOTA_KEYS = ['gigabytes', 'snapshots', 'volumes']
+QUOTA_USAGE_KEYS = ['reserved', 'limit', 'in_use']
+
+
+class VolumeQuotasAdminTestJSON(base.BaseVolumeV1AdminTest):
+    _interface = "json"
+
+    @classmethod
+    def setUpClass(cls):
+        super(VolumeQuotasAdminTestJSON, cls).setUpClass()
+        cls.admin_volume_client = cls.os_adm.volumes_client
+        cls.demo_tenant_id = cls.isolated_creds.get_primary_user().get(
+            'tenantId')
+
+    @test.attr(type='gate')
+    def test_list_quotas(self):
+        resp, quotas = self.quotas_client.get_quota_set(self.demo_tenant_id)
+        self.assertEqual(200, resp.status)
+        for key in QUOTA_KEYS:
+            self.assertIn(key, quotas)
+
+    @test.attr(type='gate')
+    def test_list_default_quotas(self):
+        resp, quotas = self.quotas_client.get_default_quota_set(
+            self.demo_tenant_id)
+        self.assertEqual(200, resp.status)
+        for key in QUOTA_KEYS:
+            self.assertIn(key, quotas)
+
+    @test.attr(type='gate')
+    def test_update_all_quota_resources_for_tenant(self):
+        # Admin can update all the resource quota limits for a tenant
+        resp, default_quota_set = self.quotas_client.get_default_quota_set(
+            self.demo_tenant_id)
+        new_quota_set = {'gigabytes': 1009,
+                         'volumes': 11,
+                         'snapshots': 11}
+
+        # Update limits for all quota resources
+        resp, quota_set = self.quotas_client.update_quota_set(
+            self.demo_tenant_id,
+            **new_quota_set)
+
+        default_quota_set.pop('id')
+        self.addCleanup(self.quotas_client.update_quota_set,
+                        self.demo_tenant_id, **default_quota_set)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(new_quota_set, quota_set)
+
+    @test.attr(type='gate')
+    def test_show_quota_usage(self):
+        resp, quota_usage = self.quotas_client.get_quota_usage(self.adm_tenant)
+        self.assertEqual(200, resp.status)
+        for key in QUOTA_KEYS:
+            self.assertIn(key, quota_usage)
+            for usage_key in QUOTA_USAGE_KEYS:
+                self.assertIn(usage_key, quota_usage[key])
+
+    @test.attr(type='gate')
+    def test_quota_usage(self):
+        resp, quota_usage = self.quotas_client.get_quota_usage(
+            self.demo_tenant_id)
+
+        volume = self.create_volume(size=1)
+        self.addCleanup(self.admin_volume_client.delete_volume,
+                        volume['id'])
+
+        resp, new_quota_usage = self.quotas_client.get_quota_usage(
+            self.demo_tenant_id)
+
+        self.assertEqual(200, resp.status)
+        self.assertEqual(quota_usage['volumes']['in_use'] + 1,
+                         new_quota_usage['volumes']['in_use'])
+
+        self.assertEqual(quota_usage['gigabytes']['in_use'] + 1,
+                         new_quota_usage['gigabytes']['in_use'])
+
+
+class VolumeQuotasAdminTestXML(VolumeQuotasAdminTestJSON):
+    _interface = "xml"
diff --git a/tempest/api/volume/admin/test_volume_types.py b/tempest/api/volume/admin/test_volume_types.py
index d481251..8183999 100644
--- a/tempest/api/volume/admin/test_volume_types.py
+++ b/tempest/api/volume/admin/test_volume_types.py
@@ -16,7 +16,7 @@
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -33,14 +33,14 @@
         resp, _ = self.client.delete_volume_type(volume_type_id)
         self.assertEqual(202, resp.status)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_volume_type_list(self):
         # List Volume types.
         resp, body = self.client.list_volume_types()
         self.assertEqual(200, resp.status)
         self.assertIsInstance(body, list)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_create_get_delete_volume_with_volume_type_and_extra_specs(self):
         # Create/get/delete volume with volume_type and extra spec.
         volume = {}
@@ -84,7 +84,7 @@
                          'The fetched Volume is different '
                          'from the created Volume')
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_volume_type_create_get_delete(self):
         # Create/get volume type.
         body = {}
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs.py b/tempest/api/volume/admin/test_volume_types_extra_specs.py
index 99a0826..06a0b34 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs.py
@@ -15,7 +15,7 @@
 
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class VolumeTypesExtraSpecsTest(base.BaseVolumeV1AdminTest):
@@ -32,7 +32,7 @@
         cls.client.delete_volume_type(cls.volume_type['id'])
         super(VolumeTypesExtraSpecsTest, cls).tearDownClass()
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_volume_type_extra_specs_list(self):
         # List Volume types extra specs.
         extra_specs = {"spec1": "val1"}
@@ -47,7 +47,7 @@
         self.assertIsInstance(body, dict)
         self.assertIn('spec1', body)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_type_extra_specs_update(self):
         # Update volume type extra specs
         extra_specs = {"spec2": "val1"}
@@ -67,7 +67,7 @@
         self.assertEqual(extra_spec['spec2'], body['spec2'],
                          "Volume type extra spec incorrectly updated")
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_volume_type_extra_spec_create_get_delete(self):
         # Create/Get/Delete volume type extra spec.
         extra_specs = {"spec3": "val1"}
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
index 5a1a2cd..d3a052e 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
@@ -18,7 +18,7 @@
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ExtraSpecsNegativeTest(base.BaseVolumeV1AdminTest):
@@ -38,7 +38,7 @@
         cls.client.delete_volume_type(cls.volume_type['id'])
         super(ExtraSpecsNegativeTest, cls).tearDownClass()
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_no_body(self):
         # Should not update volume type extra specs with no body
         extra_spec = {"spec1": "val2"}
@@ -46,7 +46,7 @@
                           self.client.update_volume_type_extra_specs,
                           self.volume_type['id'], extra_spec.keys()[0], None)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_nonexistent_extra_spec_id(self):
         # Should not update volume type extra specs with nonexistent id.
         extra_spec = {"spec1": "val2"}
@@ -55,7 +55,7 @@
                           self.volume_type['id'], str(uuid.uuid4()),
                           extra_spec)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_none_extra_spec_id(self):
         # Should not update volume type extra specs with none id.
         extra_spec = {"spec1": "val2"}
@@ -63,7 +63,7 @@
                           self.client.update_volume_type_extra_specs,
                           self.volume_type['id'], None, extra_spec)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_update_multiple_extra_spec(self):
         # Should not update volume type extra specs with multiple specs as
             # body.
@@ -73,7 +73,7 @@
                           self.volume_type['id'], extra_spec.keys()[0],
                           extra_spec)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_nonexistent_type_id(self):
         # Should not create volume type extra spec for nonexistent volume
             # type id.
@@ -82,21 +82,21 @@
                           self.client.create_volume_type_extra_specs,
                           str(uuid.uuid4()), extra_specs)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_none_body(self):
         # Should not create volume type extra spec for none POST body.
         self.assertRaises(exceptions.BadRequest,
                           self.client.create_volume_type_extra_specs,
                           self.volume_type['id'], None)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_invalid_body(self):
         # Should not create volume type extra spec for invalid POST body.
         self.assertRaises(exceptions.BadRequest,
                           self.client.create_volume_type_extra_specs,
                           self.volume_type['id'], ['invalid'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_nonexistent_volume_type_id(self):
         # Should not delete volume type extra spec for nonexistent
             # type id.
@@ -105,14 +105,14 @@
                           self.client.delete_volume_type_extra_specs,
                           str(uuid.uuid4()), extra_specs.keys()[0])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_nonexistent_volume_type_id(self):
         # Should not list volume type extra spec for nonexistent type id.
         self.assertRaises(exceptions.NotFound,
                           self.client.list_volume_types_extra_specs,
                           str(uuid.uuid4()))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_nonexistent_volume_type_id(self):
         # Should not get volume type extra spec for nonexistent type id.
         extra_specs = {"spec1": "val1"}
@@ -120,7 +120,7 @@
                           self.client.get_volume_type_extra_specs,
                           str(uuid.uuid4()), extra_specs.keys()[0])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_nonexistent_extra_spec_id(self):
         # Should not get volume type extra spec for nonexistent extra spec
             # id.
diff --git a/tempest/api/volume/admin/test_volume_types_negative.py b/tempest/api/volume/admin/test_volume_types_negative.py
index 56ad227..c18e15d 100644
--- a/tempest/api/volume/admin/test_volume_types_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_negative.py
@@ -17,13 +17,13 @@
 
 from tempest.api.volume import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class VolumeTypesNegativeTest(base.BaseVolumeV1AdminTest):
     _interface = 'json'
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_with_nonexistent_volume_type(self):
         # Should not be able to create volume with nonexistent volume_type.
         self.assertRaises(exceptions.NotFound,
@@ -31,19 +31,19 @@
                           display_name=str(uuid.uuid4()),
                           volume_type=str(uuid.uuid4()))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_with_empty_name(self):
         # Should not be able to create volume type with an empty name.
         self.assertRaises(exceptions.BadRequest,
                           self.client.create_volume_type, '')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_nonexistent_type_id(self):
         # Should not be able to get volume type with nonexistent type id.
         self.assertRaises(exceptions.NotFound, self.client.get_volume_type,
                           str(uuid.uuid4()))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_delete_nonexistent_type_id(self):
         # Should not be able to delete volume type with nonexistent type id.
         self.assertRaises(exceptions.NotFound, self.client.delete_volume_type,
diff --git a/tempest/api/volume/admin/test_volumes_actions.py b/tempest/api/volume/admin/test_volumes_actions.py
index 9274fce..aa00700 100644
--- a/tempest/api/volume/admin/test_volumes_actions.py
+++ b/tempest/api/volume/admin/test_volumes_actions.py
@@ -15,7 +15,7 @@
 
 from tempest.api.volume import base
 from tempest.common.utils import data_utils as utils
-from tempest.test import attr
+from tempest import test
 
 
 class VolumesActionsTest(base.BaseVolumeV1AdminTest):
@@ -75,7 +75,7 @@
         self.assertEqual(202, resp_delete.status)
         self.client.wait_for_resource_deletion(temp_volume['id'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_reset_status(self):
         # test volume reset status : available->error->available
         resp, body = self._reset_volume_status(self.volume['id'], 'error')
@@ -84,7 +84,7 @@
             self.volume['id'])
         self.assertEqual('error', volume_get['status'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_begin_detaching(self):
         # test volume begin detaching : available -> detaching -> available
         resp, body = self.client.volume_begin_detaching(self.volume['id'])
@@ -92,7 +92,7 @@
         resp_get, volume_get = self.client.get_volume(self.volume['id'])
         self.assertEqual('detaching', volume_get['status'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_roll_detaching(self):
         # test volume roll detaching : detaching -> in-use -> available
         resp, body = self.client.volume_begin_detaching(self.volume['id'])
@@ -110,7 +110,7 @@
         # test force delete when status of volume is attaching
         self._create_reset_and_force_delete_temp_volume('attaching')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_force_delete_when_volume_is_error(self):
         # test force delete when status of volume is error
         self._create_reset_and_force_delete_temp_volume('error')
diff --git a/tempest/api/volume/admin/test_volumes_backup.py b/tempest/api/volume/admin/test_volumes_backup.py
index 47094f0..cd6d7a8 100644
--- a/tempest/api/volume/admin/test_volumes_backup.py
+++ b/tempest/api/volume/admin/test_volumes_backup.py
@@ -13,7 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest.api.volume.base import BaseVolumeV1AdminTest
+from tempest.api.volume import base
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest.openstack.common import log as logging
@@ -23,7 +23,7 @@
 LOG = logging.getLogger(__name__)
 
 
-class VolumesBackupsTest(BaseVolumeV1AdminTest):
+class VolumesBackupsTest(base.BaseVolumeV1AdminTest):
     _interface = "json"
 
     @classmethod
@@ -38,7 +38,8 @@
         cls.volume = cls.create_volume()
 
     @test.attr(type='smoke')
-    def test_volume_backup_create_get_restore_delete(self):
+    def test_volume_backup_create_get_detailed_list_restore_delete(self):
+        # Create backup
         backup_name = data_utils.rand_name('Backup')
         create_backup = self.backups_adm_client.create_backup
         resp, backup = create_backup(self.volume['id'],
@@ -46,21 +47,31 @@
         self.assertEqual(202, resp.status)
         self.addCleanup(self.backups_adm_client.delete_backup,
                         backup['id'])
-        self.assertEqual(backup['name'], backup_name)
+        self.assertEqual(backup_name, backup['name'])
         self.volumes_adm_client.wait_for_volume_status(self.volume['id'],
                                                        'available')
         self.backups_adm_client.wait_for_backup_status(backup['id'],
                                                        'available')
 
+        # Get a given backup
         resp, backup = self.backups_adm_client.get_backup(backup['id'])
         self.assertEqual(200, resp.status)
-        self.assertEqual(backup['name'], backup_name)
+        self.assertEqual(backup_name, backup['name'])
 
+        # Get all backups with detail
+        resp, backups = self.backups_adm_client.list_backups_with_detail()
+        self.assertEqual(200, resp.status)
+        self.assertIn((backup['name'], backup['id']),
+                      [(m['name'], m['id']) for m in backups])
+
+        # Restore backup
         resp, restore = self.backups_adm_client.restore_backup(backup['id'])
         self.assertEqual(202, resp.status)
+
+        # Delete backup
         self.addCleanup(self.volumes_adm_client.delete_volume,
                         restore['volume_id'])
-        self.assertEqual(restore['backup_id'], backup['id'])
+        self.assertEqual(backup['id'], restore['backup_id'])
         self.backups_adm_client.wait_for_backup_status(backup['id'],
                                                        'available')
         self.volumes_adm_client.wait_for_volume_status(restore['volume_id'],
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index 8824977..2c6050c 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -145,6 +145,7 @@
             cls.os_adm = clients.AdminManager(interface=cls._interface)
         cls.client = cls.os_adm.volume_types_client
         cls.hosts_client = cls.os_adm.volume_hosts_client
+        cls.quotas_client = cls.os_adm.volume_quotas_client
 
 
 class BaseVolumeV2Test(BaseVolumeTest):
diff --git a/tempest/api/volume/test_extensions.py b/tempest/api/volume/test_extensions.py
index cceffd6..ce019a2 100644
--- a/tempest/api/volume/test_extensions.py
+++ b/tempest/api/volume/test_extensions.py
@@ -17,7 +17,7 @@
 from tempest.api.volume import base
 from tempest import config
 from tempest.openstack.common import log as logging
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -28,7 +28,7 @@
 class ExtensionsTestJSON(base.BaseVolumeV1Test):
     _interface = 'json'
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_extensions(self):
         # List of all extensions
         resp, extensions = self.volumes_extension_client.list_extensions()
diff --git a/tempest/api/volume/test_volume_transfers.py b/tempest/api/volume/test_volume_transfers.py
index f4b2d4c..55a72c1 100644
--- a/tempest/api/volume/test_volume_transfers.py
+++ b/tempest/api/volume/test_volume_transfers.py
@@ -18,7 +18,7 @@
 from tempest.api.volume import base
 from tempest import clients
 from tempest import config
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
@@ -66,7 +66,7 @@
         self.assertEqual(202, resp.status)
         self.adm_client.wait_for_resource_deletion(volume_id)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_get_list_accept_volume_transfer(self):
         # Create a volume first
         volume = self.create_volume()
diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
index 284c321..82924a5 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -18,7 +18,7 @@
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class VolumesNegativeTest(base.BaseVolumeV1Test):
@@ -33,19 +33,19 @@
         cls.volume = cls.create_volume()
         cls.mountpoint = "/dev/vdc"
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_volume_get_nonexistent_volume_id(self):
         # Should not be able to get a non-existent volume
         self.assertRaises(exceptions.NotFound, self.client.get_volume,
                           str(uuid.uuid4()))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_volume_delete_nonexistent_volume_id(self):
         # Should not be able to delete a non-existent Volume
         self.assertRaises(exceptions.NotFound, self.client.delete_volume,
                           str(uuid.uuid4()))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_create_volume_with_invalid_size(self):
         # Should not be able to create volume with invalid size
         # in request
@@ -54,7 +54,7 @@
         self.assertRaises(exceptions.BadRequest, self.client.create_volume,
                           size='#$%', display_name=v_name, metadata=metadata)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_create_volume_with_out_passing_size(self):
         # Should not be able to create volume without passing size
         # in request
@@ -63,7 +63,7 @@
         self.assertRaises(exceptions.BadRequest, self.client.create_volume,
                           size='', display_name=v_name, metadata=metadata)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_create_volume_with_size_zero(self):
         # Should not be able to create volume with size zero
         v_name = data_utils.rand_name('Volume-')
@@ -71,7 +71,7 @@
         self.assertRaises(exceptions.BadRequest, self.client.create_volume,
                           size='0', display_name=v_name, metadata=metadata)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_create_volume_with_size_negative(self):
         # Should not be able to create volume with size negative
         v_name = data_utils.rand_name('Volume-')
@@ -79,7 +79,7 @@
         self.assertRaises(exceptions.BadRequest, self.client.create_volume,
                           size='-1', display_name=v_name, metadata=metadata)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_create_volume_with_nonexistent_volume_type(self):
         # Should not be able to create volume with non-existent volume type
         v_name = data_utils.rand_name('Volume-')
@@ -88,7 +88,7 @@
                           size='1', volume_type=str(uuid.uuid4()),
                           display_name=v_name, metadata=metadata)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_create_volume_with_nonexistent_snapshot_id(self):
         # Should not be able to create volume with non-existent snapshot
         v_name = data_utils.rand_name('Volume-')
@@ -97,7 +97,7 @@
                           size='1', snapshot_id=str(uuid.uuid4()),
                           display_name=v_name, metadata=metadata)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_create_volume_with_nonexistent_source_volid(self):
         # Should not be able to create volume with non-existent source volume
         v_name = data_utils.rand_name('Volume-')
@@ -106,7 +106,7 @@
                           size='1', source_volid=str(uuid.uuid4()),
                           display_name=v_name, metadata=metadata)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_update_volume_with_nonexistent_volume_id(self):
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
@@ -114,7 +114,7 @@
                           volume_id=str(uuid.uuid4()), display_name=v_name,
                           metadata=metadata)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_update_volume_with_invalid_volume_id(self):
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
@@ -122,7 +122,7 @@
                           volume_id='#$%%&^&^', display_name=v_name,
                           metadata=metadata)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_update_volume_with_empty_volume_id(self):
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
@@ -130,29 +130,29 @@
                           volume_id='', display_name=v_name,
                           metadata=metadata)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_invalid_volume_id(self):
         # Should not be able to get volume with invalid id
         self.assertRaises(exceptions.NotFound, self.client.get_volume,
                           '#$%%&^&^')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_get_volume_without_passing_volume_id(self):
         # Should not be able to get volume when empty ID is passed
         self.assertRaises(exceptions.NotFound, self.client.get_volume, '')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_invalid_volume_id(self):
         # Should not be able to delete volume when invalid ID is passed
         self.assertRaises(exceptions.NotFound, self.client.delete_volume,
                           '!@#$%^&*()')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_delete_volume_without_passing_volume_id(self):
         # Should not be able to delete volume when empty ID is passed
         self.assertRaises(exceptions.NotFound, self.client.delete_volume, '')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_attach_volumes_with_nonexistent_volume_id(self):
         srv_name = data_utils.rand_name('Instance-')
         resp, server = self.servers_client.create_server(srv_name,
@@ -166,60 +166,60 @@
                           server['id'],
                           self.mountpoint)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_detach_volumes_with_invalid_volume_id(self):
         self.assertRaises(exceptions.NotFound,
                           self.client.detach_volume,
                           'xxx')
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_volume_extend_with_size_smaller_than_original_size(self):
         # Extend volume with smaller size than original size.
         extend_size = 0
         self.assertRaises(exceptions.BadRequest, self.client.extend_volume,
                           self.volume['id'], extend_size)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_volume_extend_with_non_number_size(self):
         # Extend volume when size is non number.
         extend_size = 'abc'
         self.assertRaises(exceptions.BadRequest, self.client.extend_volume,
                           self.volume['id'], extend_size)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_volume_extend_with_None_size(self):
         # Extend volume with None size.
         extend_size = None
         self.assertRaises(exceptions.BadRequest, self.client.extend_volume,
                           self.volume['id'], extend_size)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_volume_extend_with_nonexistent_volume_id(self):
         # Extend volume size when volume is nonexistent.
         extend_size = int(self.volume['size']) + 1
         self.assertRaises(exceptions.NotFound, self.client.extend_volume,
                           str(uuid.uuid4()), extend_size)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_volume_extend_without_passing_volume_id(self):
         # Extend volume size when passing volume id is None.
         extend_size = int(self.volume['size']) + 1
         self.assertRaises(exceptions.NotFound, self.client.extend_volume,
                           None, extend_size)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_reserve_volume_with_nonexistent_volume_id(self):
         self.assertRaises(exceptions.NotFound,
                           self.client.reserve_volume,
                           str(uuid.uuid4()))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_unreserve_volume_with_nonexistent_volume_id(self):
         self.assertRaises(exceptions.NotFound,
                           self.client.unreserve_volume,
                           str(uuid.uuid4()))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_reserve_volume_with_negative_volume_status(self):
         # Mark volume as reserved.
         resp, body = self.client.reserve_volume(self.volume['id'])
@@ -232,7 +232,7 @@
         resp, body = self.client.unreserve_volume(self.volume['id'])
         self.assertEqual(202, resp.status)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_volumes_with_nonexistent_name(self):
         v_name = data_utils.rand_name('Volume-')
         params = {'display_name': v_name}
@@ -240,7 +240,7 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(0, len(fetched_volume))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_volumes_detail_with_nonexistent_name(self):
         v_name = data_utils.rand_name('Volume-')
         params = {'display_name': v_name}
@@ -248,14 +248,14 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(0, len(fetched_volume))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_volumes_with_invalid_status(self):
         params = {'status': 'null'}
         resp, fetched_volume = self.client.list_volumes(params)
         self.assertEqual(200, resp.status)
         self.assertEqual(0, len(fetched_volume))
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_list_volumes_detail_with_invalid_status(self):
         params = {'status': 'null'}
         resp, fetched_volume = self.client.list_volumes_with_detail(params)
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
index 56915e6..2701e84 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -14,7 +14,7 @@
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest.openstack.common import log as logging
-from tempest.test import attr
+from tempest import test
 
 LOG = logging.getLogger(__name__)
 CONF = config.CONF
@@ -63,7 +63,7 @@
                       ('details' if with_detail else '', key)
                 self.assertEqual(params[key], snap[key], msg)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_snapshot_create_with_volume_in_use(self):
         # Create a snapshot when volume status is in-use
         # Create a test instance
@@ -89,7 +89,7 @@
         self.snapshots_client.wait_for_resource_deletion(snapshot['id'])
         self.snapshots.remove(snapshot)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_snapshot_create_get_list_update_delete(self):
         # Create a snapshot
         s_name = data_utils.rand_name('snap')
@@ -134,7 +134,7 @@
         self.snapshots_client.wait_for_resource_deletion(snapshot['id'])
         self.snapshots.remove(snapshot)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_snapshots_list_with_params(self):
         """list snapshots with params."""
         # Create a snapshot
@@ -155,7 +155,7 @@
                   'display_name': snapshot['display_name']}
         self._list_by_param_values_and_assert(params)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_snapshots_list_details_with_params(self):
         """list snapshot details with params."""
         # Create a snapshot
@@ -174,7 +174,7 @@
                   'display_name': snapshot['display_name']}
         self._list_by_param_values_and_assert(params, with_detail=True)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_from_snapshot(self):
         # Create a temporary snap using wrapper method from base, then
         # create a snap based volume, check resp code and deletes it
diff --git a/tempest/api/volume/test_volumes_snapshots_negative.py b/tempest/api/volume/test_volumes_snapshots_negative.py
index b24b597..9e47c03 100644
--- a/tempest/api/volume/test_volumes_snapshots_negative.py
+++ b/tempest/api/volume/test_volumes_snapshots_negative.py
@@ -15,13 +15,13 @@
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class VolumesSnapshotNegativeTest(base.BaseVolumeV1Test):
     _interface = "json"
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_create_snapshot_with_nonexistent_volume_id(self):
         # Create a snapshot with nonexistent volume id
         s_name = data_utils.rand_name('snap')
@@ -29,7 +29,7 @@
                           self.snapshots_client.create_snapshot,
                           str(uuid.uuid4()), display_name=s_name)
 
-    @attr(type=['negative', 'gate'])
+    @test.attr(type=['negative', 'gate'])
     def test_create_snapshot_without_passing_volume_id(self):
         # Create a snapshot without passing volume id
         s_name = data_utils.rand_name('snap')
diff --git a/tempest/api/volume/v2/test_volumes_list.py b/tempest/api/volume/v2/test_volumes_list.py
index d0e8b99..0e91371 100644
--- a/tempest/api/volume/v2/test_volumes_list.py
+++ b/tempest/api/volume/v2/test_volumes_list.py
@@ -18,8 +18,8 @@
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
 from tempest.openstack.common import log as logging
-from tempest.test import attr
-from testtools.matchers import ContainsAll
+from tempest import test
+from testtools import matchers
 
 LOG = logging.getLogger(__name__)
 
@@ -116,12 +116,12 @@
                           ('details' if with_detail else '', key)
                     if key == 'metadata':
                         self.assertThat(volume[key].items(),
-                                        ContainsAll(params[key].items()),
-                                        msg)
+                                        matchers.ContainsAll(params[key]
+                                        .items()), msg)
                     else:
                         self.assertEqual(params[key], volume[key], msg)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_volume_list(self):
         # Get a list of Volumes
         # Fetch all volumes
@@ -130,7 +130,7 @@
         self.assertVolumesIn(fetched_list, self.volume_list,
                              fields=VOLUME_FIELDS)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_list_with_details(self):
         # Get a list of Volumes with details
         # Fetch all Volumes
@@ -138,7 +138,7 @@
         self.assertEqual(200, resp.status)
         self.assertVolumesIn(fetched_list, self.volume_list)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_list_by_name(self):
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         params = {'name': volume['name']}
@@ -147,7 +147,7 @@
         self.assertEqual(1, len(fetched_vol), str(fetched_vol))
         self.assertEqual(fetched_vol[0]['name'], volume['name'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_list_details_by_name(self):
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         params = {'name': volume['name']}
@@ -156,43 +156,43 @@
         self.assertEqual(1, len(fetched_vol), str(fetched_vol))
         self.assertEqual(fetched_vol[0]['name'], volume['name'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volumes_list_by_status(self):
         params = {'status': 'available'}
         self._list_by_param_value_and_assert(params)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volumes_list_details_by_status(self):
         params = {'status': 'available'}
         self._list_by_param_value_and_assert(params, with_detail=True)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volumes_list_by_availability_zone(self):
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         zone = volume['availability_zone']
         params = {'availability_zone': zone}
         self._list_by_param_value_and_assert(params)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volumes_list_details_by_availability_zone(self):
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         zone = volume['availability_zone']
         params = {'availability_zone': zone}
         self._list_by_param_value_and_assert(params, with_detail=True)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_list_with_param_metadata(self):
         # Test to list volumes when metadata param is given
         params = {'metadata': self.metadata}
         self._list_by_param_value_and_assert(params)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_list_with_detail_param_metadata(self):
         # Test to list volumes details when metadata param is given
         params = {'metadata': self.metadata}
         self._list_by_param_value_and_assert(params, with_detail=True)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_list_param_display_name_and_status(self):
         # Test to list volume when display name and status param is given
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
@@ -200,7 +200,7 @@
                   'status': 'available'}
         self._list_by_param_value_and_assert(params, expected_list=[volume])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_volume_list_with_detail_param_display_name_and_status(self):
         # Test to list volume when name and status param is given
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
diff --git a/tempest/auth.py b/tempest/auth.py
index 8cb3b2c..0e45161 100644
--- a/tempest/auth.py
+++ b/tempest/auth.py
@@ -14,11 +14,11 @@
 #    under the License.
 
 import copy
+import datetime
 import exceptions
 import re
 import urlparse
 
-from datetime import datetime
 from tempest import config
 from tempest.services.identity.json import identity_client as json_id
 from tempest.services.identity.v3.json import identity_client as json_v3id
@@ -291,9 +291,9 @@
 
     def is_expired(self, auth_data):
         _, access = auth_data
-        expiry = datetime.strptime(access['token']['expires'],
-                                   self.EXPIRY_DATE_FORMAT)
-        return expiry <= datetime.now()
+        expiry = datetime.datetime.strptime(access['token']['expires'],
+                                            self.EXPIRY_DATE_FORMAT)
+        return expiry <= datetime.datetime.now()
 
 
 class KeystoneV3AuthProvider(KeystoneAuthProvider):
@@ -391,6 +391,6 @@
 
     def is_expired(self, auth_data):
         _, access = auth_data
-        expiry = datetime.strptime(access['expires_at'],
-                                   self.EXPIRY_DATE_FORMAT)
-        return expiry <= datetime.now()
+        expiry = datetime.datetime.strptime(access['expires_at'],
+                                            self.EXPIRY_DATE_FORMAT)
+        return expiry <= datetime.datetime.now()
diff --git a/tempest/cli/simple_read_only/test_nova.py b/tempest/cli/simple_read_only/test_nova.py
index b0264d0..d0b6028 100644
--- a/tempest/cli/simple_read_only/test_nova.py
+++ b/tempest/cli/simple_read_only/test_nova.py
@@ -154,12 +154,18 @@
     def test_admin_usage_list(self):
         self.nova('usage-list')
 
+    @testtools.skipIf(not CONF.service_available.cinder,
+                      "Skipped as Cinder is not available")
     def test_admin_volume_list(self):
         self.nova('volume-list')
 
+    @testtools.skipIf(not CONF.service_available.cinder,
+                      "Skipped as Cinder is not available")
     def test_admin_volume_snapshot_list(self):
         self.nova('volume-snapshot-list')
 
+    @testtools.skipIf(not CONF.service_available.cinder,
+                      "Skipped as Cinder is not available")
     def test_admin_volume_type_list(self):
         self.nova('volume-type-list')
 
diff --git a/tempest/clients.py b/tempest/clients.py
index 8db399a..ab7deb0 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -114,6 +114,8 @@
 from tempest.services.compute.xml.volumes_extensions_client import \
     VolumesExtensionsClientXML
 from tempest.services.data_processing.v1_1.client import DataProcessingClient
+from tempest.services.database.json.flavors_client import \
+    DatabaseFlavorsClientJSON
 from tempest.services.identity.json.identity_client import IdentityClientJSON
 from tempest.services.identity.json.identity_client import TokenClientJSON
 from tempest.services.identity.v3.json.credentials_client import \
@@ -150,12 +152,15 @@
     ObjectClientCustomizedHeader
 from tempest.services.orchestration.json.orchestration_client import \
     OrchestrationClient
+from tempest.services.queuing.json.queuing_client import QueuingClientJSON
 from tempest.services.telemetry.json.telemetry_client import \
     TelemetryClientJSON
 from tempest.services.telemetry.xml.telemetry_client import \
     TelemetryClientXML
 from tempest.services.volume.json.admin.volume_hosts_client import \
     VolumeHostsClientJSON
+from tempest.services.volume.json.admin.volume_quotas_client import \
+    VolumeQuotasClientJSON
 from tempest.services.volume.json.admin.volume_types_client import \
     VolumeTypesClientJSON
 from tempest.services.volume.json.backups_client import BackupsClientJSON
@@ -167,6 +172,8 @@
 from tempest.services.volume.v2.xml.volumes_client import VolumesV2ClientXML
 from tempest.services.volume.xml.admin.volume_hosts_client import \
     VolumeHostsClientXML
+from tempest.services.volume.xml.admin.volume_quotas_client import \
+    VolumeQuotasClientXML
 from tempest.services.volume.xml.admin.volume_types_client import \
     VolumeTypesClientXML
 from tempest.services.volume.xml.backups_client import BackupsClientXML
@@ -247,6 +254,8 @@
                 InstanceUsagesAuditLogClientXML(self.auth_provider)
             self.volume_hosts_client = VolumeHostsClientXML(
                 self.auth_provider)
+            self.volume_quotas_client = VolumeQuotasClientXML(
+                self.auth_provider)
             self.volumes_extension_client = VolumeExtensionClientXML(
                 self.auth_provider)
             if CONF.service_available.ceilometer:
@@ -327,9 +336,14 @@
                 InstanceUsagesAuditLogClientJSON(self.auth_provider)
             self.volume_hosts_client = VolumeHostsClientJSON(
                 self.auth_provider)
+            self.volume_quotas_client = VolumeQuotasClientJSON(
+                self.auth_provider)
             self.volumes_extension_client = VolumeExtensionClientJSON(
                 self.auth_provider)
             self.hosts_v3_client = HostsV3ClientJSON(self.auth_provider)
+            self.database_flavors_client = DatabaseFlavorsClientJSON(
+                self.auth_provider)
+            self.queuing_client = QueuingClientJSON(self.auth_provider)
             if CONF.service_available.ceilometer:
                 self.telemetry_client = TelemetryClientJSON(
                     self.auth_provider)
diff --git a/tempest/common/generate_json.py b/tempest/common/generate_json.py
deleted file mode 100644
index c8e86dc..0000000
--- a/tempest/common/generate_json.py
+++ /dev/null
@@ -1,265 +0,0 @@
-# Copyright 2014 Red Hat, Inc. & Deutsche Telekom AG
-# All Rights Reserved.
-#
-#    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 copy
-import jsonschema
-
-from tempest.openstack.common import log as logging
-
-LOG = logging.getLogger(__name__)
-
-
-def generate_valid(schema):
-    """
-    Create a valid dictionary based on the types in a json schema.
-    """
-    LOG.debug("generate_valid: %s" % schema)
-    schema_type = schema["type"]
-    if isinstance(schema_type, list):
-        # Just choose the first one since all are valid.
-        schema_type = schema_type[0]
-    return type_map_valid[schema_type](schema)
-
-
-def generate_valid_string(schema):
-    size = schema.get("minLength", 0)
-    # TODO(dkr mko): handle format and pattern
-    return "x" * size
-
-
-def generate_valid_integer(schema):
-    # TODO(dkr mko): handle multipleOf
-    if "minimum" in schema:
-        minimum = schema["minimum"]
-        if "exclusiveMinimum" not in schema:
-            return minimum
-        else:
-            return minimum + 1
-    if "maximum" in schema:
-        maximum = schema["maximum"]
-        if "exclusiveMaximum" not in schema:
-            return maximum
-        else:
-            return maximum - 1
-    return 0
-
-
-def generate_valid_object(schema):
-    obj = {}
-    for k, v in schema["properties"].iteritems():
-        obj[k] = generate_valid(v)
-    return obj
-
-
-def generate_invalid(schema):
-    """
-    Generate an invalid json dictionary based on a schema.
-    Only one value is mis-generated for each dictionary created.
-
-    Any generator must return a list of tuples or a single tuple.
-    The values of this tuple are:
-      result[0]: Name of the test
-      result[1]: json schema for the test
-      result[2]: expected result of the test (can be None)
-    """
-    LOG.debug("generate_invalid: %s" % schema)
-    schema_type = schema["type"]
-    if isinstance(schema_type, list):
-        if "integer" in schema_type:
-            schema_type = "integer"
-        else:
-            raise Exception("non-integer list types not supported")
-    result = []
-    for generator in type_map_invalid[schema_type]:
-        ret = generator(schema)
-        if ret is not None:
-            if isinstance(ret, list):
-                result.extend(ret)
-            elif isinstance(ret, tuple):
-                result.append(ret)
-            else:
-                raise Exception("generator (%s) returns invalid result"
-                                % generator)
-    LOG.debug("result: %s" % result)
-    return result
-
-
-def _check_for_expected_result(name, schema):
-    expected_result = None
-    if "results" in schema:
-        if name in schema["results"]:
-            expected_result = schema["results"][name]
-    return expected_result
-
-
-def generator(fn):
-    """
-    Decorator for simple generators that simply return one value
-    """
-    def wrapped(schema):
-        result = fn(schema)
-        if result is not None:
-            expected_result = _check_for_expected_result(fn.__name__, schema)
-            return (fn.__name__, result, expected_result)
-        return
-    return wrapped
-
-
-@generator
-def gen_int(_):
-    return 4
-
-
-@generator
-def gen_string(_):
-    return "XXXXXX"
-
-
-def gen_none(schema):
-    # Note(mkoderer): it's not using the decorator otherwise it'd be filtered
-    expected_result = _check_for_expected_result('gen_none', schema)
-    return ('gen_none', None, expected_result)
-
-
-@generator
-def gen_str_min_length(schema):
-    min_length = schema.get("minLength", 0)
-    if min_length > 0:
-        return "x" * (min_length - 1)
-
-
-@generator
-def gen_str_max_length(schema):
-    max_length = schema.get("maxLength", -1)
-    if max_length > -1:
-        return "x" * (max_length + 1)
-
-
-@generator
-def gen_int_min(schema):
-    if "minimum" in schema:
-        minimum = schema["minimum"]
-        if "exclusiveMinimum" not in schema:
-            minimum -= 1
-        return minimum
-
-
-@generator
-def gen_int_max(schema):
-    if "maximum" in schema:
-        maximum = schema["maximum"]
-        if "exclusiveMaximum" not in schema:
-            maximum += 1
-        return maximum
-
-
-def gen_obj_remove_attr(schema):
-    invalids = []
-    valid = generate_valid(schema)
-    required = schema.get("required", [])
-    for r in required:
-        new_valid = copy.deepcopy(valid)
-        del new_valid[r]
-        invalids.append(("gen_obj_remove_attr", new_valid, None))
-    return invalids
-
-
-@generator
-def gen_obj_add_attr(schema):
-    valid = generate_valid(schema)
-    if not schema.get("additionalProperties", True):
-        new_valid = copy.deepcopy(valid)
-        new_valid["$$$$$$$$$$"] = "xxx"
-        return new_valid
-
-
-def gen_inv_prop_obj(schema):
-    LOG.debug("generate_invalid_object: %s" % schema)
-    valid = generate_valid(schema)
-    invalids = []
-    properties = schema["properties"]
-
-    for k, v in properties.iteritems():
-        for invalid in generate_invalid(v):
-            LOG.debug(v)
-            new_valid = copy.deepcopy(valid)
-            new_valid[k] = invalid[1]
-            name = "prop_%s_%s" % (k, invalid[0])
-            invalids.append((name, new_valid, invalid[2]))
-
-    LOG.debug("generate_invalid_object return: %s" % invalids)
-    return invalids
-
-
-type_map_valid = {
-    "string": generate_valid_string,
-    "integer": generate_valid_integer,
-    "object": generate_valid_object
-}
-
-type_map_invalid = {
-    "string": [
-        gen_int,
-        gen_none,
-        gen_str_min_length,
-        gen_str_max_length],
-    "integer": [
-        gen_string,
-        gen_none,
-        gen_int_min,
-        gen_int_max],
-    "object": [
-        gen_obj_remove_attr,
-        gen_obj_add_attr,
-        gen_inv_prop_obj]
-}
-
-schema = {
-    "type": "object",
-    "properties": {
-        "name": {"type": "string"},
-        "http-method": {
-            "enum": ["GET", "PUT", "HEAD",
-                     "POST", "PATCH", "DELETE", 'COPY']
-        },
-        "url": {"type": "string"},
-        "json-schema": jsonschema._utils.load_schema("draft4"),
-        "resources": {
-            "type": "array",
-            "items": {
-                "oneOf": [
-                    {"type": "string"},
-                    {
-                        "type": "object",
-                        "properties": {
-                            "name": {"type": "string"},
-                            "expected_result": {"type": "integer"}
-                        }
-                    }
-                ]
-            }
-        },
-        "results": {
-            "type": "object",
-            "properties": {}
-        }
-    },
-    "required": ["name", "http-method", "url"],
-    "additionalProperties": False,
-}
-
-
-def validate_negative_test_schema(nts):
-    jsonschema.validate(nts, schema)
diff --git a/tempest/common/generator/__init__.py b/tempest/common/generator/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/common/generator/__init__.py
diff --git a/tempest/common/generator/base_generator.py b/tempest/common/generator/base_generator.py
new file mode 100644
index 0000000..35f8158
--- /dev/null
+++ b/tempest/common/generator/base_generator.py
@@ -0,0 +1,141 @@
+# Copyright 2014 Deutsche Telekom AG
+# All Rights Reserved.
+#
+#    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 jsonschema
+
+from tempest.openstack.common import log as logging
+
+LOG = logging.getLogger(__name__)
+
+
+def _check_for_expected_result(name, schema):
+    expected_result = None
+    if "results" in schema:
+        if name in schema["results"]:
+            expected_result = schema["results"][name]
+    return expected_result
+
+
+def generator_type(*args):
+    def wrapper(func):
+        func.types = args
+        return func
+    return wrapper
+
+
+def simple_generator(fn):
+    """
+    Decorator for simple generators that return one value
+    """
+    def wrapped(self, schema):
+        result = fn(self, schema)
+        if result is not None:
+            expected_result = _check_for_expected_result(fn.__name__, schema)
+            return (fn.__name__, result, expected_result)
+        return
+    return wrapped
+
+
+class BasicGeneratorSet(object):
+    _instance = None
+
+    schema = {
+        "type": "object",
+        "properties": {
+            "name": {"type": "string"},
+            "http-method": {
+                "enum": ["GET", "PUT", "HEAD",
+                         "POST", "PATCH", "DELETE", 'COPY']
+            },
+            "url": {"type": "string"},
+            "json-schema": jsonschema._utils.load_schema("draft4"),
+            "resources": {
+                "type": "array",
+                "items": {
+                    "oneOf": [
+                        {"type": "string"},
+                        {
+                            "type": "object",
+                            "properties": {
+                                "name": {"type": "string"},
+                                "expected_result": {"type": "integer"}
+                            }
+                        }
+                    ]
+                }
+            },
+            "results": {
+                "type": "object",
+                "properties": {}
+            }
+        },
+        "required": ["name", "http-method", "url"],
+        "additionalProperties": False,
+    }
+
+    def __new__(cls, *args, **kwargs):
+        if not cls._instance:
+            cls._instance = super(BasicGeneratorSet, cls).__new__(cls, *args,
+                                                                  **kwargs)
+        return cls._instance
+
+    def __init__(self):
+        self.types_dict = {}
+        for m in dir(self):
+            if callable(getattr(self, m)) and not'__' in m:
+                method = getattr(self, m)
+                if hasattr(method, "types"):
+                    for type in method.types:
+                        if type not in self.types_dict:
+                            self.types_dict[type] = []
+                        self.types_dict[type].append(method)
+
+    def validate_schema(self, schema):
+        jsonschema.validate(schema, self.schema)
+
+    def generate(self, schema):
+        """
+        Generate an json dictionary based on a schema.
+        Only one value is mis-generated for each dictionary created.
+
+        Any generator must return a list of tuples or a single tuple.
+        The values of this tuple are:
+          result[0]: Name of the test
+          result[1]: json schema for the test
+          result[2]: expected result of the test (can be None)
+        """
+        LOG.debug("generate_invalid: %s" % schema)
+        schema_type = schema["type"]
+        if isinstance(schema_type, list):
+            if "integer" in schema_type:
+                schema_type = "integer"
+            else:
+                raise Exception("non-integer list types not supported")
+        result = []
+        if schema_type not in self.types_dict:
+            raise Exception("generator (%s) doesn't support type: %s"
+                            % (self.__class__.__name__, schema_type))
+        for generator in self.types_dict[schema_type]:
+            ret = generator(schema)
+            if ret is not None:
+                if isinstance(ret, list):
+                    result.extend(ret)
+                elif isinstance(ret, tuple):
+                    result.append(ret)
+                else:
+                    raise Exception("generator (%s) returns invalid result: %s"
+                                    % (generator, ret))
+        LOG.debug("result: %s" % result)
+        return result
diff --git a/tempest/common/generator/negative_generator.py b/tempest/common/generator/negative_generator.py
new file mode 100644
index 0000000..4f3d2cd
--- /dev/null
+++ b/tempest/common/generator/negative_generator.py
@@ -0,0 +1,111 @@
+# Copyright 2014 Deutsche Telekom AG
+# All Rights Reserved.
+#
+#    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 copy
+
+import tempest.common.generator.base_generator as base
+import tempest.common.generator.valid_generator as valid
+from tempest.openstack.common import log as logging
+
+LOG = logging.getLogger(__name__)
+
+
+class NegativeTestGenerator(base.BasicGeneratorSet):
+    @base.generator_type("string")
+    @base.simple_generator
+    def gen_int(self, _):
+        return 4
+
+    @base.generator_type("integer")
+    @base.simple_generator
+    def gen_string(self, _):
+        return "XXXXXX"
+
+    @base.generator_type("integer", "string")
+    def gen_none(self, schema):
+        # Note(mkoderer): it's not using the decorator otherwise it'd be
+        # filtered
+        expected_result = base._check_for_expected_result('gen_none', schema)
+        return ('gen_none', None, expected_result)
+
+    @base.generator_type("string")
+    @base.simple_generator
+    def gen_str_min_length(self, schema):
+        min_length = schema.get("minLength", 0)
+        if min_length > 0:
+            return "x" * (min_length - 1)
+
+    @base.generator_type("string")
+    @base.simple_generator
+    def gen_str_max_length(self, schema):
+        max_length = schema.get("maxLength", -1)
+        if max_length > -1:
+            return "x" * (max_length + 1)
+
+    @base.generator_type("integer")
+    @base.simple_generator
+    def gen_int_min(self, schema):
+        if "minimum" in schema:
+            minimum = schema["minimum"]
+            if "exclusiveMinimum" not in schema:
+                minimum -= 1
+            return minimum
+
+    @base.generator_type("integer")
+    @base.simple_generator
+    def gen_int_max(self, schema):
+        if "maximum" in schema:
+            maximum = schema["maximum"]
+            if "exclusiveMaximum" not in schema:
+                maximum += 1
+            return maximum
+
+    @base.generator_type("object")
+    def gen_obj_remove_attr(self, schema):
+        invalids = []
+        valid_schema = valid.ValidTestGenerator().generate_valid(schema)
+        required = schema.get("required", [])
+        for r in required:
+            new_valid = copy.deepcopy(valid_schema)
+            del new_valid[r]
+            invalids.append(("gen_obj_remove_attr", new_valid, None))
+        return invalids
+
+    @base.generator_type("object")
+    @base.simple_generator
+    def gen_obj_add_attr(self, schema):
+        valid_schema = valid.ValidTestGenerator().generate_valid(schema)
+        if not schema.get("additionalProperties", True):
+            new_valid = copy.deepcopy(valid_schema)
+            new_valid["$$$$$$$$$$"] = "xxx"
+            return new_valid
+
+    @base.generator_type("object")
+    def gen_inv_prop_obj(self, schema):
+        LOG.debug("generate_invalid_object: %s" % schema)
+        valid_schema = valid.ValidTestGenerator().generate_valid(schema)
+        invalids = []
+        properties = schema["properties"]
+
+        for k, v in properties.iteritems():
+            for invalid in self.generate(v):
+                LOG.debug(v)
+                new_valid = copy.deepcopy(valid_schema)
+                new_valid[k] = invalid[1]
+                name = "prop_%s_%s" % (k, invalid[0])
+                invalids.append((name, new_valid, invalid[2]))
+
+        LOG.debug("generate_invalid_object return: %s" % invalids)
+        return invalids
diff --git a/tempest/common/generator/valid_generator.py b/tempest/common/generator/valid_generator.py
new file mode 100644
index 0000000..a99bbc0
--- /dev/null
+++ b/tempest/common/generator/valid_generator.py
@@ -0,0 +1,58 @@
+# Copyright 2014 Deutsche Telekom AG
+# All Rights Reserved.
+#
+#    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 tempest.common.generator.base_generator as base
+from tempest.openstack.common import log as logging
+
+
+LOG = logging.getLogger(__name__)
+
+
+class ValidTestGenerator(base.BasicGeneratorSet):
+    @base.generator_type("string")
+    @base.simple_generator
+    def generate_valid_string(self, schema):
+        size = schema.get("minLength", 0)
+        # TODO(dkr mko): handle format and pattern
+        return "x" * size
+
+    @base.generator_type("integer")
+    @base.simple_generator
+    def generate_valid_integer(self, schema):
+        # TODO(dkr mko): handle multipleOf
+        if "minimum" in schema:
+            minimum = schema["minimum"]
+            if "exclusiveMinimum" not in schema:
+                return minimum
+            else:
+                return minimum + 1
+        if "maximum" in schema:
+            maximum = schema["maximum"]
+            if "exclusiveMaximum" not in schema:
+                return maximum
+            else:
+                return maximum - 1
+        return 0
+
+    @base.generator_type("object")
+    @base.simple_generator
+    def generate_valid_object(self, schema):
+        obj = {}
+        for k, v in schema["properties"].iteritems():
+            obj[k] = self.generate_valid(v)
+        return obj
+
+    def generate_valid(self, schema):
+        return self.generate(schema)[0][1]
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index 03dccd4..36ddb40 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -25,7 +25,7 @@
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common import log as logging
-from tempest.services.compute.xml.common import xml_to_json
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -299,11 +299,11 @@
                 # Parse list-like xmls (users, roles, etc)
                 array = []
                 for child in element.getchildren():
-                    array.append(xml_to_json(child))
+                    array.append(common.xml_to_json(child))
                 return array
 
             # Parse one-item-like xmls (user, role, etc)
-            return xml_to_json(element)
+            return common.xml_to_json(element)
 
     def response_checker(self, method, url, headers, body, resp, resp_body):
         if (resp.status in set((204, 205, 304)) or resp.status < 200 or
@@ -409,7 +409,7 @@
         elif ctype.lower() in TXT_ENC:
             parse_resp = False
         else:
-            raise exceptions.RestClientException(str(resp.status))
+            raise exceptions.InvalidContentType(str(resp.status))
 
         if resp.status == 401 or resp.status == 403:
             raise exceptions.Unauthorized()
@@ -451,25 +451,26 @@
                     # exception.
                     raise exceptions.InvalidHTTPResponseBody(message)
                 else:
-                    # I'm seeing both computeFault
-                    # and cloudServersFault come back.
-                    # Will file a bug to fix, but leave as is for now.
-                    if 'cloudServersFault' in resp_body:
-                        message = resp_body['cloudServersFault']['message']
-                    elif 'computeFault' in resp_body:
-                        message = resp_body['computeFault']['message']
-                    elif 'error' in resp_body:  # Keystone errors
-                        message = resp_body['error']['message']
-                        raise exceptions.IdentityError(message)
-                    elif 'message' in resp_body:
-                        message = resp_body['message']
+                    if isinstance(resp_body, dict):
+                        # I'm seeing both computeFault
+                        # and cloudServersFault come back.
+                        # Will file a bug to fix, but leave as is for now.
+                        if 'cloudServersFault' in resp_body:
+                            message = resp_body['cloudServersFault']['message']
+                        elif 'computeFault' in resp_body:
+                            message = resp_body['computeFault']['message']
+                        elif 'error' in resp_body:  # Keystone errors
+                            message = resp_body['error']['message']
+                            raise exceptions.IdentityError(message)
+                        elif 'message' in resp_body:
+                            message = resp_body['message']
+                    else:
+                        message = resp_body
 
             raise exceptions.ServerFault(message)
 
         if resp.status >= 400:
-            if parse_resp:
-                resp_body = self._parse_resp(resp_body)
-            raise exceptions.RestClientException(str(resp.status))
+            raise exceptions.UnexpectedResponseCode(str(resp.status))
 
     def is_absolute_limit(self, resp, resp_body):
         if (not isinstance(resp_body, collections.Mapping) or
diff --git a/tempest/common/utils/data_utils.py b/tempest/common/utils/data_utils.py
index cd32720..a0a88dd 100644
--- a/tempest/common/utils/data_utils.py
+++ b/tempest/common/utils/data_utils.py
@@ -15,12 +15,8 @@
 
 import itertools
 import random
-import re
-import urllib
 import uuid
 
-from tempest import exceptions
-
 
 def rand_uuid():
     return str(uuid.uuid4())
@@ -57,37 +53,6 @@
     return ':'.join(["%02x" % x for x in mac])
 
 
-def build_url(host, port, api_version=None, path=None,
-              params=None, use_ssl=False):
-    """Build the request URL from given host, port, path and parameters."""
-
-    pattern = 'v\d\.\d'
-    if re.match(pattern, path):
-        message = 'Version should not be included in path.'
-        raise exceptions.InvalidConfiguration(message=message)
-
-    if use_ssl:
-        url = "https://" + host
-    else:
-        url = "http://" + host
-
-    if port is not None:
-        url += ":" + port
-    url += "/"
-
-    if api_version is not None:
-        url += api_version + "/"
-
-    if path is not None:
-        url += path
-
-    if params is not None:
-        url += "?"
-        url += urllib.urlencode(params)
-
-    return url
-
-
 def parse_image_id(image_ref):
     """Return the image id from a given image ref."""
     return image_ref.rsplit('/')[-1]
diff --git a/tempest/config.py b/tempest/config.py
index 0f5e23c..46dcbcc 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -348,9 +348,6 @@
     cfg.IntOpt('tenant_network_mask_bits',
                default=28,
                help="The mask bits for tenant ipv4 subnets"),
-    cfg.BoolOpt('ipv6_enabled',
-                default=True,
-                help="Allow the execution of IPv6 tests"),
     cfg.StrOpt('tenant_network_v6_cidr',
                default="2003::/64",
                help="The cidr block to allocate tenant ipv6 subnets from"),
@@ -375,12 +372,24 @@
                                      title='Enabled network service features')
 
 NetworkFeaturesGroup = [
+    cfg.BoolOpt('ipv6',
+                default=True,
+                help="Allow the execution of IPv6 tests"),
     cfg.ListOpt('api_extensions',
                 default=['all'],
                 help='A list of enabled network extensions with a special '
                      'entry all which indicates every extension is enabled'),
 ]
 
+queuing_group = cfg.OptGroup(name='queuing',
+                             title='Queuing Service')
+
+QueuingGroup = [
+    cfg.StrOpt('catalog_type',
+               default='queuing',
+               help='Catalog type of the Queuing service.'),
+]
+
 volume_group = cfg.OptGroup(name='volume',
                             title='Block Storage Options')
 
@@ -493,6 +502,17 @@
                      "features are expected to be enabled"),
 ]
 
+database_group = cfg.OptGroup(name='database',
+                              title='Database Service Options')
+
+DatabaseGroup = [
+    cfg.StrOpt('catalog_type',
+               default='database',
+               help="Catalog type of the Database service."),
+    cfg.StrOpt('db_flavor_ref',
+               default="1",
+               help="Valid primary flavor to use in database tests."),
+]
 
 orchestration_group = cfg.OptGroup(name='orchestration',
                                    title='Orchestration Service Options')
@@ -522,7 +542,7 @@
                default=1,
                help="Time in seconds between build status checks."),
     cfg.IntOpt('build_timeout',
-               default=300,
+               default=600,
                help="Timeout in seconds to wait for a stack to build."),
     cfg.StrOpt('instance_type',
                default='m1.micro',
@@ -739,6 +759,12 @@
     cfg.BoolOpt('ironic',
                 default=False,
                 help="Whether or not Ironic is expected to be available"),
+    cfg.BoolOpt('trove',
+                default=False,
+                help="Whether or not Trove is expected to be available"),
+    cfg.BoolOpt('marconi',
+                default=False,
+                help="Whether or not Marconi is expected to be available"),
 ]
 
 debug_group = cfg.OptGroup(name="debug",
@@ -806,6 +832,15 @@
                help="Number of seconds to wait on a CLI timeout"),
 ]
 
+negative_group = cfg.OptGroup(name='negative', title="Negative Test Options")
+
+NegativeGroup = [
+    cfg.StrOpt('test_generator',
+               default='tempest.common.' +
+               'generator.negative_generator.NegativeTestGenerator',
+               help="Test generator class for all negative tests"),
+]
+
 
 def register_opts():
     register_opt_group(cfg.CONF, compute_group, ComputeGroup)
@@ -819,12 +854,14 @@
     register_opt_group(cfg.CONF, network_group, NetworkGroup)
     register_opt_group(cfg.CONF, network_feature_group,
                        NetworkFeaturesGroup)
+    register_opt_group(cfg.CONF, queuing_group, QueuingGroup)
     register_opt_group(cfg.CONF, volume_group, VolumeGroup)
     register_opt_group(cfg.CONF, volume_feature_group,
                        VolumeFeaturesGroup)
     register_opt_group(cfg.CONF, object_storage_group, ObjectStoreGroup)
     register_opt_group(cfg.CONF, object_storage_feature_group,
                        ObjectStoreFeaturesGroup)
+    register_opt_group(cfg.CONF, database_group, DatabaseGroup)
     register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
     register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup)
     register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
@@ -840,6 +877,7 @@
     register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup)
     register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup)
     register_opt_group(cfg.CONF, cli_group, CLIGroup)
+    register_opt_group(cfg.CONF, negative_group, NegativeGroup)
 
 
 # this should never be called outside of this class
@@ -866,7 +904,9 @@
         self.object_storage = cfg.CONF['object-storage']
         self.object_storage_feature_enabled = cfg.CONF[
             'object-storage-feature-enabled']
+        self.database = cfg.CONF.database
         self.orchestration = cfg.CONF.orchestration
+        self.queuing = cfg.CONF.queuing
         self.telemetry = cfg.CONF.telemetry
         self.dashboard = cfg.CONF.dashboard
         self.data_processing = cfg.CONF.data_processing
@@ -879,6 +919,7 @@
         self.baremetal = cfg.CONF.baremetal
         self.input_scenario = cfg.CONF['input-scenario']
         self.cli = cfg.CONF.cli
+        self.negative = cfg.CONF.negative
         if not self.compute_admin.username:
             self.compute_admin.username = self.identity.admin_username
             self.compute_admin.password = self.identity.admin_password
diff --git a/tempest/exceptions/__init__.py b/tempest/exceptions/__init__.py
index c95f94f..06dee71 100644
--- a/tempest/exceptions/__init__.py
+++ b/tempest/exceptions/__init__.py
@@ -146,3 +146,11 @@
 
 class InvalidHTTPResponseBody(base.RestClientException):
     message = "HTTP response body is invalid json or xml"
+
+
+class InvalidContentType(base.RestClientException):
+    message = "Invalid content type provided"
+
+
+class UnexpectedResponseCode(base.RestClientException):
+    message = "Unexpected response code received"
diff --git a/tempest/scenario/test_load_balancer_basic.py b/tempest/scenario/test_load_balancer_basic.py
index 5bcdacd..ce2c66f 100644
--- a/tempest/scenario/test_load_balancer_basic.py
+++ b/tempest/scenario/test_load_balancer_basic.py
@@ -17,7 +17,6 @@
 import urllib
 
 from tempest.api.network import common as net_common
-from tempest.common import ssh
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest import exceptions
@@ -64,6 +63,8 @@
         cls.servers_keypairs = {}
         cls.members = []
         cls.floating_ips = {}
+        cls.server_ip = None
+        cls.vip_ip = None
         cls.port1 = 80
         cls.port2 = 88
 
@@ -76,12 +77,10 @@
         name = data_utils.rand_name("smoke_server-")
         keypair = self.create_keypair(name='keypair-%s' % name)
         security_groups = [self.security_groups[tenant_id].name]
-        net = self.list_networks(tenant_id=self.tenant_id)[0]
-        self.network = net_common.DeletableNetwork(client=self.network_client,
-                                                   **net['network'])
+        net = self._list_networks(tenant_id=self.tenant_id)[0]
         create_kwargs = {
             'nics': [
-                {'net-id': self.network.id},
+                {'net-id': net['id']},
             ],
             'key_name': keypair.name,
             'security_groups': security_groups,
@@ -89,30 +88,36 @@
         server = self.create_server(name=name,
                                     create_kwargs=create_kwargs)
         self.servers_keypairs[server] = keypair
+        if (config.network.public_network_id and not
+                config.network.tenant_networks_reachable):
+            public_network_id = config.network.public_network_id
+            floating_ip = self._create_floating_ip(
+                server, public_network_id)
+            self.floating_ips[floating_ip] = server
+            self.server_ip = floating_ip.floating_ip_address
+        else:
+            self.server_ip = server.networks[net['name']][0]
         self.assertTrue(self.servers_keypairs)
+        return server
 
-    def _start_servers(self):
+    def _start_servers(self, server):
         """
         1. SSH to the instance
-        2. Start two servers listening on ports 80 and 88 respectively
+        2. Start two http backends listening on ports 80 and 88 respectively
         """
-        for server in self.servers_keypairs.keys():
-            ssh_login = config.compute.image_ssh_user
-            private_key = self.servers_keypairs[server].private_key
-            network_name = self.network.name
 
-            ip_address = server.networks[network_name][0]
-            ssh_client = ssh.Client(ip_address, ssh_login,
-                                    pkey=private_key,
-                                    timeout=100)
-            start_server = "while true; do echo -e 'HTTP/1.0 200 OK\r\n\r\n" \
-                           "%(server)s' | sudo nc -l -p %(port)s ; done &"
-            cmd = start_server % {'server': 'server1',
-                                  'port': self.port1}
-            ssh_client.exec_command(cmd)
-            cmd = start_server % {'server': 'server2',
-                                  'port': self.port2}
-            ssh_client.exec_command(cmd)
+        private_key = self.servers_keypairs[server].private_key
+        ssh_client = self.get_remote_client(
+            server_or_ip=self.server_ip,
+            private_key=private_key).ssh_client
+        start_server = "while true; do echo -e 'HTTP/1.0 200 OK\r\n\r\n" \
+                       "%(server)s' | sudo nc -l -p %(port)s ; done &"
+        cmd = start_server % {'server': 'server1',
+                              'port': self.port1}
+        ssh_client.exec_command(cmd)
+        cmd = start_server % {'server': 'server2',
+                              'port': self.port2}
+        ssh_client.exec_command(cmd)
 
     def _check_connection(self, check_ip):
         def try_connect(ip):
@@ -135,14 +140,14 @@
         # get tenant subnet and verify there's only one
         subnet = self._list_subnets(tenant_id=self.tenant_id)[0]
         self.subnet = net_common.DeletableSubnet(client=self.network_client,
-                                                 **subnet['subnet'])
+                                                 **subnet)
         self.pool = super(TestLoadBalancerBasic, self)._create_pool(
             'ROUND_ROBIN',
             'HTTP',
             self.subnet.id)
         self.assertTrue(self.pool)
 
-    def _create_members(self, network_name, server_ids):
+    def _create_members(self, server_ids):
         """
         Create two members.
 
@@ -152,7 +157,7 @@
         servers = self.compute_client.servers.list()
         for server in servers:
             if server.id in server_ids:
-                ip = server.networks[network_name][0]
+                ip = self.server_ip
                 pool_id = self.pool.id
                 if len(set(server_ids)) == 1 or len(servers) == 1:
                     member1 = self._create_member(ip, self.port1, pool_id)
@@ -173,8 +178,7 @@
 
     def _create_load_balancer(self):
         self._create_pool()
-        self._create_members(self.network.name,
-                             [self.servers_keypairs.keys()[0].id])
+        self._create_members([self.servers_keypairs.keys()[0].id])
         subnet_id = self.subnet.id
         pool_id = self.pool.id
         self.vip = super(TestLoadBalancerBasic, self)._create_vip('HTTP', 80,
@@ -185,7 +189,13 @@
                                               net_common.DeletableVip),
                              self.vip.id,
                              expected_status='ACTIVE')
-        self._assign_floating_ip_to_vip(self.vip)
+        if (config.network.public_network_id and not
+                config.network.tenant_networks_reachable):
+            self._assign_floating_ip_to_vip(self.vip)
+            self.vip_ip = self.floating_ips[
+                self.vip.id][0]['floating_ip_address']
+        else:
+            self.vip_ip = self.vip.address
 
     def _check_load_balancing(self):
         """
@@ -195,25 +205,22 @@
            of the requests
         """
 
-        vip = self.vip
-        floating_ip_vip = self.floating_ips[vip.id][0]['floating_ip_address']
-        self._check_connection(floating_ip_vip)
+        self._check_connection(self.vip_ip)
         resp = []
         for count in range(10):
             resp.append(
                 urllib.urlopen(
-                    "http://{0}/".format(floating_ip_vip)).read())
+                    "http://{0}/".format(self.vip_ip)).read())
         self.assertEqual(set(["server1\n", "server2\n"]), set(resp))
         self.assertEqual(5, resp.count("server1\n"))
         self.assertEqual(5, resp.count("server2\n"))
 
-    @test.skip_because(bug="1277381")
     @test.attr(type='smoke')
     @test.services('compute', 'network')
     def test_load_balancer_basic(self):
         self._create_security_groups()
-        self._create_server()
-        self._start_servers()
+        server = self._create_server()
+        self._start_servers(server)
         self._create_load_balancer()
         self._check_load_balancing()
 
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index e441415..489b271 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -276,24 +276,46 @@
         ipatxt = ssh_client.get_ip_list()
         return reg.findall(ipatxt)
 
-    def _check_network_internal_connectivity(self):
+    def _check_network_internal_connectivity(self, network):
         """
         via ssh check VM internal connectivity:
-        - ping internal DHCP port, implying in-tenant connectivty
+        - ping internal gateway and DHCP port, implying in-tenant connectivity
+        pinging both, because L3 and DHCP agents might be on different nodes
         """
         floating_ip, server = self.floating_ip_tuple
         # get internal ports' ips:
         # get all network ports in the new network
         internal_ips = (p['fixed_ips'][0]['ip_address'] for p in
                         self._list_ports(tenant_id=server.tenant_id,
-                                         network_id=self.new_net.id)
+                                         network_id=network.id)
                         if p['device_owner'].startswith('network'))
 
+        self._check_server_connectivity(floating_ip, internal_ips)
+
+    def _check_network_external_connectivity(self):
+        """
+        ping public network default gateway to imply external connectivity
+
+        """
+        if not CONF.network.public_network_id:
+            msg = 'public network not defined.'
+            LOG.info(msg)
+            return
+
+        subnet = self.network_client.list_subnets(
+            network_id=CONF.network.public_network_id)['subnets']
+        self.assertEqual(1, len(subnet), "Found %d subnets" % len(subnet))
+
+        external_ips = [subnet[0]['gateway_ip']]
+        self._check_server_connectivity(self.floating_ip_tuple.floating_ip,
+                                        external_ips)
+
+    def _check_server_connectivity(self, floating_ip, address_list):
         ip_address = floating_ip.floating_ip_address
-        private_key = self.servers[server].private_key
+        private_key = self.servers[self.floating_ip_tuple.server].private_key
         ssh_source = self._ssh_to_server(ip_address, private_key)
 
-        for remote_ip in internal_ips:
+        for remote_ip in address_list:
             try:
                 self.assertTrue(self._check_remote_connectivity(ssh_source,
                                                                 remote_ip),
@@ -322,14 +344,6 @@
          ssh server hosted at the IP address.  This check guarantees
          that the IP address is associated with the target VM.
 
-        - detach the floating-ip from the VM and verify that it becomes
-        unreachable
-
-        - associate detached floating ip to a new VM and verify connectivity.
-        VMs are created with unique keypair so connectivity also asserts that
-        floating IP is associated with the new VM instead of the old one
-
-        # TODO(mnewby) - Need to implement the following:
         - the Tempest host can ssh into the VM via the IP address and
          successfully execute the following:
 
@@ -341,8 +355,18 @@
          - ping an internal IP address, implying connectivity to another
            VM on the same network.
 
+        - detach the floating-ip from the VM and verify that it becomes
+        unreachable
+
+        - associate detached floating ip to a new VM and verify connectivity.
+        VMs are created with unique keypair so connectivity also asserts that
+        floating IP is associated with the new VM instead of the old one
+
+
         """
         self._check_public_network_connectivity(should_connect=True)
+        self._check_network_internal_connectivity(network=self.network)
+        self._check_network_external_connectivity()
         self._disassociate_floating_ips()
         self._check_public_network_connectivity(should_connect=False,
                                                 msg="after disassociate "
@@ -367,4 +391,4 @@
         self._check_public_network_connectivity(should_connect=True)
         self._create_new_network()
         self._hotplug_server()
-        self._check_network_internal_connectivity()
+        self._check_network_internal_connectivity(network=self.new_net)
diff --git a/tempest/services/compute/v3/json/aggregates_client.py b/tempest/services/compute/v3/json/aggregates_client.py
index 20ce87b..fddf5df 100644
--- a/tempest/services/compute/v3/json/aggregates_client.py
+++ b/tempest/services/compute/v3/json/aggregates_client.py
@@ -15,14 +15,14 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
 
 CONF = config.CONF
 
 
-class AggregatesV3ClientJSON(RestClient):
+class AggregatesV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(AggregatesV3ClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/compute/v3/json/availability_zone_client.py b/tempest/services/compute/v3/json/availability_zone_client.py
index 4a6db55..bad2de9 100644
--- a/tempest/services/compute/v3/json/availability_zone_client.py
+++ b/tempest/services/compute/v3/json/availability_zone_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class AvailabilityZoneV3ClientJSON(RestClient):
+class AvailabilityZoneV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(AvailabilityZoneV3ClientJSON, self).__init__(
diff --git a/tempest/services/compute/v3/json/certificates_client.py b/tempest/services/compute/v3/json/certificates_client.py
index 620eedf..f8beeb9 100644
--- a/tempest/services/compute/v3/json/certificates_client.py
+++ b/tempest/services/compute/v3/json/certificates_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class CertificatesV3ClientJSON(RestClient):
+class CertificatesV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(CertificatesV3ClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/compute/v3/json/extensions_client.py b/tempest/services/compute/v3/json/extensions_client.py
index 54f0aba..46f17a4 100644
--- a/tempest/services/compute/v3/json/extensions_client.py
+++ b/tempest/services/compute/v3/json/extensions_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class ExtensionsV3ClientJSON(RestClient):
+class ExtensionsV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(ExtensionsV3ClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/compute/v3/json/flavors_client.py b/tempest/services/compute/v3/json/flavors_client.py
index f9df2b8..656bd84 100644
--- a/tempest/services/compute/v3/json/flavors_client.py
+++ b/tempest/services/compute/v3/json/flavors_client.py
@@ -16,13 +16,13 @@
 import json
 import urllib
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class FlavorsV3ClientJSON(RestClient):
+class FlavorsV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(FlavorsV3ClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/compute/v3/json/hosts_client.py b/tempest/services/compute/v3/json/hosts_client.py
index 76af626..e27c7c6 100644
--- a/tempest/services/compute/v3/json/hosts_client.py
+++ b/tempest/services/compute/v3/json/hosts_client.py
@@ -15,13 +15,13 @@
 import json
 import urllib
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class HostsV3ClientJSON(RestClient):
+class HostsV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(HostsV3ClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/compute/v3/json/hypervisor_client.py b/tempest/services/compute/v3/json/hypervisor_client.py
index e07a1fb..30e391f 100644
--- a/tempest/services/compute/v3/json/hypervisor_client.py
+++ b/tempest/services/compute/v3/json/hypervisor_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class HypervisorV3ClientJSON(RestClient):
+class HypervisorV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(HypervisorV3ClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/compute/v3/json/interfaces_client.py b/tempest/services/compute/v3/json/interfaces_client.py
index f8b9d09..b45426c 100644
--- a/tempest/services/compute/v3/json/interfaces_client.py
+++ b/tempest/services/compute/v3/json/interfaces_client.py
@@ -16,14 +16,14 @@
 import json
 import time
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
 
 CONF = config.CONF
 
 
-class InterfacesV3ClientJSON(RestClient):
+class InterfacesV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(InterfacesV3ClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/compute/v3/json/keypairs_client.py b/tempest/services/compute/v3/json/keypairs_client.py
index 821b86f..9ca4885 100644
--- a/tempest/services/compute/v3/json/keypairs_client.py
+++ b/tempest/services/compute/v3/json/keypairs_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class KeyPairsV3ClientJSON(RestClient):
+class KeyPairsV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(KeyPairsV3ClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/compute/v3/json/quotas_client.py b/tempest/services/compute/v3/json/quotas_client.py
index aa8bfaf..32e31a3 100644
--- a/tempest/services/compute/v3/json/quotas_client.py
+++ b/tempest/services/compute/v3/json/quotas_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class QuotasV3ClientJSON(RestClient):
+class QuotasV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(QuotasV3ClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/compute/v3/json/servers_client.py b/tempest/services/compute/v3/json/servers_client.py
index 819e366..256a730 100644
--- a/tempest/services/compute/v3/json/servers_client.py
+++ b/tempest/services/compute/v3/json/servers_client.py
@@ -19,7 +19,7 @@
 import time
 import urllib
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest.common import waiters
 from tempest import config
 from tempest import exceptions
@@ -27,7 +27,7 @@
 CONF = config.CONF
 
 
-class ServersV3ClientJSON(RestClient):
+class ServersV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(ServersV3ClientJSON, self).__init__(auth_provider)
@@ -435,3 +435,11 @@
                                post_body)
         body = json.loads(body)
         return resp, body['console']
+
+    def reset_network(self, server_id, **kwargs):
+        """Resets the Network of a server"""
+        return self.action(server_id, 'reset_network', None, **kwargs)
+
+    def inject_network_info(self, server_id, **kwargs):
+        """Inject the Network Info into server"""
+        return self.action(server_id, 'inject_network_info', None, **kwargs)
diff --git a/tempest/services/compute/v3/json/services_client.py b/tempest/services/compute/v3/json/services_client.py
index e20dfde..b4e65a0 100644
--- a/tempest/services/compute/v3/json/services_client.py
+++ b/tempest/services/compute/v3/json/services_client.py
@@ -17,13 +17,13 @@
 import json
 import urllib
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class ServicesV3ClientJSON(RestClient):
+class ServicesV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(ServicesV3ClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/database/__init__.py b/tempest/services/database/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/services/database/__init__.py
diff --git a/tempest/services/database/json/__init__.py b/tempest/services/database/json/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/services/database/json/__init__.py
diff --git a/tempest/services/database/json/flavors_client.py b/tempest/services/database/json/flavors_client.py
new file mode 100644
index 0000000..1a8a4c1
--- /dev/null
+++ b/tempest/services/database/json/flavors_client.py
@@ -0,0 +1,39 @@
+# Copyright 2014 OpenStack Foundation
+# All Rights Reserved.
+#
+#    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.
+
+from tempest.common import rest_client
+from tempest import config
+import urllib
+
+CONF = config.CONF
+
+
+class DatabaseFlavorsClientJSON(rest_client.RestClient):
+
+    def __init__(self, auth_provider):
+        super(DatabaseFlavorsClientJSON, self).__init__(auth_provider)
+        self.service = CONF.database.catalog_type
+
+    def list_db_flavors(self, params=None):
+        url = 'flavors'
+        if params:
+            url += '?%s' % urllib.urlencode(params)
+
+        resp, body = self.get(url)
+        return resp, self._parse_resp(body)
+
+    def get_db_flavor_details(self, db_flavor_id):
+        resp, body = self.get("flavors/%s" % str(db_flavor_id))
+        return resp, self._parse_resp(body)
diff --git a/tempest/services/identity/v3/json/credentials_client.py b/tempest/services/identity/v3/json/credentials_client.py
index 5d6632a..f795c7b 100644
--- a/tempest/services/identity/v3/json/credentials_client.py
+++ b/tempest/services/identity/v3/json/credentials_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class CredentialsClientJSON(RestClient):
+class CredentialsClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(CredentialsClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/identity/v3/json/endpoints_client.py b/tempest/services/identity/v3/json/endpoints_client.py
index 652c345..c3c1e15 100644
--- a/tempest/services/identity/v3/json/endpoints_client.py
+++ b/tempest/services/identity/v3/json/endpoints_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class EndPointClientJSON(RestClient):
+class EndPointClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(EndPointClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/identity/v3/json/identity_client.py b/tempest/services/identity/v3/json/identity_client.py
index b044e4d..65f3355 100644
--- a/tempest/services/identity/v3/json/identity_client.py
+++ b/tempest/services/identity/v3/json/identity_client.py
@@ -15,14 +15,14 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
 
 CONF = config.CONF
 
 
-class IdentityV3ClientJSON(RestClient):
+class IdentityV3ClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(IdentityV3ClientJSON, self).__init__(auth_provider)
@@ -439,7 +439,7 @@
         return resp, body
 
 
-class V3TokenClientJSON(RestClient):
+class V3TokenClientJSON(rest_client.RestClient):
 
     def __init__(self):
         super(V3TokenClientJSON, self).__init__(None)
diff --git a/tempest/services/identity/v3/json/policy_client.py b/tempest/services/identity/v3/json/policy_client.py
index 5a3f891..3c90fa1 100644
--- a/tempest/services/identity/v3/json/policy_client.py
+++ b/tempest/services/identity/v3/json/policy_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class PolicyClientJSON(RestClient):
+class PolicyClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(PolicyClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/identity/v3/json/service_client.py b/tempest/services/identity/v3/json/service_client.py
index c1faebb..b66fb4a 100644
--- a/tempest/services/identity/v3/json/service_client.py
+++ b/tempest/services/identity/v3/json/service_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class ServiceClientJSON(RestClient):
+class ServiceClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(ServiceClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/identity/v3/xml/credentials_client.py b/tempest/services/identity/v3/xml/credentials_client.py
index 22ed44d..70f85a1 100644
--- a/tempest/services/identity/v3/xml/credentials_client.py
+++ b/tempest/services/identity/v3/xml/credentials_client.py
@@ -19,10 +19,7 @@
 
 from tempest.common import rest_client
 from tempest import config
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import Element
-from tempest.services.compute.xml.common import Text
-from tempest.services.compute.xml.common import xml_to_json
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -39,7 +36,7 @@
         self.api_version = "v3"
 
     def _parse_body(self, body):
-        data = xml_to_json(body)
+        data = common.xml_to_json(body)
         return data
 
     def _parse_creds(self, node):
@@ -47,7 +44,7 @@
         for child in node.getchildren():
             tag_list = child.tag.split('}', 1)
             if tag_list[1] == "credential":
-                array.append(xml_to_json(child))
+                array.append(common.xml_to_json(child))
         return array
 
     def create_credential(self, access_key, secret_key, user_id, project_id):
@@ -55,14 +52,14 @@
         cred_type = 'ec2'
         access = "&quot;access&quot;: &quot;%s&quot;" % access_key
         secret = "&quot;secret&quot;: &quot;%s&quot;" % secret_key
-        blob = Element('blob',
-                       xmlns=XMLNS)
-        blob.append(Text("{%s , %s}"
-                         % (access, secret)))
-        credential = Element('credential', project_id=project_id,
-                             type=cred_type, user_id=user_id)
+        blob = common.Element('blob',
+                              xmlns=XMLNS)
+        blob.append(common.Text("{%s , %s}"
+                                % (access, secret)))
+        credential = common.Element('credential', project_id=project_id,
+                                    type=cred_type, user_id=user_id)
         credential.append(blob)
-        resp, body = self.post('credentials', str(Document(credential)))
+        resp, body = self.post('credentials', str(common.Document(credential)))
         body = self._parse_body(etree.fromstring(body))
         body['blob'] = json.loads(body['blob'])
         return resp, body
@@ -77,15 +74,15 @@
         user_id = kwargs.get('user_id', body['user_id'])
         access = "&quot;access&quot;: &quot;%s&quot;" % access_key
         secret = "&quot;secret&quot;: &quot;%s&quot;" % secret_key
-        blob = Element('blob',
-                       xmlns=XMLNS)
-        blob.append(Text("{%s , %s}"
-                         % (access, secret)))
-        credential = Element('credential', project_id=project_id,
-                             type=cred_type, user_id=user_id)
+        blob = common.Element('blob',
+                              xmlns=XMLNS)
+        blob.append(common.Text("{%s , %s}"
+                                % (access, secret)))
+        credential = common.Element('credential', project_id=project_id,
+                                    type=cred_type, user_id=user_id)
         credential.append(blob)
         resp, body = self.patch('credentials/%s' % credential_id,
-                                str(Document(credential)))
+                                str(common.Document(credential)))
         body = self._parse_body(etree.fromstring(body))
         body['blob'] = json.loads(body['blob'])
         return resp, body
diff --git a/tempest/services/identity/v3/xml/endpoints_client.py b/tempest/services/identity/v3/xml/endpoints_client.py
index d79ea92..cc9aa65 100644
--- a/tempest/services/identity/v3/xml/endpoints_client.py
+++ b/tempest/services/identity/v3/xml/endpoints_client.py
@@ -18,9 +18,7 @@
 from tempest.common import http
 from tempest.common import rest_client
 from tempest import config
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import Element
-from tempest.services.compute.xml.common import xml_to_json
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -41,11 +39,11 @@
         for child in node.getchildren():
             tag_list = child.tag.split('}', 1)
             if tag_list[1] == "endpoint":
-                array.append(xml_to_json(child))
+                array.append(common.xml_to_json(child))
         return array
 
     def _parse_body(self, body):
-        json = xml_to_json(body)
+        json = common.xml_to_json(body)
         return json
 
     def request(self, method, url, headers=None, body=None, wait=None):
@@ -69,21 +67,22 @@
         enabled = kwargs.get('enabled', None)
         if enabled is not None:
             enabled = str(enabled).lower()
-        create_endpoint = Element("endpoint",
-                                  xmlns=XMLNS,
-                                  service_id=service_id,
-                                  interface=interface,
-                                  url=url, region=region,
-                                  enabled=enabled)
-        resp, body = self.post('endpoints', str(Document(create_endpoint)))
+        create_endpoint = common.Element("endpoint",
+                                         xmlns=XMLNS,
+                                         service_id=service_id,
+                                         interface=interface,
+                                         url=url, region=region,
+                                         enabled=enabled)
+        resp, body = self.post('endpoints',
+                               str(common.Document(create_endpoint)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
     def update_endpoint(self, endpoint_id, service_id=None, interface=None,
                         url=None, region=None, enabled=None):
         """Updates an endpoint with given parameters."""
-        doc = Document()
-        endpoint = Element("endpoint")
+        doc = common.Document()
+        endpoint = common.Element("endpoint")
         doc.append(endpoint)
 
         if service_id:
diff --git a/tempest/services/identity/v3/xml/identity_client.py b/tempest/services/identity/v3/xml/identity_client.py
index e8e70d8..6ff6d56 100644
--- a/tempest/services/identity/v3/xml/identity_client.py
+++ b/tempest/services/identity/v3/xml/identity_client.py
@@ -20,10 +20,7 @@
 from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import Element
-from tempest.services.compute.xml.common import Text
-from tempest.services.compute.xml.common import xml_to_json
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -44,7 +41,7 @@
         for child in node.getchildren():
             tag_list = child.tag.split('}', 1)
             if tag_list[1] == "project":
-                array.append(xml_to_json(child))
+                array.append(common.xml_to_json(child))
         return array
 
     def _parse_domains(self, node):
@@ -52,7 +49,7 @@
         for child in node.getchildren():
             tag_list = child.tag.split('}', 1)
             if tag_list[1] == "domain":
-                array.append(xml_to_json(child))
+                array.append(common.xml_to_json(child))
         return array
 
     def _parse_group_users(self, node):
@@ -60,7 +57,7 @@
         for child in node.getchildren():
             tag_list = child.tag.split('}', 1)
             if tag_list[1] == "user":
-                array.append(xml_to_json(child))
+                array.append(common.xml_to_json(child))
         return array
 
     def _parse_roles(self, node):
@@ -68,17 +65,17 @@
         for child in node.getchildren():
             tag_list = child.tag.split('}', 1)
             if tag_list[1] == "role":
-                array.append(xml_to_json(child))
+                array.append(common.xml_to_json(child))
         return array
 
     def _parse_array(self, node):
         array = []
         for child in node.getchildren():
-            array.append(xml_to_json(child))
+            array.append(common.xml_to_json(child))
         return array
 
     def _parse_body(self, body):
-        _json = xml_to_json(body)
+        _json = common.xml_to_json(body)
         return _json
 
     def create_user(self, user_name, **kwargs):
@@ -89,16 +86,16 @@
         project_id = kwargs.get('project_id', None)
         description = kwargs.get('description', None)
         domain_id = kwargs.get('domain_id', 'default')
-        post_body = Element("user",
-                            xmlns=XMLNS,
-                            name=user_name,
-                            password=password,
-                            description=description,
-                            email=email,
-                            enabled=str(en).lower(),
-                            project_id=project_id,
-                            domain_id=domain_id)
-        resp, body = self.post('users', str(Document(post_body)))
+        post_body = common.Element("user",
+                                   xmlns=XMLNS,
+                                   name=user_name,
+                                   password=password,
+                                   description=description,
+                                   email=email,
+                                   enabled=str(en).lower(),
+                                   project_id=project_id,
+                                   domain_id=domain_id)
+        resp, body = self.post('users', str(common.Document(post_body)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -110,16 +107,16 @@
         project_id = kwargs.get('project_id', body['project_id'])
         description = kwargs.get('description', body['description'])
         domain_id = kwargs.get('domain_id', body['domain_id'])
-        update_user = Element("user",
-                              xmlns=XMLNS,
-                              name=name,
-                              email=email,
-                              project_id=project_id,
-                              domain_id=domain_id,
-                              description=description,
-                              enabled=str(en).lower())
+        update_user = common.Element("user",
+                                     xmlns=XMLNS,
+                                     name=name,
+                                     email=email,
+                                     project_id=project_id,
+                                     domain_id=domain_id,
+                                     description=description,
+                                     enabled=str(en).lower())
         resp, body = self.patch('users/%s' % user_id,
-                                str(Document(update_user)))
+                                str(common.Document(update_user)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -151,14 +148,14 @@
         description = kwargs.get('description', None)
         en = kwargs.get('enabled', 'true')
         domain_id = kwargs.get('domain_id', 'default')
-        post_body = Element("project",
-                            xmlns=XMLNS,
-                            description=description,
-                            domain_id=domain_id,
-                            enabled=str(en).lower(),
-                            name=name)
+        post_body = common.Element("project",
+                                   xmlns=XMLNS,
+                                   description=description,
+                                   domain_id=domain_id,
+                                   enabled=str(en).lower(),
+                                   name=name)
         resp, body = self.post('projects',
-                               str(Document(post_body)))
+                               str(common.Document(post_body)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -175,14 +172,14 @@
         desc = kwargs.get('description', body['description'])
         en = kwargs.get('enabled', body['enabled'])
         domain_id = kwargs.get('domain_id', body['domain_id'])
-        post_body = Element("project",
-                            xmlns=XMLNS,
-                            name=name,
-                            description=desc,
-                            enabled=str(en).lower(),
-                            domain_id=domain_id)
+        post_body = common.Element("project",
+                                   xmlns=XMLNS,
+                                   name=name,
+                                   description=desc,
+                                   enabled=str(en).lower(),
+                                   domain_id=domain_id)
         resp, body = self.patch('projects/%s' % project_id,
-                                str(Document(post_body)))
+                                str(common.Document(post_body)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -199,10 +196,10 @@
 
     def create_role(self, name):
         """Create a Role."""
-        post_body = Element("role",
-                            xmlns=XMLNS,
-                            name=name)
-        resp, body = self.post('roles', str(Document(post_body)))
+        post_body = common.Element("role",
+                                   xmlns=XMLNS,
+                                   name=name)
+        resp, body = self.post('roles', str(common.Document(post_body)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -214,11 +211,11 @@
 
     def update_role(self, name, role_id):
         """Updates a Role."""
-        post_body = Element("role",
-                            xmlns=XMLNS,
-                            name=name)
+        post_body = common.Element("role",
+                                   xmlns=XMLNS,
+                                   name=name)
         resp, body = self.patch('roles/%s' % str(role_id),
-                                str(Document(post_body)))
+                                str(common.Document(post_body)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -237,12 +234,12 @@
         """Creates a domain."""
         description = kwargs.get('description', None)
         en = kwargs.get('enabled', True)
-        post_body = Element("domain",
-                            xmlns=XMLNS,
-                            name=name,
-                            description=description,
-                            enabled=str(en).lower())
-        resp, body = self.post('domains', str(Document(post_body)))
+        post_body = common.Element("domain",
+                                   xmlns=XMLNS,
+                                   name=name,
+                                   description=description,
+                                   enabled=str(en).lower())
+        resp, body = self.post('domains', str(common.Document(post_body)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -263,13 +260,13 @@
         description = kwargs.get('description', body['description'])
         en = kwargs.get('enabled', body['enabled'])
         name = kwargs.get('name', body['name'])
-        post_body = Element("domain",
-                            xmlns=XMLNS,
-                            name=name,
-                            description=description,
-                            enabled=str(en).lower())
+        post_body = common.Element("domain",
+                                   xmlns=XMLNS,
+                                   name=name,
+                                   description=description,
+                                   enabled=str(en).lower())
         resp, body = self.patch('domains/%s' % domain_id,
-                                str(Document(post_body)))
+                                str(common.Document(post_body)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -299,13 +296,13 @@
         description = kwargs.get('description', None)
         domain_id = kwargs.get('domain_id', 'default')
         project_id = kwargs.get('project_id', None)
-        post_body = Element("group",
-                            xmlns=XMLNS,
-                            name=name,
-                            description=description,
-                            domain_id=domain_id,
-                            project_id=project_id)
-        resp, body = self.post('groups', str(Document(post_body)))
+        post_body = common.Element("group",
+                                   xmlns=XMLNS,
+                                   name=name,
+                                   description=description,
+                                   domain_id=domain_id,
+                                   project_id=project_id)
+        resp, body = self.post('groups', str(common.Document(post_body)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -320,12 +317,12 @@
         resp, body = self.get_group(group_id)
         name = kwargs.get('name', body['name'])
         description = kwargs.get('description', body['description'])
-        post_body = Element("group",
-                            xmlns=XMLNS,
-                            name=name,
-                            description=description)
+        post_body = common.Element("group",
+                                   xmlns=XMLNS,
+                                   name=name,
+                                   description=description)
         resp, body = self.patch('groups/%s' % group_id,
-                                str(Document(post_body)))
+                                str(common.Document(post_body)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -456,35 +453,35 @@
         Validation is left to the server side.
         """
         if user_type == 'id':
-            _user = Element('user', id=user, password=password)
+            _user = common.Element('user', id=user, password=password)
         else:
-            _user = Element('user', name=user, password=password)
+            _user = common.Element('user', name=user, password=password)
         if domain is not None:
-            _domain = Element('domain', name=domain)
+            _domain = common.Element('domain', name=domain)
             _user.append(_domain)
 
-        password = Element('password')
+        password = common.Element('password')
         password.append(_user)
 
-        method = Element('method')
-        method.append(Text('password'))
-        methods = Element('methods')
+        method = common.Element('method')
+        method.append(common.Text('password'))
+        methods = common.Element('methods')
         methods.append(method)
-        identity = Element('identity')
+        identity = common.Element('identity')
         identity.append(methods)
         identity.append(password)
 
-        auth = Element('auth')
+        auth = common.Element('auth')
         auth.append(identity)
 
         if tenant is not None:
-            project = Element('project', name=tenant)
+            project = common.Element('project', name=tenant)
             project.append(_domain)
-            scope = Element('scope')
+            scope = common.Element('scope')
             scope.append(project)
             auth.append(scope)
 
-        resp, body = self.post(self.auth_url, body=str(Document(auth)))
+        resp, body = self.post(self.auth_url, body=str(common.Document(auth)))
         return resp, body
 
     def request(self, method, url, headers=None, body=None):
diff --git a/tempest/services/identity/v3/xml/policy_client.py b/tempest/services/identity/v3/xml/policy_client.py
index c12018a..bf4cce7 100644
--- a/tempest/services/identity/v3/xml/policy_client.py
+++ b/tempest/services/identity/v3/xml/policy_client.py
@@ -18,9 +18,7 @@
 from tempest.common import http
 from tempest.common import rest_client
 from tempest import config
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import Element
-from tempest.services.compute.xml.common import xml_to_json
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -41,11 +39,11 @@
         for child in node.getchildren():
             tag_list = child.tag.split('}', 1)
             if tag_list[1] == "policy":
-                array.append(xml_to_json(child))
+                array.append(common.xml_to_json(child))
         return array
 
     def _parse_body(self, body):
-        json = xml_to_json(body)
+        json = common.xml_to_json(body)
         return json
 
     def request(self, method, url, headers=None, body=None, wait=None):
@@ -59,8 +57,9 @@
 
     def create_policy(self, blob, type):
         """Creates a Policy."""
-        create_policy = Element("policy", xmlns=XMLNS, blob=blob, type=type)
-        resp, body = self.post('policies', str(Document(create_policy)))
+        create_policy = common.Element("policy", xmlns=XMLNS,
+                                       blob=blob, type=type)
+        resp, body = self.post('policies', str(common.Document(create_policy)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -81,9 +80,9 @@
         """Updates a policy."""
         resp, body = self.get_policy(policy_id)
         type = kwargs.get('type')
-        update_policy = Element("policy", xmlns=XMLNS, type=type)
+        update_policy = common.Element("policy", xmlns=XMLNS, type=type)
         url = 'policies/%s' % policy_id
-        resp, body = self.patch(url, str(Document(update_policy)))
+        resp, body = self.patch(url, str(common.Document(update_policy)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
diff --git a/tempest/services/identity/v3/xml/service_client.py b/tempest/services/identity/v3/xml/service_client.py
index d4a5877..966d7f7 100644
--- a/tempest/services/identity/v3/xml/service_client.py
+++ b/tempest/services/identity/v3/xml/service_client.py
@@ -17,9 +17,7 @@
 
 from tempest.common import rest_client
 from tempest import config
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import Element
-from tempest.services.compute.xml.common import xml_to_json
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -36,7 +34,7 @@
         self.api_version = "v3"
 
     def _parse_body(self, body):
-        data = xml_to_json(body)
+        data = common.xml_to_json(body)
         return data
 
     def update_service(self, service_id, **kwargs):
@@ -45,14 +43,14 @@
         name = kwargs.get('name', body['name'])
         description = kwargs.get('description', body['description'])
         type = kwargs.get('type', body['type'])
-        update_service = Element("service",
-                                 xmlns=XMLNS,
-                                 id=service_id,
-                                 name=name,
-                                 description=description,
-                                 type=type)
+        update_service = common.Element("service",
+                                        xmlns=XMLNS,
+                                        id=service_id,
+                                        name=name,
+                                        description=description,
+                                        type=type)
         resp, body = self.patch('services/%s' % service_id,
-                                str(Document(update_service)))
+                                str(common.Document(update_service)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -64,12 +62,12 @@
         return resp, body
 
     def create_service(self, serv_type, name=None, description=None):
-        post_body = Element("service",
-                            xmlns=XMLNS,
-                            name=name,
-                            description=description,
-                            type=serv_type)
-        resp, body = self.post("services", str(Document(post_body)))
+        post_body = common.Element("service",
+                                   xmlns=XMLNS,
+                                   name=name,
+                                   description=description,
+                                   type=serv_type)
+        resp, body = self.post("services", str(common.Document(post_body)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
diff --git a/tempest/services/image/v1/json/image_client.py b/tempest/services/image/v1/json/image_client.py
index 932fa14..e22cd9c 100644
--- a/tempest/services/image/v1/json/image_client.py
+++ b/tempest/services/image/v1/json/image_client.py
@@ -21,7 +21,7 @@
 import urllib
 
 from tempest.common import glance_http
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common import log as logging
@@ -31,7 +31,7 @@
 LOG = logging.getLogger(__name__)
 
 
-class ImageClientJSON(RestClient):
+class ImageClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(ImageClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index deb9b5b..a804e8e 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -12,7 +12,7 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest.services.network import network_client_base
 
 
@@ -32,7 +32,7 @@
     """
 
     def get_rest_client(self, auth_provider):
-        return RestClient(auth_provider)
+        return rest_client.RestClient(auth_provider)
 
     def deserialize_single(self, body):
         return json.loads(body)
@@ -254,6 +254,20 @@
         body = json.loads(body)
         return resp, body
 
+    def add_router_to_l3_agent(self, agent_id, router_id):
+        uri = '%s/agents/%s/l3-routers' % (self.uri_prefix, agent_id)
+        post_body = {"router_id": router_id}
+        body = json.dumps(post_body)
+        resp, body = self.post(uri, body)
+        body = json.loads(body)
+        return resp, body
+
+    def remove_router_from_l3_agent(self, agent_id, router_id):
+        uri = '%s/agents/%s/l3-routers/%s' % (
+            self.uri_prefix, agent_id, router_id)
+        resp, body = self.delete(uri)
+        return resp, body
+
     def list_dhcp_agent_hosting_network(self, network_id):
         uri = '%s/networks/%s/dhcp-agents' % (self.uri_prefix, network_id)
         resp, body = self.get(uri)
diff --git a/tempest/services/network/xml/network_client.py b/tempest/services/network/xml/network_client.py
index 727b25f..2a5083c 100644
--- a/tempest/services/network/xml/network_client.py
+++ b/tempest/services/network/xml/network_client.py
@@ -227,15 +227,30 @@
     def list_routers_on_l3_agent(self, agent_id):
         uri = '%s/agents/%s/l3-routers' % (self.uri_prefix, agent_id)
         resp, body = self.get(uri)
-        body = _root_tag_fetcher_and_xml_to_json_parse(body)
+        routers = common.parse_array(etree.fromstring(body))
+        body = {'routers': routers}
         return resp, body
 
     def list_l3_agents_hosting_router(self, router_id):
         uri = '%s/routers/%s/l3-agents' % (self.uri_prefix, router_id)
         resp, body = self.get(uri)
+        agents = common.parse_array(etree.fromstring(body))
+        body = {'agents': agents}
+        return resp, body
+
+    def add_router_to_l3_agent(self, agent_id, router_id):
+        uri = '%s/agents/%s/l3-routers' % (self.uri_prefix, agent_id)
+        router = (common.Element("router_id", router_id))
+        resp, body = self.post(uri, str(common.Document(router)))
         body = _root_tag_fetcher_and_xml_to_json_parse(body)
         return resp, body
 
+    def remove_router_from_l3_agent(self, agent_id, router_id):
+        uri = '%s/agents/%s/l3-routers/%s' % (
+            self.uri_prefix, agent_id, router_id)
+        resp, body = self.delete(uri)
+        return resp, body
+
     def list_dhcp_agent_hosting_network(self, network_id):
         uri = '%s/networks/%s/dhcp-agents' % (self.uri_prefix, network_id)
         resp, body = self.get(uri)
diff --git a/tempest/services/object_storage/account_client.py b/tempest/services/object_storage/account_client.py
index efac5f5..7c3fa85 100644
--- a/tempest/services/object_storage/account_client.py
+++ b/tempest/services/object_storage/account_client.py
@@ -17,18 +17,18 @@
 import urllib
 
 from tempest.common import http
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
+from xml.etree import ElementTree as etree
 
 CONF = config.CONF
 
 
-class AccountClient(RestClient):
+class AccountClient(rest_client.RestClient):
     def __init__(self, auth_provider):
         super(AccountClient, self).__init__(auth_provider)
         self.service = CONF.object_storage.catalog_type
-        self.format = 'json'
 
     def create_account(self, data=None,
                        params=None,
@@ -87,7 +87,25 @@
 
         headers = {}
         for item in metadata:
-            headers[metadata_prefix + item] = 'x'
+            headers[metadata_prefix + item] = metadata[item]
+        resp, body = self.post('', headers=headers, body=None)
+        return resp, body
+
+    def create_and_delete_account_metadata(
+            self,
+            create_metadata=None,
+            delete_metadata=None,
+            create_metadata_prefix='X-Account-Meta-',
+            delete_metadata_prefix='X-Remove-Account-Meta-'):
+        """
+        Creates and deletes an account metadata entry.
+        """
+        headers = {}
+        for key in create_metadata:
+            headers[create_metadata_prefix + key] = create_metadata[key]
+        for key in delete_metadata:
+            headers[delete_metadata_prefix + key] = delete_metadata[key]
+
         resp, body = self.post('', headers=headers, body=None)
         return resp, body
 
@@ -112,36 +130,35 @@
             response.
             DEFAULT:  Python-List returned in response body
         """
+        url = '?%s' % urllib.urlencode(params) if params else ''
 
-        if params:
-            if 'format' not in params:
-                params['format'] = self.format
-        else:
-            params = {'format': self.format}
-
-        url = '?' + urllib.urlencode(params)
-        resp, body = self.get(url)
-
+        resp, body = self.get(url, headers={})
         if params and params.get('format') == 'json':
             body = json.loads(body)
+        elif params and params.get('format') == 'xml':
+            body = etree.fromstring(body)
+        else:
+            body = body.strip().splitlines()
         return resp, body
 
     def list_extensions(self):
         self.skip_path()
-        resp, body = self.get('info')
-        self.reset_path()
+        try:
+            resp, body = self.get('info')
+        finally:
+            self.reset_path()
         body = json.loads(body)
         return resp, body
 
 
-class AccountClientCustomizedHeader(RestClient):
+class AccountClientCustomizedHeader(rest_client.RestClient):
 
     # TODO(andreaf) This class is now redundant, to be removed in next patch
 
     def __init__(self, auth_provider):
         super(AccountClientCustomizedHeader, self).__init__(
             auth_provider)
-        # Overwrites json-specific header encoding in RestClient
+        # Overwrites json-specific header encoding in rest_client.RestClient
         self.service = CONF.object_storage.catalog_type
         self.format = 'json'
 
diff --git a/tempest/services/object_storage/container_client.py b/tempest/services/object_storage/container_client.py
index f224407..546b557 100644
--- a/tempest/services/object_storage/container_client.py
+++ b/tempest/services/object_storage/container_client.py
@@ -16,18 +16,18 @@
 import json
 import urllib
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 from xml.etree import ElementTree as etree
 
 CONF = config.CONF
 
 
-class ContainerClient(RestClient):
+class ContainerClient(rest_client.RestClient):
     def __init__(self, auth_provider):
         super(ContainerClient, self).__init__(auth_provider)
 
-        # Overwrites json-specific header encoding in RestClient
+        # Overwrites json-specific header encoding in rest_client.RestClient
         self.headers = {}
         self.service = CONF.object_storage.catalog_type
         self.format = 'json'
diff --git a/tempest/services/object_storage/object_client.py b/tempest/services/object_storage/object_client.py
index 09e484e..77d29a5 100644
--- a/tempest/services/object_storage/object_client.py
+++ b/tempest/services/object_storage/object_client.py
@@ -16,14 +16,14 @@
 import urllib
 
 from tempest.common import http
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
 
 CONF = config.CONF
 
 
-class ObjectClient(RestClient):
+class ObjectClient(rest_client.RestClient):
     def __init__(self, auth_provider):
         super(ObjectClient, self).__init__(auth_provider)
 
@@ -135,14 +135,14 @@
         return resp, body
 
 
-class ObjectClientCustomizedHeader(RestClient):
+class ObjectClientCustomizedHeader(rest_client.RestClient):
 
     # TODO(andreaf) This class is now redundant, to be removed in next patch
 
     def __init__(self, auth_provider):
         super(ObjectClientCustomizedHeader, self).__init__(
             auth_provider)
-        # Overwrites json-specific header encoding in RestClient
+        # Overwrites json-specific header encoding in rest_client.RestClient
         self.service = CONF.object_storage.catalog_type
         self.format = 'json'
 
diff --git a/tempest/services/queuing/__init__.py b/tempest/services/queuing/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/services/queuing/__init__.py
diff --git a/tempest/services/queuing/json/__init__.py b/tempest/services/queuing/json/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/services/queuing/json/__init__.py
diff --git a/tempest/services/queuing/json/queuing_client.py b/tempest/services/queuing/json/queuing_client.py
new file mode 100644
index 0000000..4a0c495
--- /dev/null
+++ b/tempest/services/queuing/json/queuing_client.py
@@ -0,0 +1,58 @@
+# Copyright (c) 2014 Rackspace, Inc.
+#
+# 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 json
+
+from tempest.common import rest_client
+from tempest import config
+
+CONF = config.CONF
+
+
+class QueuingClientJSON(rest_client.RestClient):
+
+    def __init__(self, auth_provider):
+        super(QueuingClientJSON, self).__init__(auth_provider)
+        self.service = CONF.queuing.catalog_type
+        self.version = '1'
+        self.uri_prefix = 'v{0}'.format(self.version)
+
+    def list_queues(self):
+        uri = '{0}/queues'.format(self.uri_prefix)
+        resp, body = self.get(uri)
+        body = json.loads(body)
+        return resp, body
+
+    def create_queue(self, queue_name):
+        uri = '{0}/queues/{1}'.format(self.uri_prefix, queue_name)
+        resp, body = self.put(uri, body=None)
+        return resp, body
+
+    def get_queue(self, queue_name):
+        uri = '{0}/queues/{1}'.format(self.uri_prefix, queue_name)
+        resp, body = self.get(uri)
+        body = json.loads(body)
+        return resp, body
+
+    def head_queue(self, queue_name):
+        uri = '{0}/queues/{1}'.format(self.uri_prefix, queue_name)
+        resp, body = self.head(uri)
+        body = json.loads(body)
+        return resp, body
+
+    def delete_queue(self, queue_name):
+        uri = '{0}/queues/{1}'.format(self.uri_prefix, queue_name)
+        resp = self.delete(uri)
+        return resp
diff --git a/tempest/services/telemetry/json/telemetry_client.py b/tempest/services/telemetry/json/telemetry_client.py
index e666475..996aceb 100644
--- a/tempest/services/telemetry/json/telemetry_client.py
+++ b/tempest/services/telemetry/json/telemetry_client.py
@@ -13,7 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest.openstack.common import jsonutils as json
 import tempest.services.telemetry.telemetry_client_base as client
 
@@ -21,7 +21,7 @@
 class TelemetryClientJSON(client.TelemetryClientBase):
 
     def get_rest_client(self, auth_provider):
-        return RestClient(auth_provider)
+        return rest_client.RestClient(auth_provider)
 
     def deserialize(self, body):
         return json.loads(body.replace("\n", ""))
diff --git a/tempest/services/telemetry/xml/telemetry_client.py b/tempest/services/telemetry/xml/telemetry_client.py
index 165f29a..673f98e 100644
--- a/tempest/services/telemetry/xml/telemetry_client.py
+++ b/tempest/services/telemetry/xml/telemetry_client.py
@@ -16,8 +16,7 @@
 from lxml import etree
 
 from tempest.common import rest_client
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import xml_to_json
+from tempest.services.compute.xml import common
 import tempest.services.telemetry.telemetry_client_base as client
 
 
@@ -32,11 +31,11 @@
     def _parse_array(self, body):
         array = []
         for child in body.getchildren():
-            array.append(xml_to_json(child))
+            array.append(common.xml_to_json(child))
         return array
 
     def serialize(self, body):
-        return str(Document(body))
+        return str(common.Document(body))
 
     def deserialize(self, body):
         return self._parse_array(etree.fromstring(body))
diff --git a/tempest/services/volume/json/admin/volume_hosts_client.py b/tempest/services/volume/json/admin/volume_hosts_client.py
index 6efb258..84e4705 100644
--- a/tempest/services/volume/json/admin/volume_hosts_client.py
+++ b/tempest/services/volume/json/admin/volume_hosts_client.py
@@ -16,13 +16,13 @@
 import json
 import urllib
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class VolumeHostsClientJSON(RestClient):
+class VolumeHostsClientJSON(rest_client.RestClient):
     """
     Client class to send CRUD Volume Hosts API requests to a Cinder endpoint
     """
diff --git a/tempest/services/volume/json/admin/volume_quotas_client.py b/tempest/services/volume/json/admin/volume_quotas_client.py
new file mode 100644
index 0000000..ea9c92e
--- /dev/null
+++ b/tempest/services/volume/json/admin/volume_quotas_client.py
@@ -0,0 +1,79 @@
+# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
+#
+# Author: Sylvain Baubeau <sylvain.baubeau@enovance.com>
+#
+#    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 urllib
+
+from tempest.openstack.common import jsonutils
+
+from tempest.common import rest_client
+from tempest import config
+
+CONF = config.CONF
+
+
+class VolumeQuotasClientJSON(rest_client.RestClient):
+    """
+    Client class to send CRUD Volume Quotas API requests to a Cinder endpoint
+    """
+
+    TYPE = "json"
+
+    def __init__(self, auth_provider):
+        super(VolumeQuotasClientJSON, self).__init__(auth_provider)
+
+        self.service = CONF.volume.catalog_type
+        self.build_interval = CONF.volume.build_interval
+        self.build_timeout = CONF.volume.build_timeout
+
+    def get_default_quota_set(self, tenant_id):
+        """List the default volume quota set for a tenant."""
+
+        url = 'os-quota-sets/%s/defaults' % tenant_id
+        resp, body = self.get(url)
+        return resp, self._parse_resp(body)
+
+    def get_quota_set(self, tenant_id, params=None):
+        """List the quota set for a tenant."""
+
+        url = 'os-quota-sets/%s' % tenant_id
+        if params:
+            url += '?%s' % urllib.urlencode(params)
+
+        resp, body = self.get(url)
+        return resp, self._parse_resp(body)
+
+    def get_quota_usage(self, tenant_id):
+        """List the quota set for a tenant."""
+
+        resp, body = self.get_quota_set(tenant_id, params={'usage': True})
+        return resp, body
+
+    def update_quota_set(self, tenant_id, gigabytes=None, volumes=None,
+                         snapshots=None):
+        post_body = {}
+
+        if gigabytes is not None:
+            post_body['gigabytes'] = gigabytes
+
+        if volumes is not None:
+            post_body['volumes'] = volumes
+
+        if snapshots is not None:
+            post_body['snapshots'] = snapshots
+
+        post_body = jsonutils.dumps({'quota_set': post_body})
+        resp, body = self.put('os-quota-sets/%s' % tenant_id, post_body)
+        return resp, self._parse_resp(body)
diff --git a/tempest/services/volume/json/admin/volume_types_client.py b/tempest/services/volume/json/admin/volume_types_client.py
index 0d50524..5554362 100644
--- a/tempest/services/volume/json/admin/volume_types_client.py
+++ b/tempest/services/volume/json/admin/volume_types_client.py
@@ -16,13 +16,13 @@
 import json
 import urllib
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class VolumeTypesClientJSON(RestClient):
+class VolumeTypesClientJSON(rest_client.RestClient):
     """
     Client class to send CRUD Volume Types API requests to a Cinder endpoint
     """
diff --git a/tempest/services/volume/json/backups_client.py b/tempest/services/volume/json/backups_client.py
index baaf5a0..183d06b 100644
--- a/tempest/services/volume/json/backups_client.py
+++ b/tempest/services/volume/json/backups_client.py
@@ -69,6 +69,13 @@
         body = json.loads(body)
         return resp, body['backup']
 
+    def list_backups_with_detail(self):
+        """Information for all the tenant's backups."""
+        url = "backups/detail"
+        resp, body = self.get(url)
+        body = json.loads(body)
+        return resp, body['backups']
+
     def wait_for_backup_status(self, backup_id, status):
         """Waits for a Backup to reach a given status."""
         resp, body = self.get_backup(backup_id)
diff --git a/tempest/services/volume/json/extensions_client.py b/tempest/services/volume/json/extensions_client.py
index 257b7c8..9e182ea 100644
--- a/tempest/services/volume/json/extensions_client.py
+++ b/tempest/services/volume/json/extensions_client.py
@@ -15,13 +15,13 @@
 
 import json
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 
 CONF = config.CONF
 
 
-class ExtensionsClientJSON(RestClient):
+class ExtensionsClientJSON(rest_client.RestClient):
 
     def __init__(self, auth_provider):
         super(ExtensionsClientJSON, self).__init__(auth_provider)
diff --git a/tempest/services/volume/json/snapshots_client.py b/tempest/services/volume/json/snapshots_client.py
index ba33c49..2dff63d 100644
--- a/tempest/services/volume/json/snapshots_client.py
+++ b/tempest/services/volume/json/snapshots_client.py
@@ -14,7 +14,7 @@
 import time
 import urllib
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common import log as logging
@@ -24,7 +24,7 @@
 LOG = logging.getLogger(__name__)
 
 
-class SnapshotsClientJSON(RestClient):
+class SnapshotsClientJSON(rest_client.RestClient):
     """Client class to send CRUD Volume API requests."""
 
     def __init__(self, auth_provider):
diff --git a/tempest/services/volume/json/volumes_client.py b/tempest/services/volume/json/volumes_client.py
index 2183c56..e4d2e8d 100644
--- a/tempest/services/volume/json/volumes_client.py
+++ b/tempest/services/volume/json/volumes_client.py
@@ -17,14 +17,14 @@
 import time
 import urllib
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
 
 CONF = config.CONF
 
 
-class VolumesClientJSON(RestClient):
+class VolumesClientJSON(rest_client.RestClient):
     """
     Client class to send CRUD Volume API requests to a Cinder endpoint
     """
diff --git a/tempest/services/volume/v2/json/volumes_client.py b/tempest/services/volume/v2/json/volumes_client.py
index bd98402..5bfa75f 100644
--- a/tempest/services/volume/v2/json/volumes_client.py
+++ b/tempest/services/volume/v2/json/volumes_client.py
@@ -17,14 +17,14 @@
 import time
 import urllib
 
-from tempest.common.rest_client import RestClient
+from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
 
 CONF = config.CONF
 
 
-class VolumesV2ClientJSON(RestClient):
+class VolumesV2ClientJSON(rest_client.RestClient):
     """
     Client class to send CRUD Volume V2 API requests to a Cinder endpoint
     """
diff --git a/tempest/services/volume/v2/xml/volumes_client.py b/tempest/services/volume/v2/xml/volumes_client.py
index bc57842..0b8f47c 100644
--- a/tempest/services/volume/v2/xml/volumes_client.py
+++ b/tempest/services/volume/v2/xml/volumes_client.py
@@ -21,11 +21,7 @@
 from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import Element
-from tempest.services.compute.xml.common import Text
-from tempest.services.compute.xml.common import xml_to_json
-from tempest.services.compute.xml.common import XMLNS_11
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -56,7 +52,7 @@
                                        meta.text) for meta in
                                        child.getchildren())
             else:
-                vol[tag] = xml_to_json(child)
+                vol[tag] = common.xml_to_json(child)
         return vol
 
     def get_attachment_from_volume(self, volume):
@@ -134,15 +130,15 @@
                          image
         """
         # NOTE(afazekas): it should use a volume namespace
-        volume = Element("volume", xmlns=XMLNS_11, size=size)
+        volume = common.Element("volume", xmlns=common.XMLNS_11, size=size)
 
         if 'metadata' in kwargs:
-            _metadata = Element('metadata')
+            _metadata = common.Element('metadata')
             volume.append(_metadata)
             for key, value in kwargs['metadata'].items():
-                meta = Element('meta')
+                meta = common.Element('meta')
                 meta.add_attr('key', key)
-                meta.append(Text(value))
+                meta.append(common.Text(value))
                 _metadata.append(meta)
             attr_to_add = kwargs.copy()
             del attr_to_add['metadata']
@@ -152,17 +148,17 @@
         for key, value in attr_to_add.items():
             volume.add_attr(key, value)
 
-        resp, body = self.post('volumes', str(Document(volume)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.post('volumes', str(common.Document(volume)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def update_volume(self, volume_id, **kwargs):
         """Updates the Specified Volume."""
-        put_body = Element("volume", xmlns=XMLNS_11, **kwargs)
+        put_body = common.Element("volume", xmlns=common.XMLNS_11, **kwargs)
 
         resp, body = self.put('volumes/%s' % volume_id,
-                              str(Document(put_body)))
-        body = xml_to_json(etree.fromstring(body))
+                              str(common.Document(put_body)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def delete_volume(self, volume_id):
@@ -198,108 +194,107 @@
 
     def attach_volume(self, volume_id, instance_uuid, mountpoint):
         """Attaches a volume to a given instance on a given mountpoint."""
-        post_body = Element("os-attach",
-                            instance_uuid=instance_uuid,
-                            mountpoint=mountpoint
-                            )
+        post_body = common.Element("os-attach",
+                                   instance_uuid=instance_uuid,
+                                   mountpoint=mountpoint
+                                   )
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def detach_volume(self, volume_id):
         """Detaches a volume from an instance."""
-        post_body = Element("os-detach")
+        post_body = common.Element("os-detach")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def upload_volume(self, volume_id, image_name, disk_format):
         """Uploads a volume in Glance."""
-        post_body = Element("os-volume_upload_image",
-                            image_name=image_name,
-                            disk_format=disk_format)
+        post_body = common.Element("os-volume_upload_image",
+                                   image_name=image_name,
+                                   disk_format=disk_format)
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
-        volume = xml_to_json(etree.fromstring(body))
+        resp, body = self.post(url, str(common.Document(post_body)))
+        volume = common.xml_to_json(etree.fromstring(body))
         return resp, volume
 
     def extend_volume(self, volume_id, extend_size):
         """Extend a volume."""
-        post_body = Element("os-extend",
-                            new_size=extend_size)
+        post_body = common.Element("os-extend",
+                                   new_size=extend_size)
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def reset_volume_status(self, volume_id, status):
         """Reset the Specified Volume's Status."""
-        post_body = Element("os-reset_status",
-                            status=status
-                            )
+        post_body = common.Element("os-reset_status",
+                                   status=status
+                                   )
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def volume_begin_detaching(self, volume_id):
         """Volume Begin Detaching."""
-        post_body = Element("os-begin_detaching")
+        post_body = common.Element("os-begin_detaching")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def volume_roll_detaching(self, volume_id):
         """Volume Roll Detaching."""
-        post_body = Element("os-roll_detaching")
+        post_body = common.Element("os-roll_detaching")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def reserve_volume(self, volume_id):
         """Reserves a volume."""
-        post_body = Element("os-reserve")
+        post_body = common.Element("os-reserve")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def unreserve_volume(self, volume_id):
         """Restore a reserved volume ."""
-        post_body = Element("os-unreserve")
+        post_body = common.Element("os-unreserve")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def create_volume_transfer(self, vol_id, name=None):
         """Create a volume transfer."""
-        post_body = Element("transfer",
-                            volume_id=vol_id)
+        post_body = common.Element("transfer", volume_id=vol_id)
         if name:
             post_body.add_attr('name', name)
         resp, body = self.post('os-volume-transfer',
-                               str(Document(post_body)))
-        volume = xml_to_json(etree.fromstring(body))
+                               str(common.Document(post_body)))
+        volume = common.xml_to_json(etree.fromstring(body))
         return resp, volume
 
     def get_volume_transfer(self, transfer_id):
         """Returns the details of a volume transfer."""
         url = "os-volume-transfer/%s" % str(transfer_id)
         resp, body = self.get(url)
-        volume = xml_to_json(etree.fromstring(body))
+        volume = common.xml_to_json(etree.fromstring(body))
         return resp, volume
 
     def list_volume_transfers(self, params=None):
@@ -321,7 +316,7 @@
             tag = child.tag
             if tag.startswith("{"):
                 tag = tag.split("}", 1)
-            vol[tag] = xml_to_json(child)
+            vol[tag] = common.xml_to_json(child)
         return vol
 
     def delete_volume_transfer(self, transfer_id):
@@ -330,36 +325,36 @@
 
     def accept_volume_transfer(self, transfer_id, transfer_auth_key):
         """Accept a volume transfer."""
-        post_body = Element("accept", auth_key=transfer_auth_key)
+        post_body = common.Element("accept", auth_key=transfer_auth_key)
         url = 'os-volume-transfer/%s/accept' % transfer_id
-        resp, body = self.post(url, str(Document(post_body)))
-        volume = xml_to_json(etree.fromstring(body))
+        resp, body = self.post(url, str(common.Document(post_body)))
+        volume = common.xml_to_json(etree.fromstring(body))
         return resp, volume
 
     def update_volume_readonly(self, volume_id, readonly):
         """Update the Specified Volume readonly."""
-        post_body = Element("os-update_readonly_flag",
-                            readonly=readonly)
+        post_body = common.Element("os-update_readonly_flag",
+                                   readonly=readonly)
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def force_delete_volume(self, volume_id):
         """Force Delete Volume."""
-        post_body = Element("os-force_delete")
+        post_body = common.Element("os-force_delete")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def _metadata_body(self, meta):
-        post_body = Element('metadata')
+        post_body = common.Element('metadata')
         for k, v in meta.items():
-            data = Element('meta', key=k)
-            data.append(Text(v))
+            data = common.Element('meta', key=k)
+            data.append(common.Text(v))
             post_body.append(data)
         return post_body
 
@@ -374,7 +369,7 @@
         """Create metadata for the volume."""
         post_body = self._metadata_body(metadata)
         resp, body = self.post('volumes/%s/metadata' % volume_id,
-                               str(Document(post_body)))
+                               str(common.Document(post_body)))
         body = self._parse_key_value(etree.fromstring(body))
         return resp, body
 
@@ -389,18 +384,18 @@
         """Update metadata for the volume."""
         put_body = self._metadata_body(metadata)
         url = "volumes/%s/metadata" % str(volume_id)
-        resp, body = self.put(url, str(Document(put_body)))
+        resp, body = self.put(url, str(common.Document(put_body)))
         body = self._parse_key_value(etree.fromstring(body))
         return resp, body
 
     def update_volume_metadata_item(self, volume_id, id, meta_item):
         """Update metadata item for the volume."""
         for k, v in meta_item.items():
-            put_body = Element('meta', key=k)
-            put_body.append(Text(v))
+            put_body = common.Element('meta', key=k)
+            put_body.append(common.Text(v))
         url = "volumes/%s/metadata/%s" % (str(volume_id), str(id))
-        resp, body = self.put(url, str(Document(put_body)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.put(url, str(common.Document(put_body)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def delete_volume_metadata_item(self, volume_id, id):
diff --git a/tempest/services/volume/xml/admin/volume_hosts_client.py b/tempest/services/volume/xml/admin/volume_hosts_client.py
index fb84c83..e34b9f0 100644
--- a/tempest/services/volume/xml/admin/volume_hosts_client.py
+++ b/tempest/services/volume/xml/admin/volume_hosts_client.py
@@ -19,7 +19,7 @@
 
 from tempest.common import rest_client
 from tempest import config
-from tempest.services.compute.xml.common import xml_to_json
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -58,7 +58,7 @@
         for child in node.getchildren():
             tag_list = child.tag.split('}', 1)
             if tag_list[0] == "host":
-                array.append(xml_to_json(child))
+                array.append(common.xml_to_json(child))
         return array
 
     def list_hosts(self, params=None):
diff --git a/tempest/services/volume/xml/admin/volume_quotas_client.py b/tempest/services/volume/xml/admin/volume_quotas_client.py
new file mode 100644
index 0000000..d2eac34
--- /dev/null
+++ b/tempest/services/volume/xml/admin/volume_quotas_client.py
@@ -0,0 +1,70 @@
+# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
+#
+# Author: Sylvain Baubeau <sylvain.baubeau@enovance.com>
+#
+#    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.
+
+from ast import literal_eval
+from lxml import etree
+
+from tempest import config
+from tempest.services.compute.xml import common as xml
+from tempest.services.volume.json.admin import volume_quotas_client
+
+CONF = config.CONF
+
+
+class VolumeQuotasClientXML(volume_quotas_client.VolumeQuotasClientJSON):
+    """
+    Client class to send CRUD Volume Quotas API requests to a Cinder endpoint
+    """
+
+    TYPE = "xml"
+
+    def _format_quota(self, q):
+        quota = {}
+        for k, v in q.items():
+            try:
+                v = literal_eval(v)
+            except (ValueError, SyntaxError):
+                pass
+
+            quota[k] = v
+
+        return quota
+
+    def get_quota_usage(self, tenant_id):
+        """List the quota set for a tenant."""
+
+        resp, body = self.get_quota_set(tenant_id, params={'usage': True})
+        return resp, self._format_quota(body)
+
+    def update_quota_set(self, tenant_id, gigabytes=None, volumes=None,
+                         snapshots=None):
+        post_body = {}
+        element = xml.Element("quota_set")
+
+        if gigabytes is not None:
+            post_body['gigabytes'] = gigabytes
+
+        if volumes is not None:
+            post_body['volumes'] = volumes
+
+        if snapshots is not None:
+            post_body['snapshots'] = snapshots
+
+        xml.deep_dict_to_xml(element, post_body)
+        resp, body = self.put('os-quota-sets/%s' % tenant_id,
+                              str(xml.Document(element)))
+        body = xml.xml_to_json(etree.fromstring(body))
+        return resp, self._format_quota(body)
diff --git a/tempest/services/volume/xml/admin/volume_types_client.py b/tempest/services/volume/xml/admin/volume_types_client.py
index 77bafec..1fa3e73 100644
--- a/tempest/services/volume/xml/admin/volume_types_client.py
+++ b/tempest/services/volume/xml/admin/volume_types_client.py
@@ -20,11 +20,7 @@
 from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import Element
-from tempest.services.compute.xml.common import Text
-from tempest.services.compute.xml.common import xml_to_json
-from tempest.services.compute.xml.common import XMLNS_11
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -53,7 +49,7 @@
                                                 meta.text)
                                                for meta in list(child))
             else:
-                vol_type[tag] = xml_to_json(child)
+                vol_type[tag] = common.xml_to_json(child)
             return vol_type
 
     def _parse_volume_type_extra_specs(self, body):
@@ -64,7 +60,7 @@
             if tag.startswith("{"):
                 ns, tag = tag.split("}", 1)
             else:
-                extra_spec[tag] = xml_to_json(child)
+                extra_spec[tag] = common.xml_to_json(child)
             return extra_spec
 
     def list_volume_types(self, params=None):
@@ -95,22 +91,22 @@
         Following optional keyword arguments are accepted:
         extra_specs: A dictionary of values to be used as extra_specs.
         """
-        vol_type = Element("volume_type", xmlns=XMLNS_11)
+        vol_type = common.Element("volume_type", xmlns=common.XMLNS_11)
         if name:
             vol_type.add_attr('name', name)
 
         extra_specs = kwargs.get('extra_specs')
         if extra_specs:
-            _extra_specs = Element('extra_specs')
+            _extra_specs = common.Element('extra_specs')
             vol_type.append(_extra_specs)
             for key, value in extra_specs.items():
-                spec = Element('extra_spec')
+                spec = common.Element('extra_spec')
                 spec.add_attr('key', key)
-                spec.append(Text(value))
+                spec.append(common.Text(value))
                 _extra_specs.append(spec)
 
-        resp, body = self.post('types', str(Document(vol_type)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.post('types', str(common.Document(vol_type)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def delete_volume_type(self, type_id):
@@ -147,21 +143,21 @@
         extra_specs: A dictionary of values to be used as extra_specs.
         """
         url = "types/%s/extra_specs" % str(vol_type_id)
-        extra_specs = Element("extra_specs", xmlns=XMLNS_11)
+        extra_specs = common.Element("extra_specs", xmlns=common.XMLNS_11)
         if extra_spec:
             if isinstance(extra_spec, list):
                 extra_specs.append(extra_spec)
             else:
                 for key, value in extra_spec.items():
-                    spec = Element('extra_spec')
+                    spec = common.Element('extra_spec')
                     spec.add_attr('key', key)
-                    spec.append(Text(value))
+                    spec.append(common.Text(value))
                     extra_specs.append(spec)
         else:
             extra_specs = None
 
-        resp, body = self.post(url, str(Document(extra_specs)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.post(url, str(common.Document(extra_specs)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def delete_volume_type_extra_specs(self, vol_id, extra_spec_name):
@@ -180,17 +176,17 @@
         """
         url = "types/%s/extra_specs/%s" % (str(vol_type_id),
                                            str(extra_spec_name))
-        extra_specs = Element("extra_specs", xmlns=XMLNS_11)
+        extra_specs = common.Element("extra_specs", xmlns=common.XMLNS_11)
 
         if extra_spec is not None:
             for key, value in extra_spec.items():
-                spec = Element('extra_spec')
+                spec = common.Element('extra_spec')
                 spec.add_attr('key', key)
-                spec.append(Text(value))
+                spec.append(common.Text(value))
                 extra_specs.append(spec)
 
-        resp, body = self.put(url, str(Document(extra_specs)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.put(url, str(common.Document(extra_specs)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def is_resource_deleted(self, id):
diff --git a/tempest/services/volume/xml/extensions_client.py b/tempest/services/volume/xml/extensions_client.py
index 1ea974f..4861733 100644
--- a/tempest/services/volume/xml/extensions_client.py
+++ b/tempest/services/volume/xml/extensions_client.py
@@ -17,7 +17,7 @@
 
 from tempest.common import rest_client
 from tempest import config
-from tempest.services.compute.xml.common import xml_to_json
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -32,7 +32,7 @@
     def _parse_array(self, node):
         array = []
         for child in node:
-            array.append(xml_to_json(child))
+            array.append(common.xml_to_json(child))
         return array
 
     def list_extensions(self):
diff --git a/tempest/services/volume/xml/snapshots_client.py b/tempest/services/volume/xml/snapshots_client.py
index 458001b..9ad86d2 100644
--- a/tempest/services/volume/xml/snapshots_client.py
+++ b/tempest/services/volume/xml/snapshots_client.py
@@ -19,11 +19,7 @@
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common import log as logging
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import Element
-from tempest.services.compute.xml.common import Text
-from tempest.services.compute.xml.common import xml_to_json
-from tempest.services.compute.xml.common import XMLNS_11
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -52,7 +48,7 @@
         body = etree.fromstring(body)
         snapshots = []
         for snap in body:
-            snapshots.append(xml_to_json(snap))
+            snapshots.append(common.xml_to_json(snap))
         return resp, snapshots
 
     def list_snapshots_with_detail(self, params=None):
@@ -66,7 +62,7 @@
         body = etree.fromstring(body)
         snapshots = []
         for snap in body:
-            snapshots.append(xml_to_json(snap))
+            snapshots.append(common.xml_to_json(snap))
         return resp, snapshots
 
     def get_snapshot(self, snapshot_id):
@@ -74,7 +70,7 @@
         url = "snapshots/%s" % str(snapshot_id)
         resp, body = self.get(url)
         body = etree.fromstring(body)
-        return resp, xml_to_json(body)
+        return resp, common.xml_to_json(body)
 
     def create_snapshot(self, volume_id, **kwargs):
         """Creates a new snapshot.
@@ -84,20 +80,22 @@
         display_description: User friendly snapshot description.
         """
         # NOTE(afazekas): it should use the volume namespace
-        snapshot = Element("snapshot", xmlns=XMLNS_11, volume_id=volume_id)
+        snapshot = common.Element("snapshot", xmlns=common.XMLNS_11,
+                                  volume_id=volume_id)
         for key, value in kwargs.items():
             snapshot.add_attr(key, value)
-        resp, body = self.post('snapshots', str(Document(snapshot)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.post('snapshots',
+                               str(common.Document(snapshot)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def update_snapshot(self, snapshot_id, **kwargs):
         """Updates a snapshot."""
-        put_body = Element("snapshot", xmlns=XMLNS_11, **kwargs)
+        put_body = common.Element("snapshot", xmlns=common.XMLNS_11, **kwargs)
 
         resp, body = self.put('snapshots/%s' % snapshot_id,
-                              str(Document(put_body)))
-        body = xml_to_json(etree.fromstring(body))
+                              str(common.Document(put_body)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     # NOTE(afazekas): just for the wait function
@@ -150,32 +148,30 @@
 
     def reset_snapshot_status(self, snapshot_id, status):
         """Reset the specified snapshot's status."""
-        post_body = Element("os-reset_status",
-                            status=status
-                            )
+        post_body = common.Element("os-reset_status", status=status)
         url = 'snapshots/%s/action' % str(snapshot_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def update_snapshot_status(self, snapshot_id, status, progress):
         """Update the specified snapshot's status."""
-        post_body = Element("os-update_snapshot_status",
-                            status=status,
-                            progress=progress
-                            )
+        post_body = common.Element("os-update_snapshot_status",
+                                   status=status,
+                                   progress=progress
+                                   )
         url = 'snapshots/%s/action' % str(snapshot_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def _metadata_body(self, meta):
-        post_body = Element('metadata')
+        post_body = common.Element('metadata')
         for k, v in meta.items():
-            data = Element('meta', key=k)
-            data.append(Text(v))
+            data = common.Element('meta', key=k)
+            data.append(common.Text(v))
             post_body.append(data)
         return post_body
 
@@ -190,7 +186,7 @@
         """Create metadata for the snapshot."""
         post_body = self._metadata_body(metadata)
         resp, body = self.post('snapshots/%s/metadata' % snapshot_id,
-                               str(Document(post_body)))
+                               str(common.Document(post_body)))
         body = self._parse_key_value(etree.fromstring(body))
         return resp, body
 
@@ -205,18 +201,18 @@
         """Update metadata for the snapshot."""
         put_body = self._metadata_body(metadata)
         url = "snapshots/%s/metadata" % str(snapshot_id)
-        resp, body = self.put(url, str(Document(put_body)))
+        resp, body = self.put(url, str(common.Document(put_body)))
         body = self._parse_key_value(etree.fromstring(body))
         return resp, body
 
     def update_snapshot_metadata_item(self, snapshot_id, id, meta_item):
         """Update metadata item for the snapshot."""
         for k, v in meta_item.items():
-            put_body = Element('meta', key=k)
-            put_body.append(Text(v))
+            put_body = common.Element('meta', key=k)
+            put_body.append(common.Text(v))
         url = "snapshots/%s/metadata/%s" % (str(snapshot_id), str(id))
-        resp, body = self.put(url, str(Document(put_body)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.put(url, str(common.Document(put_body)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def delete_snapshot_metadata_item(self, snapshot_id, id):
@@ -226,9 +222,9 @@
 
     def force_delete_snapshot(self, snapshot_id):
         """Force Delete Snapshot."""
-        post_body = Element("os-force_delete")
+        post_body = common.Element("os-force_delete")
         url = 'snapshots/%s/action' % str(snapshot_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
diff --git a/tempest/services/volume/xml/volumes_client.py b/tempest/services/volume/xml/volumes_client.py
index aef1e3c..8e886ce 100644
--- a/tempest/services/volume/xml/volumes_client.py
+++ b/tempest/services/volume/xml/volumes_client.py
@@ -17,16 +17,12 @@
 import urllib
 
 from lxml import etree
-from xml.sax.saxutils import escape
+from xml.sax import saxutils
 
 from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
-from tempest.services.compute.xml.common import Document
-from tempest.services.compute.xml.common import Element
-from tempest.services.compute.xml.common import Text
-from tempest.services.compute.xml.common import xml_to_json
-from tempest.services.compute.xml.common import XMLNS_11
+from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -55,7 +51,7 @@
                                        meta.text) for meta in
                                        child.getchildren())
             else:
-                vol[tag] = xml_to_json(child)
+                vol[tag] = common.xml_to_json(child)
         return vol
 
     def get_attachment_from_volume(self, volume):
@@ -135,15 +131,15 @@
                          image
         """
         # NOTE(afazekas): it should use a volume namespace
-        volume = Element("volume", xmlns=XMLNS_11, size=size)
+        volume = common.Element("volume", xmlns=common.XMLNS_11, size=size)
 
         if 'metadata' in kwargs:
-            _metadata = Element('metadata')
+            _metadata = common.Element('metadata')
             volume.append(_metadata)
             for key, value in kwargs['metadata'].items():
-                meta = Element('meta')
+                meta = common.Element('meta')
                 meta.add_attr('key', key)
-                meta.append(Text(value))
+                meta.append(common.Text(value))
                 _metadata.append(meta)
             attr_to_add = kwargs.copy()
             del attr_to_add['metadata']
@@ -153,17 +149,17 @@
         for key, value in attr_to_add.items():
             volume.add_attr(key, value)
 
-        resp, body = self.post('volumes', str(Document(volume)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.post('volumes', str(common.Document(volume)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def update_volume(self, volume_id, **kwargs):
         """Updates the Specified Volume."""
-        put_body = Element("volume", xmlns=XMLNS_11, **kwargs)
+        put_body = common.Element("volume", xmlns=common.XMLNS_11, **kwargs)
 
         resp, body = self.put('volumes/%s' % volume_id,
-                              str(Document(put_body)))
-        body = xml_to_json(etree.fromstring(body))
+                              str(common.Document(put_body)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def delete_volume(self, volume_id):
@@ -199,108 +195,108 @@
 
     def attach_volume(self, volume_id, instance_uuid, mountpoint):
         """Attaches a volume to a given instance on a given mountpoint."""
-        post_body = Element("os-attach",
-                            instance_uuid=instance_uuid,
-                            mountpoint=mountpoint
-                            )
+        post_body = common.Element("os-attach",
+                                   instance_uuid=instance_uuid,
+                                   mountpoint=mountpoint
+                                   )
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def detach_volume(self, volume_id):
         """Detaches a volume from an instance."""
-        post_body = Element("os-detach")
+        post_body = common.Element("os-detach")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def upload_volume(self, volume_id, image_name, disk_format):
         """Uploads a volume in Glance."""
-        post_body = Element("os-volume_upload_image",
-                            image_name=image_name,
-                            disk_format=disk_format)
+        post_body = common.Element("os-volume_upload_image",
+                                   image_name=image_name,
+                                   disk_format=disk_format)
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
-        volume = xml_to_json(etree.fromstring(body))
+        resp, body = self.post(url, str(common.Document(post_body)))
+        volume = common.xml_to_json(etree.fromstring(body))
         return resp, volume
 
     def extend_volume(self, volume_id, extend_size):
         """Extend a volume."""
-        post_body = Element("os-extend",
-                            new_size=extend_size)
+        post_body = common.Element("os-extend",
+                                   new_size=extend_size)
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def reset_volume_status(self, volume_id, status):
         """Reset the Specified Volume's Status."""
-        post_body = Element("os-reset_status",
-                            status=status
-                            )
+        post_body = common.Element("os-reset_status",
+                                   status=status
+                                   )
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def volume_begin_detaching(self, volume_id):
         """Volume Begin Detaching."""
-        post_body = Element("os-begin_detaching")
+        post_body = common.Element("os-begin_detaching")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def volume_roll_detaching(self, volume_id):
         """Volume Roll Detaching."""
-        post_body = Element("os-roll_detaching")
+        post_body = common.Element("os-roll_detaching")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def reserve_volume(self, volume_id):
         """Reserves a volume."""
-        post_body = Element("os-reserve")
+        post_body = common.Element("os-reserve")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def unreserve_volume(self, volume_id):
         """Restore a reserved volume ."""
-        post_body = Element("os-unreserve")
+        post_body = common.Element("os-unreserve")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def create_volume_transfer(self, vol_id, display_name=None):
         """Create a volume transfer."""
-        post_body = Element("transfer",
-                            volume_id=vol_id)
+        post_body = common.Element("transfer",
+                                   volume_id=vol_id)
         if display_name:
             post_body.add_attr('name', display_name)
         resp, body = self.post('os-volume-transfer',
-                               str(Document(post_body)))
-        volume = xml_to_json(etree.fromstring(body))
+                               str(common.Document(post_body)))
+        volume = common.xml_to_json(etree.fromstring(body))
         return resp, volume
 
     def get_volume_transfer(self, transfer_id):
         """Returns the details of a volume transfer."""
         url = "os-volume-transfer/%s" % str(transfer_id)
         resp, body = self.get(url)
-        volume = xml_to_json(etree.fromstring(body))
+        volume = common.xml_to_json(etree.fromstring(body))
         return resp, volume
 
     def list_volume_transfers(self, params=None):
@@ -322,7 +318,7 @@
             tag = child.tag
             if tag.startswith("{"):
                 tag = tag.split("}", 1)
-            vol[tag] = xml_to_json(child)
+            vol[tag] = common.xml_to_json(child)
         return vol
 
     def delete_volume_transfer(self, transfer_id):
@@ -331,37 +327,37 @@
 
     def accept_volume_transfer(self, transfer_id, transfer_auth_key):
         """Accept a volume transfer."""
-        post_body = Element("accept", auth_key=transfer_auth_key)
+        post_body = common.Element("accept", auth_key=transfer_auth_key)
         url = 'os-volume-transfer/%s/accept' % transfer_id
-        resp, body = self.post(url, str(Document(post_body)))
-        volume = xml_to_json(etree.fromstring(body))
+        resp, body = self.post(url, str(common.Document(post_body)))
+        volume = common.xml_to_json(etree.fromstring(body))
         return resp, volume
 
     def update_volume_readonly(self, volume_id, readonly):
         """Update the Specified Volume readonly."""
-        post_body = Element("os-update_readonly_flag",
-                            readonly=readonly)
+        post_body = common.Element("os-update_readonly_flag",
+                                   readonly=readonly)
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def force_delete_volume(self, volume_id):
         """Force Delete Volume."""
-        post_body = Element("os-force_delete")
+        post_body = common.Element("os-force_delete")
         url = 'volumes/%s/action' % str(volume_id)
-        resp, body = self.post(url, str(Document(post_body)))
+        resp, body = self.post(url, str(common.Document(post_body)))
         if body:
-            body = xml_to_json(etree.fromstring(body))
+            body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def _metadata_body(self, meta):
-        post_body = Element('metadata')
+        post_body = common.Element('metadata')
         for k, v in meta.items():
-            data = Element('meta', key=k)
+            data = common.Element('meta', key=k)
             # Escape value to allow for special XML chars
-            data.append(Text(escape(v)))
+            data.append(common.Text(saxutils.escape(v)))
             post_body.append(data)
         return post_body
 
@@ -376,7 +372,7 @@
         """Create metadata for the volume."""
         post_body = self._metadata_body(metadata)
         resp, body = self.post('volumes/%s/metadata' % volume_id,
-                               str(Document(post_body)))
+                               str(common.Document(post_body)))
         body = self._parse_key_value(etree.fromstring(body))
         return resp, body
 
@@ -391,18 +387,18 @@
         """Update metadata for the volume."""
         put_body = self._metadata_body(metadata)
         url = "volumes/%s/metadata" % str(volume_id)
-        resp, body = self.put(url, str(Document(put_body)))
+        resp, body = self.put(url, str(common.Document(put_body)))
         body = self._parse_key_value(etree.fromstring(body))
         return resp, body
 
     def update_volume_metadata_item(self, volume_id, id, meta_item):
         """Update metadata item for the volume."""
         for k, v in meta_item.items():
-            put_body = Element('meta', key=k)
-            put_body.append(Text(v))
+            put_body = common.Element('meta', key=k)
+            put_body.append(common.Text(v))
         url = "volumes/%s/metadata/%s" % (str(volume_id), str(id))
-        resp, body = self.put(url, str(Document(put_body)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.put(url, str(common.Document(put_body)))
+        body = common.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def delete_volume_metadata_item(self, volume_id, id):
diff --git a/tempest/test.py b/tempest/test.py
index c6e3d6e..2125047 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -27,10 +27,11 @@
 import testtools
 
 from tempest import clients
-from tempest.common import generate_json
+import tempest.common.generator.valid_generator as valid
 from tempest.common import isolated_creds
 from tempest import config
 from tempest import exceptions
+from tempest.openstack.common import importutils
 from tempest.openstack.common import log as logging
 
 LOG = logging.getLogger(__name__)
@@ -400,7 +401,8 @@
         """
         description = NegativeAutoTest.load_schema(description_file)
         LOG.debug(description)
-        generate_json.validate_negative_test_schema(description)
+        generator = importutils.import_class(CONF.negative.test_generator)()
+        generator.validate_schema(description)
         schema = description.get("json-schema", None)
         resources = description.get("resources", [])
         scenario_list = []
@@ -416,7 +418,7 @@
                                              "expected_result": expected_result
                                              }))
         if schema is not None:
-            for invalid in generate_json.generate_invalid(schema):
+            for invalid in generator.generate(schema):
                 scenario_list.append((invalid[0],
                                       {"schema": invalid[1],
                                        "expected_result": invalid[2]}))
@@ -459,11 +461,12 @@
             # Note(mkoderer): The resources list already contains an invalid
             # entry (see get_resource).
             # We just send a valid json-schema with it
-            valid = None
+            valid_schema = None
             schema = description.get("json-schema", None)
             if schema:
-                valid = generate_json.generate_valid(schema)
-            new_url, body = self._http_arguments(valid, url, method)
+                valid_schema = \
+                    valid.ValidTestGenerator().generate_valid(schema)
+            new_url, body = self._http_arguments(valid_schema, url, method)
         elif hasattr(self, "schema"):
             new_url, body = self._http_arguments(self.schema, url, method)
 
diff --git a/tempest/tests/fake_config.py b/tempest/tests/fake_config.py
index 41b0558..e941606 100644
--- a/tempest/tests/fake_config.py
+++ b/tempest/tests/fake_config.py
@@ -43,6 +43,10 @@
         swift = True
         horizon = True
 
+    class fake_negative(object):
+        test_generator = 'tempest.common.' \
+            'generator.negative_generator.NegativeTestGenerator'
+
     compute_feature_enabled = fake_compute_feature_enabled()
     volume_feature_enabled = fake_default_feature_enabled()
     network_feature_enabled = fake_default_feature_enabled()
@@ -52,3 +56,5 @@
 
     compute = fake_compute()
     identity = fake_identity()
+
+    negative = fake_negative()
diff --git a/tempest/tests/negative/test_generate_json.py b/tempest/tests/negative/test_generate_json.py
index a0aa088..e09fcdf 100644
--- a/tempest/tests/negative/test_generate_json.py
+++ b/tempest/tests/negative/test_generate_json.py
@@ -13,11 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest.common import generate_json as gen
+from tempest.common.generator import negative_generator
 import tempest.test
 
 
-class TestGenerateJson(tempest.test.BaseTestCase):
+class TestNegativeGenerator(tempest.test.BaseTestCase):
 
     fake_input_str = {"type": "string",
                       "minLength": 2,
@@ -35,19 +35,23 @@
                                      }
                       }
 
+    def setUp(self):
+        super(TestNegativeGenerator, self).setUp()
+        self.negative = negative_generator.NegativeTestGenerator()
+
     def _validate_result(self, data):
         self.assertTrue(isinstance(data, list))
         for t in data:
             self.assertTrue(isinstance(t, tuple))
 
     def test_generate_invalid_string(self):
-        result = gen.generate_invalid(self.fake_input_str)
+        result = self.negative.generate(self.fake_input_str)
         self._validate_result(result)
 
     def test_generate_invalid_integer(self):
-        result = gen.generate_invalid(self.fake_input_int)
+        result = self.negative.generate(self.fake_input_int)
         self._validate_result(result)
 
     def test_generate_invalid_obj(self):
-        result = gen.generate_invalid(self.fake_input_obj)
+        result = self.negative.generate(self.fake_input_obj)
         self._validate_result(result)
diff --git a/tempest/tests/negative/test_negative_auto_test.py b/tempest/tests/negative/test_negative_auto_test.py
index 4c59383..27ddc95 100644
--- a/tempest/tests/negative/test_negative_auto_test.py
+++ b/tempest/tests/negative/test_negative_auto_test.py
@@ -16,9 +16,11 @@
 import mock
 
 import tempest.test as test
+from tempest.tests import base
+from tempest.tests import fake_config
 
 
-class TestNegativeAutoTest(test.BaseTestCase):
+class TestNegativeAutoTest(base.TestCase):
     # Fake entries
     _interface = 'json'
     _service = 'compute'
@@ -34,6 +36,10 @@
                        "resources": ["flavor", "volume", "image"]
                        }
 
+    def setUp(self):
+        super(TestNegativeAutoTest, self).setUp()
+        self.stubs.Set(test, 'CONF', fake_config.FakeConfig)
+
     def _check_prop_entries(self, result, entry):
         entries = [a for a in result if entry in a[0]]
         self.assertIsNotNone(entries)
diff --git a/tempest/tests/test_rest_client.py b/tempest/tests/test_rest_client.py
index 9f07972..827b5c9 100644
--- a/tempest/tests/test_rest_client.py
+++ b/tempest/tests/test_rest_client.py
@@ -230,3 +230,114 @@
         data = {"one_top_key": "not_list_or_dict_value"}
         body = self.rest_client._parse_resp(json.dumps(data))
         self.assertEqual(data, body)
+
+
+class TestRestClientErrorCheckerJSON(base.TestCase):
+    c_type = "application/json"
+
+    def set_data(self, r_code, enc=None, r_body=None):
+        if enc is None:
+            enc = self.c_type
+        resp_dict = {'status': r_code, 'content-type': enc}
+        resp = httplib2.Response(resp_dict)
+        data = {
+            "method": "fake_method",
+            "url": "fake_url",
+            "headers": "fake_headers",
+            "body": "fake_body",
+            "resp": resp,
+            "resp_body": '{"resp_body": "fake_resp_body"}',
+        }
+        if r_body is not None:
+            data.update({"resp_body": r_body})
+        return data
+
+    def setUp(self):
+        super(TestRestClientErrorCheckerJSON, self).setUp()
+        self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakeConfig)
+        self.rest_client = rest_client.RestClient(
+            fake_auth_provider.FakeAuthProvider())
+
+    def test_response_less_than_400(self):
+        self.rest_client._error_checker(**self.set_data("399"))
+
+    def test_response_400(self):
+        self.assertRaises(exceptions.BadRequest,
+                          self.rest_client._error_checker,
+                          **self.set_data("400"))
+
+    def test_response_401(self):
+        self.assertRaises(exceptions.Unauthorized,
+                          self.rest_client._error_checker,
+                          **self.set_data("401"))
+
+    def test_response_403(self):
+        self.assertRaises(exceptions.Unauthorized,
+                          self.rest_client._error_checker,
+                          **self.set_data("403"))
+
+    def test_response_404(self):
+        self.assertRaises(exceptions.NotFound,
+                          self.rest_client._error_checker,
+                          **self.set_data("404"))
+
+    def test_response_409(self):
+        self.assertRaises(exceptions.Conflict,
+                          self.rest_client._error_checker,
+                          **self.set_data("409"))
+
+    def test_response_413(self):
+        self.assertRaises(exceptions.OverLimit,
+                          self.rest_client._error_checker,
+                          **self.set_data("413"))
+
+    def test_response_422(self):
+        self.assertRaises(exceptions.UnprocessableEntity,
+                          self.rest_client._error_checker,
+                          **self.set_data("422"))
+
+    def test_response_500_with_text(self):
+        # _parse_resp is expected to return 'str'
+        self.assertRaises(exceptions.ServerFault,
+                          self.rest_client._error_checker,
+                          **self.set_data("500"))
+
+    def test_response_501_with_text(self):
+        self.assertRaises(exceptions.ServerFault,
+                          self.rest_client._error_checker,
+                          **self.set_data("501"))
+
+    def test_response_500_with_dict(self):
+        r_body = '{"resp_body": {"err": "fake_resp_body"}}'
+        self.assertRaises(exceptions.ServerFault,
+                          self.rest_client._error_checker,
+                          **self.set_data("500", r_body=r_body))
+
+    def test_response_501_with_dict(self):
+        r_body = '{"resp_body": {"err": "fake_resp_body"}}'
+        self.assertRaises(exceptions.ServerFault,
+                          self.rest_client._error_checker,
+                          **self.set_data("501", r_body=r_body))
+
+    def test_response_bigger_than_400(self):
+        # Any response code, that bigger than 400, and not in
+        # (401, 403, 404, 409, 413, 422, 500, 501)
+        self.assertRaises(exceptions.UnexpectedResponseCode,
+                          self.rest_client._error_checker,
+                          **self.set_data("402"))
+
+
+class TestRestClientErrorCheckerXML(TestRestClientErrorCheckerJSON):
+    c_type = "application/xml"
+
+
+class TestRestClientErrorCheckerTEXT(TestRestClientErrorCheckerJSON):
+    c_type = "text/plain"
+
+    def test_fake_content_type(self):
+        # This test is required only in one exemplar
+        # Any response code, that bigger than 400, and not in
+        # (401, 403, 404, 409, 413, 422, 500, 501)
+        self.assertRaises(exceptions.InvalidContentType,
+                          self.rest_client._error_checker,
+                          **self.set_data("405", enc="fake_enc"))
diff --git a/tools/check_logs.py b/tools/check_logs.py
index 98e079a..edf95a1 100755
--- a/tools/check_logs.py
+++ b/tools/check_logs.py
@@ -25,20 +25,24 @@
 import yaml
 
 
-is_neutron = os.environ.get('DEVSTACK_GATE_NEUTRON', "0") == "1"
 is_grenade = (os.environ.get('DEVSTACK_GATE_GRENADE', "0") == "1" or
               os.environ.get('DEVSTACK_GATE_GRENADE_FORWARD', "0") == "1")
 dump_all_errors = True
 
+# As logs are made clean, add to this set
+must_be_clean = set(['c-sch', 'g-reg', 'ceilometer-alarm-notifier',
+                     'ceilometer-collector', 'horizon', 'n-crt', 'n-obj',
+                     'q-vpn'])
+
 
 def process_files(file_specs, url_specs, whitelists):
     regexp = re.compile(r"^.* (ERROR|CRITICAL|TRACE) .*\[.*\-.*\]")
-    had_errors = False
+    logs_with_errors = []
     for (name, filename) in file_specs:
         whitelist = whitelists.get(name, [])
         with open(filename) as content:
             if scan_content(name, content, regexp, whitelist):
-                had_errors = True
+                logs_with_errors.append(name)
     for (name, url) in url_specs:
         whitelist = whitelists.get(name, [])
         req = urllib2.Request(url)
@@ -47,8 +51,8 @@
         buf = StringIO.StringIO(page.read())
         f = gzip.GzipFile(fileobj=buf)
         if scan_content(name, f.read().splitlines(), regexp, whitelist):
-            had_errors = True
-    return had_errors
+            logs_with_errors.append(name)
+    return logs_with_errors
 
 
 def scan_content(name, content, regexp, whitelist):
@@ -122,19 +126,22 @@
                     assert 'module' in w, 'no module in %s' % name
                     assert 'message' in w, 'no message in %s' % name
             whitelists = loaded
-    if process_files(files_to_process, urls_to_process, whitelists):
+    logs_with_errors = process_files(files_to_process, urls_to_process,
+                                     whitelists)
+    if logs_with_errors:
         print("Logs have errors")
-        if is_neutron:
-            print("Currently not failing neutron builds with errors")
-            return 0
-        if is_grenade:
-            print("Currently not failing grenade runs with errors")
-            return 0
-        print("FAILED")
-        return 1
-    else:
-        print("ok")
+    if is_grenade:
+        print("Currently not failing grenade runs with errors")
         return 0
+    failed = False
+    for log in logs_with_errors:
+        if log in must_be_clean:
+            print("FAILED: %s" % log)
+            failed = True
+    if failed:
+        return 1
+    print("ok")
+    return 0
 
 usage = """
 Find non-white-listed log errors in log files from a devstack-gate run.
