diff --git a/.gitignore b/.gitignore
index 8d2b281..28a9b9c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,5 +15,5 @@
 dist
 build
 .testrepository
-.coverage
+.coverage*
 cover/
diff --git a/.testr.conf b/.testr.conf
index abaf14a..4f6e0b3 100644
--- a/.testr.conf
+++ b/.testr.conf
@@ -2,6 +2,7 @@
 test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
              OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
              OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
+             OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
              ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./tempest/test_discover} $LISTOPT $IDOPTION
 test_id_option=--load-list $IDFILE
 test_list_option=--list
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 8ab3505..761a077 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -347,6 +347,13 @@
 # Does the test environment support resizing? (boolean value)
 #resize=false
 
+# Does the test environment support pausing? (boolean value)
+#pause=true
+
+# Does the test environment support suspend/resume? (boolean
+# value)
+#suspend=true
+
 # Does the test environment support live migration available?
 # (boolean value)
 #live_migration=false
diff --git a/etc/whitelist.yaml b/etc/whitelist.yaml
index 2d8b741..e69de29 100644
--- a/etc/whitelist.yaml
+++ b/etc/whitelist.yaml
@@ -1,233 +0,0 @@
-n-cpu:
-    - module: "nova.virt.libvirt.driver"
-      message: "During wait destroy, instance disappeared"
-    - module: "glanceclient.common.http"
-      message: "Request returned failure status"
-    - module: "nova.openstack.common.periodic_task"
-      message: "Error during ComputeManager\\.update_available_resource: \
-        'NoneType' object is not iterable"
-    - module: "nova.compute.manager"
-      message: "Possibly task preempted"
-    - module: "nova.openstack.common.rpc.amqp"
-      message: "Exception during message handling"
-    - module: "nova.network.api"
-      message: "Failed storing info cache"
-    - module: "nova.compute.manager"
-      message: "Error while trying to clean up image"
-    - module: "nova.virt.libvirt.driver"
-      message: "Error injecting data into image.*\\(Unexpected error while \
-        running command"
-    - module: "nova.compute.manager"
-      message: "Instance failed to spawn"
-    - module: "nova.compute.manager"
-      message: "Error: Unexpected error while running command"
-    - module: "nova.virt.libvirt.driver"
-      message: "Error from libvirt during destroy"
-    - module: "nova.virt.libvirt.vif"
-      message: "Failed while unplugging vif"
-    - module: "nova.openstack.common.loopingcal"
-      message: "in fixed duration looping call"
-    - module: "nova.virt.libvirt.driver"
-      message: "Getting disk size of instance"
-    - module: "nova.virt.libvirt.driver"
-      message: "No such file or directory: '/opt/stack/data/nova/instances"
-    - module: "nova.virt.libvirt.driver"
-      message: "Nova requires libvirt version 0\\.9\\.11 or greater"
-    - module: "nova.compute.manager"
-      message: "error during stop\\(\\) in sync_power_state"
-    - module: "nova.compute.manager"
-      message: "Instance failed network setup after 1 attempt"
-    - module: "nova.compute.manager"
-      message: "Periodic sync_power_state task had an error"
-    - module: "nova.virt.driver"
-      message: "Info cache for instance .* could not be found"
-
-g-api:
-    - module: "glance.store.sheepdog"
-      message: "Error in store configuration: Unexpected error while \
-        running command"
-    - module: "swiftclient"
-      message: "Container HEAD failed: .*404 Not Found"
-    - module: "glance.api.middleware.cache"
-      message: "however the registry did not contain metadata for that image"
-    - module: "oslo.messaging.notify._impl_messaging"
-      message: ".*"
-
-ceilometer-acompute:
-    - module: "ceilometer.compute.pollsters.disk"
-      message: "Unable to read from monitor: Connection reset by peer"
-    - module: "ceilometer.compute.pollsters.disk"
-      message: "Requested operation is not valid: domain is not running"
-    - module: "ceilometer.compute.pollsters.net"
-      message: "Requested operation is not valid: domain is not running"
-    - module: "ceilometer.compute.pollsters.disk"
-      message: "Domain not found: no domain with matching uuid"
-    - module: "ceilometer.compute.pollsters.net"
-      message: "Domain not found: no domain with matching uuid"
-    - module: "ceilometer.compute.pollsters.net"
-      message: "No module named libvirt"
-    - module: "ceilometer.compute.pollsters.net"
-      message: "Unable to write to monitor: Broken pipe"
-    - module: "ceilometer.compute.pollsters.cpu"
-      message: "Domain not found: no domain with matching uuid"
-    - module: "ceilometer.compute.pollsters.net"
-      message: ".*"
-    - module: "ceilometer.compute.pollsters.disk"
-      message: ".*"
-
-ceilometer-acentral:
-    - module: "ceilometer.central.manager"
-      message: "403 Forbidden"
-    - module: "ceilometer.central.manager"
-      message: "get_samples\\(\\) got an unexpected keyword argument 'resources'"
-
-ceilometer-alarm-evaluator:
-    - module: "ceilometer.alarm.service"
-      message: "alarm evaluation cycle failed"
-    - module: "ceilometer.alarm.evaluator.threshold"
-      message: ".*"
-
-ceilometer-api:
-    - module: "wsme.api"
-      message: ".*"
-
-h-api:
-    - module: "root"
-      message: "Returning 400 to user: The server could not comply with \
-        the request since it is either malformed or otherwise incorrect"
-    - module: "root"
-      message: "Unexpected error occurred serving API: Request limit \
-        exceeded: Template exceeds maximum allowed size"
-    - module: "root"
-      message: "Unexpected error occurred serving API: The Stack \
-        .*could not be found"
-
-h-eng:
-    - module: "heat.openstack.common.rpc.amqp"
-      message: "Exception during message handling"
-    - module: "heat.openstack.common.rpc.common"
-      message: "The Stack .* could not be found"
-
-n-api:
-    - module: "glanceclient.common.http"
-      message: "Request returned failure status"
-    - module: "nova.api.openstack"
-      message: "Caught error: Quota exceeded for"
-    - module: "nova.compute.api"
-      message: "ServerDiskConfigTest"
-    - module: "nova.compute.api"
-      message: "ServersTest"
-    - module: "nova.compute.api"
-      message: "\\{u'kernel_id'.*u'ramdisk_id':"
-    - module: "nova.api.openstack.wsgi"
-      message: "takes exactly 4 arguments"
-    - module: "nova.api.openstack"
-      message: "Caught error: Instance .* could not be found"
-    - module: "nova.api.metadata.handler"
-      message: "Failed to get metadata for instance id:"
-
-n-cond:
-    - module: "nova.notifications"
-      message: "Failed to send state update notification"
-    - module: "nova.openstack.common.rpc.amqp"
-      message: "Exception during message handling"
-    - module: "nova.openstack.common.rpc.common"
-      message: "but the actual state is deleting to caller"
-    - module: "nova.openstack.common.rpc.common"
-      message: "Traceback \\(most recent call last"
-    - module: "nova.openstack.common.threadgroup"
-      message: "Service with host .* topic conductor exists."
-
-n-sch:
-    - module: "nova.scheduler.filter_scheduler"
-      message: "Error from last host: "
-
-n-net:
-    - module: "nova.openstack.common.rpc.amqp"
-      message: "Exception during message handling"
-    - module: "nova.openstack.common.rpc.common"
-      message: "'NoneType' object has no attribute '__getitem__'"
-    - module: "nova.openstack.common.rpc.common"
-      message: "Instance .* could not be found"
-
-c-api:
-    - module: "cinder.api.middleware.fault"
-      message: "Caught error: Volume .* could not be found"
-    - module: "cinder.api.middleware.fault"
-      message: "Caught error: Snapshot .* could not be found"
-    - module: "cinder.api.openstack.wsgi"
-      message: "argument must be a string or a number, not 'NoneType'"
-    - module: "cinder.volume.api"
-      message: "Volume status must be available to reserve"
-
-c-vol:
-    - module: "cinder.brick.iscsi.iscsi"
-      message: "Failed to create iscsi target for volume id"
-    - module: "cinder.brick.local_dev.lvm"
-      message: "stat failed: No such file or directory"
-    - module: "cinder.brick.local_dev.lvm"
-      message: "LV stack-volumes.*in use: not deactivating"
-    - module: "cinder.brick.local_dev.lvm"
-      message: "Can't remove open logical volume"
-
-ceilometer-collector:
-    - module: "stevedore.extension"
-      message: ".*"
-    - module: "ceilometer.collector.dispatcher.database"
-      message: "duplicate key value violates unique constraint"
-    - module: "ceilometer.collector.dispatcher.database"
-      message: "Failed to record metering data: QueuePool limit"
-    - module: "ceilometer.dispatcher.database"
-      message: "\\(DataError\\) integer out of range"
-    - module: "ceilometer.collector.dispatcher.database"
-      message: "Failed to record metering data: .* integer out of range"
-    - module: "ceilometer.collector.dispatcher.database"
-      message: "Failed to record metering data: .* integer out of range"
-    - module: "ceilometer.openstack.common.db.sqlalchemy.session"
-      message: "DB exception wrapped"
-
-q-agt:
-    - module: "neutron.agent.linux.ovs_lib"
-      message: "Unable to execute.*Exception:"
-
-q-dhcp:
-    - module: "neutron.common.legacy"
-      message: "Skipping unknown group key: firewall_driver"
-    - module: "neutron.agent.dhcp_agent"
-      message: "Unable to enable dhcp"
-    - module: "neutron.agent.dhcp_agent"
-      message: "Network .* RPC info call failed"
-
-q-l3:
-    - module: "neutron.common.legacy"
-      message: "Skipping unknown group key: firewall_driver"
-    - module: "neutron.agent.l3_agent"
-      message: "Failed synchronizing routers"
-
-q-vpn:
-    - module: "neutron.common.legacy"
-      message: "Skipping unknown group key: firewall_driver"
-
-q-lbaas:
-    - module: "neutron.common.legacy"
-      message: "Skipping unknown group key: firewall_driver"
-    - module: "neutron.services.loadbalancer.drivers.haproxy.agent_manager"
-      message: "Error upating stats"
-    - module: "neutron.services.loadbalancer.drivers.haproxy.agent_manager"
-      message: "Unable to destroy device for pool"
-
-q-svc:
-    - module: "neutron.common.legacy"
-      message: "Skipping unknown group key: firewall_driver"
-    - module: "neutron.openstack.common.rpc.amqp"
-      message: "Exception during message handling"
-    - module: "neutron.openstack.common.rpc.common"
-      message: "(Network|Pool|Subnet|Agent|Port) .* could not be found"
-    - module: "neutron.api.v2.resource"
-      message: ".* failed"
-    - module: ".*"
-      message: ".*"
-
-s-proxy:
-    - module: "proxy-server"
-      message: "Timeout talking to memcached"
diff --git a/requirements.txt b/requirements.txt
index 434e12e..a18b092 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -13,7 +13,7 @@
 python-neutronclient>=2.3.4,<3
 python-cinderclient>=1.0.6
 python-heatclient>=0.2.3
-python-savannaclient>=0.5.0
+python-saharaclient>=0.6.0
 python-swiftclient>=1.6
 testresources>=0.2.4
 keyring>=1.6.1,<2.0,>=2.1
diff --git a/tempest/api/compute/admin/test_flavors.py b/tempest/api/compute/admin/test_flavors.py
index 05b763a..759585e 100644
--- a/tempest/api/compute/admin/test_flavors.py
+++ b/tempest/api/compute/admin/test_flavors.py
@@ -170,10 +170,12 @@
                 flag = True
         self.assertTrue(flag)
 
+    @test.skip_because(bug='1286297')
     @test.attr(type='gate')
     def test_list_non_public_flavor(self):
-        # Create a flavor with os-flavor-access:is_public false should
-        # be present in list_details.
+        # Create a flavor with os-flavor-access:is_public false.
+        # The flavor should not be present in list_details as the
+        # tenant is not automatically added access list.
         # This operation requires the user to have 'admin' role
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
         new_flavor_id = data_utils.rand_int_id(start=1000)
@@ -192,7 +194,7 @@
         for flavor in flavors:
             if flavor['name'] == flavor_name:
                 flag = True
-        self.assertTrue(flag)
+        self.assertFalse(flag)
 
         # Verify flavor is not retrieved with other user
         flag = False
diff --git a/tempest/api/compute/admin/test_flavors_access.py b/tempest/api/compute/admin/test_flavors_access.py
index 4804ce4..aa0138f 100644
--- a/tempest/api/compute/admin/test_flavors_access.py
+++ b/tempest/api/compute/admin/test_flavors_access.py
@@ -46,9 +46,11 @@
         cls.vcpus = 1
         cls.disk = 10
 
+    @test.skip_because(bug='1286297')
     @test.attr(type='gate')
     def test_flavor_access_list_with_private_flavor(self):
-        # Test to list flavor access successfully by querying private flavor
+        # Test to make sure that list flavor access on a newly created
+        # private flavor will return an empty access list
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
         new_flavor_id = data_utils.rand_int_id(start=1000)
         resp, new_flavor = self.client.create_flavor(flavor_name,
@@ -60,10 +62,7 @@
         self.assertEqual(resp.status, 200)
         resp, flavor_access = self.client.list_flavor_access(new_flavor_id)
         self.assertEqual(resp.status, 200)
-        self.assertEqual(len(flavor_access), 1, str(flavor_access))
-        first_flavor = flavor_access[0]
-        self.assertEqual(str(new_flavor_id), str(first_flavor['flavor_id']))
-        self.assertEqual(self.adm_tenant_id, first_flavor['tenant_id'])
+        self.assertEqual(len(flavor_access), 0, str(flavor_access))
 
     @test.attr(type='gate')
     def test_flavor_access_add_remove(self):
diff --git a/tempest/api/compute/admin/test_flavors_negative.py b/tempest/api/compute/admin/test_flavors_negative.py
index b882ff4..162e419 100644
--- a/tempest/api/compute/admin/test_flavors_negative.py
+++ b/tempest/api/compute/admin/test_flavors_negative.py
@@ -13,7 +13,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testscenarios
 import uuid
 
 from tempest.api.compute import base
@@ -21,7 +20,7 @@
 from tempest import exceptions
 from tempest import test
 
-load_tests = testscenarios.load_tests_apply_scenarios
+load_tests = test.NegativeAutoTest.load_tests
 
 
 class FlavorsAdminNegativeTestJSON(base.BaseV2ComputeAdminTest):
@@ -108,8 +107,6 @@
     _service = 'compute'
     _schema_file = 'compute/admin/flavor_create.json'
 
-    scenarios = test.NegativeAutoTest.generate_scenario(_schema_file)
-
     @test.attr(type=['negative', 'gate'])
     def test_create_flavor(self):
         # flavor details are not returned for non-existent flavors
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index 40a4df7..1f2ddf4 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -27,6 +27,7 @@
     _host_key = 'OS-EXT-SRV-ATTR:host'
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(ServersAdminTestJSON, cls).setUpClass()
         cls.client = cls.os_adm.servers_client
@@ -184,6 +185,16 @@
         resp, server_body = self.client.inject_network_info(server['id'])
         self.assertEqual(202, resp.status)
 
+    @test.attr(type='gate')
+    def test_create_server_with_scheduling_hint(self):
+        # Create a server with scheduler hints.
+        hints = {
+            'same_host': self.s1_id
+        }
+        resp, server = self.create_test_server(sched_hints=hints,
+                                               wait_until='ACTIVE')
+        self.assertEqual('202', resp['status'])
+
 
 class ServersAdminTestXML(ServersAdminTestJSON):
     _host_key = (
diff --git a/tempest/api/compute/flavors/test_flavors_negative.py b/tempest/api/compute/flavors/test_flavors_negative.py
index 4ba5023..a81b7d9 100644
--- a/tempest/api/compute/flavors/test_flavors_negative.py
+++ b/tempest/api/compute/flavors/test_flavors_negative.py
@@ -13,13 +13,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testscenarios
 
 from tempest.api.compute import base
 from tempest import test
 
 
-load_tests = testscenarios.load_tests_apply_scenarios
+load_tests = test.NegativeAutoTest.load_tests
 
 
 class FlavorsListNegativeTestJSON(base.BaseV2ComputeTest,
@@ -27,8 +26,6 @@
     _service = 'compute'
     _schema_file = 'compute/flavors/flavors_list.json'
 
-    scenarios = test.NegativeAutoTest.generate_scenario(_schema_file)
-
     @test.attr(type=['negative', 'gate'])
     def test_list_flavors_with_detail(self):
         self.execute(self._schema_file)
@@ -39,8 +36,6 @@
     _service = 'compute'
     _schema_file = 'compute/flavors/flavor_details.json'
 
-    scenarios = test.NegativeAutoTest.generate_scenario(_schema_file)
-
     @classmethod
     def setUpClass(cls):
         super(FlavorDetailsNegativeTestJSON, cls).setUpClass()
diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
index 5de2436..29df2b0 100644
--- a/tempest/api/compute/images/test_images.py
+++ b/tempest/api/compute/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
@@ -32,48 +31,6 @@
         cls.client = cls.images_client
         cls.servers_client = cls.servers_client
 
-    @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_from_server,
-                          server['id'], name=name, meta=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_from_server,
-                          '!@#$%^&*()', name=name, meta=meta)
-
-    @test.attr(type=['negative', 'gate'])
-    def test_create_image_from_stopped_server(self):
-        resp, server = self.create_test_server(wait_until='ACTIVE')
-        self.servers_client.stop(server['id'])
-        self.servers_client.wait_for_server_status(server['id'],
-                                                   'SHUTOFF')
-        self.addCleanup(self.servers_client.delete_server, server['id'])
-        snapshot_name = data_utils.rand_name('test-snap-')
-        resp, image = self.create_image_from_server(server['id'],
-                                                    name=snapshot_name,
-                                                    wait_until='ACTIVE',
-                                                    wait_for_server=False)
-        self.addCleanup(self.client.delete_image, image['id'])
-        self.assertEqual(snapshot_name, image['name'])
-
     @test.attr(type='gate')
     def test_delete_saving_image(self):
         snapshot_name = data_utils.rand_name('test-snap-')
@@ -85,59 +42,6 @@
         resp, body = self.client.delete_image(image['id'])
         self.assertEqual('204', 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.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.client.create_image,
-                          test_uuid, snapshot_name)
-
-    @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,
-                          '!@$%^&*()')
-
-    @test.attr(type=['negative', 'gate'])
-    def test_delete_non_existent_image(self):
-        # Return an error while trying to delete a non-existent image
-
-        non_existent_image_id = '11a22b9-12a9-5555-cc11-00ab112223fa'
-        self.assertRaises(exceptions.NotFound, self.client.delete_image,
-                          non_existent_image_id)
-
-    @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, '')
-
-    @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)
-
-    @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)
-
-    @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,
-                          '11a22b9-12a9-5555-cc11-00ab112223fa-3fac')
-
 
 class ImagesTestXML(ImagesTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/images/test_images_negative.py b/tempest/api/compute/images/test_images_negative.py
new file mode 100644
index 0000000..ae00ae2
--- /dev/null
+++ b/tempest/api/compute/images/test_images_negative.py
@@ -0,0 +1,131 @@
+# Copyright 2012 OpenStack Foundation
+#
+#    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 ImagesNegativeTestJSON(base.BaseV2ComputeTest):
+
+    @classmethod
+    def setUpClass(cls):
+        super(ImagesNegativeTestJSON, 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
+        cls.servers_client = cls.servers_client
+
+    @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_from_server,
+                          server['id'], name=name, meta=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_from_server,
+                          '!@#$%^&*()', name=name, meta=meta)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_create_image_from_stopped_server(self):
+        resp, server = self.create_test_server(wait_until='ACTIVE')
+        self.servers_client.stop(server['id'])
+        self.servers_client.wait_for_server_status(server['id'],
+                                                   'SHUTOFF')
+        self.addCleanup(self.servers_client.delete_server, server['id'])
+        snapshot_name = data_utils.rand_name('test-snap-')
+        resp, image = self.create_image_from_server(server['id'],
+                                                    name=snapshot_name,
+                                                    wait_until='ACTIVE',
+                                                    wait_for_server=False)
+        self.addCleanup(self.client.delete_image, image['id'])
+        self.assertEqual(snapshot_name, image['name'])
+
+    @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.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.client.create_image,
+                          test_uuid, snapshot_name)
+
+    @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,
+                          '!@$%^&*()')
+
+    @test.attr(type=['negative', 'gate'])
+    def test_delete_non_existent_image(self):
+        # Return an error while trying to delete a non-existent image
+
+        non_existent_image_id = '11a22b9-12a9-5555-cc11-00ab112223fa'
+        self.assertRaises(exceptions.NotFound, self.client.delete_image,
+                          non_existent_image_id)
+
+    @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, '')
+
+    @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)
+
+    @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)
+
+    @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,
+                          '11a22b9-12a9-5555-cc11-00ab112223fa-3fac')
+
+
+class ImagesNegativeTestXML(ImagesNegativeTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index 538ebc6..3736f28 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -61,8 +61,11 @@
     @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-')
+        # with char space between name along with
+        # leading and trailing spaces
+        s_name = ' %s ' % data_utils.rand_name('securitygroup ')
         resp, securitygroup = self.create_security_group(name=s_name)
+        self.assertEqual(200, resp.status)
         self.assertIn('name', securitygroup)
         securitygroup_name = securitygroup['name']
         self.assertEqual(securitygroup_name, s_name,
diff --git a/tempest/api/compute/servers/test_delete_server.py b/tempest/api/compute/servers/test_delete_server.py
index 5e011dd..7e34213 100644
--- a/tempest/api/compute/servers/test_delete_server.py
+++ b/tempest/api/compute/servers/test_delete_server.py
@@ -23,6 +23,8 @@
 
 
 class DeleteServersTestJSON(base.BaseV2ComputeTest):
+    pause_available = CONF.compute_feature_enabled.pause
+
     # NOTE: Server creations of each test class should be under 10
     # for preventing "Quota exceeded for instances"
 
@@ -57,6 +59,7 @@
         self.assertEqual('204', resp['status'])
         self.client.wait_for_server_termination(server['id'])
 
+    @testtools.skipIf(not pause_available, 'Pause is not available.')
     @test.attr(type='gate')
     def test_delete_server_while_in_pause_state(self):
         # Delete a server while it's VM state is Pause
diff --git a/tempest/api/compute/servers/test_list_servers_negative.py b/tempest/api/compute/servers/test_list_servers_negative.py
index c825fb9..768cc11 100644
--- a/tempest/api/compute/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/servers/test_list_servers_negative.py
@@ -26,6 +26,7 @@
     force_tenant_isolation = True
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(ListServersNegativeTestJSON, cls).setUpClass()
         cls.client = cls.servers_client
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 21465d8..72ccc71 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -14,7 +14,6 @@
 #    under the License.
 
 import base64
-import time
 
 import testtools
 import urlparse
@@ -31,6 +30,8 @@
 
 class ServerActionsTestJSON(base.BaseV2ComputeTest):
     resize_available = CONF.compute_feature_enabled.resize
+    pause_available = CONF.compute_feature_enabled.pause
+    suspend_available = CONF.compute_feature_enabled.suspend
     run_ssh = CONF.compute.run_ssh
 
     def setUp(self):
@@ -220,18 +221,8 @@
         self.client.revert_resize(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
-        # Need to poll for the id change until lp#924371 is fixed
         resp, server = self.client.get_server(self.server_id)
-        start = int(time.time())
-
-        while server['flavor']['id'] != previous_flavor_ref:
-            time.sleep(self.build_interval)
-            resp, server = self.client.get_server(self.server_id)
-
-            if int(time.time()) - start >= self.build_timeout:
-                message = 'Server %s failed to revert resize within the \
-                required time (%s s).' % (self.server_id, self.build_timeout)
-                raise exceptions.TimeoutException(message)
+        self.assertEqual(previous_flavor_ref, server['flavor']['id'])
 
     @test.attr(type='gate')
     def test_create_backup(self):
@@ -351,6 +342,7 @@
 
         self.wait_for(self._get_output)
 
+    @testtools.skipIf(not pause_available, 'Pause is not available.')
     @test.attr(type='gate')
     def test_pause_unpause_server(self):
         resp, server = self.client.pause_server(self.server_id)
@@ -360,6 +352,7 @@
         self.assertEqual(202, resp.status)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
+    @testtools.skipIf(not suspend_available, 'Suspend is not available.')
     @test.attr(type='gate')
     def test_suspend_resume_server(self):
         resp, server = self.client.suspend_server(self.server_id)
diff --git a/tempest/api/compute/servers/test_server_personality.py b/tempest/api/compute/servers/test_server_personality.py
index b7e4e38..ddfc1d5 100644
--- a/tempest/api/compute/servers/test_server_personality.py
+++ b/tempest/api/compute/servers/test_server_personality.py
@@ -60,6 +60,25 @@
         resp, server = self.create_test_server(personality=person)
         self.assertEqual('202', resp['status'])
 
+    @test.attr(type='gate')
+    def test_create_server_with_existent_personality_file(self):
+        # Any existing file that match specified file will be renamed to
+        # include the bak extension appended with a time stamp
+
+        # TODO(zhikunliu): will add validations when ssh instance validation
+        # re-factor is ready
+        file_contents = 'This is a test file.'
+        personality = [{'path': '/test.txt',
+                       'contents': base64.b64encode(file_contents)}]
+        resp, server = self.create_test_server(personality=personality,
+                                               wait_until="ACTIVE")
+        resp, image = self.create_image_from_server(server['id'],
+                                                    wait_until="ACTIVE")
+        resp, server = self.create_test_server(image_id=image['id'],
+                                               personality=personality,
+                                               wait_until="ACTIVE")
+        self.assertEqual('202', resp['status'])
+
 
 class ServerPersonalityTestXML(ServerPersonalityTestJSON):
     _interface = "xml"
diff --git a/tempest/api/compute/servers/test_server_rescue.py b/tempest/api/compute/servers/test_server_rescue.py
index 48f2e14..093e9e2 100644
--- a/tempest/api/compute/servers/test_server_rescue.py
+++ b/tempest/api/compute/servers/test_server_rescue.py
@@ -21,6 +21,7 @@
 class ServerRescueTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         cls.set_network_resources(network=True, subnet=True, router=True)
         super(ServerRescueTestJSON, cls).setUpClass()
diff --git a/tempest/api/compute/servers/test_server_rescue_negative.py b/tempest/api/compute/servers/test_server_rescue_negative.py
index e027567..ef45585 100644
--- a/tempest/api/compute/servers/test_server_rescue_negative.py
+++ b/tempest/api/compute/servers/test_server_rescue_negative.py
@@ -22,6 +22,7 @@
 class ServerRescueNegativeTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         cls.set_network_resources(network=True, subnet=True, router=True)
         super(ServerRescueNegativeTestJSON, cls).setUpClass()
diff --git a/tempest/api/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py
index 4cccbd6..cbfec5c 100644
--- a/tempest/api/compute/servers/test_servers_negative.py
+++ b/tempest/api/compute/servers/test_servers_negative.py
@@ -16,6 +16,8 @@
 import base64
 import sys
 
+import testtools
+
 from tempest.api.compute import base
 from tempest import clients
 from tempest.common.utils import data_utils
@@ -27,6 +29,8 @@
 
 
 class ServersNegativeTestJSON(base.BaseV2ComputeTest):
+    pause_available = CONF.compute_feature_enabled.pause
+    suspend_available = CONF.compute_feature_enabled.suspend
 
     def setUp(self):
         super(ServersNegativeTestJSON, self).setUp()
@@ -125,6 +129,7 @@
         self.assertRaises(exceptions.NotFound, self.client.reboot,
                           nonexistent_server, 'SOFT')
 
+    @testtools.skipIf(not pause_available, 'Pause is not available.')
     @test.attr(type=['negative', 'gate'])
     def test_pause_paused_server(self):
         # Pause a paused server.
@@ -304,6 +309,7 @@
         self.assertRaises(exceptions.NotFound, self.servers_client.stop,
                           nonexistent_server)
 
+    @testtools.skipIf(not pause_available, 'Pause is not available.')
     @test.attr(type=['negative', 'gate'])
     def test_pause_non_existent_server(self):
         # pause a non existent server
@@ -311,6 +317,7 @@
         self.assertRaises(exceptions.NotFound, self.client.pause_server,
                           nonexistent_server)
 
+    @testtools.skipIf(not pause_available, 'Pause is not available.')
     @test.attr(type=['negative', 'gate'])
     def test_unpause_non_existent_server(self):
         # unpause a non existent server
@@ -318,6 +325,7 @@
         self.assertRaises(exceptions.NotFound, self.client.unpause_server,
                           nonexistent_server)
 
+    @testtools.skipIf(not pause_available, 'Pause is not available.')
     @test.attr(type=['negative', 'gate'])
     def test_unpause_server_invalid_state(self):
         # unpause an active server.
@@ -325,6 +333,7 @@
                           self.client.unpause_server,
                           self.server_id)
 
+    @testtools.skipIf(not suspend_available, 'Suspend is not available.')
     @test.attr(type=['negative', 'gate'])
     def test_suspend_non_existent_server(self):
         # suspend a non existent server
@@ -332,6 +341,7 @@
         self.assertRaises(exceptions.NotFound, self.client.suspend_server,
                           nonexistent_server)
 
+    @testtools.skipIf(not suspend_available, 'Suspend is not available.')
     @test.attr(type=['negative', 'gate'])
     def test_suspend_server_invalid_state(self):
         # suspend a suspended server.
@@ -344,6 +354,7 @@
                           self.client.suspend_server,
                           self.server_id)
 
+    @testtools.skipIf(not suspend_available, 'Suspend is not available.')
     @test.attr(type=['negative', 'gate'])
     def test_resume_non_existent_server(self):
         # resume a non existent server
@@ -351,6 +362,7 @@
         self.assertRaises(exceptions.NotFound, self.client.resume_server,
                           nonexistent_server)
 
+    @testtools.skipIf(not suspend_available, 'Suspend is not available.')
     @test.attr(type=['negative', 'gate'])
     def test_resume_server_invalid_state(self):
         # resume an active server.
diff --git a/tempest/api/compute/servers/test_servers_negative_new.py b/tempest/api/compute/servers/test_servers_negative_new.py
index 42ace76..f860ff9 100644
--- a/tempest/api/compute/servers/test_servers_negative_new.py
+++ b/tempest/api/compute/servers/test_servers_negative_new.py
@@ -13,13 +13,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testscenarios
 
 from tempest.api.compute import base
 from tempest import test
 
 
-load_tests = testscenarios.load_tests_apply_scenarios
+load_tests = test.NegativeAutoTest.load_tests
 
 
 class GetConsoleOutputNegativeTestJSON(base.BaseV2ComputeTest,
@@ -27,8 +26,6 @@
     _service = 'compute'
     _schema_file = 'compute/servers/get_console_output.json'
 
-    scenarios = test.NegativeAutoTest.generate_scenario(_schema_file)
-
     @classmethod
     def setUpClass(cls):
         super(GetConsoleOutputNegativeTestJSON, cls).setUpClass()
diff --git a/tempest/api/compute/test_quotas.py b/tempest/api/compute/test_quotas.py
index 230d433..4db8c56 100644
--- a/tempest/api/compute/test_quotas.py
+++ b/tempest/api/compute/test_quotas.py
@@ -27,6 +27,9 @@
         resp, tenants = cls.admin_client.list_tenants()
         cls.tenant_id = [tnt['id'] for tnt in tenants if tnt['name'] ==
                          cls.client.tenant_name][0]
+        resp, users = cls.admin_client.list_users_for_tenant(cls.tenant_id)
+        cls.user_id = [user['id'] for user in users if user['name'] ==
+                       cls.client.user][0]
         cls.default_quota_set = set(('injected_file_content_bytes',
                                      'metadata_items', 'injected_files',
                                      'ram', 'floating_ips',
@@ -45,6 +48,14 @@
                          sorted(quota_set.keys()))
         self.assertEqual(quota_set['id'], self.tenant_id)
 
+        # get the quota set using user id
+        resp, quota_set = self.client.get_quota_set(self.tenant_id,
+                                                    self.user_id)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(sorted(expected_quota_set),
+                         sorted(quota_set.keys()))
+        self.assertEqual(quota_set['id'], self.tenant_id)
+
     @test.attr(type='smoke')
     def test_get_default_quotas(self):
         # User can get the default quota set for it's tenant
diff --git a/tempest/api/compute/v3/admin/test_servers.py b/tempest/api/compute/v3/admin/test_servers.py
index fb8afe4..579a535 100644
--- a/tempest/api/compute/v3/admin/test_servers.py
+++ b/tempest/api/compute/v3/admin/test_servers.py
@@ -27,6 +27,7 @@
     _host_key = 'os-extended-server-attributes:host'
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(ServersAdminV3Test, cls).setUpClass()
         cls.client = cls.servers_admin_client
diff --git a/tempest/api/compute/v3/flavors/test_flavors_negative.py b/tempest/api/compute/v3/flavors/test_flavors_negative.py
index 346f6d6..1c0e4fb 100644
--- a/tempest/api/compute/v3/flavors/test_flavors_negative.py
+++ b/tempest/api/compute/v3/flavors/test_flavors_negative.py
@@ -13,13 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testscenarios
-
 from tempest.api.compute import base
 from tempest import test
 
 
-load_tests = testscenarios.load_tests_apply_scenarios
+load_tests = test.NegativeAutoTest.load_tests
 
 
 class FlavorsListNegativeV3Test(base.BaseV3ComputeTest,
@@ -27,8 +25,6 @@
     _service = 'computev3'
     _schema_file = 'compute/flavors/flavors_list_v3.json'
 
-    scenarios = test.NegativeAutoTest.generate_scenario(_schema_file)
-
     @test.attr(type=['negative', 'gate'])
     def test_list_flavors_with_detail(self):
         self.execute(self._schema_file)
@@ -39,8 +35,6 @@
     _service = 'computev3'
     _schema_file = 'compute/flavors/flavor_details_v3.json'
 
-    scenarios = test.NegativeAutoTest.generate_scenario(_schema_file)
-
     @classmethod
     def setUpClass(cls):
         super(FlavorDetailsNegativeV3Test, cls).setUpClass()
diff --git a/tempest/api/compute/v3/servers/test_create_server.py b/tempest/api/compute/v3/servers/test_create_server.py
index 7e9aaf2..14a4338 100644
--- a/tempest/api/compute/v3/servers/test_create_server.py
+++ b/tempest/api/compute/v3/servers/test_create_server.py
@@ -92,14 +92,6 @@
 
     @testtools.skipIf(not run_ssh, 'Instance validation tests are disabled.')
     @test.attr(type='gate')
-    def test_can_log_into_created_server(self):
-        # Check that the user can authenticate with the generated password
-        linux_client = remote_client.RemoteClient(self.server,
-                                                  self.ssh_user, self.password)
-        self.assertTrue(linux_client.can_authenticate())
-
-    @testtools.skipIf(not run_ssh, 'Instance validation tests are disabled.')
-    @test.attr(type='gate')
     def test_verify_created_server_vcpus(self):
         # Verify that the number of vcpus reported by the instance matches
         # the amount stated by the flavor
diff --git a/tempest/api/compute/v3/servers/test_list_servers_negative.py b/tempest/api/compute/v3/servers/test_list_servers_negative.py
index 92f44fe..9cbc4e0 100644
--- a/tempest/api/compute/v3/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/v3/servers/test_list_servers_negative.py
@@ -19,13 +19,14 @@
 
 from tempest.api.compute import base
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class ListServersNegativeV3Test(base.BaseV3ComputeTest):
     force_tenant_isolation = True
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(ListServersNegativeV3Test, cls).setUpClass()
         cls.client = cls.servers_client
@@ -51,7 +52,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 +64,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 +73,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 +82,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 +91,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,33 +100,33 @@
         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})
         self.assertEqual('200', resp['status'])
         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()}
@@ -138,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'}
@@ -152,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/v3/servers/test_server_actions.py b/tempest/api/compute/v3/servers/test_server_actions.py
index 555d028..2582fa8 100644
--- a/tempest/api/compute/v3/servers/test_server_actions.py
+++ b/tempest/api/compute/v3/servers/test_server_actions.py
@@ -13,8 +13,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import time
-
 import testtools
 
 from tempest.api.compute import base
@@ -212,18 +210,8 @@
         self.client.revert_resize(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
-        # Need to poll for the id change until lp#924371 is fixed
         resp, server = self.client.get_server(self.server_id)
-        start = int(time.time())
-
-        while server['flavor']['id'] != previous_flavor_ref:
-            time.sleep(self.build_interval)
-            resp, server = self.client.get_server(self.server_id)
-
-            if int(time.time()) - start >= self.build_timeout:
-                message = 'Server %s failed to revert resize within the \
-                required time (%s s).' % (self.server_id, self.build_timeout)
-                raise exceptions.TimeoutException(message)
+        self.assertEqual(previous_flavor_ref, server['flavor']['id'])
 
     @test.attr(type='gate')
     def test_create_backup(self):
diff --git a/tempest/api/compute/v3/servers/test_server_rescue_negative.py b/tempest/api/compute/v3/servers/test_server_rescue_negative.py
index 6e09376..6bb441c 100644
--- a/tempest/api/compute/v3/servers/test_server_rescue_negative.py
+++ b/tempest/api/compute/v3/servers/test_server_rescue_negative.py
@@ -22,6 +22,7 @@
 class ServerRescueNegativeV3Test(base.BaseV3ComputeTest):
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(ServerRescueNegativeV3Test, cls).setUpClass()
         cls.device = 'vdf'
diff --git a/tempest/api/compute/v3/test_quotas.py b/tempest/api/compute/v3/test_quotas.py
index b53d9be..3fe62e9 100644
--- a/tempest/api/compute/v3/test_quotas.py
+++ b/tempest/api/compute/v3/test_quotas.py
@@ -27,6 +27,9 @@
         resp, tenants = cls.admin_client.list_tenants()
         cls.tenant_id = [tnt['id'] for tnt in tenants if tnt['name'] ==
                          cls.client.tenant_name][0]
+        resp, users = cls.admin_client.list_users_for_tenant(cls.tenant_id)
+        cls.user_id = [user['id'] for user in users if user['name'] ==
+                       cls.client.user][0]
         cls.default_quota_set = set(('metadata_items',
                                      'ram', 'floating_ips',
                                      'fixed_ips', 'key_pairs',
@@ -43,6 +46,14 @@
                          sorted(quota_set.keys()))
         self.assertEqual(quota_set['id'], self.tenant_id)
 
+        # get the quota set using user id
+        resp, quota_set = self.client.get_quota_set(self.tenant_id,
+                                                    self.user_id)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(sorted(expected_quota_set),
+                         sorted(quota_set.keys()))
+        self.assertEqual(quota_set['id'], self.tenant_id)
+
     @test.attr(type='smoke')
     def test_get_default_quotas(self):
         # User can get the default quota set for it's tenant
diff --git a/tempest/api/identity/admin/test_roles.py b/tempest/api/identity/admin/test_roles.py
index 5e78cce..307e21d 100644
--- a/tempest/api/identity/admin/test_roles.py
+++ b/tempest/api/identity/admin/test_roles.py
@@ -17,13 +17,14 @@
 
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class RolesTestJSON(base.BaseIdentityV2AdminTest):
     _interface = 'json'
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(RolesTestJSON, cls).setUpClass()
         for _ in moves.xrange(5):
@@ -46,7 +47,7 @@
                 found = True
         self.assertTrue(found, "assigned role was not in list")
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_roles(self):
         # Return a list of all roles
         resp, body = self.client.list_roles()
@@ -54,7 +55,7 @@
         self.assertTrue(any(found))
         self.assertEqual(len(found), len(self.data.roles))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_role_create_delete(self):
         # Role should be created, verified, and deleted
         role_name = data_utils.rand_name(name='role-test-')
@@ -75,7 +76,19 @@
         found = [role for role in body if role['name'] == role_name]
         self.assertFalse(any(found))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
+    def test_get_role_by_id(self):
+        # Get a role by its id
+        self.data.setup_test_role()
+        role_id = self.data.role['id']
+        role_name = self.data.role['name']
+        resp, body = self.client.get_role(role_id)
+        self.assertIn('status', resp)
+        self.assertTrue('200', resp['status'])
+        self.assertEqual(role_id, body['id'])
+        self.assertEqual(role_name, body['name'])
+
+    @test.attr(type='gate')
     def test_assign_user_role(self):
         # Assign a role to a user on a tenant
         (user, tenant, role) = self._get_role_params()
@@ -83,7 +96,7 @@
         resp, roles = self.client.list_user_roles(tenant['id'], user['id'])
         self.assert_role_in_role_list(role, roles)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_remove_user_role(self):
         # Remove a role assigned to a user on a tenant
         (user, tenant, role) = self._get_role_params()
@@ -93,7 +106,7 @@
                                                   user_role['id'])
         self.assertEqual(resp['status'], '204')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_user_roles(self):
         # List roles assigned to a user on tenant
         (user, tenant, role) = self._get_role_params()
diff --git a/tempest/api/identity/admin/test_services.py b/tempest/api/identity/admin/test_services.py
index 459c44c..b0e6cdb 100644
--- a/tempest/api/identity/admin/test_services.py
+++ b/tempest/api/identity/admin/test_services.py
@@ -66,6 +66,20 @@
         self.assertEqual(fetched_service['description'],
                          service_data['description'])
 
+    @attr(type='gate')
+    def test_create_service_without_description(self):
+        # Create a service only with name and type
+        name = data_utils.rand_name('service-')
+        type = data_utils.rand_name('type--')
+        resp, service = self.client.create_service(name, type)
+        self.assertIn('id', service)
+        self.assertTrue('200', resp['status'])
+        self.addCleanup(self._del_service, service['id'])
+        self.assertIn('name', service)
+        self.assertEqual(name, service['name'])
+        self.assertIn('type', service)
+        self.assertEqual(type, service['type'])
+
     @attr(type='smoke')
     def test_list_services(self):
         # Create, List, Verify and Delete Services
diff --git a/tempest/api/identity/admin/test_tokens.py b/tempest/api/identity/admin/test_tokens.py
index 533f374..c931bcf 100644
--- a/tempest/api/identity/admin/test_tokens.py
+++ b/tempest/api/identity/admin/test_tokens.py
@@ -56,6 +56,49 @@
         resp, body = self.client.delete_token(token_id)
         self.assertEqual(resp['status'], '204')
 
+    @attr(type='gate')
+    def test_rescope_token(self):
+        """An unscoped token can be requested, that token can be used to
+           request a scoped token.
+        """
+
+        # Create a user.
+        user_name = data_utils.rand_name(name='user-')
+        user_password = data_utils.rand_name(name='pass-')
+        tenant_id = None  # No default tenant so will get unscoped token.
+        email = ''
+        resp, user = self.client.create_user(user_name, user_password,
+                                             tenant_id, email)
+        self.assertEqual(200, resp.status)
+        self.data.users.append(user)
+
+        # Create a tenant.
+        tenant_name = data_utils.rand_name(name='tenant-')
+        resp, tenant = self.client.create_tenant(tenant_name)
+        self.assertEqual(200, resp.status)
+        self.data.tenants.append(tenant)
+
+        # Create a role
+        role_name = data_utils.rand_name(name='role-')
+        resp, role = self.client.create_role(role_name)
+        self.assertEqual(200, resp.status)
+        self.data.roles.append(role)
+
+        # Grant the user the role on the tenant.
+        resp, _ = self.client.assign_user_role(tenant['id'], user['id'],
+                                               role['id'])
+        self.assertEqual(200, resp.status)
+
+        # Get an unscoped token.
+        rsp, body = self.token_client.auth(user_name, user_password)
+        self.assertEqual(200, resp.status)
+
+        token_id = body['token']['id']
+
+        # Use the unscoped token to get a scoped token.
+        rsp, body = self.token_client.auth_token(token_id, tenant=tenant_name)
+        self.assertEqual(200, resp.status)
+
 
 class TokensTestXML(TokensTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/identity/admin/v3/test_credentials.py b/tempest/api/identity/admin/v3/test_credentials.py
index 5f22d43..6bb0ebe 100644
--- a/tempest/api/identity/admin/v3/test_credentials.py
+++ b/tempest/api/identity/admin/v3/test_credentials.py
@@ -15,13 +15,14 @@
 
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class CredentialsTestJSON(base.BaseIdentityV3AdminTest):
     _interface = 'json'
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(CredentialsTestJSON, cls).setUpClass()
         cls.projects = list()
@@ -35,28 +36,32 @@
             resp, cls.project = cls.client.create_project(
                 data_utils.rand_name('project-'),
                 description=data_utils.rand_name('project-desc-'))
-            assert resp['status'] == '201', "Expected %s" % resp['status']
+            assert resp['status'] == '201', (
+                "Expected 201, but got: %s" % resp['status'])
             cls.projects.append(cls.project['id'])
 
         resp, cls.user_body = cls.client.create_user(
             u_name, description=u_desc, password=u_password,
             email=u_email, project_id=cls.projects[0])
-        assert resp['status'] == '201', "Expected: %s" % resp['status']
+        assert resp['status'] == '201', (
+            "Expected 201, but got: %s" % resp['status'])
 
     @classmethod
     def tearDownClass(cls):
         resp, _ = cls.client.delete_user(cls.user_body['id'])
-        assert resp['status'] == '204', "Expected: %s" % resp['status']
+        assert resp['status'] == '204', (
+            "Expected 204, but got: %s" % resp['status'])
         for p in cls.projects:
             resp, _ = cls.client.delete_project(p)
-            assert resp['status'] == '204', "Expected: %s" % resp['status']
+            assert resp['status'] == '204', (
+                "Expected 204, but got: %s" % resp['status'])
         super(CredentialsTestJSON, cls).tearDownClass()
 
     def _delete_credential(self, cred_id):
         resp, body = self.creds_client.delete_credential(cred_id)
         self.assertEqual(resp['status'], '204')
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_credentials_create_get_update_delete(self):
         keys = [data_utils.rand_name('Access-'),
                 data_utils.rand_name('Secret-')]
@@ -91,7 +96,7 @@
             self.assertEqual(update_body['blob'][value2],
                              get_body['blob'][value2])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_credentials_list_delete(self):
         created_cred_ids = list()
         fetched_cred_ids = list()
diff --git a/tempest/api/identity/admin/v3/test_endpoints.py b/tempest/api/identity/admin/v3/test_endpoints.py
index 0e4d66b..dd3b576 100644
--- a/tempest/api/identity/admin/v3/test_endpoints.py
+++ b/tempest/api/identity/admin/v3/test_endpoints.py
@@ -15,13 +15,14 @@
 
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class EndPointsTestJSON(base.BaseIdentityV3AdminTest):
     _interface = 'json'
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(EndPointsTestJSON, cls).setUpClass()
         cls.identity_client = cls.client
@@ -53,7 +54,7 @@
             cls.service_client.delete_service(s)
         super(EndPointsTestJSON, cls).tearDownClass()
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_endpoints(self):
         # Get a list of endpoints
         resp, fetched_endpoints = self.client.list_endpoints()
@@ -65,7 +66,7 @@
                          "Failed to find endpoint %s in fetched list" %
                          ', '.join(str(e) for e in missing_endpoints))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_create_list_delete_endpoint(self):
         region = data_utils.rand_name('region')
         url = data_utils.rand_name('url')
@@ -91,7 +92,7 @@
         fetched_endpoints_id = [e['id'] for e in fetched_endpoints]
         self.assertNotIn(endpoint['id'], fetched_endpoints_id)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_update_endpoint(self):
         # Creating an endpoint so as to check update endpoint
         # with new values
diff --git a/tempest/api/identity/admin/v3/test_groups.py b/tempest/api/identity/admin/v3/test_groups.py
index 6e898b2..056f713 100644
--- a/tempest/api/identity/admin/v3/test_groups.py
+++ b/tempest/api/identity/admin/v3/test_groups.py
@@ -68,7 +68,7 @@
         # list users in group
         resp, group_users = self.client.list_group_users(group['id'])
         self.assertEqual(resp['status'], '200')
-        self.assertEqual(users.sort(), group_users.sort())
+        self.assertEqual(sorted(users), sorted(group_users))
         # delete user in group
         for user in users:
             resp, body = self.client.delete_group_user(group['id'],
@@ -77,6 +77,27 @@
         resp, group_users = self.client.list_group_users(group['id'])
         self.assertEqual(len(group_users), 0)
 
+    @test.attr(type='smoke')
+    def test_list_user_groups(self):
+        # create a user
+        resp, user = self.client.create_user(
+            data_utils.rand_name('User-'),
+            password=data_utils.rand_name('Pass-'))
+        self.addCleanup(self.client.delete_user, user['id'])
+        # create two groups, and add user into them
+        groups = []
+        for i in range(2):
+            name = data_utils.rand_name('Group-')
+            resp, group = self.client.create_group(name)
+            groups.append(group)
+            self.addCleanup(self.client.delete_group, group['id'])
+            self.client.add_group_user(group['id'], user['id'])
+        # list groups which user belongs to
+        resp, user_groups = self.client.list_user_groups(user['id'])
+        self.assertEqual('200', resp['status'])
+        self.assertEqual(sorted(groups), sorted(user_groups))
+        self.assertEqual(2, len(user_groups))
+
 
 class GroupsV3TestXML(GroupsV3TestJSON):
     _interface = 'xml'
diff --git a/tempest/api/identity/admin/v3/test_roles.py b/tempest/api/identity/admin/v3/test_roles.py
index 467d28b..24c7b83 100644
--- a/tempest/api/identity/admin/v3/test_roles.py
+++ b/tempest/api/identity/admin/v3/test_roles.py
@@ -15,38 +15,41 @@
 
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class RolesV3TestJSON(base.BaseIdentityV3AdminTest):
     _interface = 'json'
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(RolesV3TestJSON, cls).setUpClass()
         cls.fetched_role_ids = list()
         u_name = data_utils.rand_name('user-')
         u_desc = '%s description' % u_name
         u_email = '%s@testmail.tm' % u_name
-        u_password = data_utils.rand_name('pass-')
+        cls.u_password = data_utils.rand_name('pass-')
         resp = [None] * 5
-        resp[0], cls.project = cls.client.create_project(
-            data_utils.rand_name('project-'),
-            description=data_utils.rand_name('project-desc-'))
-        resp[1], cls.domain = cls.client.create_domain(
+        resp[0], cls.domain = cls.client.create_domain(
             data_utils.rand_name('domain-'),
             description=data_utils.rand_name('domain-desc-'))
+        resp[1], cls.project = cls.client.create_project(
+            data_utils.rand_name('project-'),
+            description=data_utils.rand_name('project-desc-'),
+            domain_id=cls.domain['id'])
         resp[2], cls.group_body = cls.client.create_group(
             data_utils.rand_name('Group-'), project_id=cls.project['id'],
             domain_id=cls.domain['id'])
         resp[3], cls.user_body = cls.client.create_user(
-            u_name, description=u_desc, password=u_password,
+            u_name, description=u_desc, password=cls.u_password,
             email=u_email, project_id=cls.project['id'],
             domain_id=cls.domain['id'])
         resp[4], cls.role = cls.client.create_role(
             data_utils.rand_name('Role-'))
         for r in resp:
-            assert r['status'] == '201', "Expected: %s" % r['status']
+            assert r['status'] == '201', (
+                "Expected 201, but got: %s" % r['status'])
 
     @classmethod
     def tearDownClass(cls):
@@ -60,7 +63,8 @@
         cls.client.update_domain(cls.domain['id'], enabled=False)
         resp[4], _ = cls.client.delete_domain(cls.domain['id'])
         for r in resp:
-            assert r['status'] == '204', "Expected: %s" % r['status']
+            assert r['status'] == '204', (
+                "Expected 204, but got: %s" % r['status'])
         super(RolesV3TestJSON, cls).tearDownClass()
 
     def _list_assertions(self, resp, body, fetched_role_ids, role_id):
@@ -68,7 +72,7 @@
         self.assertEqual(len(body), 1)
         self.assertIn(role_id, fetched_role_ids)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_role_create_update_get(self):
         r_name = data_utils.rand_name('Role-')
         resp, role = self.client.create_role(r_name)
@@ -90,7 +94,7 @@
         self.assertEqual(new_name, new_role['name'])
         self.assertEqual(updated_role['id'], new_role['id'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_grant_list_revoke_role_to_user_on_project(self):
         resp, _ = self.client.assign_user_role_on_project(
             self.project['id'], self.user_body['id'], self.role['id'])
@@ -109,7 +113,7 @@
             self.project['id'], self.user_body['id'], self.role['id'])
         self.assertEqual(resp['status'], '204')
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_grant_list_revoke_role_to_user_on_domain(self):
         resp, _ = self.client.assign_user_role_on_domain(
             self.domain['id'], self.user_body['id'], self.role['id'])
@@ -128,12 +132,13 @@
             self.domain['id'], self.user_body['id'], self.role['id'])
         self.assertEqual(resp['status'], '204')
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_grant_list_revoke_role_to_group_on_project(self):
+        # Grant role to group on project
         resp, _ = self.client.assign_group_role_on_project(
             self.project['id'], self.group_body['id'], self.role['id'])
         self.assertEqual(resp['status'], '204')
-
+        # List group roles on project
         resp, roles = self.client.list_group_roles_on_project(
             self.project['id'], self.group_body['id'])
 
@@ -142,12 +147,23 @@
 
         self._list_assertions(resp, roles, self.fetched_role_ids,
                               self.role['id'])
-
+        # Add user to group, and insure user has role on project
+        self.client.add_group_user(self.group_body['id'], self.user_body['id'])
+        self.addCleanup(self.client.delete_group_user,
+                        self.group_body['id'], self.user_body['id'])
+        resp, body = self.token.auth(self.user_body['id'], self.u_password,
+                                     self.project['name'],
+                                     domain=self.domain['name'])
+        roles = body['token']['roles']
+        self.assertEqual(resp['status'], '201')
+        self.assertEqual(len(roles), 1)
+        self.assertEqual(roles[0]['id'], self.role['id'])
+        # Revoke role to group on project
         resp, _ = self.client.revoke_role_from_group_on_project(
             self.project['id'], self.group_body['id'], self.role['id'])
         self.assertEqual(resp['status'], '204')
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_grant_list_revoke_role_to_group_on_domain(self):
         resp, _ = self.client.assign_group_role_on_domain(
             self.domain['id'], self.group_body['id'], self.role['id'])
diff --git a/tempest/api/network/admin/test_dhcp_agent_scheduler.py b/tempest/api/network/admin/test_dhcp_agent_scheduler.py
index ecd992a..0e601d1 100644
--- a/tempest/api/network/admin/test_dhcp_agent_scheduler.py
+++ b/tempest/api/network/admin/test_dhcp_agent_scheduler.py
@@ -26,7 +26,7 @@
             msg = "dhcp_agent_scheduler extension not enabled."
             raise cls.skipException(msg)
         # Create a network and make sure it will be hosted by a
-        # dhcp agent.
+        # dhcp agent: this is done by creating a regular port
         cls.network = cls.create_network()
         cls.subnet = cls.create_subnet(cls.network)
         cls.cidr = cls.subnet['cidr']
@@ -60,6 +60,9 @@
 
     @test.attr(type='smoke')
     def test_remove_network_from_dhcp_agent(self):
+        # The agent is now bound to the network, we can free the port
+        self.client.delete_port(self.port['id'])
+        self.ports.remove(self.port)
         resp, body = self.admin_client.list_dhcp_agent_hosting_network(
             self.network['id'])
         agents = body['agents']
diff --git a/tempest/api/network/admin/test_external_network_extension.py b/tempest/api/network/admin/test_external_network_extension.py
new file mode 100644
index 0000000..c7fde77
--- /dev/null
+++ b/tempest/api/network/admin/test_external_network_extension.py
@@ -0,0 +1,94 @@
+#    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.network import base
+from tempest.common.utils import data_utils
+
+
+class ExternalNetworksTestJSON(base.BaseAdminNetworkTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(ExternalNetworksTestJSON, cls).setUpClass()
+        cls.network = cls.create_network()
+
+    def _create_network(self, external=True):
+        post_body = {'name': data_utils.rand_name('network-')}
+        if external:
+            post_body['router:external'] = external
+        resp, body = self.admin_client.create_network(**post_body)
+        network = body['network']
+        self.assertEqual('201', resp['status'])
+        self.addCleanup(self.admin_client.delete_network, network['id'])
+        return network
+
+    def test_create_external_network(self):
+        # Create a network as an admin user specifying the
+        # external network extension attribute
+        ext_network = self._create_network()
+        # Verifies router:external parameter
+        self.assertIsNotNone(ext_network['id'])
+        self.assertTrue(ext_network['router:external'])
+
+    def test_update_external_network(self):
+        # Update a network as an admin user specifying the
+        # external network extension attribute
+        network = self._create_network(external=False)
+        self.assertFalse(network.get('router:external', False))
+        update_body = {'router:external': True}
+        resp, body = self.admin_client.update_network(network['id'],
+                                                      **update_body)
+        self.assertEqual('200', resp['status'])
+        updated_network = body['network']
+        # Verify that router:external parameter was updated
+        self.assertTrue(updated_network['router:external'])
+
+    def test_list_external_networks(self):
+        # Create external_net
+        external_network = self._create_network()
+        # List networks as a normal user and confirm the external
+        # network extension attribute is returned for those networks
+        # that were created as external
+        resp, body = self.client.list_networks()
+        self.assertEqual('200', resp['status'])
+        networks_list = [net['id'] for net in body['networks']]
+        self.assertIn(external_network['id'], networks_list)
+        self.assertIn(self.network['id'], networks_list)
+        for net in body['networks']:
+            if net['id'] == self.network['id']:
+                self.assertFalse(net['router:external'])
+            elif net['id'] == external_network['id']:
+                self.assertTrue(net['router:external'])
+
+    def test_show_external_networks_attribute(self):
+        # Create external_net
+        external_network = self._create_network()
+        # Show an external network as a normal user and confirm the
+        # external network extension attribute is returned.
+        resp, body = self.client.show_network(external_network['id'])
+        self.assertEqual('200', resp['status'])
+        show_ext_net = body['network']
+        self.assertEqual(external_network['name'], show_ext_net['name'])
+        self.assertEqual(external_network['id'], show_ext_net['id'])
+        self.assertTrue(show_ext_net['router:external'])
+        resp, body = self.client.show_network(self.network['id'])
+        self.assertEqual('200', resp['status'])
+        show_net = body['network']
+        # Verify with show that router:external is False for network
+        self.assertEqual(self.network['name'], show_net['name'])
+        self.assertEqual(self.network['id'], show_net['id'])
+        self.assertFalse(show_net['router:external'])
+
+
+class ExternalNetworksTestXML(ExternalNetworksTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/network/admin/test_load_balancer_admin_actions.py b/tempest/api/network/admin/test_load_balancer_admin_actions.py
new file mode 100644
index 0000000..34a8e32
--- /dev/null
+++ b/tempest/api/network/admin/test_load_balancer_admin_actions.py
@@ -0,0 +1,94 @@
+# Copyright 2014 Mirantis.inc
+# 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.network import base
+from tempest.common.utils import data_utils
+from tempest import test
+
+
+class LoadBalancerAdminTestJSON(base.BaseAdminNetworkTest):
+    _interface = 'json'
+
+    """
+    Test admin actions for load balancer.
+
+    Create VIP for another tenant
+    Create health monitor for another tenant
+    """
+
+    @classmethod
+    def setUpClass(cls):
+        super(LoadBalancerAdminTestJSON, cls).setUpClass()
+        if not test.is_extension_enabled('lbaas', 'network'):
+            msg = "lbaas extension not enabled."
+            raise cls.skipException(msg)
+        cls.force_tenant_isolation = True
+        manager = cls.get_client_manager()
+        cls.client = manager.network_client
+        username, tenant_name, passwd = cls.isolated_creds.get_primary_creds()
+        cls.tenant_id = cls.os_adm.identity_client.get_tenant_by_name(
+            tenant_name)['id']
+        cls.network = cls.create_network()
+        cls.subnet = cls.create_subnet(cls.network)
+
+    @test.attr(type='smoke')
+    def test_create_vip_as_admin_for_another_tenant(self):
+        name = data_utils.rand_name('vip-')
+        resp, body = self.admin_client.create_pool(
+            name=data_utils.rand_name('pool-'), lb_method="ROUND_ROBIN",
+            protocol="HTTP", subnet_id=self.subnet['id'],
+            tenant_id=self.tenant_id)
+        self.assertEqual('201', resp['status'])
+        pool = body['pool']
+        self.addCleanup(self.admin_client.delete_pool, pool['id'])
+        resp, body = self.admin_client.create_vip(name=name,
+                                                  protocol="HTTP",
+                                                  protocol_port=80,
+                                                  subnet_id=self.subnet['id'],
+                                                  pool_id=pool['id'],
+                                                  tenant_id=self.tenant_id)
+        self.assertEqual('201', resp['status'])
+        vip = body['vip']
+        self.addCleanup(self.admin_client.delete_vip, vip['id'])
+        self.assertIsNotNone(vip['id'])
+        self.assertEqual(self.tenant_id, vip['tenant_id'])
+        resp, body = self.client.show_vip(vip['id'])
+        self.assertEqual('200', resp['status'])
+        show_vip = body['vip']
+        self.assertEqual(vip['id'], show_vip['id'])
+        self.assertEqual(vip['name'], show_vip['name'])
+
+    @test.attr(type='smoke')
+    def test_create_health_monitor_as_admin_for_another_tenant(self):
+        resp, body = (
+            self.admin_client.create_health_monitor(delay=4,
+                                                    max_retries=3,
+                                                    type="TCP",
+                                                    timeout=1,
+                                                    tenant_id=self.tenant_id))
+        self.assertEqual('201', resp['status'])
+        health_monitor = body['health_monitor']
+        self.addCleanup(self.admin_client.delete_health_monitor,
+                        health_monitor['id'])
+        self.assertIsNotNone(health_monitor['id'])
+        self.assertEqual(self.tenant_id, health_monitor['tenant_id'])
+        resp, body = self.client.show_health_monitor(health_monitor['id'])
+        self.assertEqual('200', resp['status'])
+        show_health_monitor = body['health_monitor']
+        self.assertEqual(health_monitor['id'], show_health_monitor['id'])
+
+
+class LoadBalancerAdminTestXML(LoadBalancerAdminTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/network/test_quotas.py b/tempest/api/network/admin/test_quotas.py
similarity index 86%
rename from tempest/api/network/test_quotas.py
rename to tempest/api/network/admin/test_quotas.py
index 38784d8..a307986 100644
--- a/tempest/api/network/test_quotas.py
+++ b/tempest/api/network/admin/test_quotas.py
@@ -15,12 +15,11 @@
 
 
 from tempest.api.network import base
-from tempest import clients
 from tempest.common.utils import data_utils
 from tempest import test
 
 
-class QuotasTest(base.BaseNetworkTest):
+class QuotasTest(base.BaseAdminNetworkTest):
     _interface = 'json'
 
     """
@@ -32,13 +31,9 @@
         update quotas for a specified tenant
         reset quotas to default values for a specified tenant
 
-    v2.0 of the API is assumed. It is also assumed that the following
-    option is defined in the [service_available] section of etc/tempest.conf:
-
-        neutron as True
-
-    Finally, it is assumed that the per-tenant quota extension API is
-    configured in /etc/neutron/neutron.conf as follows:
+    v2.0 of the API is assumed.
+    It is also assumed that the per-tenant quota extension API is configured
+    in /etc/neutron/neutron.conf as follows:
 
         quota_driver = neutron.db.quota_db.DbQuotaDriver
     """
@@ -49,9 +44,7 @@
         if not test.is_extension_enabled('quotas', 'network'):
             msg = "quotas extension not enabled."
             raise cls.skipException(msg)
-        admin_manager = clients.AdminManager()
-        cls.admin_client = admin_manager.network_client
-        cls.identity_admin_client = admin_manager.identity_client
+        cls.identity_admin_client = cls.os_adm.identity_client
 
     @test.attr(type='gate')
     def test_quotas(self):
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index 231c4bf..f92ad68 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -90,7 +90,7 @@
             cls.client.delete_vpnservice(vpnservice['id'])
         # Clean up floating IPs
         for floating_ip in cls.floating_ips:
-            cls.client.delete_floating_ip(floating_ip['id'])
+            cls.client.delete_floatingip(floating_ip['id'])
         # Clean up routers
         for router in cls.routers:
             resp, body = cls.client.list_router_interfaces(router['id'])
@@ -193,11 +193,10 @@
         return router
 
     @classmethod
-    def create_floating_ip(cls, external_network_id, **kwargs):
+    def create_floatingip(cls, external_network_id):
         """Wrapper utility that returns a test floating IP."""
-        resp, body = cls.client.create_floating_ip(
-            external_network_id,
-            **kwargs)
+        resp, body = cls.client.create_floatingip(
+            floating_network_id=external_network_id)
         fip = body['floatingip']
         cls.floating_ips.append(fip)
         return fip
@@ -277,6 +276,7 @@
         """Wrapper utility that returns a router interface."""
         resp, interface = cls.client.add_router_interface_with_subnet_id(
             router_id, subnet_id)
+        return interface
 
     @classmethod
     def create_vpnservice(cls, subnet_id, router_id):
diff --git a/tempest/api/network/test_floating_ips.py b/tempest/api/network/test_floating_ips.py
index b31c090..06871ad 100644
--- a/tempest/api/network/test_floating_ips.py
+++ b/tempest/api/network/test_floating_ips.py
@@ -65,8 +65,12 @@
     @test.attr(type='smoke')
     def test_create_list_show_update_delete_floating_ip(self):
         # Creates a floating IP
-        created_floating_ip = self.create_floating_ip(
-            self.ext_net_id, port_id=self.ports[0]['id'])
+        resp, body = self.client.create_floatingip(
+            floating_network_id=self.ext_net_id, port_id=self.ports[0]['id'])
+        self.assertEqual('201', resp['status'])
+        created_floating_ip = body['floatingip']
+        self.addCleanup(self.client.delete_floatingip,
+                        created_floating_ip['id'])
         self.assertIsNotNone(created_floating_ip['id'])
         self.assertIsNotNone(created_floating_ip['tenant_id'])
         self.assertIsNotNone(created_floating_ip['floating_ip_address'])
@@ -74,7 +78,7 @@
         self.assertEqual(created_floating_ip['floating_network_id'],
                          self.ext_net_id)
         # Verifies the details of a floating_ip
-        resp, floating_ip = self.client.show_floating_ip(
+        resp, floating_ip = self.client.show_floatingip(
             created_floating_ip['id'])
         self.assertEqual('200', resp['status'])
         shown_floating_ip = floating_ip['floatingip']
@@ -95,7 +99,7 @@
             floatingip_id_list.append(f['id'])
         self.assertIn(created_floating_ip['id'], floatingip_id_list)
         # Associate floating IP to the other port
-        resp, floating_ip = self.client.update_floating_ip(
+        resp, floating_ip = self.client.update_floatingip(
             created_floating_ip['id'], port_id=self.ports[1]['id'])
         self.assertEqual('200', resp['status'])
         updated_floating_ip = floating_ip['floatingip']
@@ -105,7 +109,7 @@
         self.assertEqual(updated_floating_ip['router_id'], self.router['id'])
 
         # Disassociate floating IP from the port
-        resp, floating_ip = self.client.update_floating_ip(
+        resp, floating_ip = self.client.update_floatingip(
             created_floating_ip['id'], port_id=None)
         self.assertEqual('200', resp['status'])
         updated_floating_ip = floating_ip['floatingip']
@@ -116,17 +120,22 @@
     @test.attr(type='smoke')
     def test_floating_ip_delete_port(self):
         # Create a floating IP
-        created_floating_ip = self.create_floating_ip(self.ext_net_id)
+        resp, body = self.client.create_floatingip(
+            floating_network_id=self.ext_net_id)
+        self.assertEqual('201', resp['status'])
+        created_floating_ip = body['floatingip']
+        self.addCleanup(self.client.delete_floatingip,
+                        created_floating_ip['id'])
         # Create a port
         resp, port = self.client.create_port(network_id=self.network['id'])
         created_port = port['port']
-        resp, floating_ip = self.client.update_floating_ip(
+        resp, floating_ip = self.client.update_floatingip(
             created_floating_ip['id'], port_id=created_port['id'])
         self.assertEqual('200', resp['status'])
         # Delete port
         self.client.delete_port(created_port['id'])
         # Verifies the details of the floating_ip
-        resp, floating_ip = self.client.show_floating_ip(
+        resp, floating_ip = self.client.show_floatingip(
             created_floating_ip['id'])
         self.assertEqual('200', resp['status'])
         shown_floating_ip = floating_ip['floatingip']
@@ -139,8 +148,12 @@
     @test.attr(type='smoke')
     def test_floating_ip_update_different_router(self):
         # Associate a floating IP to a port on a router
-        created_floating_ip = self.create_floating_ip(
-            self.ext_net_id, port_id=self.ports[1]['id'])
+        resp, body = self.client.create_floatingip(
+            floating_network_id=self.ext_net_id, port_id=self.ports[1]['id'])
+        self.assertEqual('201', resp['status'])
+        created_floating_ip = body['floatingip']
+        self.addCleanup(self.client.delete_floatingip,
+                        created_floating_ip['id'])
         self.assertEqual(created_floating_ip['router_id'], self.router['id'])
         network2 = self.create_network()
         subnet2 = self.create_subnet(network2)
@@ -149,7 +162,7 @@
         self.create_router_interface(router2['id'], subnet2['id'])
         port_other_router = self.create_port(network2)
         # Associate floating IP to the other port on another router
-        resp, floating_ip = self.client.update_floating_ip(
+        resp, floating_ip = self.client.update_floatingip(
             created_floating_ip['id'], port_id=port_other_router['id'])
         self.assertEqual('200', resp['status'])
         updated_floating_ip = floating_ip['floatingip']
diff --git a/tempest/api/network/test_load_balancer.py b/tempest/api/network/test_load_balancer.py
index 695dbf8..792d61d 100644
--- a/tempest/api/network/test_load_balancer.py
+++ b/tempest/api/network/test_load_balancer.py
@@ -108,6 +108,7 @@
     def test_create_update_delete_pool_vip(self):
         # Creates a vip
         name = data_utils.rand_name('vip-')
+        address = self.subnet['allocation_pools'][0]['end']
         resp, body = self.client.create_pool(
             name=data_utils.rand_name("pool-"),
             lb_method='ROUND_ROBIN',
@@ -118,16 +119,36 @@
                                             protocol="HTTP",
                                             protocol_port=80,
                                             subnet_id=self.subnet['id'],
-                                            pool_id=pool['id'])
+                                            pool_id=pool['id'],
+                                            address=address)
         self.assertEqual('201', resp['status'])
         vip = body['vip']
         vip_id = vip['id']
+        # Confirm VIP's address correctness with a show
+        resp, body = self.client.show_vip(vip_id)
+        self.assertEqual('200', resp['status'])
+        vip = body['vip']
+        self.assertEqual(address, vip['address'])
         # Verification of vip update
         new_name = "New_vip"
-        resp, body = self.client.update_vip(vip_id, name=new_name)
+        new_description = "New description"
+        persistence_type = "HTTP_COOKIE"
+        update_data = {"session_persistence": {
+            "type": persistence_type}}
+        resp, body = self.client.update_vip(vip_id,
+                                            name=new_name,
+                                            description=new_description,
+                                            connection_limit=10,
+                                            admin_state_up=False,
+                                            **update_data)
         self.assertEqual('200', resp['status'])
         updated_vip = body['vip']
-        self.assertEqual(updated_vip['name'], new_name)
+        self.assertEqual(new_name, updated_vip['name'])
+        self.assertEqual(new_description, updated_vip['description'])
+        self.assertEqual(10, updated_vip['connection_limit'])
+        self.assertFalse(updated_vip['admin_state_up'])
+        self.assertEqual(persistence_type,
+                         updated_vip['session_persistence']['type'])
         # Verification of vip delete
         resp, body = self.client.delete_vip(vip['id'])
         self.assertEqual('204', resp['status'])
@@ -274,6 +295,40 @@
         self.assertEqual('204', resp['status'])
 
     @test.attr(type='smoke')
+    def test_create_health_monitor_http_type(self):
+        hm_type = "HTTP"
+        resp, body = self.client.create_health_monitor(delay=4,
+                                                       max_retries=3,
+                                                       type=hm_type,
+                                                       timeout=1)
+        self.assertEqual('201', resp['status'])
+        health_monitor = body['health_monitor']
+        self.addCleanup(self.client.delete_health_monitor,
+                        health_monitor['id'])
+        self.assertEqual(hm_type, health_monitor['type'])
+
+    @test.attr(type='smoke')
+    def test_update_health_monitor_http_method(self):
+        resp, body = self.client.create_health_monitor(delay=4,
+                                                       max_retries=3,
+                                                       type="HTTP",
+                                                       timeout=1)
+        self.assertEqual('201', resp['status'])
+        health_monitor = body['health_monitor']
+        self.addCleanup(self.client.delete_health_monitor,
+                        health_monitor['id'])
+        resp, body = (self.client.update_health_monitor
+                     (health_monitor['id'],
+                      http_method="POST",
+                      url_path="/home/user",
+                      expected_codes="290"))
+        self.assertEqual('200', resp['status'])
+        updated_health_monitor = body['health_monitor']
+        self.assertEqual("POST", updated_health_monitor['http_method'])
+        self.assertEqual("/home/user", updated_health_monitor['url_path'])
+        self.assertEqual("290", updated_health_monitor['expected_codes'])
+
+    @test.attr(type='smoke')
     def test_show_health_monitor(self):
         # Verifies the details of a health_monitor
         resp, body = self.client.show_health_monitor(self.health_monitor['id'])
diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py
index 70fb00a..b9041ee 100644
--- a/tempest/api/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -18,6 +18,7 @@
 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
@@ -43,6 +44,8 @@
         port update
         network update
         subnet update
+        delete a network also deletes its subnets
+        create a port with no IP address associated with it
 
         All subnet tests are run once with ipv4 and once with ipv6.
 
@@ -183,6 +186,67 @@
             self.assertEqual(len(subnet), 1)
             self.assertIn('id', subnet)
 
+    def _try_delete_network(self, net_id):
+        # delete network, if it exists
+        try:
+            self.client.delete_network(net_id)
+        # if network is not found, this means it was deleted in the test
+        except exceptions.NotFound:
+            pass
+
+    @attr(type='smoke')
+    def test_delete_network_with_subnet(self):
+        # Creates a network
+        name = data_utils.rand_name('network-')
+        resp, body = self.client.create_network(name=name)
+        self.assertEqual('201', resp['status'])
+        network = body['network']
+        net_id = network['id']
+        self.addCleanup(self._try_delete_network, net_id)
+
+        # Find a cidr that is not in use yet and create a subnet with it
+        subnet = self.create_subnet(network)
+        subnet_id = subnet['id']
+
+        # Delete network while the subnet still exists
+        resp, body = self.client.delete_network(net_id)
+        self.assertEqual('204', resp['status'])
+
+        # Verify that the subnet got automatically deleted.
+        self.assertRaises(exceptions.NotFound, self.client.show_subnet,
+                          subnet_id)
+
+        # Since create_subnet adds the subnet to the delete list, and it is
+        # is actually deleted here - this will create and issue, hence remove
+        # it from the list.
+        self.subnets.pop()
+
+    @attr(type='smoke')
+    def test_create_port_with_no_ip(self):
+        # For this test create a new network - do not use any previously
+        # created networks.
+        name = data_utils.rand_name('network-nosubnet-')
+        resp, body = self.client.create_network(name=name)
+        self.assertEqual('201', resp['status'])
+        network = body['network']
+        net_id = network['id']
+        self.networks.append(network)
+
+        # Now create a port for this network - without creating any
+        # subnets for this network - this ensures no IP for the port
+        resp, body = self.client.create_port(network_id=net_id)
+        self.assertEqual('201', resp['status'])
+        port = body['port']
+        port_id = port['id']
+        self.addCleanup(self.client.delete_port, port_id)
+
+        # Verify that the port does not have any IP address
+        resp, body = self.client.show_port(port_id)
+        self.assertEqual('200', resp['status'])
+        port_resp = body['port']
+        self.assertEqual(port_id, port_resp['id'])
+        self.assertEqual(port_resp['fixed_ips'], [])
+
 
 class NetworksTestXML(NetworksTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/object_storage/test_account_quotas.py b/tempest/api/object_storage/test_account_quotas.py
index b14adc0..a3098a5 100644
--- a/tempest/api/object_storage/test_account_quotas.py
+++ b/tempest/api/object_storage/test_account_quotas.py
@@ -68,7 +68,7 @@
         # Retrieve a ResellerAdmin auth data and use it to set a quota
         # on the client's account
         cls.reselleradmin_auth_data = \
-            cls.os_reselleradmin.get_auth_provider().auth_data
+            cls.os_reselleradmin.auth_provider.auth_data
 
     def setUp(self):
         super(AccountQuotasTest, self).setUp()
diff --git a/tempest/api/object_storage/test_account_quotas_negative.py b/tempest/api/object_storage/test_account_quotas_negative.py
index 402cd90..7648ea1 100644
--- a/tempest/api/object_storage/test_account_quotas_negative.py
+++ b/tempest/api/object_storage/test_account_quotas_negative.py
@@ -68,7 +68,7 @@
         # Retrieve a ResellerAdmin auth data and use it to set a quota
         # on the client's account
         cls.reselleradmin_auth_data = \
-            cls.os_reselleradmin.get_auth_provider().auth_data
+            cls.os_reselleradmin.auth_provider.auth_data
 
     def setUp(self):
         super(AccountQuotasNegativeTest, self).setUp()
diff --git a/tempest/api/object_storage/test_account_services_negative.py b/tempest/api/object_storage/test_account_services_negative.py
index ea93aa3..71eaab5 100644
--- a/tempest/api/object_storage/test_account_services_negative.py
+++ b/tempest/api/object_storage/test_account_services_negative.py
@@ -31,7 +31,7 @@
         test_os = clients.Manager(self.data.test_user,
                                   self.data.test_password,
                                   self.data.test_tenant)
-        test_auth_provider = test_os.get_auth_provider()
+        test_auth_provider = test_os.auth_provider
         # Get auth for the test user
         test_auth_provider.auth_data
 
diff --git a/tempest/api/object_storage/test_container_acl.py b/tempest/api/object_storage/test_container_acl.py
index 085ef51..c865ee1 100644
--- a/tempest/api/object_storage/test_container_acl.py
+++ b/tempest/api/object_storage/test_container_acl.py
@@ -27,7 +27,7 @@
         test_os = clients.Manager(cls.data.test_user,
                                   cls.data.test_password,
                                   cls.data.test_tenant)
-        cls.test_auth_data = test_os.get_auth_provider().auth_data
+        cls.test_auth_data = test_os.auth_provider.auth_data
 
     @classmethod
     def tearDownClass(cls):
diff --git a/tempest/api/object_storage/test_container_acl_negative.py b/tempest/api/object_storage/test_container_acl_negative.py
index a5a0950..547bf87 100644
--- a/tempest/api/object_storage/test_container_acl_negative.py
+++ b/tempest/api/object_storage/test_container_acl_negative.py
@@ -29,7 +29,7 @@
         test_os = clients.Manager(cls.data.test_user,
                                   cls.data.test_password,
                                   cls.data.test_tenant)
-        cls.test_auth_data = test_os.get_auth_provider().auth_data
+        cls.test_auth_data = test_os.auth_provider.auth_data
 
     @classmethod
     def tearDownClass(cls):
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index 3424082..ab0fb7c 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -10,9 +10,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import os.path
+
 from tempest import clients
 from tempest.common.utils import data_utils
 from tempest import config
+from tempest import exceptions
 from tempest.openstack.common import log as logging
 import tempest.test
 
@@ -27,17 +30,17 @@
     @classmethod
     def setUpClass(cls):
         super(BaseOrchestrationTest, cls).setUpClass()
-        os = clients.OrchestrationManager()
+        cls.os = clients.OrchestrationManager()
         if not CONF.service_available.heat:
             raise cls.skipException("Heat support is required")
         cls.build_timeout = CONF.orchestration.build_timeout
         cls.build_interval = CONF.orchestration.build_interval
 
-        cls.os = os
-        cls.orchestration_client = os.orchestration_client
-        cls.servers_client = os.servers_client
-        cls.keypairs_client = os.keypairs_client
-        cls.network_client = os.network_client
+        cls.orchestration_client = cls.os.orchestration_client
+        cls.client = cls.orchestration_client
+        cls.servers_client = cls.os.servers_client
+        cls.keypairs_client = cls.os.keypairs_client
+        cls.network_client = cls.os.network_client
         cls.stacks = []
         cls.keypairs = []
 
@@ -53,8 +56,8 @@
         """
         Returns an instance of the Identity Admin API client
         """
-        os = clients.AdminManager(interface=cls._interface)
-        admin_client = os.identity_client
+        manager = clients.AdminManager(interface=cls._interface)
+        admin_client = manager.identity_client
         return admin_client
 
     @classmethod
@@ -72,15 +75,15 @@
     def clear_stacks(cls):
         for stack_identifier in cls.stacks:
             try:
-                cls.orchestration_client.delete_stack(stack_identifier)
-            except Exception:
+                cls.client.delete_stack(stack_identifier)
+            except exceptions.NotFound:
                 pass
 
         for stack_identifier in cls.stacks:
             try:
-                cls.orchestration_client.wait_for_stack_status(
+                cls.client.wait_for_stack_status(
                     stack_identifier, 'DELETE_COMPLETE')
-            except Exception:
+            except exceptions.NotFound:
                 pass
 
     @classmethod
@@ -99,6 +102,16 @@
                 pass
 
     @classmethod
+    def load_template(cls, name, ext='yaml'):
+        loc = ["tempest", "api", "orchestration",
+               "stacks", "templates", "%s.%s" % (name, ext)]
+        fullpath = os.path.join(*loc)
+
+        with open(fullpath, "r") as f:
+            content = f.read()
+            return content
+
+    @classmethod
     def tearDownClass(cls):
         cls.clear_stacks()
         cls.clear_keypairs()
diff --git a/tempest/api/orchestration/stacks/templates/cfn_init_signal.yaml b/tempest/api/orchestration/stacks/templates/cfn_init_signal.yaml
new file mode 100644
index 0000000..23ad06f
--- /dev/null
+++ b/tempest/api/orchestration/stacks/templates/cfn_init_signal.yaml
@@ -0,0 +1,80 @@
+HeatTemplateFormatVersion: '2012-12-12'
+Description: |
+  Template which uses a wait condition to confirm that a minimal
+  cfn-init and cfn-signal has worked
+Parameters:
+  key_name:
+    Type: String
+  flavor:
+    Type: String
+  image:
+    Type: String
+  network:
+    Type: String
+Resources:
+  CfnUser:
+    Type: AWS::IAM::User
+  SmokeSecurityGroup:
+    Type: AWS::EC2::SecurityGroup
+    Properties:
+      GroupDescription: Enable only ping and SSH access
+      SecurityGroupIngress:
+      - {CidrIp: 0.0.0.0/0, FromPort: '-1', IpProtocol: icmp, ToPort: '-1'}
+      - {CidrIp: 0.0.0.0/0, FromPort: '22', IpProtocol: tcp, ToPort: '22'}
+  SmokeKeys:
+    Type: AWS::IAM::AccessKey
+    Properties:
+      UserName: {Ref: CfnUser}
+  SmokeServer:
+    Type: OS::Nova::Server
+    Metadata:
+      AWS::CloudFormation::Init:
+        config:
+          files:
+            /tmp/smoke-status:
+              content: smoke test complete
+            /etc/cfn/cfn-credentials:
+              content:
+                Fn::Replace:
+                - SmokeKeys: {Ref: SmokeKeys}
+                  SecretAccessKey:
+                    'Fn::GetAtt': [SmokeKeys, SecretAccessKey]
+                - |
+                  AWSAccessKeyId=SmokeKeys
+                  AWSSecretKey=SecretAccessKey
+              mode: '000400'
+              owner: root
+              group: root
+    Properties:
+      image: {Ref: image}
+      flavor: {Ref: flavor}
+      key_name: {Ref: key_name}
+      security_groups:
+      - {Ref: SmokeSecurityGroup}
+      networks:
+      - uuid: {Ref: network}
+      user_data:
+        Fn::Replace:
+        - WaitHandle: {Ref: WaitHandle}
+        - |
+          #!/bin/bash -v
+          /opt/aws/bin/cfn-init
+          /opt/aws/bin/cfn-signal -e 0 --data "`cat /tmp/smoke-status`" \
+              "WaitHandle"
+  WaitHandle:
+    Type: AWS::CloudFormation::WaitConditionHandle
+  WaitCondition:
+    Type: AWS::CloudFormation::WaitCondition
+    DependsOn: SmokeServer
+    Properties:
+      Handle: {Ref: WaitHandle}
+      Timeout: '600'
+Outputs:
+  WaitConditionStatus:
+    Description: Contents of /tmp/smoke-status on SmokeServer
+    Value:
+      Fn::GetAtt: [WaitCondition, Data]
+  SmokeServerIp:
+    Description: IP address of server
+    Value:
+      Fn::GetAtt: [SmokeServer, first_address]
diff --git a/tempest/api/orchestration/stacks/templates/neutron_basic.yaml b/tempest/api/orchestration/stacks/templates/neutron_basic.yaml
new file mode 100644
index 0000000..9d90e31
--- /dev/null
+++ b/tempest/api/orchestration/stacks/templates/neutron_basic.yaml
@@ -0,0 +1,68 @@
+heat_template_version: '2013-05-23'
+description: |
+  Template which creates single EC2 instance
+parameters:
+  KeyName:
+    type: string
+  InstanceType:
+    type: string
+  ImageId:
+    type: string
+  ExternalRouterId:
+    type: string
+  ExternalNetworkId:
+    type: string
+resources:
+  Network:
+    type: OS::Neutron::Net
+    properties:
+      name: NewNetwork
+  Subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      network_id: {Ref: Network}
+      name: NewSubnet
+      ip_version: 4
+      cidr: 10.0.3.0/24
+      dns_nameservers: ["8.8.8.8"]
+      allocation_pools:
+      - {end: 10.0.3.150, start: 10.0.3.20}
+  Router:
+    type: OS::Neutron::Router
+    properties:
+      name: NewRouter
+      admin_state_up: false
+      external_gateway_info:
+        network: {get_param: ExternalNetworkId}
+        enable_snat: false
+  RouterInterface:
+    type: OS::Neutron::RouterInterface
+    properties:
+      router_id: {get_param: ExternalRouterId}
+      subnet_id: {get_resource: Subnet}
+  Server:
+    type: AWS::EC2::Instance
+    metadata:
+      Name: SmokeServerNeutron
+    properties:
+      ImageId: {get_param: ImageId}
+      InstanceType: {get_param: InstanceType}
+      KeyName: {get_param: KeyName}
+      SubnetId: {get_resource: Subnet}
+      UserData:
+        str_replace:
+          template: |
+            #!/bin/bash -v
+
+            /opt/aws/bin/cfn-signal -e 0 -r "SmokeServerNeutron created" \
+            'wait_handle'
+          params:
+            wait_handle: {get_resource: WaitHandleNeutron}
+  WaitHandleNeutron:
+    type: AWS::CloudFormation::WaitConditionHandle
+  WaitCondition:
+    type: AWS::CloudFormation::WaitCondition
+    depends_on: Server
+    properties:
+      Handle: {get_resource: WaitHandleNeutron}
+      Timeout: '600'
diff --git a/tempest/api/orchestration/stacks/templates/non_empty_stack.yaml b/tempest/api/orchestration/stacks/templates/non_empty_stack.yaml
new file mode 100644
index 0000000..58a934e
--- /dev/null
+++ b/tempest/api/orchestration/stacks/templates/non_empty_stack.yaml
@@ -0,0 +1,32 @@
+HeatTemplateFormatVersion: '2012-12-12'
+Description: |
+  Template which creates some simple resources
+Parameters:
+  trigger:
+    Type: String
+    Default: not_yet
+Resources:
+  fluffy:
+    Type: AWS::AutoScaling::LaunchConfiguration
+    Metadata:
+      kittens:
+      - Tom
+      - Stinky
+    Properties:
+      ImageId: not_used
+      InstanceType: not_used
+      UserData:
+        Fn::Replace:
+        - variable_a: {Ref: trigger}
+          variable_b: bee
+        - |
+          A == variable_a
+          B == variable_b
+Outputs:
+  fluffy:
+    Description: "fluffies irc nick"
+    Value:
+      Fn::Replace:
+      - nick: {Ref: fluffy}
+      - |
+        #nick
diff --git a/tempest/api/orchestration/stacks/templates/nova_keypair.json b/tempest/api/orchestration/stacks/templates/nova_keypair.json
new file mode 100644
index 0000000..63d3817
--- /dev/null
+++ b/tempest/api/orchestration/stacks/templates/nova_keypair.json
@@ -0,0 +1,48 @@
+{
+  "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/templates/nova_keypair.yaml b/tempest/api/orchestration/stacks/templates/nova_keypair.yaml
new file mode 100644
index 0000000..81ad99c
--- /dev/null
+++ b/tempest/api/orchestration/stacks/templates/nova_keypair.yaml
@@ -0,0 +1,43 @@
+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] }
diff --git a/tempest/api/orchestration/stacks/templates/swift_basic.yaml b/tempest/api/orchestration/stacks/templates/swift_basic.yaml
new file mode 100644
index 0000000..713f8bc
--- /dev/null
+++ b/tempest/api/orchestration/stacks/templates/swift_basic.yaml
@@ -0,0 +1,23 @@
+heat_template_version: 2013-05-23
+description: Template which creates a Swift container resource
+
+resources:
+  SwiftContainerWebsite:
+    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
+
+outputs:
+  WebsiteURL:
+    description: "URL for website hosted on S3"
+    value: { get_attr: [SwiftContainer, WebsiteURL] }
+  DomainName:
+    description: "Domain of Swift host"
+    value: { get_attr: [SwiftContainer, DomainName] }
diff --git a/tempest/api/orchestration/stacks/test_limits.py b/tempest/api/orchestration/stacks/test_limits.py
index 22f544d..893dcc4 100644
--- a/tempest/api/orchestration/stacks/test_limits.py
+++ b/tempest/api/orchestration/stacks/test_limits.py
@@ -24,16 +24,10 @@
 
 
 class TestServerStackLimits(base.BaseOrchestrationTest):
-    _interface = 'json'
-
-    @classmethod
-    def setUpClass(cls):
-        super(TestServerStackLimits, cls).setUpClass()
-        cls.client = cls.orchestration_client
-        cls.stack_name = data_utils.rand_name('heat')
 
     @attr(type='gate')
     def test_exceed_max_template_size_fails(self):
+        stack_name = data_utils.rand_name('heat')
         fill = 'A' * CONF.orchestration.max_template_size
         template = '''
 HeatTemplateFormatVersion: '2012-12-12'
@@ -41,5 +35,5 @@
 Outputs:
   Foo: bar''' % fill
         ex = self.assertRaises(exceptions.BadRequest, self.create_stack,
-                               self.stack_name, template)
+                               stack_name, template)
         self.assertIn('Template exceeds maximum allowed size', str(ex))
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index 18ba37b..61dbb4d 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -18,7 +18,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
 
@@ -26,80 +26,9 @@
 
 
 class NeutronResourcesTestJSON(base.BaseOrchestrationTest):
-    _interface = 'json'
-
-    template = """
-heat_template_version: '2013-05-23'
-description: |
-  Template which creates single EC2 instance
-parameters:
-  KeyName:
-    type: string
-  InstanceType:
-    type: string
-  ImageId:
-    type: string
-  ExternalRouterId:
-    type: string
-  ExternalNetworkId:
-    type: string
-resources:
-  Network:
-    type: OS::Neutron::Net
-    properties:
-      name: NewNetwork
-  Subnet:
-    type: OS::Neutron::Subnet
-    properties:
-      network_id: {Ref: Network}
-      name: NewSubnet
-      ip_version: 4
-      cidr: 10.0.3.0/24
-      dns_nameservers: ["8.8.8.8"]
-      allocation_pools:
-      - {end: 10.0.3.150, start: 10.0.3.20}
-  Router:
-    type: OS::Neutron::Router
-    properties:
-      name: NewRouter
-      admin_state_up: false
-      external_gateway_info:
-        network: {get_param: ExternalNetworkId}
-        enable_snat: false
-  RouterInterface:
-    type: OS::Neutron::RouterInterface
-    properties:
-      router_id: {get_param: ExternalRouterId}
-      subnet_id: {get_resource: Subnet}
-  Server:
-    type: AWS::EC2::Instance
-    metadata:
-      Name: SmokeServerNeutron
-    properties:
-      ImageId: {get_param: ImageId}
-      InstanceType: {get_param: InstanceType}
-      KeyName: {get_param: KeyName}
-      SubnetId: {get_resource: Subnet}
-      UserData:
-        str_replace:
-          template: |
-            #!/bin/bash -v
-
-            /opt/aws/bin/cfn-signal -e 0 -r "SmokeServerNeutron created" \
-            'wait_handle'
-          params:
-            wait_handle: {get_resource: WaitHandleNeutron}
-  WaitHandleNeutron:
-    type: AWS::CloudFormation::WaitConditionHandle
-  WaitCondition:
-    type: AWS::CloudFormation::WaitCondition
-    depends_on: Server
-    properties:
-      Handle: {get_resource: WaitHandleNeutron}
-      Timeout: '600'
-"""
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(NeutronResourcesTestJSON, cls).setUpClass()
         if not CONF.orchestration.image_ref:
@@ -110,6 +39,7 @@
             raise cls.skipException("Neutron support is required")
         cls.network_client = os.network_client
         cls.stack_name = data_utils.rand_name('heat')
+        template = cls.load_template('neutron_basic')
         cls.keypair_name = (CONF.orchestration.keypair_name or
                             cls._create_keypair()['name'])
         cls.external_router_id = cls._get_external_router_id()
@@ -118,7 +48,7 @@
         # create the stack
         cls.stack_identifier = cls.create_stack(
             cls.stack_name,
-            cls.template,
+            template,
             parameters={
                 'KeyName': cls.keypair_name,
                 'InstanceType': CONF.orchestration.instance_type,
@@ -155,7 +85,7 @@
                               'network:router_interface', ports)
         return router_ports[0]['device_id']
 
-    @attr(type='slow')
+    @test.attr(type='slow')
     def test_created_resources(self):
         """Verifies created neutron resources."""
         resources = [('Network', 'OS::Neutron::Net'),
@@ -169,7 +99,7 @@
             self.assertEqual(resource_type, resource['resource_type'])
             self.assertEqual('CREATE_COMPLETE', resource['resource_status'])
 
-    @attr(type='slow')
+    @test.attr(type='slow')
     def test_created_network(self):
         """Verifies created network."""
         network_id = self.test_resources.get('Network')['physical_resource_id']
@@ -180,7 +110,7 @@
         self.assertEqual(network_id, network['id'])
         self.assertEqual('NewNetwork', network['name'])
 
-    @attr(type='slow')
+    @test.attr(type='slow')
     def test_created_subnet(self):
         """Verifies created subnet."""
         subnet_id = self.test_resources.get('Subnet')['physical_resource_id']
@@ -197,7 +127,7 @@
         self.assertEqual(4, subnet['ip_version'])
         self.assertEqual('10.0.3.0/24', subnet['cidr'])
 
-    @attr(type='slow')
+    @test.attr(type='slow')
     def test_created_router(self):
         """Verifies created router."""
         router_id = self.test_resources.get('Router')['physical_resource_id']
@@ -211,7 +141,7 @@
                          router['external_gateway_info']['enable_snat'])
         self.assertEqual(False, router['admin_state_up'])
 
-    @attr(type='slow')
+    @test.attr(type='slow')
     def test_created_router_interface(self):
         """Verifies created router interface."""
         network_id = self.test_resources.get('Network')['physical_resource_id']
@@ -232,7 +162,7 @@
         router_interface_ip = subnet_fixed_ips[0]['ip_address']
         self.assertEqual('10.0.3.1', router_interface_ip)
 
-    @attr(type='slow')
+    @test.attr(type='slow')
     def test_created_server(self):
         """Verifies created sever."""
         server_id = self.test_resources.get('Server')['physical_resource_id']
diff --git a/tempest/api/orchestration/stacks/test_non_empty_stack.py b/tempest/api/orchestration/stacks/test_non_empty_stack.py
index 11d01f7..70bf562 100644
--- a/tempest/api/orchestration/stacks/test_non_empty_stack.py
+++ b/tempest/api/orchestration/stacks/test_non_empty_stack.py
@@ -21,53 +21,18 @@
 
 
 class StacksTestJSON(base.BaseOrchestrationTest):
-    _interface = 'json'
-
-    template = """
-HeatTemplateFormatVersion: '2012-12-12'
-Description: |
-  Template which creates some simple resources
-Parameters:
-  trigger:
-    Type: String
-    Default: not_yet
-Resources:
-  fluffy:
-    Type: AWS::AutoScaling::LaunchConfiguration
-    Metadata:
-      kittens:
-      - Tom
-      - Stinky
-    Properties:
-      ImageId: not_used
-      InstanceType: not_used
-      UserData:
-        Fn::Replace:
-        - variable_a: {Ref: trigger}
-          variable_b: bee
-        - |
-          A == variable_a
-          B == variable_b
-Outputs:
-  fluffy:
-    Description: "fluffies irc nick"
-    Value:
-      Fn::Replace:
-      - nick: {Ref: fluffy}
-      - |
-        #nick
-"""
 
     @classmethod
     def setUpClass(cls):
         super(StacksTestJSON, cls).setUpClass()
         cls.client = cls.orchestration_client
         cls.stack_name = data_utils.rand_name('heat')
+        template = cls.load_template('non_empty_stack')
 
         # create the stack
         cls.stack_identifier = cls.create_stack(
             cls.stack_name,
-            cls.template,
+            template,
             parameters={
                 'trigger': 'start'
             })
diff --git a/tempest/api/orchestration/stacks/test_nova_keypair_resources.py b/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
index 9d3bf13..1edae72 100644
--- a/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
+++ b/tempest/api/orchestration/stacks/test_nova_keypair_resources.py
@@ -22,63 +22,19 @@
 
 
 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] }
-"""
+    _tpl_type = 'yaml'
 
     @classmethod
     def setUpClass(cls):
         super(NovaKeyPairResourcesYAMLTest, cls).setUpClass()
         cls.client = cls.orchestration_client
         cls.stack_name = data_utils.rand_name('heat')
+        template = cls.load_template('nova_keypair', ext=cls._tpl_type)
 
         # create the stack, avoid any duplicated key.
         cls.stack_identifier = cls.create_stack(
             cls.stack_name,
-            cls.template,
+            template,
             parameters={
                 'KeyPairName1': cls.stack_name + '_1',
                 'KeyPairName2': cls.stack_name + '_2'
@@ -129,53 +85,4 @@
 
 
 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"] }
-   }
-  }
-}
-"""
+    _tpl_type = 'json'
diff --git a/tempest/api/orchestration/stacks/test_server_cfn_init.py b/tempest/api/orchestration/stacks/test_server_cfn_init.py
index 95deaf5..b590f88 100644
--- a/tempest/api/orchestration/stacks/test_server_cfn_init.py
+++ b/tempest/api/orchestration/stacks/test_server_cfn_init.py
@@ -26,99 +26,16 @@
 
 
 class ServerCfnInitTestJSON(base.BaseOrchestrationTest):
-    _interface = 'json'
     existing_keypair = CONF.orchestration.keypair_name is not None
 
-    template = """
-HeatTemplateFormatVersion: '2012-12-12'
-Description: |
-  Template which uses a wait condition to confirm that a minimal
-  cfn-init and cfn-signal has worked
-Parameters:
-  key_name:
-    Type: String
-  flavor:
-    Type: String
-  image:
-    Type: String
-  network:
-    Type: String
-Resources:
-  CfnUser:
-    Type: AWS::IAM::User
-  SmokeSecurityGroup:
-    Type: AWS::EC2::SecurityGroup
-    Properties:
-      GroupDescription: Enable only ping and SSH access
-      SecurityGroupIngress:
-      - {CidrIp: 0.0.0.0/0, FromPort: '-1', IpProtocol: icmp, ToPort: '-1'}
-      - {CidrIp: 0.0.0.0/0, FromPort: '22', IpProtocol: tcp, ToPort: '22'}
-  SmokeKeys:
-    Type: AWS::IAM::AccessKey
-    Properties:
-      UserName: {Ref: CfnUser}
-  SmokeServer:
-    Type: OS::Nova::Server
-    Metadata:
-      AWS::CloudFormation::Init:
-        config:
-          files:
-            /tmp/smoke-status:
-              content: smoke test complete
-            /etc/cfn/cfn-credentials:
-              content:
-                Fn::Replace:
-                - SmokeKeys: {Ref: SmokeKeys}
-                  SecretAccessKey:
-                    'Fn::GetAtt': [SmokeKeys, SecretAccessKey]
-                - |
-                  AWSAccessKeyId=SmokeKeys
-                  AWSSecretKey=SecretAccessKey
-              mode: '000400'
-              owner: root
-              group: root
-    Properties:
-      image: {Ref: image}
-      flavor: {Ref: flavor}
-      key_name: {Ref: key_name}
-      security_groups:
-      - {Ref: SmokeSecurityGroup}
-      networks:
-      - uuid: {Ref: network}
-      user_data:
-        Fn::Replace:
-        - WaitHandle: {Ref: WaitHandle}
-        - |
-          #!/bin/bash -v
-          /opt/aws/bin/cfn-init
-          /opt/aws/bin/cfn-signal -e 0 --data "`cat /tmp/smoke-status`" \
-              "WaitHandle"
-  WaitHandle:
-    Type: AWS::CloudFormation::WaitConditionHandle
-  WaitCondition:
-    Type: AWS::CloudFormation::WaitCondition
-    DependsOn: SmokeServer
-    Properties:
-      Handle: {Ref: WaitHandle}
-      Timeout: '600'
-Outputs:
-  WaitConditionStatus:
-    Description: Contents of /tmp/smoke-status on SmokeServer
-    Value:
-      Fn::GetAtt: [WaitCondition, Data]
-  SmokeServerIp:
-    Description: IP address of server
-    Value:
-      Fn::GetAtt: [SmokeServer, first_address]
-"""
-
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(ServerCfnInitTestJSON, cls).setUpClass()
         if not CONF.orchestration.image_ref:
             raise cls.skipException("No image available to test")
         cls.client = cls.orchestration_client
-
+        template = cls.load_template('cfn_init_signal')
         stack_name = data_utils.rand_name('heat')
         if CONF.orchestration.keypair_name:
             keypair_name = CONF.orchestration.keypair_name
@@ -129,7 +46,7 @@
         # create the stack
         cls.stack_identifier = cls.create_stack(
             stack_name,
-            cls.template,
+            template,
             parameters={
                 'key_name': keypair_name,
                 'flavor': CONF.orchestration.instance_type,
diff --git a/tempest/api/orchestration/stacks/test_stacks.py b/tempest/api/orchestration/stacks/test_stacks.py
index fc2dda8..3ffa0bc 100644
--- a/tempest/api/orchestration/stacks/test_stacks.py
+++ b/tempest/api/orchestration/stacks/test_stacks.py
@@ -20,8 +20,6 @@
 
 
 class StacksTestJSON(base.BaseOrchestrationTest):
-    _interface = 'json'
-
     empty_template = "HeatTemplateFormatVersion: '2012-12-12'\n"
 
     @classmethod
diff --git a/tempest/api/orchestration/stacks/test_swift_resources.py b/tempest/api/orchestration/stacks/test_swift_resources.py
index 713cfd4..b954128 100644
--- a/tempest/api/orchestration/stacks/test_swift_resources.py
+++ b/tempest/api/orchestration/stacks/test_swift_resources.py
@@ -18,45 +18,20 @@
 from tempest import clients
 from tempest.common.utils import data_utils
 from tempest import config
+from tempest import test
 
 
 CONF = config.CONF
 
 
 class SwiftResourcesTestJSON(base.BaseOrchestrationTest):
-    _interface = 'json'
-    template = """
-heat_template_version: 2013-05-23
-description: Template which creates a Swift container resource
-
-resources:
-  SwiftContainerWebsite:
-    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
-
-outputs:
-  WebsiteURL:
-    description: "URL for website hosted on S3"
-    value: { get_attr: [SwiftContainer, WebsiteURL] }
-  DomainName:
-    description: "Domain of Swift host"
-    value: { get_attr: [SwiftContainer, DomainName] }
-
-"""
-
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(SwiftResourcesTestJSON, cls).setUpClass()
         cls.client = cls.orchestration_client
         cls.stack_name = data_utils.rand_name('heat')
+        template = cls.load_template('swift_basic')
         os = clients.Manager()
         if not CONF.service_available.swift:
             raise cls.skipException("Swift support is required")
@@ -65,7 +40,7 @@
         # create the stack
         cls.stack_identifier = cls.create_stack(
             cls.stack_name,
-            cls.template)
+            template)
         cls.stack_id = cls.stack_identifier.split('/')[1]
         cls.client.wait_for_stack_status(cls.stack_id, 'CREATE_COMPLETE')
         cls.test_resources = {}
diff --git a/tempest/api/orchestration/stacks/test_templates.py b/tempest/api/orchestration/stacks/test_templates.py
index 2da819d..5f55b4d 100644
--- a/tempest/api/orchestration/stacks/test_templates.py
+++ b/tempest/api/orchestration/stacks/test_templates.py
@@ -12,12 +12,10 @@
 
 from tempest.api.orchestration import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class TemplateYAMLTestJSON(base.BaseOrchestrationTest):
-    _interface = 'json'
-
     template = """
 HeatTemplateFormatVersion: '2012-12-12'
 Description: |
@@ -30,6 +28,7 @@
     invalid_template_url = 'http://www.example.com/template.yaml'
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(TemplateYAMLTestJSON, cls).setUpClass()
         cls.client = cls.orchestration_client
@@ -40,13 +39,13 @@
         cls.stack_id = cls.stack_identifier.split('/')[1]
         cls.parameters = {}
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_show_template(self):
         """Getting template used to create the stack."""
         resp, template = self.client.show_template(self.stack_identifier)
         self.assertEqual('200', resp['status'])
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_validate_template(self):
         """Validating template passing it content."""
         resp, parameters = self.client.validate_template(self.template,
diff --git a/tempest/api/orchestration/stacks/test_templates_negative.py b/tempest/api/orchestration/stacks/test_templates_negative.py
index c55f6ee..a2a6f98 100644
--- a/tempest/api/orchestration/stacks/test_templates_negative.py
+++ b/tempest/api/orchestration/stacks/test_templates_negative.py
@@ -18,8 +18,6 @@
 
 
 class TemplateYAMLNegativeTestJSON(base.BaseOrchestrationTest):
-    _interface = 'json'
-
     template = """
 HeatTemplateFormatVersion: '2012-12-12'
 Description: |
diff --git a/tempest/api/queuing/base.py b/tempest/api/queuing/base.py
index 5656850..6c22719 100644
--- a/tempest/api/queuing/base.py
+++ b/tempest/api/queuing/base.py
@@ -47,3 +47,9 @@
         """Wrapper utility that returns a test queue."""
         resp, body = cls.client.create_queue(queue_name)
         return resp, body
+
+    @classmethod
+    def delete_queue(cls, queue_name):
+        """Wrapper utility that returns a test queue."""
+        resp, body = cls.client.delete_queue(queue_name)
+        return resp, body
diff --git a/tempest/api/queuing/test_queues.py b/tempest/api/queuing/test_queues.py
index 6934b46..4d03f7e 100644
--- a/tempest/api/queuing/test_queues.py
+++ b/tempest/api/queuing/test_queues.py
@@ -35,3 +35,26 @@
 
         self.assertEqual('201', resp['status'])
         self.assertEqual('', body)
+
+
+class TestManageQueue(base.BaseQueuingTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(TestManageQueue, cls).setUpClass()
+        cls.queue_name = data_utils.rand_name('Queues-Test')
+        # Create Queue
+        cls.client.create_queue(cls.queue_name)
+
+    @test.attr(type='smoke')
+    def test_delete_queue(self):
+        # Delete Queue
+        resp, body = self.delete_queue(self.queue_name)
+        self.assertEqual('204', resp['status'])
+        self.assertEqual('', body)
+
+    @classmethod
+    def tearDownClass(cls):
+        cls.client.delete_queue(cls.queue_name)
+        super(TestManageQueue, cls).tearDownClass()
diff --git a/tempest/api/telemetry/test_telemetry_alarming_api.py b/tempest/api/telemetry/test_telemetry_alarming_api.py
index 907d3d0..a59d3ae 100644
--- a/tempest/api/telemetry/test_telemetry_alarming_api.py
+++ b/tempest/api/telemetry/test_telemetry_alarming_api.py
@@ -20,9 +20,29 @@
 
     @attr(type="gate")
     def test_alarm_list(self):
-        resp, _ = self.telemetry_client.list_alarms()
+        # Create an alarm to verify in the list of alarms
+        created_alarm_ids = list()
+        fetched_ids = list()
+        rules = {'meter_name': 'cpu_util',
+                 'comparison_operator': 'gt',
+                 'threshold': 80.0,
+                 'period': 70}
+        for i in range(3):
+            resp, body = self.create_alarm(threshold_rule=rules)
+            created_alarm_ids.append(body['alarm_id'])
+
+        # List alarms
+        resp, alarm_list = self.telemetry_client.list_alarms()
         self.assertEqual(int(resp['status']), 200)
 
+        # Verify created alarm in the list
+        fetched_ids = [a['alarm_id'] for a in alarm_list]
+        missing_alarms = [a for a in created_alarm_ids if a not in fetched_ids]
+        self.assertEqual(0, len(missing_alarms),
+                         "Failed to find the following created alarm(s)"
+                         " in a fetched list: %s" %
+                         ', '.join(str(a) for a in missing_alarms))
+
     @attr(type="gate")
     def test_create_alarm(self):
         rules = {'meter_name': 'cpu_util',
diff --git a/tempest/api/volume/admin/test_multi_backend.py b/tempest/api/volume/admin/test_multi_backend.py
index 6178a1c..e79d23c 100644
--- a/tempest/api/volume/admin/test_multi_backend.py
+++ b/tempest/api/volume/admin/test_multi_backend.py
@@ -25,10 +25,10 @@
     _interface = "json"
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(VolumeMultiBackendTest, cls).setUpClass()
         if not CONF.volume_feature_enabled.multi_backend:
-            cls.tearDownClass()
             raise cls.skipException("Cinder multi-backend feature disabled")
 
         cls.backend1_name = CONF.volume.backend1_name
@@ -37,40 +37,36 @@
         cls.volume_client = cls.os_adm.volumes_client
         cls.volume_type_id_list = []
         cls.volume_id_list = []
-        try:
-            # Volume/Type creation (uses backend1_name)
-            type1_name = data_utils.rand_name('Type-')
-            vol1_name = data_utils.rand_name('Volume-')
-            extra_specs1 = {"volume_backend_name": cls.backend1_name}
-            resp, cls.type1 = cls.client.create_volume_type(
-                type1_name, extra_specs=extra_specs1)
-            cls.volume_type_id_list.append(cls.type1['id'])
 
-            resp, cls.volume1 = cls.volume_client.create_volume(
-                size=1, display_name=vol1_name, volume_type=type1_name)
-            cls.volume_id_list.append(cls.volume1['id'])
-            cls.volume_client.wait_for_volume_status(cls.volume1['id'],
+        # Volume/Type creation (uses backend1_name)
+        type1_name = data_utils.rand_name('Type-')
+        vol1_name = data_utils.rand_name('Volume-')
+        extra_specs1 = {"volume_backend_name": cls.backend1_name}
+        resp, cls.type1 = cls.client.create_volume_type(
+            type1_name, extra_specs=extra_specs1)
+        cls.volume_type_id_list.append(cls.type1['id'])
+
+        resp, cls.volume1 = cls.volume_client.create_volume(
+            size=1, display_name=vol1_name, volume_type=type1_name)
+        cls.volume_id_list.append(cls.volume1['id'])
+        cls.volume_client.wait_for_volume_status(cls.volume1['id'],
+                                                 'available')
+
+        if cls.backend1_name != cls.backend2_name:
+            # Volume/Type creation (uses backend2_name)
+            type2_name = data_utils.rand_name('Type-')
+            vol2_name = data_utils.rand_name('Volume-')
+            extra_specs2 = {"volume_backend_name": cls.backend2_name}
+            resp, cls.type2 = cls.client.create_volume_type(
+                type2_name, extra_specs=extra_specs2)
+            cls.volume_type_id_list.append(cls.type2['id'])
+
+            resp, cls.volume2 = cls.volume_client.create_volume(
+                size=1, display_name=vol2_name, volume_type=type2_name)
+            cls.volume_id_list.append(cls.volume2['id'])
+            cls.volume_client.wait_for_volume_status(cls.volume2['id'],
                                                      'available')
 
-            if cls.backend1_name != cls.backend2_name:
-                # Volume/Type creation (uses backend2_name)
-                type2_name = data_utils.rand_name('Type-')
-                vol2_name = data_utils.rand_name('Volume-')
-                extra_specs2 = {"volume_backend_name": cls.backend2_name}
-                resp, cls.type2 = cls.client.create_volume_type(
-                    type2_name, extra_specs=extra_specs2)
-                cls.volume_type_id_list.append(cls.type2['id'])
-
-                resp, cls.volume2 = cls.volume_client.create_volume(
-                    size=1, display_name=vol2_name, volume_type=type2_name)
-                cls.volume_id_list.append(cls.volume2['id'])
-                cls.volume_client.wait_for_volume_status(cls.volume2['id'],
-                                                         'available')
-        except Exception as e:
-            LOG.exception("setup failed: %s" % e)
-            cls.tearDownClass()
-            raise
-
     @classmethod
     def tearDownClass(cls):
         # volumes deletion
diff --git a/tempest/api/volume/admin/test_snapshots_actions.py b/tempest/api/volume/admin/test_snapshots_actions.py
index e140ad0..594c703 100644
--- a/tempest/api/volume/admin/test_snapshots_actions.py
+++ b/tempest/api/volume/admin/test_snapshots_actions.py
@@ -22,6 +22,7 @@
     _interface = "json"
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(SnapshotsActionsTest, cls).setUpClass()
         cls.client = cls.snapshots_client
diff --git a/tempest/api/volume/admin/test_volume_quotas.py b/tempest/api/volume/admin/test_volume_quotas.py
index 742f7e1..2949d56 100644
--- a/tempest/api/volume/admin/test_volume_quotas.py
+++ b/tempest/api/volume/admin/test_volume_quotas.py
@@ -61,11 +61,16 @@
             self.demo_tenant_id,
             **new_quota_set)
 
-        default_quota_set.pop('id')
+        cleanup_quota_set = dict(
+            (k, v) for k, v in default_quota_set.iteritems()
+            if k in QUOTA_KEYS)
         self.addCleanup(self.quotas_client.update_quota_set,
-                        self.demo_tenant_id, **default_quota_set)
+                        self.demo_tenant_id, **cleanup_quota_set)
         self.assertEqual(200, resp.status)
-        self.assertEqual(new_quota_set, quota_set)
+        # test that the specific values we set are actually in
+        # the final result. There is nothing here that ensures there
+        # would be no other values in there.
+        self.assertDictContainsSubset(new_quota_set, quota_set)
 
     @test.attr(type='gate')
     def test_show_quota_usage(self):
diff --git a/tempest/api/volume/admin/test_volume_types.py b/tempest/api/volume/admin/test_volume_types.py
index 8183999..ee1d09a 100644
--- a/tempest/api/volume/admin/test_volume_types.py
+++ b/tempest/api/volume/admin/test_volume_types.py
@@ -116,3 +116,35 @@
         self.assertEqual(extra_specs, fetched_volume_type['extra_specs'],
                          'The fetched Volume_type is different '
                          'from the created Volume_type')
+
+    @test.attr(type='smoke')
+    def test_volume_type_encryption_create_get(self):
+        # Create/get encryption type.
+        provider = "LuksEncryptor"
+        control_location = "front-end"
+        name = data_utils.rand_name("volume-type-")
+        resp, body = self.client.create_volume_type(name)
+        self.assertEqual(200, resp.status)
+        self.addCleanup(self._delete_volume_type, body['id'])
+        resp, encryption_type = self.client.create_encryption_type(
+            body['id'], provider=provider,
+            control_location=control_location)
+        self.assertEqual(200, resp.status)
+        self.assertIn('volume_type_id', encryption_type)
+        self.assertEqual(provider, encryption_type['provider'],
+                         "The created encryption_type provider is not equal "
+                         "to the requested provider")
+        self.assertEqual(control_location, encryption_type['control_location'],
+                         "The created encryption_type control_location is not "
+                         "equal to the requested control_location")
+        resp, fetched_encryption_type = self.client.get_encryption_type(
+            encryption_type['volume_type_id'])
+        self.assertEqual(200, resp.status)
+        self.assertEqual(provider,
+                         fetched_encryption_type['provider'],
+                         'The fetched encryption_type provider is different '
+                         'from the created encryption_type')
+        self.assertEqual(control_location,
+                         fetched_encryption_type['control_location'],
+                         'The fetched encryption_type control_location is '
+                         'different from the created encryption_type')
diff --git a/tempest/api/volume/admin/test_volumes_actions.py b/tempest/api/volume/admin/test_volumes_actions.py
index aa00700..4496f18 100644
--- a/tempest/api/volume/admin/test_volumes_actions.py
+++ b/tempest/api/volume/admin/test_volumes_actions.py
@@ -22,6 +22,7 @@
     _interface = "json"
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(VolumesActionsTest, cls).setUpClass()
         cls.client = cls.volumes_client
diff --git a/tempest/api/volume/admin/test_volumes_backup.py b/tempest/api/volume/admin/test_volumes_backup.py
index cd6d7a8..f9fbe18 100644
--- a/tempest/api/volume/admin/test_volumes_backup.py
+++ b/tempest/api/volume/admin/test_volumes_backup.py
@@ -27,6 +27,7 @@
     _interface = "json"
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(VolumesBackupsTest, cls).setUpClass()
 
diff --git a/tempest/api/volume/test_snapshot_metadata.py b/tempest/api/volume/test_snapshot_metadata.py
index 1493b37..d2c4ab7 100644
--- a/tempest/api/volume/test_snapshot_metadata.py
+++ b/tempest/api/volume/test_snapshot_metadata.py
@@ -21,6 +21,7 @@
     _interface = "json"
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(SnapshotMetadataTest, cls).setUpClass()
         cls.client = cls.snapshots_client
diff --git a/tempest/api/volume/test_volume_metadata.py b/tempest/api/volume/test_volume_metadata.py
index e94c700..0d57d47 100644
--- a/tempest/api/volume/test_volume_metadata.py
+++ b/tempest/api/volume/test_volume_metadata.py
@@ -23,16 +23,13 @@
     _interface = "json"
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(VolumeMetadataTest, cls).setUpClass()
         # Create a volume
         cls.volume = cls.create_volume()
         cls.volume_id = cls.volume['id']
 
-    @classmethod
-    def tearDownClass(cls):
-        super(VolumeMetadataTest, cls).tearDownClass()
-
     def tearDown(self):
         # Update the metadata to {}
         self.volumes_client.update_volume_metadata(self.volume_id, {})
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index a22ad32..cfab0bd 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -25,6 +25,7 @@
     _interface = "json"
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(VolumesActionsTest, cls).setUpClass()
         cls.client = cls.volumes_client
@@ -44,7 +45,7 @@
     def tearDownClass(cls):
         # Delete the test instance
         cls.servers_client.delete_server(cls.server['id'])
-        cls.client.wait_for_resource_deletion(cls.server['id'])
+        cls.servers_client.wait_for_server_termination(cls.server['id'])
 
         super(VolumesActionsTest, cls).tearDownClass()
 
diff --git a/tempest/api/volume/test_volumes_list.py b/tempest/api/volume/test_volumes_list.py
index c356342..e2f7a38 100644
--- a/tempest/api/volume/test_volumes_list.py
+++ b/tempest/api/volume/test_volumes_list.py
@@ -56,6 +56,7 @@
                              [str_vol(v) for v in fetched_list]))
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(VolumesListTest, cls).setUpClass()
         cls.client = cls.volumes_client
@@ -65,24 +66,10 @@
         cls.volume_id_list = []
         cls.metadata = {'Type': 'work'}
         for i in range(3):
-            try:
-                volume = cls.create_volume(metadata=cls.metadata)
-
-                resp, volume = cls.client.get_volume(volume['id'])
-                cls.volume_list.append(volume)
-                cls.volume_id_list.append(volume['id'])
-            except Exception:
-                LOG.exception('Failed to create volume. %d volumes were '
-                              'created' % len(cls.volume_id_list))
-                if cls.volume_list:
-                    # We could not create all the volumes, though we were able
-                    # to create *some* of the volumes. This is typically
-                    # because the backing file size of the volume group is
-                    # too small.
-                    for volid in cls.volume_id_list:
-                        cls.client.delete_volume(volid)
-                        cls.client.wait_for_resource_deletion(volid)
-                raise
+            volume = cls.create_volume(metadata=cls.metadata)
+            resp, volume = cls.client.get_volume(volume['id'])
+            cls.volume_list.append(volume)
+            cls.volume_id_list.append(volume['id'])
 
     @classmethod
     def tearDownClass(cls):
diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
index 82924a5..a8b0a8d 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -25,6 +25,7 @@
     _interface = 'json'
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(VolumesNegativeTest, cls).setUpClass()
         cls.client = cls.volumes_client
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
index 2701e84..2ce3a4f 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -24,14 +24,10 @@
     _interface = "json"
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(VolumesSnapshotTest, cls).setUpClass()
-        try:
-            cls.volume_origin = cls.create_volume()
-        except Exception:
-            LOG.exception("setup failed")
-            cls.tearDownClass()
-            raise
+        cls.volume_origin = cls.create_volume()
 
     @classmethod
     def tearDownClass(cls):
@@ -71,8 +67,8 @@
         resp, server = self.servers_client.create_server(server_name,
                                                          self.image_ref,
                                                          self.flavor_ref)
-        self.servers_client.wait_for_server_status(server['id'], 'ACTIVE')
         self.addCleanup(self.servers_client.delete_server, server['id'])
+        self.servers_client.wait_for_server_status(server['id'], 'ACTIVE')
         mountpoint = '/dev/%s' % CONF.compute.volume_device_name
         resp, body = self.volumes_client.attach_volume(
             self.volume_origin['id'], server['id'], mountpoint)
diff --git a/tempest/api/volume/v2/test_volumes_list.py b/tempest/api/volume/v2/test_volumes_list.py
index fff40ed..41445d7 100644
--- a/tempest/api/volume/v2/test_volumes_list.py
+++ b/tempest/api/volume/v2/test_volumes_list.py
@@ -56,6 +56,7 @@
                              [str_vol(v) for v in fetched_list]))
 
     @classmethod
+    @test.safe_setup
     def setUpClass(cls):
         super(VolumesV2ListTestJSON, cls).setUpClass()
         cls.client = cls.volumes_client
@@ -65,23 +66,10 @@
         cls.volume_id_list = []
         cls.metadata = {'Type': 'work'}
         for i in range(3):
-            try:
-                volume = cls.create_volume(metadata=cls.metadata)
-                resp, volume = cls.client.get_volume(volume['id'])
-                cls.volume_list.append(volume)
-                cls.volume_id_list.append(volume['id'])
-            except Exception:
-                LOG.exception('Failed to create volume. %d volumes were '
-                              'created' % len(cls.volume_id_list))
-                if cls.volume_list:
-                    # We could not create all the volumes, though we were able
-                    # to create *some* of the volumes. This is typically
-                    # because the backing file size of the volume group is
-                    # too small.
-                    for volid in cls.volume_id_list:
-                        cls.client.delete_volume(volid)
-                        cls.client.wait_for_resource_deletion(volid)
-                raise
+            volume = cls.create_volume(metadata=cls.metadata)
+            resp, volume = cls.client.get_volume(volume['id'])
+            cls.volume_list.append(volume)
+            cls.volume_id_list.append(volume['id'])
 
     @classmethod
     def tearDownClass(cls):
@@ -187,7 +175,7 @@
         self._list_by_param_value_and_assert(params)
 
     @test.attr(type='gate')
-    def test_volume_list_with_detail_param_metadata(self):
+    def test_volume_list_with_details_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)
@@ -201,7 +189,7 @@
         self._list_by_param_value_and_assert(params, expected_list=[volume])
 
     @test.attr(type='gate')
-    def test_volume_list_with_detail_param_display_name_and_status(self):
+    def test_volume_list_with_details_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)]
         params = {'name': volume['name'],
@@ -209,6 +197,37 @@
         self._list_by_param_value_and_assert(params, expected_list=[volume],
                                              with_detail=True)
 
+    @test.attr(type='gate')
+    def test_volume_list_details_with_multiple_params(self):
+        # List volumes detail using combined condition
+        def _list_details_with_multiple_params(limit=2,
+                                               status='available',
+                                               sort_dir='asc',
+                                               sort_key='created_at'):
+            params = {'limit': limit,
+                      'status': status,
+                      'sort_dir': sort_dir,
+                      'sort_key': sort_key
+                      }
+            resp, fetched_volume = self.client.list_volumes_with_detail(params)
+            self.assertEqual(200, resp.status)
+            self.assertEqual(limit, len(fetched_volume),
+                             "The count of volumes is %s, expected:%s " %
+                             (len(fetched_volume), limit))
+            self.assertEqual(status, fetched_volume[0]['status'])
+            self.assertEqual(status, fetched_volume[1]['status'])
+            val0 = fetched_volume[0][sort_key]
+            val1 = fetched_volume[1][sort_key]
+            if sort_dir == 'asc':
+                self.assertTrue(val0 < val1,
+                                "%s < %s" % (val0, val1))
+            elif sort_dir == 'desc':
+                self.assertTrue(val0 > val1,
+                                "%s > %s" % (val0, val1))
+
+        _list_details_with_multiple_params()
+        _list_details_with_multiple_params(sort_dir='desc')
+
 
 class VolumesV2ListTestXML(VolumesV2ListTestJSON):
     _interface = 'xml'
diff --git a/tempest/api_schema/compute/aggregates.py b/tempest/api_schema/compute/aggregates.py
new file mode 100644
index 0000000..49793fe
--- /dev/null
+++ b/tempest/api_schema/compute/aggregates.py
@@ -0,0 +1,43 @@
+# 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_aggregates = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'aggregates': {
+                'type': 'array',
+                'items': {
+                    'type': 'object',
+                    'properties': {
+                        'availability_zone': {'type': ['string', 'null']},
+                        'created_at': {'type': 'string'},
+                        'deleted': {'type': 'boolean'},
+                        'deleted_at': {'type': ['string', 'null']},
+                        'hosts': {'type': 'array'},
+                        'id': {'type': 'integer'},
+                        'metadata': {'type': 'object'},
+                        'name': {'type': 'string'},
+                        'updated_at': {'type': ['string', 'null']}
+                    },
+                    'required': ['availability_zone', 'created_at', 'deleted',
+                                 'deleted_at', 'hosts', 'id', 'metadata',
+                                 'name', 'updated_at']
+                }
+            }
+        },
+        'required': ['aggregates']
+    }
+}
diff --git a/tempest/api_schema/compute/flavors_access.py b/tempest/api_schema/compute/flavors_access.py
new file mode 100644
index 0000000..152e24c
--- /dev/null
+++ b/tempest/api_schema/compute/flavors_access.py
@@ -0,0 +1,34 @@
+# 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_flavor_access = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'flavor_access': {
+                'type': 'array',
+                'items': {
+                    'type': 'object',
+                    'properties': {
+                        'flavor_id': {'type': 'string'},
+                        'tenant_id': {'type': 'string'},
+                    },
+                    'required': ['flavor_id', 'tenant_id'],
+                }
+            }
+        },
+        'required': ['flavor_access']
+    }
+}
diff --git a/tempest/api_schema/compute/hosts.py b/tempest/api_schema/compute/hosts.py
new file mode 100644
index 0000000..b9a3db9
--- /dev/null
+++ b/tempest/api_schema/compute/hosts.py
@@ -0,0 +1,35 @@
+# 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_hosts = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'hosts': {
+                'type': 'array',
+                'items': {
+                    'type': 'object',
+                    'properties': {
+                        'host_name': {'type': 'string'},
+                        'service': {'type': 'string'},
+                        'zone': {'type': 'string'}
+                    },
+                    'required': ['host_name', 'service', 'zone']
+                }
+            }
+        },
+        'required': ['hosts']
+    }
+}
diff --git a/tempest/api_schema/compute/hypervisors.py b/tempest/api_schema/compute/hypervisors.py
new file mode 100644
index 0000000..7de5147
--- /dev/null
+++ b/tempest/api_schema/compute/hypervisors.py
@@ -0,0 +1,149 @@
+# 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.
+
+hypervisor_statistics = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'hypervisor_statistics': {
+                'type': 'object',
+                'properties': {
+                    'count': {'type': 'integer'},
+                    'current_workload': {'type': 'integer'},
+                    'disk_available_least': {'type': 'integer'},
+                    'free_disk_gb': {'type': 'integer'},
+                    'free_ram_mb': {'type': 'integer'},
+                    'local_gb': {'type': 'integer'},
+                    'local_gb_used': {'type': 'integer'},
+                    'memory_mb': {'type': 'integer'},
+                    'memory_mb_used': {'type': 'integer'},
+                    'running_vms': {'type': 'integer'},
+                    'vcpus': {'type': 'integer'},
+                    'vcpus_used': {'type': 'integer'}
+                },
+                'required': ['count', 'current_workload',
+                             'disk_available_least', 'free_disk_gb',
+                             'free_ram_mb', 'local_gb', 'local_gb_used',
+                             'memory_mb', 'memory_mb_used', 'running_vms',
+                             'vcpus', 'vcpus_used']
+            }
+        },
+        'required': ['hypervisor_statistics']
+    }
+}
+
+common_list_hypervisors_detail = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'hypervisors': {
+                'type': 'array',
+                'items': {
+                    'type': 'object',
+                    'properties': {
+                        'cpu_info': {'type': 'string'},
+                        'current_workload': {'type': 'integer'},
+                        'disk_available_least': {'type': ['integer', 'null']},
+                        'host_ip': {
+                            'type': 'string',
+                            'format': 'ip-address'
+                        },
+                        'free_disk_gb': {'type': 'integer'},
+                        'free_ram_mb': {'type': 'integer'},
+                        'hypervisor_hostname': {'type': 'string'},
+                        'hypervisor_type': {'type': 'string'},
+                        'hypervisor_version': {'type': 'integer'},
+                        'id': {'type': ['integer', 'string']},
+                        'local_gb': {'type': 'integer'},
+                        'local_gb_used': {'type': 'integer'},
+                        'memory_mb': {'type': 'integer'},
+                        'memory_mb_used': {'type': 'integer'},
+                        'running_vms': {'type': 'integer'},
+                        'service': {
+                            'type': 'object',
+                            'properties': {
+                                'host': {'type': 'string'},
+                                'id': {'type': ['integer', 'string']}
+                            },
+                            'required': ['host', 'id']
+                        },
+                        'vcpus': {'type': 'integer'},
+                        'vcpus_used': {'type': 'integer'}
+                    },
+                    'required': ['cpu_info', 'current_workload',
+                                 'disk_available_least', 'host_ip',
+                                 'free_disk_gb', 'free_ram_mb',
+                                 'hypervisor_hostname', 'hypervisor_type',
+                                 'hypervisor_version', 'id', 'local_gb',
+                                 'local_gb_used', 'memory_mb',
+                                 'memory_mb_used', 'running_vms', 'service',
+                                 'vcpus', 'vcpus_used']
+                }
+            }
+        },
+        'required': ['hypervisors']
+    }
+}
+
+common_show_hypervisor = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'hypervisor': {
+                'type': 'object',
+                'properties': {
+                    'cpu_info': {'type': 'string'},
+                    'current_workload': {'type': 'integer'},
+                    'disk_available_least': {'type': 'integer'},
+                    'host_ip': {
+                        'type': 'string',
+                        'format': 'ip-address'
+                    },
+                    'free_disk_gb': {'type': 'integer'},
+                    'free_ram_mb': {'type': 'integer'},
+                    'hypervisor_hostname': {'type': 'string'},
+                    'hypervisor_type': {'type': 'string'},
+                    'hypervisor_version': {'type': 'integer'},
+                    'id': {'type': ['integer', 'string']},
+                    'local_gb': {'type': 'integer'},
+                    'local_gb_used': {'type': 'integer'},
+                    'memory_mb': {'type': 'integer'},
+                    'memory_mb_used': {'type': 'integer'},
+                    'running_vms': {'type': 'integer'},
+                    'service': {
+                        'type': 'object',
+                        'properties': {
+                            'host': {'type': 'string'},
+                            'id': {'type': ['integer', 'string']}
+                        },
+                        'required': ['host', 'id']
+                    },
+                    'vcpus': {'type': 'integer'},
+                    'vcpus_used': {'type': 'integer'}
+                },
+                'required': ['cpu_info', 'current_workload',
+                             'disk_available_least', 'host_ip',
+                             'free_disk_gb', 'free_ram_mb',
+                             'hypervisor_hostname', 'hypervisor_type',
+                             'hypervisor_version', 'id', 'local_gb',
+                             'local_gb_used', 'memory_mb', 'memory_mb_used',
+                             'running_vms', 'service', 'vcpus', 'vcpus_used']
+            }
+        },
+        'required': ['hypervisor']
+    }
+}
diff --git a/tempest/api_schema/compute/keypairs.py b/tempest/api_schema/compute/keypairs.py
new file mode 100644
index 0000000..8973c02
--- /dev/null
+++ b/tempest/api_schema/compute/keypairs.py
@@ -0,0 +1,41 @@
+# 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_keypairs = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'keypairs': {
+                'type': 'array',
+                'items': {
+                    'type': 'object',
+                    'properties': {
+                        'keypair': {
+                            'type': 'object',
+                            'properties': {
+                                'public_key': {'type': 'string'},
+                                'name': {'type': 'string'},
+                                'fingerprint': {'type': 'string'}
+                            },
+                            'required': ['public_key', 'name', 'fingerprint']
+                        }
+                    },
+                    'required': ['keypair']
+                }
+            }
+        },
+        'required': ['keypairs']
+    }
+}
diff --git a/tempest/api_schema/compute/parameter_types.py b/tempest/api_schema/compute/parameter_types.py
new file mode 100644
index 0000000..67c0c9b
--- /dev/null
+++ b/tempest/api_schema/compute/parameter_types.py
@@ -0,0 +1,28 @@
+# 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.
+
+links = {
+    'type': 'array',
+    'items': {
+        'type': 'object',
+        'properties': {
+            'href': {
+                'type': 'string',
+                'format': 'uri'
+            },
+            'rel': {'type': 'string'}
+        },
+        'required': ['href', 'rel']
+    }
+}
diff --git a/tempest/api_schema/compute/v2/fixed_ips.py b/tempest/api_schema/compute/v2/fixed_ips.py
new file mode 100644
index 0000000..a6add04
--- /dev/null
+++ b/tempest/api_schema/compute/v2/fixed_ips.py
@@ -0,0 +1,36 @@
+# 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.
+
+fixed_ips = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'fixed_ip': {
+                'type': 'object',
+                'properties': {
+                    'address': {
+                        'type': 'string',
+                        'format': 'ip-address'
+                    },
+                    'cidr': {'type': 'string'},
+                    'host': {'type': 'string'},
+                    'hostname': {'type': 'string'}
+                },
+                'required': ['address', 'cidr', 'host', 'hostname']
+            }
+        },
+        'required': ['fixed_ip']
+    }
+}
diff --git a/tempest/api_schema/compute/v2/floating_ips.py b/tempest/api_schema/compute/v2/floating_ips.py
new file mode 100644
index 0000000..3ea6320
--- /dev/null
+++ b/tempest/api_schema/compute/v2/floating_ips.py
@@ -0,0 +1,100 @@
+# 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_floating_ips = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'floating_ips': {
+                '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']},
+                        'pool': {'type': ['string', 'null']},
+                        'instance_id': {'type': ['integer', 'string', 'null']},
+                        'ip': {
+                            'type': 'string',
+                            'format': 'ip-address'
+                        },
+                        'fixed_ip': {
+                            'type': ['string', 'null'],
+                            'format': 'ip-address'
+                        }
+                    },
+                    'required': ['id', 'pool', 'instance_id', 'ip', 'fixed_ip']
+                }
+            }
+        },
+        'required': ['floating_ips']
+    }
+}
+
+floating_ip = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'floating_ip': {
+                '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']},
+                    'pool': {'type': ['string', 'null']},
+                    'instance_id': {'type': ['integer', 'string', 'null']},
+                    'ip': {
+                        'type': 'string',
+                        'format': 'ip-address'
+                    },
+                    'fixed_ip': {
+                        'type': ['string', 'null'],
+                        'format': 'ip-address'
+                    }
+                },
+                'required': ['id', 'pool', 'instance_id', 'ip', 'fixed_ip']
+            }
+        },
+        'required': ['floating_ip']
+    }
+}
+
+floating_ip_pools = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'floating_ip_pools': {
+                'type': 'array',
+                'items': {
+                    'type': 'object',
+                    'properties': {
+                        'name': {'type': 'string'}
+                    },
+                    'required': ['name']
+                }
+            }
+        },
+        'required': ['floating_ip_pools']
+    }
+}
+
+add_remove_floating_ip = {
+    'status_code': [202]
+}
diff --git a/tempest/api_schema/compute/v2/images.py b/tempest/api_schema/compute/v2/images.py
new file mode 100644
index 0000000..41593c6
--- /dev/null
+++ b/tempest/api_schema/compute/v2/images.py
@@ -0,0 +1,92 @@
+# 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_schema.compute import parameter_types
+
+get_image = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'image': {
+                'type': 'object',
+                'properties': {
+                    'id': {'type': 'string'},
+                    'status': {'type': 'string'},
+                    'updated': {'type': 'string'},
+                    'links': parameter_types.links,
+                    'name': {'type': 'string'},
+                    'created': {'type': 'string'},
+                    'OS-EXT-IMG-SIZE:size': {'type': 'integer'},
+                    'minDisk': {'type': 'integer'},
+                    'minRam': {'type': 'integer'},
+                    'progress': {'type': 'integer'},
+                    'metadata': {'type': 'object'},
+                    'server': {
+                        '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']},
+                            'links': parameter_types.links
+                        },
+                        'required': ['id', 'links']
+                    }
+                },
+                # 'server' attributes only comes in response body if image is
+                # associated with any server. So it is not 'required'
+                'required': ['id', 'status', 'updated', 'links', 'name',
+                             'created', 'OS-EXT-IMG-SIZE:size', 'minDisk',
+                             'minRam', 'progress', 'metadata']
+            }
+        },
+        'required': ['image']
+    }
+}
+
+list_images = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'images': {
+                'type': 'array',
+                'items': {
+                    'type': 'object',
+                    'properties': {
+                        'id': {'type': 'string'},
+                        'links': {
+                            'type': 'array',
+                            'items': {
+                                'type': 'object',
+                                'properties': {
+                                    'href': {
+                                        'type': 'string',
+                                        'format': 'uri'
+                                    },
+                                    'rel': {'type': 'string'}
+                                },
+                                'required': ['href', 'rel']
+                            }
+                        },
+                        'name': {'type': 'string'}
+                    },
+                    'required': ['id', 'links', 'name']
+                }
+            }
+        },
+        'required': ['images']
+    }
+}
diff --git a/tempest/api_schema/compute/v2/keypairs.py b/tempest/api_schema/compute/v2/keypairs.py
new file mode 100644
index 0000000..3225b0d
--- /dev/null
+++ b/tempest/api_schema/compute/v2/keypairs.py
@@ -0,0 +1,47 @@
+# 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.
+
+get_keypair = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'keypair': {
+                'type': 'object',
+                'properties': {
+                    'public_key': {'type': 'string'},
+                    'name': {'type': 'string'},
+                    'fingerprint': {'type': 'string'},
+                    # NOTE: Now the type of 'user_id' is integer, but here
+                    # allows 'string' also because we will be able to change
+                    # it to 'uuid' in the future.
+                    'user_id': {'type': ['integer', 'string']},
+                    'deleted': {'type': 'boolean'},
+                    'created_at': {'type': 'string'},
+                    'updated_at': {'type': ['string', 'null']},
+                    'deleted_at': {'type': ['string', 'null']},
+                    'id': {'type': 'integer'}
+
+                },
+                # When we run the get keypair API, response body includes
+                # all the above mentioned attributes.
+                # But in Nova API sample file, response body includes only
+                # 'public_key', 'name' & 'fingerprint'. So only 'public_key',
+                # 'name' & 'fingerprint' are defined as 'required'.
+                'required': ['public_key', 'name', 'fingerprint']
+            }
+        },
+        'required': ['keypair']
+    }
+}
diff --git a/tempest/api_schema/compute/v2/limits.py b/tempest/api_schema/compute/v2/limits.py
new file mode 100644
index 0000000..b9857f1
--- /dev/null
+++ b/tempest/api_schema/compute/v2/limits.py
@@ -0,0 +1,94 @@
+# 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.
+
+get_limit = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'limits': {
+                'type': 'object',
+                'properties': {
+                    'absolute': {
+                        'type': 'object',
+                        'properties': {
+                            'maxTotalRAMSize': {'type': 'integer'},
+                            'totalCoresUsed': {'type': 'integer'},
+                            'maxTotalInstances': {'type': 'integer'},
+                            'maxTotalFloatingIps': {'type': 'integer'},
+                            'totalSecurityGroupsUsed': {'type': 'integer'},
+                            'maxTotalCores': {'type': 'integer'},
+                            'totalFloatingIpsUsed': {'type': 'integer'},
+                            'maxSecurityGroups': {'type': 'integer'},
+                            'maxServerMeta': {'type': 'integer'},
+                            'maxPersonality': {'type': 'integer'},
+                            'maxImageMeta': {'type': 'integer'},
+                            'maxPersonalitySize': {'type': 'integer'},
+                            'maxSecurityGroupRules': {'type': 'integer'},
+                            'maxTotalKeypairs': {'type': 'integer'},
+                            'totalRAMUsed': {'type': 'integer'},
+                            'totalInstancesUsed': {'type': 'integer'}
+                        },
+                        'required': ['maxImageMeta',
+                                     'maxPersonality',
+                                     'maxPersonalitySize',
+                                     'maxSecurityGroupRules',
+                                     'maxSecurityGroups',
+                                     'maxServerMeta',
+                                     'maxTotalCores',
+                                     'maxTotalFloatingIps',
+                                     'maxTotalInstances',
+                                     'maxTotalKeypairs',
+                                     'maxTotalRAMSize',
+                                     'totalCoresUsed',
+                                     'totalFloatingIpsUsed',
+                                     'totalInstancesUsed',
+                                     'totalRAMUsed',
+                                     'totalSecurityGroupsUsed']
+                    },
+                    'rate': {
+                        'type': 'array',
+                        'items': {
+                            'type': 'object',
+                            'properties': {
+                                'limit': {
+                                    'type': 'array',
+                                    'items': {
+                                        'type': 'object',
+                                        'properties': {
+                                            'next-available':
+                                                {'type': 'string'},
+                                            'remaining':
+                                                {'type': 'integer'},
+                                            'unit':
+                                                {'type': 'string'},
+                                            'value':
+                                                {'type': 'integer'},
+                                            'verb':
+                                                {'type': 'string'}
+                                        }
+                                    }
+                                },
+                                'regex': {'type': 'string'},
+                                'uri': {'type': 'string'}
+                            }
+                        }
+                    }
+                },
+                'required': ['absolute', 'rate']
+            }
+        },
+        'required': ['limits']
+    }
+}
diff --git a/tempest/api_schema/compute/v2/quotas.py b/tempest/api_schema/compute/v2/quotas.py
new file mode 100644
index 0000000..d69cbd7
--- /dev/null
+++ b/tempest/api_schema/compute/v2/quotas.py
@@ -0,0 +1,47 @@
+# 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.
+
+quota_set = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'quota_set': {
+                'type': 'object',
+                'properties': {
+                    'id': {'type': 'string'},
+                    'instances': {'type': 'integer'},
+                    'cores': {'type': 'integer'},
+                    'ram': {'type': 'integer'},
+                    'floating_ips': {'type': 'integer'},
+                    'fixed_ips': {'type': 'integer'},
+                    'metadata_items': {'type': 'integer'},
+                    'injected_files': {'type': 'integer'},
+                    'injected_file_content_bytes': {'type': 'integer'},
+                    'injected_file_path_bytes': {'type': 'integer'},
+                    'key_pairs': {'type': 'integer'},
+                    'security_groups': {'type': 'integer'},
+                    'security_group_rules': {'type': 'integer'}
+                },
+                'required': ['id', 'instances', 'cores', 'ram',
+                             'floating_ips', 'fixed_ips',
+                             'metadata_items', 'injected_files',
+                             'injected_file_content_bytes',
+                             'injected_file_path_bytes', 'key_pairs',
+                             'security_groups', 'security_group_rules']
+            }
+        },
+        'required': ['quota_set']
+    }
+}
diff --git a/tempest/api_schema/compute/v2/security_groups.py b/tempest/api_schema/compute/v2/security_groups.py
new file mode 100644
index 0000000..68b65b4
--- /dev/null
+++ b/tempest/api_schema/compute/v2/security_groups.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_security_groups = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'security_groups': {
+                'type': 'array',
+                'items': {
+                    'type': 'object',
+                    'properties': {
+                        'id': {'type': ['integer', 'string']},
+                        'name': {'type': 'string'},
+                        'tenant_id': {'type': 'string'},
+                        'rules': {'type': 'array'},
+                        'description': {'type': 'string'},
+                    },
+                    'required': ['id', 'name', 'tenant_id', 'rules',
+                                 'description'],
+                }
+            }
+        },
+        'required': ['security_groups']
+    }
+}
diff --git a/tempest/api_schema/compute/v2/servers.py b/tempest/api_schema/compute/v2/servers.py
new file mode 100644
index 0000000..b4e6e53
--- /dev/null
+++ b/tempest/api_schema/compute/v2/servers.py
@@ -0,0 +1,42 @@
+# 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_schema.compute import parameter_types
+
+create_server = {
+    'status_code': [202],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'server': {
+                'type': 'object',
+                'properties': {
+                    # NOTE: Now the type of 'id' is uuid, but here allows
+                    # 'integer' also because old OpenStack uses 'integer'
+                    # as a server id.
+                    'id': {'type': ['integer', 'string']},
+                    'security_groups': {'type': 'array'},
+                    'links': parameter_types.links,
+                    'adminPass': {'type': 'string'},
+                    'OS-DCF:diskConfig': {'type': 'string'}
+                },
+                # NOTE: OS-DCF:diskConfig is API extension, and some
+                # environments return a response without the attribute.
+                # So it is not 'required'.
+                'required': ['id', 'security_groups', 'links', 'adminPass']
+            }
+        },
+        'required': ['server']
+    }
+}
diff --git a/tempest/api_schema/compute/v2/volumes.py b/tempest/api_schema/compute/v2/volumes.py
index 16ed7c2..9cfd7e3 100644
--- a/tempest/api_schema/compute/v2/volumes.py
+++ b/tempest/api_schema/compute/v2/volumes.py
@@ -20,10 +20,7 @@
             'volume': {
                 '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']},
+                    'id': {'type': 'string'},
                     'status': {'type': 'string'},
                     'displayName': {'type': ['string', 'null']},
                     'availabilityZone': {'type': 'string'},
@@ -38,11 +35,17 @@
                         'items': {
                             'type': 'object',
                             'properties': {
-                                'id': {'type': ['integer', 'string']},
+                                'id': {'type': 'string'},
                                 'device': {'type': 'string'},
-                                'volumeId': {'type': ['integer', 'string']},
+                                'volumeId': {'type': 'string'},
                                 'serverId': {'type': ['integer', 'string']}
                             }
+                            # NOTE- If volume is not attached to any server
+                            # then, 'attachments' attributes comes as array
+                            # with empty objects "[{}]" due to that elements
+                            # of 'attachments' cannot defined as 'required'.
+                            # If it would come as empty array "[]" then,
+                            # those elements can be defined as 'required'.
                         }
                     }
                 },
@@ -54,3 +57,54 @@
         'required': ['volume']
     }
 }
+
+list_volumes = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'volumes': {
+                'type': 'array',
+                'items': {
+                    'type': 'object',
+                    'properties': {
+                        'id': {'type': 'string'},
+                        'status': {'type': 'string'},
+                        'displayName': {'type': ['string', 'null']},
+                        'availabilityZone': {'type': 'string'},
+                        'createdAt': {'type': 'string'},
+                        'displayDescription': {'type': ['string', 'null']},
+                        'volumeType': {'type': 'string'},
+                        'snapshotId': {'type': ['string', 'null']},
+                        'metadata': {'type': 'object'},
+                        'size': {'type': 'integer'},
+                        'attachments': {
+                            'type': 'array',
+                            'items': {
+                                'type': 'object',
+                                'properties': {
+                                    'id': {'type': 'string'},
+                                    'device': {'type': 'string'},
+                                    'volumeId': {'type': 'string'},
+                                    'serverId': {'type': ['integer', 'string']}
+                                }
+                                # NOTE- If volume is not attached to any server
+                                # then, 'attachments' attributes comes as array
+                                # with empty object "[{}]" due to that elements
+                                # of 'attachments' cannot defined as 'required'
+                                # If it would come as empty array "[]" then,
+                                # those elements can be defined as 'required'.
+                            }
+                        }
+                    },
+                    'required': ['id', 'status', 'displayName',
+                                 'availabilityZone', 'createdAt',
+                                 'displayDescription', 'volumeType',
+                                 'snapshotId', 'metadata', 'size',
+                                 'attachments']
+                }
+            }
+        },
+        'required': ['volumes']
+    }
+}
diff --git a/tempest/api_schema/compute/v3/__init__.py b/tempest/api_schema/compute/v3/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/api_schema/compute/v3/__init__.py
diff --git a/tempest/api_schema/compute/v3/hypervisors.py b/tempest/api_schema/compute/v3/hypervisors.py
new file mode 100644
index 0000000..6eb0072
--- /dev/null
+++ b/tempest/api_schema/compute/v3/hypervisors.py
@@ -0,0 +1,27 @@
+# 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.
+
+import copy
+from tempest.api_schema.compute import hypervisors
+
+list_hypervisors_detail = copy.deepcopy(
+    hypervisors.common_list_hypervisors_detail)
+# Defining extra attributes for V3 show hypervisor schema
+list_hypervisors_detail['response_body']['properties']['hypervisors'][
+    'items']['properties']['os-pci:pci_stats'] = {'type': 'array'}
+
+show_hypervisor = copy.deepcopy(hypervisors.common_show_hypervisor)
+# Defining extra attributes for V3 show hypervisor schema
+show_hypervisor['response_body']['properties']['hypervisor']['properties'][
+    'os-pci:pci_stats'] = {'type': 'array'}
diff --git a/tempest/api_schema/compute/v3/keypairs.py b/tempest/api_schema/compute/v3/keypairs.py
new file mode 100644
index 0000000..0197c84
--- /dev/null
+++ b/tempest/api_schema/compute/v3/keypairs.py
@@ -0,0 +1,32 @@
+# 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.
+
+get_keypair = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'keypair': {
+                'type': 'object',
+                'properties': {
+                    'public_key': {'type': 'string'},
+                    'name': {'type': 'string'},
+                    'fingerprint': {'type': 'string'}
+                },
+                'required': ['public_key', 'name', 'fingerprint']
+            }
+        },
+        'required': ['keypair']
+    }
+}
diff --git a/tempest/api_schema/compute/v3/quotas.py b/tempest/api_schema/compute/v3/quotas.py
new file mode 100644
index 0000000..1b9989d
--- /dev/null
+++ b/tempest/api_schema/compute/v3/quotas.py
@@ -0,0 +1,42 @@
+# 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.
+
+quota_set = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'quota_set': {
+                'type': 'object',
+                'properties': {
+                    'id': {'type': 'string'},
+                    'instances': {'type': 'integer'},
+                    'cores': {'type': 'integer'},
+                    'ram': {'type': 'integer'},
+                    'floating_ips': {'type': 'integer'},
+                    'fixed_ips': {'type': 'integer'},
+                    'metadata_items': {'type': 'integer'},
+                    'key_pairs': {'type': 'integer'},
+                    'security_groups': {'type': 'integer'},
+                    'security_group_rules': {'type': 'integer'}
+                },
+                'required': ['id', 'instances', 'cores', 'ram',
+                             'floating_ips', 'fixed_ips',
+                             'metadata_items', 'key_pairs',
+                             'security_groups', 'security_group_rules']
+            }
+        },
+        'required': ['quota_set']
+    }
+}
diff --git a/tempest/api_schema/compute/v3/servers.py b/tempest/api_schema/compute/v3/servers.py
new file mode 100644
index 0000000..390962e
--- /dev/null
+++ b/tempest/api_schema/compute/v3/servers.py
@@ -0,0 +1,44 @@
+# 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_schema.compute import parameter_types
+
+create_server = {
+    'status_code': [202],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'server': {
+                'type': 'object',
+                'properties': {
+                    # NOTE: Now the type of 'id' is uuid, but here allows
+                    # 'integer' also because old OpenStack uses 'integer'
+                    # as a server id.
+                    'id': {'type': ['integer', 'string']},
+                    'os-security-groups:security_groups': {'type': 'array'},
+                    'links': parameter_types.links,
+                    'admin_password': {'type': 'string'},
+                    'os-access-ips:access_ip_v4': {'type': 'string'},
+                    'os-access-ips:access_ip_v6': {'type': 'string'}
+                },
+                # NOTE: os-access-ips:access_ip_v4/v6 are API extension,
+                # and some environments return a response without these
+                # attributes. So they are not 'required'.
+                'required': ['id', 'os-security-groups:security_groups',
+                             'links', 'admin_password']
+            }
+        },
+        'required': ['server']
+    }
+}
diff --git a/tempest/auth.py b/tempest/auth.py
index 0e45161..5fc923f 100644
--- a/tempest/auth.py
+++ b/tempest/auth.py
@@ -164,6 +164,8 @@
 
 class KeystoneAuthProvider(AuthProvider):
 
+    token_expiry_threshold = datetime.timedelta(seconds=60)
+
     def __init__(self, credentials, client_type='tempest', interface=None):
         super(KeystoneAuthProvider, self).__init__(credentials, client_type,
                                                    interface)
@@ -293,7 +295,8 @@
         _, access = auth_data
         expiry = datetime.datetime.strptime(access['token']['expires'],
                                             self.EXPIRY_DATE_FORMAT)
-        return expiry <= datetime.datetime.now()
+        return expiry - self.token_expiry_threshold <= \
+            datetime.datetime.utcnow()
 
 
 class KeystoneV3AuthProvider(KeystoneAuthProvider):
@@ -393,4 +396,5 @@
         _, access = auth_data
         expiry = datetime.datetime.strptime(access['expires_at'],
                                             self.EXPIRY_DATE_FORMAT)
-        return expiry <= datetime.datetime.now()
+        return expiry - self.token_expiry_threshold <= \
+            datetime.datetime.utcnow()
diff --git a/tempest/cli/__init__.py b/tempest/cli/__init__.py
index 810e6b2..6aa98c4 100644
--- a/tempest/cli/__init__.py
+++ b/tempest/cli/__init__.py
@@ -42,6 +42,7 @@
 
     def nova(self, action, flags='', params='', admin=True, fail_ok=False):
         """Executes nova command for the given action."""
+        flags += ' --endpoint-type %s' % CONF.compute.endpoint_type
         return self.cmd_with_auth(
             'nova', action, flags, params, admin, fail_ok)
 
@@ -58,43 +59,48 @@
 
     def glance(self, action, flags='', params='', admin=True, fail_ok=False):
         """Executes glance command for the given action."""
+        flags += ' --os-endpoint-type %s' % CONF.image.endpoint_type
         return self.cmd_with_auth(
             'glance', action, flags, params, admin, fail_ok)
 
     def ceilometer(self, action, flags='', params='', admin=True,
                    fail_ok=False):
         """Executes ceilometer command for the given action."""
+        flags += ' --os-endpoint-type %s' % CONF.telemetry.endpoint_type
         return self.cmd_with_auth(
             'ceilometer', action, flags, params, admin, fail_ok)
 
     def heat(self, action, flags='', params='', admin=True,
              fail_ok=False):
         """Executes heat command for the given action."""
+        flags += ' --os-endpoint-type %s' % CONF.orchestration.endpoint_type
         return self.cmd_with_auth(
             'heat', action, flags, params, admin, fail_ok)
 
     def cinder(self, action, flags='', params='', admin=True, fail_ok=False):
         """Executes cinder command for the given action."""
+        flags += ' --endpoint-type %s' % CONF.volume.endpoint_type
         return self.cmd_with_auth(
             'cinder', action, flags, params, admin, fail_ok)
 
     def neutron(self, action, flags='', params='', admin=True, fail_ok=False):
         """Executes neutron command for the given action."""
+        flags += ' --endpoint-type %s' % CONF.network.endpoint_type
         return self.cmd_with_auth(
             'neutron', action, flags, params, admin, fail_ok)
 
     def sahara(self, action, flags='', params='', admin=True, fail_ok=False):
         """Executes sahara command for the given action."""
+        flags += ' --endpoint-type %s' % CONF.data_processing.endpoint_type
         return self.cmd_with_auth(
-            # TODO (slukjanov): replace with sahara when new client released
-            'savanna', action, flags, params, admin, fail_ok)
+            'sahara', action, flags, params, admin, fail_ok)
 
     def cmd_with_auth(self, cmd, action, flags='', params='',
                       admin=True, fail_ok=False):
         """Executes given command with auth attributes appended."""
         # TODO(jogo) make admin=False work
         creds = ('--os-username %s --os-tenant-name %s --os-password %s '
-                 '--os-auth-url %s ' %
+                 '--os-auth-url %s' %
                  (CONF.identity.admin_username,
                   CONF.identity.admin_tenant_name,
                   CONF.identity.admin_password,
@@ -108,25 +114,19 @@
         cmd = ' '.join([os.path.join(CONF.cli.cli_dir, cmd),
                         flags, action, params])
         LOG.info("running: '%s'" % cmd)
-        cmd_str = cmd
         cmd = shlex.split(cmd)
         result = ''
         result_err = ''
-        try:
-            stdout = subprocess.PIPE
-            stderr = subprocess.STDOUT if merge_stderr else subprocess.PIPE
-            proc = subprocess.Popen(
-                cmd, stdout=stdout, stderr=stderr)
-            result, result_err = proc.communicate()
-            if not fail_ok and proc.returncode != 0:
-                raise CommandFailed(proc.returncode,
-                                    cmd,
-                                    result,
-                                    stderr=result_err)
-        finally:
-            LOG.debug('output of %s:\n%s' % (cmd_str, result))
-            if not merge_stderr and result_err:
-                LOG.debug('error output of %s:\n%s' % (cmd_str, result_err))
+        stdout = subprocess.PIPE
+        stderr = subprocess.STDOUT if merge_stderr else subprocess.PIPE
+        proc = subprocess.Popen(
+            cmd, stdout=stdout, stderr=stderr)
+        result, result_err = proc.communicate()
+        if not fail_ok and proc.returncode != 0:
+            raise CommandFailed(proc.returncode,
+                                cmd,
+                                result,
+                                stderr=result_err)
         return result
 
     def assertTableStruct(self, items, field_names):
diff --git a/tempest/cli/output_parser.py b/tempest/cli/output_parser.py
index 4edcd47..80234a3 100644
--- a/tempest/cli/output_parser.py
+++ b/tempest/cli/output_parser.py
@@ -17,6 +17,7 @@
 
 import re
 
+from tempest import exceptions
 from tempest.openstack.common import log as logging
 
 
@@ -37,7 +38,7 @@
     for table_ in tables_:
         if 'Property' not in table_['headers'] \
            or 'Value' not in table_['headers']:
-            raise Exception('Invalid structure of table with details')
+            raise exceptions.InvalidStructure()
         item = {}
         for value in table_['values']:
             item[value[0]] = value[1]
diff --git a/tempest/cli/simple_read_only/test_ceilometer.py b/tempest/cli/simple_read_only/test_ceilometer.py
index 0b6ae22..1d2822d 100644
--- a/tempest/cli/simple_read_only/test_ceilometer.py
+++ b/tempest/cli/simple_read_only/test_ceilometer.py
@@ -16,6 +16,7 @@
 from tempest import cli
 from tempest import config
 from tempest.openstack.common import log as logging
+from tempest import test
 
 CONF = config.CONF
 
@@ -41,6 +42,7 @@
     def test_ceilometer_meter_list(self):
         self.ceilometer('meter-list')
 
+    @test.attr(type='slow')
     def test_ceilometer_resource_list(self):
         self.ceilometer('resource-list')
 
diff --git a/tempest/cli/simple_read_only/test_nova.py b/tempest/cli/simple_read_only/test_nova.py
index d0b6028..a3787ab 100644
--- a/tempest/cli/simple_read_only/test_nova.py
+++ b/tempest/cli/simple_read_only/test_nova.py
@@ -182,6 +182,10 @@
         self.nova('agent-list')
         self.nova('agent-list', flags='--debug')
 
+    def test_migration_list(self):
+        self.nova('migration-list')
+        self.nova('migration-list', flags='--debug')
+
     # Optional arguments:
 
     def test_admin_version(self):
diff --git a/tempest/common/generator/base_generator.py b/tempest/common/generator/base_generator.py
index 7e7a2d6..95d50e2 100644
--- a/tempest/common/generator/base_generator.py
+++ b/tempest/common/generator/base_generator.py
@@ -62,7 +62,7 @@
             "admin_client": {"type": "boolean"},
             "url": {"type": "string"},
             "default_result_code": {"type": "integer"},
-            "json-schema": jsonschema._utils.load_schema("draft4"),
+            "json-schema": {},
             "resources": {
                 "type": "array",
                 "items": {
@@ -105,6 +105,8 @@
                         self.types_dict[type].append(method)
 
     def validate_schema(self, schema):
+        if "json-schema" in schema:
+            jsonschema.Draft4Validator.check_schema(schema['json-schema'])
         jsonschema.validate(schema, self.schema)
 
     def generate(self, schema):
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index 88dbe58..5d7779e 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -15,7 +15,7 @@
 #    under the License.
 
 import collections
-import hashlib
+import inspect
 import json
 from lxml import etree
 import re
@@ -24,10 +24,10 @@
 import jsonschema
 
 from tempest.common import http
+from tempest.common import xml_utils as common
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common import log as logging
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -224,44 +224,80 @@
         versions = map(lambda x: x['id'], body)
         return resp, versions
 
-    def _log_request(self, method, req_url, headers, body):
-        self.LOG.info('Request: ' + method + ' ' + req_url)
-        if headers:
-            print_headers = headers
-            if 'X-Auth-Token' in headers and headers['X-Auth-Token']:
-                token = headers['X-Auth-Token']
-                if len(token) > 64 and TOKEN_CHARS_RE.match(token):
-                    print_headers = headers.copy()
-                    print_headers['X-Auth-Token'] = "<Token omitted>"
-            self.LOG.debug('Request Headers: ' + str(print_headers))
-        if body:
-            str_body = str(body)
-            length = len(str_body)
-            self.LOG.debug('Request Body: ' + str_body[:2048])
-            if length >= 2048:
-                self.LOG.debug("Large body (%d) md5 summary: %s", length,
-                               hashlib.md5(str_body).hexdigest())
+    def _find_caller(self):
+        """Find the caller class and test name.
 
-    def _log_response(self, resp, resp_body):
-        status = resp['status']
-        self.LOG.info("Response Status: " + status)
-        headers = resp.copy()
-        del headers['status']
-        if headers.get('x-compute-request-id'):
-            self.LOG.info("Nova/Cinder request id: %s" %
-                          headers.pop('x-compute-request-id'))
-        elif headers.get('x-openstack-request-id'):
-            self.LOG.info("OpenStack request id %s" %
-                          headers.pop('x-openstack-request-id'))
-        if len(headers):
-            self.LOG.debug('Response Headers: ' + str(headers))
-        if resp_body:
-            str_body = str(resp_body)
-            length = len(str_body)
-            self.LOG.debug('Response Body: ' + str_body[:2048])
-            if length >= 2048:
-                self.LOG.debug("Large body (%d) md5 summary: %s", length,
-                               hashlib.md5(str_body).hexdigest())
+        Because we know that the interesting things that call us are
+        test_* methods, and various kinds of setUp / tearDown, we
+        can look through the call stack to find appropriate methods,
+        and the class we were in when those were called.
+        """
+        caller_name = None
+        names = []
+        frame = inspect.currentframe()
+        is_cleanup = False
+        # Start climbing the ladder until we hit a good method
+        while True:
+            try:
+                frame = frame.f_back
+                name = frame.f_code.co_name
+                names.append(name)
+                if re.search("^(test_|setUp|tearDown)", name):
+                    cname = ""
+                    if 'self' in frame.f_locals:
+                        cname = frame.f_locals['self'].__class__.__name__
+                    if 'cls' in frame.f_locals:
+                        cname = frame.f_locals['cls'].__name__
+                    caller_name = cname + ":" + name
+                    break
+                elif re.search("^_run_cleanup", name):
+                    is_cleanup = True
+                else:
+                    cname = ""
+                    if 'self' in frame.f_locals:
+                        cname = frame.f_locals['self'].__class__.__name__
+                    if 'cls' in frame.f_locals:
+                        cname = frame.f_locals['cls'].__name__
+
+                    # the fact that we are running cleanups is indicated pretty
+                    # deep in the stack, so if we see that we want to just
+                    # start looking for a real class name, and declare victory
+                    # once we do.
+                    if is_cleanup and cname:
+                        if not re.search("^RunTest", cname):
+                            caller_name = cname + ":_run_cleanups"
+                            break
+            except Exception:
+                break
+        # prevents frame leaks
+        del frame
+        if caller_name is None:
+            self.LOG.debug("Sane call name not found in %s" % names)
+        return caller_name
+
+    def _get_request_id(self, resp):
+        for i in ('x-openstack-request-id', 'x-compute-request-id'):
+            if i in resp:
+                return resp[i]
+        return ""
+
+    def _log_request(self, method, req_url, resp, secs=""):
+        # if we have the request id, put it in the right part of the log
+        extra = dict(request_id=self._get_request_id(resp))
+        # NOTE(sdague): while we still have 6 callers to this function
+        # we're going to just provide work around on who is actually
+        # providing timings by gracefully adding no content if they don't.
+        # Once we're down to 1 caller, clean this up.
+        if secs:
+            secs = " %.3fs" % secs
+        self.LOG.info(
+            'Request (%s): %s %s %s%s' % (
+                self._find_caller(),
+                resp['status'],
+                method,
+                req_url,
+                secs),
+            extra=extra)
 
     def _parse_resp(self, body):
         if self._get_type() is "json":
@@ -340,11 +376,13 @@
         # Authenticate the request with the auth provider
         req_url, req_headers, req_body = self.auth_provider.auth_request(
             method, url, headers, body, self.filters)
-        self._log_request(method, req_url, req_headers, req_body)
-        # Do the actual request
+
+        # Do the actual request, and time it
+        start = time.time()
         resp, resp_body = self.http_obj.request(
             req_url, method, headers=req_headers, body=req_body)
-        self._log_response(resp, resp_body)
+        end = time.time()
+        self._log_request(method, req_url, resp, secs=(end - start))
         # Verify HTTP response codes
         self.response_checker(method, url, req_headers, req_body, resp,
                               resp_body)
diff --git a/tempest/services/compute/xml/common.py b/tempest/common/xml_utils.py
similarity index 100%
rename from tempest/services/compute/xml/common.py
rename to tempest/common/xml_utils.py
diff --git a/tempest/config.py b/tempest/config.py
index 471a0de..b0945bb 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -249,6 +249,12 @@
     cfg.BoolOpt('resize',
                 default=False,
                 help="Does the test environment support resizing?"),
+    cfg.BoolOpt('pause',
+                default=True,
+                help="Does the test environment support pausing?"),
+    cfg.BoolOpt('suspend',
+                default=True,
+                help="Does the test environment support suspend/resume?"),
     cfg.BoolOpt('live_migration',
                 default=False,
                 help="Does the test environment support live migration "
diff --git a/tempest/exceptions/__init__.py b/tempest/exceptions/__init__.py
index 06dee71..d313def 100644
--- a/tempest/exceptions/__init__.py
+++ b/tempest/exceptions/__init__.py
@@ -20,6 +20,10 @@
     message = "Invalid Configuration"
 
 
+class InvalidCredentials(base.TempestException):
+    message = "Invalid Credentials"
+
+
 class InvalidHttpSuccessCode(base.RestClientException):
     message = "The success code is different than the expected one"
 
@@ -154,3 +158,7 @@
 
 class UnexpectedResponseCode(base.RestClientException):
     message = "Unexpected response code received"
+
+
+class InvalidStructure(base.TempestException):
+    message = "Invalid structure of table with details"
diff --git a/tempest/hacking/checks.py b/tempest/hacking/checks.py
index 55be60a..7f39905 100644
--- a/tempest/hacking/checks.py
+++ b/tempest/hacking/checks.py
@@ -15,7 +15,9 @@
 import re
 
 
-PYTHON_CLIENTS = ['cinder', 'glance', 'keystone', 'nova', 'swift', 'neutron']
+PYTHON_CLIENTS = ['cinder', 'glance', 'keystone', 'nova', 'swift', 'neutron',
+                  'trove', 'ironic', 'savanna', 'heat', 'ceilometer',
+                  'marconi']
 
 PYTHON_CLIENT_RE = re.compile('import (%s)client' % '|'.join(PYTHON_CLIENTS))
 TEST_DEFINITION = re.compile(r'^\s*def test.*')
diff --git a/tempest/manager.py b/tempest/manager.py
index 708447e..63235db 100644
--- a/tempest/manager.py
+++ b/tempest/manager.py
@@ -75,13 +75,12 @@
             tenant_name=CONF.identity.tenant_name
         )
 
-    def get_auth_provider(self, credentials=None):
-        auth_params = dict(client_type=getattr(self, 'client_type', None),
-                           interface=getattr(self, 'interface', None))
+    def get_auth_provider(self, credentials):
+        if credentials is None:
+            raise exceptions.InvalidCredentials(
+                'Credentials must be specified')
         auth_provider_class = self.get_auth_provider_class(self.auth_version)
-        # If invalid / incomplete credentials are provided, use default ones
-        if credentials is None or \
-                not auth_provider_class.check_credentials(credentials):
-            credentials = self.credentials
-        auth_params['credentials'] = credentials
-        return auth_provider_class(**auth_params)
+        return auth_provider_class(
+            client_type=getattr(self, 'client_type', None),
+            interface=getattr(self, 'interface', None),
+            credentials=credentials)
diff --git a/tempest/openstack/common/__init__.py b/tempest/openstack/common/__init__.py
index e69de29..d1223ea 100644
--- a/tempest/openstack/common/__init__.py
+++ b/tempest/openstack/common/__init__.py
@@ -0,0 +1,17 @@
+#
+#    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 six
+
+
+six.add_move(six.MovedModule('mox', 'mox', 'mox3.mox'))
diff --git a/tempest/openstack/common/config/generator.py b/tempest/openstack/common/config/generator.py
index eeb5a32..8156cc5 100644
--- a/tempest/openstack/common/config/generator.py
+++ b/tempest/openstack/common/config/generator.py
@@ -1,4 +1,5 @@
 # Copyright 2012 SINA Corporation
+# Copyright 2014 Cisco Systems, Inc.
 # All Rights Reserved.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
@@ -18,6 +19,7 @@
 
 from __future__ import print_function
 
+import argparse
 import imp
 import os
 import re
@@ -27,6 +29,7 @@
 
 from oslo.config import cfg
 import six
+import stevedore.named
 
 from tempest.openstack.common import gettextutils
 from tempest.openstack.common import importutils
@@ -38,6 +41,7 @@
 INTOPT = "IntOpt"
 FLOATOPT = "FloatOpt"
 LISTOPT = "ListOpt"
+DICTOPT = "DictOpt"
 MULTISTROPT = "MultiStrOpt"
 
 OPT_TYPES = {
@@ -46,11 +50,12 @@
     INTOPT: 'integer value',
     FLOATOPT: 'floating point value',
     LISTOPT: 'list value',
+    DICTOPT: 'dict value',
     MULTISTROPT: 'multi valued',
 }
 
 OPTION_REGEX = re.compile(r"(%s)" % "|".join([STROPT, BOOLOPT, INTOPT,
-                                              FLOATOPT, LISTOPT,
+                                              FLOATOPT, LISTOPT, DICTOPT,
                                               MULTISTROPT]))
 
 PY_EXT = ".py"
@@ -59,34 +64,60 @@
 WORDWRAP_WIDTH = 60
 
 
-def generate(srcfiles):
+def raise_extension_exception(extmanager, ep, err):
+    raise
+
+
+def generate(argv):
+    parser = argparse.ArgumentParser(
+        description='generate sample configuration file',
+    )
+    parser.add_argument('-m', dest='modules', action='append')
+    parser.add_argument('-l', dest='libraries', action='append')
+    parser.add_argument('srcfiles', nargs='*')
+    parsed_args = parser.parse_args(argv)
+
     mods_by_pkg = dict()
-    for filepath in srcfiles:
+    for filepath in parsed_args.srcfiles:
         pkg_name = filepath.split(os.sep)[1]
         mod_str = '.'.join(['.'.join(filepath.split(os.sep)[:-1]),
                             os.path.basename(filepath).split('.')[0]])
         mods_by_pkg.setdefault(pkg_name, list()).append(mod_str)
     # NOTE(lzyeval): place top level modules before packages
-    pkg_names = filter(lambda x: x.endswith(PY_EXT), mods_by_pkg.keys())
-    pkg_names.sort()
-    ext_names = filter(lambda x: x not in pkg_names, mods_by_pkg.keys())
-    ext_names.sort()
+    pkg_names = sorted(pkg for pkg in mods_by_pkg if pkg.endswith(PY_EXT))
+    ext_names = sorted(pkg for pkg in mods_by_pkg if pkg not in pkg_names)
     pkg_names.extend(ext_names)
 
     # opts_by_group is a mapping of group name to an options list
     # The options list is a list of (module, options) tuples
     opts_by_group = {'DEFAULT': []}
 
-    extra_modules = os.getenv("TEMPEST_CONFIG_GENERATOR_EXTRA_MODULES", "")
-    if extra_modules:
-        for module_name in extra_modules.split(','):
-            module_name = module_name.strip()
+    if parsed_args.modules:
+        for module_name in parsed_args.modules:
             module = _import_module(module_name)
             if module:
                 for group, opts in _list_opts(module):
                     opts_by_group.setdefault(group, []).append((module_name,
                                                                 opts))
 
+    # Look for entry points defined in libraries (or applications) for
+    # option discovery, and include their return values in the output.
+    #
+    # Each entry point should be a function returning an iterable
+    # of pairs with the group name (or None for the default group)
+    # and the list of Opt instances for that group.
+    if parsed_args.libraries:
+        loader = stevedore.named.NamedExtensionManager(
+            'oslo.config.opts',
+            names=list(set(parsed_args.libraries)),
+            invoke_on_load=False,
+            on_load_failure_callback=raise_extension_exception
+        )
+        for ext in loader:
+            for group, opts in ext.plugin():
+                opt_list = opts_by_group.setdefault(group or 'DEFAULT', [])
+                opt_list.append((ext.name, opts))
+
     for pkg_name in pkg_names:
         mods = mods_by_pkg.get(pkg_name)
         mods.sort()
@@ -120,7 +151,7 @@
 
 def _is_in_group(opt, group):
     "Check if opt is in group."
-    for key, value in group._opts.items():
+    for value in group._opts.values():
         # NOTE(llu): Temporary workaround for bug #1262148, wait until
         # newly released oslo.config support '==' operator.
         if not(value['opt'] != opt):
@@ -134,7 +165,7 @@
         return 'DEFAULT'
 
     # what other groups is it in?
-    for key, value in cfg.CONF.items():
+    for value in cfg.CONF.values():
         if isinstance(value, cfg.CONF.GroupAttr):
             if _is_in_group(opt, value._group):
                 return value._group.name
@@ -203,7 +234,7 @@
         return value.replace(BASEDIR, '')
     elif value == _get_my_ip():
         return '10.0.0.1'
-    elif value == socket.gethostname() and 'host' in name:
+    elif value in (socket.gethostname(), socket.getfqdn()) and 'host' in name:
         return 'tempest'
     elif value.strip() != value:
         return '"%s"' % value
@@ -221,7 +252,8 @@
     except (ValueError, AttributeError) as err:
         sys.stderr.write("%s\n" % str(err))
         sys.exit(1)
-    opt_help += ' (' + OPT_TYPES[opt_type] + ')'
+    opt_help = u'%s (%s)' % (opt_help,
+                             OPT_TYPES[opt_type])
     print('#', "\n# ".join(textwrap.wrap(opt_help, WORDWRAP_WIDTH)))
     if opt.deprecated_opts:
         for deprecated_opt in opt.deprecated_opts:
@@ -251,6 +283,11 @@
         elif opt_type == LISTOPT:
             assert(isinstance(opt_default, list))
             print('#%s=%s' % (opt_name, ','.join(opt_default)))
+        elif opt_type == DICTOPT:
+            assert(isinstance(opt_default, dict))
+            opt_default_strlist = [str(key) + ':' + str(value)
+                                   for (key, value) in opt_default.items()]
+            print('#%s=%s' % (opt_name, ','.join(opt_default_strlist)))
         elif opt_type == MULTISTROPT:
             assert(isinstance(opt_default, list))
             if not opt_default:
diff --git a/tempest/openstack/common/gettextutils.py b/tempest/openstack/common/gettextutils.py
index 825c2e0..17f66f7 100644
--- a/tempest/openstack/common/gettextutils.py
+++ b/tempest/openstack/common/gettextutils.py
@@ -23,14 +23,11 @@
 """
 
 import copy
+import functools
 import gettext
-import logging
+import locale
+from logging import handlers
 import os
-import re
-try:
-    import UserString as _userString
-except ImportError:
-    import collections as _userString
 
 from babel import localedata
 import six
@@ -38,6 +35,17 @@
 _localedir = os.environ.get('tempest'.upper() + '_LOCALEDIR')
 _t = gettext.translation('tempest', localedir=_localedir, fallback=True)
 
+# We use separate translation catalogs for each log level, so set up a
+# mapping between the log level name and the translator. The domain
+# for the log level is project_name + "-log-" + log_level so messages
+# for each level end up in their own catalog.
+_t_log_levels = dict(
+    (level, gettext.translation('tempest' + '-log-' + level,
+                                localedir=_localedir,
+                                fallback=True))
+    for level in ['info', 'warning', 'error', 'critical']
+)
+
 _AVAILABLE_LANGUAGES = {}
 USE_LAZY = False
 
@@ -56,13 +64,35 @@
 
 def _(msg):
     if USE_LAZY:
-        return Message(msg, 'tempest')
+        return Message(msg, domain='tempest')
     else:
         if six.PY3:
             return _t.gettext(msg)
         return _t.ugettext(msg)
 
 
+def _log_translation(msg, level):
+    """Build a single translation of a log message
+    """
+    if USE_LAZY:
+        return Message(msg, domain='tempest' + '-log-' + level)
+    else:
+        translator = _t_log_levels[level]
+        if six.PY3:
+            return translator.gettext(msg)
+        return translator.ugettext(msg)
+
+# Translators for log levels.
+#
+# The abbreviated names are meant to reflect the usual use of a short
+# name like '_'. The "L" is for "log" and the other letter comes from
+# the level.
+_LI = functools.partial(_log_translation, level='info')
+_LW = functools.partial(_log_translation, level='warning')
+_LE = functools.partial(_log_translation, level='error')
+_LC = functools.partial(_log_translation, level='critical')
+
+
 def install(domain, lazy=False):
     """Install a _() function using the given translation domain.
 
@@ -88,11 +118,6 @@
         # messages in OpenStack. We override the standard _() function
         # and % (format string) operation to build Message objects that can
         # later be translated when we have more information.
-        #
-        # Also included below is an example LocaleHandler that translates
-        # Messages to an associated locale, effectively allowing many logs,
-        # each with their own locale.
-
         def _lazy_gettext(msg):
             """Create and return a Message object.
 
@@ -103,7 +128,7 @@
             Message encapsulates a string so that we can translate
             it later when needed.
             """
-            return Message(msg, domain)
+            return Message(msg, domain=domain)
 
         from six import moves
         moves.builtins.__dict__['_'] = _lazy_gettext
@@ -118,182 +143,144 @@
                             unicode=True)
 
 
-class Message(_userString.UserString, object):
-    """Class used to encapsulate translatable messages."""
-    def __init__(self, msg, domain):
-        # _msg is the gettext msgid and should never change
-        self._msg = msg
-        self._left_extra_msg = ''
-        self._right_extra_msg = ''
-        self._locale = None
-        self.params = None
-        self.domain = domain
+class Message(six.text_type):
+    """A Message object is a unicode object that can be translated.
 
-    @property
-    def data(self):
-        # NOTE(mrodden): this should always resolve to a unicode string
-        # that best represents the state of the message currently
+    Translation of Message is done explicitly using the translate() method.
+    For all non-translation intents and purposes, a Message is simply unicode,
+    and can be treated as such.
+    """
 
-        localedir = os.environ.get(self.domain.upper() + '_LOCALEDIR')
-        if self.locale:
-            lang = gettext.translation(self.domain,
-                                       localedir=localedir,
-                                       languages=[self.locale],
-                                       fallback=True)
-        else:
-            # use system locale for translations
-            lang = gettext.translation(self.domain,
-                                       localedir=localedir,
-                                       fallback=True)
+    def __new__(cls, msgid, msgtext=None, params=None,
+                domain='tempest', *args):
+        """Create a new Message object.
 
+        In order for translation to work gettext requires a message ID, this
+        msgid will be used as the base unicode text. It is also possible
+        for the msgid and the base unicode text to be different by passing
+        the msgtext parameter.
+        """
+        # If the base msgtext is not given, we use the default translation
+        # of the msgid (which is in English) just in case the system locale is
+        # not English, so that the base text will be in that locale by default.
+        if not msgtext:
+            msgtext = Message._translate_msgid(msgid, domain)
+        # We want to initialize the parent unicode with the actual object that
+        # would have been plain unicode if 'Message' was not enabled.
+        msg = super(Message, cls).__new__(cls, msgtext)
+        msg.msgid = msgid
+        msg.domain = domain
+        msg.params = params
+        return msg
+
+    def translate(self, desired_locale=None):
+        """Translate this message to the desired locale.
+
+        :param desired_locale: The desired locale to translate the message to,
+                               if no locale is provided the message will be
+                               translated to the system's default locale.
+
+        :returns: the translated message in unicode
+        """
+
+        translated_message = Message._translate_msgid(self.msgid,
+                                                      self.domain,
+                                                      desired_locale)
+        if self.params is None:
+            # No need for more translation
+            return translated_message
+
+        # This Message object may have been formatted with one or more
+        # Message objects as substitution arguments, given either as a single
+        # argument, part of a tuple, or as one or more values in a dictionary.
+        # When translating this Message we need to translate those Messages too
+        translated_params = _translate_args(self.params, desired_locale)
+
+        translated_message = translated_message % translated_params
+
+        return translated_message
+
+    @staticmethod
+    def _translate_msgid(msgid, domain, desired_locale=None):
+        if not desired_locale:
+            system_locale = locale.getdefaultlocale()
+            # If the system locale is not available to the runtime use English
+            if not system_locale[0]:
+                desired_locale = 'en_US'
+            else:
+                desired_locale = system_locale[0]
+
+        locale_dir = os.environ.get(domain.upper() + '_LOCALEDIR')
+        lang = gettext.translation(domain,
+                                   localedir=locale_dir,
+                                   languages=[desired_locale],
+                                   fallback=True)
         if six.PY3:
-            ugettext = lang.gettext
+            translator = lang.gettext
         else:
-            ugettext = lang.ugettext
+            translator = lang.ugettext
 
-        full_msg = (self._left_extra_msg +
-                    ugettext(self._msg) +
-                    self._right_extra_msg)
-
-        if self.params is not None:
-            full_msg = full_msg % self.params
-
-        return six.text_type(full_msg)
-
-    @property
-    def locale(self):
-        return self._locale
-
-    @locale.setter
-    def locale(self, value):
-        self._locale = value
-        if not self.params:
-            return
-
-        # This Message object may have been constructed with one or more
-        # Message objects as substitution parameters, given as a single
-        # Message, or a tuple or Map containing some, so when setting the
-        # locale for this Message we need to set it for those Messages too.
-        if isinstance(self.params, Message):
-            self.params.locale = value
-            return
-        if isinstance(self.params, tuple):
-            for param in self.params:
-                if isinstance(param, Message):
-                    param.locale = value
-            return
-        if isinstance(self.params, dict):
-            for param in self.params.values():
-                if isinstance(param, Message):
-                    param.locale = value
-
-    def _save_dictionary_parameter(self, dict_param):
-        full_msg = self.data
-        # look for %(blah) fields in string;
-        # ignore %% and deal with the
-        # case where % is first character on the line
-        keys = re.findall('(?:[^%]|^)?%\((\w*)\)[a-z]', full_msg)
-
-        # if we don't find any %(blah) blocks but have a %s
-        if not keys and re.findall('(?:[^%]|^)%[a-z]', full_msg):
-            # apparently the full dictionary is the parameter
-            params = copy.deepcopy(dict_param)
-        else:
-            params = {}
-            for key in keys:
-                try:
-                    params[key] = copy.deepcopy(dict_param[key])
-                except TypeError:
-                    # cast uncopyable thing to unicode string
-                    params[key] = six.text_type(dict_param[key])
-
-        return params
-
-    def _save_parameters(self, other):
-        # we check for None later to see if
-        # we actually have parameters to inject,
-        # so encapsulate if our parameter is actually None
-        if other is None:
-            self.params = (other, )
-        elif isinstance(other, dict):
-            self.params = self._save_dictionary_parameter(other)
-        else:
-            # fallback to casting to unicode,
-            # this will handle the problematic python code-like
-            # objects that cannot be deep-copied
-            try:
-                self.params = copy.deepcopy(other)
-            except TypeError:
-                self.params = six.text_type(other)
-
-        return self
-
-    # overrides to be more string-like
-    def __unicode__(self):
-        return self.data
-
-    def __str__(self):
-        if six.PY3:
-            return self.__unicode__()
-        return self.data.encode('utf-8')
-
-    def __getstate__(self):
-        to_copy = ['_msg', '_right_extra_msg', '_left_extra_msg',
-                   'domain', 'params', '_locale']
-        new_dict = self.__dict__.fromkeys(to_copy)
-        for attr in to_copy:
-            new_dict[attr] = copy.deepcopy(self.__dict__[attr])
-
-        return new_dict
-
-    def __setstate__(self, state):
-        for (k, v) in state.items():
-            setattr(self, k, v)
-
-    # operator overloads
-    def __add__(self, other):
-        copied = copy.deepcopy(self)
-        copied._right_extra_msg += other.__str__()
-        return copied
-
-    def __radd__(self, other):
-        copied = copy.deepcopy(self)
-        copied._left_extra_msg += other.__str__()
-        return copied
+        translated_message = translator(msgid)
+        return translated_message
 
     def __mod__(self, other):
-        # do a format string to catch and raise
-        # any possible KeyErrors from missing parameters
-        self.data % other
-        copied = copy.deepcopy(self)
-        return copied._save_parameters(other)
+        # When we mod a Message we want the actual operation to be performed
+        # by the parent class (i.e. unicode()), the only thing  we do here is
+        # save the original msgid and the parameters in case of a translation
+        params = self._sanitize_mod_params(other)
+        unicode_mod = super(Message, self).__mod__(params)
+        modded = Message(self.msgid,
+                         msgtext=unicode_mod,
+                         params=params,
+                         domain=self.domain)
+        return modded
 
-    def __mul__(self, other):
-        return self.data * other
+    def _sanitize_mod_params(self, other):
+        """Sanitize the object being modded with this Message.
 
-    def __rmul__(self, other):
-        return other * self.data
-
-    def __getitem__(self, key):
-        return self.data[key]
-
-    def __getslice__(self, start, end):
-        return self.data.__getslice__(start, end)
-
-    def __getattribute__(self, name):
-        # NOTE(mrodden): handle lossy operations that we can't deal with yet
-        # These override the UserString implementation, since UserString
-        # uses our __class__ attribute to try and build a new message
-        # after running the inner data string through the operation.
-        # At that point, we have lost the gettext message id and can just
-        # safely resolve to a string instead.
-        ops = ['capitalize', 'center', 'decode', 'encode',
-               'expandtabs', 'ljust', 'lstrip', 'replace', 'rjust', 'rstrip',
-               'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
-        if name in ops:
-            return getattr(self.data, name)
+        - Add support for modding 'None' so translation supports it
+        - Trim the modded object, which can be a large dictionary, to only
+        those keys that would actually be used in a translation
+        - Snapshot the object being modded, in case the message is
+        translated, it will be used as it was when the Message was created
+        """
+        if other is None:
+            params = (other,)
+        elif isinstance(other, dict):
+            # Merge the dictionaries
+            # Copy each item in case one does not support deep copy.
+            params = {}
+            if isinstance(self.params, dict):
+                for key, val in self.params.items():
+                    params[key] = self._copy_param(val)
+            for key, val in other.items():
+                params[key] = self._copy_param(val)
         else:
-            return _userString.UserString.__getattribute__(self, name)
+            params = self._copy_param(other)
+        return params
+
+    def _copy_param(self, param):
+        try:
+            return copy.deepcopy(param)
+        except Exception:
+            # Fallback to casting to unicode this will handle the
+            # python code-like objects that can't be deep-copied
+            return six.text_type(param)
+
+    def __add__(self, other):
+        msg = _('Message objects do not support addition.')
+        raise TypeError(msg)
+
+    def __radd__(self, other):
+        return self.__add__(other)
+
+    def __str__(self):
+        # NOTE(luisg): Logging in python 2.6 tries to str() log records,
+        # and it expects specifically a UnicodeError in order to proceed.
+        msg = _('Message objects do not support str() because they may '
+                'contain non-ascii characters. '
+                'Please use unicode() or translate() instead.')
+        raise UnicodeError(msg)
 
 
 def get_available_languages(domain):
@@ -319,53 +306,143 @@
     list_identifiers = (getattr(localedata, 'list', None) or
                         getattr(localedata, 'locale_identifiers'))
     locale_identifiers = list_identifiers()
+
     for i in locale_identifiers:
         if find(i) is not None:
             language_list.append(i)
+
+    # NOTE(luisg): Babel>=1.0,<1.3 has a bug where some OpenStack supported
+    # locales (e.g. 'zh_CN', and 'zh_TW') aren't supported even though they
+    # are perfectly legitimate locales:
+    #     https://github.com/mitsuhiko/babel/issues/37
+    # In Babel 1.3 they fixed the bug and they support these locales, but
+    # they are still not explicitly "listed" by locale_identifiers().
+    # That is  why we add the locales here explicitly if necessary so that
+    # they are listed as supported.
+    aliases = {'zh': 'zh_CN',
+               'zh_Hant_HK': 'zh_HK',
+               'zh_Hant': 'zh_TW',
+               'fil': 'tl_PH'}
+    for (locale, alias) in six.iteritems(aliases):
+        if locale in language_list and alias not in language_list:
+            language_list.append(alias)
+
     _AVAILABLE_LANGUAGES[domain] = language_list
     return copy.copy(language_list)
 
 
-def get_localized_message(message, user_locale):
-    """Gets a localized version of the given message in the given locale.
+def translate(obj, desired_locale=None):
+    """Gets the translated unicode representation of the given object.
 
-    If the message is not a Message object the message is returned as-is.
-    If the locale is None the message is translated to the default locale.
+    If the object is not translatable it is returned as-is.
+    If the locale is None the object is translated to the system locale.
 
-    :returns: the translated message in unicode, or the original message if
+    :param obj: the object to translate
+    :param desired_locale: the locale to translate the message to, if None the
+                           default system locale will be used
+    :returns: the translated object in unicode, or the original object if
               it could not be translated
     """
-    translated = message
+    message = obj
+    if not isinstance(message, Message):
+        # If the object to translate is not already translatable,
+        # let's first get its unicode representation
+        message = six.text_type(obj)
     if isinstance(message, Message):
-        original_locale = message.locale
-        message.locale = user_locale
-        translated = six.text_type(message)
-        message.locale = original_locale
-    return translated
+        # Even after unicoding() we still need to check if we are
+        # running with translatable unicode before translating
+        return message.translate(desired_locale)
+    return obj
 
 
-class LocaleHandler(logging.Handler):
-    """Handler that can have a locale associated to translate Messages.
+def _translate_args(args, desired_locale=None):
+    """Translates all the translatable elements of the given arguments object.
 
-    A quick example of how to utilize the Message class above.
-    LocaleHandler takes a locale and a target logging.Handler object
-    to forward LogRecord objects to after translating the internal Message.
+    This method is used for translating the translatable values in method
+    arguments which include values of tuples or dictionaries.
+    If the object is not a tuple or a dictionary the object itself is
+    translated if it is translatable.
+
+    If the locale is None the object is translated to the system locale.
+
+    :param args: the args to translate
+    :param desired_locale: the locale to translate the args to, if None the
+                           default system locale will be used
+    :returns: a new args object with the translated contents of the original
+    """
+    if isinstance(args, tuple):
+        return tuple(translate(v, desired_locale) for v in args)
+    if isinstance(args, dict):
+        translated_dict = {}
+        for (k, v) in six.iteritems(args):
+            translated_v = translate(v, desired_locale)
+            translated_dict[k] = translated_v
+        return translated_dict
+    return translate(args, desired_locale)
+
+
+class TranslationHandler(handlers.MemoryHandler):
+    """Handler that translates records before logging them.
+
+    The TranslationHandler takes a locale and a target logging.Handler object
+    to forward LogRecord objects to after translating them. This handler
+    depends on Message objects being logged, instead of regular strings.
+
+    The handler can be configured declaratively in the logging.conf as follows:
+
+        [handlers]
+        keys = translatedlog, translator
+
+        [handler_translatedlog]
+        class = handlers.WatchedFileHandler
+        args = ('/var/log/api-localized.log',)
+        formatter = context
+
+        [handler_translator]
+        class = openstack.common.log.TranslationHandler
+        target = translatedlog
+        args = ('zh_CN',)
+
+    If the specified locale is not available in the system, the handler will
+    log in the default locale.
     """
 
-    def __init__(self, locale, target):
-        """Initialize a LocaleHandler
+    def __init__(self, locale=None, target=None):
+        """Initialize a TranslationHandler
 
         :param locale: locale to use for translating messages
         :param target: logging.Handler object to forward
                        LogRecord objects to after translation
         """
-        logging.Handler.__init__(self)
+        # NOTE(luisg): In order to allow this handler to be a wrapper for
+        # other handlers, such as a FileHandler, and still be able to
+        # configure it using logging.conf, this handler has to extend
+        # MemoryHandler because only the MemoryHandlers' logging.conf
+        # parsing is implemented such that it accepts a target handler.
+        handlers.MemoryHandler.__init__(self, capacity=0, target=target)
         self.locale = locale
-        self.target = target
+
+    def setFormatter(self, fmt):
+        self.target.setFormatter(fmt)
 
     def emit(self, record):
-        if isinstance(record.msg, Message):
-            # set the locale and resolve to a string
-            record.msg.locale = self.locale
+        # We save the message from the original record to restore it
+        # after translation, so other handlers are not affected by this
+        original_msg = record.msg
+        original_args = record.args
+
+        try:
+            self._translate_and_log_record(record)
+        finally:
+            record.msg = original_msg
+            record.args = original_args
+
+    def _translate_and_log_record(self, record):
+        record.msg = translate(record.msg, self.locale)
+
+        # In addition to translating the message, we also need to translate
+        # arguments that were passed to the log method that were not part
+        # of the main message e.g., log.info(_('Some message %s'), this_one))
+        record.args = _translate_args(record.args, self.locale)
 
         self.target.emit(record)
diff --git a/tempest/openstack/common/importutils.py b/tempest/openstack/common/importutils.py
index 4fd9ae2..6c0d3b2 100644
--- a/tempest/openstack/common/importutils.py
+++ b/tempest/openstack/common/importutils.py
@@ -58,6 +58,13 @@
     return sys.modules[import_str]
 
 
+def import_versioned_module(version, submodule=None):
+    module = 'tempest.v%s' % version
+    if submodule:
+        module = '.'.join((module, submodule))
+    return import_module(module)
+
+
 def try_import(import_str, default=None):
     """Try to import a module and if it fails return default."""
     try:
diff --git a/tempest/scenario/test_load_balancer_basic.py b/tempest/scenario/test_load_balancer_basic.py
index ce2c66f..f7a3d6f 100644
--- a/tempest/scenario/test_load_balancer_basic.py
+++ b/tempest/scenario/test_load_balancer_basic.py
@@ -215,6 +215,7 @@
         self.assertEqual(5, resp.count("server1\n"))
         self.assertEqual(5, resp.count("server2\n"))
 
+    @test.skip_because(bug='1295165')
     @test.attr(type='smoke')
     @test.services('compute', 'network')
     def test_load_balancer_basic(self):
diff --git a/tempest/scenario/test_network_advanced_server_ops.py b/tempest/scenario/test_network_advanced_server_ops.py
new file mode 100644
index 0000000..e7e97b5
--- /dev/null
+++ b/tempest/scenario/test_network_advanced_server_ops.py
@@ -0,0 +1,193 @@
+# Copyright 2014 IBM Corp.
+# 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 debug
+from tempest.common.utils import data_utils
+from tempest import config
+from tempest.openstack.common import log as logging
+from tempest.scenario import manager
+from tempest.test import services
+
+CONF = config.CONF
+LOG = logging.getLogger(__name__)
+
+
+class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
+
+    """
+    This test case checks VM connectivity after some advanced
+    instance operations executed:
+
+     * Stop/Start an instance
+     * Reboot an instance
+     * Rebuild an instance
+     * Pause/Unpause an instance
+     * Suspend/Resume an instance
+     * Resize an instance
+    """
+
+    @classmethod
+    def setUpClass(cls):
+        super(TestNetworkAdvancedServerOps, cls).setUpClass()
+        cls.check_preconditions()
+        if not (CONF.network.tenant_networks_reachable
+                or CONF.network.public_network_id):
+            msg = ('Either tenant_networks_reachable must be "true", or '
+                   'public_network_id must be defined.')
+            cls.enabled = False
+            raise cls.skipException(msg)
+
+    def cleanup_wrapper(self, resource):
+        self.cleanup_resource(resource, self.__class__.__name__)
+
+    def setUp(self):
+        super(TestNetworkAdvancedServerOps, self).setUp()
+        key_name = data_utils.rand_name('keypair-smoke-')
+        self.keypair = self.create_keypair(name=key_name)
+        self.addCleanup(self.cleanup_wrapper, self.keypair)
+        security_group =\
+            self._create_security_group_neutron(tenant_id=self.tenant_id)
+        self.addCleanup(self.cleanup_wrapper, security_group)
+        network = self._create_network(self.tenant_id)
+        self.addCleanup(self.cleanup_wrapper, network)
+        router = self._get_router(self.tenant_id)
+        self.addCleanup(self.cleanup_wrapper, router)
+        subnet = self._create_subnet(network)
+        self.addCleanup(self.cleanup_wrapper, subnet)
+        subnet.add_to_router(router.id)
+        public_network_id = CONF.network.public_network_id
+        create_kwargs = {
+            'nics': [
+                {'net-id': network.id},
+            ],
+            'key_name': self.keypair.name,
+            'security_groups': [security_group.name],
+        }
+        server_name = data_utils.rand_name('server-smoke-%d-')
+        self.server = self.create_server(name=server_name,
+                                         create_kwargs=create_kwargs)
+        self.addCleanup(self.cleanup_wrapper, self.server)
+        self.floating_ip = self._create_floating_ip(self.server,
+                                                    public_network_id)
+        self.addCleanup(self.cleanup_wrapper, self.floating_ip)
+
+    def _check_tenant_network_connectivity(self, server,
+                                           username,
+                                           private_key,
+                                           should_connect=True):
+        if not CONF.network.tenant_networks_reachable:
+            msg = 'Tenant networks not configured to be reachable.'
+            LOG.info(msg)
+            return
+        # The target login is assumed to have been configured for
+        # key-based authentication by cloud-init.
+        try:
+            for net_name, ip_addresses in server.networks.iteritems():
+                for ip_address in ip_addresses:
+                    self._check_vm_connectivity(ip_address,
+                                                username,
+                                                private_key,
+                                                should_connect=should_connect)
+        except Exception:
+            LOG.exception('Tenant network connectivity check failed')
+            self._log_console_output(servers=[server])
+            debug.log_ip_ns()
+            raise
+
+    def _check_public_network_connectivity(self, floating_ip,
+                                           username,
+                                           private_key,
+                                           should_connect=True):
+        # The target login is assumed to have been configured for
+        # key-based authentication by cloud-init.
+        try:
+            self._check_vm_connectivity(floating_ip, username, private_key,
+                                        should_connect=should_connect)
+        except Exception:
+            LOG.exception("Public network connectivity check failed")
+            debug.log_ip_ns()
+            raise
+
+    def _check_network_connectivity(self, should_connect=True):
+        username = CONF.compute.image_ssh_user
+        private_key = self.keypair.private_key
+        self._check_tenant_network_connectivity(self.server,
+                                                username,
+                                                private_key,
+                                                should_connect=should_connect)
+        floating_ip = self.floating_ip.floating_ip_address
+        self._check_public_network_connectivity(floating_ip,
+                                                username,
+                                                private_key,
+                                                should_connect=should_connect)
+
+    def _wait_server_status_and_check_network_connectivity(self):
+        self.status_timeout(self.compute_client.servers, self.server.id,
+                            'ACTIVE')
+        self._check_network_connectivity()
+
+    @services('compute', 'network')
+    def test_server_connectivity_stop_start(self):
+        self.server.stop()
+        self.status_timeout(self.compute_client.servers, self.server.id,
+                            'SHUTOFF')
+        self._check_network_connectivity(should_connect=False)
+        self.server.start()
+        self._wait_server_status_and_check_network_connectivity()
+
+    @services('compute', 'network')
+    def test_server_connectivity_reboot(self):
+        self.server.reboot()
+        self._wait_server_status_and_check_network_connectivity()
+
+    @services('compute', 'network')
+    def test_server_connectivity_rebuild(self):
+        image_ref_alt = CONF.compute.image_ref_alt
+        self.server.rebuild(image_ref_alt)
+        self._wait_server_status_and_check_network_connectivity()
+
+    @services('compute', 'network')
+    def test_server_connectivity_pause_unpause(self):
+        self.server.pause()
+        self.status_timeout(self.compute_client.servers, self.server.id,
+                            'PAUSED')
+        self._check_network_connectivity(should_connect=False)
+        self.server.unpause()
+        self._wait_server_status_and_check_network_connectivity()
+
+    @services('compute', 'network')
+    def test_server_connectivity_suspend_resume(self):
+        self.server.suspend()
+        self.status_timeout(self.compute_client.servers, self.server.id,
+                            'SUSPENDED')
+        self._check_network_connectivity(should_connect=False)
+        self.server.resume()
+        self._wait_server_status_and_check_network_connectivity()
+
+    @services('compute', 'network')
+    def test_server_connectivity_resize(self):
+        if not CONF.compute_feature_enabled.resize:
+            msg = "Skipping test - resize not available on this host"
+            raise self.skipException(msg)
+        resize_flavor = CONF.compute.flavor_ref_alt
+        if resize_flavor == CONF.compute.flavor_ref:
+            msg = "Skipping test - flavor_ref and flavor_ref_alt are identical"
+            raise self.skipException(msg)
+        resize_flavor = CONF.compute.flavor_ref_alt
+        self.server.resize(resize_flavor)
+        self.status_timeout(self.compute_client.servers, self.server.id,
+                            'VERIFY_RESIZE')
+        self.server.confirm_resize()
+        self._wait_server_status_and_check_network_connectivity()
diff --git a/tempest/scenario/test_volume_boot_pattern.py b/tempest/scenario/test_volume_boot_pattern.py
index 4046cbd..e89ea70 100644
--- a/tempest/scenario/test_volume_boot_pattern.py
+++ b/tempest/scenario/test_volume_boot_pattern.py
@@ -169,3 +169,15 @@
         # deletion operations to succeed
         self._stop_instances([instance_2nd, instance_from_snapshot])
         self._detach_volumes([volume_origin, volume])
+
+
+class TestVolumeBootPatternV2(TestVolumeBootPattern):
+    def _boot_instance_from_volume(self, vol_id, keypair):
+        bdms = [{'uuid': vol_id, 'source_type': 'volume',
+                 'destination_type': 'volume', 'boot_index': 0,
+                 'delete_on_termination': False}]
+        create_kwargs = {
+            'block_device_mapping_v2': bdms,
+            'key_name': keypair.name
+        }
+        return self.create_server(image='', create_kwargs=create_kwargs)
diff --git a/tempest/services/compute/json/aggregates_client.py b/tempest/services/compute/json/aggregates_client.py
index 700a29b..ccb85c4 100644
--- a/tempest/services/compute/json/aggregates_client.py
+++ b/tempest/services/compute/json/aggregates_client.py
@@ -15,6 +15,7 @@
 
 import json
 
+from tempest.api_schema.compute import aggregates as schema
 from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
@@ -32,6 +33,7 @@
         """Get aggregate list."""
         resp, body = self.get("os-aggregates")
         body = json.loads(body)
+        self.validate_response(schema.list_aggregates, resp, body)
         return resp, body['aggregates']
 
     def get_aggregate(self, aggregate_id):
diff --git a/tempest/services/compute/json/fixed_ips_client.py b/tempest/services/compute/json/fixed_ips_client.py
index 8b2c6c9..5fdd564 100644
--- a/tempest/services/compute/json/fixed_ips_client.py
+++ b/tempest/services/compute/json/fixed_ips_client.py
@@ -15,6 +15,7 @@
 
 import json
 
+from tempest.api_schema.compute.v2 import fixed_ips as schema
 from tempest.common import rest_client
 from tempest import config
 
@@ -31,6 +32,7 @@
         url = "os-fixed-ips/%s" % (fixed_ip)
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.fixed_ips, resp, body)
         return resp, body['fixed_ip']
 
     def reserve_fixed_ip(self, ip, body):
diff --git a/tempest/services/compute/json/flavors_client.py b/tempest/services/compute/json/flavors_client.py
index a8111af..bc64117 100644
--- a/tempest/services/compute/json/flavors_client.py
+++ b/tempest/services/compute/json/flavors_client.py
@@ -16,6 +16,7 @@
 import json
 import urllib
 
+from tempest.api_schema.compute import flavors_access as schema_access
 from tempest.common import rest_client
 from tempest import config
 
@@ -125,6 +126,7 @@
         """Gets flavor access information given the flavor id."""
         resp, body = self.get('flavors/%s/os-flavor-access' % flavor_id)
         body = json.loads(body)
+        self.validate_response(schema_access.list_flavor_access, resp, body)
         return resp, body['flavor_access']
 
     def add_flavor_access(self, flavor_id, tenant_id):
diff --git a/tempest/services/compute/json/floating_ips_client.py b/tempest/services/compute/json/floating_ips_client.py
index 42487c3..e2e12d5 100644
--- a/tempest/services/compute/json/floating_ips_client.py
+++ b/tempest/services/compute/json/floating_ips_client.py
@@ -16,6 +16,7 @@
 import json
 import urllib
 
+from tempest.api_schema.compute.v2 import floating_ips as schema
 from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
@@ -36,6 +37,7 @@
 
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.list_floating_ips, resp, body)
         return resp, body['floating_ips']
 
     def get_floating_ip_details(self, floating_ip_id):
@@ -45,6 +47,7 @@
         body = json.loads(body)
         if resp.status == 404:
             raise exceptions.NotFound(body)
+        self.validate_response(schema.floating_ip, resp, body)
         return resp, body['floating_ip']
 
     def create_floating_ip(self, pool_name=None):
@@ -54,12 +57,14 @@
         post_body = json.dumps(post_body)
         resp, body = self.post(url, post_body)
         body = json.loads(body)
+        self.validate_response(schema.floating_ip, resp, body)
         return resp, body['floating_ip']
 
     def delete_floating_ip(self, floating_ip_id):
         """Deletes the provided floating IP from the project."""
         url = "os-floating-ips/%s" % str(floating_ip_id)
         resp, body = self.delete(url)
+        self.validate_response(schema.add_remove_floating_ip, resp, body)
         return resp, body
 
     def associate_floating_ip_to_server(self, floating_ip, server_id):
@@ -73,6 +78,7 @@
 
         post_body = json.dumps(post_body)
         resp, body = self.post(url, post_body)
+        self.validate_response(schema.add_remove_floating_ip, resp, body)
         return resp, body
 
     def disassociate_floating_ip_from_server(self, floating_ip, server_id):
@@ -86,6 +92,7 @@
 
         post_body = json.dumps(post_body)
         resp, body = self.post(url, post_body)
+        self.validate_response(schema.add_remove_floating_ip, resp, body)
         return resp, body
 
     def is_resource_deleted(self, id):
@@ -103,4 +110,5 @@
 
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.floating_ip_pools, resp, body)
         return resp, body['floating_ip_pools']
diff --git a/tempest/services/compute/json/hosts_client.py b/tempest/services/compute/json/hosts_client.py
index fb45997..0130f27 100644
--- a/tempest/services/compute/json/hosts_client.py
+++ b/tempest/services/compute/json/hosts_client.py
@@ -15,6 +15,7 @@
 import json
 import urllib
 
+from tempest.api_schema.compute import hosts as schema
 from tempest.common import rest_client
 from tempest import config
 
@@ -36,6 +37,7 @@
 
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.list_hosts, resp, body)
         return resp, body['hosts']
 
     def show_host_detail(self, hostname):
diff --git a/tempest/services/compute/json/hypervisor_client.py b/tempest/services/compute/json/hypervisor_client.py
index c6b13b0..89a7961 100644
--- a/tempest/services/compute/json/hypervisor_client.py
+++ b/tempest/services/compute/json/hypervisor_client.py
@@ -15,6 +15,7 @@
 
 import json
 
+from tempest.api_schema.compute import hypervisors as common_schema
 from tempest.common import rest_client
 from tempest import config
 
@@ -37,12 +38,16 @@
         """Show detailed hypervisors information."""
         resp, body = self.get('os-hypervisors/detail')
         body = json.loads(body)
+        self.validate_response(common_schema.common_list_hypervisors_detail,
+                               resp, body)
         return resp, body['hypervisors']
 
     def get_hypervisor_show_details(self, hyper_id):
         """Display the details of the specified hypervisor."""
         resp, body = self.get('os-hypervisors/%s' % hyper_id)
         body = json.loads(body)
+        self.validate_response(common_schema.common_show_hypervisor,
+                               resp, body)
         return resp, body['hypervisor']
 
     def get_hypervisor_servers(self, hyper_name):
@@ -55,6 +60,7 @@
         """Get hypervisor statistics over all compute nodes."""
         resp, body = self.get('os-hypervisors/statistics')
         body = json.loads(body)
+        self.validate_response(common_schema.hypervisor_statistics, resp, body)
         return resp, body['hypervisor_statistics']
 
     def get_hypervisor_uptime(self, hyper_id):
diff --git a/tempest/services/compute/json/images_client.py b/tempest/services/compute/json/images_client.py
index 5a79a29..2f128f2 100644
--- a/tempest/services/compute/json/images_client.py
+++ b/tempest/services/compute/json/images_client.py
@@ -16,6 +16,7 @@
 import json
 import urllib
 
+from tempest.api_schema.compute.v2 import images as schema
 from tempest.common import rest_client
 from tempest.common import waiters
 from tempest import config
@@ -57,6 +58,7 @@
 
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.list_images, resp, body)
         return resp, body['images']
 
     def list_images_with_detail(self, params=None):
@@ -74,6 +76,7 @@
         resp, body = self.get("images/%s" % str(image_id))
         self.expected_success(200, resp)
         body = json.loads(body)
+        self.validate_response(schema.get_image, resp, body)
         return resp, body['image']
 
     def delete_image(self, image_id):
diff --git a/tempest/services/compute/json/keypairs_client.py b/tempest/services/compute/json/keypairs_client.py
index 28f3c31..71f235d 100644
--- a/tempest/services/compute/json/keypairs_client.py
+++ b/tempest/services/compute/json/keypairs_client.py
@@ -15,6 +15,8 @@
 
 import json
 
+from tempest.api_schema.compute import keypairs as common_schema
+from tempest.api_schema.compute.v2 import keypairs as schema
 from tempest.common import rest_client
 from tempest import config
 
@@ -35,11 +37,13 @@
         # servers, etc. A bug?
         # For now we shall adhere to the spec, but the spec for keypairs
         # is yet to be found
+        self.validate_response(common_schema.list_keypairs, resp, body)
         return resp, body['keypairs']
 
     def get_keypair(self, key_name):
         resp, body = self.get("os-keypairs/%s" % str(key_name))
         body = json.loads(body)
+        self.validate_response(schema.get_keypair, resp, body)
         return resp, body['keypair']
 
     def create_keypair(self, name, pub_key=None):
diff --git a/tempest/services/compute/json/limits_client.py b/tempest/services/compute/json/limits_client.py
index 1493718..e503bef 100644
--- a/tempest/services/compute/json/limits_client.py
+++ b/tempest/services/compute/json/limits_client.py
@@ -15,6 +15,7 @@
 
 import json
 
+from tempest.api_schema.compute.v2 import limits as schema
 from tempest.common import rest_client
 from tempest import config
 
@@ -30,11 +31,13 @@
     def get_absolute_limits(self):
         resp, body = self.get("limits")
         body = json.loads(body)
+        self.validate_response(schema.get_limit, resp, body)
         return resp, body['limits']['absolute']
 
     def get_specific_absolute_limit(self, absolute_limit):
         resp, body = self.get("limits")
         body = json.loads(body)
+        self.validate_response(schema.get_limit, resp, body)
         if absolute_limit not in body['limits']['absolute']:
             return None
         else:
diff --git a/tempest/services/compute/json/quotas_client.py b/tempest/services/compute/json/quotas_client.py
index c1ac3db..9346183 100644
--- a/tempest/services/compute/json/quotas_client.py
+++ b/tempest/services/compute/json/quotas_client.py
@@ -15,6 +15,7 @@
 
 import json
 
+from tempest.api_schema.compute.v2 import quotas as schema
 from tempest.common import rest_client
 from tempest import config
 
@@ -27,12 +28,15 @@
         super(QuotasClientJSON, self).__init__(auth_provider)
         self.service = CONF.compute.catalog_type
 
-    def get_quota_set(self, tenant_id):
+    def get_quota_set(self, tenant_id, user_id=None):
         """List the quota set for a tenant."""
 
         url = 'os-quota-sets/%s' % str(tenant_id)
+        if user_id:
+            url += '?user_id=%s' % str(user_id)
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.quota_set, resp, body)
         return resp, body['quota_set']
 
     def get_default_quota_set(self, tenant_id):
@@ -41,6 +45,7 @@
         url = 'os-quota-sets/%s/defaults' % str(tenant_id)
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.quota_set, resp, body)
         return resp, body['quota_set']
 
     def update_quota_set(self, tenant_id, force=None,
diff --git a/tempest/services/compute/json/security_groups_client.py b/tempest/services/compute/json/security_groups_client.py
index 899d4ef..9267be7 100644
--- a/tempest/services/compute/json/security_groups_client.py
+++ b/tempest/services/compute/json/security_groups_client.py
@@ -16,6 +16,7 @@
 import json
 import urllib
 
+from tempest.api_schema.compute.v2 import security_groups as schema
 from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
@@ -38,6 +39,7 @@
 
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.list_security_groups, resp, body)
         return resp, body['security_groups']
 
     def get_security_group(self, security_group_id):
@@ -119,6 +121,7 @@
         """List all rules for a security group."""
         resp, body = self.get('os-security-groups')
         body = json.loads(body)
+        self.validate_response(schema.list_security_groups, resp, body)
         for sg in body['security_groups']:
             if sg['id'] == security_group_id:
                 return resp, sg['rules']
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
index ca0f114..d6705db 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -18,6 +18,7 @@
 import time
 import urllib
 
+from tempest.api_schema.compute.v2 import servers as schema
 from tempest.common import rest_client
 from tempest.common import waiters
 from tempest import config
@@ -77,7 +78,12 @@
             value = kwargs.get(key)
             if value is not None:
                 post_body[post_param] = value
-        post_body = json.dumps({'server': post_body})
+        post_body = {'server': post_body}
+
+        if 'sched_hints' in kwargs:
+            hints = {'os:scheduler_hints': kwargs.get('sched_hints')}
+            post_body = dict(post_body.items() + hints.items())
+        post_body = json.dumps(post_body)
         resp, body = self.post('servers', post_body)
 
         body = json.loads(body)
@@ -85,6 +91,7 @@
         # with return reservation id set True
         if 'reservation_id' in body:
             return resp, body
+        self.validate_response(schema.create_server, resp, body)
         return resp, body['server']
 
     def update_server(self, server_id, name=None, meta=None, accessIPv4=None,
diff --git a/tempest/services/compute/json/volumes_extensions_client.py b/tempest/services/compute/json/volumes_extensions_client.py
index 451dbac..17468eb 100644
--- a/tempest/services/compute/json/volumes_extensions_client.py
+++ b/tempest/services/compute/json/volumes_extensions_client.py
@@ -42,6 +42,7 @@
 
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.list_volumes, resp, body)
         return resp, body['volumes']
 
     def list_volumes_with_detail(self, params=None):
@@ -52,6 +53,7 @@
 
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.list_volumes, resp, body)
         return resp, body['volumes']
 
     def get_volume(self, volume_id):
diff --git a/tempest/services/compute/v3/json/aggregates_client.py b/tempest/services/compute/v3/json/aggregates_client.py
index fddf5df..7f73622 100644
--- a/tempest/services/compute/v3/json/aggregates_client.py
+++ b/tempest/services/compute/v3/json/aggregates_client.py
@@ -15,6 +15,7 @@
 
 import json
 
+from tempest.api_schema.compute import aggregates as schema
 from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
@@ -32,6 +33,7 @@
         """Get aggregate list."""
         resp, body = self.get("os-aggregates")
         body = json.loads(body)
+        self.validate_response(schema.list_aggregates, resp, body)
         return resp, body['aggregates']
 
     def get_aggregate(self, aggregate_id):
diff --git a/tempest/services/compute/v3/json/flavors_client.py b/tempest/services/compute/v3/json/flavors_client.py
index 656bd84..655e279 100644
--- a/tempest/services/compute/v3/json/flavors_client.py
+++ b/tempest/services/compute/v3/json/flavors_client.py
@@ -16,6 +16,7 @@
 import json
 import urllib
 
+from tempest.api_schema.compute import flavors_access as schema_access
 from tempest.common import rest_client
 from tempest import config
 
@@ -125,6 +126,7 @@
         """Gets flavor access information given the flavor id."""
         resp, body = self.get('flavors/%s/flavor-access' % flavor_id)
         body = json.loads(body)
+        self.validate_response(schema_access.list_flavor_access, resp, body)
         return resp, body['flavor_access']
 
     def add_flavor_access(self, flavor_id, tenant_id):
diff --git a/tempest/services/compute/v3/json/hosts_client.py b/tempest/services/compute/v3/json/hosts_client.py
index e27c7c6..bcb9d36 100644
--- a/tempest/services/compute/v3/json/hosts_client.py
+++ b/tempest/services/compute/v3/json/hosts_client.py
@@ -15,6 +15,7 @@
 import json
 import urllib
 
+from tempest.api_schema.compute import hosts as schema
 from tempest.common import rest_client
 from tempest import config
 
@@ -36,6 +37,7 @@
 
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.list_hosts, resp, body)
         return resp, body['hosts']
 
     def show_host_detail(self, hostname):
diff --git a/tempest/services/compute/v3/json/hypervisor_client.py b/tempest/services/compute/v3/json/hypervisor_client.py
index 30e391f..0ba6ebf 100644
--- a/tempest/services/compute/v3/json/hypervisor_client.py
+++ b/tempest/services/compute/v3/json/hypervisor_client.py
@@ -15,6 +15,8 @@
 
 import json
 
+from tempest.api_schema.compute import hypervisors as common_schema
+from tempest.api_schema.compute.v3 import hypervisors as v3schema
 from tempest.common import rest_client
 from tempest import config
 
@@ -37,12 +39,14 @@
         """Show detailed hypervisors information."""
         resp, body = self.get('os-hypervisors/detail')
         body = json.loads(body)
+        self.validate_response(v3schema.list_hypervisors_detail, resp, body)
         return resp, body['hypervisors']
 
     def get_hypervisor_show_details(self, hyper_id):
         """Display the details of the specified hypervisor."""
         resp, body = self.get('os-hypervisors/%s' % hyper_id)
         body = json.loads(body)
+        self.validate_response(v3schema.show_hypervisor, resp, body)
         return resp, body['hypervisor']
 
     def get_hypervisor_servers(self, hyper_name):
@@ -55,6 +59,7 @@
         """Get hypervisor statistics over all compute nodes."""
         resp, body = self.get('os-hypervisors/statistics')
         body = json.loads(body)
+        self.validate_response(common_schema.hypervisor_statistics, resp, body)
         return resp, body['hypervisor_statistics']
 
     def get_hypervisor_uptime(self, hyper_id):
diff --git a/tempest/services/compute/v3/json/keypairs_client.py b/tempest/services/compute/v3/json/keypairs_client.py
index 9ca4885..d315bc4 100644
--- a/tempest/services/compute/v3/json/keypairs_client.py
+++ b/tempest/services/compute/v3/json/keypairs_client.py
@@ -15,6 +15,8 @@
 
 import json
 
+from tempest.api_schema.compute import keypairs as common_schema
+from tempest.api_schema.compute.v3 import keypairs as schema
 from tempest.common import rest_client
 from tempest import config
 
@@ -35,11 +37,13 @@
         # servers, etc. A bug?
         # For now we shall adhere to the spec, but the spec for keypairs
         # is yet to be found
+        self.validate_response(common_schema.list_keypairs, resp, body)
         return resp, body['keypairs']
 
     def get_keypair(self, key_name):
         resp, body = self.get("keypairs/%s" % str(key_name))
         body = json.loads(body)
+        self.validate_response(schema.get_keypair, resp, body)
         return resp, body['keypair']
 
     def create_keypair(self, name, pub_key=None):
diff --git a/tempest/services/compute/v3/json/quotas_client.py b/tempest/services/compute/v3/json/quotas_client.py
index 5bfe67e..a8507c4 100644
--- a/tempest/services/compute/v3/json/quotas_client.py
+++ b/tempest/services/compute/v3/json/quotas_client.py
@@ -15,6 +15,7 @@
 
 import json
 
+from tempest.api_schema.compute.v3 import quotas as schema
 from tempest.common import rest_client
 from tempest import config
 
@@ -27,12 +28,15 @@
         super(QuotasV3ClientJSON, self).__init__(auth_provider)
         self.service = CONF.compute.catalog_v3_type
 
-    def get_quota_set(self, tenant_id):
+    def get_quota_set(self, tenant_id, user_id=None):
         """List the quota set for a tenant."""
 
         url = 'os-quota-sets/%s' % str(tenant_id)
+        if user_id:
+            url += '?user_id=%s' % str(user_id)
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.quota_set, resp, body)
         return resp, body['quota_set']
 
     def get_quota_set_detail(self, tenant_id):
@@ -49,6 +53,7 @@
         url = 'os-quota-sets/%s/defaults' % str(tenant_id)
         resp, body = self.get(url)
         body = json.loads(body)
+        self.validate_response(schema.quota_set, resp, body)
         return resp, body['quota_set']
 
     def update_quota_set(self, tenant_id, force=None,
@@ -95,6 +100,7 @@
         resp, body = self.put('os-quota-sets/%s' % str(tenant_id), post_body)
 
         body = json.loads(body)
+        self.validate_response(schema.quota_set, resp, body)
         return resp, body['quota_set']
 
     def delete_quota_set(self, tenant_id):
diff --git a/tempest/services/compute/v3/json/servers_client.py b/tempest/services/compute/v3/json/servers_client.py
index 92eb09b..6f492d0 100644
--- a/tempest/services/compute/v3/json/servers_client.py
+++ b/tempest/services/compute/v3/json/servers_client.py
@@ -19,6 +19,7 @@
 import time
 import urllib
 
+from tempest.api_schema.compute.v3 import servers as schema
 from tempest.common import rest_client
 from tempest.common import waiters
 from tempest import config
@@ -91,6 +92,7 @@
         # with return reservation id set True
         if 'servers_reservation' in body:
             return resp, body['servers_reservation']
+        self.validate_response(schema.create_server, resp, body)
         return resp, body['server']
 
     def update_server(self, server_id, name=None, meta=None, access_ip_v4=None,
diff --git a/tempest/services/compute/xml/aggregates_client.py b/tempest/services/compute/xml/aggregates_client.py
index 5b250ee..b5f7678 100644
--- a/tempest/services/compute/xml/aggregates_client.py
+++ b/tempest/services/compute/xml/aggregates_client.py
@@ -16,12 +16,9 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -34,7 +31,7 @@
         self.service = CONF.compute.catalog_type
 
     def _format_aggregate(self, g):
-        agg = xml_to_json(g)
+        agg = xml_utils.xml_to_json(g)
         aggregate = {}
         for key, value in agg.items():
             if key == 'hosts':
@@ -64,21 +61,21 @@
 
     def create_aggregate(self, name, availability_zone=None):
         """Creates a new aggregate."""
-        post_body = Element("aggregate",
-                            name=name,
-                            availability_zone=availability_zone)
+        post_body = xml_utils.Element("aggregate",
+                                      name=name,
+                                      availability_zone=availability_zone)
         resp, body = self.post('os-aggregates',
-                               str(Document(post_body)))
+                               str(xml_utils.Document(post_body)))
         aggregate = self._format_aggregate(etree.fromstring(body))
         return resp, aggregate
 
     def update_aggregate(self, aggregate_id, name, availability_zone=None):
         """Update a aggregate."""
-        put_body = Element("aggregate",
-                           name=name,
-                           availability_zone=availability_zone)
+        put_body = xml_utils.Element("aggregate",
+                                     name=name,
+                                     availability_zone=availability_zone)
         resp, body = self.put('os-aggregates/%s' % str(aggregate_id),
-                              str(Document(put_body)))
+                              str(xml_utils.Document(put_body)))
         aggregate = self._format_aggregate(etree.fromstring(body))
         return resp, aggregate
 
@@ -95,30 +92,30 @@
 
     def add_host(self, aggregate_id, host):
         """Adds a host to the given aggregate."""
-        post_body = Element("add_host", host=host)
+        post_body = xml_utils.Element("add_host", host=host)
         resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
-                               str(Document(post_body)))
+                               str(xml_utils.Document(post_body)))
         aggregate = self._format_aggregate(etree.fromstring(body))
         return resp, aggregate
 
     def remove_host(self, aggregate_id, host):
         """Removes a host from the given aggregate."""
-        post_body = Element("remove_host", host=host)
+        post_body = xml_utils.Element("remove_host", host=host)
         resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
-                               str(Document(post_body)))
+                               str(xml_utils.Document(post_body)))
         aggregate = self._format_aggregate(etree.fromstring(body))
         return resp, aggregate
 
     def set_metadata(self, aggregate_id, meta):
         """Replaces the aggregate's existing metadata with new metadata."""
-        post_body = Element("set_metadata")
-        metadata = Element("metadata")
+        post_body = xml_utils.Element("set_metadata")
+        metadata = xml_utils.Element("metadata")
         post_body.append(metadata)
         for k, v in meta.items():
-            meta = Element(k)
-            meta.append(Text(v))
+            meta = xml_utils.Element(k)
+            meta.append(xml_utils.Text(v))
             metadata.append(meta)
         resp, body = self.post('os-aggregates/%s/action' % aggregate_id,
-                               str(Document(post_body)))
+                               str(xml_utils.Document(post_body)))
         aggregate = self._format_aggregate(etree.fromstring(body))
         return resp, aggregate
diff --git a/tempest/services/compute/xml/availability_zone_client.py b/tempest/services/compute/xml/availability_zone_client.py
index 4d71186..38446b8 100644
--- a/tempest/services/compute/xml/availability_zone_client.py
+++ b/tempest/services/compute/xml/availability_zone_client.py
@@ -16,8 +16,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 from tempest import config
-from tempest.services.compute.xml.common import xml_to_json
 
 CONF = config.CONF
 
@@ -31,7 +31,7 @@
         self.service = CONF.compute.catalog_type
 
     def _parse_array(self, node):
-        return [xml_to_json(x) for x in node]
+        return [xml_utils.xml_to_json(x) for x in node]
 
     def get_availability_zone_list(self):
         resp, body = self.get('os-availability-zone')
diff --git a/tempest/services/compute/xml/extensions_client.py b/tempest/services/compute/xml/extensions_client.py
index 3e8254c..d924dff 100644
--- a/tempest/services/compute/xml/extensions_client.py
+++ b/tempest/services/compute/xml/extensions_client.py
@@ -16,8 +16,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 from tempest import config
-from tempest.services.compute.xml.common import xml_to_json
 
 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(xml_utils.xml_to_json(child))
         return array
 
     def list_extensions(self):
@@ -48,5 +48,5 @@
 
     def get_extension(self, extension_alias):
         resp, body = self.get('extensions/%s' % extension_alias)
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
diff --git a/tempest/services/compute/xml/fixed_ips_client.py b/tempest/services/compute/xml/fixed_ips_client.py
index 0475530..e14ced6 100644
--- a/tempest/services/compute/xml/fixed_ips_client.py
+++ b/tempest/services/compute/xml/fixed_ips_client.py
@@ -15,10 +15,8 @@
 
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -43,7 +41,7 @@
         # accept any action key value here to permit tests to cover cases with
         # invalid actions raising badrequest.
         key, value = body.popitem()
-        xml_body = Element(key)
-        xml_body.append(Text(value))
-        resp, body = self.post(url, str(Document(xml_body)))
+        xml_body = xml_utils.Element(key)
+        xml_body.append(xml_utils.Text(value))
+        resp, body = self.post(url, str(xml_utils.Document(xml_body)))
         return resp, body
diff --git a/tempest/services/compute/xml/flavors_client.py b/tempest/services/compute/xml/flavors_client.py
index 68a27c9..68ef323 100644
--- a/tempest/services/compute/xml/flavors_client.py
+++ b/tempest/services/compute/xml/flavors_client.py
@@ -18,12 +18,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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.common import XMLNS_11
 
 CONF = config.CONF
 
@@ -76,7 +72,7 @@
         return flavor
 
     def _parse_array(self, node):
-        return [self._format_flavor(xml_to_json(x)) for x in node]
+        return [self._format_flavor(xml_utils.xml_to_json(x)) for x in node]
 
     def _list_flavors(self, url, params):
         if params:
@@ -96,19 +92,19 @@
 
     def get_flavor_details(self, flavor_id):
         resp, body = self.get("flavors/%s" % str(flavor_id))
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         flavor = self._format_flavor(body)
         return resp, flavor
 
     def create_flavor(self, name, ram, vcpus, disk, flavor_id, **kwargs):
         """Creates a new flavor or instance type."""
-        flavor = Element("flavor",
-                         xmlns=XMLNS_11,
-                         ram=ram,
-                         vcpus=vcpus,
-                         disk=disk,
-                         id=flavor_id,
-                         name=name)
+        flavor = xml_utils.Element("flavor",
+                                   xmlns=xml_utils.XMLNS_11,
+                                   ram=ram,
+                                   vcpus=vcpus,
+                                   disk=disk,
+                                   id=flavor_id,
+                                   name=name)
         if kwargs.get('rxtx'):
             flavor.add_attr('rxtx_factor', kwargs.get('rxtx'))
         if kwargs.get('swap'):
@@ -121,8 +117,8 @@
                             kwargs.get('is_public'))
         flavor.add_attr('xmlns:OS-FLV-EXT-DATA', XMLNS_OS_FLV_EXT_DATA)
         flavor.add_attr('xmlns:os-flavor-access', XMLNS_OS_FLV_ACCESS)
-        resp, body = self.post('flavors', str(Document(flavor)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.post('flavors', str(xml_utils.Document(flavor)))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         flavor = self._format_flavor(body)
         return resp, flavor
 
@@ -142,18 +138,18 @@
 
     def set_flavor_extra_spec(self, flavor_id, specs):
         """Sets extra Specs to the mentioned flavor."""
-        extra_specs = Element("extra_specs")
+        extra_specs = xml_utils.Element("extra_specs")
         for key in specs.keys():
             extra_specs.add_attr(key, specs[key])
         resp, body = self.post('flavors/%s/os-extra_specs' % flavor_id,
-                               str(Document(extra_specs)))
-        body = xml_to_json(etree.fromstring(body))
+                               str(xml_utils.Document(extra_specs)))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def get_flavor_extra_spec(self, flavor_id):
         """Gets extra Specs of the mentioned flavor."""
         resp, body = self.get('flavors/%s/os-extra_specs' % flavor_id)
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def get_flavor_extra_spec_with_key(self, flavor_id, key):
@@ -163,21 +159,21 @@
         body = {}
         element = etree.fromstring(xml_body)
         key = element.get('key')
-        body[key] = xml_to_json(element)
+        body[key] = xml_utils.xml_to_json(element)
         return resp, body
 
     def update_flavor_extra_spec(self, flavor_id, key, **kwargs):
         """Update extra Specs details of the mentioned flavor and key."""
-        doc = Document()
+        doc = xml_utils.Document()
         for (k, v) in kwargs.items():
-            element = Element(k)
+            element = xml_utils.Element(k)
             doc.append(element)
-            value = Text(v)
+            value = xml_utils.Text(v)
             element.append(value)
 
         resp, body = self.put('flavors/%s/os-extra_specs/%s' %
                               (flavor_id, key), str(doc))
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, {key: body}
 
     def unset_flavor_extra_spec(self, flavor_id, key):
@@ -186,7 +182,7 @@
                            key))
 
     def _parse_array_access(self, node):
-        return [xml_to_json(x) for x in node]
+        return [xml_utils.xml_to_json(x) for x in node]
 
     def list_flavor_access(self, flavor_id):
         """Gets flavor access information given the flavor id."""
@@ -196,8 +192,8 @@
 
     def add_flavor_access(self, flavor_id, tenant_id):
         """Add flavor access for the specified tenant."""
-        doc = Document()
-        server = Element("addTenantAccess")
+        doc = xml_utils.Document()
+        server = xml_utils.Element("addTenantAccess")
         doc.append(server)
         server.add_attr("tenant", tenant_id)
         resp, body = self.post('flavors/%s/action' % str(flavor_id), str(doc))
@@ -206,8 +202,8 @@
 
     def remove_flavor_access(self, flavor_id, tenant_id):
         """Remove flavor access from the specified tenant."""
-        doc = Document()
-        server = Element("removeTenantAccess")
+        doc = xml_utils.Document()
+        server = xml_utils.Element("removeTenantAccess")
         doc.append(server)
         server.add_attr("tenant", tenant_id)
         resp, body = self.post('flavors/%s/action' % str(flavor_id), str(doc))
diff --git a/tempest/services/compute/xml/floating_ips_client.py b/tempest/services/compute/xml/floating_ips_client.py
index be54753..fa4aa07 100644
--- a/tempest/services/compute/xml/floating_ips_client.py
+++ b/tempest/services/compute/xml/floating_ips_client.py
@@ -17,12 +17,9 @@
 import urllib
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -37,11 +34,11 @@
     def _parse_array(self, node):
         array = []
         for child in node.getchildren():
-            array.append(xml_to_json(child))
+            array.append(xml_utils.xml_to_json(child))
         return array
 
     def _parse_floating_ip(self, body):
-        json = xml_to_json(body)
+        json = xml_utils.xml_to_json(body)
         return json
 
     def list_floating_ips(self, params=None):
@@ -67,9 +64,9 @@
         """Allocate a floating IP to the project."""
         url = 'os-floating-ips'
         if pool_name:
-            doc = Document()
-            pool = Element("pool")
-            pool.append(Text(pool_name))
+            doc = xml_utils.Document()
+            pool = xml_utils.Element("pool")
+            pool.append(xml_utils.Text(pool_name))
             doc.append(pool)
             resp, body = self.post(url, str(doc))
         else:
@@ -86,8 +83,8 @@
     def associate_floating_ip_to_server(self, floating_ip, server_id):
         """Associate the provided floating IP to a specific server."""
         url = "servers/%s/action" % str(server_id)
-        doc = Document()
-        server = Element("addFloatingIp")
+        doc = xml_utils.Document()
+        server = xml_utils.Element("addFloatingIp")
         doc.append(server)
         server.add_attr("address", floating_ip)
         resp, body = self.post(url, str(doc))
@@ -96,8 +93,8 @@
     def disassociate_floating_ip_from_server(self, floating_ip, server_id):
         """Disassociate the provided floating IP from a specific server."""
         url = "servers/%s/action" % str(server_id)
-        doc = Document()
-        server = Element("removeFloatingIp")
+        doc = xml_utils.Document()
+        server = xml_utils.Element("removeFloatingIp")
         doc.append(server)
         server.add_attr("address", floating_ip)
         resp, body = self.post(url, str(doc))
diff --git a/tempest/services/compute/xml/hosts_client.py b/tempest/services/compute/xml/hosts_client.py
index b74cd04..23a7dd6 100644
--- a/tempest/services/compute/xml/hosts_client.py
+++ b/tempest/services/compute/xml/hosts_client.py
@@ -16,10 +16,8 @@
 
 from lxml import etree
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -40,7 +38,7 @@
 
         resp, body = self.get(url)
         node = etree.fromstring(body)
-        body = [xml_to_json(x) for x in node.getchildren()]
+        body = [xml_utils.xml_to_json(x) for x in node.getchildren()]
         return resp, body
 
     def show_host_detail(self, hostname):
@@ -48,20 +46,20 @@
 
         resp, body = self.get("os-hosts/%s" % str(hostname))
         node = etree.fromstring(body)
-        body = [xml_to_json(node)]
+        body = [xml_utils.xml_to_json(node)]
         return resp, body
 
     def update_host(self, hostname, **kwargs):
         """Update a host."""
 
-        request_body = Element("updates")
+        request_body = xml_utils.Element("updates")
         if kwargs:
             for k, v in kwargs.iteritems():
-                request_body.append(Element(k, v))
+                request_body.append(xml_utils.Element(k, v))
         resp, body = self.put("os-hosts/%s" % str(hostname),
-                              str(Document(request_body)))
+                              str(xml_utils.Document(request_body)))
         node = etree.fromstring(body)
-        body = [xml_to_json(x) for x in node.getchildren()]
+        body = [xml_utils.xml_to_json(x) for x in node.getchildren()]
         return resp, body
 
     def startup_host(self, hostname):
@@ -69,7 +67,7 @@
 
         resp, body = self.get("os-hosts/%s/startup" % str(hostname))
         node = etree.fromstring(body)
-        body = [xml_to_json(x) for x in node.getchildren()]
+        body = [xml_utils.xml_to_json(x) for x in node.getchildren()]
         return resp, body
 
     def shutdown_host(self, hostname):
@@ -77,7 +75,7 @@
 
         resp, body = self.get("os-hosts/%s/shutdown" % str(hostname))
         node = etree.fromstring(body)
-        body = [xml_to_json(x) for x in node.getchildren()]
+        body = [xml_utils.xml_to_json(x) for x in node.getchildren()]
         return resp, body
 
     def reboot_host(self, hostname):
@@ -85,5 +83,5 @@
 
         resp, body = self.get("os-hosts/%s/reboot" % str(hostname))
         node = etree.fromstring(body)
-        body = [xml_to_json(x) for x in node.getchildren()]
+        body = [xml_utils.xml_to_json(x) for x in node.getchildren()]
         return resp, body
diff --git a/tempest/services/compute/xml/hypervisor_client.py b/tempest/services/compute/xml/hypervisor_client.py
index ecd7541..1452708 100644
--- a/tempest/services/compute/xml/hypervisor_client.py
+++ b/tempest/services/compute/xml/hypervisor_client.py
@@ -16,8 +16,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 from tempest import config
-from tempest.services.compute.xml.common import xml_to_json
 
 CONF = config.CONF
 
@@ -30,7 +30,7 @@
         self.service = CONF.compute.catalog_type
 
     def _parse_array(self, node):
-        return [xml_to_json(x) for x in node]
+        return [xml_utils.xml_to_json(x) for x in node]
 
     def get_hypervisor_list(self):
         """List hypervisors information."""
@@ -47,7 +47,7 @@
     def get_hypervisor_show_details(self, hyper_id):
         """Display the details of the specified hypervisor."""
         resp, body = self.get('os-hypervisors/%s' % hyper_id)
-        hypervisor = xml_to_json(etree.fromstring(body))
+        hypervisor = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, hypervisor
 
     def get_hypervisor_servers(self, hyper_name):
@@ -59,13 +59,13 @@
     def get_hypervisor_stats(self):
         """Get hypervisor statistics over all compute nodes."""
         resp, body = self.get('os-hypervisors/statistics')
-        stats = xml_to_json(etree.fromstring(body))
+        stats = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, stats
 
     def get_hypervisor_uptime(self, hyper_id):
         """Display the uptime of the specified hypervisor."""
         resp, body = self.get('os-hypervisors/%s/uptime' % hyper_id)
-        uptime = xml_to_json(etree.fromstring(body))
+        uptime = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, uptime
 
     def search_hypervisor(self, hyper_name):
diff --git a/tempest/services/compute/xml/images_client.py b/tempest/services/compute/xml/images_client.py
index 9d529be..6b15404 100644
--- a/tempest/services/compute/xml/images_client.py
+++ b/tempest/services/compute/xml/images_client.py
@@ -19,13 +19,9 @@
 
 from tempest.common import rest_client
 from tempest.common import waiters
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -40,24 +36,24 @@
         self.build_timeout = CONF.compute.build_timeout
 
     def _parse_server(self, node):
-        data = xml_to_json(node)
+        data = xml_utils.xml_to_json(node)
         return self._parse_links(node, data)
 
     def _parse_image(self, node):
         """Parses detailed XML image information into dictionary."""
-        data = xml_to_json(node)
+        data = xml_utils.xml_to_json(node)
 
         self._parse_links(node, data)
 
         # parse all metadata
         if 'metadata' in data:
-            tag = node.find('{%s}metadata' % XMLNS_11)
+            tag = node.find('{%s}metadata' % xml_utils.XMLNS_11)
             data['metadata'] = dict((x.get('key'), x.text)
                                     for x in tag.getchildren())
 
         # parse server information
         if 'server' in data:
-            tag = node.find('{%s}server' % XMLNS_11)
+            tag = node.find('{%s}server' % xml_utils.XMLNS_11)
             data['server'] = self._parse_server(tag)
         return data
 
@@ -67,7 +63,7 @@
         if 'link' in data:
             # remove single link element
             del data['link']
-            data['links'] = [xml_to_json(x) for x in
+            data['links'] = [xml_utils.xml_to_json(x) for x in
                              node.findall('{http://www.w3.org/2005/Atom}link')]
         return data
 
@@ -93,17 +89,17 @@
 
     def create_image(self, server_id, name, meta=None):
         """Creates an image of the original server."""
-        post_body = Element('createImage', name=name)
+        post_body = xml_utils.Element('createImage', name=name)
 
         if meta:
-            metadata = Element('metadata')
+            metadata = xml_utils.Element('metadata')
             post_body.append(metadata)
             for k, v in meta.items():
-                data = Element('meta', key=k)
-                data.append(Text(v))
+                data = xml_utils.Element('meta', key=k)
+                data.append(xml_utils.Text(v))
                 metadata.append(data)
         resp, body = self.post('servers/%s/action' % str(server_id),
-                               str(Document(post_body)))
+                               str(xml_utils.Document(post_body)))
         return resp, body
 
     def list_images(self, params=None):
@@ -144,10 +140,10 @@
         waiters.wait_for_image_status(self, image_id, status)
 
     def _metadata_body(self, meta):
-        post_body = Element('metadata')
+        post_body = xml_utils.Element('metadata')
         for k, v in meta.items():
-            data = Element('meta', key=k)
-            data.append(Text(v))
+            data = xml_utils.Element('meta', key=k)
+            data.append(xml_utils.Text(v))
             post_body.append(data)
         return post_body
 
@@ -161,7 +157,7 @@
         """Sets the metadata for an image."""
         post_body = self._metadata_body(meta)
         resp, body = self.put('images/%s/metadata' % image_id,
-                              str(Document(post_body)))
+                              str(xml_utils.Document(post_body)))
         body = self._parse_key_value(etree.fromstring(body))
         return resp, body
 
@@ -169,7 +165,7 @@
         """Updates the metadata for an image."""
         post_body = self._metadata_body(meta)
         resp, body = self.post('images/%s/metadata' % str(image_id),
-                               str(Document(post_body)))
+                               str(xml_utils.Document(post_body)))
         body = self._parse_key_value(etree.fromstring(body))
         return resp, body
 
@@ -183,19 +179,19 @@
     def set_image_metadata_item(self, image_id, key, meta):
         """Sets the value for a specific image metadata key."""
         for k, v in meta.items():
-            post_body = Element('meta', key=key)
-            post_body.append(Text(v))
+            post_body = xml_utils.Element('meta', key=key)
+            post_body.append(xml_utils.Text(v))
         resp, body = self.put('images/%s/metadata/%s' % (str(image_id), key),
-                              str(Document(post_body)))
-        body = xml_to_json(etree.fromstring(body))
+                              str(xml_utils.Document(post_body)))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def update_image_metadata_item(self, image_id, key, meta):
         """Sets the value for a specific image metadata key."""
-        post_body = Document('meta', Text(meta), key=key)
+        post_body = xml_utils.Document('meta', xml_utils.Text(meta), key=key)
         resp, body = self.put('images/%s/metadata/%s' % (str(image_id), key),
                               post_body)
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body['meta']
 
     def delete_image_metadata_item(self, image_id, key):
diff --git a/tempest/services/compute/xml/instance_usage_audit_log_client.py b/tempest/services/compute/xml/instance_usage_audit_log_client.py
index 1cd8c07..b139db1 100644
--- a/tempest/services/compute/xml/instance_usage_audit_log_client.py
+++ b/tempest/services/compute/xml/instance_usage_audit_log_client.py
@@ -16,8 +16,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 from tempest import config
-from tempest.services.compute.xml.common import xml_to_json
 
 CONF = config.CONF
 
@@ -33,11 +33,13 @@
     def list_instance_usage_audit_logs(self):
         url = 'os-instance_usage_audit_log'
         resp, body = self.get(url)
-        instance_usage_audit_logs = xml_to_json(etree.fromstring(body))
+        instance_usage_audit_logs = xml_utils.xml_to_json(
+            etree.fromstring(body))
         return resp, instance_usage_audit_logs
 
     def get_instance_usage_audit_log(self, time_before):
         url = 'os-instance_usage_audit_log/%s' % time_before
         resp, body = self.get(url)
-        instance_usage_audit_log = xml_to_json(etree.fromstring(body))
+        instance_usage_audit_log = xml_utils.xml_to_json(
+            etree.fromstring(body))
         return resp, instance_usage_audit_log
diff --git a/tempest/services/compute/xml/interfaces_client.py b/tempest/services/compute/xml/interfaces_client.py
index 8d4bfcc..e30a97c 100644
--- a/tempest/services/compute/xml/interfaces_client.py
+++ b/tempest/services/compute/xml/interfaces_client.py
@@ -18,13 +18,9 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -37,9 +33,9 @@
         self.service = CONF.compute.catalog_type
 
     def _process_xml_interface(self, node):
-        iface = xml_to_json(node)
+        iface = xml_utils.xml_to_json(node)
         # NOTE(danms): if multiple addresses per interface is ever required,
-        # xml_to_json will need to be fixed or replaced in this case
+        # xml_utils.xml_to_json will need to be fixed or replaced in this case
         iface['fixed_ips'] = [dict(iface['fixed_ips']['fixed_ip'].items())]
         return iface
 
@@ -52,21 +48,21 @@
 
     def create_interface(self, server, port_id=None, network_id=None,
                          fixed_ip=None):
-        doc = Document()
-        iface = Element('interfaceAttachment')
+        doc = xml_utils.Document()
+        iface = xml_utils.Element('interfaceAttachment')
         if port_id:
-            _port_id = Element('port_id')
-            _port_id.append(Text(port_id))
+            _port_id = xml_utils.Element('port_id')
+            _port_id.append(xml_utils.Text(port_id))
             iface.append(_port_id)
         if network_id:
-            _network_id = Element('net_id')
-            _network_id.append(Text(network_id))
+            _network_id = xml_utils.Element('net_id')
+            _network_id.append(xml_utils.Text(network_id))
             iface.append(_network_id)
         if fixed_ip:
-            _fixed_ips = Element('fixed_ips')
-            _fixed_ip = Element('fixed_ip')
-            _ip_address = Element('ip_address')
-            _ip_address.append(Text(fixed_ip))
+            _fixed_ips = xml_utils.Element('fixed_ips')
+            _fixed_ip = xml_utils.Element('fixed_ip')
+            _ip_address = xml_utils.Element('ip_address')
+            _ip_address.append(xml_utils.Text(fixed_ip))
             _fixed_ip.append(_ip_address)
             _fixed_ips.append(_fixed_ip)
             iface.append(_fixed_ips)
@@ -108,18 +104,18 @@
 
     def add_fixed_ip(self, server_id, network_id):
         """Add a fixed IP to input server instance."""
-        post_body = Element("addFixedIp",
-                            xmlns=XMLNS_11,
-                            networkId=network_id)
+        post_body = xml_utils.Element("addFixedIp",
+                                      xmlns=xml_utils.XMLNS_11,
+                                      networkId=network_id)
         resp, body = self.post('servers/%s/action' % str(server_id),
-                               str(Document(post_body)))
+                               str(xml_utils.Document(post_body)))
         return resp, body
 
     def remove_fixed_ip(self, server_id, ip_address):
         """Remove input fixed IP from input server instance."""
-        post_body = Element("removeFixedIp",
-                            xmlns=XMLNS_11,
-                            address=ip_address)
+        post_body = xml_utils.Element("removeFixedIp",
+                                      xmlns=xml_utils.XMLNS_11,
+                                      address=ip_address)
         resp, body = self.post('servers/%s/action' % str(server_id),
-                               str(Document(post_body)))
+                               str(xml_utils.Document(post_body)))
         return resp, body
diff --git a/tempest/services/compute/xml/keypairs_client.py b/tempest/services/compute/xml/keypairs_client.py
index fb498c0..8ff37ac 100644
--- a/tempest/services/compute/xml/keypairs_client.py
+++ b/tempest/services/compute/xml/keypairs_client.py
@@ -17,11 +17,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -36,34 +33,35 @@
     def list_keypairs(self):
         resp, body = self.get("os-keypairs")
         node = etree.fromstring(body)
-        body = [{'keypair': xml_to_json(x)} for x in node.getchildren()]
+        body = [{'keypair': xml_utils.xml_to_json(x)} for x in
+                node.getchildren()]
         return resp, body
 
     def get_keypair(self, key_name):
         resp, body = self.get("os-keypairs/%s" % str(key_name))
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def create_keypair(self, name, pub_key=None):
-        doc = Document()
+        doc = xml_utils.Document()
 
-        keypair_element = Element("keypair")
+        keypair_element = xml_utils.Element("keypair")
 
         if pub_key:
-            public_key_element = Element("public_key")
-            public_key_text = Text(pub_key)
+            public_key_element = xml_utils.Element("public_key")
+            public_key_text = xml_utils.Text(pub_key)
             public_key_element.append(public_key_text)
             keypair_element.append(public_key_element)
 
-        name_element = Element("name")
-        name_text = Text(name)
+        name_element = xml_utils.Element("name")
+        name_text = xml_utils.Text(name)
         name_element.append(name_text)
         keypair_element.append(name_element)
 
         doc.append(keypair_element)
 
         resp, body = self.post("os-keypairs", body=str(doc))
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def delete_keypair(self, key_name):
diff --git a/tempest/services/compute/xml/quotas_client.py b/tempest/services/compute/xml/quotas_client.py
index 85e481c..8a521ab 100644
--- a/tempest/services/compute/xml/quotas_client.py
+++ b/tempest/services/compute/xml/quotas_client.py
@@ -16,11 +16,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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.common import XMLNS_11
 
 CONF = config.CONF
 
@@ -44,12 +41,14 @@
 
         return quota
 
-    def get_quota_set(self, tenant_id):
+    def get_quota_set(self, tenant_id, user_id=None):
         """List the quota set for a tenant."""
 
         url = 'os-quota-sets/%s' % str(tenant_id)
+        if user_id:
+            url += '?user_id=%s' % str(user_id)
         resp, body = self.get(url)
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         body = self._format_quota(body)
         return resp, body
 
@@ -58,7 +57,7 @@
 
         url = 'os-quota-sets/%s/defaults' % str(tenant_id)
         resp, body = self.get(url)
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         body = self._format_quota(body)
         return resp, body
 
@@ -72,8 +71,8 @@
         """
         Updates the tenant's quota limits for one or more resources
         """
-        post_body = Element("quota_set",
-                            xmlns=XMLNS_11)
+        post_body = xml_utils.Element("quota_set",
+                                      xmlns=xml_utils.XMLNS_11)
 
         if force is not None:
             post_body.add_attr('force', force)
@@ -117,8 +116,8 @@
             post_body.add_attr('security_groups', security_groups)
 
         resp, body = self.put('os-quota-sets/%s' % str(tenant_id),
-                              str(Document(post_body)))
-        body = xml_to_json(etree.fromstring(body))
+                              str(xml_utils.Document(post_body)))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         body = self._format_quota(body)
         return resp, body
 
diff --git a/tempest/services/compute/xml/security_groups_client.py b/tempest/services/compute/xml/security_groups_client.py
index d53e8da..9eccb90 100644
--- a/tempest/services/compute/xml/security_groups_client.py
+++ b/tempest/services/compute/xml/security_groups_client.py
@@ -17,13 +17,9 @@
 import urllib
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -38,11 +34,11 @@
     def _parse_array(self, node):
         array = []
         for child in node.getchildren():
-            array.append(xml_to_json(child))
+            array.append(xml_utils.xml_to_json(child))
         return array
 
     def _parse_body(self, body):
-        json = xml_to_json(body)
+        json = xml_utils.xml_to_json(body)
         return json
 
     def list_security_groups(self, params=None):
@@ -69,12 +65,12 @@
         name (Required): Name of security group.
         description (Required): Description of security group.
         """
-        security_group = Element("security_group", name=name)
-        des = Element("description")
-        des.append(Text(content=description))
+        security_group = xml_utils.Element("security_group", name=name)
+        des = xml_utils.Element("description")
+        des.append(xml_utils.Text(content=description))
         security_group.append(des)
         resp, body = self.post('os-security-groups',
-                               str(Document(security_group)))
+                               str(xml_utils.Document(security_group)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -86,18 +82,18 @@
         name: new name of security group
         description: new description of security group
         """
-        security_group = Element("security_group")
+        security_group = xml_utils.Element("security_group")
         if name:
-            sg_name = Element("name")
-            sg_name.append(Text(content=name))
+            sg_name = xml_utils.Element("name")
+            sg_name.append(xml_utils.Text(content=name))
             security_group.append(sg_name)
         if description:
-            des = Element("description")
-            des.append(Text(content=description))
+            des = xml_utils.Element("description")
+            des.append(xml_utils.Text(content=description))
             security_group.append(des)
         resp, body = self.put('os-security-groups/%s' %
                               str(security_group_id),
-                              str(Document(security_group)))
+                              str(xml_utils.Document(security_group)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -117,7 +113,7 @@
         cidr     : CIDR for address range.
         group_id : ID of the Source group
         """
-        group_rule = Element("security_group_rule")
+        group_rule = xml_utils.Element("security_group_rule")
 
         elements = dict()
         elements['cidr'] = kwargs.get('cidr')
@@ -129,12 +125,12 @@
 
         for k, v in elements.items():
             if v is not None:
-                element = Element(k)
-                element.append(Text(content=str(v)))
+                element = xml_utils.Element(k)
+                element.append(xml_utils.Text(content=str(v)))
                 group_rule.append(element)
 
         url = 'os-security-group-rules'
-        resp, body = self.post(url, str(Document(group_rule)))
+        resp, body = self.post(url, str(xml_utils.Document(group_rule)))
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
@@ -151,8 +147,8 @@
         secgroups = body.getchildren()
         for secgroup in secgroups:
             if secgroup.get('id') == security_group_id:
-                node = secgroup.find('{%s}rules' % XMLNS_11)
-                rules = [xml_to_json(x) for x in node.getchildren()]
+                node = secgroup.find('{%s}rules' % xml_utils.XMLNS_11)
+                rules = [xml_utils.xml_to_json(x) for x in node.getchildren()]
                 return resp, rules
         raise exceptions.NotFound('No such Security Group')
 
diff --git a/tempest/services/compute/xml/servers_client.py b/tempest/services/compute/xml/servers_client.py
index 1215b80..37de147 100644
--- a/tempest/services/compute/xml/servers_client.py
+++ b/tempest/services/compute/xml/servers_client.py
@@ -21,14 +21,10 @@
 
 from tempest.common import rest_client
 from tempest.common import waiters
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -60,12 +56,13 @@
 
 def _translate_network_xml_to_json(network):
     return [_translate_ip_xml_json(ip.attrib)
-            for ip in network.findall('{%s}ip' % XMLNS_11)]
+            for ip in network.findall('{%s}ip' % xml_utils.XMLNS_11)]
 
 
 def _translate_addresses_xml_to_json(xml_addresses):
     return dict((network.attrib['id'], _translate_network_xml_to_json(network))
-                for network in xml_addresses.findall('{%s}network' % XMLNS_11))
+                for network in xml_addresses.findall('{%s}network' %
+                                                     xml_utils.XMLNS_11))
 
 
 def _translate_server_xml_to_json(xml_dom):
@@ -97,16 +94,16 @@
                                         'version': 6}],
                    'foo_novanetwork': [{'addr': '192.168.0.4', 'version': 4}]}}
     """
-    nsmap = {'api': XMLNS_11}
+    nsmap = {'api': xml_utils.XMLNS_11}
     addresses = xml_dom.xpath('/api:server/api:addresses', namespaces=nsmap)
     if addresses:
         if len(addresses) > 1:
             raise ValueError('Expected only single `addresses` element.')
         json_addresses = _translate_addresses_xml_to_json(addresses[0])
-        json = xml_to_json(xml_dom)
+        json = xml_utils.xml_to_json(xml_dom)
         json['addresses'] = json_addresses
     else:
-        json = xml_to_json(xml_dom)
+        json = xml_utils.xml_to_json(xml_dom)
     diskConfig = ('{http://docs.openstack.org'
                   '/compute/ext/disk_config/api/v1.1}diskConfig')
     terminated_at = ('{http://docs.openstack.org/'
@@ -157,7 +154,7 @@
         del json['link']
         json['links'] = []
         for linknode in node.findall('{http://www.w3.org/2005/Atom}link'):
-            json['links'].append(xml_to_json(linknode))
+            json['links'].append(xml_utils.xml_to_json(linknode))
 
     def _parse_server(self, body):
         json = _translate_server_xml_to_json(body)
@@ -165,7 +162,7 @@
         if 'metadata' in json and json['metadata']:
             # NOTE(danms): if there was metadata, we need to re-parse
             # that as a special type
-            metadata_tag = body.find('{%s}metadata' % XMLNS_11)
+            metadata_tag = body.find('{%s}metadata' % xml_utils.XMLNS_11)
             json["metadata"] = self._parse_key_value(metadata_tag)
         if 'link' in json:
             self._parse_links(body, json)
@@ -242,7 +239,7 @@
     def _parse_array(self, node):
         array = []
         for child in node.getchildren():
-            array.append(xml_to_json(child))
+            array.append(xml_utils.xml_to_json(child))
         return array
 
     def list_servers(self, params=None):
@@ -265,8 +262,8 @@
 
     def update_server(self, server_id, name=None, meta=None, accessIPv4=None,
                       accessIPv6=None, disk_config=None):
-        doc = Document()
-        server = Element("server")
+        doc = xml_utils.Document()
+        server = xml_utils.Element("server")
         doc.append(server)
 
         if name is not None:
@@ -280,15 +277,15 @@
                             "compute/ext/disk_config/api/v1.1")
             server.add_attr("OS-DCF:diskConfig", disk_config)
         if meta is not None:
-            metadata = Element("metadata")
+            metadata = xml_utils.Element("metadata")
             server.append(metadata)
             for k, v in meta:
-                meta = Element("meta", key=k)
-                meta.append(Text(v))
+                meta = xml_utils.Element("meta", key=k)
+                meta.append(xml_utils.Text(v))
                 metadata.append(meta)
 
         resp, body = self.put('servers/%s' % str(server_id), str(doc))
-        return resp, xml_to_json(etree.fromstring(body))
+        return resp, xml_utils.xml_to_json(etree.fromstring(body))
 
     def create_server(self, name, image_ref, flavor_ref, **kwargs):
         """
@@ -312,11 +309,11 @@
         max_count: Count of maximum number of instances to launch.
         disk_config: Determines if user or admin controls disk configuration.
         """
-        server = Element("server",
-                         xmlns=XMLNS_11,
-                         imageRef=image_ref,
-                         flavorRef=flavor_ref,
-                         name=name)
+        server = xml_utils.Element("server",
+                                   xmlns=xml_utils.XMLNS_11,
+                                   imageRef=image_ref,
+                                   flavorRef=flavor_ref,
+                                   name=name)
 
         for attr in ["adminPass", "accessIPv4", "accessIPv6", "key_name",
                      "user_data", "availability_zone", "min_count",
@@ -330,37 +327,46 @@
             server.add_attr('OS-DCF:diskConfig', kwargs['disk_config'])
 
         if 'security_groups' in kwargs:
-            secgroups = Element("security_groups")
+            secgroups = xml_utils.Element("security_groups")
             server.append(secgroups)
             for secgroup in kwargs['security_groups']:
-                s = Element("security_group", name=secgroup['name'])
+                s = xml_utils.Element("security_group", name=secgroup['name'])
                 secgroups.append(s)
 
         if 'networks' in kwargs:
-            networks = Element("networks")
+            networks = xml_utils.Element("networks")
             server.append(networks)
             for network in kwargs['networks']:
-                s = Element("network", uuid=network['uuid'],
-                            fixed_ip=network['fixed_ip'])
+                s = xml_utils.Element("network", uuid=network['uuid'],
+                                      fixed_ip=network['fixed_ip'])
                 networks.append(s)
 
         if 'meta' in kwargs:
-            metadata = Element("metadata")
+            metadata = xml_utils.Element("metadata")
             server.append(metadata)
             for k, v in kwargs['meta'].items():
-                meta = Element("meta", key=k)
-                meta.append(Text(v))
+                meta = xml_utils.Element("meta", key=k)
+                meta.append(xml_utils.Text(v))
                 metadata.append(meta)
 
         if 'personality' in kwargs:
-            personality = Element('personality')
+            personality = xml_utils.Element('personality')
             server.append(personality)
             for k in kwargs['personality']:
-                temp = Element('file', path=k['path'])
-                temp.append(Text(k['contents']))
+                temp = xml_utils.Element('file', path=k['path'])
+                temp.append(xml_utils.Text(k['contents']))
                 personality.append(temp)
 
-        resp, body = self.post('servers', str(Document(server)))
+        if 'sched_hints' in kwargs:
+            sched_hints = kwargs.get('sched_hints')
+            hints = xml_utils.Element("os:scheduler_hints")
+            hints.add_attr('xmlns:os', xml_utils.XMLNS_11)
+            for attr in sched_hints:
+                p1 = xml_utils.Element(attr)
+                p1.append(sched_hints[attr])
+                hints.append(p1)
+            server.append(hints)
+        resp, body = self.post('servers', str(xml_utils.Document(server)))
         server = self._parse_server(etree.fromstring(body))
         return resp, server
 
@@ -418,11 +424,11 @@
 
     def action(self, server_id, action_name, response_key, **kwargs):
         if 'xmlns' not in kwargs:
-            kwargs['xmlns'] = XMLNS_11
-        doc = Document((Element(action_name, **kwargs)))
+            kwargs['xmlns'] = xml_utils.XMLNS_11
+        doc = xml_utils.Document((xml_utils.Element(action_name, **kwargs)))
         resp, body = self.post("servers/%s/action" % server_id, str(doc))
         if response_key is not None:
-            body = xml_to_json(etree.fromstring(body))
+            body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def create_backup(self, server_id, backup_type, rotation, name):
@@ -438,7 +444,7 @@
 
     def get_password(self, server_id):
         resp, body = self.get("servers/%s/os-server-password" % str(server_id))
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def delete_password(self, server_id):
@@ -461,24 +467,23 @@
                                      "compute/ext/disk_config/api/v1.1"
             kwargs['xmlns:atom'] = "http://www.w3.org/2005/Atom"
         if 'xmlns' not in kwargs:
-            kwargs['xmlns'] = XMLNS_11
+            kwargs['xmlns'] = xml_utils.XMLNS_11
 
         attrs = kwargs.copy()
         if 'metadata' in attrs:
             del attrs['metadata']
-        rebuild = Element("rebuild",
-                          **attrs)
+        rebuild = xml_utils.Element("rebuild", **attrs)
 
         if 'metadata' in kwargs:
-            metadata = Element("metadata")
+            metadata = xml_utils.Element("metadata")
             rebuild.append(metadata)
             for k, v in kwargs['metadata'].items():
-                meta = Element("meta", key=k)
-                meta.append(Text(v))
+                meta = xml_utils.Element("meta", key=k)
+                meta.append(xml_utils.Text(v))
                 metadata.append(meta)
 
         resp, body = self.post('servers/%s/action' % server_id,
-                               str(Document(rebuild)))
+                               str(xml_utils.Document(rebuild)))
         server = self._parse_server(etree.fromstring(body))
         return resp, server
 
@@ -516,14 +521,14 @@
     def live_migrate_server(self, server_id, dest_host, use_block_migration):
         """This should be called with administrator privileges ."""
 
-        req_body = Element("os-migrateLive",
-                           xmlns=XMLNS_11,
-                           disk_over_commit=False,
-                           block_migration=use_block_migration,
-                           host=dest_host)
+        req_body = xml_utils.Element("os-migrateLive",
+                                     xmlns=xml_utils.XMLNS_11,
+                                     disk_over_commit=False,
+                                     block_migration=use_block_migration,
+                                     host=dest_host)
 
         resp, body = self.post("servers/%s/action" % str(server_id),
-                               str(Document(req_body)))
+                               str(xml_utils.Document(req_body)))
         return resp, body
 
     def list_server_metadata(self, server_id):
@@ -532,44 +537,44 @@
         return resp, body
 
     def set_server_metadata(self, server_id, meta, no_metadata_field=False):
-        doc = Document()
+        doc = xml_utils.Document()
         if not no_metadata_field:
-            metadata = Element("metadata")
+            metadata = xml_utils.Element("metadata")
             doc.append(metadata)
             for k, v in meta.items():
-                meta_element = Element("meta", key=k)
-                meta_element.append(Text(v))
+                meta_element = xml_utils.Element("meta", key=k)
+                meta_element.append(xml_utils.Text(v))
                 metadata.append(meta_element)
         resp, body = self.put('servers/%s/metadata' % str(server_id), str(doc))
-        return resp, xml_to_json(etree.fromstring(body))
+        return resp, xml_utils.xml_to_json(etree.fromstring(body))
 
     def update_server_metadata(self, server_id, meta):
-        doc = Document()
-        metadata = Element("metadata")
+        doc = xml_utils.Document()
+        metadata = xml_utils.Element("metadata")
         doc.append(metadata)
         for k, v in meta.items():
-            meta_element = Element("meta", key=k)
-            meta_element.append(Text(v))
+            meta_element = xml_utils.Element("meta", key=k)
+            meta_element.append(xml_utils.Text(v))
             metadata.append(meta_element)
         resp, body = self.post("/servers/%s/metadata" % str(server_id),
                                str(doc))
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def get_server_metadata_item(self, server_id, key):
         resp, body = self.get("servers/%s/metadata/%s" % (str(server_id), key))
         return resp, dict([(etree.fromstring(body).attrib['key'],
-                            xml_to_json(etree.fromstring(body)))])
+                            xml_utils.xml_to_json(etree.fromstring(body)))])
 
     def set_server_metadata_item(self, server_id, key, meta):
-        doc = Document()
+        doc = xml_utils.Document()
         for k, v in meta.items():
-            meta_element = Element("meta", key=k)
-            meta_element.append(Text(v))
+            meta_element = xml_utils.Element("meta", key=k)
+            meta_element.append(xml_utils.Text(v))
             doc.append(meta_element)
         resp, body = self.put('servers/%s/metadata/%s' % (str(server_id), key),
                               str(doc))
-        return resp, xml_to_json(etree.fromstring(body))
+        return resp, xml_utils.xml_to_json(etree.fromstring(body))
 
     def delete_server_metadata_item(self, server_id, key):
         resp, body = self.delete("servers/%s/metadata/%s" %
@@ -598,10 +603,10 @@
         return self.action(server_id, 'unrescue', None)
 
     def attach_volume(self, server_id, volume_id, device='/dev/vdz'):
-        post_body = Element("volumeAttachment", volumeId=volume_id,
-                            device=device)
+        post_body = xml_utils.Element("volumeAttachment", volumeId=volume_id,
+                                      device=device)
         resp, body = self.post('servers/%s/os-volume_attachments' % server_id,
-                               str(Document(post_body)))
+                               str(xml_utils.Document(post_body)))
         return resp, body
 
     def detach_volume(self, server_id, volume_id):
@@ -614,7 +619,7 @@
     def get_server_diagnostics(self, server_id):
         """Get the usage data for a server."""
         resp, body = self.get("servers/%s/diagnostics" % server_id)
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def list_instance_actions(self, server_id):
@@ -627,7 +632,7 @@
         """Returns the action details of the provided server."""
         resp, body = self.get("servers/%s/os-instance-actions/%s" %
                               (server_id, request_id))
-        body = xml_to_json(etree.fromstring(body))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def force_delete_server(self, server_id, **kwargs):
diff --git a/tempest/services/compute/xml/services_client.py b/tempest/services/compute/xml/services_client.py
index d7b8a60..e1e78d0 100644
--- a/tempest/services/compute/xml/services_client.py
+++ b/tempest/services/compute/xml/services_client.py
@@ -19,10 +19,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -41,7 +39,7 @@
 
         resp, body = self.get(url)
         node = etree.fromstring(body)
-        body = [xml_to_json(x) for x in node.getchildren()]
+        body = [xml_utils.xml_to_json(x) for x in node.getchildren()]
         return resp, body
 
     def enable_service(self, host_name, binary):
@@ -50,12 +48,13 @@
         host_name: Name of host
         binary: Service binary
         """
-        post_body = Element("service")
+        post_body = xml_utils.Element("service")
         post_body.add_attr('binary', binary)
         post_body.add_attr('host', host_name)
 
-        resp, body = self.put('os-services/enable', str(Document(post_body)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.put('os-services/enable', str(
+            xml_utils.Document(post_body)))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def disable_service(self, host_name, binary):
@@ -64,10 +63,11 @@
         host_name: Name of host
         binary: Service binary
         """
-        post_body = Element("service")
+        post_body = xml_utils.Element("service")
         post_body.add_attr('binary', binary)
         post_body.add_attr('host', host_name)
 
-        resp, body = self.put('os-services/disable', str(Document(post_body)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.put('os-services/disable', str(
+            xml_utils.Document(post_body)))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
diff --git a/tempest/services/compute/xml/tenant_usages_client.py b/tempest/services/compute/xml/tenant_usages_client.py
index 79f0ac9..0b19f63 100644
--- a/tempest/services/compute/xml/tenant_usages_client.py
+++ b/tempest/services/compute/xml/tenant_usages_client.py
@@ -18,8 +18,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 from tempest import config
-from tempest.services.compute.xml.common import xml_to_json
 
 CONF = config.CONF
 
@@ -32,7 +32,7 @@
         self.service = CONF.compute.catalog_type
 
     def _parse_array(self, node):
-        json = xml_to_json(node)
+        json = xml_utils.xml_to_json(node)
         return json
 
     def list_tenant_usages(self, params=None):
diff --git a/tempest/services/compute/xml/volumes_extensions_client.py b/tempest/services/compute/xml/volumes_extensions_client.py
index 570b715..e9c5035 100644
--- a/tempest/services/compute/xml/volumes_extensions_client.py
+++ b/tempest/services/compute/xml/volumes_extensions_client.py
@@ -19,13 +19,9 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils
 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
 
 CONF = config.CONF
 
@@ -51,7 +47,7 @@
                 vol['metadata'] = dict((meta.get('key'),
                                         meta.text) for meta in list(child))
             else:
-                vol[tag] = xml_to_json(child)
+                vol[tag] = xml_utils.xml_to_json(child)
         return vol
 
     def list_volumes(self, params=None):
@@ -96,23 +92,23 @@
         :param display_name: Optional Volume Name.
         :param metadata: An optional dictionary of values for metadata.
         """
-        volume = Element("volume",
-                         xmlns=XMLNS_11,
-                         size=size)
+        volume = xml_utils.Element("volume",
+                                   xmlns=xml_utils.XMLNS_11,
+                                   size=size)
         if display_name:
             volume.add_attr('display_name', display_name)
 
         if metadata:
-            _metadata = Element('metadata')
+            _metadata = xml_utils.Element('metadata')
             volume.append(_metadata)
             for key, value in metadata.items():
-                meta = Element('meta')
+                meta = xml_utils.Element('meta')
                 meta.add_attr('key', key)
-                meta.append(Text(value))
+                meta.append(xml_utils.Text(value))
                 _metadata.append(meta)
 
-        resp, body = self.post('os-volumes', str(Document(volume)))
-        body = xml_to_json(etree.fromstring(body))
+        resp, body = self.post('os-volumes', str(xml_utils.Document(volume)))
+        body = xml_utils.xml_to_json(etree.fromstring(body))
         return resp, body
 
     def delete_volume(self, volume_id):
diff --git a/tempest/services/identity/json/identity_client.py b/tempest/services/identity/json/identity_client.py
index 9a31540..c95faaa 100644
--- a/tempest/services/identity/json/identity_client.py
+++ b/tempest/services/identity/json/identity_client.py
@@ -49,6 +49,12 @@
         resp, body = self.post('OS-KSADM/roles', post_body)
         return resp, self._parse_resp(body)
 
+    def get_role(self, role_id):
+        """Get a role by its id."""
+        resp, body = self.get('OS-KSADM/roles/%s' % role_id)
+        body = json.loads(body)
+        return resp, body['role']
+
     def create_tenant(self, name, **kwargs):
         """
         Create a tenant
@@ -134,9 +140,10 @@
         post_body = {
             'name': name,
             'password': password,
-            'tenantId': tenant_id,
             'email': email
         }
+        if tenant_id is not None:
+            post_body['tenantId'] = tenant_id
         if kwargs.get('enabled') is not None:
             post_body['enabled'] = kwargs.get('enabled')
         post_body = json.dumps({'user': post_body})
@@ -233,16 +240,36 @@
 
         self.auth_url = auth_url
 
-    def auth(self, user, password, tenant):
+    def auth(self, user, password, tenant=None):
         creds = {
             'auth': {
                 'passwordCredentials': {
                     'username': user,
                     'password': password,
                 },
-                'tenantName': tenant,
             }
         }
+
+        if tenant:
+            creds['auth']['tenantName'] = tenant
+
+        body = json.dumps(creds)
+        resp, body = self.post(self.auth_url, body=body)
+
+        return resp, body['access']
+
+    def auth_token(self, token_id, tenant=None):
+        creds = {
+            'auth': {
+                'token': {
+                    'id': token_id,
+                },
+            }
+        }
+
+        if tenant:
+            creds['auth']['tenantName'] = tenant
+
         body = json.dumps(creds)
         resp, body = self.post(self.auth_url, body=body)
 
@@ -255,10 +282,9 @@
             # Because XML response is not easily
             # converted to the corresponding JSON one
             headers = self.get_headers(accept_type="json")
-        self._log_request(method, url, headers, body)
         resp, resp_body = self.http_obj.request(url, method,
                                                 headers=headers, body=body)
-        self._log_response(resp, resp_body)
+        self._log_request(method, url, resp)
 
         if resp.status in [401, 403]:
             resp_body = json.loads(resp_body)
diff --git a/tempest/services/identity/v3/json/identity_client.py b/tempest/services/identity/v3/json/identity_client.py
index 65f3355..35d8aa0 100644
--- a/tempest/services/identity/v3/json/identity_client.py
+++ b/tempest/services/identity/v3/json/identity_client.py
@@ -297,6 +297,12 @@
         body = json.loads(body)
         return resp, body['users']
 
+    def list_user_groups(self, user_id):
+        """Lists groups which a user belongs to."""
+        resp, body = self.get('users/%s/groups' % user_id)
+        body = json.loads(body)
+        return resp, body['groups']
+
     def delete_group_user(self, group_id, user_id):
         """Delete user in group."""
         resp, body = self.delete('groups/%s/users/%s' % (group_id, user_id))
@@ -503,10 +509,9 @@
             # Because XML response is not easily
             # converted to the corresponding JSON one
             headers = self.get_headers(accept_type="json")
-        self._log_request(method, url, headers, body)
         resp, resp_body = self.http_obj.request(url, method,
                                                 headers=headers, body=body)
-        self._log_response(resp, resp_body)
+        self._log_request(method, url, resp)
 
         if resp.status in [401, 403]:
             resp_body = json.loads(resp_body)
diff --git a/tempest/services/identity/v3/xml/credentials_client.py b/tempest/services/identity/v3/xml/credentials_client.py
index 70f85a1..3c44188 100644
--- a/tempest/services/identity/v3/xml/credentials_client.py
+++ b/tempest/services/identity/v3/xml/credentials_client.py
@@ -18,8 +18,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
diff --git a/tempest/services/identity/v3/xml/endpoints_client.py b/tempest/services/identity/v3/xml/endpoints_client.py
index a1f9811..93dc3dc 100644
--- a/tempest/services/identity/v3/xml/endpoints_client.py
+++ b/tempest/services/identity/v3/xml/endpoints_client.py
@@ -17,8 +17,8 @@
 
 from tempest.common import http
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
diff --git a/tempest/services/identity/v3/xml/identity_client.py b/tempest/services/identity/v3/xml/identity_client.py
index 6ff6d56..ffeb979 100644
--- a/tempest/services/identity/v3/xml/identity_client.py
+++ b/tempest/services/identity/v3/xml/identity_client.py
@@ -18,9 +18,9 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
 from tempest import exceptions
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
@@ -52,6 +52,14 @@
                 array.append(common.xml_to_json(child))
         return array
 
+    def _parse_groups(self, node):
+        array = []
+        for child in node.getchildren():
+            tag_list = child.tag.split('}', 1)
+            if tag_list[1] == "group":
+                array.append(common.xml_to_json(child))
+        return array
+
     def _parse_group_users(self, node):
         array = []
         for child in node.getchildren():
@@ -342,6 +350,12 @@
         body = self._parse_group_users(etree.fromstring(body))
         return resp, body
 
+    def list_user_groups(self, user_id):
+        """Lists the groups which a user belongs to."""
+        resp, body = self.get('users/%s/groups' % user_id)
+        body = self._parse_groups(etree.fromstring(body))
+        return resp, body
+
     def delete_group_user(self, group_id, user_id):
         """Delete user in group."""
         resp, body = self.delete('groups/%s/users/%s' % (group_id, user_id))
@@ -491,10 +505,9 @@
             # Because XML response is not easily
             # converted to the corresponding JSON one
             headers = self.get_headers(accept_type="json")
-        self._log_request(method, url, headers, body)
         resp, resp_body = self.http_obj.request(url, method,
                                                 headers=headers, body=body)
-        self._log_response(resp, resp_body)
+        self._log_request(method, url, resp)
 
         if resp.status in [401, 403]:
             resp_body = json.loads(resp_body)
diff --git a/tempest/services/identity/v3/xml/policy_client.py b/tempest/services/identity/v3/xml/policy_client.py
index bf4cce7..e903089 100644
--- a/tempest/services/identity/v3/xml/policy_client.py
+++ b/tempest/services/identity/v3/xml/policy_client.py
@@ -17,8 +17,8 @@
 
 from tempest.common import http
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
diff --git a/tempest/services/identity/v3/xml/service_client.py b/tempest/services/identity/v3/xml/service_client.py
index 966d7f7..37ed892 100644
--- a/tempest/services/identity/v3/xml/service_client.py
+++ b/tempest/services/identity/v3/xml/service_client.py
@@ -16,8 +16,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
diff --git a/tempest/services/identity/xml/identity_client.py b/tempest/services/identity/xml/identity_client.py
index 50403fb..c48bc90 100644
--- a/tempest/services/identity/xml/identity_client.py
+++ b/tempest/services/identity/xml/identity_client.py
@@ -12,8 +12,8 @@
 #    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 xml_utils as xml
 from tempest import config
-from tempest.services.compute.xml import common as xml
 from tempest.services.identity.json import identity_client
 
 CONF = config.CONF
@@ -31,6 +31,11 @@
                                str(xml.Document(create_role)))
         return resp, self._parse_resp(body)
 
+    def get_role(self, role_id):
+        """Get a role by its id."""
+        resp, body = self.get('OS-KSADM/roles/%s' % role_id)
+        return resp, self._parse_resp(body)
+
     def create_tenant(self, name, **kwargs):
         """
         Create a tenant
@@ -75,8 +80,9 @@
                                   xmlns=XMLNS,
                                   name=name,
                                   password=password,
-                                  tenantId=tenant_id,
                                   email=email)
+        if tenant_id:
+            create_user.add_attr('tenantId', tenant_id)
         if 'enabled' in kwargs:
             create_user.add_attr('enabled', str(kwargs['enabled']).lower())
 
@@ -116,11 +122,24 @@
 class TokenClientXML(identity_client.TokenClientJSON):
     TYPE = "xml"
 
-    def auth(self, user, password, tenant):
-        passwordCreds = xml.Element("passwordCredentials",
+    def auth(self, user, password, tenant=None):
+        passwordCreds = xml.Element('passwordCredentials',
                                     username=user,
                                     password=password)
-        auth = xml.Element("auth", tenantName=tenant)
+        auth_kwargs = {}
+        if tenant:
+            auth_kwargs['tenantName'] = tenant
+        auth = xml.Element('auth', **auth_kwargs)
         auth.append(passwordCreds)
         resp, body = self.post(self.auth_url, body=str(xml.Document(auth)))
         return resp, body['access']
+
+    def auth_token(self, token_id, tenant=None):
+        tokenCreds = xml.Element('token', id=token_id)
+        auth_kwargs = {}
+        if tenant:
+            auth_kwargs['tenantName'] = tenant
+        auth = xml.Element('auth', **auth_kwargs)
+        auth.append(tokenCreds)
+        resp, body = self.post(self.auth_url, body=str(xml.Document(auth)))
+        return resp, body['access']
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index a804e8e..e5309ff 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -144,25 +144,6 @@
         body = json.loads(body)
         return resp, body
 
-    def create_floating_ip(self, ext_network_id, **kwargs):
-        post_body = {
-            'floatingip': kwargs}
-        post_body['floatingip']['floating_network_id'] = ext_network_id
-        body = json.dumps(post_body)
-        uri = '%s/floatingips' % (self.uri_prefix)
-        resp, body = self.post(uri, body=body)
-        body = json.loads(body)
-        return resp, body
-
-    def update_floating_ip(self, floating_ip_id, **kwargs):
-        post_body = {
-            'floatingip': kwargs}
-        body = json.dumps(post_body)
-        uri = '%s/floatingips/%s' % (self.uri_prefix, floating_ip_id)
-        resp, body = self.put(uri, body)
-        body = json.loads(body)
-        return resp, body
-
     def associate_health_monitor_with_pool(self, health_monitor_id,
                                            pool_id):
         post_body = {
@@ -199,18 +180,6 @@
         body = json.loads(body)
         return resp, body
 
-    def update_vpnservice(self, uuid, description):
-        put_body = {
-            "vpnservice": {
-                "description": description
-            }
-        }
-        body = json.dumps(put_body)
-        uri = '%s/vpn/vpnservices/%s' % (self.uri_prefix, uuid)
-        resp, body = self.put(uri, body)
-        body = json.loads(body)
-        return resp, body
-
     def list_router_interfaces(self, uuid):
         uri = '%s/ports?device_id=%s' % (self.uri_prefix, uuid)
         resp, body = self.get(uri)
@@ -300,14 +269,6 @@
         body = json.loads(body)
         return resp, body
 
-    def update_ikepolicy(self, uuid, **kwargs):
-        put_body = {'ikepolicy': kwargs}
-        body = json.dumps(put_body)
-        uri = '%s/vpn/ikepolicies/%s' % (self.uri_prefix, uuid)
-        resp, body = self.put(uri, body)
-        body = json.loads(body)
-        return resp, body
-
     def update_extra_routes(self, router_id, nexthop, destination):
         uri = '%s/routers/%s' % (self.uri_prefix, router_id)
         put_body = {
diff --git a/tempest/services/network/network_client_base.py b/tempest/services/network/network_client_base.py
index 41a7aa4..e21abe1 100644
--- a/tempest/services/network/network_client_base.py
+++ b/tempest/services/network/network_client_base.py
@@ -44,7 +44,6 @@
     'security_groups': 'security_groups',
     'security_group_rules': 'security_group_rules',
     'ikepolicy': 'ikepolicies',
-    'floating_ip': 'floatingips',
     'quotas': 'quotas'
 }
 
diff --git a/tempest/services/network/xml/network_client.py b/tempest/services/network/xml/network_client.py
index 2a5083c..26dc672 100644
--- a/tempest/services/network/xml/network_client.py
+++ b/tempest/services/network/xml/network_client.py
@@ -14,7 +14,7 @@
 import xml.etree.ElementTree as ET
 
 from tempest.common import rest_client
-from tempest.services.compute.xml import common
+from tempest.common import xml_utils as common
 from tempest.services.network import network_client_base as client_base
 
 
@@ -166,33 +166,6 @@
         body = _root_tag_fetcher_and_xml_to_json_parse(body)
         return resp, body
 
-    def create_floating_ip(self, ext_network_id, **kwargs):
-        uri = '%s/floatingips' % (self.uri_prefix)
-        floatingip = common.Element('floatingip')
-        floatingip.append(common.Element("floating_network_id",
-                                         ext_network_id))
-        for element, content in kwargs.iteritems():
-            floatingip.append(common.Element(element, content))
-        resp, body = self.post(uri, str(common.Document(floatingip)))
-        body = _root_tag_fetcher_and_xml_to_json_parse(body)
-        return resp, body
-
-    def update_floating_ip(self, floating_ip_id, **kwargs):
-        uri = '%s/floatingips/%s' % (self.uri_prefix, floating_ip_id)
-        floatingip = common.Element('floatingip')
-        floatingip.add_attr('xmlns:xsi',
-                            'http://www.w3.org/2001/XMLSchema-instance')
-        for element, content in kwargs.iteritems():
-            if content is None:
-                xml_elem = common.Element(element)
-                xml_elem.add_attr("xsi:nil", "true")
-                floatingip.append(xml_elem)
-            else:
-                floatingip.append(common.Element(element, content))
-        resp, body = self.put(uri, str(common.Document(floatingip)))
-        body = _root_tag_fetcher_and_xml_to_json_parse(body)
-        return resp, body
-
     def list_router_interfaces(self, uuid):
         uri = '%s/ports?device_id=%s' % (self.uri_prefix, uuid)
         resp, body = self.get(uri)
diff --git a/tempest/services/object_storage/account_client.py b/tempest/services/object_storage/account_client.py
index 7c3fa85..6e7910e 100644
--- a/tempest/services/object_storage/account_client.py
+++ b/tempest/services/object_storage/account_client.py
@@ -173,12 +173,11 @@
             method=method, url=url, headers=headers, body=body,
             filters=self.filters
         )
-        self._log_request(method, req_url, headers, body)
         # use original body
         resp, resp_body = self.http_obj.request(req_url, method,
                                                 headers=req_headers,
                                                 body=req_body)
-        self._log_response(resp, resp_body)
+        self._log_request(method, req_url, resp)
 
         if resp.status == 401 or resp.status == 403:
             raise exceptions.Unauthorized()
diff --git a/tempest/services/object_storage/object_client.py b/tempest/services/object_storage/object_client.py
index 77d29a5..49f7f49 100644
--- a/tempest/services/object_storage/object_client.py
+++ b/tempest/services/object_storage/object_client.py
@@ -160,11 +160,10 @@
             filters=self.filters
         )
         # Use original method
-        self._log_request(method, req_url, headers, body)
         resp, resp_body = self.http_obj.request(req_url, method,
                                                 headers=req_headers,
                                                 body=req_body)
-        self._log_response(resp, resp_body)
+        self._log_request(method, req_url, resp)
         if resp.status == 401 or resp.status == 403:
             raise exceptions.Unauthorized()
 
diff --git a/tempest/services/telemetry/xml/telemetry_client.py b/tempest/services/telemetry/xml/telemetry_client.py
index 673f98e..3bee8bf 100644
--- a/tempest/services/telemetry/xml/telemetry_client.py
+++ b/tempest/services/telemetry/xml/telemetry_client.py
@@ -16,7 +16,7 @@
 from lxml import etree
 
 from tempest.common import rest_client
-from tempest.services.compute.xml import common
+from tempest.common import xml_utils as common
 import tempest.services.telemetry.telemetry_client_base as client
 
 
diff --git a/tempest/services/volume/json/admin/volume_types_client.py b/tempest/services/volume/json/admin/volume_types_client.py
index 5554362..c9c0582 100644
--- a/tempest/services/volume/json/admin/volume_types_client.py
+++ b/tempest/services/volume/json/admin/volume_types_client.py
@@ -122,3 +122,31 @@
         resp, body = self.put(url, put_body)
         body = json.loads(body)
         return resp, body
+
+    def get_encryption_type(self, vol_type_id):
+        """
+        Get the volume encryption type for the specified volume type.
+        vol_type_id: Id of volume_type.
+        """
+        url = "/types/%s/encryption" % str(vol_type_id)
+        resp, body = self.get(url)
+        body = json.loads(body)
+        return resp, body
+
+    def create_encryption_type(self, vol_type_id, **kwargs):
+        """
+        Create a new encryption type for the specified volume type.
+
+        vol_type_id: Id of volume_type.
+        provider: Class providing encryption support.
+        cipher: Encryption algorithm/mode to use.
+        key_size: Size of the encryption key, in bits.
+        control_location: Notional service where encryption is performed.
+        """
+        url = "/types/%s/encryption" % str(vol_type_id)
+        post_body = {}
+        post_body.update(kwargs)
+        post_body = json.dumps({'encryption': post_body})
+        resp, body = self.post(url, post_body)
+        body = json.loads(body)
+        return resp, body['encryption']
diff --git a/tempest/services/volume/v2/xml/volumes_client.py b/tempest/services/volume/v2/xml/volumes_client.py
index 0b8f47c..e735a65 100644
--- a/tempest/services/volume/v2/xml/volumes_client.py
+++ b/tempest/services/volume/v2/xml/volumes_client.py
@@ -19,9 +19,9 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
 from tempest import exceptions
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
diff --git a/tempest/services/volume/xml/admin/volume_hosts_client.py b/tempest/services/volume/xml/admin/volume_hosts_client.py
index e34b9f0..967c7c2 100644
--- a/tempest/services/volume/xml/admin/volume_hosts_client.py
+++ b/tempest/services/volume/xml/admin/volume_hosts_client.py
@@ -18,8 +18,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
diff --git a/tempest/services/volume/xml/admin/volume_quotas_client.py b/tempest/services/volume/xml/admin/volume_quotas_client.py
index d2eac34..710fb3a 100644
--- a/tempest/services/volume/xml/admin/volume_quotas_client.py
+++ b/tempest/services/volume/xml/admin/volume_quotas_client.py
@@ -17,8 +17,8 @@
 from ast import literal_eval
 from lxml import etree
 
+from tempest.common import xml_utils as xml
 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
diff --git a/tempest/services/volume/xml/admin/volume_types_client.py b/tempest/services/volume/xml/admin/volume_types_client.py
index 1fa3e73..90897ee 100644
--- a/tempest/services/volume/xml/admin/volume_types_client.py
+++ b/tempest/services/volume/xml/admin/volume_types_client.py
@@ -18,9 +18,9 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
 from tempest import exceptions
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
diff --git a/tempest/services/volume/xml/extensions_client.py b/tempest/services/volume/xml/extensions_client.py
index 4861733..2986fcd 100644
--- a/tempest/services/volume/xml/extensions_client.py
+++ b/tempest/services/volume/xml/extensions_client.py
@@ -16,8 +16,8 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
diff --git a/tempest/services/volume/xml/snapshots_client.py b/tempest/services/volume/xml/snapshots_client.py
index 9ad86d2..4b1ba25 100644
--- a/tempest/services/volume/xml/snapshots_client.py
+++ b/tempest/services/volume/xml/snapshots_client.py
@@ -16,10 +16,10 @@
 from lxml import etree
 
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common import log as logging
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
diff --git a/tempest/services/volume/xml/volumes_client.py b/tempest/services/volume/xml/volumes_client.py
index 8e886ce..6866dad 100644
--- a/tempest/services/volume/xml/volumes_client.py
+++ b/tempest/services/volume/xml/volumes_client.py
@@ -20,9 +20,9 @@
 from xml.sax import saxutils
 
 from tempest.common import rest_client
+from tempest.common import xml_utils as common
 from tempest import config
 from tempest import exceptions
-from tempest.services.compute.xml import common
 
 CONF = config.CONF
 
diff --git a/tempest/test.py b/tempest/test.py
index 75eb6be..abf42c0 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -24,10 +24,9 @@
 
 import fixtures
 import testresources
+import testscenarios
 import testtools
 
-from oslo.config import cfg
-
 from tempest import clients
 import tempest.common.generator.valid_generator as valid
 from tempest.common import isolated_creds
@@ -407,6 +406,24 @@
         return json.load(open(fn))
 
     @staticmethod
+    def load_tests(*args):
+        """
+        Wrapper for testscenarios to set the mandatory scenarios variable
+        only in case a real test loader is in place. Will be automatically
+        called in case the variable "load_tests" is set.
+        """
+        if getattr(args[0], 'suiteClass', None) is not None:
+            loader, standard_tests, pattern = args
+        else:
+            standard_tests, module, loader = args
+        for test in testtools.iterate_tests(standard_tests):
+            schema_file = getattr(test, '_schema_file', None)
+            if schema_file is not None:
+                setattr(test, 'scenarios',
+                        NegativeAutoTest.generate_scenario(schema_file))
+        return testscenarios.load_tests_apply_scenarios(*args)
+
+    @staticmethod
     def generate_scenario(description_file):
         """
         Generates the test scenario list for a given description.
@@ -429,17 +446,8 @@
         """
         description = NegativeAutoTest.load_schema(description_file)
         LOG.debug(description)
-
-        # NOTE(mkoderer): since this will be executed on import level the
-        # config doesn't have to be in place (e.g. for the pep8 job).
-        # In this case simply return.
-        try:
-            generator = importutils.import_class(
-                CONF.negative.test_generator)()
-        except cfg.ConfigFilesNotFoundError:
-            LOG.critical(
-                "Tempest config not found. Test scenarios aren't created")
-            return
+        generator = importutils.import_class(
+            CONF.negative.test_generator)()
         generator.validate_schema(description)
         schema = description.get("json-schema", None)
         resources = description.get("resources", [])
@@ -510,6 +518,10 @@
             new_url, body = self._http_arguments(valid_schema, url, method)
         elif hasattr(self, "schema"):
             new_url, body = self._http_arguments(self.schema, url, method)
+        else:
+            raise Exception("testscenarios are not active. Please make sure "
+                            "that your test runner supports the load_tests "
+                            "mechanism")
 
         if "admin_client" in description and description["admin_client"]:
             client = self.admin_client
diff --git a/tempest/tests/common/utils/test_file_utils.py b/tempest/tests/common/utils/test_file_utils.py
new file mode 100644
index 0000000..99ae033
--- /dev/null
+++ b/tempest/tests/common/utils/test_file_utils.py
@@ -0,0 +1,32 @@
+# Copyright 2014 IBM Corp.
+# 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 mock
+from mock import patch
+
+from tempest.common.utils import file_utils
+from tempest.tests import base
+
+
+class TestFileUtils(base.TestCase):
+
+    def test_have_effective_read_path(self):
+        with patch('__builtin__.open', mock.mock_open(), create=True):
+            result = file_utils.have_effective_read_access('fake_path')
+        self.assertTrue(result)
+
+    def test_not_effective_read_path(self):
+        result = file_utils.have_effective_read_access('fake_path')
+        self.assertFalse(result)
diff --git a/tempest/tests/common/utils/test_misc.py b/tempest/tests/common/utils/test_misc.py
new file mode 100644
index 0000000..b8c6184
--- /dev/null
+++ b/tempest/tests/common/utils/test_misc.py
@@ -0,0 +1,52 @@
+# 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.common.utils import misc
+from tempest.tests import base
+
+
+@misc.singleton
+class TestFoo(object):
+
+    count = 0
+
+    def increment(self):
+        self.count += 1
+        return self.count
+
+
+@misc.singleton
+class TestBar(object):
+
+    count = 0
+
+    def increment(self):
+        self.count += 1
+        return self.count
+
+
+class TestMisc(base.TestCase):
+
+    def test_singleton(self):
+        test = TestFoo()
+        self.assertEqual(0, test.count)
+        self.assertEqual(1, test.increment())
+        test2 = TestFoo()
+        self.assertEqual(1, test.count)
+        self.assertEqual(1, test2.count)
+        self.assertEqual(test, test2)
+        test3 = TestBar()
+        self.assertNotEqual(test, test3)
diff --git a/tempest/tests/fake_config.py b/tempest/tests/fake_config.py
index 8a8ebb0..4676cbd 100644
--- a/tempest/tests/fake_config.py
+++ b/tempest/tests/fake_config.py
@@ -12,16 +12,21 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import os
+
 from oslo.config import cfg
 
 from tempest import config
 from tempest.openstack.common.fixture import config as conf_fixture
+from tempest.openstack.common import importutils
 
 
 class ConfigFixture(conf_fixture.Config):
 
     def __init__(self):
         config.register_opts()
+        # Register locking options
+        importutils.import_module('tempest.openstack.common.lockutils')
         super(ConfigFixture, self).__init__()
 
     def setUp(self):
@@ -36,6 +41,10 @@
                               group='identity')
         self.conf.set_default('neutron', True, group='service_available')
         self.conf.set_default('heat', True, group='service_available')
+        if not os.path.exists(str(os.environ.get('OS_TEST_LOCK_PATH'))):
+            os.mkdir(str(os.environ.get('OS_TEST_LOCK_PATH')))
+        self.conf.set_default('lock_path',
+                              str(os.environ.get('OS_TEST_LOCK_PATH')))
 
 
 class FakePrivate(config.TempestConfigPrivate):
diff --git a/tempest/tests/negative/test_negative_generators.py b/tempest/tests/negative/test_negative_generators.py
new file mode 100644
index 0000000..f2ed999
--- /dev/null
+++ b/tempest/tests/negative/test_negative_generators.py
@@ -0,0 +1,81 @@
+# 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
+import mock
+
+import tempest.common.generator.base_generator as base_generator
+from tempest.tests import base
+
+
+class TestNegativeBasicGenerator(base.TestCase):
+    valid_desc = {
+        "name": "list-flavors-with-detail",
+        "http-method": "GET",
+        "url": "flavors/detail",
+        "json-schema": {
+            "type": "object",
+            "properties": {
+                "minRam": {"type": "integer"},
+                "minDisk": {"type": "integer"}
+            }
+        },
+        "resources": ["flavor", "volume", "image"]
+    }
+
+    minimal_desc = {
+        "name": "list-flavors-with-detail",
+        "http-method": "GET",
+        "url": "flavors/detail",
+    }
+
+    add_prop_desc = {
+        "name": "list-flavors-with-detail",
+        "http-method": "GET",
+        "url": "flavors/detail",
+        "unknown_field": [12]
+    }
+
+    invalid_json_schema_desc = {
+        "name": "list-flavors-with-detail",
+        "http-method": "GET",
+        "url": "flavors/detail",
+        "json-schema": {"type": "NotExistingType"}
+    }
+
+    def setUp(self):
+        super(TestNegativeBasicGenerator, self).setUp()
+        self.generator = base_generator.BasicGeneratorSet()
+
+    def _assert_valid_jsonschema_call(self, jsonschema_mock, desc):
+        self.assertEqual(jsonschema_mock.call_count, 1)
+        jsonschema_mock.assert_called_with(desc, self.generator.schema)
+
+    @mock.patch('jsonschema.validate', wraps=jsonschema.validate)
+    def test_validate_schema_with_valid_input(self, jsonschema_mock):
+        self.generator.validate_schema(self.valid_desc)
+        self._assert_valid_jsonschema_call(jsonschema_mock, self.valid_desc)
+
+    @mock.patch('jsonschema.validate', wraps=jsonschema.validate)
+    def test_validate_schema_with_minimal_input(self, jsonschema_mock):
+        self.generator.validate_schema(self.minimal_desc)
+        self._assert_valid_jsonschema_call(jsonschema_mock, self.minimal_desc)
+
+    def test_validate_schema_with_invalid_input(self):
+        self.assertRaises(jsonschema.ValidationError,
+                          self.generator.validate_schema, self.add_prop_desc)
+        self.assertRaises(jsonschema.SchemaError,
+                          self.generator.validate_schema,
+                          self.invalid_json_schema_desc)
diff --git a/tempest/tests/test_auth.py b/tempest/tests/test_auth.py
index b6e15bd..62c20e3 100644
--- a/tempest/tests/test_auth.py
+++ b/tempest/tests/test_auth.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 import copy
+import datetime
 
 from tempest import auth
 from tempest.common import http
@@ -131,6 +132,11 @@
         self.assertEqual(expected['token'], headers['X-Auth-Token'])
         self.assertEqual(expected['body'], body)
 
+    def _auth_data_with_expiry(self, date_as_string):
+        token, access = self.auth_provider.auth_data
+        access['token']['expires'] = date_as_string
+        return token, access
+
     def test_request(self):
         filters = {
             'service': 'compute',
@@ -292,6 +298,25 @@
         expected = 'http://fake_url/'
         self._test_base_url_helper(expected, self.filters)
 
+    def test_token_not_expired(self):
+        expiry_data = datetime.datetime.utcnow() + datetime.timedelta(days=1)
+        auth_data = self._auth_data_with_expiry(
+            expiry_data.strftime(self.auth_provider.EXPIRY_DATE_FORMAT))
+        self.assertFalse(self.auth_provider.is_expired(auth_data))
+
+    def test_token_expired(self):
+        expiry_data = datetime.datetime.utcnow() - datetime.timedelta(hours=1)
+        auth_data = self._auth_data_with_expiry(
+            expiry_data.strftime(self.auth_provider.EXPIRY_DATE_FORMAT))
+        self.assertTrue(self.auth_provider.is_expired(auth_data))
+
+    def test_token_not_expired_to_be_renewed(self):
+        expiry_data = datetime.datetime.utcnow() + \
+            self.auth_provider.token_expiry_threshold / 2
+        auth_data = self._auth_data_with_expiry(
+            expiry_data.strftime(self.auth_provider.EXPIRY_DATE_FORMAT))
+        self.assertTrue(self.auth_provider.is_expired(auth_data))
+
 
 class TestKeystoneV3AuthProvider(TestKeystoneV2AuthProvider):
     _endpoints = fake_identity.IDENTITY_V3_RESPONSE['token']['catalog']
@@ -316,6 +341,11 @@
             return ep['url'].replace('v3', replacement)
         return ep['url']
 
+    def _auth_data_with_expiry(self, date_as_string):
+        token, access = self.auth_provider.auth_data
+        access['expires_at'] = date_as_string
+        return token, access
+
     def test_check_credentials_missing_tenant_name(self):
         cred = copy.copy(self.credentials)
         del cred['domain_name']
diff --git a/tempest/tests/test_compute_xml_common.py b/tempest/tests/test_compute_xml_common.py
index bfa6a10..1561931 100644
--- a/tempest/tests/test_compute_xml_common.py
+++ b/tempest/tests/test_compute_xml_common.py
@@ -13,7 +13,7 @@
 #    under the License.
 from lxml import etree
 
-from tempest.services.compute.xml import common
+from tempest.common import xml_utils as common
 from tempest.tests import base
 
 
diff --git a/tempest/tests/test_rest_client.py b/tempest/tests/test_rest_client.py
index 4c23fbd..b54b0c2 100644
--- a/tempest/tests/test_rest_client.py
+++ b/tempest/tests/test_rest_client.py
@@ -16,10 +16,10 @@
 import json
 
 from tempest.common import rest_client
+from tempest.common import xml_utils as xml
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common.fixture import mockpatch
-from tempest.services.compute.xml import common as xml
 from tempest.tests import base
 from tempest.tests import fake_auth_provider
 from tempest.tests import fake_config
@@ -43,7 +43,7 @@
         self.useFixture(mockpatch.PatchObject(self.rest_client, '_get_region',
                                               side_effect=self._get_region()))
         self.useFixture(mockpatch.PatchObject(self.rest_client,
-                                              '_log_response'))
+                                              '_log_request'))
 
 
 class TestRestClientHTTPMethods(BaseRestClientTestClass):
@@ -343,3 +343,44 @@
         self.assertRaises(exceptions.InvalidContentType,
                           self.rest_client._error_checker,
                           **self.set_data("405", enc="fake_enc"))
+
+
+class TestRestClientUtils(BaseRestClientTestClass):
+
+    def _is_resource_deleted(self, resource_id):
+        if not isinstance(self.retry_pass, int):
+            return False
+        if self.retry_count >= self.retry_pass:
+            return True
+        self.retry_count = self.retry_count + 1
+        return False
+
+    def setUp(self):
+        self.fake_http = fake_http.fake_httplib2()
+        super(TestRestClientUtils, self).setUp()
+        self.retry_count = 0
+        self.retry_pass = None
+        self.original_deleted_method = self.rest_client.is_resource_deleted
+        self.rest_client.is_resource_deleted = self._is_resource_deleted
+
+    def test_wait_for_resource_deletion(self):
+        self.retry_pass = 2
+        # Ensure timeout long enough for loop execution to hit retry count
+        self.rest_client.build_timeout = 500
+        sleep_mock = self.patch('time.sleep')
+        self.rest_client.wait_for_resource_deletion('1234')
+        self.assertEqual(len(sleep_mock.mock_calls), 2)
+
+    def test_wait_for_resource_deletion_not_deleted(self):
+        self.patch('time.sleep')
+        # Set timeout to be very quick to force exception faster
+        self.rest_client.build_timeout = 1
+        self.assertRaises(exceptions.TimeoutException,
+                          self.rest_client.wait_for_resource_deletion,
+                          '1234')
+
+    def test_wait_for_deletion_with_unimplemented_deleted_method(self):
+        self.rest_client.is_resource_deleted = self.original_deleted_method
+        self.assertRaises(NotImplementedError,
+                          self.rest_client.wait_for_resource_deletion,
+                          '1234')
diff --git a/tools/check_logs.py b/tools/check_logs.py
index edf95a1..b5b1780 100755
--- a/tools/check_logs.py
+++ b/tools/check_logs.py
@@ -30,9 +30,31 @@
 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'])
+allowed_dirty = set([
+    'c-api',
+    'ceilometer-acentral',
+    'ceilometer-acompute',
+    'ceilometer-alarm-evaluator',
+    'ceilometer-anotification',
+    'ceilometer-api',
+    'ceilometer-collector',
+    'c-vol',
+    'g-api',
+    'h-api',
+    'h-eng',
+    'ir-cond',
+    'n-api',
+    'n-cpu',
+    'n-net',
+    'n-sch',
+    'q-agt',
+    'q-dhcp',
+    'q-lbaas',
+    'q-meta',
+    'q-metering',
+    'q-svc',
+    'q-vpn',
+    's-proxy'])
 
 
 def process_files(file_specs, url_specs, whitelists):
@@ -69,12 +91,12 @@
                     break
             if not whitelisted or dump_all_errors:
                 if print_log_name:
-                    print("Log File: %s" % name)
+                    print("\nLog File Has Errors: %s" % name)
                     print_log_name = False
                 if not whitelisted:
                     had_errors = True
                     print("*** Not Whitelisted ***"),
-                print(line)
+                print(line.rstrip())
     return had_errors
 
 
@@ -135,8 +157,8 @@
         return 0
     failed = False
     for log in logs_with_errors:
-        if log in must_be_clean:
-            print("FAILED: %s" % log)
+        if log not in allowed_dirty:
+            print("Log: %s not allowed to have ERRORS or TRACES" % log)
             failed = True
     if failed:
         return 1
diff --git a/tools/config/check_uptodate.sh b/tools/config/check_uptodate.sh
index 45c8629..528bd5b 100755
--- a/tools/config/check_uptodate.sh
+++ b/tools/config/check_uptodate.sh
@@ -1,10 +1,25 @@
-#!/bin/sh
-TEMPDIR=`mktemp -d`
-CFGFILE=tempest.conf.sample
-tools/config/generate_sample.sh -b ./ -p tempest -o $TEMPDIR
-if ! diff $TEMPDIR/$CFGFILE etc/$CFGFILE
+#!/usr/bin/env bash
+
+PROJECT_NAME=${PROJECT_NAME:-tempest}
+CFGFILE_NAME=${PROJECT_NAME}.conf.sample
+
+if [ -e etc/${PROJECT_NAME}/${CFGFILE_NAME} ]; then
+    CFGFILE=etc/${PROJECT_NAME}/${CFGFILE_NAME}
+elif [ -e etc/${CFGFILE_NAME} ]; then
+    CFGFILE=etc/${CFGFILE_NAME}
+else
+    echo "${0##*/}: can not find config file"
+    exit 1
+fi
+
+TEMPDIR=`mktemp -d /tmp/${PROJECT_NAME}.XXXXXX`
+trap "rm -rf $TEMPDIR" EXIT
+
+tools/config/generate_sample.sh -b ./ -p ${PROJECT_NAME} -o ${TEMPDIR}
+
+if ! diff -u ${TEMPDIR}/${CFGFILE_NAME} ${CFGFILE}
 then
-    echo "E: tempest.conf.sample is not up to date, please run:"
-    echo "tools/generate_sample.sh"
-    exit 42
+   echo "${0##*/}: ${PROJECT_NAME}.conf.sample is not up to date."
+   echo "${0##*/}: Please run ${0%%${0##*/}}generate_sample.sh."
+   exit 1
 fi
diff --git a/tools/config/generate_sample.sh b/tools/config/generate_sample.sh
index 607fecb..20ddfbb 100755
--- a/tools/config/generate_sample.sh
+++ b/tools/config/generate_sample.sh
@@ -4,8 +4,8 @@
     echo "Try \`${0##*/} --help' for more information." >&2
 }
 
-PARSED_OPTIONS=$(getopt -n "${0##*/}" -o hb:p:o: \
-                 --long help,base-dir:,package-name:,output-dir: -- "$@")
+PARSED_OPTIONS=$(getopt -n "${0##*/}" -o hb:p:m:l:o: \
+                 --long help,base-dir:,package-name:,output-dir:,module:,library: -- "$@")
 
 if [ $? != 0 ] ; then print_hint ; exit 1 ; fi
 
@@ -21,6 +21,8 @@
             echo "-b, --base-dir=DIR        project base directory"
             echo "-p, --package-name=NAME   project package name"
             echo "-o, --output-dir=DIR      file output directory"
+            echo "-m, --module=MOD          extra python module to interrogate for options"
+            echo "-l, --library=LIB         extra library that registers options for discovery"
             exit 0
             ;;
         -b|--base-dir)
@@ -38,6 +40,16 @@
             OUTPUTDIR=`echo $1 | sed -e 's/\/*$//g'`
             shift
             ;;
+        -m|--module)
+            shift
+            MODULES="$MODULES -m $1"
+            shift
+            ;;
+        -l|--library)
+            shift
+            LIBRARIES="$LIBRARIES -l $1"
+            shift
+            ;;
         --)
             break
             ;;
@@ -53,7 +65,7 @@
     BASEDIR=$(cd "$BASEDIR" && pwd)
 fi
 
-PACKAGENAME=${PACKAGENAME:-${BASEDIR##*/}}
+PACKAGENAME=${PACKAGENAME:-$(python setup.py --name)}
 TARGETDIR=$BASEDIR/$PACKAGENAME
 if ! [ -d $TARGETDIR ]
 then
@@ -77,12 +89,20 @@
 FILES=$(find $TARGETDIR -type f -name "*.py" ! -path "*/tests/*" \
         -exec grep -l "Opt(" {} + | sed -e "s/^$BASEDIRESC\///g" | sort -u)
 
-EXTRA_MODULES_FILE="`dirname $0`/oslo.config.generator.rc"
-if test -r "$EXTRA_MODULES_FILE"
+RC_FILE="`dirname $0`/oslo.config.generator.rc"
+if test -r "$RC_FILE"
 then
-    source "$EXTRA_MODULES_FILE"
+    source "$RC_FILE"
 fi
 
+for mod in ${TEMPEST_CONFIG_GENERATOR_EXTRA_MODULES}; do
+    MODULES="$MODULES -m $mod"
+done
+
+for lib in ${TEMPEST_CONFIG_GENERATOR_EXTRA_LIBRARIES}; do
+    LIBRARIES="$LIBRARIES -l $lib"
+done
+
 export EVENTLET_NO_GREENDNS=yes
 
 OS_VARS=$(set | sed -n '/^OS_/s/=[^=]*$//gp' | xargs)
@@ -90,7 +110,7 @@
 DEFAULT_MODULEPATH=tempest.openstack.common.config.generator
 MODULEPATH=${MODULEPATH:-$DEFAULT_MODULEPATH}
 OUTPUTFILE=$OUTPUTDIR/$PACKAGENAME.conf.sample
-python -m $MODULEPATH $FILES > $OUTPUTFILE
+python -m $MODULEPATH $MODULES $LIBRARIES $FILES > $OUTPUTFILE
 
 # Hook to allow projects to append custom config file snippets
 CONCAT_FILES=$(ls $BASEDIR/tools/config/*.conf.sample 2>/dev/null)
diff --git a/tools/verify_tempest_config.py b/tools/verify_tempest_config.py
index 4be812c..aa92c0b 100755
--- a/tools/verify_tempest_config.py
+++ b/tools/verify_tempest_config.py
@@ -63,6 +63,7 @@
         'nova_v3': os.extensions_v3_client,
         'cinder': os.volumes_extension_client,
         'neutron': os.network_client,
+        'swift': os.account_client,
     }
     if service not in extensions_client:
         print('No tempest extensions client for %s' % service)
@@ -76,6 +77,7 @@
         'nova_v3': CONF.compute_feature_enabled.api_v3_extensions,
         'cinder': CONF.volume_feature_enabled.api_extensions,
         'neutron': CONF.network_feature_enabled.api_extensions,
+        'swift': CONF.object_storage_feature_enabled.discoverable_apis,
     }
     if service not in extensions_options:
         print('No supported extensions list option for %s' % service)
@@ -93,6 +95,10 @@
         # instead of name.
         if service == 'neutron':
             extensions = map(lambda x: x['alias'], resp['extensions'])
+        elif service == 'swift':
+            # Remove Swift general information from extensions list
+            resp.pop('swift')
+            extensions = resp.keys()
         else:
             extensions = map(lambda x: x['name'], resp['extensions'])
 
@@ -132,21 +138,63 @@
                           "enabled extensions" % (service, extension))
 
 
-def check_service_availability(service):
-    if service == 'nova_v3':
-        service = 'nova'
-    return getattr(CONF.service_available, service)
+def check_service_availability(os):
+    services = []
+    avail_services = []
+    codename_match = {
+        'volume': 'cinder',
+        'network': 'neutron',
+        'image': 'glance',
+        'object_storage': 'swift',
+        'compute': 'nova',
+        'orchestration': 'heat',
+        'metering': 'ceilometer',
+        'telemetry': 'ceilometer',
+        'data_processing': 'savanna',
+        'baremetal': 'ironic',
+        'identity': 'keystone'
+
+    }
+    # Get catalog list for endpoints to use for validation
+    __, endpoints = os.endpoints_client.list_endpoints()
+    for endpoint in endpoints:
+        __, service = os.service_client.get_service(endpoint['service_id'])
+        services.append(service['type'])
+    # Pull all catalog types from config file and compare against endpoint list
+    for cfgname in dir(CONF._config):
+        cfg = getattr(CONF, cfgname)
+        catalog_type = getattr(cfg, 'catalog_type', None)
+        if not catalog_type:
+            continue
+        else:
+            if cfgname == 'identity':
+                # Keystone is a required service for tempest
+                continue
+            if catalog_type not in services:
+                if getattr(CONF.service_available, codename_match[cfgname]):
+                    print('Endpoint type %s not found either disable service '
+                          '%s or fix the catalog_type in the config file' % (
+                          catalog_type, codename_match[cfgname]))
+            else:
+                if not getattr(CONF.service_available,
+                               codename_match[cfgname]):
+                    print('Endpoint type %s is available, service %s should be'
+                          ' set as available in the config file.' % (
+                          catalog_type, codename_match[cfgname]))
+                else:
+                    avail_services.append(codename_match[cfgname])
+    return avail_services
 
 
 def main(argv):
     print('Running config verification...')
     os = clients.ComputeAdminManager(interface='json')
+    services = check_service_availability(os)
     results = {}
-    for service in ['nova', 'nova_v3', 'cinder', 'neutron']:
-        # TODO(mtreinish) make this a keystone endpoint check for available
-        # services
-        if not check_service_availability(service):
-            print("%s is not available" % service)
+    for service in ['nova', 'nova_v3', 'cinder', 'neutron', 'swift']:
+        if service == 'nova_v3' and 'nova' not in services:
+            continue
+        elif service not in services:
             continue
         results = verify_extensions(os, service, results)
     verify_glance_api_versions(os)
