diff --git a/HACKING.rst b/HACKING.rst
index 607682b..81a7c2c 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -13,6 +13,7 @@
 - [T104] Scenario tests require a services decorator
 - [T105] Tests cannot use setUpClass/tearDownClass
 - [T106] vim configuration should not be kept in source files.
+- [T107] Check that a service tag isn't in the module path
 - [N322] Method's default argument shouldn't be mutable
 
 Test Data/Configuration
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 0eeb738..bc4198f 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -779,6 +779,10 @@
 # value)
 #dns_servers = 8.8.8.8,8.8.4.4
 
+# vnic_type to use when Launching instances with pre-configured ports.
+# Supported ports are: ['normal','direct','macvtap'] (string value)
+#port_vnic_type = <None>
+
 
 [network-feature-enabled]
 
diff --git a/requirements.txt b/requirements.txt
index 94c6fb0..ebb23c3 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,7 +11,7 @@
 netaddr>=0.7.12
 python-ceilometerclient>=1.0.6
 python-glanceclient>=0.15.0
-python-keystoneclient>=1.0.0
+python-keystoneclient>=1.1.0
 python-novaclient>=2.18.0
 python-neutronclient>=2.3.6,<3
 python-cinderclient>=1.1.0
@@ -25,4 +25,4 @@
 iso8601>=0.1.9
 fixtures>=0.3.14
 testscenarios>=0.4
-tempest-lib>=0.1.0
+tempest-lib>=0.2.0
diff --git a/tempest/api/baremetal/admin/base.py b/tempest/api/baremetal/admin/base.py
index 3b12b8e..c93dfb8 100644
--- a/tempest/api/baremetal/admin/base.py
+++ b/tempest/api/baremetal/admin/base.py
@@ -11,11 +11,11 @@
 #    under the License.
 
 import functools
+from tempest_lib import exceptions as lib_exc
 
 from tempest import clients
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions as exc
 from tempest import test
 
 CONF = config.CONF
@@ -53,9 +53,8 @@
     """Base class for Baremetal API tests."""
 
     @classmethod
-    def resource_setup(cls):
-        super(BaseBaremetalTest, cls).resource_setup()
-
+    def skip_checks(cls):
+        super(BaseBaremetalTest, cls).skip_checks()
         if not CONF.service_available.ironic:
             skip_msg = ('%s skipped as Ironic is not available' % cls.__name__)
             raise cls.skipException(skip_msg)
@@ -65,10 +64,22 @@
                         'testing.' %
                         (cls.__name__, CONF.baremetal.driver))
             raise cls.skipException(skip_msg)
-        cls.driver = CONF.baremetal.driver
 
-        mgr = clients.AdminManager()
-        cls.client = mgr.baremetal_client
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseBaremetalTest, cls).setup_credentials()
+        cls.mgr = clients.AdminManager()
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseBaremetalTest, cls).setup_clients()
+        cls.client = cls.mgr.baremetal_client
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaseBaremetalTest, cls).resource_setup()
+
+        cls.driver = CONF.baremetal.driver
         cls.power_timeout = CONF.baremetal.power_timeout
         cls.created_objects = {}
         for resource in RESOURCE_TYPES:
@@ -83,7 +94,7 @@
                 uuids = cls.created_objects[resource]
                 delete_method = getattr(cls.client, 'delete_%s' % resource)
                 for u in uuids:
-                    delete_method(u, ignore_errors=exc.NotFound)
+                    delete_method(u, ignore_errors=lib_exc.NotFound)
         finally:
             super(BaseBaremetalTest, cls).resource_cleanup()
 
@@ -104,21 +115,22 @@
 
     @classmethod
     @creates('node')
-    def create_node(cls, chassis_id, cpu_arch='x86', cpu_num=8, storage=1024,
-                    memory=4096):
+    def create_node(cls, chassis_id, cpu_arch='x86', cpus=8, local_gb=10,
+                    memory_mb=4096):
         """
         Wrapper utility for creating test baremetal nodes.
 
         :param cpu_arch: CPU architecture of the node. Default: x86.
-        :param cpu_num: Number of CPUs. Default: 8.
-        :param storage: Disk size. Default: 1024.
-        :param memory: Available RAM. Default: 4096.
+        :param cpus: Number of CPUs. Default: 8.
+        :param local_gb: Disk size. Default: 10.
+        :param memory_mb: Available RAM. Default: 4096.
         :return: Created node.
 
         """
         resp, body = cls.client.create_node(chassis_id, cpu_arch=cpu_arch,
-                                            cpu_num=cpu_num, storage=storage,
-                                            memory=memory, driver=cls.driver)
+                                            cpus=cpus, local_gb=local_gb,
+                                            memory_mb=memory_mb,
+                                            driver=cls.driver)
 
         return resp, body
 
diff --git a/tempest/api/baremetal/admin/test_chassis.py b/tempest/api/baremetal/admin/test_chassis.py
index 6f83412..1cf22ae 100644
--- a/tempest/api/baremetal/admin/test_chassis.py
+++ b/tempest/api/baremetal/admin/test_chassis.py
@@ -11,9 +11,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.baremetal.admin import base
 from tempest.common.utils import data_utils
-from tempest import exceptions as exc
 from tempest import test
 
 
@@ -63,7 +64,7 @@
         uuid = body['uuid']
 
         self.delete_chassis(uuid)
-        self.assertRaises(exc.NotFound, self.client.show_chassis, uuid)
+        self.assertRaises(lib_exc.NotFound, self.client.show_chassis, uuid)
 
     @test.attr(type='smoke')
     def test_update_chassis(self):
diff --git a/tempest/api/baremetal/admin/test_nodes.py b/tempest/api/baremetal/admin/test_nodes.py
index 41c12c6..1919223 100644
--- a/tempest/api/baremetal/admin/test_nodes.py
+++ b/tempest/api/baremetal/admin/test_nodes.py
@@ -11,11 +11,11 @@
 #    under the License.
 
 import six
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.baremetal.admin import base
 from tempest.common.utils import data_utils
 from tempest.common import waiters
-from tempest import exceptions as exc
 from tempest import test
 
 
@@ -49,9 +49,9 @@
     @test.attr(type='smoke')
     def test_create_node(self):
         params = {'cpu_arch': 'x86_64',
-                  'cpu_num': '12',
-                  'storage': '10240',
-                  'memory': '1024'}
+                  'cpus': '12',
+                  'local_gb': '10',
+                  'memory_mb': '1024'}
 
         _, body = self.create_node(self.chassis['uuid'], **params)
         self._assertExpected(params, body['properties'])
@@ -62,7 +62,8 @@
 
         self.delete_node(node['uuid'])
 
-        self.assertRaises(exc.NotFound, self.client.show_node, node['uuid'])
+        self.assertRaises(lib_exc.NotFound, self.client.show_node,
+                          node['uuid'])
 
     @test.attr(type='smoke')
     def test_show_node(self):
@@ -106,16 +107,16 @@
     @test.attr(type='smoke')
     def test_update_node(self):
         props = {'cpu_arch': 'x86_64',
-                 'cpu_num': '12',
-                 'storage': '10',
-                 'memory': '128'}
+                 'cpus': '12',
+                 'local_gb': '10',
+                 'memory_mb': '128'}
 
         _, node = self.create_node(self.chassis['uuid'], **props)
 
         new_p = {'cpu_arch': 'x86',
-                 'cpu_num': '1',
-                 'storage': '10000',
-                 'memory': '12300'}
+                 'cpus': '1',
+                 'local_gb': '10000',
+                 'memory_mb': '12300'}
 
         _, body = self.client.update_node(node['uuid'], properties=new_p)
         _, node = self.client.show_node(node['uuid'])
diff --git a/tempest/api/baremetal/admin/test_ports.py b/tempest/api/baremetal/admin/test_ports.py
index 89447e0..0076dee 100644
--- a/tempest/api/baremetal/admin/test_ports.py
+++ b/tempest/api/baremetal/admin/test_ports.py
@@ -11,10 +11,10 @@
 #    under the License.
 
 from tempest_lib import decorators
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.baremetal.admin import base
 from tempest.common.utils import data_utils
-from tempest import exceptions as exc
 from tempest import test
 
 
@@ -81,7 +81,8 @@
 
         self.delete_port(port['uuid'])
 
-        self.assertRaises(exc.NotFound, self.client.show_port, port['uuid'])
+        self.assertRaises(lib_exc.NotFound, self.client.show_port,
+                          port['uuid'])
 
     @test.attr(type='smoke')
     def test_show_port(self):
diff --git a/tempest/api/baremetal/admin/test_ports_negative.py b/tempest/api/baremetal/admin/test_ports_negative.py
index 8080eb6..8dbdedf 100644
--- a/tempest/api/baremetal/admin/test_ports_negative.py
+++ b/tempest/api/baremetal/admin/test_ports_negative.py
@@ -10,9 +10,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.baremetal.admin import base
 from tempest.common.utils import data_utils
-from tempest import exceptions as exc
 from tempest import test
 
 
@@ -30,29 +31,29 @@
         node_id = self.node['uuid']
         address = 'malformed:mac'
 
-        self.assertRaises(exc.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_port, node_id=node_id, address=address)
 
     @test.attr(type=['negative', 'smoke'])
     def test_create_port_nonexsistent_node_id(self):
         node_id = str(data_utils.rand_uuid())
         address = data_utils.rand_mac_address()
-        self.assertRaises(exc.BadRequest, self.create_port, node_id=node_id,
-                          address=address)
+        self.assertRaises(lib_exc.BadRequest, self.create_port,
+                          node_id=node_id, address=address)
 
     @test.attr(type=['negative', 'smoke'])
     def test_show_port_malformed_uuid(self):
-        self.assertRaises(exc.BadRequest, self.client.show_port,
+        self.assertRaises(lib_exc.BadRequest, self.client.show_port,
                           'malformed:uuid')
 
     @test.attr(type=['negative', 'smoke'])
     def test_show_port_nonexistent_uuid(self):
-        self.assertRaises(exc.NotFound, self.client.show_port,
+        self.assertRaises(lib_exc.NotFound, self.client.show_port,
                           data_utils.rand_uuid())
 
     @test.attr(type=['negative', 'smoke'])
     def test_show_port_by_mac_not_allowed(self):
-        self.assertRaises(exc.BadRequest, self.client.show_port,
+        self.assertRaises(lib_exc.BadRequest, self.client.show_port,
                           data_utils.rand_mac_address())
 
     @test.attr(type=['negative', 'smoke'])
@@ -62,22 +63,22 @@
         uuid = data_utils.rand_uuid()
 
         self.create_port(node_id=node_id, address=address, uuid=uuid)
-        self.assertRaises(exc.Conflict, self.create_port, node_id=node_id,
+        self.assertRaises(lib_exc.Conflict, self.create_port, node_id=node_id,
                           address=address, uuid=uuid)
 
     @test.attr(type=['negative', 'smoke'])
     def test_create_port_no_mandatory_field_node_id(self):
         address = data_utils.rand_mac_address()
 
-        self.assertRaises(exc.BadRequest, self.create_port, node_id=None,
+        self.assertRaises(lib_exc.BadRequest, self.create_port, node_id=None,
                           address=address)
 
     @test.attr(type=['negative', 'smoke'])
     def test_create_port_no_mandatory_field_mac(self):
         node_id = self.node['uuid']
 
-        self.assertRaises(exc.BadRequest, self.create_port, node_id=node_id,
-                          address=None)
+        self.assertRaises(lib_exc.BadRequest, self.create_port,
+                          node_id=node_id, address=None)
 
     @test.attr(type=['negative', 'smoke'])
     def test_create_port_malformed_port_uuid(self):
@@ -85,13 +86,13 @@
         address = data_utils.rand_mac_address()
         uuid = 'malformed:uuid'
 
-        self.assertRaises(exc.BadRequest, self.create_port, node_id=node_id,
-                          address=address, uuid=uuid)
+        self.assertRaises(lib_exc.BadRequest, self.create_port,
+                          node_id=node_id, address=address, uuid=uuid)
 
     @test.attr(type=['negative', 'smoke'])
     def test_create_port_malformed_node_id(self):
         address = data_utils.rand_mac_address()
-        self.assertRaises(exc.BadRequest, self.create_port,
+        self.assertRaises(lib_exc.BadRequest, self.create_port,
                           node_id='malformed:nodeid', address=address)
 
     @test.attr(type=['negative', 'smoke'])
@@ -99,7 +100,7 @@
         node_id = self.node['uuid']
         address = data_utils.rand_mac_address()
         self.create_port(node_id=node_id, address=address)
-        self.assertRaises(exc.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.create_port, node_id=node_id,
                           address=address)
 
@@ -115,7 +116,7 @@
                   'op': 'replace',
                   'value': 'new-value'}]
 
-        self.assertRaises(exc.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_port, address,
                           patch)
 
@@ -134,7 +135,7 @@
         patch = [{'path': '/extra/key',
                   'op': 'replace',
                   'value': 'new-value'}]
-        self.assertRaises(exc.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.update_port, port_id, patch)
 
     @test.attr(type=['negative', 'smoke'])
@@ -145,7 +146,7 @@
         self.create_port(node_id=node_id, address=address)
 
         new_address = data_utils.rand_mac_address()
-        self.assertRaises(exc.BadRequest, self.client.update_port,
+        self.assertRaises(lib_exc.BadRequest, self.client.update_port,
                           uuid='malformed:uuid',
                           patch=[{'path': '/address', 'op': 'replace',
                                   'value': new_address}])
@@ -158,7 +159,7 @@
         _, port = self.create_port(node_id=node_id, address=address)
         port_id = port['uuid']
 
-        self.assertRaises(exc.BadRequest, self.client.update_port, port_id,
+        self.assertRaises(lib_exc.BadRequest, self.client.update_port, port_id,
                           [{'path': '/nonexistent', ' op': 'add',
                             'value': 'value'}])
 
@@ -173,7 +174,7 @@
         patch = [{'path': '/node_uuid',
                   'op': 'replace',
                   'value': 'malformed:node_uuid'}]
-        self.assertRaises(exc.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_port, port_id, patch)
 
     @test.attr(type=['negative', 'smoke'])
@@ -190,7 +191,7 @@
         patch = [{'path': '/address',
                   'op': 'replace',
                   'value': address1}]
-        self.assertRaises(exc.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.update_port, port_id, patch)
 
     @test.attr(type=['negative', 'smoke'])
@@ -204,7 +205,7 @@
         patch = [{'path': '/node_uuid',
                   'op': 'replace',
                   'value': data_utils.rand_uuid()}]
-        self.assertRaises(exc.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_port, port_id, patch)
 
     @test.attr(type=['negative', 'smoke'])
@@ -219,7 +220,7 @@
                   'op': 'replace',
                   'value': 'malformed:mac'}]
 
-        self.assertRaises(exc.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_port, port_id, patch)
 
     @test.attr(type=['negative', 'smoke'])
@@ -232,7 +233,7 @@
 
         patch = [{'path': '/nonexistent', ' op': 'replace', 'value': 'value'}]
 
-        self.assertRaises(exc.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_port, port_id, patch)
 
     @test.attr(type=['negative', 'smoke'])
@@ -243,7 +244,7 @@
         _, port = self.create_port(node_id=node_id, address=address)
         port_id = port['uuid']
 
-        self.assertRaises(exc.BadRequest, self.client.update_port, port_id,
+        self.assertRaises(lib_exc.BadRequest, self.client.update_port, port_id,
                           [{'path': '/address', 'op': 'remove'}])
 
     @test.attr(type=['negative', 'smoke'])
@@ -254,7 +255,7 @@
         _, port = self.create_port(node_id=node_id, address=address)
         port_id = port['uuid']
 
-        self.assertRaises(exc.BadRequest, self.client.update_port, port_id,
+        self.assertRaises(lib_exc.BadRequest, self.client.update_port, port_id,
                           [{'path': '/uuid', 'op': 'remove'}])
 
     @test.attr(type=['negative', 'smoke'])
@@ -265,7 +266,7 @@
         _, port = self.create_port(node_id=node_id, address=address)
         port_id = port['uuid']
 
-        self.assertRaises(exc.BadRequest, self.client.update_port, port_id,
+        self.assertRaises(lib_exc.BadRequest, self.client.update_port, port_id,
                           [{'path': '/nonexistent', 'op': 'remove'}])
 
     @test.attr(type=['negative', 'smoke'])
@@ -274,7 +275,7 @@
         address = data_utils.rand_mac_address()
 
         self.create_port(node_id=node_id, address=address)
-        self.assertRaises(exc.BadRequest, self.client.delete_port, address)
+        self.assertRaises(lib_exc.BadRequest, self.client.delete_port, address)
 
     @test.attr(type=['negative', 'smoke'])
     def test_update_port_mixed_ops_integrity(self):
@@ -304,7 +305,7 @@
                   'op': 'replace',
                   'value': 'value'}]
 
-        self.assertRaises(exc.BadRequest, self.client.update_port, port_id,
+        self.assertRaises(lib_exc.BadRequest, self.client.update_port, port_id,
                           patch)
 
         # patch should not be applied
diff --git a/tempest/api/compute/admin/test_agents.py b/tempest/api/compute/admin/test_agents.py
index 425ce13..b28b9e0 100644
--- a/tempest/api/compute/admin/test_agents.py
+++ b/tempest/api/compute/admin/test_agents.py
@@ -12,9 +12,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest.openstack.common import log
 from tempest import test
 
@@ -43,7 +44,7 @@
     def tearDown(self):
         try:
             self.client.delete_agent(self.agent_id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             pass
         except Exception:
             LOG.exception('Exception raised deleting agent %s', self.agent_id)
diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py
index a866ede..2bf2b82 100644
--- a/tempest/api/compute/admin/test_aggregates.py
+++ b/tempest/api/compute/admin/test_aggregates.py
@@ -13,10 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common import tempest_fixtures as fixtures
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -45,7 +46,7 @@
         try:
             self.client.delete_aggregate(aggregate_id)
         # if aggregate not found, it depict it was deleted in the test
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             pass
 
     @test.attr(type='gate')
@@ -203,8 +204,8 @@
         self.addCleanup(self.client.remove_host, aggregate['id'], self.host)
         server_name = data_utils.rand_name('test_server_')
         admin_servers_client = self.os_adm.servers_client
-        resp, server = self.create_test_server(name=server_name,
-                                               availability_zone=az_name,
-                                               wait_until='ACTIVE')
-        resp, body = admin_servers_client.get_server(server['id'])
+        server = self.create_test_server(name=server_name,
+                                         availability_zone=az_name,
+                                         wait_until='ACTIVE')
+        body = admin_servers_client.get_server(server['id'])
         self.assertEqual(self.host, body[self._host_key])
diff --git a/tempest/api/compute/admin/test_aggregates_negative.py b/tempest/api/compute/admin/test_aggregates_negative.py
index a450e5d..fd44f7f 100644
--- a/tempest/api/compute/admin/test_aggregates_negative.py
+++ b/tempest/api/compute/admin/test_aggregates_negative.py
@@ -13,10 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common import tempest_fixtures as fixtures
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -43,14 +44,14 @@
     def test_aggregate_create_as_user(self):
         # Regular user is not allowed to create an aggregate.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.user_client.create_aggregate,
                           name=aggregate_name)
 
     @test.attr(type=['negative', 'gate'])
     def test_aggregate_create_aggregate_name_length_less_than_1(self):
         # the length of aggregate name should >= 1 and <=255
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_aggregate,
                           name='')
 
@@ -58,7 +59,7 @@
     def test_aggregate_create_aggregate_name_length_exceeds_255(self):
         # the length of aggregate name should >= 1 and <=255
         aggregate_name = 'a' * 256
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_aggregate,
                           name=aggregate_name)
 
@@ -69,7 +70,7 @@
         aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.create_aggregate,
                           name=aggregate_name)
 
@@ -80,14 +81,14 @@
         aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.user_client.delete_aggregate,
                           aggregate['id'])
 
     @test.attr(type=['negative', 'gate'])
     def test_aggregate_list_as_user(self):
         # Regular user is not allowed to list aggregates.
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.user_client.list_aggregates)
 
     @test.attr(type=['negative', 'gate'])
@@ -97,20 +98,20 @@
         aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.user_client.get_aggregate,
                           aggregate['id'])
 
     @test.attr(type=['negative', 'gate'])
     def test_aggregate_delete_with_invalid_id(self):
         # Delete an aggregate with invalid id should raise exceptions.
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.delete_aggregate, -1)
 
     @test.attr(type=['negative', 'gate'])
     def test_aggregate_get_details_with_invalid_id(self):
         # Get aggregate details with invalid id should raise exceptions.
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.get_aggregate, -1)
 
     @test.attr(type=['negative', 'gate'])
@@ -127,7 +128,7 @@
         aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        self.assertRaises(exceptions.NotFound, self.client.add_host,
+        self.assertRaises(lib_exc.NotFound, self.client.add_host,
                           aggregate['id'], non_exist_host)
 
     @test.attr(type=['negative', 'gate'])
@@ -137,7 +138,7 @@
         aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.user_client.add_host,
                           aggregate['id'], self.host)
 
@@ -151,7 +152,7 @@
         self.client.add_host(aggregate['id'], self.host)
         self.addCleanup(self.client.remove_host, aggregate['id'], self.host)
 
-        self.assertRaises(exceptions.Conflict, self.client.add_host,
+        self.assertRaises(lib_exc.Conflict, self.client.add_host,
                           aggregate['id'], self.host)
 
     @test.attr(type=['negative', 'gate'])
@@ -164,7 +165,7 @@
         self.client.add_host(aggregate['id'], self.host)
         self.addCleanup(self.client.remove_host, aggregate['id'], self.host)
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.user_client.remove_host,
                           aggregate['id'], self.host)
 
@@ -175,5 +176,5 @@
         aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        self.assertRaises(exceptions.NotFound, self.client.remove_host,
+        self.assertRaises(lib_exc.NotFound, self.client.remove_host,
                           aggregate['id'], non_exist_host)
diff --git a/tempest/api/compute/admin/test_availability_zone.py b/tempest/api/compute/admin/test_availability_zone.py
index e88fecb..909f0a5 100644
--- a/tempest/api/compute/admin/test_availability_zone.py
+++ b/tempest/api/compute/admin/test_availability_zone.py
@@ -31,14 +31,11 @@
     @test.attr(type='gate')
     def test_get_availability_zone_list(self):
         # List of availability zone
-        resp, availability_zone = self.client.get_availability_zone_list()
-        self.assertEqual(200, resp.status)
+        availability_zone = self.client.get_availability_zone_list()
         self.assertTrue(len(availability_zone) > 0)
 
     @test.attr(type='gate')
     def test_get_availability_zone_list_detail(self):
         # List of availability zones and available services
-        resp, availability_zone = \
-            self.client.get_availability_zone_list_detail()
-        self.assertEqual(200, resp.status)
+        availability_zone = self.client.get_availability_zone_list_detail()
         self.assertTrue(len(availability_zone) > 0)
diff --git a/tempest/api/compute/admin/test_availability_zone_negative.py b/tempest/api/compute/admin/test_availability_zone_negative.py
index d062b0c..546aa3b 100644
--- a/tempest/api/compute/admin/test_availability_zone_negative.py
+++ b/tempest/api/compute/admin/test_availability_zone_negative.py
@@ -12,8 +12,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -33,5 +34,5 @@
         # List of availability zones and available services with
         # non-administrator user
         self.assertRaises(
-            exceptions.Unauthorized,
+            lib_exc.Unauthorized,
             self.non_adm_client.get_availability_zone_list_detail)
diff --git a/tempest/api/compute/admin/test_baremetal_nodes.py b/tempest/api/compute/admin/test_baremetal_nodes.py
new file mode 100644
index 0000000..d894de6
--- /dev/null
+++ b/tempest/api/compute/admin/test_baremetal_nodes.py
@@ -0,0 +1,43 @@
+# Copyright 2015 NEC Corporation.  All rights reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.compute import base
+from tempest import config
+from tempest import test
+
+CONF = config.CONF
+
+
+class BaremetalNodesAdminTestJSON(base.BaseV2ComputeAdminTest):
+    """
+    Tests Baremetal API
+    """
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaremetalNodesAdminTestJSON, cls).resource_setup()
+        if not CONF.service_available.ironic:
+            skip_msg = ('%s skipped as Ironic is not available' % cls.__name__)
+            raise cls.skipException(skip_msg)
+        cls.client = cls.os_adm.baremetal_nodes_client
+
+    @test.attr(type='smoke')
+    def test_list_baremetal_nodes(self):
+        # List all baremetal nodes.
+        baremetal_nodes = self.client.list_baremetal_nodes()
+        self.assertNotEmpty(baremetal_nodes, "No baremetal nodes found.")
+
+        for node in baremetal_nodes:
+            baremetal_node = self.client.get_baremetal_node(node['id'])
+            self.assertEqual(node['id'], baremetal_node['id'])
diff --git a/tempest/api/compute/admin/test_fixed_ips.py b/tempest/api/compute/admin/test_fixed_ips.py
index d1d13a0..078fe08 100644
--- a/tempest/api/compute/admin/test_fixed_ips.py
+++ b/tempest/api/compute/admin/test_fixed_ips.py
@@ -29,8 +29,8 @@
             msg = ("%s skipped as neutron is available" % cls.__name__)
             raise cls.skipException(msg)
         cls.client = cls.os_adm.fixed_ips_client
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
-        resp, server = cls.servers_client.get_server(server['id'])
+        server = cls.create_test_server(wait_until='ACTIVE')
+        server = cls.servers_client.get_server(server['id'])
         for ip_set in server['addresses']:
             for ip in server['addresses'][ip_set]:
                 if ip['OS-EXT-IPS:type'] == 'fixed':
@@ -42,19 +42,17 @@
     @test.attr(type='gate')
     @test.services('network')
     def test_list_fixed_ip_details(self):
-        resp, fixed_ip = self.client.get_fixed_ip_details(self.ip)
+        fixed_ip = self.client.get_fixed_ip_details(self.ip)
         self.assertEqual(fixed_ip['address'], self.ip)
 
     @test.attr(type='gate')
     @test.services('network')
     def test_set_reserve(self):
         body = {"reserve": "None"}
-        resp, body = self.client.reserve_fixed_ip(self.ip, body)
-        self.assertEqual(resp.status, 202)
+        self.client.reserve_fixed_ip(self.ip, body)
 
     @test.attr(type='gate')
     @test.services('network')
     def test_set_unreserve(self):
         body = {"unreserve": "None"}
-        resp, body = self.client.reserve_fixed_ip(self.ip, body)
-        self.assertEqual(resp.status, 202)
+        self.client.reserve_fixed_ip(self.ip, body)
diff --git a/tempest/api/compute/admin/test_fixed_ips_negative.py b/tempest/api/compute/admin/test_fixed_ips_negative.py
index e7022db..f717291 100644
--- a/tempest/api/compute/admin/test_fixed_ips_negative.py
+++ b/tempest/api/compute/admin/test_fixed_ips_negative.py
@@ -12,9 +12,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -30,8 +31,8 @@
             raise cls.skipException(msg)
         cls.client = cls.os_adm.fixed_ips_client
         cls.non_admin_client = cls.fixed_ips_client
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
-        resp, server = cls.servers_client.get_server(server['id'])
+        server = cls.create_test_server(wait_until='ACTIVE')
+        server = cls.servers_client.get_server(server['id'])
         for ip_set in server['addresses']:
             for ip in server['addresses'][ip_set]:
                 if ip['OS-EXT-IPS:type'] == 'fixed':
@@ -43,14 +44,14 @@
     @test.attr(type=['negative', 'gate'])
     @test.services('network')
     def test_list_fixed_ip_details_with_non_admin_user(self):
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.get_fixed_ip_details, self.ip)
 
     @test.attr(type=['negative', 'gate'])
     @test.services('network')
     def test_set_reserve_with_non_admin_user(self):
         body = {"reserve": "None"}
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.reserve_fixed_ip,
                           self.ip, body)
 
@@ -58,7 +59,7 @@
     @test.services('network')
     def test_set_unreserve_with_non_admin_user(self):
         body = {"unreserve": "None"}
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.reserve_fixed_ip,
                           self.ip, body)
 
@@ -71,7 +72,7 @@
         # NOTE(eliqiao): in Juno, the exception is NotFound, but in master, we
         # change the error code to BadRequest, both exceptions should be
         # accepted by tempest
-        self.assertRaises((exceptions.NotFound, exceptions.BadRequest),
+        self.assertRaises((lib_exc.NotFound, lib_exc.BadRequest),
                           self.client.reserve_fixed_ip,
                           "my.invalid.ip", body)
 
@@ -79,6 +80,6 @@
     @test.services('network')
     def test_fixed_ip_with_invalid_action(self):
         body = {"invalid_action": "None"}
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.reserve_fixed_ip,
                           self.ip, body)
diff --git a/tempest/api/compute/admin/test_flavors.py b/tempest/api/compute/admin/test_flavors.py
index 360bcf7..8d5c5e3 100644
--- a/tempest/api/compute/admin/test_flavors.py
+++ b/tempest/api/compute/admin/test_flavors.py
@@ -13,11 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 import uuid
 
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -210,7 +210,7 @@
         self.addCleanup(self.flavor_clean_up, flavor['id'])
 
         # Verify flavor is not used by other user
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.os.servers_client.create_server,
                           'test', self.image_ref, flavor['id'])
 
diff --git a/tempest/api/compute/admin/test_flavors_access_negative.py b/tempest/api/compute/admin/test_flavors_access_negative.py
index 4ba9eb2..5031432 100644
--- a/tempest/api/compute/admin/test_flavors_access_negative.py
+++ b/tempest/api/compute/admin/test_flavors_access_negative.py
@@ -13,11 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 import uuid
 
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -53,7 +53,7 @@
                                                new_flavor_id,
                                                is_public='True')
         self.addCleanup(self.client.delete_flavor, new_flavor['id'])
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.list_flavor_access,
                           new_flavor_id)
 
@@ -68,7 +68,7 @@
                                                new_flavor_id,
                                                is_public='False')
         self.addCleanup(self.client.delete_flavor, new_flavor['id'])
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.flavors_client.add_flavor_access,
                           new_flavor['id'],
                           self.tenant_id)
@@ -88,7 +88,7 @@
         self.client.add_flavor_access(new_flavor['id'], self.tenant_id)
         self.addCleanup(self.client.remove_flavor_access,
                         new_flavor['id'], self.tenant_id)
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.flavors_client.remove_flavor_access,
                           new_flavor['id'],
                           self.tenant_id)
@@ -112,7 +112,7 @@
 
         # An exception should be raised when adding flavor access to the same
         # tenant
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.add_flavor_access,
                           new_flavor['id'],
                           self.tenant_id)
@@ -130,7 +130,7 @@
         self.addCleanup(self.client.delete_flavor, new_flavor['id'])
 
         # An exception should be raised when flavor access is not found
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.remove_flavor_access,
                           new_flavor['id'],
                           str(uuid.uuid4()))
diff --git a/tempest/api/compute/admin/test_flavors_extra_specs_negative.py b/tempest/api/compute/admin/test_flavors_extra_specs_negative.py
index 2663e25..c22602a 100644
--- a/tempest/api/compute/admin/test_flavors_extra_specs_negative.py
+++ b/tempest/api/compute/admin/test_flavors_extra_specs_negative.py
@@ -14,9 +14,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -61,7 +62,7 @@
     def test_flavor_non_admin_set_keys(self):
         # Test to SET flavor extra spec as a user without admin privileges.
         specs = {"key1": "value1", "key2": "value2"}
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.flavors_client.set_flavor_extra_spec,
                           self.flavor['id'],
                           specs)
@@ -73,7 +74,7 @@
         body = self.client.set_flavor_extra_spec(
             self.flavor['id'], specs)
         self.assertEqual(body['key1'], 'value1')
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.flavors_client.
                           update_flavor_extra_spec,
                           self.flavor['id'],
@@ -85,7 +86,7 @@
         specs = {"key1": "value1", "key2": "value2"}
         self.client.set_flavor_extra_spec(self.flavor['id'], specs)
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.flavors_client.unset_flavor_extra_spec,
                           self.flavor['id'],
                           'key1')
@@ -93,14 +94,14 @@
     @test.attr(type=['negative', 'gate'])
     def test_flavor_unset_nonexistent_key(self):
         nonexistent_key = data_utils.rand_name('flavor_key')
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.unset_flavor_extra_spec,
                           self.flavor['id'],
                           nonexistent_key)
 
     @test.attr(type=['negative', 'gate'])
     def test_flavor_get_nonexistent_key(self):
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.flavors_client.get_flavor_extra_spec_with_key,
                           self.flavor['id'],
                           "nonexistent_key")
@@ -108,7 +109,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_flavor_update_mismatch_key(self):
         # the key will be updated should be match the key in the body
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_flavor_extra_spec,
                           self.flavor['id'],
                           "key2",
@@ -117,7 +118,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_flavor_update_more_key(self):
         # there should be just one item in the request body
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_flavor_extra_spec,
                           self.flavor['id'],
                           "key1",
diff --git a/tempest/api/compute/admin/test_flavors_negative.py b/tempest/api/compute/admin/test_flavors_negative.py
index 86125fb..d1060c5 100644
--- a/tempest/api/compute/admin/test_flavors_negative.py
+++ b/tempest/api/compute/admin/test_flavors_negative.py
@@ -15,11 +15,12 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.api_schema.request.compute.v2 import flavors
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 
@@ -88,7 +89,7 @@
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
         new_flavor_id = str(uuid.uuid4())
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.user_client.create_flavor,
                           flavor_name, self.ram, self.vcpus, self.disk,
                           new_flavor_id, ephemeral=self.ephemeral,
@@ -97,7 +98,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_delete_flavor_as_user(self):
         # only admin user can delete a flavor
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.user_client.delete_flavor,
                           self.flavor_ref_alt)
 
@@ -105,6 +106,5 @@
 @test.SimpleNegativeAutoTest
 class FlavorCreateNegativeTestJSON(base.BaseV2ComputeAdminTest,
                                    test.NegativeAutoTest):
-    _interface = 'json'
     _service = CONF.compute.catalog_type
     _schema = flavors.flavor_create
diff --git a/tempest/api/compute/admin/test_floating_ips_bulk.py b/tempest/api/compute/admin/test_floating_ips_bulk.py
index c1263ea..e01245e 100644
--- a/tempest/api/compute/admin/test_floating_ips_bulk.py
+++ b/tempest/api/compute/admin/test_floating_ips_bulk.py
@@ -40,7 +40,7 @@
     @classmethod
     def verify_unallocated_floating_ip_range(cls, ip_range):
         # Verify whether configure floating IP range is not already allocated.
-        _, body = cls.client.list_floating_ips_bulk()
+        body = cls.client.list_floating_ips_bulk()
         allocated_ips_list = map(lambda x: x['address'], body)
         for ip_addr in netaddr.IPNetwork(ip_range).iter_hosts():
             if str(ip_addr) in allocated_ips_list:
@@ -65,18 +65,14 @@
         # anywhere. Using the below mentioned interface which is not ever
         # expected to be used. Clean Up has been done for created IP range
         interface = 'eth0'
-        resp, body = self.client.create_floating_ips_bulk(self.ip_range,
-                                                          pool,
-                                                          interface)
-
-        self.assertEqual(200, resp.status)
+        body = self.client.create_floating_ips_bulk(self.ip_range,
+                                                    pool,
+                                                    interface)
         self.addCleanup(self._delete_floating_ips_bulk, self.ip_range)
         self.assertEqual(self.ip_range, body['ip_range'])
-        resp, ips_list = self.client.list_floating_ips_bulk()
-        self.assertEqual(200, resp.status)
+        ips_list = self.client.list_floating_ips_bulk()
         self.assertNotEqual(0, len(ips_list))
         for ip in netaddr.IPNetwork(self.ip_range).iter_hosts():
             self.assertIn(str(ip), map(lambda x: x['address'], ips_list))
-        resp, body = self.client.delete_floating_ips_bulk(self.ip_range)
-        self.assertEqual(200, resp.status)
-        self.assertEqual(self.ip_range, body)
+        body = self.client.delete_floating_ips_bulk(self.ip_range)
+        self.assertEqual(self.ip_range, body.data)
diff --git a/tempest/api/compute/admin/test_hosts_negative.py b/tempest/api/compute/admin/test_hosts_negative.py
index fc918a3..8d70c44 100644
--- a/tempest/api/compute/admin/test_hosts_negative.py
+++ b/tempest/api/compute/admin/test_hosts_negative.py
@@ -12,9 +12,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -38,20 +39,20 @@
 
     @test.attr(type=['negative', 'gate'])
     def test_list_hosts_with_non_admin_user(self):
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.list_hosts)
 
     @test.attr(type=['negative', 'gate'])
     def test_show_host_detail_with_nonexistent_hostname(self):
         nonexitent_hostname = data_utils.rand_name('rand_hostname')
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.show_host_detail, nonexitent_hostname)
 
     @test.attr(type=['negative', 'gate'])
     def test_show_host_detail_with_non_admin_user(self):
         hostname = self._get_host_name()
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.show_host_detail,
                           hostname)
 
@@ -59,7 +60,7 @@
     def test_update_host_with_non_admin_user(self):
         hostname = self._get_host_name()
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.update_host,
                           hostname,
                           status='enable',
@@ -70,7 +71,7 @@
         # only 'status' and 'maintenance_mode' are the valid params.
         hostname = self._get_host_name()
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_host,
                           hostname,
                           status='enable',
@@ -82,7 +83,7 @@
         # 'status' can only be 'enable' or 'disable'
         hostname = self._get_host_name()
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_host,
                           hostname,
                           status='invalid',
@@ -93,7 +94,7 @@
         # 'maintenance_mode' can only be 'enable' or 'disable'
         hostname = self._get_host_name()
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_host,
                           hostname,
                           status='enable',
@@ -104,7 +105,7 @@
         # 'status' or 'maintenance_mode' needed for host update
         hostname = self._get_host_name()
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_host,
                           hostname)
 
@@ -112,7 +113,7 @@
     def test_update_nonexistent_host(self):
         nonexitent_hostname = data_utils.rand_name('rand_hostname')
 
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.update_host,
                           nonexitent_hostname,
                           status='enable',
@@ -122,7 +123,7 @@
     def test_startup_nonexistent_host(self):
         nonexitent_hostname = data_utils.rand_name('rand_hostname')
 
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.startup_host,
                           nonexitent_hostname)
 
@@ -130,7 +131,7 @@
     def test_startup_host_with_non_admin_user(self):
         hostname = self._get_host_name()
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.startup_host,
                           hostname)
 
@@ -138,7 +139,7 @@
     def test_shutdown_nonexistent_host(self):
         nonexitent_hostname = data_utils.rand_name('rand_hostname')
 
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.shutdown_host,
                           nonexitent_hostname)
 
@@ -146,7 +147,7 @@
     def test_shutdown_host_with_non_admin_user(self):
         hostname = self._get_host_name()
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.shutdown_host,
                           hostname)
 
@@ -154,7 +155,7 @@
     def test_reboot_nonexistent_host(self):
         nonexitent_hostname = data_utils.rand_name('rand_hostname')
 
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.reboot_host,
                           nonexitent_hostname)
 
@@ -162,6 +163,6 @@
     def test_reboot_host_with_non_admin_user(self):
         hostname = self._get_host_name()
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.reboot_host,
                           hostname)
diff --git a/tempest/api/compute/admin/test_hypervisor_negative.py b/tempest/api/compute/admin/test_hypervisor_negative.py
index a137a61..a9c1cb1 100644
--- a/tempest/api/compute/admin/test_hypervisor_negative.py
+++ b/tempest/api/compute/admin/test_hypervisor_negative.py
@@ -13,11 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 import uuid
 
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -43,7 +43,7 @@
         nonexistent_hypervisor_id = str(uuid.uuid4())
 
         self.assertRaises(
-            exceptions.NotFound,
+            lib_exc.NotFound,
             self.client.get_hypervisor_show_details,
             nonexistent_hypervisor_id)
 
@@ -53,7 +53,7 @@
         self.assertTrue(len(hypers) > 0)
 
         self.assertRaises(
-            exceptions.Unauthorized,
+            lib_exc.Unauthorized,
             self.non_adm_client.get_hypervisor_show_details,
             hypers[0]['id'])
 
@@ -63,7 +63,7 @@
         self.assertTrue(len(hypers) > 0)
 
         self.assertRaises(
-            exceptions.Unauthorized,
+            lib_exc.Unauthorized,
             self.non_adm_client.get_hypervisor_servers,
             hypers[0]['id'])
 
@@ -72,14 +72,14 @@
         nonexistent_hypervisor_id = str(uuid.uuid4())
 
         self.assertRaises(
-            exceptions.NotFound,
+            lib_exc.NotFound,
             self.client.get_hypervisor_servers,
             nonexistent_hypervisor_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_get_hypervisor_stats_with_non_admin_user(self):
         self.assertRaises(
-            exceptions.Unauthorized,
+            lib_exc.Unauthorized,
             self.non_adm_client.get_hypervisor_stats)
 
     @test.attr(type=['negative', 'gate'])
@@ -87,7 +87,7 @@
         nonexistent_hypervisor_id = str(uuid.uuid4())
 
         self.assertRaises(
-            exceptions.NotFound,
+            lib_exc.NotFound,
             self.client.get_hypervisor_uptime,
             nonexistent_hypervisor_id)
 
@@ -97,7 +97,7 @@
         self.assertTrue(len(hypers) > 0)
 
         self.assertRaises(
-            exceptions.Unauthorized,
+            lib_exc.Unauthorized,
             self.non_adm_client.get_hypervisor_uptime,
             hypers[0]['id'])
 
@@ -105,14 +105,14 @@
     def test_get_hypervisor_list_with_non_admin_user(self):
         # List of hypervisor and available services with non admin user
         self.assertRaises(
-            exceptions.Unauthorized,
+            lib_exc.Unauthorized,
             self.non_adm_client.get_hypervisor_list)
 
     @test.attr(type=['negative', 'gate'])
     def test_get_hypervisor_list_details_with_non_admin_user(self):
         # List of hypervisor details and available services with non admin user
         self.assertRaises(
-            exceptions.Unauthorized,
+            lib_exc.Unauthorized,
             self.non_adm_client.get_hypervisor_list_details)
 
     @test.attr(type=['negative', 'gate'])
@@ -120,7 +120,7 @@
         nonexistent_hypervisor_name = data_utils.rand_name('test_hypervisor')
 
         self.assertRaises(
-            exceptions.NotFound,
+            lib_exc.NotFound,
             self.client.search_hypervisor,
             nonexistent_hypervisor_name)
 
@@ -130,6 +130,6 @@
         self.assertTrue(len(hypers) > 0)
 
         self.assertRaises(
-            exceptions.Unauthorized,
+            lib_exc.Unauthorized,
             self.non_adm_client.search_hypervisor,
             hypers[0]['hypervisor_hostname'])
diff --git a/tempest/api/compute/admin/test_instance_usage_audit_log.py b/tempest/api/compute/admin/test_instance_usage_audit_log.py
index f7b5e43..16ce93c 100644
--- a/tempest/api/compute/admin/test_instance_usage_audit_log.py
+++ b/tempest/api/compute/admin/test_instance_usage_audit_log.py
@@ -30,8 +30,7 @@
     @test.attr(type='gate')
     def test_list_instance_usage_audit_logs(self):
         # list instance usage audit logs
-        resp, body = self.adm_client.list_instance_usage_audit_logs()
-        self.assertEqual(200, resp.status)
+        body = self.adm_client.list_instance_usage_audit_logs()
         expected_items = ['total_errors', 'total_instances', 'log',
                           'num_hosts_running', 'num_hosts_done',
                           'num_hosts', 'hosts_not_run', 'overall_status',
@@ -44,10 +43,9 @@
     def test_get_instance_usage_audit_log(self):
         # Get instance usage audit log before specified time
         now = datetime.datetime.now()
-        resp, body = self.adm_client.get_instance_usage_audit_log(
+        body = self.adm_client.get_instance_usage_audit_log(
             urllib.quote(now.strftime("%Y-%m-%d %H:%M:%S")))
 
-        self.assertEqual(200, resp.status)
         expected_items = ['total_errors', 'total_instances', 'log',
                           'num_hosts_running', 'num_hosts_done', 'num_hosts',
                           'hosts_not_run', 'overall_status', 'period_ending',
diff --git a/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py b/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py
index c4905d9..5453ff4 100644
--- a/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py
+++ b/tempest/api/compute/admin/test_instance_usage_audit_log_negative.py
@@ -16,8 +16,9 @@
 import datetime
 import urllib
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -31,17 +32,17 @@
     @test.attr(type=['negative', 'gate'])
     def test_instance_usage_audit_logs_with_nonadmin_user(self):
         # the instance_usage_audit_logs API just can be accessed by admin user
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.instance_usages_audit_log_client.
                           list_instance_usage_audit_logs)
         now = datetime.datetime.now()
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.instance_usages_audit_log_client.
                           get_instance_usage_audit_log,
                           urllib.quote(now.strftime("%Y-%m-%d %H:%M:%S")))
 
     @test.attr(type=['negative', 'gate'])
     def test_get_instance_usage_audit_logs_with_invalid_time(self):
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.adm_client.get_instance_usage_audit_log,
                           "invalid_time")
diff --git a/tempest/api/compute/admin/test_migrations.py b/tempest/api/compute/admin/test_migrations.py
index 7ba05ef..c51ad61 100644
--- a/tempest/api/compute/admin/test_migrations.py
+++ b/tempest/api/compute/admin/test_migrations.py
@@ -31,15 +31,14 @@
     @test.attr(type='gate')
     def test_list_migrations(self):
         # Admin can get the migrations list
-        resp, _ = self.client.list_migrations()
-        self.assertEqual(200, resp.status)
+        self.client.list_migrations()
 
     @testtools.skipUnless(CONF.compute_feature_enabled.resize,
                           'Resize not available.')
     @test.attr(type='gate')
     def test_list_migrations_in_flavor_resize_situation(self):
         # Admin can get the migrations list which contains the resized server
-        resp, server = self.create_test_server(wait_until="ACTIVE")
+        server = self.create_test_server(wait_until="ACTIVE")
         server_id = server['id']
 
         resp, _ = self.servers_client.resize(server_id, self.flavor_ref_alt)
@@ -48,8 +47,7 @@
         self.servers_client.confirm_resize(server_id)
         self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
 
-        resp, body = self.client.list_migrations()
-        self.assertEqual(200, resp.status)
+        body = self.client.list_migrations()
 
         instance_uuids = [x['instance_uuid'] for x in body]
         self.assertIn(server_id, instance_uuids)
diff --git a/tempest/api/compute/admin/test_quotas_negative.py b/tempest/api/compute/admin/test_quotas_negative.py
index 7cefe90..2fb7be6 100644
--- a/tempest/api/compute/admin/test_quotas_negative.py
+++ b/tempest/api/compute/admin/test_quotas_negative.py
@@ -13,11 +13,11 @@
 #    under the License.
 
 from tempest_lib import decorators
+from tempest_lib import exceptions as lib_exc
 
 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
@@ -39,7 +39,7 @@
 
     @test.attr(type=['negative', 'gate'])
     def test_update_quota_normal_user(self):
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.client.update_quota_set,
                           self.demo_tenant_id,
                           ram=0)
@@ -59,7 +59,7 @@
 
         self.addCleanup(self.adm_client.update_quota_set, self.demo_tenant_id,
                         cores=default_vcpu_quota)
-        self.assertRaises((exceptions.Unauthorized, exceptions.OverLimit),
+        self.assertRaises((lib_exc.Unauthorized, lib_exc.OverLimit),
                           self.create_test_server)
 
     @test.attr(type=['negative', 'gate'])
@@ -75,7 +75,7 @@
 
         self.addCleanup(self.adm_client.update_quota_set, self.demo_tenant_id,
                         ram=default_mem_quota)
-        self.assertRaises((exceptions.Unauthorized, exceptions.OverLimit),
+        self.assertRaises((lib_exc.Unauthorized, lib_exc.OverLimit),
                           self.create_test_server)
 
     @test.attr(type=['negative', 'gate'])
@@ -90,7 +90,7 @@
                                          instances=instances_quota)
         self.addCleanup(self.adm_client.update_quota_set, self.demo_tenant_id,
                         instances=default_instances_quota)
-        self.assertRaises((exceptions.Unauthorized, exceptions.OverLimit),
+        self.assertRaises((lib_exc.Unauthorized, lib_exc.OverLimit),
                           self.create_test_server)
 
     @decorators.skip_because(bug="1186354",
@@ -116,7 +116,7 @@
         # Check we cannot create anymore
         # A 403 Forbidden or 413 Overlimit (old behaviour) exception
         # will be raised when out of quota
-        self.assertRaises((exceptions.Unauthorized, exceptions.OverLimit),
+        self.assertRaises((lib_exc.Unauthorized, lib_exc.OverLimit),
                           self.sg_client.create_security_group,
                           "sg-overlimit", "sg-desc")
 
@@ -155,6 +155,6 @@
         # Check we cannot create SG rule anymore
         # A 403 Forbidden or 413 Overlimit (old behaviour) exception
         # will be raised when out of quota
-        self.assertRaises((exceptions.OverLimit, exceptions.Unauthorized),
+        self.assertRaises((lib_exc.OverLimit, lib_exc.Unauthorized),
                           self.sg_client.create_security_group_rule,
                           secgroup_id, ip_protocol, 1025, 1025)
diff --git a/tempest/api/compute/admin/test_security_group_default_rules.py b/tempest/api/compute/admin/test_security_group_default_rules.py
index 563d517..a0606cd 100644
--- a/tempest/api/compute/admin/test_security_group_default_rules.py
+++ b/tempest/api/compute/admin/test_security_group_default_rules.py
@@ -12,11 +12,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 import testtools
 
 from tempest.api.compute import base
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -30,10 +30,14 @@
     @testtools.skipIf(CONF.service_available.neutron,
                       "Skip as this functionality is not yet "
                       "implemented in Neutron. Related Bug#1311500")
-    def resource_setup(cls):
+    def setup_credentials(cls):
         # A network and a subnet will be created for these tests
         cls.set_network_resources(network=True, subnet=True)
-        super(SecurityGroupDefaultRulesTest, cls).resource_setup()
+        super(SecurityGroupDefaultRulesTest, cls).setup_credentials()
+
+    @classmethod
+    def setup_clients(cls):
+        super(SecurityGroupDefaultRulesTest, cls).setup_clients()
         cls.adm_client = cls.os_adm.security_group_default_rules_client
 
     def _create_security_group_default_rules(self, ip_protocol='tcp',
@@ -59,7 +63,7 @@
             rule = self._create_security_group_default_rules(ip_protocol)
             # Delete Security Group default rule
             self.adm_client.delete_security_group_default_rule(rule['id'])
-            self.assertRaises(exceptions.NotFound,
+            self.assertRaises(lib_exc.NotFound,
                               self.adm_client.get_security_group_default_rule,
                               rule['id'])
 
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index cff9a43..6110b89 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -35,13 +35,13 @@
         cls.flavors_client = cls.os_adm.flavors_client
 
         cls.s1_name = data_utils.rand_name('server')
-        resp, server = cls.create_test_server(name=cls.s1_name,
-                                              wait_until='ACTIVE')
+        server = cls.create_test_server(name=cls.s1_name,
+                                        wait_until='ACTIVE')
         cls.s1_id = server['id']
 
         cls.s2_name = data_utils.rand_name('server')
-        resp, server = cls.create_test_server(name=cls.s2_name,
-                                              wait_until='ACTIVE')
+        server = cls.create_test_server(name=cls.s2_name,
+                                        wait_until='ACTIVE')
         cls.s2_id = server['id']
 
     @test.attr(type='gate')
@@ -61,7 +61,7 @@
         # Reset server's state to 'active'
         resp, server = self.client.reset_state(self.s1_id, state='active')
         # Verify server's state
-        resp, server = self.client.get_server(self.s1_id)
+        server = self.client.get_server(self.s1_id)
         self.assertEqual(server['status'], 'ACTIVE')
         servers = body['servers']
         # Verify error server in list result
@@ -104,12 +104,10 @@
         name = data_utils.rand_name('server')
         flavor = self.flavor_ref
         image_id = self.image_ref
-        resp, test_server = self.client.create_server(
-            name, image_id, flavor)
-        self.assertEqual('202', resp['status'])
+        test_server = self.client.create_server(name, image_id, flavor)
         self.addCleanup(self.client.delete_server, test_server['id'])
         self.client.wait_for_server_status(test_server['id'], 'ACTIVE')
-        resp, server = self.client.get_server(test_server['id'])
+        server = self.client.get_server(test_server['id'])
         self.assertEqual(server['status'], 'ACTIVE')
         hostname = server[self._host_key]
         params = {'host': hostname}
@@ -132,7 +130,7 @@
         self.assertEqual(202, resp.status)
 
         # Verify server's state
-        resp, server = self.client.get_server(self.s1_id)
+        server = self.client.get_server(self.s1_id)
         self.assertEqual(server['status'], 'ERROR')
 
         # Reset server's state to 'active'
@@ -140,7 +138,7 @@
         self.assertEqual(202, resp.status)
 
         # Verify server's state
-        resp, server = self.client.get_server(self.s1_id)
+        server = self.client.get_server(self.s1_id)
         self.assertEqual(server['status'], 'ACTIVE')
 
     @test.attr(type='gate')
@@ -179,14 +177,14 @@
                                                      'ACTIVE',
                                                      raise_on_error=False)
         # Verify the server properties after rebuilding
-        resp, server = self.non_admin_client.get_server(rebuilt_server['id'])
+        server = self.non_admin_client.get_server(rebuilt_server['id'])
         rebuilt_image_id = server['image']['id']
         self.assertEqual(self.image_ref_alt, rebuilt_image_id)
 
     @test.attr(type='gate')
     def test_reset_network_inject_network_info(self):
         # Reset Network of a Server
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         resp, server_body = self.client.reset_network(server['id'])
         self.assertEqual(202, resp.status)
         # Inject the Network Info into Server
@@ -199,6 +197,5 @@
         hints = {
             'same_host': self.s1_id
         }
-        resp, server = self.create_test_server(sched_hints=hints,
-                                               wait_until='ACTIVE')
-        self.assertEqual('202', resp['status'])
+        self.create_test_server(sched_hints=hints,
+                                wait_until='ACTIVE')
diff --git a/tempest/api/compute/admin/test_servers_negative.py b/tempest/api/compute/admin/test_servers_negative.py
index 0dddc76..7fd87f6 100644
--- a/tempest/api/compute/admin/test_servers_negative.py
+++ b/tempest/api/compute/admin/test_servers_negative.py
@@ -14,13 +14,13 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
 import testtools
 
 from tempest.api.compute import base
 from tempest.common import tempest_fixtures as fixtures
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -41,8 +41,8 @@
         cls.tenant_id = cls.client.tenant_id
 
         cls.s1_name = data_utils.rand_name('server')
-        resp, server = cls.create_test_server(name=cls.s1_name,
-                                              wait_until='ACTIVE')
+        server = cls.create_test_server(name=cls.s1_name,
+                                        wait_until='ACTIVE')
         cls.s1_id = server['id']
 
     def _get_unused_flavor_id(self):
@@ -50,7 +50,7 @@
         while True:
             try:
                 self.flavors_client.get_flavor_details(flavor_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 break
             flavor_id = data_utils.rand_int_id(start=1000)
         return flavor_id
@@ -71,7 +71,7 @@
                                                        ram, vcpus, disk,
                                                        flavor_id)
         self.addCleanup(self.flavors_client.delete_flavor, flavor_id)
-        self.assertRaises((exceptions.Unauthorized, exceptions.OverLimit),
+        self.assertRaises((lib_exc.Unauthorized, lib_exc.OverLimit),
                           self.client.resize,
                           self.servers[0]['id'],
                           flavor_ref['id'])
@@ -92,39 +92,39 @@
                                                        ram, vcpus, disk,
                                                        flavor_id)
         self.addCleanup(self.flavors_client.delete_flavor, flavor_id)
-        self.assertRaises((exceptions.Unauthorized, exceptions.OverLimit),
+        self.assertRaises((lib_exc.Unauthorized, lib_exc.OverLimit),
                           self.client.resize,
                           self.servers[0]['id'],
                           flavor_ref['id'])
 
     @test.attr(type=['negative', 'gate'])
     def test_reset_state_server_invalid_state(self):
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.reset_state, self.s1_id,
                           state='invalid')
 
     @test.attr(type=['negative', 'gate'])
     def test_reset_state_server_invalid_type(self):
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.reset_state, self.s1_id,
                           state=1)
 
     @test.attr(type=['negative', 'gate'])
     def test_reset_state_server_nonexistent_server(self):
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.reset_state, '999')
 
     @test.attr(type=['negative', 'gate'])
     def test_get_server_diagnostics_by_non_admin(self):
         # Non-admin user can not view server diagnostics according to policy
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_adm_client.get_server_diagnostics,
                           self.s1_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_migrate_non_existent_server(self):
         # migrate a non existent server
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.migrate_server,
                           str(uuid.uuid4()))
 
@@ -135,14 +135,13 @@
     @test.attr(type=['negative', 'gate'])
     def test_migrate_server_invalid_state(self):
         # create server.
-        resp, server = self.create_test_server(wait_until='ACTIVE')
-        self.assertEqual(202, resp.status)
+        server = self.create_test_server(wait_until='ACTIVE')
         server_id = server['id']
         # suspend the server.
         resp, _ = self.client.suspend_server(server_id)
         self.assertEqual(202, resp.status)
         self.client.wait_for_server_status(server_id, 'SUSPENDED')
         # migrate an suspended server should fail
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.migrate_server,
                           server_id)
diff --git a/tempest/api/compute/admin/test_services_negative.py b/tempest/api/compute/admin/test_services_negative.py
index bb19a39..39d0ee1 100644
--- a/tempest/api/compute/admin/test_services_negative.py
+++ b/tempest/api/compute/admin/test_services_negative.py
@@ -12,8 +12,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -31,7 +32,7 @@
 
     @test.attr(type=['negative', 'gate'])
     def test_list_services_with_non_admin_user(self):
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.list_services)
 
     @test.attr(type=['negative', 'gate'])
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage.py b/tempest/api/compute/admin/test_simple_tenant_usage.py
index f6553b3..6775d1f 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage.py
@@ -30,7 +30,7 @@
         cls.tenant_id = cls.client.tenant_id
 
         # Create a server in the demo tenant
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
+        cls.create_test_server(wait_until='ACTIVE')
         time.sleep(2)
 
         now = datetime.datetime.now()
@@ -48,8 +48,7 @@
         params = {'start': self.start,
                   'end': self.end,
                   'detailed': int(bool(True))}
-        resp, tenant_usage = self.adm_client.list_tenant_usages(params)
-        self.assertEqual(200, resp.status)
+        tenant_usage = self.adm_client.list_tenant_usages(params)
         self.assertEqual(len(tenant_usage), 8)
 
     @test.attr(type='gate')
@@ -57,10 +56,9 @@
         # Get usage for a specific tenant
         params = {'start': self.start,
                   'end': self.end}
-        resp, tenant_usage = self.adm_client.get_tenant_usage(
+        tenant_usage = self.adm_client.get_tenant_usage(
             self.tenant_id, params)
 
-        self.assertEqual(200, resp.status)
         self.assertEqual(len(tenant_usage), 8)
 
     @test.attr(type='gate')
@@ -68,8 +66,7 @@
         # Get usage for a specific tenant with non admin user
         params = {'start': self.start,
                   'end': self.end}
-        resp, tenant_usage = self.client.get_tenant_usage(
+        tenant_usage = self.client.get_tenant_usage(
             self.tenant_id, params)
 
-        self.assertEqual(200, resp.status)
         self.assertEqual(len(tenant_usage), 8)
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
index 8c31d7c..0d88f6c 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
@@ -14,9 +14,9 @@
 #    under the License.
 
 import datetime
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.compute import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -42,7 +42,7 @@
         # Get usage for a specific tenant empty
         params = {'start': self.start,
                   'end': self.end}
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.adm_client.get_tenant_usage,
                           '', params)
 
@@ -51,7 +51,7 @@
         # Get usage for tenant with invalid date
         params = {'start': self.end,
                   'end': self.start}
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.adm_client.get_tenant_usage,
                           self.client.tenant_id, params)
 
@@ -61,5 +61,5 @@
         params = {'start': self.start,
                   'end': self.end,
                   'detailed': int(bool(True))}
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.client.list_tenant_usages, params)
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index 3e80bf2..c448975 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -13,9 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 import time
 
 from tempest import clients
+from tempest.common import credentials
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest import exceptions
@@ -35,15 +37,60 @@
     force_tenant_isolation = False
 
     @classmethod
-    def resource_setup(cls):
-        cls.set_network_resources()
-        super(BaseComputeTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(BaseComputeTest, cls).skip_checks()
+        if cls._api_version != 2:
+            msg = ("Unexpected API version is specified (%s)" %
+                   cls._api_version)
+            raise exceptions.InvalidConfiguration(message=msg)
 
+    @classmethod
+    def setup_credentials(cls):
+        cls.set_network_resources()
+        super(BaseComputeTest, cls).setup_credentials()
         # TODO(andreaf) WE should care also for the alt_manager here
         # but only once client lazy load in the manager is done
         cls.os = cls.get_client_manager()
+        # Note that we put this here and not in skip_checks because in
+        # the case of preprovisioned users we won't know if we can get
+        # two distinct users until we go and lock them
         cls.multi_user = cls.check_multi_user()
 
+    @classmethod
+    def setup_clients(cls):
+        super(BaseComputeTest, cls).setup_clients()
+        cls.servers_client = cls.os.servers_client
+        cls.flavors_client = cls.os.flavors_client
+        cls.images_client = cls.os.images_client
+        cls.extensions_client = cls.os.extensions_client
+        cls.floating_ips_client = cls.os.floating_ips_client
+        cls.keypairs_client = cls.os.keypairs_client
+        cls.security_groups_client = cls.os.security_groups_client
+        cls.quotas_client = cls.os.quotas_client
+        # NOTE(mriedem): os-quota-class-sets is v2 API only
+        cls.quota_classes_client = cls.os.quota_classes_client
+        # NOTE(mriedem): os-networks is v2 API only
+        cls.networks_client = cls.os.networks_client
+        cls.limits_client = cls.os.limits_client
+        cls.volumes_extensions_client = cls.os.volumes_extensions_client
+        cls.volumes_client = cls.os.volumes_client
+        cls.interfaces_client = cls.os.interfaces_client
+        cls.fixed_ips_client = cls.os.fixed_ips_client
+        cls.availability_zone_client = cls.os.availability_zone_client
+        cls.agents_client = cls.os.agents_client
+        cls.aggregates_client = cls.os.aggregates_client
+        cls.services_client = cls.os.services_client
+        cls.instance_usages_audit_log_client = (
+            cls.os.instance_usages_audit_log_client)
+        cls.hypervisor_client = cls.os.hypervisor_client
+        cls.certificates_client = cls.os.certificates_client
+        cls.migrations_client = cls.os.migrations_client
+        cls.security_group_default_rules_client = (
+            cls.os.security_group_default_rules_client)
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaseComputeTest, cls).resource_setup()
         cls.build_interval = CONF.compute.build_interval
         cls.build_timeout = CONF.compute.build_timeout
         cls.ssh_user = CONF.compute.ssh_user
@@ -58,39 +105,13 @@
         cls.security_groups = []
         cls.server_groups = []
 
-        if cls._api_version == 2:
-            cls.servers_client = cls.os.servers_client
-            cls.flavors_client = cls.os.flavors_client
-            cls.images_client = cls.os.images_client
-            cls.extensions_client = cls.os.extensions_client
-            cls.floating_ips_client = cls.os.floating_ips_client
-            cls.keypairs_client = cls.os.keypairs_client
-            cls.security_groups_client = cls.os.security_groups_client
-            cls.quotas_client = cls.os.quotas_client
-            # NOTE(mriedem): os-quota-class-sets is v2 API only
-            cls.quota_classes_client = cls.os.quota_classes_client
-            # NOTE(mriedem): os-networks is v2 API only
-            cls.networks_client = cls.os.networks_client
-            cls.limits_client = cls.os.limits_client
-            cls.volumes_extensions_client = cls.os.volumes_extensions_client
-            cls.volumes_client = cls.os.volumes_client
-            cls.interfaces_client = cls.os.interfaces_client
-            cls.fixed_ips_client = cls.os.fixed_ips_client
-            cls.availability_zone_client = cls.os.availability_zone_client
-            cls.agents_client = cls.os.agents_client
-            cls.aggregates_client = cls.os.aggregates_client
-            cls.services_client = cls.os.services_client
-            cls.instance_usages_audit_log_client = \
-                cls.os.instance_usages_audit_log_client
-            cls.hypervisor_client = cls.os.hypervisor_client
-            cls.certificates_client = cls.os.certificates_client
-            cls.migrations_client = cls.os.migrations_client
-            cls.security_group_default_rules_client = (
-                cls.os.security_group_default_rules_client)
-        else:
-            msg = ("Unexpected API version is specified (%s)" %
-                   cls._api_version)
-            raise exceptions.InvalidConfiguration(message=msg)
+    @classmethod
+    def resource_cleanup(cls):
+        cls.clear_images()
+        cls.clear_servers()
+        cls.clear_security_groups()
+        cls.clear_server_groups()
+        super(BaseComputeTest, cls).resource_cleanup()
 
     @classmethod
     def check_multi_user(cls):
@@ -107,7 +128,7 @@
         for server in cls.servers:
             try:
                 cls.servers_client.delete_server(server['id'])
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 # Something else already cleaned up the server, nothing to be
                 # worried about
                 pass
@@ -147,7 +168,7 @@
         for image_id in cls.images:
             try:
                 cls.images_client.delete_image(image_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 # The image may have already been deleted which is OK.
                 pass
             except Exception:
@@ -160,7 +181,7 @@
         for sg in cls.security_groups:
             try:
                 cls.security_groups_client.delete_security_group(sg['id'])
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 # The security group may have already been deleted which is OK.
                 pass
             except Exception as exc:
@@ -174,7 +195,7 @@
         for server_group_id in cls.server_groups:
             try:
                 cls.servers_client.delete_server_group(server_group_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 # The server-group may have already been deleted which is OK.
                 pass
             except Exception:
@@ -182,14 +203,6 @@
                               server_group_id)
 
     @classmethod
-    def resource_cleanup(cls):
-        cls.clear_images()
-        cls.clear_servers()
-        cls.clear_security_groups()
-        cls.clear_server_groups()
-        super(BaseComputeTest, cls).resource_cleanup()
-
-    @classmethod
     def create_test_server(cls, **kwargs):
         """Wrapper utility that returns a test server."""
         name = data_utils.rand_name(cls.__name__ + "-instance")
@@ -198,7 +211,7 @@
         flavor = kwargs.get('flavor', cls.flavor_ref)
         image_id = kwargs.get('image_id', cls.image_ref)
 
-        resp, body = cls.servers_client.create_server(
+        body = cls.servers_client.create_server(
             name, image_id, flavor, **kwargs)
 
         # handle the case of multiple servers
@@ -226,7 +239,7 @@
 
         cls.servers.extend(servers)
 
-        return resp, body
+        return body
 
     @classmethod
     def create_security_group(cls, name=None, description=None):
@@ -274,7 +287,7 @@
             # TODO(mriedem): We should move the wait_for_resource_deletion
             # into the delete_volume method as a convenience to the caller.
             volumes_client.wait_for_resource_deletion(volume_id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             LOG.warn("Unable to delete volume '%s' since it was not found. "
                      "Maybe it was already deleted?" % volume_id)
 
@@ -316,7 +329,7 @@
                 cls.servers_client.wait_for_server_termination(server_id)
             except Exception:
                 LOG.exception('Failed to delete server %s' % server_id)
-        resp, server = cls.create_test_server(wait_until='ACTIVE', **kwargs)
+        server = cls.create_test_server(wait_until='ACTIVE', **kwargs)
         cls.password = server['adminPass']
         return server['id']
 
@@ -328,24 +341,27 @@
 
 class BaseV2ComputeTest(BaseComputeTest):
     _api_version = 2
-    _interface = "json"
 
 
 class BaseComputeAdminTest(BaseComputeTest):
     """Base test case class for Compute Admin API tests."""
-    _interface = "json"
 
     @classmethod
-    def resource_setup(cls):
-        super(BaseComputeAdminTest, cls).resource_setup()
-        try:
-            creds = cls.isolated_creds.get_admin_creds()
-            cls.os_adm = clients.Manager(
-                credentials=creds, interface=cls._interface)
-        except NotImplementedError:
-            msg = ("Missing Compute Admin API credentials in configuration.")
+    def skip_checks(cls):
+        if not credentials.is_admin_available():
+            msg = ("Missing Identity Admin API credentials in configuration.")
             raise cls.skipException(msg)
+        super(BaseComputeAdminTest, cls).skip_checks()
 
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseComputeAdminTest, cls).setup_credentials()
+        creds = cls.isolated_creds.get_admin_creds()
+        cls.os_adm = clients.Manager(credentials=creds)
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseComputeAdminTest, cls).setup_clients()
         cls.availability_zone_admin_client = (
             cls.os_adm.availability_zone_client)
 
diff --git a/tempest/api/compute/certificates/test_certificates.py b/tempest/api/compute/certificates/test_certificates.py
index 15ccf53..321a0a1 100644
--- a/tempest/api/compute/certificates/test_certificates.py
+++ b/tempest/api/compute/certificates/test_certificates.py
@@ -24,14 +24,13 @@
     @test.attr(type='gate')
     def test_create_root_certificate(self):
         # create certificates
-        resp, body = self.certificates_client.create_certificate()
+        body = self.certificates_client.create_certificate()
         self.assertIn('data', body)
         self.assertIn('private_key', body)
 
     @test.attr(type='gate')
     def test_get_root_certificate(self):
         # get the root certificate
-        resp, body = self.certificates_client.get_certificate('root')
-        self.assertEqual(200, resp.status)
+        body = self.certificates_client.get_certificate('root')
         self.assertIn('data', body)
         self.assertIn('private_key', body)
diff --git a/tempest/api/compute/floating_ips/base.py b/tempest/api/compute/floating_ips/base.py
index 19b6a50..142eaec 100644
--- a/tempest/api/compute/floating_ips/base.py
+++ b/tempest/api/compute/floating_ips/base.py
@@ -19,8 +19,8 @@
 class BaseFloatingIPsTest(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
+    def setup_credentials(cls):
         # Floating IP actions might need a full network configuration
         cls.set_network_resources(network=True, subnet=True,
                                   router=True, dhcp=True)
-        super(BaseFloatingIPsTest, cls).resource_setup()
+        super(BaseFloatingIPsTest, cls).setup_credentials()
diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions.py b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
index e6f4fb0..46a6ddb 100644
--- a/tempest/api/compute/floating_ips/test_floating_ips_actions.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
@@ -17,7 +17,6 @@
 
 from tempest.api.compute.floating_ips import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -26,16 +25,20 @@
     floating_ip = None
 
     @classmethod
+    def setup_clients(cls):
+        super(FloatingIPsTestJSON, cls).setup_clients()
+        cls.client = cls.floating_ips_client
+
+    @classmethod
     def resource_setup(cls):
         super(FloatingIPsTestJSON, cls).resource_setup()
-        cls.client = cls.floating_ips_client
         cls.floating_ip_id = None
 
         # Server creation
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
+        server = cls.create_test_server(wait_until='ACTIVE')
         cls.server_id = server['id']
         # Floating IP creation
-        resp, body = cls.client.create_floating_ip()
+        body = cls.client.create_floating_ip()
         cls.floating_ip_id = body['id']
         cls.floating_ip = body['ip']
 
@@ -43,7 +46,7 @@
     def resource_cleanup(cls):
         # Deleting the floating IP which is created in this method
         if cls.floating_ip_id:
-            resp, body = cls.client.delete_floating_ip(cls.floating_ip_id)
+            cls.client.delete_floating_ip(cls.floating_ip_id)
         super(FloatingIPsTestJSON, cls).resource_cleanup()
 
     def _try_delete_floating_ip(self, floating_ip_id):
@@ -51,7 +54,7 @@
         try:
             self.client.delete_floating_ip(floating_ip_id)
         # if not found, it depicts it was deleted in the test
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             pass
 
     @test.attr(type='gate')
@@ -59,15 +62,14 @@
     def test_allocate_floating_ip(self):
         # Positive test:Allocation of a new floating IP to a project
         # should be successful
-        resp, body = self.client.create_floating_ip()
+        body = self.client.create_floating_ip()
         floating_ip_id_allocated = body['id']
         self.addCleanup(self.client.delete_floating_ip,
                         floating_ip_id_allocated)
-        self.assertEqual(200, resp.status)
-        resp, floating_ip_details = \
+        floating_ip_details = \
             self.client.get_floating_ip_details(floating_ip_id_allocated)
         # Checking if the details of allocated IP is in list of floating IP
-        resp, body = self.client.list_floating_ips()
+        body = self.client.list_floating_ips()
         self.assertIn(floating_ip_details, body)
 
     @test.attr(type='gate')
@@ -76,14 +78,10 @@
         # Positive test:Deletion of valid floating IP from project
         # should be successful
         # Creating the floating IP that is to be deleted in this method
-        resp, floating_ip_body = self.client.create_floating_ip()
+        floating_ip_body = self.client.create_floating_ip()
         self.addCleanup(self._try_delete_floating_ip, floating_ip_body['id'])
-        # Storing the details of floating IP before deleting it
-        cli_resp = self.client.get_floating_ip_details(floating_ip_body['id'])
-        resp, floating_ip_details = cli_resp
         # Deleting the floating IP from the project
-        resp, body = self.client.delete_floating_ip(floating_ip_body['id'])
-        self.assertEqual(202, resp.status)
+        self.client.delete_floating_ip(floating_ip_body['id'])
         # Check it was really deleted.
         self.client.wait_for_resource_deletion(floating_ip_body['id'])
 
@@ -94,20 +92,18 @@
         # to a specific server should be successful
 
         # Association of floating IP to fixed IP address
-        resp, body = self.client.associate_floating_ip_to_server(
+        self.client.associate_floating_ip_to_server(
             self.floating_ip,
             self.server_id)
-        self.assertEqual(202, resp.status)
 
         # Check instance_id in the floating_ip body
-        resp, body = self.client.get_floating_ip_details(self.floating_ip_id)
+        body = self.client.get_floating_ip_details(self.floating_ip_id)
         self.assertEqual(self.server_id, body['instance_id'])
 
         # Disassociation of floating IP that was associated in this method
-        resp, body = self.client.disassociate_floating_ip_from_server(
+        self.client.disassociate_floating_ip_from_server(
             self.floating_ip,
             self.server_id)
-        self.assertEqual(202, resp.status)
 
     @test.attr(type='gate')
     @test.services('network')
@@ -116,28 +112,27 @@
         # to specific server should change the association of the Floating IP
         # Create server so as to use for Multiple association
         new_name = data_utils.rand_name('floating_server')
-        resp, body = self.create_test_server(name=new_name)
+        body = self.create_test_server(name=new_name)
         self.servers_client.wait_for_server_status(body['id'], 'ACTIVE')
         self.new_server_id = body['id']
+        self.addCleanup(self.servers_client.delete_server, self.new_server_id)
 
         # Associating floating IP for the first time
-        resp, _ = self.client.associate_floating_ip_to_server(
+        self.client.associate_floating_ip_to_server(
             self.floating_ip,
             self.server_id)
         # Associating floating IP for the second time
-        resp, body = self.client.associate_floating_ip_to_server(
+        self.client.associate_floating_ip_to_server(
             self.floating_ip,
             self.new_server_id)
 
-        self.addCleanup(self.servers_client.delete_server, self.new_server_id)
-        if (resp['status'] is not None):
-            self.addCleanup(self.client.disassociate_floating_ip_from_server,
-                            self.floating_ip,
-                            self.new_server_id)
+        self.addCleanup(self.client.disassociate_floating_ip_from_server,
+                        self.floating_ip,
+                        self.new_server_id)
 
         # Make sure no longer associated with old server
-        self.assertRaises((exceptions.NotFound,
+        self.assertRaises((lib_exc.NotFound,
                            lib_exc.UnprocessableEntity,
-                           exceptions.Conflict),
+                           lib_exc.Conflict),
                           self.client.disassociate_floating_ip_from_server,
                           self.floating_ip, self.server_id)
diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
index b08df97..fa3fa16 100644
--- a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
@@ -15,10 +15,11 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute.floating_ips import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -28,16 +29,20 @@
     server_id = None
 
     @classmethod
-    def resource_setup(cls):
-        super(FloatingIPsNegativeTestJSON, cls).resource_setup()
+    def setup_clients(cls):
+        super(FloatingIPsNegativeTestJSON, cls).setup_clients()
         cls.client = cls.floating_ips_client
 
+    @classmethod
+    def resource_setup(cls):
+        super(FloatingIPsNegativeTestJSON, cls).resource_setup()
+
         # Server creation
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
+        server = cls.create_test_server(wait_until='ACTIVE')
         cls.server_id = server['id']
         # Generating a nonexistent floatingIP id
         cls.floating_ip_ids = []
-        resp, body = cls.client.list_floating_ips()
+        body = cls.client.list_floating_ips()
         for i in range(len(body)):
             cls.floating_ip_ids.append(body[i]['id'])
         while True:
@@ -52,7 +57,7 @@
     def test_allocate_floating_ip_from_nonexistent_pool(self):
         # Negative test:Allocation of a new floating IP from a nonexistent_pool
         # to a project should fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.create_floating_ip,
                           "non_exist_pool")
 
@@ -63,7 +68,7 @@
         # from project should fail
 
         # Deleting the non existent floating IP
-        self.assertRaises(exceptions.NotFound, self.client.delete_floating_ip,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_floating_ip,
                           self.non_exist_id)
 
     @test.attr(type=['negative', 'gate'])
@@ -72,7 +77,7 @@
         # Negative test:Association of a non existent floating IP
         # to specific server should fail
         # Associating non existent floating IP
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.associate_floating_ip_to_server,
                           "0.0.0.0", self.server_id)
 
@@ -81,7 +86,7 @@
     def test_dissociate_nonexistent_floating_ip(self):
         # Negative test:Dissociation of a non existent floating IP should fail
         # Dissociating non existent floating IP
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.disassociate_floating_ip_from_server,
                           "0.0.0.0", self.server_id)
 
@@ -90,6 +95,6 @@
     def test_associate_ip_to_server_without_passing_floating_ip(self):
         # Negative test:Association of empty floating IP to specific server
         # should raise NotFound or BadRequest(In case of Nova V2.1) exception.
-        self.assertRaises((exceptions.NotFound, exceptions.BadRequest),
+        self.assertRaises((lib_exc.NotFound, lib_exc.BadRequest),
                           self.client.associate_floating_ip_to_server,
                           '', self.server_id)
diff --git a/tempest/api/compute/floating_ips/test_list_floating_ips.py b/tempest/api/compute/floating_ips/test_list_floating_ips.py
index 7af9ca7..25f13fc 100644
--- a/tempest/api/compute/floating_ips/test_list_floating_ips.py
+++ b/tempest/api/compute/floating_ips/test_list_floating_ips.py
@@ -20,13 +20,17 @@
 class FloatingIPDetailsTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
+    def setup_clients(cls):
+        super(FloatingIPDetailsTestJSON, cls).setup_clients()
+        cls.client = cls.floating_ips_client
+
+    @classmethod
     def resource_setup(cls):
         super(FloatingIPDetailsTestJSON, cls).resource_setup()
-        cls.client = cls.floating_ips_client
         cls.floating_ip = []
         cls.floating_ip_id = []
         for i in range(3):
-            resp, body = cls.client.create_floating_ip()
+            body = cls.client.create_floating_ip()
             cls.floating_ip.append(body)
             cls.floating_ip_id.append(body['id'])
 
@@ -40,8 +44,7 @@
     @test.services('network')
     def test_list_floating_ips(self):
         # Positive test:Should return the list of floating IPs
-        resp, body = self.client.list_floating_ips()
-        self.assertEqual(200, resp.status)
+        body = self.client.list_floating_ips()
         floating_ips = body
         self.assertNotEqual(0, len(floating_ips),
                             "Expected floating IPs. Got zero.")
@@ -53,16 +56,14 @@
     def test_get_floating_ip_details(self):
         # Positive test:Should be able to GET the details of floatingIP
         # Creating a floating IP for which details are to be checked
-        resp, body = self.client.create_floating_ip()
+        body = self.client.create_floating_ip()
         floating_ip_id = body['id']
         self.addCleanup(self.client.delete_floating_ip,
                         floating_ip_id)
         floating_ip_instance_id = body['instance_id']
         floating_ip_ip = body['ip']
         floating_ip_fixed_ip = body['fixed_ip']
-        resp, body = \
-            self.client.get_floating_ip_details(floating_ip_id)
-        self.assertEqual(200, resp.status)
+        body = self.client.get_floating_ip_details(floating_ip_id)
         # Comparing the details of floating IP
         self.assertEqual(floating_ip_instance_id,
                          body['instance_id'])
@@ -75,7 +76,6 @@
     @test.services('network')
     def test_list_floating_ip_pools(self):
         # Positive test:Should return the list of floating IP Pools
-        resp, floating_ip_pools = self.client.list_floating_ip_pools()
-        self.assertEqual(200, resp.status)
+        floating_ip_pools = self.client.list_floating_ip_pools()
         self.assertNotEqual(0, len(floating_ip_pools),
                             "Expected floating IP Pools. Got zero.")
diff --git a/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py b/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
index c343018..d1d3517 100644
--- a/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
+++ b/tempest/api/compute/floating_ips/test_list_floating_ips_negative.py
@@ -15,10 +15,11 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 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
@@ -27,8 +28,8 @@
 class FloatingIPDetailsNegativeTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(FloatingIPDetailsNegativeTestJSON, cls).resource_setup()
+    def setup_clients(cls):
+        super(FloatingIPDetailsNegativeTestJSON, cls).setup_clients()
         cls.client = cls.floating_ips_client
 
     @test.attr(type=['negative', 'gate'])
@@ -41,5 +42,5 @@
             non_exist_id = str(uuid.uuid4())
         else:
             non_exist_id = data_utils.rand_int_id(start=999)
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.get_floating_ip_details, non_exist_id)
diff --git a/tempest/api/compute/images/test_image_metadata_negative.py b/tempest/api/compute/images/test_image_metadata_negative.py
index 73412ff..0013714 100644
--- a/tempest/api/compute/images/test_image_metadata_negative.py
+++ b/tempest/api/compute/images/test_image_metadata_negative.py
@@ -13,9 +13,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -30,21 +31,21 @@
     def test_list_nonexistent_image_metadata(self):
         # Negative test: List on nonexistent image
         # metadata should not happen
-        self.assertRaises(exceptions.NotFound, self.client.list_image_metadata,
+        self.assertRaises(lib_exc.NotFound, self.client.list_image_metadata,
                           data_utils.rand_uuid())
 
     @test.attr(type=['negative', 'gate'])
     def test_update_nonexistent_image_metadata(self):
         # Negative test:An update should not happen for a non-existent image
         meta = {'os_distro': 'alt1', 'os_version': 'alt2'}
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.update_image_metadata,
                           data_utils.rand_uuid(), meta)
 
     @test.attr(type=['negative', 'gate'])
     def test_get_nonexistent_image_metadata_item(self):
         # Negative test: Get on non-existent image should not happen
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.get_image_metadata_item,
                           data_utils.rand_uuid(), 'os_version')
 
@@ -52,7 +53,7 @@
     def test_set_nonexistent_image_metadata(self):
         # Negative test: Metadata should not be set to a non-existent image
         meta = {'os_distro': 'alt1', 'os_version': 'alt2'}
-        self.assertRaises(exceptions.NotFound, self.client.set_image_metadata,
+        self.assertRaises(lib_exc.NotFound, self.client.set_image_metadata,
                           data_utils.rand_uuid(), meta)
 
     @test.attr(type=['negative', 'gate'])
@@ -60,7 +61,7 @@
         # Negative test: Metadata item should not be set to a
         # nonexistent image
         meta = {'os_distro': 'alt'}
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.set_image_metadata_item,
                           data_utils.rand_uuid(), 'os_distro',
                           meta)
@@ -69,6 +70,6 @@
     def test_delete_nonexistent_image_metadata_item(self):
         # Negative test: Shouldn't be able to delete metadata
         # item from non-existent image
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.delete_image_metadata_item,
                           data_utils.rand_uuid(), 'os_distro')
diff --git a/tempest/api/compute/images/test_images.py b/tempest/api/compute/images/test_images.py
index dc27a70..2508fe1 100644
--- a/tempest/api/compute/images/test_images.py
+++ b/tempest/api/compute/images/test_images.py
@@ -40,7 +40,7 @@
     @test.attr(type='gate')
     def test_delete_saving_image(self):
         snapshot_name = data_utils.rand_name('test-snap-')
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         self.addCleanup(self.servers_client.delete_server, server['id'])
         image = self.create_image_from_server(server['id'],
                                               name=snapshot_name,
diff --git a/tempest/api/compute/images/test_images_negative.py b/tempest/api/compute/images/test_images_negative.py
index 58fc20d..55184d9 100644
--- a/tempest/api/compute/images/test_images_negative.py
+++ b/tempest/api/compute/images/test_images_negative.py
@@ -12,10 +12,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 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
@@ -41,7 +42,7 @@
     @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')
+        server = self.create_test_server(wait_until='ACTIVE')
 
         # Delete server before trying to create server
         self.servers_client.delete_server(server['id'])
@@ -49,7 +50,7 @@
         # Create a new image after server is deleted
         name = data_utils.rand_name('image')
         meta = {'image_type': 'test'}
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.create_image_from_server,
                           server['id'], name=name, meta=meta)
 
@@ -61,12 +62,12 @@
         meta = {'image_type': 'test'}
         resp = {}
         resp['status'] = None
-        self.assertRaises(exceptions.NotFound, self.create_image_from_server,
+        self.assertRaises(lib_exc.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')
+        server = self.create_test_server(wait_until='ACTIVE')
         self.servers_client.stop(server['id'])
         self.servers_client.wait_for_server_status(server['id'],
                                                    'SHUTOFF')
@@ -84,7 +85,7 @@
         # 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,
+        self.assertRaises(lib_exc.NotFound, self.client.create_image,
                           test_uuid, snapshot_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -92,13 +93,13 @@
         # 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,
+        self.assertRaises(lib_exc.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,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_image,
                           '!@$%^&*()')
 
     @test.attr(type=['negative', 'gate'])
@@ -106,28 +107,28 @@
         # 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,
+        self.assertRaises(lib_exc.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, '')
+        self.assertRaises(lib_exc.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,
+        self.assertRaises(lib_exc.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)
+        self.assertRaises(lib_exc.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,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_image,
                           '11a22b9-12a9-5555-cc11-00ab112223fa-3fac')
diff --git a/tempest/api/compute/images/test_images_oneserver.py b/tempest/api/compute/images/test_images_oneserver.py
index 79cd27a..12aa886 100644
--- a/tempest/api/compute/images/test_images_oneserver.py
+++ b/tempest/api/compute/images/test_images_oneserver.py
@@ -59,7 +59,7 @@
                         % cls.__name__)
             raise cls.skipException(skip_msg)
 
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
+        server = cls.create_test_server(wait_until='ACTIVE')
         cls.server_id = server['id']
 
     def _get_default_flavor_disk_size(self, flavor_id):
diff --git a/tempest/api/compute/images/test_images_oneserver_negative.py b/tempest/api/compute/images/test_images_oneserver_negative.py
index 46cec9b..7f15ad1 100644
--- a/tempest/api/compute/images/test_images_oneserver_negative.py
+++ b/tempest/api/compute/images/test_images_oneserver_negative.py
@@ -14,10 +14,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest.openstack.common import log as logging
 from tempest import test
 
@@ -67,7 +68,7 @@
                         % cls.__name__)
             raise cls.skipException(skip_msg)
 
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
+        server = cls.create_test_server(wait_until='ACTIVE')
         cls.server_id = server['id']
 
         cls.image_ids = []
@@ -77,7 +78,7 @@
         # Return an error when creating image with invalid metadata
         snapshot_name = data_utils.rand_name('test-snap-')
         meta = {'': ''}
-        self.assertRaises(exceptions.BadRequest, self.client.create_image,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_image,
                           self.server_id, snapshot_name, meta)
 
     @test.attr(type=['negative', 'gate'])
@@ -85,7 +86,7 @@
         # Return an error when creating image with meta data over 256 chars
         snapshot_name = data_utils.rand_name('test-snap-')
         meta = {'a' * 260: 'b' * 260}
-        self.assertRaises(exceptions.BadRequest, self.client.create_image,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_image,
                           self.server_id, snapshot_name, meta)
 
     @test.attr(type=['negative', 'gate'])
@@ -102,7 +103,7 @@
 
         # Create second snapshot
         alt_snapshot_name = data_utils.rand_name('test-snap-')
-        self.assertRaises(exceptions.Conflict, self.client.create_image,
+        self.assertRaises(lib_exc.Conflict, self.client.create_image,
                           self.server_id, alt_snapshot_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -110,7 +111,7 @@
         # Return an error if snapshot name over 256 characters is passed
 
         snapshot_name = data_utils.rand_name('a' * 260)
-        self.assertRaises(exceptions.BadRequest, self.client.create_image,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_image,
                           self.server_id, snapshot_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -127,4 +128,4 @@
         self.client.delete_image(image_id)
         self.image_ids.remove(image_id)
 
-        self.assertRaises(exceptions.NotFound, self.client.get_image, image_id)
+        self.assertRaises(lib_exc.NotFound, self.client.get_image, image_id)
diff --git a/tempest/api/compute/images/test_list_image_filters.py b/tempest/api/compute/images/test_list_image_filters.py
index 742c2dd..a2e5f56 100644
--- a/tempest/api/compute/images/test_list_image_filters.py
+++ b/tempest/api/compute/images/test_list_image_filters.py
@@ -69,8 +69,8 @@
             return
 
         # Create instances and snapshots via nova
-        resp, cls.server1 = cls.create_test_server()
-        resp, cls.server2 = cls.create_test_server(wait_until='ACTIVE')
+        cls.server1 = cls.create_test_server()
+        cls.server2 = cls.create_test_server(wait_until='ACTIVE')
         # NOTE(sdague) this is faster than doing the sync wait_util on both
         cls.servers_client.wait_for_server_status(cls.server1['id'],
                                                   'ACTIVE')
@@ -172,8 +172,6 @@
         # Verify only the expected number of results are returned
         params = {'limit': '1'}
         images = self.client.list_images(params)
-        # when _interface='xml', one element for images_links in images
-        # ref: Question #224349
         self.assertEqual(1, len([x for x in images if 'id' in x]))
 
     @test.attr(type='gate')
diff --git a/tempest/api/compute/images/test_list_image_filters_negative.py b/tempest/api/compute/images/test_list_image_filters_negative.py
index a8f2ae7..77c9459 100644
--- a/tempest/api/compute/images/test_list_image_filters_negative.py
+++ b/tempest/api/compute/images/test_list_image_filters_negative.py
@@ -12,10 +12,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 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
@@ -35,5 +36,5 @@
     def test_get_nonexistent_image(self):
         # Check raises a NotFound
         nonexistent_image = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.get_image,
+        self.assertRaises(lib_exc.NotFound, self.client.get_image,
                           nonexistent_image)
diff --git a/tempest/api/compute/keypairs/test_keypairs_negative.py b/tempest/api/compute/keypairs/test_keypairs_negative.py
index 4e06d6c..ea25527 100644
--- a/tempest/api/compute/keypairs/test_keypairs_negative.py
+++ b/tempest/api/compute/keypairs/test_keypairs_negative.py
@@ -14,9 +14,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -36,14 +37,14 @@
         # Keypair should not be created with a non RSA public key
         k_name = data_utils.rand_name('keypair-')
         pub_key = "ssh-rsa JUNK nova@ubuntu"
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self._create_keypair, k_name, pub_key)
 
     @test.attr(type=['negative', 'gate'])
     def test_keypair_delete_nonexistent_key(self):
         # Non-existent key deletion should throw a proper error
         k_name = data_utils.rand_name("keypair-non-existent-")
-        self.assertRaises(exceptions.NotFound, self.client.delete_keypair,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_keypair,
                           k_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -51,7 +52,7 @@
         # Keypair should not be created with an empty public key
         k_name = data_utils.rand_name("keypair-")
         pub_key = ' '
-        self.assertRaises(exceptions.BadRequest, self._create_keypair,
+        self.assertRaises(lib_exc.BadRequest, self._create_keypair,
                           k_name, pub_key)
 
     @test.attr(type=['negative', 'gate'])
@@ -59,7 +60,7 @@
         # Keypair should not be created when public key bits are too long
         k_name = data_utils.rand_name("keypair-")
         pub_key = 'ssh-rsa ' + 'A' * 2048 + ' openstack@ubuntu'
-        self.assertRaises(exceptions.BadRequest, self._create_keypair,
+        self.assertRaises(lib_exc.BadRequest, self._create_keypair,
                           k_name, pub_key)
 
     @test.attr(type=['negative', 'gate'])
@@ -68,26 +69,26 @@
         k_name = data_utils.rand_name('keypair-')
         self.client.create_keypair(k_name)
         # Now try the same keyname to create another key
-        self.assertRaises(exceptions.Conflict, self._create_keypair,
+        self.assertRaises(lib_exc.Conflict, self._create_keypair,
                           k_name)
         self.client.delete_keypair(k_name)
 
     @test.attr(type=['negative', 'gate'])
     def test_create_keypair_with_empty_name_string(self):
         # Keypairs with name being an empty string should not be created
-        self.assertRaises(exceptions.BadRequest, self._create_keypair,
+        self.assertRaises(lib_exc.BadRequest, self._create_keypair,
                           '')
 
     @test.attr(type=['negative', 'gate'])
     def test_create_keypair_with_long_keynames(self):
         # Keypairs with name longer than 255 chars should not be created
         k_name = 'keypair-'.ljust(260, '0')
-        self.assertRaises(exceptions.BadRequest, self._create_keypair,
+        self.assertRaises(lib_exc.BadRequest, self._create_keypair,
                           k_name)
 
     @test.attr(type=['negative', 'gate'])
     def test_create_keypair_invalid_name(self):
         # Keypairs with name being an invalid name should not be created
         k_name = 'key_/.\@:'
-        self.assertRaises(exceptions.BadRequest, self._create_keypair,
+        self.assertRaises(lib_exc.BadRequest, self._create_keypair,
                           k_name)
diff --git a/tempest/api/compute/limits/test_absolute_limits.py b/tempest/api/compute/limits/test_absolute_limits.py
index 520dfa9..de6eecb 100644
--- a/tempest/api/compute/limits/test_absolute_limits.py
+++ b/tempest/api/compute/limits/test_absolute_limits.py
@@ -20,8 +20,8 @@
 class AbsoluteLimitsTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(AbsoluteLimitsTestJSON, cls).resource_setup()
+    def setup_clients(cls):
+        super(AbsoluteLimitsTestJSON, cls).setup_clients()
         cls.client = cls.limits_client
 
     @test.attr(type='gate')
diff --git a/tempest/api/compute/limits/test_absolute_limits_negative.py b/tempest/api/compute/limits/test_absolute_limits_negative.py
index d537d83..d82a2e5 100644
--- a/tempest/api/compute/limits/test_absolute_limits_negative.py
+++ b/tempest/api/compute/limits/test_absolute_limits_negative.py
@@ -13,9 +13,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common import tempest_fixtures as fixtures
-from tempest import exceptions
 from tempest import test
 
 
@@ -27,8 +28,8 @@
         super(AbsoluteLimitsNegativeTestJSON, self).setUp()
 
     @classmethod
-    def resource_setup(cls):
-        super(AbsoluteLimitsNegativeTestJSON, cls).resource_setup()
+    def setup_clients(cls):
+        super(AbsoluteLimitsNegativeTestJSON, cls).setup_clients()
         cls.client = cls.limits_client
         cls.server_client = cls.servers_client
 
@@ -51,5 +52,5 @@
 
         # A 403 Forbidden or 413 Overlimit (old behaviour) exception
         # will be raised when out of quota
-        self.assertRaises((exceptions.Unauthorized, exceptions.OverLimit),
+        self.assertRaises((lib_exc.Unauthorized, lib_exc.OverLimit),
                           self.create_test_server, meta=meta_data)
diff --git a/tempest/api/compute/security_groups/base.py b/tempest/api/compute/security_groups/base.py
index 05cad9a..f70f6d3 100644
--- a/tempest/api/compute/security_groups/base.py
+++ b/tempest/api/compute/security_groups/base.py
@@ -19,7 +19,7 @@
 class BaseSecurityGroupsTest(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
+    def setup_credentials(cls):
         # A network and a subnet will be created for these tests
         cls.set_network_resources(network=True, subnet=True)
-        super(BaseSecurityGroupsTest, cls).resource_setup()
+        super(BaseSecurityGroupsTest, cls).setup_credentials()
diff --git a/tempest/api/compute/security_groups/test_security_group_rules.py b/tempest/api/compute/security_groups/test_security_group_rules.py
index 527f2dd..1871c73 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules.py
@@ -23,9 +23,13 @@
 class SecurityGroupRulesTestJSON(base.BaseSecurityGroupsTest):
 
     @classmethod
+    def setup_clients(cls):
+        super(SecurityGroupRulesTestJSON, cls).setup_clients()
+        cls.client = cls.security_groups_client
+
+    @classmethod
     def resource_setup(cls):
         super(SecurityGroupRulesTestJSON, cls).resource_setup()
-        cls.client = cls.security_groups_client
         cls.neutron_available = CONF.service_available.neutron
         cls.ip_protocol = 'tcp'
         cls.from_port = 22
diff --git a/tempest/api/compute/security_groups/test_security_group_rules_negative.py b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
index d97c404..bd48cbe 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules_negative.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
@@ -13,10 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute.security_groups 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,8 +33,8 @@
 class SecurityGroupRulesNegativeTestJSON(base.BaseSecurityGroupsTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(SecurityGroupRulesNegativeTestJSON, cls).resource_setup()
+    def setup_clients(cls):
+        super(SecurityGroupRulesNegativeTestJSON, cls).setup_clients()
         cls.client = cls.security_groups_client
 
     @test.attr(type=['negative', 'smoke'])
@@ -46,7 +47,7 @@
         ip_protocol = 'tcp'
         from_port = 22
         to_port = 22
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.create_security_group_rule,
                           parent_group_id, ip_protocol, from_port, to_port)
 
@@ -60,7 +61,7 @@
         ip_protocol = 'tcp'
         from_port = 22
         to_port = 22
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group_rule,
                           parent_group_id, ip_protocol, from_port, to_port)
 
@@ -83,7 +84,7 @@
                                                    to_port)
         self.addCleanup(self.client.delete_security_group_rule, rule['id'])
         # Add the same rule to the group should fail
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group_rule,
                           parent_group_id, ip_protocol, from_port, to_port)
 
@@ -100,7 +101,7 @@
         from_port = 22
         to_port = 22
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group_rule,
                           parent_group_id, ip_protocol, from_port, to_port)
 
@@ -116,7 +117,7 @@
         ip_protocol = 'tcp'
         from_port = data_utils.rand_int_id(start=65536)
         to_port = 22
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group_rule,
                           parent_group_id, ip_protocol, from_port, to_port)
 
@@ -132,7 +133,7 @@
         ip_protocol = 'tcp'
         from_port = 22
         to_port = data_utils.rand_int_id(start=65536)
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group_rule,
                           parent_group_id, ip_protocol, from_port, to_port)
 
@@ -148,7 +149,7 @@
         ip_protocol = 'tcp'
         from_port = 22
         to_port = 21
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group_rule,
                           secgroup_id, ip_protocol, from_port, to_port)
 
@@ -158,6 +159,6 @@
         # Negative test: Deletion of Security Group rule should be FAIL
         # with non existent id
         non_existent_rule_id = not_existing_id()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.delete_security_group_rule,
                           non_existent_rule_id)
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index 909d444..1e2b6e7 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -13,17 +13,18 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute.security_groups import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class SecurityGroupsTestJSON(base.BaseSecurityGroupsTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(SecurityGroupsTestJSON, cls).resource_setup()
+    def setup_clients(cls):
+        super(SecurityGroupsTestJSON, cls).setup_clients()
         cls.client = cls.security_groups_client
 
     @test.attr(type='smoke')
@@ -93,7 +94,7 @@
         # Create server and add the security group created
         # above to the server we just created
         server_name = data_utils.rand_name('server')
-        resp, server = self.create_test_server(name=server_name)
+        server = self.create_test_server(name=server_name)
         server_id = server['id']
         self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
         resp, body = self.servers_client.add_security_group(server_id,
@@ -101,7 +102,7 @@
 
         # Check that we are not able to delete the security
         # group since it is in use by an active server
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.delete_security_group,
                           sg['id'])
 
@@ -113,7 +114,7 @@
 
         # Check that we are not able to delete the other security
         # group since it is in use by an active server
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.delete_security_group,
                           sg2['id'])
 
diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py
index ee9f78b..2cbea1a 100644
--- a/tempest/api/compute/security_groups/test_security_groups_negative.py
+++ b/tempest/api/compute/security_groups/test_security_groups_negative.py
@@ -14,12 +14,12 @@
 #    under the License.
 
 from tempest_lib import decorators
+from tempest_lib import exceptions as lib_exc
 import testtools
 
 from tempest.api.compute.security_groups import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -28,9 +28,13 @@
 class SecurityGroupsNegativeTestJSON(base.BaseSecurityGroupsTest):
 
     @classmethod
+    def setup_clients(cls):
+        super(SecurityGroupsNegativeTestJSON, cls).setup_clients()
+        cls.client = cls.security_groups_client
+
+    @classmethod
     def resource_setup(cls):
         super(SecurityGroupsNegativeTestJSON, cls).resource_setup()
-        cls.client = cls.security_groups_client
         cls.neutron_available = CONF.service_available.neutron
 
     def _generate_a_non_existent_security_group_id(self):
@@ -53,7 +57,7 @@
         # Negative test:Should not be able to GET the details
         # of non-existent Security Group
         non_exist_id = self._generate_a_non_existent_security_group_id()
-        self.assertRaises(exceptions.NotFound, self.client.get_security_group,
+        self.assertRaises(lib_exc.NotFound, self.client.get_security_group,
                           non_exist_id)
 
     @decorators.skip_because(bug="1161411",
@@ -65,15 +69,15 @@
         # as an empty string/with white spaces/chars more than 255
         s_description = data_utils.rand_name('description-')
         # Create Security Group with empty string as group name
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group, "", s_description)
         # Create Security Group with white space in group name
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group, " ",
                           s_description)
         # Create Security Group with group name longer than 255 chars
         s_name = 'securitygroup-'.ljust(260, '0')
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group, s_name,
                           s_description)
 
@@ -86,14 +90,14 @@
         # as an empty string/with white spaces/chars more than 255
         s_name = data_utils.rand_name('securitygroup-')
         # Create Security Group with empty string as description
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group, s_name, "")
         # Create Security Group with white space in description
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group, s_name, " ")
         # Create Security Group with group description longer than 255 chars
         s_description = 'description-'.ljust(260, '0')
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group, s_name,
                           s_description)
 
@@ -108,7 +112,7 @@
         s_description = data_utils.rand_name('description-')
         self.create_security_group(s_name, s_description)
         # Now try the Security Group with the same 'Name'
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_security_group, s_name,
                           s_description)
 
@@ -123,7 +127,7 @@
                 default_security_group_id = body[i]['id']
                 break
         # Deleting the "default" Security Group
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.delete_security_group,
                           default_security_group_id)
 
@@ -132,7 +136,7 @@
     def test_delete_nonexistent_security_group(self):
         # Negative test:Deletion of a non-existent Security Group should fail
         non_exist_id = self._generate_a_non_existent_security_group_id()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.delete_security_group, non_exist_id)
 
     @test.attr(type=['negative', 'smoke'])
@@ -140,7 +144,7 @@
     def test_delete_security_group_without_passing_id(self):
         # Negative test:Deletion of a Security Group with out passing ID
         # should Fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.delete_security_group, '')
 
     @testtools.skipIf(CONF.service_available.neutron,
@@ -153,7 +157,7 @@
         s_description = data_utils.rand_name('description-')
         # Create a non int sg_id
         sg_id_invalid = data_utils.rand_name('sg-')
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_security_group, sg_id_invalid,
                           name=s_name, description=s_description)
 
@@ -168,7 +172,7 @@
         securitygroup_id = securitygroup['id']
         # Update Security Group with group name longer than 255 chars
         s_new_name = 'securitygroup-'.ljust(260, '0')
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_security_group,
                           securitygroup_id, name=s_new_name)
 
@@ -183,7 +187,7 @@
         securitygroup_id = securitygroup['id']
         # Update Security Group with group description longer than 255 chars
         s_new_des = 'des-'.ljust(260, '0')
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_security_group,
                           securitygroup_id, description=s_new_des)
 
@@ -194,7 +198,7 @@
         non_exist_id = self._generate_a_non_existent_security_group_id()
         s_name = data_utils.rand_name('sg-')
         s_description = data_utils.rand_name('description-')
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.update_security_group,
                           non_exist_id, name=s_name,
                           description=s_description)
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index 4b14dc4..33995f3 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -26,14 +26,22 @@
 class AttachInterfacesTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(AttachInterfacesTestJSON, cls).skip_checks()
         if not CONF.service_available.neutron:
             raise cls.skipException("Neutron is required")
         if not CONF.compute_feature_enabled.interface_attach:
             raise cls.skipException("Interface attachment is not available.")
+
+    @classmethod
+    def setup_credentials(cls):
         # This test class requires network and subnet
         cls.set_network_resources(network=True, subnet=True)
-        super(AttachInterfacesTestJSON, cls).resource_setup()
+        super(AttachInterfacesTestJSON, cls).setup_credentials()
+
+    @classmethod
+    def setup_clients(cls):
+        super(AttachInterfacesTestJSON, cls).setup_clients()
         cls.client = cls.os.interfaces_client
 
     def _check_interface(self, iface, port_id=None, network_id=None,
@@ -49,7 +57,7 @@
             self.assertEqual(iface['mac_addr'], mac_addr)
 
     def _create_server_get_interfaces(self):
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         resp, ifs = self.client.list_interfaces(server['id'])
         self.assertEqual(200, resp.status)
         resp, body = self.client.wait_for_interface_status(
@@ -148,7 +156,7 @@
                                               network_id)
         self.assertEqual(202, resp.status)
         # Remove the fixed IP from server.
-        server_resp, server_detail = self.os.servers_client.get_server(
+        server_detail = self.os.servers_client.get_server(
             server['id'])
         # Get the Fixed IP from server.
         fixed_ip = None
diff --git a/tempest/api/compute/servers/test_availability_zone.py b/tempest/api/compute/servers/test_availability_zone.py
index 5ddf053..dfff014 100644
--- a/tempest/api/compute/servers/test_availability_zone.py
+++ b/tempest/api/compute/servers/test_availability_zone.py
@@ -31,6 +31,5 @@
     @test.attr(type='gate')
     def test_get_availability_zone_list_with_non_admin_user(self):
         # List of availability zone with non-administrator user
-        resp, availability_zone = self.client.get_availability_zone_list()
-        self.assertEqual(200, resp.status)
+        availability_zone = self.client.get_availability_zone_list()
         self.assertTrue(len(availability_zone) > 0)
diff --git a/tempest/api/compute/servers/test_create_server.py b/tempest/api/compute/servers/test_create_server.py
index 85eb049..73e7d15 100644
--- a/tempest/api/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -43,16 +43,16 @@
                        'contents': base64.b64encode(file_contents)}]
         cls.client = cls.servers_client
         cls.network_client = cls.os.network_client
-        cli_resp = cls.create_test_server(name=cls.name,
-                                          meta=cls.meta,
-                                          accessIPv4=cls.accessIPv4,
-                                          accessIPv6=cls.accessIPv6,
-                                          personality=personality,
-                                          disk_config=cls.disk_config)
-        cls.resp, cls.server_initial = cli_resp
+        disk_config = cls.disk_config
+        cls.server_initial = cls.create_test_server(name=cls.name,
+                                                    meta=cls.meta,
+                                                    accessIPv4=cls.accessIPv4,
+                                                    accessIPv6=cls.accessIPv6,
+                                                    personality=personality,
+                                                    disk_config=disk_config)
         cls.password = cls.server_initial['adminPass']
         cls.client.wait_for_server_status(cls.server_initial['id'], 'ACTIVE')
-        resp, cls.server = cls.client.get_server(cls.server_initial['id'])
+        cls.server = cls.client.get_server(cls.server_initial['id'])
 
     @test.attr(type='smoke')
     def test_verify_server_details(self):
@@ -115,9 +115,8 @@
         self.addCleanup(self.client.delete_server_group, group_id)
 
         hints = {'group': group_id}
-        resp, server = self.create_test_server(sched_hints=hints,
-                                               wait_until='ACTIVE')
-        self.assertEqual(202, resp.status)
+        server = self.create_test_server(sched_hints=hints,
+                                         wait_until='ACTIVE')
 
         # Check a server is in the group
         resp, server_group = self.client.get_server_group(group_id)
@@ -156,7 +155,7 @@
         networks = [{'uuid': net1['network']['id']},
                     {'uuid': net2['network']['id']}]
 
-        _, server_multi_nics = self.create_test_server(
+        server_multi_nics = self.create_test_server(
             networks=networks, wait_until='ACTIVE')
 
         # Cleanup server; this is needed in the test case because with the LIFO
@@ -245,22 +244,22 @@
 
         admin_pass = self.image_ssh_password
 
-        resp, server_no_eph_disk = (self.create_test_server(
-                                    wait_until='ACTIVE',
-                                    adminPass=admin_pass,
-                                    flavor=flavor_no_eph_disk_id))
-        resp, server_with_eph_disk = (self.create_test_server(
-                                      wait_until='ACTIVE',
-                                      adminPass=admin_pass,
-                                      flavor=flavor_with_eph_disk_id))
+        server_no_eph_disk = (self.create_test_server(
+                              wait_until='ACTIVE',
+                              adminPass=admin_pass,
+                              flavor=flavor_no_eph_disk_id))
+        server_with_eph_disk = (self.create_test_server(
+                                wait_until='ACTIVE',
+                                adminPass=admin_pass,
+                                flavor=flavor_with_eph_disk_id))
         # Get partition number of server without extra specs.
-        _, server_no_eph_disk = self.client.get_server(
+        server_no_eph_disk = self.client.get_server(
             server_no_eph_disk['id'])
         linux_client = remote_client.RemoteClient(server_no_eph_disk,
                                                   self.ssh_user, admin_pass)
         partition_num = len(linux_client.get_partitions().split('\n'))
 
-        _, server_with_eph_disk = self.client.get_server(
+        server_with_eph_disk = self.client.get_server(
             server_with_eph_disk['id'])
         linux_client = remote_client.RemoteClient(server_with_eph_disk,
                                                   self.ssh_user, admin_pass)
diff --git a/tempest/api/compute/servers/test_delete_server.py b/tempest/api/compute/servers/test_delete_server.py
index 7ccec8e..aec2f6f 100644
--- a/tempest/api/compute/servers/test_delete_server.py
+++ b/tempest/api/compute/servers/test_delete_server.py
@@ -35,27 +35,24 @@
     @test.attr(type='gate')
     def test_delete_server_while_in_building_state(self):
         # Delete a server while it's VM state is Building
-        resp, server = self.create_test_server(wait_until='BUILD')
-        resp, _ = self.client.delete_server(server['id'])
-        self.assertEqual('204', resp['status'])
+        server = self.create_test_server(wait_until='BUILD')
+        self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
 
     @test.attr(type='gate')
     def test_delete_active_server(self):
         # Delete a server while it's VM state is Active
-        resp, server = self.create_test_server(wait_until='ACTIVE')
-        resp, _ = self.client.delete_server(server['id'])
-        self.assertEqual('204', resp['status'])
+        server = self.create_test_server(wait_until='ACTIVE')
+        self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
 
     @test.attr(type='gate')
     def test_delete_server_while_in_shutoff_state(self):
         # Delete a server while it's VM state is Shutoff
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         resp, body = self.client.stop(server['id'])
         self.client.wait_for_server_status(server['id'], 'SHUTOFF')
-        resp, _ = self.client.delete_server(server['id'])
-        self.assertEqual('204', resp['status'])
+        self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
 
     @testtools.skipUnless(CONF.compute_feature_enabled.pause,
@@ -63,11 +60,10 @@
     @test.attr(type='gate')
     def test_delete_server_while_in_pause_state(self):
         # Delete a server while it's VM state is Pause
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         resp, body = self.client.pause_server(server['id'])
         self.client.wait_for_server_status(server['id'], 'PAUSED')
-        resp, _ = self.client.delete_server(server['id'])
-        self.assertEqual('204', resp['status'])
+        self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
 
     @testtools.skipUnless(CONF.compute_feature_enabled.suspend,
@@ -75,11 +71,10 @@
     @test.attr(type='gate')
     def test_delete_server_while_in_suspended_state(self):
         # Delete a server while it's VM state is Suspended
-        _, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         self.client.suspend_server(server['id'])
         self.client.wait_for_server_status(server['id'], 'SUSPENDED')
-        resp, _ = self.client.delete_server(server['id'])
-        self.assertEqual('204', resp['status'])
+        self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
 
     @testtools.skipUnless(CONF.compute_feature_enabled.shelve,
@@ -87,7 +82,7 @@
     @test.attr(type='gate')
     def test_delete_server_while_in_shelved_state(self):
         # Delete a server while it's VM state is Shelved
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         resp, body = self.client.shelve_server(server['id'])
         self.assertEqual(202, resp.status)
 
@@ -99,8 +94,7 @@
         else:
             self.client.wait_for_server_status(server['id'],
                                                'SHELVED')
-        resp, _ = self.client.delete_server(server['id'])
-        self.assertEqual('204', resp['status'])
+        self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
 
     @testtools.skipIf(not CONF.compute_feature_enabled.resize,
@@ -108,12 +102,11 @@
     @test.attr(type='gate')
     def test_delete_server_while_in_verify_resize_state(self):
         # Delete a server while it's VM state is VERIFY_RESIZE
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         resp, body = self.client.resize(server['id'], self.flavor_ref_alt)
         self.assertEqual(202, resp.status)
         self.client.wait_for_server_status(server['id'], 'VERIFY_RESIZE')
-        resp, _ = self.client.delete_server(server['id'])
-        self.assertEqual('204', resp['status'])
+        self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
 
     @test.services('volume')
@@ -122,7 +115,7 @@
         # Delete a server while a volume is attached to it
         volumes_client = self.volumes_extensions_client
         device = '/dev/%s' % CONF.compute.volume_device_name
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
 
         volume = volumes_client.create_volume(1)
         self.addCleanup(volumes_client.delete_volume, volume['id'])
@@ -132,8 +125,7 @@
                                   device=device)
         volumes_client.wait_for_volume_status(volume['id'], 'in-use')
 
-        resp, _ = self.client.delete_server(server['id'])
-        self.assertEqual('204', resp['status'])
+        self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
         volumes_client.wait_for_volume_status(volume['id'], 'available')
 
@@ -151,21 +143,19 @@
     @test.attr(type='gate')
     def test_delete_server_while_in_error_state(self):
         # Delete a server while it's VM state is error
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         resp, body = self.admin_client.reset_state(server['id'], state='error')
         self.assertEqual(202, resp.status)
         # Verify server's state
-        resp, server = self.non_admin_client.get_server(server['id'])
+        server = self.non_admin_client.get_server(server['id'])
         self.assertEqual(server['status'], 'ERROR')
-        resp, _ = self.non_admin_client.delete_server(server['id'])
-        self.assertEqual('204', resp['status'])
+        self.non_admin_client.delete_server(server['id'])
         self.servers_client.wait_for_server_termination(server['id'],
                                                         ignore_error=True)
 
     @test.attr(type='gate')
     def test_admin_delete_servers_of_others(self):
         # Administrator can delete servers of others
-        resp, server = self.create_test_server(wait_until='ACTIVE')
-        resp, _ = self.admin_client.delete_server(server['id'])
-        self.assertEqual('204', resp['status'])
+        server = self.create_test_server(wait_until='ACTIVE')
+        self.admin_client.delete_server(server['id'])
         self.servers_client.wait_for_server_termination(server['id'])
diff --git a/tempest/api/compute/servers/test_disk_config.py b/tempest/api/compute/servers/test_disk_config.py
index eeef0e5..f7a5bfb 100644
--- a/tempest/api/compute/servers/test_disk_config.py
+++ b/tempest/api/compute/servers/test_disk_config.py
@@ -31,17 +31,16 @@
             raise cls.skipException(msg)
         super(ServerDiskConfigTestJSON, cls).resource_setup()
         cls.client = cls.os.servers_client
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
+        server = cls.create_test_server(wait_until='ACTIVE')
         cls.server_id = server['id']
 
     def _update_server_with_disk_config(self, disk_config):
-        resp, server = self.client.get_server(self.server_id)
+        server = self.client.get_server(self.server_id)
         if disk_config != server['OS-DCF:diskConfig']:
-            resp, server = self.client.update_server(self.server_id,
-                                                     disk_config=disk_config)
-            self.assertEqual(200, resp.status)
+            server = self.client.update_server(self.server_id,
+                                               disk_config=disk_config)
             self.client.wait_for_server_status(server['id'], 'ACTIVE')
-            resp, server = self.client.get_server(server['id'])
+            server = self.client.get_server(server['id'])
             self.assertEqual(disk_config, server['OS-DCF:diskConfig'])
 
     @test.attr(type='gate')
@@ -57,7 +56,7 @@
         self.client.wait_for_server_status(server['id'], 'ACTIVE')
 
         # Verify the specified attributes are set correctly
-        resp, server = self.client.get_server(server['id'])
+        server = self.client.get_server(server['id'])
         self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
 
     @test.attr(type='gate')
@@ -73,11 +72,11 @@
         self.client.wait_for_server_status(server['id'], 'ACTIVE')
 
         # Verify the specified attributes are set correctly
-        resp, server = self.client.get_server(server['id'])
+        server = self.client.get_server(server['id'])
         self.assertEqual('AUTO', server['OS-DCF:diskConfig'])
 
     def _get_alternative_flavor(self):
-        resp, server = self.client.get_server(self.server_id)
+        server = self.client.get_server(self.server_id)
 
         if server['flavor']['id'] == self.flavor_ref:
             return self.flavor_ref_alt
@@ -98,7 +97,7 @@
         self.client.confirm_resize(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
-        resp, server = self.client.get_server(self.server_id)
+        server = self.client.get_server(self.server_id)
         self.assertEqual('AUTO', server['OS-DCF:diskConfig'])
 
     @testtools.skipUnless(CONF.compute_feature_enabled.resize,
@@ -115,7 +114,7 @@
         self.client.confirm_resize(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
-        resp, server = self.client.get_server(self.server_id)
+        server = self.client.get_server(self.server_id)
         self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
 
     @test.attr(type='gate')
@@ -124,11 +123,10 @@
         self._update_server_with_disk_config(disk_config='AUTO')
 
         # Update the disk_config attribute to manual
-        resp, server = self.client.update_server(self.server_id,
-                                                 disk_config='MANUAL')
-        self.assertEqual(200, resp.status)
+        server = self.client.update_server(self.server_id,
+                                           disk_config='MANUAL')
         self.client.wait_for_server_status(server['id'], 'ACTIVE')
 
         # Verify the disk_config attribute is set correctly
-        resp, server = self.client.get_server(server['id'])
+        server = self.client.get_server(server['id'])
         self.assertEqual('MANUAL', server['OS-DCF:diskConfig'])
diff --git a/tempest/api/compute/servers/test_instance_actions.py b/tempest/api/compute/servers/test_instance_actions.py
index 80b2a69..103c241 100644
--- a/tempest/api/compute/servers/test_instance_actions.py
+++ b/tempest/api/compute/servers/test_instance_actions.py
@@ -23,8 +23,8 @@
     def resource_setup(cls):
         super(InstanceActionsTestJSON, cls).resource_setup()
         cls.client = cls.servers_client
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
-        cls.request_id = resp['x-compute-request-id']
+        server = cls.create_test_server(wait_until='ACTIVE')
+        cls.request_id = server.response['x-compute-request-id']
         cls.server_id = server['id']
 
     @test.attr(type='gate')
diff --git a/tempest/api/compute/servers/test_instance_actions_negative.py b/tempest/api/compute/servers/test_instance_actions_negative.py
index e92f04c..2f9216f 100644
--- a/tempest/api/compute/servers/test_instance_actions_negative.py
+++ b/tempest/api/compute/servers/test_instance_actions_negative.py
@@ -13,9 +13,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -25,19 +26,19 @@
     def resource_setup(cls):
         super(InstanceActionsNegativeTestJSON, cls).resource_setup()
         cls.client = cls.servers_client
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
+        server = cls.create_test_server(wait_until='ACTIVE')
         cls.server_id = server['id']
 
     @test.attr(type=['negative', 'gate'])
     def test_list_instance_actions_non_existent_server(self):
         # List actions of the non-existent server id
         non_existent_server_id = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.list_instance_actions,
                           non_existent_server_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_get_instance_action_invalid_request(self):
         # Get the action details of the provided server with invalid request
-        self.assertRaises(exceptions.NotFound, self.client.get_instance_action,
+        self.assertRaises(lib_exc.NotFound, self.client.get_instance_action,
                           self.server_id, '999')
diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py
index 375f441..58740fd 100644
--- a/tempest/api/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -14,12 +14,12 @@
 #    under the License.
 
 from tempest_lib import decorators
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.compute import base
 from tempest.api import utils
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -28,11 +28,19 @@
 class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
+    def setup_credentials(cls):
         cls.set_network_resources(network=True, subnet=True, dhcp=True)
-        super(ListServerFiltersTestJSON, cls).resource_setup()
+        super(ListServerFiltersTestJSON, cls).setup_credentials()
+
+    @classmethod
+    def setup_clients(cls):
+        super(ListServerFiltersTestJSON, cls).setup_clients()
         cls.client = cls.servers_client
 
+    @classmethod
+    def resource_setup(cls):
+        super(ListServerFiltersTestJSON, cls).resource_setup()
+
         # Check to see if the alternate image ref actually exists...
         images_client = cls.images_client
         images = images_client.list_images()
@@ -48,29 +56,29 @@
         # not exist, fail early since the tests won't work...
         try:
             cls.images_client.get_image(cls.image_ref)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             raise RuntimeError("Image %s (image_ref) was not found!" %
                                cls.image_ref)
 
         try:
             cls.images_client.get_image(cls.image_ref_alt)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             raise RuntimeError("Image %s (image_ref_alt) was not found!" %
                                cls.image_ref_alt)
 
         cls.s1_name = data_utils.rand_name(cls.__name__ + '-instance')
-        resp, cls.s1 = cls.create_test_server(name=cls.s1_name,
-                                              wait_until='ACTIVE')
+        cls.s1 = cls.create_test_server(name=cls.s1_name,
+                                        wait_until='ACTIVE')
 
         cls.s2_name = data_utils.rand_name(cls.__name__ + '-instance')
-        resp, cls.s2 = cls.create_test_server(name=cls.s2_name,
-                                              image_id=cls.image_ref_alt,
-                                              wait_until='ACTIVE')
+        cls.s2 = cls.create_test_server(name=cls.s2_name,
+                                        image_id=cls.image_ref_alt,
+                                        wait_until='ACTIVE')
 
         cls.s3_name = data_utils.rand_name(cls.__name__ + '-instance')
-        resp, cls.s3 = cls.create_test_server(name=cls.s3_name,
-                                              flavor=cls.flavor_ref_alt,
-                                              wait_until='ACTIVE')
+        cls.s3 = cls.create_test_server(name=cls.s3_name,
+                                        flavor=cls.flavor_ref_alt,
+                                        wait_until='ACTIVE')
 
         cls.fixed_network_name = CONF.compute.fixed_network_name
         if CONF.service_available.neutron:
@@ -261,7 +269,7 @@
     def test_list_servers_filtered_by_ip(self):
         # Filter servers by ip
         # Here should be listed 1 server
-        resp, self.s1 = self.client.get_server(self.s1['id'])
+        self.s1 = self.client.get_server(self.s1['id'])
         ip = self.s1['addresses'][self.fixed_network_name][0]['addr']
         params = {'ip': ip}
         resp, body = self.client.list_servers(params)
@@ -278,7 +286,7 @@
         # Filter servers by regex ip
         # List all servers filtered by part of ip address.
         # Here should be listed all servers
-        resp, self.s1 = self.client.get_server(self.s1['id'])
+        self.s1 = self.client.get_server(self.s1['id'])
         ip = self.s1['addresses'][self.fixed_network_name][0]['addr'][0:-3]
         params = {'ip': ip}
         resp, body = self.client.list_servers(params)
diff --git a/tempest/api/compute/servers/test_list_servers_negative.py b/tempest/api/compute/servers/test_list_servers_negative.py
index fd66d2b..2f12882 100644
--- a/tempest/api/compute/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/servers/test_list_servers_negative.py
@@ -14,9 +14,9 @@
 #    under the License.
 
 from six import moves
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.compute import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -35,10 +35,10 @@
         cls.existing_fixtures = []
         cls.deleted_fixtures = []
         for x in moves.xrange(2):
-            resp, srv = cls.create_test_server(wait_until='ACTIVE')
+            srv = cls.create_test_server(wait_until='ACTIVE')
             cls.existing_fixtures.append(srv)
 
-        resp, srv = cls.create_test_server()
+        srv = cls.create_test_server()
         cls.client.delete_server(srv['id'])
         # We ignore errors on termination because the server may
         # be put into ERROR status on a quick spawn, then delete,
@@ -101,7 +101,6 @@
         # List servers by specifying limits
         resp, body = self.client.list_servers({'limit': 1})
         self.assertEqual('200', resp['status'])
-        # when _interface='xml', one element for servers_links in servers
         self.assertEqual(1, len([x for x in body['servers'] if 'id' in x]))
 
     @test.attr(type=['negative', 'gate'])
@@ -114,19 +113,19 @@
     @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,
+        self.assertRaises(lib_exc.BadRequest, self.client.list_servers,
                           {'limit': 'testing'})
 
     @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,
+        self.assertRaises(lib_exc.BadRequest, self.client.list_servers,
                           {'limit': -1})
 
     @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,
+        self.assertRaises(lib_exc.BadRequest, self.client.list_servers,
                           {'changes-since': '2011/01/01'})
 
     @test.attr(type=['negative', 'gate'])
diff --git a/tempest/api/compute/servers/test_multiple_create.py b/tempest/api/compute/servers/test_multiple_create.py
index 6fd2a75..cffda95 100644
--- a/tempest/api/compute/servers/test_multiple_create.py
+++ b/tempest/api/compute/servers/test_multiple_create.py
@@ -30,26 +30,24 @@
         created servers into the servers list to be cleaned up after all.
         """
         kwargs['name'] = kwargs.get('name', self._generate_name())
-        resp, body = self.create_test_server(**kwargs)
+        body = self.create_test_server(**kwargs)
 
-        return resp, body
+        return body
 
     @test.attr(type='gate')
     def test_multiple_create(self):
-        resp, body = self._create_multiple_servers(wait_until='ACTIVE',
-                                                   min_count=1,
-                                                   max_count=2)
+        body = self._create_multiple_servers(wait_until='ACTIVE',
+                                             min_count=1,
+                                             max_count=2)
         # NOTE(maurosr): do status response check and also make sure that
         # reservation_id is not in the response body when the request send
         # contains return_reservation_id=False
-        self.assertEqual('202', resp['status'])
         self.assertNotIn('reservation_id', body)
 
     @test.attr(type='gate')
     def test_multiple_create_with_reservation_return(self):
-        resp, body = self._create_multiple_servers(wait_until='ACTIVE',
-                                                   min_count=1,
-                                                   max_count=2,
-                                                   return_reservation_id=True)
-        self.assertEqual(resp['status'], '202')
+        body = self._create_multiple_servers(wait_until='ACTIVE',
+                                             min_count=1,
+                                             max_count=2,
+                                             return_reservation_id=True)
         self.assertIn('reservation_id', body)
diff --git a/tempest/api/compute/servers/test_multiple_create_negative.py b/tempest/api/compute/servers/test_multiple_create_negative.py
index 55db605..eca97c1 100644
--- a/tempest/api/compute/servers/test_multiple_create_negative.py
+++ b/tempest/api/compute/servers/test_multiple_create_negative.py
@@ -13,9 +13,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -31,38 +32,38 @@
         created servers into the servers list to be cleaned up after all.
         """
         kwargs['name'] = kwargs.get('name', self._generate_name())
-        resp, body = self.create_test_server(**kwargs)
+        body = self.create_test_server(**kwargs)
 
-        return resp, body
+        return body
 
     @test.attr(type=['negative', 'gate'])
     def test_min_count_less_than_one(self):
         invalid_min_count = 0
-        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
+        self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
                           min_count=invalid_min_count)
 
     @test.attr(type=['negative', 'gate'])
     def test_min_count_non_integer(self):
         invalid_min_count = 2.5
-        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
+        self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
                           min_count=invalid_min_count)
 
     @test.attr(type=['negative', 'gate'])
     def test_max_count_less_than_one(self):
         invalid_max_count = 0
-        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
+        self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
                           max_count=invalid_max_count)
 
     @test.attr(type=['negative', 'gate'])
     def test_max_count_non_integer(self):
         invalid_max_count = 2.5
-        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
+        self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
                           max_count=invalid_max_count)
 
     @test.attr(type=['negative', 'gate'])
     def test_max_count_less_than_min_count(self):
         min_count = 3
         max_count = 2
-        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
+        self.assertRaises(lib_exc.BadRequest, self._create_multiple_servers,
                           min_count=min_count,
                           max_count=max_count)
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 9edaede..f849b8c 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -18,13 +18,13 @@
 import urlparse
 
 from tempest_lib import decorators
+from tempest_lib import exceptions as lib_exc
 import testtools
 
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest.common.utils.linux import remote_client
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -47,7 +47,7 @@
             self.__class__.server_id = self.rebuild_server(self.server_id)
 
     def tearDown(self):
-        _, server = self.client.get_server(self.server_id)
+        server = self.client.get_server(self.server_id)
         self.assertEqual(self.image_ref, server['image']['id'])
         self.server_check_teardown()
         super(ServerActionsTestJSON, self).tearDown()
@@ -71,7 +71,7 @@
 
         if self.run_ssh:
             # Verify that the user can authenticate with the new password
-            resp, server = self.client.get_server(self.server_id)
+            server = self.client.get_server(self.server_id)
             linux_client = remote_client.RemoteClient(server, self.ssh_user,
                                                       new_password)
             linux_client.validate_authentication()
@@ -79,7 +79,7 @@
     def _test_reboot_server(self, reboot_type):
         if self.run_ssh:
             # Get the time the server was last rebooted,
-            resp, server = self.client.get_server(self.server_id)
+            server = self.client.get_server(self.server_id)
             linux_client = remote_client.RemoteClient(server, self.ssh_user,
                                                       self.password)
             boot_time = linux_client.get_boot_time()
@@ -131,7 +131,7 @@
 
         # Verify the server properties after the rebuild completes
         self.client.wait_for_server_status(rebuilt_server['id'], 'ACTIVE')
-        resp, server = self.client.get_server(rebuilt_server['id'])
+        server = self.client.get_server(rebuilt_server['id'])
         rebuilt_image_id = server['image']['id']
         self.assertTrue(self.image_ref_alt.endswith(rebuilt_image_id))
         self.assertEqual(new_name, server['name'])
@@ -148,7 +148,7 @@
     def test_rebuild_server_in_stop_state(self):
         # The server in stop state  should be rebuilt using the provided
         # image and remain in SHUTOFF state
-        resp, server = self.client.get_server(self.server_id)
+        server = self.client.get_server(self.server_id)
         old_image = server['image']['id']
         new_image = self.image_ref_alt \
             if old_image == self.image_ref else self.image_ref
@@ -165,7 +165,7 @@
 
         # Verify the server properties after the rebuild completes
         self.client.wait_for_server_status(rebuilt_server['id'], 'SHUTOFF')
-        resp, server = self.client.get_server(rebuilt_server['id'])
+        server = self.client.get_server(rebuilt_server['id'])
         rebuilt_image_id = server['image']['id']
         self.assertEqual(new_image, rebuilt_image_id)
 
@@ -177,7 +177,7 @@
 
     def _detect_server_image_flavor(self, server_id):
         # Detects the current server image flavor ref.
-        resp, server = self.client.get_server(server_id)
+        server = self.client.get_server(server_id)
         current_flavor = server['flavor']['id']
         new_flavor_ref = self.flavor_ref_alt \
             if current_flavor == self.flavor_ref else self.flavor_ref
@@ -204,7 +204,7 @@
         expected_status = 'SHUTOFF' if stop else 'ACTIVE'
         self.client.wait_for_server_status(self.server_id, expected_status)
 
-        resp, server = self.client.get_server(self.server_id)
+        server = self.client.get_server(self.server_id)
         self.assertEqual(new_flavor_ref, server['flavor']['id'])
 
         if stop:
@@ -240,7 +240,7 @@
         self.client.revert_resize(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
-        resp, server = self.client.get_server(self.server_id)
+        server = self.client.get_server(self.server_id)
         self.assertEqual(previous_flavor_ref, server['flavor']['id'])
 
     @testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
@@ -262,7 +262,7 @@
             if oldest_backup_exist:
                 try:
                     self.os.image_client.delete_image(oldest_backup)
-                except exceptions.NotFound:
+                except lib_exc.NotFound:
                     pass
                 else:
                     LOG.warning("Deletion of oldest backup %s should not have "
@@ -358,7 +358,7 @@
                           'Console output not supported.')
     @test.attr(type='gate')
     def test_get_console_output_with_unlimited_size(self):
-        _, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
 
         def _check_full_length_console_log():
             _, output = self.servers_client.get_console_output(server['id'],
@@ -383,7 +383,7 @@
         # NOTE: SHUTOFF is irregular status. To avoid test instability,
         #       one server is created only for this test without using
         #       the server that was created in setupClass.
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         temp_server_id = server['id']
 
         resp, server = self.servers_client.stop(temp_server_id)
@@ -435,7 +435,7 @@
             self.client.wait_for_server_status(self.server_id,
                                                'SHELVED_OFFLOADED')
 
-        resp, server = self.client.get_server(self.server_id)
+        server = self.client.get_server(self.server_id)
         image_name = server['name'] + '-shelved'
         params = {'name': image_name}
         images = self.images_client.list_images(params)
@@ -460,11 +460,10 @@
         # Lock the server,try server stop(exceptions throw),unlock it and retry
         resp, server = self.servers_client.lock_server(self.server_id)
         self.assertEqual(202, resp.status)
-        resp, server = self.servers_client.get_server(self.server_id)
-        self.assertEqual(200, resp.status)
+        server = self.servers_client.get_server(self.server_id)
         self.assertEqual(server['status'], 'ACTIVE')
         # Locked server is not allowed to be stopped by non-admin user
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.servers_client.stop, self.server_id)
         resp, server = self.servers_client.unlock_server(self.server_id)
         self.assertEqual(202, resp.status)
diff --git a/tempest/api/compute/servers/test_server_addresses.py b/tempest/api/compute/servers/test_server_addresses.py
index 3d1d964..5a63033 100644
--- a/tempest/api/compute/servers/test_server_addresses.py
+++ b/tempest/api/compute/servers/test_server_addresses.py
@@ -20,13 +20,21 @@
 class ServerAddressesTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
+    def setup_credentials(cls):
         # This test module might use a network and a subnet
         cls.set_network_resources(network=True, subnet=True)
-        super(ServerAddressesTestJSON, cls).resource_setup()
+        super(ServerAddressesTestJSON, cls).setup_credentials()
+
+    @classmethod
+    def setup_clients(cls):
+        super(ServerAddressesTestJSON, cls).setup_clients()
         cls.client = cls.servers_client
 
-        resp, cls.server = cls.create_test_server(wait_until='ACTIVE')
+    @classmethod
+    def resource_setup(cls):
+        super(ServerAddressesTestJSON, cls).resource_setup()
+
+        cls.server = cls.create_test_server(wait_until='ACTIVE')
 
     @test.attr(type='smoke')
     @test.services('network')
diff --git a/tempest/api/compute/servers/test_server_addresses_negative.py b/tempest/api/compute/servers/test_server_addresses_negative.py
index 3087e59..b32231a 100644
--- a/tempest/api/compute/servers/test_server_addresses_negative.py
+++ b/tempest/api/compute/servers/test_server_addresses_negative.py
@@ -13,32 +13,40 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
-from tempest import exceptions
 from tempest import test
 
 
 class ServerAddressesNegativeTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
+    def setup_credentials(cls):
         cls.set_network_resources(network=True, subnet=True)
-        super(ServerAddressesNegativeTestJSON, cls).resource_setup()
+        super(ServerAddressesNegativeTestJSON, cls).setup_credentials()
+
+    @classmethod
+    def setup_clients(cls):
+        super(ServerAddressesNegativeTestJSON, cls).setup_clients()
         cls.client = cls.servers_client
 
-        resp, cls.server = cls.create_test_server(wait_until='ACTIVE')
+    @classmethod
+    def resource_setup(cls):
+        super(ServerAddressesNegativeTestJSON, cls).resource_setup()
+        cls.server = cls.create_test_server(wait_until='ACTIVE')
 
     @test.attr(type=['negative', 'gate'])
     @test.services('network')
     def test_list_server_addresses_invalid_server_id(self):
         # List addresses request should fail if server id not in system
-        self.assertRaises(exceptions.NotFound, self.client.list_addresses,
+        self.assertRaises(lib_exc.NotFound, self.client.list_addresses,
                           '999')
 
     @test.attr(type=['negative', 'gate'])
     @test.services('network')
     def test_list_server_addresses_by_network_neg(self):
         # List addresses by network should fail if network name not valid
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.list_addresses_by_network,
                           self.server['id'], 'invalid')
diff --git a/tempest/api/compute/servers/test_server_metadata.py b/tempest/api/compute/servers/test_server_metadata.py
index 6fd6a6d..7e8247f 100644
--- a/tempest/api/compute/servers/test_server_metadata.py
+++ b/tempest/api/compute/servers/test_server_metadata.py
@@ -24,7 +24,7 @@
         super(ServerMetadataTestJSON, cls).resource_setup()
         cls.client = cls.servers_client
         cls.quotas = cls.quotas_client
-        resp, server = cls.create_test_server(meta={}, wait_until='ACTIVE')
+        server = cls.create_test_server(meta={}, wait_until='ACTIVE')
         cls.server_id = server['id']
 
     def setUp(self):
diff --git a/tempest/api/compute/servers/test_server_metadata_negative.py b/tempest/api/compute/servers/test_server_metadata_negative.py
index e193677..441c965 100644
--- a/tempest/api/compute/servers/test_server_metadata_negative.py
+++ b/tempest/api/compute/servers/test_server_metadata_negative.py
@@ -13,9 +13,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -27,7 +28,7 @@
         cls.client = cls.servers_client
         cls.quotas = cls.quotas_client
         cls.tenant_id = cls.client.tenant_id
-        resp, server = cls.create_test_server(meta={}, wait_until='ACTIVE')
+        server = cls.create_test_server(meta={}, wait_until='ACTIVE')
 
         cls.server_id = server['id']
 
@@ -40,7 +41,7 @@
         for sz in [256, 257, 511, 1023]:
             key = "k" * sz
             meta = {key: 'data1'}
-            self.assertRaises((exceptions.BadRequest, exceptions.OverLimit),
+            self.assertRaises((lib_exc.BadRequest, lib_exc.OverLimit),
                               self.create_test_server,
                               meta=meta)
 
@@ -50,7 +51,7 @@
     def test_create_server_metadata_blank_key(self):
         # Blank key should trigger an error.
         meta = {'': 'data1'}
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
                           meta=meta)
 
@@ -58,7 +59,7 @@
     def test_server_metadata_non_existent_server(self):
         # GET on a non-existent server should not succeed
         non_existent_server_id = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.get_server_metadata_item,
                           non_existent_server_id,
                           'test2')
@@ -67,7 +68,7 @@
     def test_list_server_metadata_non_existent_server(self):
         # List metadata on a non-existent server should not succeed
         non_existent_server_id = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.list_server_metadata,
                           non_existent_server_id)
 
@@ -76,7 +77,7 @@
         # Raise BadRequest if key in uri does not match
         # the key passed in body.
         meta = {'testkey': 'testvalue'}
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.set_server_metadata_item,
                           self.server_id, 'key', meta)
 
@@ -85,7 +86,7 @@
         # Set metadata on a non-existent server should not succeed
         non_existent_server_id = data_utils.rand_uuid()
         meta = {'meta1': 'data1'}
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.set_server_metadata,
                           non_existent_server_id,
                           meta)
@@ -95,7 +96,7 @@
         # An update should not happen for a non-existent server
         non_existent_server_id = data_utils.rand_uuid()
         meta = {'key1': 'value1', 'key2': 'value2'}
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.update_server_metadata,
                           non_existent_server_id,
                           meta)
@@ -104,7 +105,7 @@
     def test_update_metadata_with_blank_key(self):
         # Blank key should trigger an error
         meta = {'': 'data1'}
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_server_metadata,
                           self.server_id, meta=meta)
 
@@ -112,7 +113,7 @@
     def test_delete_metadata_non_existent_server(self):
         # Should not be able to delete metadata item from a non-existent server
         non_existent_server_id = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.delete_server_metadata_item,
                           non_existent_server_id,
                           'd')
@@ -130,14 +131,14 @@
         req_metadata = {}
         for num in range(1, quota_metadata + 2):
             req_metadata['key' + str(num)] = 'val' + str(num)
-        self.assertRaises((exceptions.OverLimit, exceptions.Unauthorized),
+        self.assertRaises((lib_exc.OverLimit, lib_exc.Unauthorized),
                           self.client.set_server_metadata,
                           self.server_id, req_metadata)
 
         # A 403 Forbidden or 413 Overlimit (old behaviour) exception
         # will be raised while exceeding metadata items limit for
         # tenant.
-        self.assertRaises((exceptions.Unauthorized, exceptions.OverLimit),
+        self.assertRaises((lib_exc.Unauthorized, lib_exc.OverLimit),
                           self.client.update_server_metadata,
                           self.server_id, req_metadata)
 
@@ -146,7 +147,7 @@
         # Raise a bad request error for blank key.
         # set_server_metadata will replace all metadata with new value
         meta = {'': 'data1'}
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.set_server_metadata,
                           self.server_id, meta=meta)
 
@@ -155,6 +156,6 @@
         # Raise a bad request error for a missing metadata field
         # set_server_metadata will replace all metadata with new value
         meta = {'meta1': 'data1'}
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.set_server_metadata,
                           self.server_id, meta=meta, no_metadata_field=True)
diff --git a/tempest/api/compute/servers/test_server_password.py b/tempest/api/compute/servers/test_server_password.py
index 994caa4..b2e09f2 100644
--- a/tempest/api/compute/servers/test_server_password.py
+++ b/tempest/api/compute/servers/test_server_password.py
@@ -24,7 +24,7 @@
     def resource_setup(cls):
         super(ServerPasswordTestJSON, cls).resource_setup()
         cls.client = cls.servers_client
-        resp, cls.server = cls.create_test_server(wait_until="ACTIVE")
+        cls.server = cls.create_test_server(wait_until="ACTIVE")
 
     @test.attr(type='gate')
     def test_get_server_password(self):
diff --git a/tempest/api/compute/servers/test_server_personality.py b/tempest/api/compute/servers/test_server_personality.py
index c6d48bc..ca6e28c 100644
--- a/tempest/api/compute/servers/test_server_personality.py
+++ b/tempest/api/compute/servers/test_server_personality.py
@@ -14,9 +14,9 @@
 #    under the License.
 
 import base64
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.compute import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -44,7 +44,7 @@
                                 'contents': base64.b64encode(file_contents)})
         # A 403 Forbidden or 413 Overlimit (old behaviour) exception
         # will be raised when out of quota
-        self.assertRaises((exceptions.Unauthorized, exceptions.OverLimit),
+        self.assertRaises((lib_exc.Unauthorized, lib_exc.OverLimit),
                           self.create_test_server, personality=personality)
 
     @test.attr(type='gate')
@@ -63,5 +63,4 @@
                 'path': path,
                 'contents': base64.b64encode(file_contents),
             })
-        resp, server = self.create_test_server(personality=person)
-        self.assertEqual('202', resp['status'])
+        self.create_test_server(personality=person)
diff --git a/tempest/api/compute/servers/test_server_rescue.py b/tempest/api/compute/servers/test_server_rescue.py
index b04fe69..8d5c8f8 100644
--- a/tempest/api/compute/servers/test_server_rescue.py
+++ b/tempest/api/compute/servers/test_server_rescue.py
@@ -24,16 +24,23 @@
 class ServerRescueTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(ServerRescueTestJSON, cls).skip_checks()
         if not CONF.compute_feature_enabled.rescue:
             msg = "Server rescue not available."
             raise cls.skipException(msg)
 
+    @classmethod
+    def setup_credentials(cls):
         cls.set_network_resources(network=True, subnet=True, router=True)
+        super(ServerRescueTestJSON, cls).setup_credentials()
+
+    @classmethod
+    def resource_setup(cls):
         super(ServerRescueTestJSON, cls).resource_setup()
 
         # Floating IP creation
-        resp, body = cls.floating_ips_client.create_floating_ip()
+        body = cls.floating_ips_client.create_floating_ip()
         cls.floating_ip_id = str(body['id']).strip()
         cls.floating_ip = str(body['ip']).strip()
 
@@ -46,7 +53,7 @@
         cls.sg_id = cls.sg['id']
 
         # Server for positive tests
-        resp, server = cls.create_test_server(wait_until='BUILD')
+        server = cls.create_test_server(wait_until='BUILD')
         cls.server_id = server['id']
         cls.password = server['adminPass']
         cls.servers_client.wait_for_server_status(cls.server_id, 'ACTIVE')
@@ -90,15 +97,12 @@
 
         # Association of floating IP to a rescued vm
         client = self.floating_ips_client
-        resp, body = client.associate_floating_ip_to_server(self.floating_ip,
-                                                            self.server_id)
-        self.assertEqual(202, resp.status)
+        client.associate_floating_ip_to_server(self.floating_ip,
+                                               self.server_id)
 
         # Disassociation of floating IP that was associated in this method
-        resp, body = \
-            client.disassociate_floating_ip_from_server(self.floating_ip,
-                                                        self.server_id)
-        self.assertEqual(202, resp.status)
+        client.disassociate_floating_ip_from_server(self.floating_ip,
+                                                    self.server_id)
 
     @test.attr(type='gate')
     def test_rescued_vm_add_remove_security_group(self):
diff --git a/tempest/api/compute/servers/test_server_rescue_negative.py b/tempest/api/compute/servers/test_server_rescue_negative.py
index c01a95c..58353e7 100644
--- a/tempest/api/compute/servers/test_server_rescue_negative.py
+++ b/tempest/api/compute/servers/test_server_rescue_negative.py
@@ -12,12 +12,13 @@
 #    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_lib import exceptions as lib_exc
 import testtools
 
 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
@@ -26,18 +27,25 @@
 class ServerRescueNegativeTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(ServerRescueNegativeTestJSON, cls).skip_checks()
         if not CONF.compute_feature_enabled.rescue:
             msg = "Server rescue not available."
             raise cls.skipException(msg)
 
+    @classmethod
+    def setup_credentials(cls):
         cls.set_network_resources(network=True, subnet=True, router=True)
+        super(ServerRescueNegativeTestJSON, cls).setup_credentials()
+
+    @classmethod
+    def resource_setup(cls):
         super(ServerRescueNegativeTestJSON, cls).resource_setup()
         cls.device = CONF.compute.volume_device_name
 
         # Server for negative tests
-        resp, server = cls.create_test_server(wait_until='BUILD')
-        resp, resc_server = cls.create_test_server(wait_until='ACTIVE')
+        server = cls.create_test_server(wait_until='BUILD')
+        resc_server = cls.create_test_server(wait_until='ACTIVE')
         cls.server_id = server['id']
         cls.password = server['adminPass']
         cls.rescue_id = resc_server['id']
@@ -81,26 +89,26 @@
         self.addCleanup(self._unpause, self.server_id)
         self.assertEqual(202, resp.status)
         self.servers_client.wait_for_server_status(self.server_id, 'PAUSED')
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.servers_client.rescue_server,
                           self.server_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_rescued_vm_reboot(self):
-        self.assertRaises(exceptions.Conflict, self.servers_client.reboot,
+        self.assertRaises(lib_exc.Conflict, self.servers_client.reboot,
                           self.rescue_id, 'HARD')
 
     @test.attr(type=['negative', 'gate'])
     def test_rescue_non_existent_server(self):
         # Rescue a non-existing server
         non_existent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.servers_client.rescue_server,
                           non_existent_server)
 
     @test.attr(type=['negative', 'gate'])
     def test_rescued_vm_rebuild(self):
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.servers_client.rebuild,
                           self.rescue_id,
                           self.image_ref_alt)
@@ -117,7 +125,7 @@
         self.addCleanup(self._unrescue, self.server_id)
 
         # Attach the volume to the server
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.servers_client.attach_volume,
                           self.server_id,
                           volume['id'],
@@ -144,7 +152,7 @@
         self.addCleanup(self._unrescue, self.server_id)
 
         # Detach the volume from the server expecting failure
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.servers_client.detach_volume,
                           self.server_id,
                           volume['id'])
diff --git a/tempest/api/compute/servers/test_servers.py b/tempest/api/compute/servers/test_servers.py
index d31b320..1375039 100644
--- a/tempest/api/compute/servers/test_servers.py
+++ b/tempest/api/compute/servers/test_servers.py
@@ -33,7 +33,7 @@
     def test_create_server_with_admin_password(self):
         # If an admin password is provided on server creation, the server's
         # root password should be set to that password.
-        resp, server = self.create_test_server(adminPass='testpassword')
+        server = self.create_test_server(adminPass='testpassword')
 
         # Verify the password is set correctly in the response
         self.assertEqual('testpassword', server['adminPass'])
@@ -44,16 +44,16 @@
 
         # TODO(sdague): clear out try, we do cleanup one layer up
         server_name = data_utils.rand_name('server')
-        resp, server = self.create_test_server(name=server_name,
-                                               wait_until='ACTIVE')
+        server = self.create_test_server(name=server_name,
+                                         wait_until='ACTIVE')
         id1 = server['id']
-        resp, server = self.create_test_server(name=server_name,
-                                               wait_until='ACTIVE')
+        server = self.create_test_server(name=server_name,
+                                         wait_until='ACTIVE')
         id2 = server['id']
         self.assertNotEqual(id1, id2, "Did not create a new server")
-        resp, server = self.client.get_server(id1)
+        server = self.client.get_server(id1)
         name1 = server['name']
-        resp, server = self.client.get_server(id2)
+        server = self.client.get_server(id2)
         name2 = server['name']
         self.assertEqual(name1, name2)
 
@@ -64,36 +64,35 @@
         key_name = data_utils.rand_name('key')
         self.keypairs_client.create_keypair(key_name)
         self.keypairs_client.list_keypairs()
-        resp, server = self.create_test_server(key_name=key_name)
-        self.assertEqual('202', resp['status'])
+        server = self.create_test_server(key_name=key_name)
         self.client.wait_for_server_status(server['id'], 'ACTIVE')
-        resp, server = self.client.get_server(server['id'])
+        server = self.client.get_server(server['id'])
         self.assertEqual(key_name, server['key_name'])
 
     def _update_server_name(self, server_id, status):
         # The server name should be changed to the the provided value
         new_name = data_utils.rand_name('server')
         # Update the server with a new name
-        resp, server = self.client.update_server(server_id,
-                                                 name=new_name)
+        self.client.update_server(server_id,
+                                  name=new_name)
         self.client.wait_for_server_status(server_id, status)
 
         # Verify the name of the server has changed
-        resp, server = self.client.get_server(server_id)
+        server = self.client.get_server(server_id)
         self.assertEqual(new_name, server['name'])
         return server
 
     @test.attr(type='gate')
     def test_update_server_name(self):
         # The server name should be changed to the the provided value
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
 
         self._update_server_name(server['id'], 'ACTIVE')
 
     @test.attr(type='gate')
     def test_update_server_name_in_stop_state(self):
         # The server name should be changed to the the provided value
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
         self.client.stop(server['id'])
         self.client.wait_for_server_status(server['id'], 'SHUTOFF')
         updated_server = self._update_server_name(server['id'], 'SHUTOFF')
@@ -102,25 +101,23 @@
     @test.attr(type='gate')
     def test_update_access_server_address(self):
         # The server's access addresses should reflect the provided values
-        resp, server = self.create_test_server(wait_until='ACTIVE')
+        server = self.create_test_server(wait_until='ACTIVE')
 
         # Update the IPv4 and IPv6 access addresses
-        resp, body = self.client.update_server(server['id'],
-                                               accessIPv4='1.1.1.1',
-                                               accessIPv6='::babe:202:202')
-        self.assertEqual(200, resp.status)
+        self.client.update_server(server['id'],
+                                  accessIPv4='1.1.1.1',
+                                  accessIPv6='::babe:202:202')
         self.client.wait_for_server_status(server['id'], 'ACTIVE')
 
         # Verify the access addresses have been updated
-        resp, server = self.client.get_server(server['id'])
+        server = self.client.get_server(server['id'])
         self.assertEqual('1.1.1.1', server['accessIPv4'])
         self.assertEqual('::babe:202:202', server['accessIPv6'])
 
     @test.attr(type='gate')
     def test_create_server_with_ipv6_addr_only(self):
         # Create a server without an IPv4 address(only IPv6 address).
-        resp, server = self.create_test_server(accessIPv6='2001:2001::3')
-        self.assertEqual('202', resp['status'])
+        server = self.create_test_server(accessIPv6='2001:2001::3')
         self.client.wait_for_server_status(server['id'], 'ACTIVE')
-        resp, server = self.client.get_server(server['id'])
+        server = self.client.get_server(server['id'])
         self.assertEqual('2001:2001::3', server['accessIPv6'])
diff --git a/tempest/api/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py
index b703cfe..d89aff4 100644
--- a/tempest/api/compute/servers/test_servers_negative.py
+++ b/tempest/api/compute/servers/test_servers_negative.py
@@ -15,13 +15,13 @@
 
 import sys
 
+from tempest_lib import exceptions as lib_exc
 import testtools
 
 from tempest.api.compute import base
 from tempest import clients
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -46,14 +46,14 @@
         cls.client = cls.servers_client
         cls.alt_os = clients.Manager(cls.isolated_creds.get_alt_creds())
         cls.alt_client = cls.alt_os.servers_client
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
+        server = cls.create_test_server(wait_until='ACTIVE')
         cls.server_id = server['id']
 
     @test.attr(type=['negative', 'gate'])
     def test_server_name_blank(self):
         # Create a server with name parameter empty
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
                           name='')
 
@@ -65,7 +65,7 @@
         person = [{'path': '/etc/testfile.txt',
                    'contents': file_contents}]
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
                           personality=person)
 
@@ -73,7 +73,7 @@
     def test_create_with_invalid_image(self):
         # Create a server with an unknown image
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
                           image_id=-1)
 
@@ -81,7 +81,7 @@
     def test_create_with_invalid_flavor(self):
         # Create a server with an unknown flavor
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
                           flavor=-1,)
 
@@ -90,7 +90,7 @@
         # An access IPv4 address must match a valid address pattern
 
         IPv4 = '1.1.1.1.1.1'
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server, accessIPv4=IPv4)
 
     @test.attr(type=['negative', 'gate'])
@@ -99,7 +99,7 @@
 
         IPv6 = 'notvalid'
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server, accessIPv6=IPv6)
 
     @testtools.skipUnless(CONF.compute_feature_enabled.resize,
@@ -108,7 +108,7 @@
     def test_resize_nonexistent_server(self):
         # Resize a non-existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.resize,
                           nonexistent_server, self.flavor_ref)
 
@@ -118,7 +118,7 @@
     def test_resize_server_with_non_existent_flavor(self):
         # Resize a server with non-existent flavor
         nonexistent_flavor = data_utils.rand_uuid()
-        self.assertRaises(exceptions.BadRequest, self.client.resize,
+        self.assertRaises(lib_exc.BadRequest, self.client.resize,
                           self.server_id, flavor_ref=nonexistent_flavor)
 
     @testtools.skipUnless(CONF.compute_feature_enabled.resize,
@@ -126,14 +126,14 @@
     @test.attr(type=['negative', 'gate'])
     def test_resize_server_with_null_flavor(self):
         # Resize a server with null flavor
-        self.assertRaises(exceptions.BadRequest, self.client.resize,
+        self.assertRaises(lib_exc.BadRequest, self.client.resize,
                           self.server_id, flavor_ref="")
 
     @test.attr(type=['negative', 'gate'])
     def test_reboot_non_existent_server(self):
         # Reboot a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.reboot,
+        self.assertRaises(lib_exc.NotFound, self.client.reboot,
                           nonexistent_server, 'SOFT')
 
     @testtools.skipUnless(CONF.compute_feature_enabled.pause,
@@ -143,7 +143,7 @@
         # Pause a paused server.
         self.client.pause_server(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'PAUSED')
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.pause_server,
                           self.server_id)
         self.client.unpause_server(self.server_id)
@@ -151,21 +151,21 @@
     @test.attr(type=['negative', 'gate'])
     def test_rebuild_reboot_deleted_server(self):
         # Rebuild and Reboot a deleted server
-        _, server = self.create_test_server()
+        server = self.create_test_server()
         self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
 
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.rebuild,
                           server['id'], self.image_ref_alt)
-        self.assertRaises(exceptions.NotFound, self.client.reboot,
+        self.assertRaises(lib_exc.NotFound, self.client.reboot,
                           server['id'], 'SOFT')
 
     @test.attr(type=['negative', 'gate'])
     def test_rebuild_non_existent_server(self):
         # Rebuild a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.rebuild,
                           nonexistent_server,
                           self.image_ref_alt)
@@ -173,7 +173,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_create_numeric_server_name(self):
         server_name = 12345
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
                           name=server_name)
 
@@ -182,7 +182,7 @@
         # Create a server with name length exceeding 256 characters
 
         server_name = 'a' * 256
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
                           name=server_name)
 
@@ -192,7 +192,7 @@
 
         networks = [{'fixed_ip': '10.0.1.1', 'uuid': 'a-b-c-d-e-f-g-h-i-j'}]
 
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
                           networks=networks)
 
@@ -201,7 +201,7 @@
         # Pass a non-existent keypair while creating a server
 
         key_name = data_utils.rand_name('key')
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
                           key_name=key_name)
 
@@ -210,7 +210,7 @@
         # Pass really long metadata while creating a server
 
         metadata = {'a': 'b' * 260}
-        self.assertRaises((exceptions.BadRequest, exceptions.OverLimit),
+        self.assertRaises((lib_exc.BadRequest, lib_exc.OverLimit),
                           self.create_test_server,
                           meta=metadata)
 
@@ -221,7 +221,7 @@
         server_name = data_utils.rand_name('server')
         new_name = data_utils.rand_name('server') + '_updated'
 
-        self.assertRaises(exceptions.NotFound, self.client.update_server,
+        self.assertRaises(lib_exc.NotFound, self.client.update_server,
                           server_name, name=new_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -231,7 +231,7 @@
         server_name = data_utils.rand_name('server')
         new_name = ''
 
-        self.assertRaises(exceptions.BadRequest, self.client.update_server,
+        self.assertRaises(lib_exc.BadRequest, self.client.update_server,
                           server_name, name=new_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -239,7 +239,7 @@
         # Update name of a server that belongs to another tenant
 
         new_name = self.server_id + '_new'
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_client.update_server, self.server_id,
                           name=new_name)
 
@@ -248,7 +248,7 @@
         # Update name of server exceed the name length limit
 
         new_name = 'a' * 256
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_server,
                           self.server_id,
                           name=new_name)
@@ -258,13 +258,13 @@
         # Delete a non existent server
 
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.delete_server,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_server,
                           nonexistent_server)
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_a_server_of_another_tenant(self):
         # Delete a server that belongs to another tenant
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_client.delete_server,
                           self.server_id)
 
@@ -272,13 +272,13 @@
     def test_delete_server_pass_negative_id(self):
         # Pass an invalid string parameter to delete server
 
-        self.assertRaises(exceptions.NotFound, self.client.delete_server, -1)
+        self.assertRaises(lib_exc.NotFound, self.client.delete_server, -1)
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_server_pass_id_exceeding_length_limit(self):
         # Pass a server ID that exceeds length limit to delete server
 
-        self.assertRaises(exceptions.NotFound, self.client.delete_server,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_server,
                           sys.maxint + 1)
 
     @test.attr(type=['negative', 'gate'])
@@ -286,7 +286,7 @@
         # Create a server with a nonexistent security group
 
         security_groups = [{'name': 'does_not_exist'}]
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_test_server,
                           security_groups=security_groups)
 
@@ -294,14 +294,14 @@
     def test_get_non_existent_server(self):
         # Get a non existent server details
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.get_server,
+        self.assertRaises(lib_exc.NotFound, self.client.get_server,
                           nonexistent_server)
 
     @test.attr(type=['negative', 'gate'])
     def test_stop_non_existent_server(self):
         # Stop a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.servers_client.stop,
+        self.assertRaises(lib_exc.NotFound, self.servers_client.stop,
                           nonexistent_server)
 
     @testtools.skipUnless(CONF.compute_feature_enabled.pause,
@@ -310,7 +310,7 @@
     def test_pause_non_existent_server(self):
         # pause a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.pause_server,
+        self.assertRaises(lib_exc.NotFound, self.client.pause_server,
                           nonexistent_server)
 
     @testtools.skipUnless(CONF.compute_feature_enabled.pause,
@@ -319,7 +319,7 @@
     def test_unpause_non_existent_server(self):
         # unpause a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.unpause_server,
+        self.assertRaises(lib_exc.NotFound, self.client.unpause_server,
                           nonexistent_server)
 
     @testtools.skipUnless(CONF.compute_feature_enabled.pause,
@@ -327,7 +327,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_unpause_server_invalid_state(self):
         # unpause an active server.
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.unpause_server,
                           self.server_id)
 
@@ -337,7 +337,7 @@
     def test_suspend_non_existent_server(self):
         # suspend a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.suspend_server,
+        self.assertRaises(lib_exc.NotFound, self.client.suspend_server,
                           nonexistent_server)
 
     @testtools.skipUnless(CONF.compute_feature_enabled.suspend,
@@ -348,7 +348,7 @@
         resp, _ = self.client.suspend_server(self.server_id)
         self.assertEqual(202, resp.status)
         self.client.wait_for_server_status(self.server_id, 'SUSPENDED')
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.suspend_server,
                           self.server_id)
         self.client.resume_server(self.server_id)
@@ -359,7 +359,7 @@
     def test_resume_non_existent_server(self):
         # resume a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.resume_server,
+        self.assertRaises(lib_exc.NotFound, self.client.resume_server,
                           nonexistent_server)
 
     @testtools.skipUnless(CONF.compute_feature_enabled.suspend,
@@ -367,7 +367,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_resume_server_invalid_state(self):
         # resume an active server.
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.resume_server,
                           self.server_id)
 
@@ -375,7 +375,7 @@
     def test_get_console_output_of_non_existent_server(self):
         # get the console output for a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.get_console_output,
                           nonexistent_server, 10)
 
@@ -383,7 +383,7 @@
     def test_force_delete_nonexistent_server_id(self):
         # force-delete a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.force_delete_server,
                           nonexistent_server)
 
@@ -391,14 +391,14 @@
     def test_restore_nonexistent_server_id(self):
         # restore-delete a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.restore_soft_deleted_server,
                           nonexistent_server)
 
     @test.attr(type=['negative', 'gate'])
     def test_restore_server_invalid_state(self):
         # we can only restore-delete a server in 'soft-delete' state
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.restore_soft_deleted_server,
                           self.server_id)
 
@@ -408,7 +408,7 @@
     def test_shelve_non_existent_server(self):
         # shelve a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.shelve_server,
+        self.assertRaises(lib_exc.NotFound, self.client.shelve_server,
                           nonexistent_server)
 
     @testtools.skipUnless(CONF.compute_feature_enabled.shelve,
@@ -428,14 +428,14 @@
             self.client.wait_for_server_status(self.server_id,
                                                'SHELVED')
 
-        resp, server = self.client.get_server(self.server_id)
+        server = self.client.get_server(self.server_id)
         image_name = server['name'] + '-shelved'
         params = {'name': image_name}
         images = self.images_client.list_images(params)
         self.assertEqual(1, len(images))
         self.assertEqual(image_name, images[0]['name'])
 
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.shelve_server,
                           self.server_id)
 
@@ -447,7 +447,7 @@
     def test_unshelve_non_existent_server(self):
         # unshelve a non existent server
         nonexistent_server = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.unshelve_server,
+        self.assertRaises(lib_exc.NotFound, self.client.unshelve_server,
                           nonexistent_server)
 
     @testtools.skipUnless(CONF.compute_feature_enabled.shelve,
@@ -455,6 +455,6 @@
     @test.attr(type=['negative', 'gate'])
     def test_unshelve_server_invalid_state(self):
         # unshelve an active server.
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.unshelve_server,
                           self.server_id)
diff --git a/tempest/api/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py
index e07a7ed..5c76ba7 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -26,12 +26,20 @@
 class VirtualInterfacesTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
+    def setup_credentials(cls):
         # This test needs a network and a subnet
         cls.set_network_resources(network=True, subnet=True)
-        super(VirtualInterfacesTestJSON, cls).resource_setup()
+        super(VirtualInterfacesTestJSON, cls).setup_credentials()
+
+    @classmethod
+    def setup_clients(cls):
+        super(VirtualInterfacesTestJSON, cls).setup_clients()
         cls.client = cls.servers_client
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
+
+    @classmethod
+    def resource_setup(cls):
+        super(VirtualInterfacesTestJSON, cls).resource_setup()
+        server = cls.create_test_server(wait_until='ACTIVE')
         cls.server_id = server['id']
 
     @decorators.skip_because(bug="1183436",
diff --git a/tempest/api/compute/servers/test_virtual_interfaces_negative.py b/tempest/api/compute/servers/test_virtual_interfaces_negative.py
index e81ccc6..58c4fcd 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces_negative.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces_negative.py
@@ -15,18 +15,23 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
-from tempest import exceptions
 from tempest import test
 
 
 class VirtualInterfacesNegativeTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
+    def setup_credentials(cls):
         # For this test no network resources are needed
         cls.set_network_resources()
-        super(VirtualInterfacesNegativeTestJSON, cls).resource_setup()
+        super(VirtualInterfacesNegativeTestJSON, cls).setup_credentials()
+
+    @classmethod
+    def setup_clients(cls):
+        super(VirtualInterfacesNegativeTestJSON, cls).setup_clients()
         cls.client = cls.servers_client
 
     @test.attr(type=['negative', 'gate'])
@@ -35,6 +40,6 @@
         # Negative test: Should not be able to GET virtual interfaces
         # for an invalid server_id
         invalid_server_id = str(uuid.uuid4())
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.list_virtual_interfaces,
                           invalid_server_id)
diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py
index cdbaee8..1211db3 100644
--- a/tempest/api/compute/test_authorization.py
+++ b/tempest/api/compute/test_authorization.py
@@ -15,11 +15,12 @@
 
 import StringIO
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
 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
 from tempest import test
 
@@ -29,32 +30,44 @@
 
 
 class AuthorizationTestJSON(base.BaseV2ComputeTest):
+
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(AuthorizationTestJSON, cls).skip_checks()
         if not CONF.service_available.glance:
             raise cls.skipException('Glance is not available.')
+
+    @classmethod
+    def setup_credentials(cls):
         # No network resources required for this test
         cls.set_network_resources()
-        super(AuthorizationTestJSON, cls).resource_setup()
+        super(AuthorizationTestJSON, cls).setup_credentials()
         if not cls.multi_user:
             msg = "Need >1 user"
             raise cls.skipException(msg)
+
+        creds = cls.isolated_creds.get_alt_creds()
+        cls.alt_manager = clients.Manager(credentials=creds)
+
+    @classmethod
+    def setup_clients(cls):
+        super(AuthorizationTestJSON, cls).setup_clients()
         cls.client = cls.os.servers_client
         cls.images_client = cls.os.images_client
         cls.glance_client = cls.os.image_client
         cls.keypairs_client = cls.os.keypairs_client
         cls.security_client = cls.os.security_groups_client
 
-        creds = cls.isolated_creds.get_alt_creds()
-        cls.alt_manager = clients.Manager(credentials=creds)
-
         cls.alt_client = cls.alt_manager.servers_client
         cls.alt_images_client = cls.alt_manager.images_client
         cls.alt_keypairs_client = cls.alt_manager.keypairs_client
         cls.alt_security_client = cls.alt_manager.security_groups_client
 
-        resp, server = cls.create_test_server(wait_until='ACTIVE')
-        resp, cls.server = cls.client.get_server(server['id'])
+    @classmethod
+    def resource_setup(cls):
+        super(AuthorizationTestJSON, cls).resource_setup()
+        server = cls.create_test_server(wait_until='ACTIVE')
+        cls.server = cls.client.get_server(server['id'])
 
         name = data_utils.rand_name('image')
         body = cls.glance_client.create_image(name=name,
@@ -93,32 +106,32 @@
     @test.attr(type='gate')
     def test_get_server_for_alt_account_fails(self):
         # A GET request for a server on another user's account should fail
-        self.assertRaises(exceptions.NotFound, self.alt_client.get_server,
+        self.assertRaises(lib_exc.NotFound, self.alt_client.get_server,
                           self.server['id'])
 
     @test.attr(type='gate')
     def test_delete_server_for_alt_account_fails(self):
         # A DELETE request for another user's server should fail
-        self.assertRaises(exceptions.NotFound, self.alt_client.delete_server,
+        self.assertRaises(lib_exc.NotFound, self.alt_client.delete_server,
                           self.server['id'])
 
     @test.attr(type='gate')
     def test_update_server_for_alt_account_fails(self):
         # An update server request for another user's server should fail
-        self.assertRaises(exceptions.NotFound, self.alt_client.update_server,
+        self.assertRaises(lib_exc.NotFound, self.alt_client.update_server,
                           self.server['id'], name='test')
 
     @test.attr(type='gate')
     def test_list_server_addresses_for_alt_account_fails(self):
         # A list addresses request for another user's server should fail
-        self.assertRaises(exceptions.NotFound, self.alt_client.list_addresses,
+        self.assertRaises(lib_exc.NotFound, self.alt_client.list_addresses,
                           self.server['id'])
 
     @test.attr(type='gate')
     def test_list_server_addresses_by_network_for_alt_account_fails(self):
         # A list address/network request for another user's server should fail
         server_id = self.server['id']
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_client.list_addresses_by_network, server_id,
                           'public')
 
@@ -135,38 +148,38 @@
     @test.attr(type='gate')
     def test_change_password_for_alt_account_fails(self):
         # A change password request for another user's server should fail
-        self.assertRaises(exceptions.NotFound, self.alt_client.change_password,
+        self.assertRaises(lib_exc.NotFound, self.alt_client.change_password,
                           self.server['id'], 'newpass')
 
     @test.attr(type='gate')
     def test_reboot_server_for_alt_account_fails(self):
         # A reboot request for another user's server should fail
-        self.assertRaises(exceptions.NotFound, self.alt_client.reboot,
+        self.assertRaises(lib_exc.NotFound, self.alt_client.reboot,
                           self.server['id'], 'HARD')
 
     @test.attr(type='gate')
     def test_rebuild_server_for_alt_account_fails(self):
         # A rebuild request for another user's server should fail
-        self.assertRaises(exceptions.NotFound, self.alt_client.rebuild,
+        self.assertRaises(lib_exc.NotFound, self.alt_client.rebuild,
                           self.server['id'], self.image_ref_alt)
 
     @test.attr(type='gate')
     def test_resize_server_for_alt_account_fails(self):
         # A resize request for another user's server should fail
-        self.assertRaises(exceptions.NotFound, self.alt_client.resize,
+        self.assertRaises(lib_exc.NotFound, self.alt_client.resize,
                           self.server['id'], self.flavor_ref_alt)
 
     @test.attr(type='gate')
     def test_create_image_for_alt_account_fails(self):
         # A create image request for another user's server should fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_images_client.create_image,
                           self.server['id'], 'testImage')
 
     @test.attr(type='gate')
     def test_create_server_with_unauthorized_image(self):
         # Server creation with another user's image should fail
-        self.assertRaises(exceptions.BadRequest, self.alt_client.create_server,
+        self.assertRaises(lib_exc.BadRequest, self.alt_client.create_server,
                           'test', self.image['id'], self.flavor_ref)
 
     @test.attr(type='gate')
@@ -178,7 +191,7 @@
             request_part='url',
             auth_data=self.client.auth_provider.auth_data
         )
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.alt_client.create_server, 'test',
                           self.image['id'], self.flavor_ref)
 
@@ -196,7 +209,7 @@
             )
             resp = {}
             resp['status'] = None
-            self.assertRaises(exceptions.BadRequest,
+            self.assertRaises(lib_exc.BadRequest,
                               self.alt_keypairs_client.create_keypair, k_name)
         finally:
             # Next request the base_url is back to normal
@@ -208,27 +221,27 @@
     @test.attr(type='gate')
     def test_get_keypair_of_alt_account_fails(self):
         # A GET request for another user's keypair should fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_keypairs_client.get_keypair,
                           self.keypairname)
 
     @test.attr(type='gate')
     def test_delete_keypair_of_alt_account_fails(self):
         # A DELETE request for another user's keypair should fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_keypairs_client.delete_keypair,
                           self.keypairname)
 
     @test.attr(type='gate')
     def test_get_image_for_alt_account_fails(self):
         # A GET request for an image on another user's account should fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_images_client.get_image, self.image['id'])
 
     @test.attr(type='gate')
     def test_delete_image_for_alt_account_fails(self):
         # A DELETE request for another user's image should fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_images_client.delete_image,
                           self.image['id'])
 
@@ -247,7 +260,7 @@
             )
             resp = {}
             resp['status'] = None
-            self.assertRaises(exceptions.BadRequest,
+            self.assertRaises(lib_exc.BadRequest,
                               self.alt_security_client.create_security_group,
                               s_name, s_description)
         finally:
@@ -260,14 +273,14 @@
     @test.attr(type='gate')
     def test_get_security_group_of_alt_account_fails(self):
         # A GET request for another user's security group should fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_security_client.get_security_group,
                           self.security_group['id'])
 
     @test.attr(type='gate')
     def test_delete_security_group_of_alt_account_fails(self):
         # A DELETE request for another user's security group should fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_security_client.delete_security_group,
                           self.security_group['id'])
 
@@ -288,7 +301,7 @@
             )
             resp = {}
             resp['status'] = None
-            self.assertRaises(exceptions.BadRequest,
+            self.assertRaises(lib_exc.BadRequest,
                               self.alt_security_client.
                               create_security_group_rule,
                               parent_group_id, ip_protocol, from_port,
@@ -305,7 +318,7 @@
     def test_delete_security_group_rule_of_alt_account_fails(self):
         # A DELETE request for another user's security group rule
         # should fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_security_client.delete_security_group_rule,
                           self.rule['id'])
 
@@ -313,7 +326,7 @@
     def test_set_metadata_of_alt_account_server_fails(self):
         # A set metadata for another user's server should fail
         req_metadata = {'meta1': 'data1', 'meta2': 'data2'}
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_client.set_server_metadata,
                           self.server['id'],
                           req_metadata)
@@ -322,7 +335,7 @@
     def test_set_metadata_of_alt_account_image_fails(self):
         # A set metadata for another user's image should fail
         req_metadata = {'meta1': 'value1', 'meta2': 'value2'}
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_images_client.set_image_metadata,
                           self.image['id'], req_metadata)
 
@@ -333,7 +346,7 @@
         self.client.set_server_metadata(self.server['id'], req_metadata)
         self.addCleanup(self.client.delete_server_metadata_item,
                         self.server['id'], 'meta1')
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_client.get_server_metadata_item,
                           self.server['id'], 'meta1')
 
@@ -345,7 +358,7 @@
                         self.image['id'], 'meta1')
         self.images_client.set_image_metadata(self.image['id'],
                                               req_metadata)
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_images_client.get_image_metadata_item,
                           self.image['id'], 'meta1')
 
@@ -356,7 +369,7 @@
         self.addCleanup(self.client.delete_server_metadata_item,
                         self.server['id'], 'meta1')
         self.client.set_server_metadata(self.server['id'], req_metadata)
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_client.delete_server_metadata_item,
                           self.server['id'], 'meta1')
 
@@ -368,13 +381,13 @@
                         self.image['id'], 'meta1')
         self.images_client.set_image_metadata(self.image['id'],
                                               req_metadata)
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_images_client.delete_image_metadata_item,
                           self.image['id'], 'meta1')
 
     @test.attr(type='gate')
     def test_get_console_output_of_alt_account_server_fails(self):
         # A Get Console Output for another user's server should fail
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_client.get_console_output,
                           self.server['id'], 10)
diff --git a/tempest/api/compute/test_extensions.py b/tempest/api/compute/test_extensions.py
index 46e7251..f40ae9f 100644
--- a/tempest/api/compute/test_extensions.py
+++ b/tempest/api/compute/test_extensions.py
@@ -32,8 +32,7 @@
         # List of all extensions
         if len(CONF.compute_feature_enabled.api_extensions) == 0:
             raise self.skipException('There are not any extensions configured')
-        resp, extensions = self.extensions_client.list_extensions()
-        self.assertEqual(200, resp.status)
+        extensions = self.extensions_client.list_extensions()
         ext = CONF.compute_feature_enabled.api_extensions[0]
         if ext == 'all':
             self.assertIn('Hosts', map(lambda x: x['name'], extensions))
@@ -49,6 +48,5 @@
     @test.attr(type='gate')
     def test_get_extension(self):
         # get the specified extensions
-        resp, extension = self.extensions_client.get_extension('os-consoles')
-        self.assertEqual(200, resp.status)
+        extension = self.extensions_client.get_extension('os-consoles')
         self.assertEqual('os-consoles', extension['alias'])
diff --git a/tempest/api/compute/test_live_block_migration.py b/tempest/api/compute/test_live_block_migration.py
index eb71d6d..6da6b79 100644
--- a/tempest/api/compute/test_live_block_migration.py
+++ b/tempest/api/compute/test_live_block_migration.py
@@ -44,7 +44,7 @@
         ]
 
     def _get_server_details(self, server_id):
-        _resp, body = self.admin_servers_client.get_server(server_id)
+        body = self.admin_servers_client.get_server(server_id)
         return body
 
     def _get_host_for_server(self, server_id):
@@ -69,10 +69,8 @@
             if 'ACTIVE' == self._get_server_status(server_id):
                 return server_id
         else:
-            _, server = self.create_test_server(wait_until="ACTIVE")
+            server = self.create_test_server(wait_until="ACTIVE")
             server_id = server['id']
-            self.password = server['adminPass']
-            self.password = 'password'
             self.created_server_ids.append(server_id)
             return server_id
 
diff --git a/tempest/api/compute/test_live_block_migration_negative.py b/tempest/api/compute/test_live_block_migration_negative.py
index 281b2b3..586bc5c 100644
--- a/tempest/api/compute/test_live_block_migration_negative.py
+++ b/tempest/api/compute/test_live_block_migration_negative.py
@@ -13,11 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 
 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
@@ -45,9 +45,9 @@
     def test_invalid_host_for_migration(self):
         # Migrating to an invalid host should not change the status
         target_host = data_utils.rand_name('host-')
-        _, server = self.create_test_server(wait_until="ACTIVE")
+        server = self.create_test_server(wait_until="ACTIVE")
         server_id = server['id']
 
-        self.assertRaises(exceptions.BadRequest, self._migrate_server_to,
+        self.assertRaises(lib_exc.BadRequest, self._migrate_server_to,
                           server_id, target_host)
         self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
index 40b93a8..5b15a08 100644
--- a/tempest/api/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -30,14 +30,22 @@
         self.attachment = None
 
     @classmethod
-    def resource_setup(cls):
-        cls.prepare_instance_network()
-        super(AttachVolumeTestJSON, cls).resource_setup()
-        cls.device = CONF.compute.volume_device_name
+    def skip_checks(cls):
+        super(AttachVolumeTestJSON, cls).skip_checks()
         if not CONF.service_available.cinder:
             skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
             raise cls.skipException(skip_msg)
 
+    @classmethod
+    def setup_credentials(cls):
+        cls.prepare_instance_network()
+        super(AttachVolumeTestJSON, cls).setup_credentials()
+
+    @classmethod
+    def resource_setup(cls):
+        super(AttachVolumeTestJSON, cls).resource_setup()
+        cls.device = CONF.compute.volume_device_name
+
     def _detach(self, server_id, volume_id):
         if self.attachment:
             self.servers_client.detach_volume(server_id, volume_id)
@@ -53,8 +61,8 @@
     def _create_and_attach(self):
         # Start a server and wait for it to become ready
         admin_pass = self.image_ssh_password
-        _, self.server = self.create_test_server(wait_until='ACTIVE',
-                                                 adminPass=admin_pass)
+        self.server = self.create_test_server(wait_until='ACTIVE',
+                                              adminPass=admin_pass)
 
         # Record addresses so that we can ssh later
         _, self.server['addresses'] = (
diff --git a/tempest/api/compute/volumes/test_volumes_get.py b/tempest/api/compute/volumes/test_volumes_get.py
index 53f5ac0..aa4fb52 100644
--- a/tempest/api/compute/volumes/test_volumes_get.py
+++ b/tempest/api/compute/volumes/test_volumes_get.py
@@ -27,18 +27,22 @@
 class VolumesGetTestJSON(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(VolumesGetTestJSON, cls).resource_setup()
-        cls.client = cls.volumes_extensions_client
+    def skip_checks(cls):
+        super(VolumesGetTestJSON, cls).skip_checks()
         if not CONF.service_available.cinder:
             skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
             raise cls.skipException(skip_msg)
 
+    @classmethod
+    def setup_clients(cls):
+        super(VolumesGetTestJSON, cls).setup_clients()
+        cls.client = cls.volumes_extensions_client
+
     @test.attr(type='smoke')
     def test_volume_create_get_delete(self):
         # CREATE, GET, DELETE Volume
         volume = None
-        v_name = data_utils.rand_name('Volume-%s-') % self._interface
+        v_name = data_utils.rand_name('Volume')
         metadata = {'Type': 'work'}
         # Create volume
         volume = self.client.create_volume(size=1,
diff --git a/tempest/api/compute/volumes/test_volumes_list.py b/tempest/api/compute/volumes/test_volumes_list.py
index c0ac99b..cb74876 100644
--- a/tempest/api/compute/volumes/test_volumes_list.py
+++ b/tempest/api/compute/volumes/test_volumes_list.py
@@ -32,17 +32,25 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(VolumesTestJSON, cls).resource_setup()
-        cls.client = cls.volumes_extensions_client
+    def skip_checks(cls):
+        super(VolumesTestJSON, cls).skip_checks()
         if not CONF.service_available.cinder:
             skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
             raise cls.skipException(skip_msg)
+
+    @classmethod
+    def setup_clients(cls):
+        super(VolumesTestJSON, cls).setup_clients()
+        cls.client = cls.volumes_extensions_client
+
+    @classmethod
+    def resource_setup(cls):
+        super(VolumesTestJSON, cls).resource_setup()
         # Create 3 Volumes
         cls.volume_list = []
         cls.volume_id_list = []
         for i in range(3):
-            v_name = data_utils.rand_name('volume-%s' % cls._interface)
+            v_name = data_utils.rand_name('volume')
             metadata = {'Type': 'work'}
             try:
                 volume = cls.client.create_volume(size=1,
diff --git a/tempest/api/compute/volumes/test_volumes_negative.py b/tempest/api/compute/volumes/test_volumes_negative.py
index f0f9879..53217c9 100644
--- a/tempest/api/compute/volumes/test_volumes_negative.py
+++ b/tempest/api/compute/volumes/test_volumes_negative.py
@@ -15,10 +15,11 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 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
@@ -27,19 +28,23 @@
 class VolumesNegativeTest(base.BaseV2ComputeTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(VolumesNegativeTest, cls).resource_setup()
-        cls.client = cls.volumes_extensions_client
+    def skip_checks(cls):
+        super(VolumesNegativeTest, cls).skip_checks()
         if not CONF.service_available.cinder:
             skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
             raise cls.skipException(skip_msg)
 
+    @classmethod
+    def setup_clients(cls):
+        super(VolumesNegativeTest, cls).setup_clients()
+        cls.client = cls.volumes_extensions_client
+
     @test.attr(type=['negative', 'gate'])
     def test_volume_get_nonexistent_volume_id(self):
         # Negative: Should not be able to get details of nonexistent volume
         # Creating a nonexistent volume id
         # Trying to GET a non existent volume
-        self.assertRaises(exceptions.NotFound, self.client.get_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.get_volume,
                           str(uuid.uuid4()))
 
     @test.attr(type=['negative', 'gate'])
@@ -47,7 +52,7 @@
         # Negative: Should not be able to delete nonexistent Volume
         # Creating nonexistent volume id
         # Trying to DELETE a non existent volume
-        self.assertRaises(exceptions.NotFound, self.client.delete_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_volume,
                           str(uuid.uuid4()))
 
     @test.attr(type=['negative', 'gate'])
@@ -56,7 +61,7 @@
         # in request
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.BadRequest, self.client.create_volume,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_volume,
                           size='#$%', display_name=v_name, metadata=metadata)
 
     @test.attr(type=['negative', 'gate'])
@@ -65,7 +70,7 @@
         # in request
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.BadRequest, self.client.create_volume,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_volume,
                           size='', display_name=v_name, metadata=metadata)
 
     @test.attr(type=['negative', 'gate'])
@@ -73,28 +78,28 @@
         # Negative: Should not be able to create volume with size zero
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.BadRequest, self.client.create_volume,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_volume,
                           size='0', display_name=v_name, metadata=metadata)
 
     @test.attr(type=['negative', 'gate'])
     def test_get_invalid_volume_id(self):
         # Negative: Should not be able to get volume with invalid id
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.get_volume, '#$%%&^&^')
 
     @test.attr(type=['negative', 'gate'])
     def test_get_volume_without_passing_volume_id(self):
         # Negative: Should not be able to get volume when empty ID is passed
-        self.assertRaises(exceptions.NotFound, self.client.get_volume, '')
+        self.assertRaises(lib_exc.NotFound, self.client.get_volume, '')
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_invalid_volume_id(self):
         # Negative: Should not be able to delete volume when invalid ID is
         # passed
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.delete_volume, '!@#$%^&*()')
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_volume_without_passing_volume_id(self):
         # Negative: Should not be able to delete volume when empty ID is passed
-        self.assertRaises(exceptions.NotFound, self.client.delete_volume, '')
+        self.assertRaises(lib_exc.NotFound, self.client.delete_volume, '')
diff --git a/tempest/api/data_processing/base.py b/tempest/api/data_processing/base.py
index 45c8488..5992921 100644
--- a/tempest/api/data_processing/base.py
+++ b/tempest/api/data_processing/base.py
@@ -12,8 +12,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest import config
-from tempest import exceptions
 import tempest.test
 
 
@@ -21,16 +22,26 @@
 
 
 class BaseDataProcessingTest(tempest.test.BaseTestCase):
-    _interface = 'json'
+
+    @classmethod
+    def skip_checks(cls):
+        super(BaseDataProcessingTest, cls).skip_checks()
+        if not CONF.service_available.sahara:
+            raise cls.skipException('Sahara support is required')
+
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseDataProcessingTest, cls).setup_credentials()
+        cls.os = cls.get_client_manager()
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseDataProcessingTest, cls).setup_clients()
+        cls.client = cls.os.data_processing_client
 
     @classmethod
     def resource_setup(cls):
         super(BaseDataProcessingTest, cls).resource_setup()
-        if not CONF.service_available.sahara:
-            raise cls.skipException('Sahara support is required')
-
-        cls.os = cls.get_client_manager()
-        cls.client = cls.os.data_processing_client
 
         cls.flavor_ref = CONF.compute.flavor_ref
 
@@ -63,7 +74,7 @@
         for resource_id in resource_id_list:
             try:
                 method(resource_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 # ignore errors while auto removing created resource
                 pass
 
diff --git a/tempest/api/database/base.py b/tempest/api/database/base.py
index dd4c684..31c5d2a 100644
--- a/tempest/api/database/base.py
+++ b/tempest/api/database/base.py
@@ -24,22 +24,30 @@
 class BaseDatabaseTest(tempest.test.BaseTestCase):
     """Base test case class for all Database API tests."""
 
-    _interface = 'json'
-
     @classmethod
-    def resource_setup(cls):
-        super(BaseDatabaseTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(BaseDatabaseTest, cls).skip_checks()
         if not CONF.service_available.trove:
             skip_msg = ("%s skipped as trove is not available" % cls.__name__)
             raise cls.skipException(skip_msg)
 
-        cls.catalog_type = CONF.database.catalog_type
-        cls.db_flavor_ref = CONF.database.db_flavor_ref
-        cls.db_current_version = CONF.database.db_current_version
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseDatabaseTest, cls).setup_credentials()
+        cls.os = cls.get_client_manager()
 
-        os = cls.get_client_manager()
-        cls.os = os
+    @classmethod
+    def setup_clients(cls):
+        super(BaseDatabaseTest, cls).setup_clients()
         cls.database_flavors_client = cls.os.database_flavors_client
         cls.os_flavors_client = cls.os.flavors_client
         cls.database_limits_client = cls.os.database_limits_client
         cls.database_versions_client = cls.os.database_versions_client
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaseDatabaseTest, cls).resource_setup()
+
+        cls.catalog_type = CONF.database.catalog_type
+        cls.db_flavor_ref = CONF.database.db_flavor_ref
+        cls.db_current_version = CONF.database.db_current_version
diff --git a/tempest/api/database/flavors/test_flavors.py b/tempest/api/database/flavors/test_flavors.py
index ed172e9..bb7035b 100644
--- a/tempest/api/database/flavors/test_flavors.py
+++ b/tempest/api/database/flavors/test_flavors.py
@@ -20,8 +20,8 @@
 class DatabaseFlavorsTest(base.BaseDatabaseTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(DatabaseFlavorsTest, cls).resource_setup()
+    def setup_clients(cls):
+        super(DatabaseFlavorsTest, cls).setup_clients()
         cls.client = cls.database_flavors_client
 
     @test.attr(type='smoke')
diff --git a/tempest/api/database/flavors/test_flavors_negative.py b/tempest/api/database/flavors/test_flavors_negative.py
index 9f14cce..bb9c05d 100644
--- a/tempest/api/database/flavors/test_flavors_negative.py
+++ b/tempest/api/database/flavors/test_flavors_negative.py
@@ -13,20 +13,21 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.database import base
-from tempest import exceptions
 from tempest import test
 
 
 class DatabaseFlavorsNegativeTest(base.BaseDatabaseTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(DatabaseFlavorsNegativeTest, cls).resource_setup()
+    def setup_clients(cls):
+        super(DatabaseFlavorsNegativeTest, cls).setup_clients()
         cls.client = cls.database_flavors_client
 
     @test.attr(type=['negative', 'gate'])
     def test_get_non_existent_db_flavor(self):
         # flavor details are not returned for non-existent flavors
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.get_db_flavor_details, -1)
diff --git a/tempest/api/database/limits/test_limits.py b/tempest/api/database/limits/test_limits.py
index 30d0a77..68a3884 100644
--- a/tempest/api/database/limits/test_limits.py
+++ b/tempest/api/database/limits/test_limits.py
@@ -18,7 +18,6 @@
 
 
 class DatabaseLimitsTest(base.BaseDatabaseTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/database/versions/test_versions.py b/tempest/api/database/versions/test_versions.py
index 80fcecf..37a7407 100644
--- a/tempest/api/database/versions/test_versions.py
+++ b/tempest/api/database/versions/test_versions.py
@@ -18,11 +18,10 @@
 
 
 class DatabaseVersionsTest(base.BaseDatabaseTest):
-    _interface = 'json'
 
     @classmethod
-    def resource_setup(cls):
-        super(DatabaseVersionsTest, cls).resource_setup()
+    def setup_clients(cls):
+        super(DatabaseVersionsTest, cls).setup_clients()
         cls.client = cls.database_versions_client
 
     @test.attr(type='smoke')
diff --git a/tempest/api/identity/admin/test_roles.py b/tempest/api/identity/admin/test_roles.py
index c6c7dc3..80ad6db 100644
--- a/tempest/api/identity/admin/test_roles.py
+++ b/tempest/api/identity/admin/test_roles.py
@@ -21,7 +21,6 @@
 
 
 class RolesTestJSON(base.BaseIdentityV2AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/identity/admin/test_roles_negative.py b/tempest/api/identity/admin/test_roles_negative.py
index 58f726a..c38e6e0 100644
--- a/tempest/api/identity/admin/test_roles_negative.py
+++ b/tempest/api/identity/admin/test_roles_negative.py
@@ -13,16 +13,15 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 import uuid
 
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class RolesNegativeTestJSON(base.BaseIdentityV2AdminTest):
-    _interface = 'json'
 
     def _get_role_params(self):
         self.data.setup_test_user()
@@ -35,7 +34,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_list_roles_by_unauthorized_user(self):
         # Non-administrator user should not be able to list roles
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.list_roles)
 
     @test.attr(type=['negative', 'gate'])
@@ -43,19 +42,19 @@
         # Request to list roles without a valid token should fail
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized, self.client.list_roles)
+        self.assertRaises(lib_exc.Unauthorized, self.client.list_roles)
         self.client.auth_provider.clear_auth()
 
     @test.attr(type=['negative', 'gate'])
     def test_role_create_blank_name(self):
         # Should not be able to create a role with a blank name
-        self.assertRaises(exceptions.BadRequest, self.client.create_role, '')
+        self.assertRaises(lib_exc.BadRequest, self.client.create_role, '')
 
     @test.attr(type=['negative', 'gate'])
     def test_create_role_by_unauthorized_user(self):
         # Non-administrator user should not be able to create role
         role_name = data_utils.rand_name(name='role-')
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.create_role, role_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -64,7 +63,7 @@
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
         role_name = data_utils.rand_name(name='role-')
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.client.create_role, role_name)
         self.client.auth_provider.clear_auth()
 
@@ -75,7 +74,7 @@
         body = self.client.create_role(role_name)
         role1_id = body.get('id')
         self.addCleanup(self.client.delete_role, role1_id)
-        self.assertRaises(exceptions.Conflict, self.client.create_role,
+        self.assertRaises(lib_exc.Conflict, self.client.create_role,
                           role_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -85,7 +84,7 @@
         body = self.client.create_role(role_name)
         self.data.roles.append(body)
         role_id = body.get('id')
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.delete_role, role_id)
 
     @test.attr(type=['negative', 'gate'])
@@ -97,7 +96,7 @@
         role_id = body.get('id')
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.client.delete_role,
                           role_id)
         self.client.auth_provider.clear_auth()
@@ -106,7 +105,7 @@
     def test_delete_role_non_existent(self):
         # Attempt to delete a non existent role should fail
         non_existent_role = str(uuid.uuid4().hex)
-        self.assertRaises(exceptions.NotFound, self.client.delete_role,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_role,
                           non_existent_role)
 
     @test.attr(type=['negative', 'gate'])
@@ -114,7 +113,7 @@
         # Non-administrator user should not be authorized to
         # assign a role to user
         (user, tenant, role) = self._get_role_params()
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.assign_user_role,
                           tenant['id'], user['id'], role['id'])
 
@@ -124,7 +123,7 @@
         (user, tenant, role) = self._get_role_params()
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.client.assign_user_role, tenant['id'],
                           user['id'], role['id'])
         self.client.auth_provider.clear_auth()
@@ -134,7 +133,7 @@
         # Attempt to assign a non existent role to user should fail
         (user, tenant, role) = self._get_role_params()
         non_existent_role = str(uuid.uuid4().hex)
-        self.assertRaises(exceptions.NotFound, self.client.assign_user_role,
+        self.assertRaises(lib_exc.NotFound, self.client.assign_user_role,
                           tenant['id'], user['id'], non_existent_role)
 
     @test.attr(type=['negative', 'gate'])
@@ -142,7 +141,7 @@
         # Attempt to assign a role on a non existent tenant should fail
         (user, tenant, role) = self._get_role_params()
         non_existent_tenant = str(uuid.uuid4().hex)
-        self.assertRaises(exceptions.NotFound, self.client.assign_user_role,
+        self.assertRaises(lib_exc.NotFound, self.client.assign_user_role,
                           non_existent_tenant, user['id'], role['id'])
 
     @test.attr(type=['negative', 'gate'])
@@ -150,7 +149,7 @@
         # Duplicate user role should not get assigned
         (user, tenant, role) = self._get_role_params()
         self.client.assign_user_role(tenant['id'], user['id'], role['id'])
-        self.assertRaises(exceptions.Conflict, self.client.assign_user_role,
+        self.assertRaises(lib_exc.Conflict, self.client.assign_user_role,
                           tenant['id'], user['id'], role['id'])
 
     @test.attr(type=['negative', 'gate'])
@@ -161,7 +160,7 @@
         self.client.assign_user_role(tenant['id'],
                                      user['id'],
                                      role['id'])
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.remove_user_role,
                           tenant['id'], user['id'], role['id'])
 
@@ -174,7 +173,7 @@
                                      role['id'])
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.client.remove_user_role, tenant['id'],
                           user['id'], role['id'])
         self.client.auth_provider.clear_auth()
@@ -187,7 +186,7 @@
                                      user['id'],
                                      role['id'])
         non_existent_role = str(uuid.uuid4().hex)
-        self.assertRaises(exceptions.NotFound, self.client.remove_user_role,
+        self.assertRaises(lib_exc.NotFound, self.client.remove_user_role,
                           tenant['id'], user['id'], non_existent_role)
 
     @test.attr(type=['negative', 'gate'])
@@ -198,7 +197,7 @@
                                      user['id'],
                                      role['id'])
         non_existent_tenant = str(uuid.uuid4().hex)
-        self.assertRaises(exceptions.NotFound, self.client.remove_user_role,
+        self.assertRaises(lib_exc.NotFound, self.client.remove_user_role,
                           non_existent_tenant, user['id'], role['id'])
 
     @test.attr(type=['negative', 'gate'])
@@ -207,7 +206,7 @@
         # a user's roles
         (user, tenant, role) = self._get_role_params()
         self.client.assign_user_role(tenant['id'], user['id'], role['id'])
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.list_user_roles, tenant['id'],
                           user['id'])
 
@@ -218,7 +217,7 @@
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
         try:
-            self.assertRaises(exceptions.Unauthorized,
+            self.assertRaises(lib_exc.Unauthorized,
                               self.client.list_user_roles, tenant['id'],
                               user['id'])
         finally:
diff --git a/tempest/api/identity/admin/test_services.py b/tempest/api/identity/admin/test_services.py
index 03d6e35..af38afc 100644
--- a/tempest/api/identity/admin/test_services.py
+++ b/tempest/api/identity/admin/test_services.py
@@ -14,21 +14,20 @@
 #    under the License.
 
 from six import moves
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class ServicesTestJSON(base.BaseIdentityV2AdminTest):
-    _interface = 'json'
 
     def _del_service(self, service_id):
         # Deleting the service created in this method
         self.client.delete_service(service_id)
         # Checking whether service is deleted successfully
-        self.assertRaises(exceptions.NotFound, self.client.get_service,
+        self.assertRaises(lib_exc.NotFound, self.client.get_service,
                           service_id)
 
     @test.attr(type='smoke')
diff --git a/tempest/api/identity/admin/test_tenant_negative.py b/tempest/api/identity/admin/test_tenant_negative.py
index 75f0152..db51f14 100644
--- a/tempest/api/identity/admin/test_tenant_negative.py
+++ b/tempest/api/identity/admin/test_tenant_negative.py
@@ -13,21 +13,20 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 import uuid
 
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class TenantsNegativeTestJSON(base.BaseIdentityV2AdminTest):
-    _interface = 'json'
 
     @test.attr(type=['negative', 'gate'])
     def test_list_tenants_by_unauthorized_user(self):
         # Non-administrator user should not be able to list tenants
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.list_tenants)
 
     @test.attr(type=['negative', 'gate'])
@@ -35,7 +34,7 @@
         # Request to list tenants without a valid token should fail
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized, self.client.list_tenants)
+        self.assertRaises(lib_exc.Unauthorized, self.client.list_tenants)
         self.client.auth_provider.clear_auth()
 
     @test.attr(type=['negative', 'gate'])
@@ -44,7 +43,7 @@
         tenant_name = data_utils.rand_name(name='tenant-')
         tenant = self.client.create_tenant(tenant_name)
         self.data.tenants.append(tenant)
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.delete_tenant, tenant['id'])
 
     @test.attr(type=['negative', 'gate'])
@@ -55,14 +54,14 @@
         self.data.tenants.append(tenant)
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized, self.client.delete_tenant,
+        self.assertRaises(lib_exc.Unauthorized, self.client.delete_tenant,
                           tenant['id'])
         self.client.auth_provider.clear_auth()
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_non_existent_tenant(self):
         # Attempt to delete a non existent tenant should fail
-        self.assertRaises(exceptions.NotFound, self.client.delete_tenant,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_tenant,
                           str(uuid.uuid4().hex))
 
     @test.attr(type=['negative', 'gate'])
@@ -76,14 +75,14 @@
 
         self.addCleanup(self.client.delete_tenant, tenant1_id)
         self.addCleanup(self.data.tenants.remove, tenant)
-        self.assertRaises(exceptions.Conflict, self.client.create_tenant,
+        self.assertRaises(lib_exc.Conflict, self.client.create_tenant,
                           tenant_name)
 
     @test.attr(type=['negative', 'gate'])
     def test_create_tenant_by_unauthorized_user(self):
         # Non-administrator user should not be authorized to create a tenant
         tenant_name = data_utils.rand_name(name='tenant-')
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.create_tenant, tenant_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -92,27 +91,27 @@
         tenant_name = data_utils.rand_name(name='tenant-')
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized, self.client.create_tenant,
+        self.assertRaises(lib_exc.Unauthorized, self.client.create_tenant,
                           tenant_name)
         self.client.auth_provider.clear_auth()
 
     @test.attr(type=['negative', 'gate'])
     def test_create_tenant_with_empty_name(self):
         # Tenant name should not be empty
-        self.assertRaises(exceptions.BadRequest, self.client.create_tenant,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_tenant,
                           name='')
 
     @test.attr(type=['negative', 'gate'])
     def test_create_tenants_name_length_over_64(self):
         # Tenant name length should not be greater than 64 characters
         tenant_name = 'a' * 65
-        self.assertRaises(exceptions.BadRequest, self.client.create_tenant,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_tenant,
                           tenant_name)
 
     @test.attr(type=['negative', 'gate'])
     def test_update_non_existent_tenant(self):
         # Attempt to update a non existent tenant should fail
-        self.assertRaises(exceptions.NotFound, self.client.update_tenant,
+        self.assertRaises(lib_exc.NotFound, self.client.update_tenant,
                           str(uuid.uuid4().hex))
 
     @test.attr(type=['negative', 'gate'])
@@ -121,7 +120,7 @@
         tenant_name = data_utils.rand_name(name='tenant-')
         tenant = self.client.create_tenant(tenant_name)
         self.data.tenants.append(tenant)
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.update_tenant, tenant['id'])
 
     @test.attr(type=['negative', 'gate'])
@@ -132,6 +131,6 @@
         self.data.tenants.append(tenant)
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized, self.client.update_tenant,
+        self.assertRaises(lib_exc.Unauthorized, self.client.update_tenant,
                           tenant['id'])
         self.client.auth_provider.clear_auth()
diff --git a/tempest/api/identity/admin/test_tenants.py b/tempest/api/identity/admin/test_tenants.py
index 549e952..cfae3a1 100644
--- a/tempest/api/identity/admin/test_tenants.py
+++ b/tempest/api/identity/admin/test_tenants.py
@@ -21,7 +21,6 @@
 
 
 class TenantsTestJSON(base.BaseIdentityV2AdminTest):
-    _interface = 'json'
 
     @test.attr(type='gate')
     def test_tenant_list_delete(self):
diff --git a/tempest/api/identity/admin/test_tokens.py b/tempest/api/identity/admin/test_tokens.py
index bec621c..5323fde 100644
--- a/tempest/api/identity/admin/test_tokens.py
+++ b/tempest/api/identity/admin/test_tokens.py
@@ -19,7 +19,6 @@
 
 
 class TokensTestJSON(base.BaseIdentityV2AdminTest):
-    _interface = 'json'
 
     @test.attr(type='gate')
     def test_create_get_delete_token(self):
diff --git a/tempest/api/identity/admin/test_users.py b/tempest/api/identity/admin/test_users.py
index 25312e8..9159468 100644
--- a/tempest/api/identity/admin/test_users.py
+++ b/tempest/api/identity/admin/test_users.py
@@ -21,7 +21,6 @@
 
 
 class UsersTestJSON(base.BaseIdentityV2AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/identity/admin/test_users_negative.py b/tempest/api/identity/admin/test_users_negative.py
index c039da6..99993b9 100644
--- a/tempest/api/identity/admin/test_users_negative.py
+++ b/tempest/api/identity/admin/test_users_negative.py
@@ -13,16 +13,15 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 import uuid
 
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class UsersNegativeTestJSON(base.BaseIdentityV2AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -35,7 +34,7 @@
     def test_create_user_by_unauthorized_user(self):
         # Non-administrator should not be authorized to create a user
         self.data.setup_test_tenant()
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.create_user, self.alt_user,
                           self.alt_password, self.data.tenant['id'],
                           self.alt_email)
@@ -44,7 +43,7 @@
     def test_create_user_with_empty_name(self):
         # User with an empty name should not be created
         self.data.setup_test_tenant()
-        self.assertRaises(exceptions.BadRequest, self.client.create_user, '',
+        self.assertRaises(lib_exc.BadRequest, self.client.create_user, '',
                           self.alt_password, self.data.tenant['id'],
                           self.alt_email)
 
@@ -52,7 +51,7 @@
     def test_create_user_with_name_length_over_255(self):
         # Length of user name filed should be restricted to 255 characters
         self.data.setup_test_tenant()
-        self.assertRaises(exceptions.BadRequest, self.client.create_user,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_user,
                           'a' * 256, self.alt_password,
                           self.data.tenant['id'], self.alt_email)
 
@@ -60,14 +59,14 @@
     def test_create_user_with_duplicate_name(self):
         # Duplicate user should not be created
         self.data.setup_test_user()
-        self.assertRaises(exceptions.Conflict, self.client.create_user,
+        self.assertRaises(lib_exc.Conflict, self.client.create_user,
                           self.data.test_user, self.data.test_password,
                           self.data.tenant['id'], self.data.test_email)
 
     @test.attr(type=['negative', 'gate'])
     def test_create_user_for_non_existent_tenant(self):
         # Attempt to create a user in a non-existent tenant should fail
-        self.assertRaises(exceptions.NotFound, self.client.create_user,
+        self.assertRaises(lib_exc.NotFound, self.client.create_user,
                           self.alt_user, self.alt_password, '49ffgg99999',
                           self.alt_email)
 
@@ -79,7 +78,7 @@
         token = self.client.auth_provider.get_token()
         # Delete the token from database
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized, self.client.create_user,
+        self.assertRaises(lib_exc.Unauthorized, self.client.create_user,
                           self.alt_user, self.alt_password,
                           self.data.tenant['id'], self.alt_email)
 
@@ -91,7 +90,7 @@
         # Attempt to create a user with valid enabled para should fail
         self.data.setup_test_tenant()
         name = data_utils.rand_name('test_user_')
-        self.assertRaises(exceptions.BadRequest, self.client.create_user,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_user,
                           name, self.alt_password,
                           self.data.tenant['id'],
                           self.alt_email, enabled=3)
@@ -101,7 +100,7 @@
         # Attempt to update a user non-existent user should fail
         user_name = data_utils.rand_name('user-')
         non_existent_id = str(uuid.uuid4())
-        self.assertRaises(exceptions.NotFound, self.client.update_user,
+        self.assertRaises(lib_exc.NotFound, self.client.update_user,
                           non_existent_id, name=user_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -112,7 +111,7 @@
         token = self.client.auth_provider.get_token()
         # Delete the token from database
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized, self.client.update_user,
+        self.assertRaises(lib_exc.Unauthorized, self.client.update_user,
                           self.alt_user)
 
         # Unset the token to allow further tests to generate a new token
@@ -122,21 +121,21 @@
     def test_update_user_by_unauthorized_user(self):
         # Non-administrator should not be authorized to update user
         self.data.setup_test_tenant()
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.update_user, self.alt_user)
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_users_by_unauthorized_user(self):
         # Non-administrator user should not be authorized to delete a user
         self.data.setup_test_user()
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.delete_user,
                           self.data.user['id'])
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_non_existent_user(self):
         # Attempt to delete a non-existent user should fail
-        self.assertRaises(exceptions.NotFound, self.client.delete_user,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_user,
                           'junk12345123')
 
     @test.attr(type=['negative', 'gate'])
@@ -147,7 +146,7 @@
         token = self.client.auth_provider.get_token()
         # Delete the token from database
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized, self.client.delete_user,
+        self.assertRaises(lib_exc.Unauthorized, self.client.delete_user,
                           self.alt_user)
 
         # Unset the token to allow further tests to generate a new token
@@ -158,7 +157,7 @@
         # Disabled user's token should not get authenticated
         self.data.setup_test_user()
         self.disable_user(self.data.test_user)
-        self.assertRaises(exceptions.Unauthorized, self.token_client.auth,
+        self.assertRaises(lib_exc.Unauthorized, self.token_client.auth,
                           self.data.test_user,
                           self.data.test_password,
                           self.data.test_tenant)
@@ -168,7 +167,7 @@
         # User's token for a disabled tenant should not be authenticated
         self.data.setup_test_user()
         self.disable_tenant(self.data.test_tenant)
-        self.assertRaises(exceptions.Unauthorized, self.token_client.auth,
+        self.assertRaises(lib_exc.Unauthorized, self.token_client.auth,
                           self.data.test_user,
                           self.data.test_password,
                           self.data.test_tenant)
@@ -177,7 +176,7 @@
     def test_authentication_with_invalid_tenant(self):
         # User's token for an invalid tenant should not be authenticated
         self.data.setup_test_user()
-        self.assertRaises(exceptions.Unauthorized, self.token_client.auth,
+        self.assertRaises(lib_exc.Unauthorized, self.token_client.auth,
                           self.data.test_user,
                           self.data.test_password,
                           'junktenant1234')
@@ -186,7 +185,7 @@
     def test_authentication_with_invalid_username(self):
         # Non-existent user's token should not get authenticated
         self.data.setup_test_user()
-        self.assertRaises(exceptions.Unauthorized, self.token_client.auth,
+        self.assertRaises(lib_exc.Unauthorized, self.token_client.auth,
                           'junkuser123', self.data.test_password,
                           self.data.test_tenant)
 
@@ -194,7 +193,7 @@
     def test_authentication_with_invalid_password(self):
         # User's token with invalid password should not be authenticated
         self.data.setup_test_user()
-        self.assertRaises(exceptions.Unauthorized, self.token_client.auth,
+        self.assertRaises(lib_exc.Unauthorized, self.token_client.auth,
                           self.data.test_user, 'junkpass1234',
                           self.data.test_tenant)
 
@@ -202,7 +201,7 @@
     def test_get_users_by_unauthorized_user(self):
         # Non-administrator user should not be authorized to get user list
         self.data.setup_test_user()
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.get_users)
 
     @test.attr(type=['negative', 'gate'])
@@ -210,7 +209,7 @@
         # Request to get list of users without a valid token should fail
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
-        self.assertRaises(exceptions.Unauthorized, self.client.get_users)
+        self.assertRaises(lib_exc.Unauthorized, self.client.get_users)
         self.client.auth_provider.clear_auth()
 
     @test.attr(type=['negative', 'gate'])
@@ -225,5 +224,5 @@
         invalid_id.append('!@#()$%^&*?<>{}[]')
         # List the users with invalid tenant id
         for invalid in invalid_id:
-            self.assertRaises(exceptions.NotFound,
+            self.assertRaises(lib_exc.NotFound,
                               self.client.list_users_for_tenant, invalid)
diff --git a/tempest/api/identity/admin/v3/test_credentials.py b/tempest/api/identity/admin/v3/test_credentials.py
index 6f2f6d4..f22ceec 100644
--- a/tempest/api/identity/admin/v3/test_credentials.py
+++ b/tempest/api/identity/admin/v3/test_credentials.py
@@ -19,7 +19,6 @@
 
 
 class CredentialsTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/identity/admin/v3/test_default_project_id.py b/tempest/api/identity/admin/v3/test_default_project_id.py
index bd29cb8..649ca34 100644
--- a/tempest/api/identity/admin/v3/test_default_project_id.py
+++ b/tempest/api/identity/admin/v3/test_default_project_id.py
@@ -14,16 +14,18 @@
 from tempest import auth
 from tempest import clients
 from tempest.common.utils import data_utils
+from tempest import config
 from tempest import test
 
+CONF = config.CONF
+
 
 class TestDefaultProjectId (base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @classmethod
-    def resource_setup(cls):
+    def setup_credentials(cls):
         cls.set_network_resources()
-        super(TestDefaultProjectId, cls).resource_setup()
+        super(TestDefaultProjectId, cls).setup_credentials()
 
     def _delete_domain(self, domain_id):
         # It is necessary to disable the domain before deleting,
@@ -72,10 +74,10 @@
         creds = auth.KeystoneV3Credentials(username=user_name,
                                            password=user_name,
                                            domain_name=dom_name)
-        auth_provider = auth.KeystoneV3AuthProvider(creds)
+        auth_provider = auth.KeystoneV3AuthProvider(creds,
+                                                    CONF.identity.uri_v3)
         creds = auth_provider.fill_credentials()
-        admin_client = clients.Manager(interface=self._interface,
-                                       credentials=creds)
+        admin_client = clients.Manager(credentials=creds)
 
         # verify the user's token and see that it is scoped to the project
         token, auth_data = admin_client.auth_provider.get_auth()
diff --git a/tempest/api/identity/admin/v3/test_domains.py b/tempest/api/identity/admin/v3/test_domains.py
index c1bc705..0914674 100644
--- a/tempest/api/identity/admin/v3/test_domains.py
+++ b/tempest/api/identity/admin/v3/test_domains.py
@@ -20,7 +20,6 @@
 
 
 class DomainsTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     def _delete_domain(self, domain_id):
         # It is necessary to disable the domain before deleting,
@@ -62,10 +61,7 @@
         self.assertIsNotNone(domain['id'])
         self.assertEqual(d_name, domain['name'])
         self.assertEqual(d_desc, domain['description'])
-        if self._interface == "json":
-            self.assertEqual(True, domain['enabled'])
-        else:
-            self.assertEqual('true', str(domain['enabled']).lower())
+        self.assertEqual(True, domain['enabled'])
         new_desc = data_utils.rand_name('new-desc-')
         new_name = data_utils.rand_name('new-name-')
 
diff --git a/tempest/api/identity/admin/v3/test_endpoints.py b/tempest/api/identity/admin/v3/test_endpoints.py
index eed0eb5..75cb6bd 100644
--- a/tempest/api/identity/admin/v3/test_endpoints.py
+++ b/tempest/api/identity/admin/v3/test_endpoints.py
@@ -19,13 +19,16 @@
 
 
 class EndPointsTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
+
+    @classmethod
+    def setup_clients(cls):
+        super(EndPointsTestJSON, cls).setup_clients()
+        cls.identity_client = cls.client
+        cls.client = cls.endpoints_client
 
     @classmethod
     def resource_setup(cls):
         super(EndPointsTestJSON, cls).resource_setup()
-        cls.identity_client = cls.client
-        cls.client = cls.endpoints_client
         cls.service_ids = list()
         s_name = data_utils.rand_name('service-')
         s_type = data_utils.rand_name('type--')
diff --git a/tempest/api/identity/admin/v3/test_endpoints_negative.py b/tempest/api/identity/admin/v3/test_endpoints_negative.py
index 9da0a57..ff450e1 100644
--- a/tempest/api/identity/admin/v3/test_endpoints_negative.py
+++ b/tempest/api/identity/admin/v3/test_endpoints_negative.py
@@ -14,21 +14,24 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class EndpointsNegativeTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
+
+    @classmethod
+    def setup_clients(cls):
+        super(EndpointsNegativeTestJSON, cls).setup_clients()
+        cls.identity_client = cls.client
+        cls.client = cls.endpoints_client
 
     @classmethod
     def resource_setup(cls):
         super(EndpointsNegativeTestJSON, cls).resource_setup()
-        cls.identity_client = cls.client
-        cls.client = cls.endpoints_client
         cls.service_ids = list()
         s_name = data_utils.rand_name('service-')
         s_type = data_utils.rand_name('type--')
@@ -51,7 +54,7 @@
         interface = 'public'
         url = data_utils.rand_url()
         region = data_utils.rand_name('region')
-        self.assertRaises(exceptions.BadRequest, self.client.create_endpoint,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_endpoint,
                           self.service_id, interface, url, region=region,
                           force_enabled='False')
 
@@ -61,7 +64,7 @@
         interface = 'public'
         url = data_utils.rand_url()
         region = data_utils.rand_name('region')
-        self.assertRaises(exceptions.BadRequest, self.client.create_endpoint,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_endpoint,
                           self.service_id, interface, url, region=region,
                           force_enabled='True')
 
@@ -76,7 +79,7 @@
                                         url1, region=region1, enabled=True))
         self.addCleanup(self.client.delete_endpoint, endpoint_for_update['id'])
 
-        self.assertRaises(exceptions.BadRequest, self.client.update_endpoint,
+        self.assertRaises(lib_exc.BadRequest, self.client.update_endpoint,
                           endpoint_for_update['id'], force_enabled=enabled)
 
     @test.attr(type=['negative', 'gate'])
diff --git a/tempest/api/identity/admin/v3/test_groups.py b/tempest/api/identity/admin/v3/test_groups.py
index d8c7063..d4a83e2 100644
--- a/tempest/api/identity/admin/v3/test_groups.py
+++ b/tempest/api/identity/admin/v3/test_groups.py
@@ -19,11 +19,6 @@
 
 
 class GroupsV3TestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
-
-    @classmethod
-    def resource_setup(cls):
-        super(GroupsV3TestJSON, cls).resource_setup()
 
     @test.attr(type='smoke')
     def test_group_create_update_get(self):
diff --git a/tempest/api/identity/admin/v3/test_list_projects.py b/tempest/api/identity/admin/v3/test_list_projects.py
index c0187f9..24b130c 100644
--- a/tempest/api/identity/admin/v3/test_list_projects.py
+++ b/tempest/api/identity/admin/v3/test_list_projects.py
@@ -19,7 +19,6 @@
 
 
 class ListProjectsTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/identity/admin/v3/test_list_users.py b/tempest/api/identity/admin/v3/test_list_users.py
index e728867..a6c3309 100644
--- a/tempest/api/identity/admin/v3/test_list_users.py
+++ b/tempest/api/identity/admin/v3/test_list_users.py
@@ -19,7 +19,6 @@
 
 
 class UsersV3TestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     def _list_users_with_params(self, params, key, expected, not_expected):
         # Helper method to list users filtered with params and
diff --git a/tempest/api/identity/admin/v3/test_policies.py b/tempest/api/identity/admin/v3/test_policies.py
index 23df13d..0d5dc47 100644
--- a/tempest/api/identity/admin/v3/test_policies.py
+++ b/tempest/api/identity/admin/v3/test_policies.py
@@ -19,7 +19,6 @@
 
 
 class PoliciesTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     def _delete_policy(self, policy_id):
         self.policy_client.delete_policy(policy_id)
diff --git a/tempest/api/identity/admin/v3/test_projects.py b/tempest/api/identity/admin/v3/test_projects.py
index 2cf6458..d879c7a 100644
--- a/tempest/api/identity/admin/v3/test_projects.py
+++ b/tempest/api/identity/admin/v3/test_projects.py
@@ -19,7 +19,6 @@
 
 
 class ProjectsTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @test.attr(type='gate')
     def test_project_create_with_description(self):
diff --git a/tempest/api/identity/admin/v3/test_projects_negative.py b/tempest/api/identity/admin/v3/test_projects_negative.py
index f5e832b..a194198 100644
--- a/tempest/api/identity/admin/v3/test_projects_negative.py
+++ b/tempest/api/identity/admin/v3/test_projects_negative.py
@@ -13,19 +13,19 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class ProjectsNegativeTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @test.attr(type=['negative', 'gate'])
     def test_list_projects_by_unauthorized_user(self):
         # Non-admin user should not be able to list projects
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.non_admin_client.list_projects)
 
     @test.attr(type=['negative', 'gate'])
@@ -36,27 +36,27 @@
         self.data.projects.append(project)
 
         self.assertRaises(
-            exceptions.Conflict, self.client.create_project, project_name)
+            lib_exc.Conflict, self.client.create_project, project_name)
 
     @test.attr(type=['negative', 'gate'])
     def test_create_project_by_unauthorized_user(self):
         # Non-admin user should not be authorized to create a project
         project_name = data_utils.rand_name('project-')
         self.assertRaises(
-            exceptions.Unauthorized, self.non_admin_client.create_project,
+            lib_exc.Unauthorized, self.non_admin_client.create_project,
             project_name)
 
     @test.attr(type=['negative', 'gate'])
     def test_create_project_with_empty_name(self):
         # Project name should not be empty
-        self.assertRaises(exceptions.BadRequest, self.client.create_project,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_project,
                           name='')
 
     @test.attr(type=['negative', 'gate'])
     def test_create_projects_name_length_over_64(self):
         # Project name length should not be greater than 64 characters
         project_name = 'a' * 65
-        self.assertRaises(exceptions.BadRequest, self.client.create_project,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_project,
                           project_name)
 
     @test.attr(type=['negative', 'gate'])
@@ -66,11 +66,11 @@
         project = self.client.create_project(project_name)
         self.data.projects.append(project)
         self.assertRaises(
-            exceptions.Unauthorized, self.non_admin_client.delete_project,
+            lib_exc.Unauthorized, self.non_admin_client.delete_project,
             project['id'])
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_non_existent_project(self):
         # Attempt to delete a non existent project should fail
-        self.assertRaises(exceptions.NotFound, self.client.delete_project,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_project,
                           data_utils.rand_uuid_hex())
diff --git a/tempest/api/identity/admin/v3/test_regions.py b/tempest/api/identity/admin/v3/test_regions.py
index c71cbf3..2ea7107 100644
--- a/tempest/api/identity/admin/v3/test_regions.py
+++ b/tempest/api/identity/admin/v3/test_regions.py
@@ -13,20 +13,24 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class RegionsTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
+
+    @classmethod
+    def setup_clients(cls):
+        super(RegionsTestJSON, cls).setup_clients()
+        cls.client = cls.region_client
 
     @classmethod
     def resource_setup(cls):
         super(RegionsTestJSON, cls).resource_setup()
         cls.setup_regions = list()
-        cls.client = cls.region_client
         for i in range(2):
             r_description = data_utils.rand_name('description-')
             region = cls.client.create_region(r_description)
@@ -40,7 +44,7 @@
 
     def _delete_region(self, region_id):
         self.client.delete_region(region_id)
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.get_region, region_id)
 
     @test.attr(type='gate')
diff --git a/tempest/api/identity/admin/v3/test_roles.py b/tempest/api/identity/admin/v3/test_roles.py
index b8b309d..747911b 100644
--- a/tempest/api/identity/admin/v3/test_roles.py
+++ b/tempest/api/identity/admin/v3/test_roles.py
@@ -19,7 +19,6 @@
 
 
 class RolesV3TestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -140,9 +139,11 @@
         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'])
-        body = self.token.auth(self.user_body['id'], self.u_password,
-                               self.project['name'],
-                               domain=self.domain['name'])
+        body = self.token.auth(user=self.user_body['id'],
+                               password=self.u_password,
+                               user_domain=self.domain['name'],
+                               project=self.project['name'],
+                               project_domain=self.domain['name'])
         roles = body['token']['roles']
         self.assertEqual(len(roles), 1)
         self.assertEqual(roles[0]['id'], self.role['id'])
diff --git a/tempest/api/identity/admin/v3/test_services.py b/tempest/api/identity/admin/v3/test_services.py
index 9e45b50..13e6d66 100644
--- a/tempest/api/identity/admin/v3/test_services.py
+++ b/tempest/api/identity/admin/v3/test_services.py
@@ -13,20 +13,20 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class ServicesTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     def _del_service(self, service_id):
         # Used for deleting the services created in this class
         self.service_client.delete_service(service_id)
         # Checking whether service is deleted successfully
-        self.assertRaises(exceptions.NotFound, self.service_client.get_service,
+        self.assertRaises(lib_exc.NotFound, self.service_client.get_service,
                           service_id)
 
     @test.attr(type='smoke')
diff --git a/tempest/api/identity/admin/v3/test_tokens.py b/tempest/api/identity/admin/v3/test_tokens.py
index f0acfdf..919eab9 100644
--- a/tempest/api/identity/admin/v3/test_tokens.py
+++ b/tempest/api/identity/admin/v3/test_tokens.py
@@ -13,14 +13,14 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.identity import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class TokensV3TestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @test.attr(type='smoke')
     def test_tokens(self):
@@ -44,7 +44,7 @@
         self.assertEqual(token_details['user']['name'], u_name)
         # Perform Delete Token
         self.client.delete_token(subject_token)
-        self.assertRaises(exceptions.NotFound, self.client.get_token,
+        self.assertRaises(lib_exc.NotFound, self.client.get_token,
                           subject_token)
 
     @test.attr(type='gate')
@@ -108,8 +108,8 @@
 
         # Use the unscoped token to get a scoped token.
         token_auth = self.token.auth(token=token_id,
-                                     tenant=project1_name,
-                                     domain='Default')
+                                     project=project1_name,
+                                     project_domain='Default')
         token1_id = token_auth.response['x-subject-token']
 
         self.assertEqual(orig_expires_at, token_auth['token']['expires_at'],
@@ -138,8 +138,8 @@
 
         # Now get another scoped token using the unscoped token.
         token_auth = self.token.auth(token=token_id,
-                                     tenant=project2_name,
-                                     domain='Default')
+                                     project=project2_name,
+                                     project_domain='Default')
 
         self.assertEqual(project2['id'],
                          token_auth['token']['project']['id'])
diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py
index cd28e96..48201ec 100644
--- a/tempest/api/identity/admin/v3/test_trusts.py
+++ b/tempest/api/identity/admin/v3/test_trusts.py
@@ -13,12 +13,13 @@
 import datetime
 import re
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.identity import base
-from tempest import auth
 from tempest import clients
+from tempest.common import cred_provider
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest.openstack.common import timeutils
 from tempest import test
 
@@ -87,13 +88,11 @@
         self.assertIsNotNone(self.trustee_user_id)
 
         # Initialize a new client with the trustor credentials
-        creds = auth.get_credentials(
+        creds = cred_provider.get_credentials(
             username=self.trustor_username,
             password=self.trustor_password,
             tenant_name=self.trustor_project_name)
-        os = clients.Manager(
-            credentials=creds,
-            interface=self._interface)
+        os = clients.Manager(credentials=creds)
         self.trustor_client = os.identity_v3_client
 
     def cleanup_user_and_roles(self):
@@ -166,26 +165,25 @@
             self.trust_id, self.delegated_role_id)
 
         # And that we don't find not_delegated_role
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.trustor_client.get_trust_role,
                           self.trust_id,
                           self.not_delegated_role_id)
 
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.trustor_client.check_trust_role,
                           self.trust_id,
                           self.not_delegated_role_id)
 
     def delete_trust(self):
         self.trustor_client.delete_trust(self.trust_id)
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.trustor_client.get_trust,
                           self.trust_id)
         self.trust_id = None
 
 
 class TrustsV3TestJSON(BaseTrustsV3Test):
-    _interface = 'json'
 
     def setUp(self):
         super(TrustsV3TestJSON, self).setUp()
@@ -238,7 +236,7 @@
         # is rejected with the correct error
         # with an expiry specified
         expires_str = 'bad.123Z'
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_trust,
                           expires=expires_str)
 
diff --git a/tempest/api/identity/admin/v3/test_users.py b/tempest/api/identity/admin/v3/test_users.py
index 4f3ec05..2481d9d 100644
--- a/tempest/api/identity/admin/v3/test_users.py
+++ b/tempest/api/identity/admin/v3/test_users.py
@@ -19,7 +19,6 @@
 
 
 class UsersV3TestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @test.attr(type='gate')
     def test_user_update(self):
diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py
index 08bfd4f..ce54baa 100644
--- a/tempest/api/identity/base.py
+++ b/tempest/api/identity/base.py
@@ -13,12 +13,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 
-from tempest import auth
 from tempest import clients
+from tempest.common import cred_provider
 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
 
@@ -29,10 +29,10 @@
 class BaseIdentityAdminTest(tempest.test.BaseTestCase):
 
     @classmethod
-    def resource_setup(cls):
-        super(BaseIdentityAdminTest, cls).resource_setup()
-        cls.os_adm = clients.AdminManager(interface=cls._interface)
-        cls.os = clients.Manager(interface=cls._interface)
+    def setup_credentials(cls):
+        super(BaseIdentityAdminTest, cls).setup_credentials()
+        cls.os_adm = clients.AdminManager()
+        cls.os = clients.Manager()
 
     @classmethod
     def disable_user(cls, user_name):
@@ -72,18 +72,27 @@
 class BaseIdentityV2AdminTest(BaseIdentityAdminTest):
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(BaseIdentityV2AdminTest, cls).skip_checks()
         if not CONF.identity_feature_enabled.api_v2:
             raise cls.skipException("Identity api v2 is not enabled")
-        super(BaseIdentityV2AdminTest, cls).resource_setup()
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseIdentityV2AdminTest, cls).setup_clients()
         cls.client = cls.os_adm.identity_client
         cls.token_client = cls.os_adm.token_client
         if not cls.client.has_admin_extensions():
             raise cls.skipException("Admin extensions disabled")
-        cls.data = DataGenerator(cls.client)
+
         cls.non_admin_client = cls.os.identity_client
 
     @classmethod
+    def resource_setup(cls):
+        super(BaseIdentityV2AdminTest, cls).resource_setup()
+        cls.data = DataGenerator(cls.client)
+
+    @classmethod
     def resource_cleanup(cls):
         cls.data.teardown_all()
         super(BaseIdentityV2AdminTest, cls).resource_cleanup()
@@ -92,10 +101,14 @@
 class BaseIdentityV3AdminTest(BaseIdentityAdminTest):
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(BaseIdentityV3AdminTest, cls).skip_checks()
         if not CONF.identity_feature_enabled.api_v3:
             raise cls.skipException("Identity api v3 is not enabled")
-        super(BaseIdentityV3AdminTest, cls).resource_setup()
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseIdentityV3AdminTest, cls).setup_clients()
         cls.client = cls.os_adm.identity_v3_client
         cls.token = cls.os_adm.token_v3_client
         cls.endpoints_client = cls.os_adm.endpoints_client
@@ -149,11 +162,11 @@
 
         @property
         def test_credentials(self):
-            return auth.get_credentials(username=self.test_user,
-                                        user_id=self.user['id'],
-                                        password=self.test_password,
-                                        tenant_name=self.test_tenant,
-                                        tenant_id=self.tenant['id'])
+            return cred_provider.get_credentials(username=self.test_user,
+                                                 user_id=self.user['id'],
+                                                 password=self.test_password,
+                                                 tenant_name=self.test_tenant,
+                                                 tenant_id=self.tenant['id'])
 
         def setup_test_user(self):
             """Set up a test user."""
@@ -226,7 +239,7 @@
                     func(item['id'], **kwargs)
                 else:
                     func(item['id'])
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
             except Exception:
                 LOG.exception("Unexpected exception occurred in %s deletion."
diff --git a/tempest/api/identity/test_extension.py b/tempest/api/identity/test_extension.py
index e3badfc..bbc4c13 100644
--- a/tempest/api/identity/test_extension.py
+++ b/tempest/api/identity/test_extension.py
@@ -18,7 +18,6 @@
 
 
 class ExtensionTestJSON(base.BaseIdentityV2AdminTest):
-    _interface = 'json'
 
     @test.attr(type='gate')
     def test_list_extensions(self):
diff --git a/tempest/api/image/base.py b/tempest/api/image/base.py
index 12f3fdd..ffc3071 100644
--- a/tempest/api/image/base.py
+++ b/tempest/api/image/base.py
@@ -13,12 +13,12 @@
 #    under the License.
 
 import cStringIO as StringIO
+from tempest_lib import exceptions as lib_exc
 
 from tempest import clients
 from tempest.common import credentials
 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
 
@@ -31,24 +31,31 @@
     """Base test class for Image API tests."""
 
     @classmethod
+    def skip_checks(cls):
+        super(BaseImageTest, cls).skip_checks()
+        if not CONF.service_available.glance:
+            skip_msg = ("%s skipped as glance is not available" % cls.__name__)
+            raise cls.skipException(skip_msg)
+
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseImageTest, cls).setup_credentials()
+        cls.isolated_creds = credentials.get_isolated_credentials(
+            cls.__name__, network_resources=cls.network_resources)
+        cls.os = clients.Manager(cls.isolated_creds.get_primary_creds())
+
+    @classmethod
     def resource_setup(cls):
         cls.set_network_resources()
         super(BaseImageTest, cls).resource_setup()
         cls.created_images = []
-        cls._interface = 'json'
-        cls.isolated_creds = credentials.get_isolated_credentials(
-            cls.__name__, network_resources=cls.network_resources)
-        if not CONF.service_available.glance:
-            skip_msg = ("%s skipped as glance is not available" % cls.__name__)
-            raise cls.skipException(skip_msg)
-        cls.os = clients.Manager(cls.isolated_creds.get_primary_creds())
 
     @classmethod
     def resource_cleanup(cls):
         for image_id in cls.created_images:
             try:
                 cls.client.delete_image(image_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
 
         for image_id in cls.created_images:
@@ -76,21 +83,33 @@
 class BaseV1ImageTest(BaseImageTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(BaseV1ImageTest, cls).resource_setup()
-        cls.client = cls.os.image_client
+    def skip_checks(cls):
+        super(BaseV1ImageTest, cls).skip_checks()
         if not CONF.image_feature_enabled.api_v1:
             msg = "Glance API v1 not supported"
             raise cls.skipException(msg)
 
+    @classmethod
+    def setup_clients(cls):
+        super(BaseV1ImageTest, cls).setup_clients()
+        cls.client = cls.os.image_client
+
 
 class BaseV1ImageMembersTest(BaseV1ImageTest):
+
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseV1ImageMembersTest, cls).setup_credentials()
+        cls.os_alt = clients.Manager(cls.isolated_creds.get_alt_creds())
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseV1ImageMembersTest, cls).setup_clients()
+        cls.alt_img_cli = cls.os_alt.image_client
+
     @classmethod
     def resource_setup(cls):
         super(BaseV1ImageMembersTest, cls).resource_setup()
-        cls.os_alt = clients.Manager(cls.isolated_creds.get_alt_creds())
-
-        cls.alt_img_cli = cls.os_alt.image_client
         cls.alt_tenant_id = cls.alt_img_cli.tenant_id
 
     def _create_image(self):
@@ -106,23 +125,35 @@
 class BaseV2ImageTest(BaseImageTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(BaseV2ImageTest, cls).resource_setup()
-        cls.client = cls.os.image_client_v2
+    def skip_checks(cls):
+        super(BaseV2ImageTest, cls).skip_checks()
         if not CONF.image_feature_enabled.api_v2:
             msg = "Glance API v2 not supported"
             raise cls.skipException(msg)
 
+    @classmethod
+    def setup_clients(cls):
+        super(BaseV2ImageTest, cls).setup_clients()
+        cls.client = cls.os.image_client_v2
+
 
 class BaseV2MemberImageTest(BaseV2ImageTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(BaseV2MemberImageTest, cls).resource_setup()
+    def setup_credentials(cls):
+        super(BaseV2MemberImageTest, cls).setup_credentials()
         creds = cls.isolated_creds.get_alt_creds()
         cls.os_alt = clients.Manager(creds)
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseV2MemberImageTest, cls).setup_clients()
         cls.os_img_client = cls.os.image_client_v2
         cls.alt_img_client = cls.os_alt.image_client_v2
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaseV2MemberImageTest, cls).resource_setup()
         cls.alt_tenant_id = cls.alt_img_client.tenant_id
 
     def _list_image_ids_as_alt(self):
diff --git a/tempest/api/image/v1/test_image_members_negative.py b/tempest/api/image/v1/test_image_members_negative.py
index aac63b4..1622791 100644
--- a/tempest/api/image/v1/test_image_members_negative.py
+++ b/tempest/api/image/v1/test_image_members_negative.py
@@ -12,10 +12,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.image import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -25,14 +25,14 @@
     def test_add_member_with_non_existing_image(self):
         # Add member with non existing image.
         non_exist_image = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.add_member,
+        self.assertRaises(lib_exc.NotFound, self.client.add_member,
                           self.alt_tenant_id, non_exist_image)
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_member_with_non_existing_image(self):
         # Delete member with non existing image.
         non_exist_image = data_utils.rand_uuid()
-        self.assertRaises(exceptions.NotFound, self.client.delete_member,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_member,
                           self.alt_tenant_id, non_exist_image)
 
     @test.attr(type=['negative', 'gate'])
@@ -40,13 +40,13 @@
         # Delete member with non existing tenant.
         image_id = self._create_image()
         non_exist_tenant = data_utils.rand_uuid_hex()
-        self.assertRaises(exceptions.NotFound, self.client.delete_member,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_member,
                           non_exist_tenant, image_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_get_image_without_membership(self):
         # Image is hidden from another tenants.
         image_id = self._create_image()
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.alt_img_cli.get_image,
                           image_id)
diff --git a/tempest/api/image/v1/test_images_negative.py b/tempest/api/image/v1/test_images_negative.py
index 66556e0..698bac0 100644
--- a/tempest/api/image/v1/test_images_negative.py
+++ b/tempest/api/image/v1/test_images_negative.py
@@ -13,8 +13,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.image import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -24,18 +25,18 @@
     @test.attr(type=['negative', 'gate'])
     def test_register_with_invalid_container_format(self):
         # Negative tests for invalid data supplied to POST /images
-        self.assertRaises(exceptions.BadRequest, self.client.create_image,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_image,
                           'test', 'wrong', 'vhd')
 
     @test.attr(type=['negative', 'gate'])
     def test_register_with_invalid_disk_format(self):
-        self.assertRaises(exceptions.BadRequest, self.client.create_image,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_image,
                           'test', 'bare', 'wrong')
 
     @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,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_image,
                           '!@$%^&*()')
 
     @test.attr(type=['negative', 'gate'])
@@ -43,28 +44,28 @@
         # 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,
+        self.assertRaises(lib_exc.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, '')
+        self.assertRaises(lib_exc.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,
+        self.assertRaises(lib_exc.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)
+        self.assertRaises(lib_exc.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,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_image,
                           '11a22b9-12a9-5555-cc11-00ab112223fa-3fac')
diff --git a/tempest/api/image/v2/test_images.py b/tempest/api/image/v2/test_images.py
index e307c5c..6b654ca 100644
--- a/tempest/api/image/v2/test_images.py
+++ b/tempest/api/image/v2/test_images.py
@@ -65,8 +65,8 @@
         self.assertEqual(1024, body.get('size'))
 
         # Now try get image file
-        _, body = self.client.get_image_file(image_id)
-        self.assertEqual(file_content, body)
+        body = self.client.get_image_file(image_id)
+        self.assertEqual(file_content, body.data)
 
     @test.attr(type='gate')
     def test_delete_image(self):
diff --git a/tempest/api/image/v2/test_images_member.py b/tempest/api/image/v2/test_images_member.py
index ec1cf14..956829e 100644
--- a/tempest/api/image/v2/test_images_member.py
+++ b/tempest/api/image/v2/test_images_member.py
@@ -15,7 +15,6 @@
 
 
 class ImagesMemberTest(base.BaseV2MemberImageTest):
-    _interface = 'json'
 
     @test.attr(type='gate')
     def test_image_share_accept(self):
diff --git a/tempest/api/image/v2/test_images_member_negative.py b/tempest/api/image/v2/test_images_member_negative.py
index 1f8e3d0..068a6e5 100644
--- a/tempest/api/image/v2/test_images_member_negative.py
+++ b/tempest/api/image/v2/test_images_member_negative.py
@@ -10,13 +10,13 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.image import base
-from tempest import exceptions
 from tempest import test
 
 
 class ImagesMemberNegativeTest(base.BaseV2MemberImageTest):
-    _interface = 'json'
 
     @test.attr(type=['negative', 'gate'])
     def test_image_share_invalid_status(self):
@@ -24,7 +24,7 @@
         member = self.os_img_client.add_member(image_id,
                                                self.alt_tenant_id)
         self.assertEqual(member['status'], 'pending')
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.alt_img_client.update_member_status,
                           image_id, self.alt_tenant_id, 'notavalidstatus')
 
@@ -35,7 +35,7 @@
                                                self.alt_tenant_id)
         self.assertEqual(member['status'], 'pending')
         self.assertNotIn(image_id, self._list_image_ids_as_alt())
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.os_img_client.update_member_status,
                           image_id, self.alt_tenant_id, 'accepted')
         self.assertNotIn(image_id, self._list_image_ids_as_alt())
diff --git a/tempest/api/image/v2/test_images_negative.py b/tempest/api/image/v2/test_images_negative.py
index fc781b1..9f0ad2d 100644
--- a/tempest/api/image/v2/test_images_negative.py
+++ b/tempest/api/image/v2/test_images_negative.py
@@ -16,8 +16,9 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.image import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -39,14 +40,14 @@
     def test_get_non_existent_image(self):
         # get the non-existent image
         non_existent_id = str(uuid.uuid4())
-        self.assertRaises(exceptions.NotFound, self.client.get_image,
+        self.assertRaises(lib_exc.NotFound, self.client.get_image,
                           non_existent_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_get_image_null_id(self):
         # get image with image_id = NULL
         image_id = ""
-        self.assertRaises(exceptions.NotFound, self.client.get_image, image_id)
+        self.assertRaises(lib_exc.NotFound, self.client.get_image, image_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_get_delete_deleted_image(self):
@@ -60,33 +61,33 @@
         self.client.wait_for_resource_deletion(image_id)
 
         # get the deleted image
-        self.assertRaises(exceptions.NotFound, self.client.get_image, image_id)
+        self.assertRaises(lib_exc.NotFound, self.client.get_image, image_id)
 
         # delete the deleted image
-        self.assertRaises(exceptions.NotFound, self.client.delete_image,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_image,
                           image_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_non_existing_image(self):
         # delete non-existent image
         non_existent_image_id = str(uuid.uuid4())
-        self.assertRaises(exceptions.NotFound, self.client.delete_image,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_image,
                           non_existent_image_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_image_null_id(self):
         # delete image with image_id=NULL
         image_id = ""
-        self.assertRaises(exceptions.NotFound, self.client.delete_image,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_image,
                           image_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_register_with_invalid_container_format(self):
         # Negative tests for invalid data supplied to POST /images
-        self.assertRaises(exceptions.BadRequest, self.client.create_image,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_image,
                           'test', 'wrong', 'vhd')
 
     @test.attr(type=['negative', 'gate'])
     def test_register_with_invalid_disk_format(self):
-        self.assertRaises(exceptions.BadRequest, self.client.create_image,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_image,
                           'test', 'bare', 'wrong')
diff --git a/tempest/api/image/v2/test_images_tags_negative.py b/tempest/api/image/v2/test_images_tags_negative.py
index aa0a214..5b18862 100644
--- a/tempest/api/image/v2/test_images_tags_negative.py
+++ b/tempest/api/image/v2/test_images_tags_negative.py
@@ -14,9 +14,10 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.image import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -27,7 +28,7 @@
         # Update tag with non existing image.
         tag = data_utils.rand_name('tag-')
         non_exist_image = str(uuid.uuid4())
-        self.assertRaises(exceptions.NotFound, self.client.add_image_tag,
+        self.assertRaises(lib_exc.NotFound, self.client.add_image_tag,
                           non_exist_image, tag)
 
     @test.attr(type=['negative', 'gate'])
@@ -40,5 +41,5 @@
         image_id = body['id']
         tag = data_utils.rand_name('non-exist-tag-')
         self.addCleanup(self.client.delete_image, image_id)
-        self.assertRaises(exceptions.NotFound, self.client.delete_image_tag,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_image_tag,
                           image_id, tag)
diff --git a/tempest/api/messaging/base.py b/tempest/api/messaging/base.py
index 58511a9..eae0707 100644
--- a/tempest/api/messaging/base.py
+++ b/tempest/api/messaging/base.py
@@ -35,13 +35,25 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(BaseMessagingTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(BaseMessagingTest, cls).skip_checks()
         if not CONF.service_available.zaqar:
             raise cls.skipException("Zaqar support is required")
-        os = cls.get_client_manager()
+
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseMessagingTest, cls).setup_credentials()
+        cls.os = cls.get_client_manager()
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseMessagingTest, cls).setup_clients()
+        cls.client = cls.os.messaging_client
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaseMessagingTest, cls).resource_setup()
         cls.messaging_cfg = CONF.messaging
-        cls.client = os.messaging_client
 
     @classmethod
     def create_queue(cls, queue_name):
diff --git a/tempest/api/messaging/test_claims.py b/tempest/api/messaging/test_claims.py
index 1aab8d2..c9064b0 100644
--- a/tempest/api/messaging/test_claims.py
+++ b/tempest/api/messaging/test_claims.py
@@ -29,7 +29,6 @@
 
 
 class TestClaims(base.BaseMessagingTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/messaging/test_messages.py b/tempest/api/messaging/test_messages.py
index 3c27ac2..dca95fc 100644
--- a/tempest/api/messaging/test_messages.py
+++ b/tempest/api/messaging/test_messages.py
@@ -26,7 +26,6 @@
 
 
 class TestMessages(base.BaseMessagingTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/messaging/test_queues.py b/tempest/api/messaging/test_queues.py
index accbd17..24656bf 100644
--- a/tempest/api/messaging/test_queues.py
+++ b/tempest/api/messaging/test_queues.py
@@ -16,11 +16,11 @@
 import logging
 
 from six import moves
+from tempest_lib import exceptions as lib_exc
 from testtools import matchers
 
 from tempest.api.messaging import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -42,13 +42,12 @@
         self.assertEqual('', body)
 
         self.delete_queue(queue_name)
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.get_queue,
                           queue_name)
 
 
 class TestManageQueue(base.BaseMessagingTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/network/admin/test_agent_management.py b/tempest/api/network/admin/test_agent_management.py
index e7fd016..20948cc 100644
--- a/tempest/api/network/admin/test_agent_management.py
+++ b/tempest/api/network/admin/test_agent_management.py
@@ -18,7 +18,6 @@
 
 
 class AgentManagementTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/network/admin/test_dhcp_agent_scheduler.py b/tempest/api/network/admin/test_dhcp_agent_scheduler.py
index a89f25c..4eb6b87 100644
--- a/tempest/api/network/admin/test_dhcp_agent_scheduler.py
+++ b/tempest/api/network/admin/test_dhcp_agent_scheduler.py
@@ -17,7 +17,6 @@
 
 
 class DHCPAgentSchedulersTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/network/admin/test_external_network_extension.py b/tempest/api/network/admin/test_external_network_extension.py
index 06cce48..6e24f8e 100644
--- a/tempest/api/network/admin/test_external_network_extension.py
+++ b/tempest/api/network/admin/test_external_network_extension.py
@@ -15,7 +15,6 @@
 
 
 class ExternalNetworksTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/network/admin/test_external_networks_negative.py b/tempest/api/network/admin/test_external_networks_negative.py
index 7dbb347..aa8dd9a 100644
--- a/tempest/api/network/admin/test_external_networks_negative.py
+++ b/tempest/api/network/admin/test_external_networks_negative.py
@@ -13,16 +13,16 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.network import base
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
 
 
 class ExternalNetworksAdminNegativeTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     @test.attr(type=['negative'])
     def test_create_port_with_precreated_floatingip_as_fixed_ip(self):
@@ -47,7 +47,7 @@
         fixed_ips = [{'ip_address': floating_ip_address}]
 
         # create a port which will internally create an instance-ip
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           client.create_port,
                           network_id=CONF.network.public_network_id,
                           fixed_ips=fixed_ips)
diff --git a/tempest/api/network/admin/test_floating_ips_admin_actions.py b/tempest/api/network/admin/test_floating_ips_admin_actions.py
index 62ba1b3..ee3b0bb 100644
--- a/tempest/api/network/admin/test_floating_ips_admin_actions.py
+++ b/tempest/api/network/admin/test_floating_ips_admin_actions.py
@@ -22,7 +22,7 @@
 
 
 class FloatingIPAdminTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
+
     force_tenant_isolation = True
 
     @classmethod
diff --git a/tempest/api/network/admin/test_l3_agent_scheduler.py b/tempest/api/network/admin/test_l3_agent_scheduler.py
index a6de581..05a8e35 100644
--- a/tempest/api/network/admin/test_l3_agent_scheduler.py
+++ b/tempest/api/network/admin/test_l3_agent_scheduler.py
@@ -18,7 +18,6 @@
 
 
 class L3AgentSchedulerTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
diff --git a/tempest/api/network/admin/test_lbaas_agent_scheduler.py b/tempest/api/network/admin/test_lbaas_agent_scheduler.py
index da1af36..8cfd5c2 100644
--- a/tempest/api/network/admin/test_lbaas_agent_scheduler.py
+++ b/tempest/api/network/admin/test_lbaas_agent_scheduler.py
@@ -18,7 +18,6 @@
 
 
 class LBaaSAgentSchedulerTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
diff --git a/tempest/api/network/admin/test_load_balancer_admin_actions.py b/tempest/api/network/admin/test_load_balancer_admin_actions.py
index e81616b..2537b28 100644
--- a/tempest/api/network/admin/test_load_balancer_admin_actions.py
+++ b/tempest/api/network/admin/test_load_balancer_admin_actions.py
@@ -19,7 +19,6 @@
 
 
 class LoadBalancerAdminTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     """
     Test admin actions for load balancer.
diff --git a/tempest/api/network/admin/test_quotas.py b/tempest/api/network/admin/test_quotas.py
index f8dfca9..39850f5 100644
--- a/tempest/api/network/admin/test_quotas.py
+++ b/tempest/api/network/admin/test_quotas.py
@@ -20,7 +20,6 @@
 
 
 class QuotasTest(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
diff --git a/tempest/api/network/admin/test_routers_dvr.py b/tempest/api/network/admin/test_routers_dvr.py
new file mode 100644
index 0000000..c6d8165
--- /dev/null
+++ b/tempest/api/network/admin/test_routers_dvr.py
@@ -0,0 +1,98 @@
+# Copyright 2015 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.network import base_routers as base
+from tempest.common.utils import data_utils
+from tempest import test
+
+
+class RoutersTestDVR(base.BaseRouterTest):
+
+    @classmethod
+    def resource_setup(cls):
+        for ext in ['router', 'dvr']:
+            if not test.is_extension_enabled(ext, 'network'):
+                msg = "%s extension not enabled." % ext
+                raise cls.skipException(msg)
+        # The check above will pass if api_extensions=all, which does
+        # not mean DVR extension itself is present.
+        # Instead, we have to check whether DVR is actually present by using
+        # admin credentials to create router with distributed=True attribute
+        # and checking for BadRequest exception and that the resulting router
+        # has a distributed attribute.
+        super(RoutersTestDVR, cls).resource_setup()
+        name = data_utils.rand_name('pretest-check')
+        router = cls.admin_client.create_router(name)
+        if 'distributed' not in router['router']:
+            msg = "'distributed' attribute not found. DVR Possibly not enabled"
+            raise cls.skipException(msg)
+        cls.admin_client.delete_router(router['router']['id'])
+
+    @test.attr(type='smoke')
+    def test_distributed_router_creation(self):
+        """
+        Test uses administrative credentials to creates a
+        DVR (Distributed Virtual Routing) router using the
+        distributed=True.
+
+        Acceptance
+        The router is created and the "distributed" attribute is
+        set to True
+        """
+        name = data_utils.rand_name('router')
+        router = self.admin_client.create_router(name, distributed=True)
+        self.addCleanup(self.admin_client.delete_router,
+                        router['router']['id'])
+        self.assertTrue(router['router']['distributed'])
+
+    @test.attr(type='smoke')
+    def test_centralized_router_creation(self):
+        """
+        Test uses administrative credentials to creates a
+        CVR (Centralized Virtual Routing) router using the
+        distributed=False.
+
+        Acceptance
+        The router is created and the "distributed" attribute is
+        set to False, thus making it a "Centralized Virtual Router"
+        as opposed to a "Distributed Virtual Router"
+        """
+        name = data_utils.rand_name('router')
+        router = self.admin_client.create_router(name, distributed=False)
+        self.addCleanup(self.admin_client.delete_router,
+                        router['router']['id'])
+        self.assertFalse(router['router']['distributed'])
+
+    @test.attr(type='smoke')
+    def test_centralized_router_update_to_dvr(self):
+        """
+        Test uses administrative credentials to creates a
+        CVR (Centralized Virtual Routing) router using the
+        distributed=False.Then it will "update" the router
+        distributed attribute to True
+
+        Acceptance
+        The router is created and the "distributed" attribute is
+        set to False. Once the router is updated, the distributed
+        attribute will be set to True
+        """
+        name = data_utils.rand_name('router')
+        router = self.admin_client.create_router(name, distributed=False)
+        self.addCleanup(self.admin_client.delete_router,
+                        router['router']['id'])
+        self.assertFalse(router['router']['distributed'])
+        router = self.admin_client.update_router(router['router']['id'],
+                                                 distributed=True)
+        self.assertTrue(router['router']['distributed'])
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index 10cda53..e8c8de3 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 import netaddr
+from tempest_lib import exceptions as lib_exc
 
 from tempest import clients
 from tempest.common.utils import data_utils
@@ -49,7 +50,6 @@
         neutron as True
     """
 
-    _interface = 'json'
     force_tenant_isolation = False
 
     # Default to ipv4.
@@ -177,7 +177,7 @@
         try:
             delete_callable(*args, **kwargs)
         # if resource is not found, this means it was deleted in the test
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             pass
 
     @classmethod
@@ -223,7 +223,7 @@
                     gateway_ip=gateway_ip,
                     **kwargs)
                 break
-            except exceptions.BadRequest as e:
+            except lib_exc.BadRequest as e:
                 is_overlapping_cidr = 'overlaps with another subnet' in str(e)
                 if not is_overlapping_cidr:
                     raise
@@ -399,7 +399,7 @@
             try:
                 cls.client.remove_router_interface_with_subnet_id(
                     router['id'], i['fixed_ips'][0]['subnet_id'])
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
         cls.client.delete_router(router['id'])
 
@@ -420,8 +420,7 @@
 
         try:
             creds = cls.isolated_creds.get_admin_creds()
-            cls.os_adm = clients.Manager(
-                credentials=creds, interface=cls._interface)
+            cls.os_adm = clients.Manager(credentials=creds)
         except NotImplementedError:
             msg = ("Missing Administrative Network API credentials "
                    "in configuration.")
diff --git a/tempest/api/network/test_allowed_address_pair.py b/tempest/api/network/test_allowed_address_pair.py
index 57887ac..a4954af 100644
--- a/tempest/api/network/test_allowed_address_pair.py
+++ b/tempest/api/network/test_allowed_address_pair.py
@@ -23,7 +23,6 @@
 
 
 class AllowedAddressPairTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     """
     Tests the Neutron Allowed Address Pair API extension using the Tempest
diff --git a/tempest/api/network/test_dhcp_ipv6.py b/tempest/api/network/test_dhcp_ipv6.py
index 1257699..1b28bac 100644
--- a/tempest/api/network/test_dhcp_ipv6.py
+++ b/tempest/api/network/test_dhcp_ipv6.py
@@ -16,10 +16,11 @@
 import netaddr
 import random
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.network import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 
 CONF = config.CONF
 
@@ -144,7 +145,7 @@
         ):
             kwargs = {'ipv6_ra_mode': ra_mode,
                       'ipv6_address_mode': add_mode}
-            self.assertRaises(exceptions.BadRequest,
+            self.assertRaises(lib_exc.BadRequest,
                               self.create_subnet,
                               self.network,
                               **kwargs)
@@ -327,7 +328,7 @@
                                    subnet["allocation_pools"][0]["end"])
         ip = netaddr.IPAddress(random.randrange(
             ip_range.last + 1, ip_range.last + 10)).format()
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.create_port,
                           self.network,
                           fixed_ips=[{'subnet_id': subnet['id'],
@@ -348,7 +349,7 @@
                          fixed_ips=[
                              {'subnet_id': subnet['id'],
                               'ip_address': ip}])
-        self.assertRaisesRegexp(exceptions.Conflict,
+        self.assertRaisesRegexp(lib_exc.Conflict,
                                 "object with that identifier already exists",
                                 self.create_port,
                                 self.network,
diff --git a/tempest/api/network/test_extensions.py b/tempest/api/network/test_extensions.py
index 54c3cb9..2b4ccaf 100644
--- a/tempest/api/network/test_extensions.py
+++ b/tempest/api/network/test_extensions.py
@@ -19,7 +19,6 @@
 
 
 class ExtensionsTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
diff --git a/tempest/api/network/test_extra_dhcp_options.py b/tempest/api/network/test_extra_dhcp_options.py
index bd70323..1faac58 100644
--- a/tempest/api/network/test_extra_dhcp_options.py
+++ b/tempest/api/network/test_extra_dhcp_options.py
@@ -19,7 +19,6 @@
 
 
 class ExtraDHCPOptionsTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations with the Extra DHCP Options Neutron API
diff --git a/tempest/api/network/test_floating_ips.py b/tempest/api/network/test_floating_ips.py
index 1151c5d..43b296c 100644
--- a/tempest/api/network/test_floating_ips.py
+++ b/tempest/api/network/test_floating_ips.py
@@ -24,7 +24,6 @@
 
 
 class FloatingIPTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Quantum API using the REST client for
diff --git a/tempest/api/network/test_floating_ips_negative.py b/tempest/api/network/test_floating_ips_negative.py
index 82f0519..7d70976 100644
--- a/tempest/api/network/test_floating_ips_negative.py
+++ b/tempest/api/network/test_floating_ips_negative.py
@@ -14,17 +14,18 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.network 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 FloatingIPNegativeTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
+
     """
     Test the following negative  operations for floating ips:
 
@@ -49,7 +50,7 @@
 
     @test.attr(type=['negative', 'smoke'])
     def test_create_floatingip_with_port_ext_net_unreachable(self):
-        self.assertRaises(exceptions.NotFound, self.client.create_floatingip,
+        self.assertRaises(lib_exc.NotFound, self.client.create_floatingip,
                           floating_network_id=self.ext_net_id,
                           port_id=self.port['id'],
                           fixed_ip_address=self.port['fixed_ips'][0]
@@ -57,7 +58,7 @@
 
     @test.attr(type=['negative', 'smoke'])
     def test_create_floatingip_in_private_network(self):
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.create_floatingip,
                           floating_network_id=self.network['id'],
                           port_id=self.port['id'],
@@ -72,7 +73,7 @@
         floating_ip = body['floatingip']
         self.addCleanup(self.client.delete_floatingip, floating_ip['id'])
         # Associate floating IP to the other port
-        self.assertRaises(exceptions.NotFound, self.client.update_floatingip,
+        self.assertRaises(lib_exc.NotFound, self.client.update_floatingip,
                           floating_ip['id'], port_id=self.port['id'],
                           fixed_ip_address=self.port['fixed_ips'][0]
                           ['ip_address'])
diff --git a/tempest/api/network/test_fwaas_extensions.py b/tempest/api/network/test_fwaas_extensions.py
index 8104567..280c5bb 100644
--- a/tempest/api/network/test_fwaas_extensions.py
+++ b/tempest/api/network/test_fwaas_extensions.py
@@ -12,6 +12,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.network import base
 from tempest.common.utils import data_utils
 from tempest import config
@@ -22,7 +24,6 @@
 
 
 class FWaaSExtensionTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
@@ -63,7 +64,7 @@
         try:
             self.client.delete_firewall_policy(policy_id)
         # if policy is not found, this means it was deleted in the test
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             pass
 
     def _try_delete_rule(self, rule_id):
@@ -71,7 +72,7 @@
         try:
             self.client.delete_firewall_rule(rule_id)
         # if rule is not found, this means it was deleted in the test
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             pass
 
     def _try_delete_firewall(self, fw_id):
@@ -79,7 +80,7 @@
         try:
             self.client.delete_firewall(fw_id)
         # if firewall is not found, this means it was deleted in the test
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             pass
 
         self.client.wait_for_resource_deletion('firewall', fw_id)
diff --git a/tempest/api/network/test_load_balancer.py b/tempest/api/network/test_load_balancer.py
index df76757..107d8cd 100644
--- a/tempest/api/network/test_load_balancer.py
+++ b/tempest/api/network/test_load_balancer.py
@@ -21,7 +21,6 @@
 
 
 class LoadBalancerTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
diff --git a/tempest/api/network/test_metering_extensions.py b/tempest/api/network/test_metering_extensions.py
index 6ba1ea4..c80d0e9 100644
--- a/tempest/api/network/test_metering_extensions.py
+++ b/tempest/api/network/test_metering_extensions.py
@@ -24,7 +24,6 @@
 
 
 class MeteringTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py
index 65aeb24..0df455e 100644
--- a/tempest/api/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -15,19 +15,18 @@
 import itertools
 
 import netaddr
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.network import base
 from tempest.common import custom_matchers
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
 
 
 class NetworksTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
@@ -280,7 +279,7 @@
         try:
             self.client.delete_network(net_id)
         # if network is not found, this means it was deleted in the test
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             pass
 
     @test.attr(type='smoke')
@@ -300,7 +299,7 @@
         body = self.client.delete_network(net_id)
 
         # Verify that the subnet got automatically deleted.
-        self.assertRaises(exceptions.NotFound, self.client.show_subnet,
+        self.assertRaises(lib_exc.NotFound, self.client.show_subnet,
                           subnet_id)
 
         # Since create_subnet adds the subnet to the delete list, and it is
@@ -399,7 +398,6 @@
 
 
 class BulkNetworkOpsTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
@@ -614,7 +612,7 @@
         self.assertNotIn(subnet_slaac['id'], subnet_ids,
                          "Subnet wasn't deleted")
         self.assertRaisesRegexp(
-            exceptions.Conflict,
+            lib_exc.Conflict,
             "There are one or more ports still in use on the network",
             self.client.delete_network,
             slaac_network['id'])
diff --git a/tempest/api/network/test_networks_negative.py b/tempest/api/network/test_networks_negative.py
index bc3ab68..09bd9c3 100644
--- a/tempest/api/network/test_networks_negative.py
+++ b/tempest/api/network/test_networks_negative.py
@@ -14,41 +14,41 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.network import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class NetworksNegativeTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     @test.attr(type=['negative', 'smoke'])
     def test_show_non_existent_network(self):
         non_exist_id = data_utils.rand_name('network')
-        self.assertRaises(exceptions.NotFound, self.client.show_network,
+        self.assertRaises(lib_exc.NotFound, self.client.show_network,
                           non_exist_id)
 
     @test.attr(type=['negative', 'smoke'])
     def test_show_non_existent_subnet(self):
         non_exist_id = data_utils.rand_name('subnet')
-        self.assertRaises(exceptions.NotFound, self.client.show_subnet,
+        self.assertRaises(lib_exc.NotFound, self.client.show_subnet,
                           non_exist_id)
 
     @test.attr(type=['negative', 'smoke'])
     def test_show_non_existent_port(self):
         non_exist_id = data_utils.rand_name('port')
-        self.assertRaises(exceptions.NotFound, self.client.show_port,
+        self.assertRaises(lib_exc.NotFound, self.client.show_port,
                           non_exist_id)
 
     @test.attr(type=['negative', 'smoke'])
     def test_update_non_existent_network(self):
         non_exist_id = data_utils.rand_name('network')
-        self.assertRaises(exceptions.NotFound, self.client.update_network,
+        self.assertRaises(lib_exc.NotFound, self.client.update_network,
                           non_exist_id, name="new_name")
 
     @test.attr(type=['negative', 'smoke'])
     def test_delete_non_existent_network(self):
         non_exist_id = data_utils.rand_name('network')
-        self.assertRaises(exceptions.NotFound, self.client.delete_network,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_network,
                           non_exist_id)
diff --git a/tempest/api/network/test_ports.py b/tempest/api/network/test_ports.py
index bf85e90..2460092 100644
--- a/tempest/api/network/test_ports.py
+++ b/tempest/api/network/test_ports.py
@@ -27,7 +27,6 @@
 
 
 class PortsTestJSON(sec_base.BaseSecGroupTest):
-    _interface = 'json'
 
     """
     Test the following operations for ports:
@@ -300,7 +299,6 @@
 
 
 class PortsAdminExtendedAttrsTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/network/test_routers.py b/tempest/api/network/test_routers.py
index 210a8af..b0ee00d 100644
--- a/tempest/api/network/test_routers.py
+++ b/tempest/api/network/test_routers.py
@@ -25,7 +25,6 @@
 
 
 class RoutersTest(base.BaseRouterTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/network/test_routers_negative.py b/tempest/api/network/test_routers_negative.py
index d571e92..67a6c94 100644
--- a/tempest/api/network/test_routers_negative.py
+++ b/tempest/api/network/test_routers_negative.py
@@ -14,18 +14,17 @@
 #    under the License.
 
 import netaddr
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.network import base_routers as base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
 
 
 class RoutersNegativeTest(base.BaseRouterTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -42,7 +41,7 @@
 
     @test.attr(type=['negative', 'smoke'])
     def test_router_add_gateway_invalid_network_returns_404(self):
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.update_router,
                           self.router['id'],
                           external_gateway_info={
@@ -54,7 +53,7 @@
             network_name=data_utils.rand_name('router-negative-'))
         sub_cidr = netaddr.IPNetwork(self.tenant_cidr).next()
         self.create_subnet(alt_network, cidr=sub_cidr)
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.update_router,
                           self.router['id'],
                           external_gateway_info={
@@ -70,7 +69,7 @@
         subnet02 = self.create_subnet(network02)
         self._add_router_interface_with_subnet_id(self.router['id'],
                                                   subnet01['id'])
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self._add_router_interface_with_subnet_id,
                           self.router['id'],
                           subnet02['id'])
@@ -79,26 +78,26 @@
     def test_router_remove_interface_in_use_returns_409(self):
         self.client.add_router_interface_with_subnet_id(
             self.router['id'], self.subnet['id'])
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.delete_router,
                           self.router['id'])
 
     @test.attr(type=['negative', 'smoke'])
     def test_show_non_existent_router_returns_404(self):
         router = data_utils.rand_name('non_exist_router')
-        self.assertRaises(exceptions.NotFound, self.client.show_router,
+        self.assertRaises(lib_exc.NotFound, self.client.show_router,
                           router)
 
     @test.attr(type=['negative', 'smoke'])
     def test_update_non_existent_router_returns_404(self):
         router = data_utils.rand_name('non_exist_router')
-        self.assertRaises(exceptions.NotFound, self.client.update_router,
+        self.assertRaises(lib_exc.NotFound, self.client.update_router,
                           router, name="new_name")
 
     @test.attr(type=['negative', 'smoke'])
     def test_delete_non_existent_router_returns_404(self):
         router = data_utils.rand_name('non_exist_router')
-        self.assertRaises(exceptions.NotFound, self.client.delete_router,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_router,
                           router)
 
 
diff --git a/tempest/api/network/test_security_groups.py b/tempest/api/network/test_security_groups.py
index 415dedd..f9af3cc 100644
--- a/tempest/api/network/test_security_groups.py
+++ b/tempest/api/network/test_security_groups.py
@@ -24,7 +24,7 @@
 
 
 class SecGroupTest(base.BaseSecGroupTest):
-    _interface = 'json'
+
     _tenant_network_cidr = CONF.network.tenant_network_cidr
 
     @classmethod
@@ -162,7 +162,7 @@
         """Verify security group rule for icmp protocol works.
 
         Specify icmp type (port_range_min) and icmp code
-        (port_range_max) with different values. A seperate testcase
+        (port_range_max) with different values. A separate testcase
         is added for icmp protocol as icmp validation would be
         different from tcp/udp.
         """
diff --git a/tempest/api/network/test_security_groups_negative.py b/tempest/api/network/test_security_groups_negative.py
index fb51e30..0da1aac 100644
--- a/tempest/api/network/test_security_groups_negative.py
+++ b/tempest/api/network/test_security_groups_negative.py
@@ -15,16 +15,17 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.network import base_security_groups as base
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
 
 
 class NegativeSecGroupTest(base.BaseSecGroupTest):
-    _interface = 'json'
+
     _tenant_network_cidr = CONF.network.tenant_network_cidr
 
     @classmethod
@@ -37,20 +38,20 @@
     @test.attr(type=['negative', 'gate'])
     def test_show_non_existent_security_group(self):
         non_exist_id = str(uuid.uuid4())
-        self.assertRaises(exceptions.NotFound, self.client.show_security_group,
+        self.assertRaises(lib_exc.NotFound, self.client.show_security_group,
                           non_exist_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_show_non_existent_security_group_rule(self):
         non_exist_id = str(uuid.uuid4())
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.show_security_group_rule,
                           non_exist_id)
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_non_existent_security_group(self):
         non_exist_id = str(uuid.uuid4())
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.delete_security_group,
                           non_exist_id
                           )
@@ -62,7 +63,7 @@
         # Create rule with bad protocol name
         pname = 'bad_protocol_name'
         self.assertRaises(
-            exceptions.BadRequest, self.client.create_security_group_rule,
+            lib_exc.BadRequest, self.client.create_security_group_rule,
             security_group_id=group_create_body['security_group']['id'],
             protocol=pname, direction='ingress', ethertype=self.ethertype)
 
@@ -74,7 +75,7 @@
         prefix = ['192.168.1./24', '192.168.1.1/33', 'bad_prefix', '256']
         for remote_ip_prefix in prefix:
             self.assertRaises(
-                exceptions.BadRequest, self.client.create_security_group_rule,
+                lib_exc.BadRequest, self.client.create_security_group_rule,
                 security_group_id=group_create_body['security_group']['id'],
                 protocol='tcp', direction='ingress', ethertype=self.ethertype,
                 remote_ip_prefix=remote_ip_prefix)
@@ -88,7 +89,7 @@
         group_ids = ['bad_group_id', non_exist_id]
         for remote_group_id in group_ids:
             self.assertRaises(
-                exceptions.NotFound, self.client.create_security_group_rule,
+                lib_exc.NotFound, self.client.create_security_group_rule,
                 security_group_id=group_create_body['security_group']['id'],
                 protocol='tcp', direction='ingress', ethertype=self.ethertype,
                 remote_group_id=remote_group_id)
@@ -101,7 +102,7 @@
         # Create rule specifying both remote_ip_prefix and remote_group_id
         prefix = self._tenant_network_cidr
         self.assertRaises(
-            exceptions.BadRequest, self.client.create_security_group_rule,
+            lib_exc.BadRequest, self.client.create_security_group_rule,
             security_group_id=sg1_body['security_group']['id'],
             protocol='tcp', direction='ingress',
             ethertype=self.ethertype, remote_ip_prefix=prefix,
@@ -114,7 +115,7 @@
         # Create rule with bad ethertype
         ethertype = 'bad_ethertype'
         self.assertRaises(
-            exceptions.BadRequest, self.client.create_security_group_rule,
+            lib_exc.BadRequest, self.client.create_security_group_rule,
             security_group_id=group_create_body['security_group']['id'],
             protocol='udp', direction='ingress', ethertype=ethertype)
 
@@ -130,7 +131,7 @@
                   (-16, 65536, 'Invalid value for port')]
         for pmin, pmax, msg in states:
             ex = self.assertRaises(
-                exceptions.BadRequest, self.client.create_security_group_rule,
+                lib_exc.BadRequest, self.client.create_security_group_rule,
                 security_group_id=group_create_body['security_group']['id'],
                 protocol='tcp', port_range_min=pmin, port_range_max=pmax,
                 direction='ingress', ethertype=self.ethertype)
@@ -142,7 +143,7 @@
                   (300, 1, 'Invalid value for ICMP type')]
         for pmin, pmax, msg in states:
             ex = self.assertRaises(
-                exceptions.BadRequest, self.client.create_security_group_rule,
+                lib_exc.BadRequest, self.client.create_security_group_rule,
                 security_group_id=group_create_body['security_group']['id'],
                 protocol='icmp', port_range_min=pmin, port_range_max=pmax,
                 direction='ingress', ethertype=self.ethertype)
@@ -152,7 +153,7 @@
     def test_create_additional_default_security_group_fails(self):
         # Create security group named 'default', it should be failed.
         name = 'default'
-        self.assertRaises(exceptions.Conflict,
+        self.assertRaises(lib_exc.Conflict,
                           self.client.create_security_group,
                           name=name)
 
@@ -175,7 +176,7 @@
 
         # Try creating the same security group rule, it should fail
         self.assertRaises(
-            exceptions.Conflict, self.client.create_security_group_rule,
+            lib_exc.Conflict, self.client.create_security_group_rule,
             security_group_id=body['security_group']['id'],
             protocol='tcp', direction='ingress', ethertype=self.ethertype,
             port_range_min=min_port, port_range_max=max_port)
@@ -184,7 +185,7 @@
     def test_create_security_group_rule_with_non_existent_security_group(self):
         # Create security group rules with not existing security group.
         non_existent_sg = str(uuid.uuid4())
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.create_security_group_rule,
                           security_group_id=non_existent_sg,
                           direction='ingress', ethertype=self.ethertype)
@@ -205,7 +206,7 @@
                   'ip_prefix': CONF.network.tenant_network_v6_cidr})
         for pair in pairs:
             self.assertRaisesRegexp(
-                exceptions.BadRequest,
+                lib_exc.BadRequest,
                 "Conflicting value ethertype",
                 self.client.create_security_group_rule,
                 security_group_id=group_create_body['security_group']['id'],
diff --git a/tempest/api/network/test_service_type_management.py b/tempest/api/network/test_service_type_management.py
index 0492fe3..e620ae6 100644
--- a/tempest/api/network/test_service_type_management.py
+++ b/tempest/api/network/test_service_type_management.py
@@ -17,7 +17,6 @@
 
 
 class ServiceTypeManagementTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/network/test_vpnaas_extensions.py b/tempest/api/network/test_vpnaas_extensions.py
index 56e1a05..d869b55 100644
--- a/tempest/api/network/test_vpnaas_extensions.py
+++ b/tempest/api/network/test_vpnaas_extensions.py
@@ -13,17 +13,17 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.network 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 VPNaaSTestJSON(base.BaseAdminNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
@@ -74,7 +74,7 @@
         try:
             self.client.delete_ipsecpolicy(ipsec_policy_id)
 
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             pass
 
     def _assertExpected(self, expected, actual):
@@ -304,7 +304,7 @@
         self._assertExpected(new_ipsec, updated_ipsec_policy)
         # Verification of ipsec policy delete
         self.client.delete_ipsecpolicy(ipsecpolicy['id'])
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.delete_ipsecpolicy, ipsecpolicy['id'])
 
     @test.attr(type='smoke')
diff --git a/tempest/api/object_storage/base.py b/tempest/api/object_storage/base.py
index 36c9f5a..6a025d9 100644
--- a/tempest/api/object_storage/base.py
+++ b/tempest/api/object_storage/base.py
@@ -13,13 +13,13 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.identity import base
 from tempest import clients
 from tempest.common import credentials
 from tempest.common import custom_matchers
 from tempest import config
-from tempest import exceptions
 import tempest.test
 
 CONF = config.CONF
@@ -28,21 +28,31 @@
 class BaseObjectTest(tempest.test.BaseTestCase):
 
     @classmethod
-    def resource_setup(cls):
-        cls.set_network_resources()
-        super(BaseObjectTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(BaseObjectTest, cls).skip_checks()
         if not CONF.service_available.swift:
             skip_msg = ("%s skipped as swift is not available" % cls.__name__)
             raise cls.skipException(skip_msg)
+
+    @classmethod
+    def setup_credentials(cls):
+        cls.set_network_resources()
+        super(BaseObjectTest, cls).setup_credentials()
+
         cls.isolated_creds = credentials.get_isolated_credentials(
             cls.__name__, network_resources=cls.network_resources)
         # Get isolated creds for normal user
         cls.os = clients.Manager(cls.isolated_creds.get_primary_creds())
         # Get isolated creds for admin user
         cls.os_admin = clients.Manager(cls.isolated_creds.get_admin_creds())
+        cls.data = SwiftDataGenerator(cls.os_admin.identity_client)
         # Get isolated creds for alt user
         cls.os_alt = clients.Manager(cls.isolated_creds.get_alt_creds())
 
+    @classmethod
+    def setup_clients(cls):
+        super(BaseObjectTest, cls).setup_clients()
+
         cls.object_client = cls.os.object_client
         cls.container_client = cls.os.container_client
         cls.account_client = cls.os.account_client
@@ -52,6 +62,10 @@
         cls.container_client_alt = cls.os_alt.container_client
         cls.identity_client_alt = cls.os_alt.identity_client
 
+    @classmethod
+    def resource_setup(cls):
+        super(BaseObjectTest, cls).resource_setup()
+
         # Make sure we get fresh auth data after assigning swift role
         cls.object_client.auth_provider.clear_auth()
         cls.container_client.auth_provider.clear_auth()
@@ -59,8 +73,6 @@
         cls.object_client_alt.auth_provider.clear_auth()
         cls.container_client_alt.auth_provider.clear_auth()
 
-        cls.data = SwiftDataGenerator(cls.identity_admin_client)
-
     @classmethod
     def resource_cleanup(cls):
         cls.data.teardown_all()
@@ -93,10 +105,10 @@
                 for obj in objlist:
                     try:
                         object_client.delete_object(cont, obj['name'])
-                    except exceptions.NotFound:
+                    except lib_exc.NotFound:
                         pass
                 container_client.delete_container(cont)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
 
     def assertHeaders(self, resp, target, method):
@@ -126,7 +138,7 @@
             return next(r['id'] for r in roles if r['name'] == role_name)
         except StopIteration:
             msg = "Role name '%s' is not found" % role_name
-            raise exceptions.NotFound(msg)
+            raise lib_exc.NotFound(msg)
 
     def _assign_role(self, role_id):
         self.client.assign_user_role(self.tenant['id'],
diff --git a/tempest/api/object_storage/test_account_quotas.py b/tempest/api/object_storage/test_account_quotas.py
index 1832b37..e3f5f3d 100644
--- a/tempest/api/object_storage/test_account_quotas.py
+++ b/tempest/api/object_storage/test_account_quotas.py
@@ -26,15 +26,17 @@
 class AccountQuotasTest(base.BaseObjectTest):
 
     @classmethod
+    def setup_credentials(cls):
+        super(AccountQuotasTest, cls).setup_credentials()
+        cls.data.setup_test_user(reseller=True)
+        cls.os_reselleradmin = clients.Manager(cls.data.test_credentials)
+
+    @classmethod
     def resource_setup(cls):
         super(AccountQuotasTest, cls).resource_setup()
         cls.container_name = data_utils.rand_name(name="TestContainer")
         cls.container_client.create_container(cls.container_name)
 
-        cls.data.setup_test_user(reseller=True)
-
-        cls.os_reselleradmin = clients.Manager(cls.data.test_credentials)
-
         # Retrieve a ResellerAdmin auth data and use it to set a quota
         # on the client's account
         cls.reselleradmin_auth_data = \
diff --git a/tempest/api/object_storage/test_account_quotas_negative.py b/tempest/api/object_storage/test_account_quotas_negative.py
index 5a0be54..783bf1a 100644
--- a/tempest/api/object_storage/test_account_quotas_negative.py
+++ b/tempest/api/object_storage/test_account_quotas_negative.py
@@ -15,12 +15,12 @@
 # under the License.
 
 from tempest_lib import decorators
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.object_storage import base
 from tempest import clients
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -29,15 +29,17 @@
 class AccountQuotasNegativeTest(base.BaseObjectTest):
 
     @classmethod
+    def setup_credentials(cls):
+        super(AccountQuotasNegativeTest, cls).setup_credentials()
+        cls.data.setup_test_user(reseller=True)
+        cls.os_reselleradmin = clients.Manager(cls.data.test_credentials)
+
+    @classmethod
     def resource_setup(cls):
         super(AccountQuotasNegativeTest, cls).resource_setup()
         cls.container_name = data_utils.rand_name(name="TestContainer")
         cls.container_client.create_container(cls.container_name)
 
-        cls.data.setup_test_user(reseller=True)
-
-        cls.os_reselleradmin = clients.Manager(cls.data.test_credentials)
-
         # Retrieve a ResellerAdmin auth data and use it to set a quota
         # on the client's account
         cls.reselleradmin_auth_data = \
@@ -85,12 +87,12 @@
         """
 
         # Not able to remove quota
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.account_client.create_account_metadata,
                           {"Quota-Bytes": ""})
 
         # Not able to modify quota
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.account_client.create_account_metadata,
                           {"Quota-Bytes": "100"})
 
@@ -100,6 +102,6 @@
     def test_upload_large_object(self):
         object_name = data_utils.rand_name(name="TestObject")
         data = data_utils.arbitrary_string(30)
-        self.assertRaises(exceptions.OverLimit,
+        self.assertRaises(lib_exc.OverLimit,
                           self.object_client.create_object,
                           self.container_name, object_name, data)
diff --git a/tempest/api/object_storage/test_account_services_negative.py b/tempest/api/object_storage/test_account_services_negative.py
index ef04387..9acf668 100644
--- a/tempest/api/object_storage/test_account_services_negative.py
+++ b/tempest/api/object_storage/test_account_services_negative.py
@@ -14,9 +14,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.object_storage import base
 from tempest import clients
-from tempest import exceptions
 from tempest import test
 
 
@@ -44,6 +45,6 @@
 
         params = {'format': 'json'}
         # list containers with non-authorized user token
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.account_client.list_account_containers,
                           params=params)
diff --git a/tempest/api/object_storage/test_container_acl.py b/tempest/api/object_storage/test_container_acl.py
index 205bc91..44763a1 100644
--- a/tempest/api/object_storage/test_container_acl.py
+++ b/tempest/api/object_storage/test_container_acl.py
@@ -20,12 +20,17 @@
 
 
 class ObjectTestACLs(base.BaseObjectTest):
+
+    @classmethod
+    def setup_credentials(cls):
+        super(ObjectTestACLs, cls).setup_credentials()
+        cls.data.setup_test_user()
+        cls.test_os = clients.Manager(cls.data.test_credentials)
+
     @classmethod
     def resource_setup(cls):
         super(ObjectTestACLs, cls).resource_setup()
-        cls.data.setup_test_user()
-        test_os = clients.Manager(cls.data.test_credentials)
-        cls.test_auth_data = test_os.auth_provider.auth_data
+        cls.test_auth_data = cls.test_os.auth_provider.auth_data
 
     def setUp(self):
         super(ObjectTestACLs, self).setUp()
diff --git a/tempest/api/object_storage/test_container_acl_negative.py b/tempest/api/object_storage/test_container_acl_negative.py
index 138d25a..edc052e 100644
--- a/tempest/api/object_storage/test_container_acl_negative.py
+++ b/tempest/api/object_storage/test_container_acl_negative.py
@@ -14,20 +14,26 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.object_storage import base
 from tempest import clients
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class ObjectACLsNegativeTest(base.BaseObjectTest):
+
+    @classmethod
+    def setup_credentials(cls):
+        super(ObjectACLsNegativeTest, cls).setup_credentials()
+        cls.data.setup_test_user()
+        cls.test_os = clients.Manager(cls.data.test_credentials)
+
     @classmethod
     def resource_setup(cls):
         super(ObjectACLsNegativeTest, cls).resource_setup()
-        cls.data.setup_test_user()
-        test_os = clients.Manager(cls.data.test_credentials)
-        cls.test_auth_data = test_os.auth_provider.auth_data
+        cls.test_auth_data = cls.test_os.auth_provider.auth_data
 
     def setUp(self):
         super(ObjectACLsNegativeTest, self).setUp()
@@ -47,7 +53,7 @@
             request_part='headers',
             auth_data=None
         )
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.object_client.create_object,
                           self.container_name, object_name, 'data', headers={})
 
@@ -63,7 +69,7 @@
             request_part='headers',
             auth_data=None
         )
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.object_client.delete_object,
                           self.container_name, object_name)
 
@@ -77,7 +83,7 @@
             request_part='headers',
             auth_data=self.test_auth_data
         )
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.object_client.create_object,
                           self.container_name, object_name, 'data', headers={})
 
@@ -94,7 +100,7 @@
             request_part='headers',
             auth_data=self.test_auth_data
         )
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.object_client.get_object,
                           self.container_name, object_name)
 
@@ -111,7 +117,7 @@
             request_part='headers',
             auth_data=self.test_auth_data
         )
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.object_client.delete_object,
                           self.container_name, object_name)
 
@@ -134,7 +140,7 @@
             request_part='headers',
             auth_data=self.test_auth_data
         )
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.object_client.get_object,
                           self.container_name, object_name)
 
@@ -153,7 +159,7 @@
             auth_data=self.test_auth_data
         )
         object_name = data_utils.rand_name(name='Object')
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.object_client.create_object,
                           self.container_name,
                           object_name, 'data', headers={})
@@ -175,7 +181,7 @@
             auth_data=self.test_auth_data
         )
         object_name = data_utils.rand_name(name='Object')
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.object_client.create_object,
                           self.container_name,
                           object_name, 'data', headers={})
@@ -201,7 +207,7 @@
             request_part='headers',
             auth_data=self.test_auth_data
         )
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.object_client.delete_object,
                           self.container_name,
                           object_name)
diff --git a/tempest/api/object_storage/test_container_quotas.py b/tempest/api/object_storage/test_container_quotas.py
index 46944ed..12ec6d2 100644
--- a/tempest/api/object_storage/test_container_quotas.py
+++ b/tempest/api/object_storage/test_container_quotas.py
@@ -13,10 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.object_storage import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -75,7 +76,7 @@
 
         nbefore = self._get_bytes_used()
 
-        self.assertRaises(exceptions.OverLimit,
+        self.assertRaises(lib_exc.OverLimit,
                           self.object_client.create_object,
                           self.container_name, object_name, data)
 
@@ -93,7 +94,7 @@
         nbefore = self._get_object_count()
         self.assertEqual(nbefore, QUOTA_COUNT)
 
-        self.assertRaises(exceptions.OverLimit,
+        self.assertRaises(lib_exc.OverLimit,
                           self.object_client.create_object,
                           self.container_name, "OverQuotaObject", "")
 
diff --git a/tempest/api/object_storage/test_container_staticweb.py b/tempest/api/object_storage/test_container_staticweb.py
index a8e5f9a..8a61911 100644
--- a/tempest/api/object_storage/test_container_staticweb.py
+++ b/tempest/api/object_storage/test_container_staticweb.py
@@ -14,10 +14,11 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.object_storage import base
 from tempest.common import custom_matchers
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -161,5 +162,5 @@
 
         # Request non-existing object
         self.assertRaises(
-            exceptions.NotFound, self.object_client.get_object,
+            lib_exc.NotFound, self.object_client.get_object,
             self.container_name, "notexisting")
diff --git a/tempest/api/object_storage/test_healthcheck.py b/tempest/api/object_storage/test_healthcheck.py
index 53c0347..6fbd77b 100644
--- a/tempest/api/object_storage/test_healthcheck.py
+++ b/tempest/api/object_storage/test_healthcheck.py
@@ -22,10 +22,6 @@
 
 class HealthcheckTest(base.BaseObjectTest):
 
-    @classmethod
-    def resource_setup(cls):
-        super(HealthcheckTest, cls).resource_setup()
-
     def setUp(self):
         super(HealthcheckTest, self).setUp()
         # Turning http://.../v1/foobar into http://.../
diff --git a/tempest/api/object_storage/test_object_expiry.py b/tempest/api/object_storage/test_object_expiry.py
index 5fa209d..be5d50e 100644
--- a/tempest/api/object_storage/test_object_expiry.py
+++ b/tempest/api/object_storage/test_object_expiry.py
@@ -13,11 +13,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
 import time
 
 from tempest.api.object_storage import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -66,7 +66,7 @@
         time.sleep(sleepy_time + 3)
 
         # object should not be there anymore
-        self.assertRaises(exceptions.NotFound, self.object_client.get_object,
+        self.assertRaises(lib_exc.NotFound, self.object_client.get_object,
                           self.container_name, self.object_name)
 
     @test.attr(type='gate')
diff --git a/tempest/api/object_storage/test_object_formpost_negative.py b/tempest/api/object_storage/test_object_formpost_negative.py
index 32f5917..cdd9d2c 100644
--- a/tempest/api/object_storage/test_object_formpost_negative.py
+++ b/tempest/api/object_storage/test_object_formpost_negative.py
@@ -18,9 +18,10 @@
 import time
 import urlparse
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.object_storage import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -117,7 +118,7 @@
 
         url = "%s/%s" % (self.container_name, self.object_name)
         exc = self.assertRaises(
-            exceptions.Unauthorized,
+            lib_exc.Unauthorized,
             self.object_client.post,
             url, body, headers=headers)
         self.assertIn('FormPost: Form Expired', str(exc))
@@ -133,7 +134,7 @@
 
         url = "%s/%s" % (self.container_name, self.object_name)
         exc = self.assertRaises(
-            exceptions.Unauthorized,
+            lib_exc.Unauthorized,
             self.object_client.post,
             url, body, headers=headers)
         self.assertIn('FormPost: Invalid Signature', str(exc))
diff --git a/tempest/api/object_storage/test_object_slo.py b/tempest/api/object_storage/test_object_slo.py
index 6622349..7b85201 100644
--- a/tempest/api/object_storage/test_object_slo.py
+++ b/tempest/api/object_storage/test_object_slo.py
@@ -15,10 +15,11 @@
 import hashlib
 import json
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.object_storage import base
 from tempest.common import custom_matchers
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 # Each segment, except for the final one, must be at least 1 megabyte
@@ -39,7 +40,7 @@
                 self.object_client.delete_object(
                     self.container_name,
                     obj)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
         self.container_client.delete_container(self.container_name)
         super(ObjectSloTest, self).tearDown()
diff --git a/tempest/api/object_storage/test_object_temp_url_negative.py b/tempest/api/object_storage/test_object_temp_url_negative.py
index b752348..ca34293 100644
--- a/tempest/api/object_storage/test_object_temp_url_negative.py
+++ b/tempest/api/object_storage/test_object_temp_url_negative.py
@@ -19,9 +19,10 @@
 import time
 import urlparse
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.object_storage import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -104,5 +105,5 @@
         # temp URL is valid for 1 seconds, let's wait 2
         time.sleep(2)
 
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.object_client.get, url)
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index 97777db..b8b0562 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -12,12 +12,12 @@
 
 import os.path
 
+from tempest_lib import exceptions as lib_exc
 import yaml
 
 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
 
@@ -30,14 +30,19 @@
     """Base test case class for all Orchestration API tests."""
 
     @classmethod
-    def resource_setup(cls):
-        super(BaseOrchestrationTest, cls).resource_setup()
-        cls.os = clients.Manager()
+    def skip_checks(cls):
+        super(BaseOrchestrationTest, cls).skip_checks()
         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
 
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseOrchestrationTest, cls).setup_credentials()
+        cls.os = clients.Manager()
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseOrchestrationTest, cls).setup_clients()
         cls.orchestration_client = cls.os.orchestration_client
         cls.client = cls.orchestration_client
         cls.servers_client = cls.os.servers_client
@@ -45,6 +50,12 @@
         cls.network_client = cls.os.network_client
         cls.volumes_client = cls.os.volumes_client
         cls.images_v2_client = cls.os.image_client_v2
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaseOrchestrationTest, cls).resource_setup()
+        cls.build_timeout = CONF.orchestration.build_timeout
+        cls.build_interval = CONF.orchestration.build_interval
         cls.stacks = []
         cls.keypairs = []
         cls.images = []
@@ -59,7 +70,7 @@
     @classmethod
     def _get_identity_admin_client(cls):
         """Returns an instance of the Identity Admin API client."""
-        manager = clients.AdminManager(interface=cls._interface)
+        manager = clients.AdminManager()
         admin_client = manager.identity_client
         return admin_client
 
@@ -84,14 +95,14 @@
         for stack_identifier in cls.stacks:
             try:
                 cls.client.delete_stack(stack_identifier)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
 
         for stack_identifier in cls.stacks:
             try:
                 cls.client.wait_for_stack_status(
                     stack_identifier, 'DELETE_COMPLETE')
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
 
     @classmethod
@@ -125,7 +136,7 @@
         for image_id in cls.images:
             try:
                 cls.images_v2_client.delete_image(image_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
 
     @classmethod
diff --git a/tempest/api/orchestration/stacks/test_limits.py b/tempest/api/orchestration/stacks/test_limits.py
index 8ee62ab..5f7f954 100644
--- a/tempest/api/orchestration/stacks/test_limits.py
+++ b/tempest/api/orchestration/stacks/test_limits.py
@@ -11,11 +11,11 @@
 #    under the License.
 
 import logging
+from tempest_lib import exceptions as lib_exc
 
 from tempest.api.orchestration import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -34,7 +34,7 @@
 Description: '%s'
 Outputs:
   Foo: bar''' % fill
-        ex = self.assertRaises(exceptions.BadRequest, self.create_stack,
+        ex = self.assertRaises(lib_exc.BadRequest, self.create_stack,
                                stack_name, template)
         self.assertIn('Template exceeds maximum allowed size', str(ex))
 
@@ -48,6 +48,6 @@
         for i in range(num_resources):
             template += rsrc_snippet % i
 
-        ex = self.assertRaises(exceptions.BadRequest, self.create_stack,
+        ex = self.assertRaises(lib_exc.BadRequest, self.create_stack,
                                stack_name, template)
         self.assertIn('Maximum resources per stack exceeded', str(ex))
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index ea6d4be..3987ee3 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -30,15 +30,27 @@
 class NeutronResourcesTestJSON(base.BaseOrchestrationTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(NeutronResourcesTestJSON, cls).resource_setup()
+    def skip_checks(cls):
+        super(NeutronResourcesTestJSON, cls).skip_checks()
         if not CONF.orchestration.image_ref:
             raise cls.skipException("No image available to test")
-        os = clients.Manager()
         if not CONF.service_available.neutron:
             raise cls.skipException("Neutron support is required")
+
+    @classmethod
+    def setup_credentials(cls):
+        super(NeutronResourcesTestJSON, cls).setup_credentials()
+        cls.os = clients.Manager()
+
+    @classmethod
+    def setup_clients(cls):
+        super(NeutronResourcesTestJSON, cls).setup_clients()
+        cls.network_client = cls.os.network_client
+
+    @classmethod
+    def resource_setup(cls):
+        super(NeutronResourcesTestJSON, cls).resource_setup()
         cls.neutron_basic_template = cls.load_template('neutron_basic')
-        cls.network_client = os.network_client
         cls.stack_name = data_utils.rand_name('heat')
         template = cls.read_template('neutron_basic')
         cls.keypair_name = (CONF.orchestration.keypair_name or
@@ -173,7 +185,7 @@
     def test_created_server(self):
         """Verifies created sever."""
         server_id = self.test_resources.get('Server')['physical_resource_id']
-        _, server = self.servers_client.get_server(server_id)
+        server = self.servers_client.get_server(server_id)
         self.assertEqual(self.keypair_name, server['key_name'])
         self.assertEqual('ACTIVE', server['status'])
         network = server['addresses'][self.neutron_basic_template['resources'][
diff --git a/tempest/api/orchestration/stacks/test_soft_conf.py b/tempest/api/orchestration/stacks/test_soft_conf.py
index 8903d4c..220054e 100644
--- a/tempest/api/orchestration/stacks/test_soft_conf.py
+++ b/tempest/api/orchestration/stacks/test_soft_conf.py
@@ -10,10 +10,11 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.orchestration import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest.openstack.common import log as logging
 from tempest import test
 
@@ -70,14 +71,14 @@
         self.client.delete_software_deploy(deploy_id)
         # Testing that it is really gone
         self.assertRaises(
-            exceptions.NotFound, self.client.get_software_deploy,
+            lib_exc.NotFound, self.client.get_software_deploy,
             self.deployment_id)
 
     def _config_delete(self, config_id):
         self.client.delete_software_config(config_id)
         # Testing that it is really gone
         self.assertRaises(
-            exceptions.NotFound, self.client.get_software_config, config_id)
+            lib_exc.NotFound, self.client.get_software_config, config_id)
 
     @test.attr(type='smoke')
     def test_get_software_config(self):
diff --git a/tempest/api/orchestration/stacks/test_swift_resources.py b/tempest/api/orchestration/stacks/test_swift_resources.py
index 0288fd4..83abc91 100644
--- a/tempest/api/orchestration/stacks/test_swift_resources.py
+++ b/tempest/api/orchestration/stacks/test_swift_resources.py
@@ -26,15 +26,27 @@
 
 class SwiftResourcesTestJSON(base.BaseOrchestrationTest):
     @classmethod
+    def skip_checks(cls):
+        super(SwiftResourcesTestJSON, cls).skip_checks()
+        if not CONF.service_available.swift:
+            raise cls.skipException("Swift support is required")
+
+    @classmethod
+    def setup_credentials(cls):
+        super(SwiftResourcesTestJSON, cls).setup_credentials()
+        cls.os = clients.Manager()
+
+    @classmethod
+    def setup_clients(cls):
+        super(SwiftResourcesTestJSON, cls).setup_clients()
+        cls.account_client = cls.os.account_client
+        cls.container_client = cls.os.container_client
+
+    @classmethod
     def resource_setup(cls):
         super(SwiftResourcesTestJSON, cls).resource_setup()
         cls.stack_name = data_utils.rand_name('heat')
         template = cls.read_template('swift_basic')
-        os = clients.Manager()
-        if not CONF.service_available.swift:
-            raise cls.skipException("Swift support is required")
-        cls.account_client = os.account_client
-        cls.container_client = os.container_client
         # create the stack
         cls.stack_identifier = cls.create_stack(
             cls.stack_name,
diff --git a/tempest/api/orchestration/stacks/test_templates_negative.py b/tempest/api/orchestration/stacks/test_templates_negative.py
index 9082107..9a5bc68 100644
--- a/tempest/api/orchestration/stacks/test_templates_negative.py
+++ b/tempest/api/orchestration/stacks/test_templates_negative.py
@@ -12,8 +12,9 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.orchestration import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -37,7 +38,7 @@
     @test.attr(type=['gate', 'negative'])
     def test_validate_template_url(self):
         """Validating template passing url to it."""
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.validate_template_url,
                           template_url=self.invalid_template_url,
                           parameters=self.parameters)
diff --git a/tempest/api/orchestration/stacks/test_volumes.py b/tempest/api/orchestration/stacks/test_volumes.py
index 6fddb21..8356497 100644
--- a/tempest/api/orchestration/stacks/test_volumes.py
+++ b/tempest/api/orchestration/stacks/test_volumes.py
@@ -12,10 +12,11 @@
 
 import logging
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.orchestration import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 
@@ -26,8 +27,8 @@
 class CinderResourcesTest(base.BaseOrchestrationTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(CinderResourcesTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(CinderResourcesTest, cls).skip_checks()
         if not CONF.service_available.cinder:
             raise cls.skipException('Cinder support is required')
 
@@ -73,7 +74,7 @@
         # Delete the stack and ensure the volume is gone
         self.client.delete_stack(stack_identifier)
         self.client.wait_for_stack_status(stack_identifier, 'DELETE_COMPLETE')
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.volumes_client.get_volume,
                           volume_id)
 
diff --git a/tempest/api/telemetry/base.py b/tempest/api/telemetry/base.py
index 8885187..c521b37 100644
--- a/tempest/api/telemetry/base.py
+++ b/tempest/api/telemetry/base.py
@@ -12,6 +12,8 @@
 
 import time
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest import exceptions
@@ -26,18 +28,29 @@
     """Base test case class for all Telemetry API tests."""
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(BaseTelemetryTest, cls).skip_checks()
         if not CONF.service_available.ceilometer:
             raise cls.skipException("Ceilometer support is required")
-        cls.set_network_resources()
-        super(BaseTelemetryTest, cls).resource_setup()
-        os = cls.get_client_manager()
-        cls.telemetry_client = os.telemetry_client
-        cls.servers_client = os.servers_client
-        cls.flavors_client = os.flavors_client
-        cls.image_client = os.image_client
-        cls.image_client_v2 = os.image_client_v2
 
+    @classmethod
+    def setup_credentials(cls):
+        cls.set_network_resources()
+        super(BaseTelemetryTest, cls).setup_credentials()
+        cls.os = cls.get_client_manager()
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseTelemetryTest, cls).setup_clients()
+        cls.telemetry_client = cls.os.telemetry_client
+        cls.servers_client = cls.os.servers_client
+        cls.flavors_client = cls.os.flavors_client
+        cls.image_client = cls.os.image_client
+        cls.image_client_v2 = cls.os.image_client_v2
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaseTelemetryTest, cls).resource_setup()
         cls.nova_notifications = ['memory', 'vcpus', 'disk.root.size',
                                   'disk.ephemeral.size']
 
@@ -60,12 +73,12 @@
 
     @classmethod
     def create_server(cls):
-        resp, body = cls.servers_client.create_server(
+        body = cls.servers_client.create_server(
             data_utils.rand_name('ceilometer-instance'),
             CONF.compute.image_ref, CONF.compute.flavor_ref,
             wait_until='ACTIVE')
         cls.server_ids.append(body['id'])
-        return resp, body
+        return body
 
     @classmethod
     def create_image(cls, client):
@@ -80,7 +93,7 @@
         for resource_id in list_of_ids:
             try:
                 method(resource_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
 
     @classmethod
diff --git a/tempest/api/telemetry/test_telemetry_alarming_api.py b/tempest/api/telemetry/test_telemetry_alarming_api.py
index 97eb4eb..cb2d2bd 100644
--- a/tempest/api/telemetry/test_telemetry_alarming_api.py
+++ b/tempest/api/telemetry/test_telemetry_alarming_api.py
@@ -10,14 +10,14 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.telemetry import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class TelemetryAlarmingAPITestJSON(base.BaseTelemetryTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -70,7 +70,7 @@
         self.assertDictContainsSubset(new_rule, body['threshold_rule'])
         # Delete alarm and verify if deleted
         self.telemetry_client.delete_alarm(alarm_id)
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.telemetry_client.get_alarm, alarm_id)
 
     @test.attr(type="gate")
@@ -80,12 +80,12 @@
         # Set alarm state and verify
         new_state =\
             [elem for elem in alarm_states if elem != alarm['state']][0]
-        _, state = self.telemetry_client.alarm_set_state(alarm['alarm_id'],
-                                                         new_state)
-        self.assertEqual(new_state, state)
+        state = self.telemetry_client.alarm_set_state(alarm['alarm_id'],
+                                                      new_state)
+        self.assertEqual(new_state, state.data)
         # Get alarm state and verify
-        _, state = self.telemetry_client.alarm_get_state(alarm['alarm_id'])
-        self.assertEqual(new_state, state)
+        state = self.telemetry_client.alarm_get_state(alarm['alarm_id'])
+        self.assertEqual(new_state, state.data)
 
     @test.attr(type="gate")
     def test_create_delete_alarm_with_combination_rule(self):
@@ -101,5 +101,5 @@
         self.assertDictContainsSubset(rule, body['combination_rule'])
         # Verify alarm delete
         self.telemetry_client.delete_alarm(alarm_id)
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.telemetry_client.get_alarm, alarm_id)
diff --git a/tempest/api/telemetry/test_telemetry_notification_api.py b/tempest/api/telemetry/test_telemetry_notification_api.py
index 7e5d6ee..a0256af 100644
--- a/tempest/api/telemetry/test_telemetry_notification_api.py
+++ b/tempest/api/telemetry/test_telemetry_notification_api.py
@@ -21,22 +21,20 @@
 
 
 class TelemetryNotificationAPITestJSON(base.BaseTelemetryTest):
-    _interface = 'json'
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
+        super(TelemetryNotificationAPITestJSON, cls).skip_checks()
         if CONF.telemetry.too_slow_to_test:
             raise cls.skipException("Ceilometer feature for fast work mysql "
                                     "is disabled")
-        super(TelemetryNotificationAPITestJSON, cls).resource_setup()
 
     @test.attr(type="gate")
     @testtools.skipIf(not CONF.service_available.nova,
                       "Nova is not available.")
     def test_check_nova_notification(self):
 
-        resp, body = self.create_server()
-        self.assertEqual(resp.status, 202)
+        body = self.create_server()
 
         query = ('resource', 'eq', body['id'])
 
diff --git a/tempest/api/volume/admin/test_multi_backend.py b/tempest/api/volume/admin/test_multi_backend.py
index 65c4bd3..32cdb01 100644
--- a/tempest/api/volume/admin/test_multi_backend.py
+++ b/tempest/api/volume/admin/test_multi_backend.py
@@ -22,13 +22,17 @@
 
 
 class VolumeMultiBackendV2Test(base.BaseVolumeAdminTest):
-    _interface = "json"
+
+    @classmethod
+    def skip_checks(cls):
+        super(VolumeMultiBackendV2Test, cls).skip_checks()
+
+        if not CONF.volume_feature_enabled.multi_backend:
+            raise cls.skipException("Cinder multi-backend feature disabled")
 
     @classmethod
     def resource_setup(cls):
         super(VolumeMultiBackendV2Test, cls).resource_setup()
-        if not CONF.volume_feature_enabled.multi_backend:
-            raise cls.skipException("Cinder multi-backend feature disabled")
 
         cls.backend1_name = CONF.volume.backend1_name
         cls.backend2_name = CONF.volume.backend2_name
diff --git a/tempest/api/volume/admin/test_snapshots_actions.py b/tempest/api/volume/admin/test_snapshots_actions.py
index 6c64298..a4b4e3e 100644
--- a/tempest/api/volume/admin/test_snapshots_actions.py
+++ b/tempest/api/volume/admin/test_snapshots_actions.py
@@ -19,12 +19,15 @@
 
 
 class SnapshotsActionsV2Test(base.BaseVolumeAdminTest):
-    _interface = "json"
+
+    @classmethod
+    def setup_clients(cls):
+        super(SnapshotsActionsV2Test, cls).setup_clients()
+        cls.client = cls.snapshots_client
 
     @classmethod
     def resource_setup(cls):
         super(SnapshotsActionsV2Test, cls).resource_setup()
-        cls.client = cls.snapshots_client
 
         # Create a test shared volume for tests
         vol_name = data_utils.rand_name(cls.__name__ + '-Volume-')
diff --git a/tempest/api/volume/admin/test_volume_hosts.py b/tempest/api/volume/admin/test_volume_hosts.py
index a214edf..8189aab 100644
--- a/tempest/api/volume/admin/test_volume_hosts.py
+++ b/tempest/api/volume/admin/test_volume_hosts.py
@@ -18,7 +18,6 @@
 
 
 class VolumeHostsAdminV2TestsJSON(base.BaseVolumeAdminTest):
-    _interface = "json"
 
     @test.attr(type='gate')
     def test_list_hosts(self):
diff --git a/tempest/api/volume/admin/test_volume_quotas.py b/tempest/api/volume/admin/test_volume_quotas.py
index 52f2d90..f41a97e 100644
--- a/tempest/api/volume/admin/test_volume_quotas.py
+++ b/tempest/api/volume/admin/test_volume_quotas.py
@@ -23,12 +23,11 @@
 
 
 class BaseVolumeQuotasAdminV2TestJSON(base.BaseVolumeAdminTest):
-    _interface = "json"
     force_tenant_isolation = True
 
     @classmethod
-    def resource_setup(cls):
-        super(BaseVolumeQuotasAdminV2TestJSON, cls).resource_setup()
+    def setup_credentials(cls):
+        super(BaseVolumeQuotasAdminV2TestJSON, cls).setup_credentials()
         cls.demo_tenant_id = cls.isolated_creds.get_primary_creds().tenant_id
 
     @test.attr(type='gate')
diff --git a/tempest/api/volume/admin/test_volume_quotas_negative.py b/tempest/api/volume/admin/test_volume_quotas_negative.py
index 5cf6af0..e37d8f2 100644
--- a/tempest/api/volume/admin/test_volume_quotas_negative.py
+++ b/tempest/api/volume/admin/test_volume_quotas_negative.py
@@ -13,20 +13,24 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.volume import base
-from tempest import exceptions
 from tempest import test
 
 
 class BaseVolumeQuotasNegativeV2TestJSON(base.BaseVolumeAdminTest):
-    _interface = "json"
     force_tenant_isolation = True
 
     @classmethod
+    def setup_credentials(cls):
+        super(BaseVolumeQuotasNegativeV2TestJSON, cls).setup_credentials()
+        cls.demo_user = cls.isolated_creds.get_primary_creds()
+        cls.demo_tenant_id = cls.demo_user.tenant_id
+
+    @classmethod
     def resource_setup(cls):
         super(BaseVolumeQuotasNegativeV2TestJSON, cls).resource_setup()
-        demo_user = cls.isolated_creds.get_primary_creds()
-        cls.demo_tenant_id = demo_user.tenant_id
         cls.shared_quota_set = {'gigabytes': 3, 'volumes': 1, 'snapshots': 1}
 
         # NOTE(gfidente): no need to restore original quota set
@@ -42,13 +46,13 @@
 
     @test.attr(type='negative')
     def test_quota_volumes(self):
-        self.assertRaises(exceptions.OverLimit,
+        self.assertRaises(lib_exc.OverLimit,
                           self.volumes_client.create_volume,
                           size=1)
 
     @test.attr(type='negative')
     def test_quota_volume_snapshots(self):
-        self.assertRaises(exceptions.OverLimit,
+        self.assertRaises(lib_exc.OverLimit,
                           self.snapshots_client.create_snapshot,
                           self.volume['id'])
 
@@ -65,7 +69,7 @@
         self.quotas_client.update_quota_set(
             self.demo_tenant_id,
             **new_quota_set)
-        self.assertRaises(exceptions.OverLimit,
+        self.assertRaises(lib_exc.OverLimit,
                           self.volumes_client.create_volume,
                           size=1)
 
@@ -73,7 +77,7 @@
         self.quotas_client.update_quota_set(
             self.demo_tenant_id,
             **self.shared_quota_set)
-        self.assertRaises(exceptions.OverLimit,
+        self.assertRaises(lib_exc.OverLimit,
                           self.snapshots_client.create_snapshot,
                           self.volume['id'])
 
diff --git a/tempest/api/volume/admin/test_volume_services.py b/tempest/api/volume/admin/test_volume_services.py
index 46db70f..3bab185 100644
--- a/tempest/api/volume/admin/test_volume_services.py
+++ b/tempest/api/volume/admin/test_volume_services.py
@@ -22,7 +22,6 @@
     Tests Volume Services API.
     volume service list requires admin privileges.
     """
-    _interface = "json"
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/volume/admin/test_volume_types.py b/tempest/api/volume/admin/test_volume_types.py
index 58f1551..d4062cc 100644
--- a/tempest/api/volume/admin/test_volume_types.py
+++ b/tempest/api/volume/admin/test_volume_types.py
@@ -22,7 +22,6 @@
 
 
 class VolumeTypesV2Test(base.BaseVolumeAdminTest):
-    _interface = "json"
 
     def _delete_volume(self, volume_id):
         self.volumes_client.delete_volume(volume_id)
@@ -38,45 +37,54 @@
         self.assertIsInstance(body, list)
 
     @test.attr(type='smoke')
-    def test_create_get_delete_volume_with_volume_type_and_extra_specs(self):
-        # Create/get/delete volume with volume_type and extra spec.
-        volume = {}
+    def test_volume_crud_with_volume_type_and_extra_specs(self):
+        # Create/update/get/delete volume with volume_type and extra spec.
+        volume_types = list()
         vol_name = data_utils.rand_name("volume-")
-        vol_type_name = data_utils.rand_name("volume-type-")
         self.name_field = self.special_fields['name_field']
         proto = CONF.volume.storage_protocol
         vendor = CONF.volume.vendor_name
         extra_specs = {"storage_protocol": proto,
                        "vendor_name": vendor}
-        body = {}
-        body = self.volume_types_client.create_volume_type(
-            vol_type_name,
-            extra_specs=extra_specs)
-        self.assertIn('id', body)
-        self.addCleanup(self._delete_volume_type, body['id'])
-        self.assertIn('name', body)
-        params = {self.name_field: vol_name, 'volume_type': vol_type_name}
-        volume = self.volumes_client.create_volume(
-            size=1, **params)
-        self.assertIn('id', volume)
+        # Create two volume_types
+        for i in range(2):
+            vol_type_name = data_utils.rand_name("volume-type-")
+            vol_type = self.volume_types_client.create_volume_type(
+                vol_type_name,
+                extra_specs=extra_specs)
+            volume_types.append(vol_type)
+            self.addCleanup(self._delete_volume_type, vol_type['id'])
+        params = {self.name_field: vol_name,
+                  'volume_type': volume_types[0]['id']}
+
+        # Create volume
+        volume = self.volumes_client.create_volume(size=1, **params)
         self.addCleanup(self._delete_volume, volume['id'])
-        self.assertIn(self.name_field, volume)
+        self.assertEqual(volume_types[0]['name'], volume["volume_type"])
         self.assertEqual(volume[self.name_field], vol_name,
                          "The created volume name is not equal "
                          "to the requested name")
-        self.assertTrue(volume['id'] is not None,
-                        "Field volume id is empty or not found.")
+        self.assertIsNotNone(volume['id'],
+                             "Field volume id is empty or not found.")
         self.volumes_client.wait_for_volume_status(volume['id'], 'available')
+
+        # Update volume with new volume_type
+        self.volumes_client.retype_volume(volume['id'],
+                                          volume_type=volume_types[1]['id'])
+        self.volumes_client.wait_for_volume_status(volume['id'], 'available')
+
+        # Get volume details and Verify
         fetched_volume = self.volumes_client.get_volume(volume['id'])
+        self.assertEqual(volume_types[1]['name'],
+                         fetched_volume['volume_type'],
+                         'The fetched Volume type is different '
+                         'from updated volume type')
         self.assertEqual(vol_name, fetched_volume[self.name_field],
                          'The fetched Volume is different '
                          'from the created Volume')
         self.assertEqual(volume['id'], fetched_volume['id'],
                          'The fetched Volume is different '
                          'from the created Volume')
-        self.assertEqual(vol_type_name, fetched_volume['volume_type'],
-                         'The fetched Volume is different '
-                         'from the created Volume')
 
     @test.attr(type='smoke')
     def test_volume_type_create_get_delete(self):
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs.py b/tempest/api/volume/admin/test_volume_types_extra_specs.py
index 460a6c3..1ce1402 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs.py
@@ -19,7 +19,6 @@
 
 
 class VolumeTypesExtraSpecsV2Test(base.BaseVolumeAdminTest):
-    _interface = "json"
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
index fff0199..23979cd 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
@@ -15,14 +15,14 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class ExtraSpecsNegativeV2Test(base.BaseVolumeAdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -43,7 +43,7 @@
         # Should not update volume type extra specs with no body
         extra_spec = {"spec1": "val2"}
         self.assertRaises(
-            exceptions.BadRequest,
+            lib_exc.BadRequest,
             self.volume_types_client.update_volume_type_extra_specs,
             self.volume_type['id'], extra_spec.keys()[0], None)
 
@@ -52,7 +52,7 @@
         # Should not update volume type extra specs with nonexistent id.
         extra_spec = {"spec1": "val2"}
         self.assertRaises(
-            exceptions.BadRequest,
+            lib_exc.BadRequest,
             self.volume_types_client.update_volume_type_extra_specs,
             self.volume_type['id'], str(uuid.uuid4()),
             extra_spec)
@@ -62,7 +62,7 @@
         # Should not update volume type extra specs with none id.
         extra_spec = {"spec1": "val2"}
         self.assertRaises(
-            exceptions.BadRequest,
+            lib_exc.BadRequest,
             self.volume_types_client.update_volume_type_extra_specs,
             self.volume_type['id'], None, extra_spec)
 
@@ -72,7 +72,7 @@
             # body.
         extra_spec = {"spec1": "val2", 'spec2': 'val1'}
         self.assertRaises(
-            exceptions.BadRequest,
+            lib_exc.BadRequest,
             self.volume_types_client.update_volume_type_extra_specs,
             self.volume_type['id'], extra_spec.keys()[0],
             extra_spec)
@@ -83,7 +83,7 @@
             # type id.
         extra_specs = {"spec2": "val1"}
         self.assertRaises(
-            exceptions.NotFound,
+            lib_exc.NotFound,
             self.volume_types_client.create_volume_type_extra_specs,
             str(uuid.uuid4()), extra_specs)
 
@@ -91,7 +91,7 @@
     def test_create_none_body(self):
         # Should not create volume type extra spec for none POST body.
         self.assertRaises(
-            exceptions.BadRequest,
+            lib_exc.BadRequest,
             self.volume_types_client.create_volume_type_extra_specs,
             self.volume_type['id'], None)
 
@@ -99,7 +99,7 @@
     def test_create_invalid_body(self):
         # Should not create volume type extra spec for invalid POST body.
         self.assertRaises(
-            exceptions.BadRequest,
+            lib_exc.BadRequest,
             self.volume_types_client.create_volume_type_extra_specs,
             self.volume_type['id'], ['invalid'])
 
@@ -109,7 +109,7 @@
             # type id.
         extra_specs = {"spec1": "val1"}
         self.assertRaises(
-            exceptions.NotFound,
+            lib_exc.NotFound,
             self.volume_types_client.delete_volume_type_extra_specs,
             str(uuid.uuid4()), extra_specs.keys()[0])
 
@@ -117,7 +117,7 @@
     def test_list_nonexistent_volume_type_id(self):
         # Should not list volume type extra spec for nonexistent type id.
         self.assertRaises(
-            exceptions.NotFound,
+            lib_exc.NotFound,
             self.volume_types_client.list_volume_types_extra_specs,
             str(uuid.uuid4()))
 
@@ -126,7 +126,7 @@
         # Should not get volume type extra spec for nonexistent type id.
         extra_specs = {"spec1": "val1"}
         self.assertRaises(
-            exceptions.NotFound,
+            lib_exc.NotFound,
             self.volume_types_client.get_volume_type_extra_specs,
             str(uuid.uuid4()), extra_specs.keys()[0])
 
@@ -135,7 +135,7 @@
         # Should not get volume type extra spec for nonexistent extra spec
             # id.
         self.assertRaises(
-            exceptions.NotFound,
+            lib_exc.NotFound,
             self.volume_types_client.get_volume_type_extra_specs,
             self.volume_type['id'], str(uuid.uuid4()))
 
diff --git a/tempest/api/volume/admin/test_volume_types_negative.py b/tempest/api/volume/admin/test_volume_types_negative.py
index 4144270..a40f1c4 100644
--- a/tempest/api/volume/admin/test_volume_types_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_negative.py
@@ -15,13 +15,13 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.volume import base
-from tempest import exceptions
 from tempest import test
 
 
 class VolumeTypesNegativeV2Test(base.BaseVolumeAdminTest):
-    _interface = 'json'
 
     @test.attr(type='gate')
     def test_create_with_nonexistent_volume_type(self):
@@ -29,27 +29,27 @@
         self.name_field = self.special_fields['name_field']
         params = {self.name_field: str(uuid.uuid4()),
                   'volume_type': str(uuid.uuid4())}
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.volumes_client.create_volume, size=1,
                           **params)
 
     @test.attr(type='gate')
     def test_create_with_empty_name(self):
         # Should not be able to create volume type with an empty name.
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.volume_types_client.create_volume_type, '')
 
     @test.attr(type='gate')
     def test_get_nonexistent_type_id(self):
         # Should not be able to get volume type with nonexistent type id.
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.volume_types_client.get_volume_type,
                           str(uuid.uuid4()))
 
     @test.attr(type='gate')
     def test_delete_nonexistent_type_id(self):
         # Should not be able to delete volume type with nonexistent type id.
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.volume_types_client.delete_volume_type,
                           str(uuid.uuid4()))
 
diff --git a/tempest/api/volume/admin/test_volumes_actions.py b/tempest/api/volume/admin/test_volumes_actions.py
index 4feba73..fb16872 100644
--- a/tempest/api/volume/admin/test_volumes_actions.py
+++ b/tempest/api/volume/admin/test_volumes_actions.py
@@ -19,12 +19,15 @@
 
 
 class VolumesActionsV2Test(base.BaseVolumeAdminTest):
-    _interface = "json"
+
+    @classmethod
+    def setup_clients(cls):
+        super(VolumesActionsV2Test, cls).setup_clients()
+        cls.client = cls.volumes_client
 
     @classmethod
     def resource_setup(cls):
         super(VolumesActionsV2Test, cls).resource_setup()
-        cls.client = cls.volumes_client
 
         # Create a test shared volume for tests
         vol_name = utils.rand_name(cls.__name__ + '-Volume-')
diff --git a/tempest/api/volume/admin/test_volumes_backup.py b/tempest/api/volume/admin/test_volumes_backup.py
index 0739480..4db9f7e 100644
--- a/tempest/api/volume/admin/test_volumes_backup.py
+++ b/tempest/api/volume/admin/test_volumes_backup.py
@@ -24,15 +24,17 @@
 
 
 class VolumesBackupsV2Test(base.BaseVolumeAdminTest):
-    _interface = "json"
+
+    @classmethod
+    def skip_checks(cls):
+        super(VolumesBackupsV2Test, cls).skip_checks()
+        if not CONF.volume_feature_enabled.backup:
+            raise cls.skipException("Cinder backup feature disabled")
 
     @classmethod
     def resource_setup(cls):
         super(VolumesBackupsV2Test, cls).resource_setup()
 
-        if not CONF.volume_feature_enabled.backup:
-            raise cls.skipException("Cinder backup feature disabled")
-
         cls.volume = cls.create_volume()
 
     @test.attr(type='smoke')
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index 127a216..c672607 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -13,6 +13,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest import clients
 from tempest.common.utils import data_utils
 from tempest import config
@@ -29,31 +31,39 @@
     """Base test case class for all Cinder API tests."""
 
     _api_version = 2
-    _interface = 'json'
 
     @classmethod
-    def resource_setup(cls):
-        cls.set_network_resources()
-        super(BaseVolumeTest, cls).resource_setup()
+    def skip_checks(cls):
+        super(BaseVolumeTest, cls).skip_checks()
 
         if not CONF.service_available.cinder:
             skip_msg = ("%s skipped as Cinder is not available" % cls.__name__)
             raise cls.skipException(skip_msg)
-
-        cls.os = cls.get_client_manager()
-
-        cls.servers_client = cls.os.servers_client
-        cls.image_ref = CONF.compute.image_ref
-        cls.flavor_ref = CONF.compute.flavor_ref
-        cls.build_interval = CONF.volume.build_interval
-        cls.build_timeout = CONF.volume.build_timeout
-        cls.snapshots = []
-        cls.volumes = []
-
         if cls._api_version == 1:
             if not CONF.volume_feature_enabled.api_v1:
                 msg = "Volume API v1 is disabled"
                 raise cls.skipException(msg)
+        elif cls._api_version == 2:
+            if not CONF.volume_feature_enabled.api_v2:
+                msg = "Volume API v2 is disabled"
+                raise cls.skipException(msg)
+        else:
+            msg = ("Invalid Cinder API version (%s)" % cls._api_version)
+            raise exceptions.InvalidConfiguration(message=msg)
+
+    @classmethod
+    def setup_credentials(cls):
+        cls.set_network_resources()
+        super(BaseVolumeTest, cls).setup_credentials()
+        cls.os = cls.get_client_manager()
+
+    @classmethod
+    def setup_clients(cls):
+        super(BaseVolumeTest, cls).setup_clients()
+
+        cls.servers_client = cls.os.servers_client
+
+        if cls._api_version == 1:
             cls.snapshots_client = cls.os.snapshots_client
             cls.volumes_client = cls.os.volumes_client
             cls.backups_client = cls.os.backups_client
@@ -61,27 +71,33 @@
             cls.volumes_extension_client = cls.os.volumes_extension_client
             cls.availability_zone_client = (
                 cls.os.volume_availability_zone_client)
-            # Special fields and resp code for cinder v1
-            cls.special_fields = {'name_field': 'display_name',
-                                  'descrip_field': 'display_description'}
-
-        elif cls._api_version == 2:
-            if not CONF.volume_feature_enabled.api_v2:
-                msg = "Volume API v2 is disabled"
-                raise cls.skipException(msg)
+        else:
             cls.snapshots_client = cls.os.snapshots_v2_client
             cls.volumes_client = cls.os.volumes_v2_client
             cls.volumes_extension_client = cls.os.volumes_v2_extension_client
             cls.availability_zone_client = (
                 cls.os.volume_v2_availability_zone_client)
+
+    @classmethod
+    def resource_setup(cls):
+        super(BaseVolumeTest, cls).resource_setup()
+
+        cls.snapshots = []
+        cls.volumes = []
+        cls.image_ref = CONF.compute.image_ref
+        cls.flavor_ref = CONF.compute.flavor_ref
+        cls.build_interval = CONF.volume.build_interval
+        cls.build_timeout = CONF.volume.build_timeout
+
+        if cls._api_version == 1:
+            # Special fields and resp code for cinder v1
+            cls.special_fields = {'name_field': 'display_name',
+                                  'descrip_field': 'display_description'}
+        else:
             # Special fields and resp code for cinder v2
             cls.special_fields = {'name_field': 'name',
                                   'descrip_field': 'description'}
 
-        else:
-            msg = ("Invalid Cinder API version (%s)" % cls._api_version)
-            raise exceptions.InvalidConfiguration(message=msg)
-
     @classmethod
     def resource_cleanup(cls):
         cls.clear_snapshots()
@@ -147,24 +163,22 @@
 
 class BaseVolumeAdminTest(BaseVolumeTest):
     """Base test case class for all Volume Admin API tests."""
-    @classmethod
-    def resource_setup(cls):
-        super(BaseVolumeAdminTest, cls).resource_setup()
 
+    @classmethod
+    def setup_credentials(cls):
+        super(BaseVolumeAdminTest, cls).setup_credentials()
         try:
             cls.adm_creds = cls.isolated_creds.get_admin_creds()
-            cls.os_adm = clients.Manager(
-                credentials=cls.adm_creds, interface=cls._interface)
+            cls.os_adm = clients.Manager(credentials=cls.adm_creds)
         except NotImplementedError:
             msg = "Missing Volume Admin API credentials in configuration."
             raise cls.skipException(msg)
 
-        cls.qos_specs = []
+    @classmethod
+    def setup_clients(cls):
+        super(BaseVolumeAdminTest, cls).setup_clients()
 
         if cls._api_version == 1:
-            if not CONF.volume_feature_enabled.api_v1:
-                msg = "Volume API v1 is disabled"
-                raise cls.skipException(msg)
             cls.volume_qos_client = cls.os_adm.volume_qos_client
             cls.admin_volume_services_client = \
                 cls.os_adm.volume_services_client
@@ -175,9 +189,6 @@
             cls.backups_adm_client = cls.os_adm.backups_client
             cls.quotas_client = cls.os_adm.volume_quotas_client
         elif cls._api_version == 2:
-            if not CONF.volume_feature_enabled.api_v2:
-                msg = "Volume API v2 is disabled"
-                raise cls.skipException(msg)
             cls.volume_qos_client = cls.os_adm.volume_qos_v2_client
             cls.admin_volume_services_client = \
                 cls.os_adm.volume_services_v2_client
@@ -189,6 +200,12 @@
             cls.quotas_client = cls.os_adm.volume_quotas_v2_client
 
     @classmethod
+    def resource_setup(cls):
+        super(BaseVolumeAdminTest, cls).resource_setup()
+
+        cls.qos_specs = []
+
+    @classmethod
     def resource_cleanup(cls):
         cls.clear_qos_specs()
         super(BaseVolumeAdminTest, cls).resource_cleanup()
@@ -208,13 +225,13 @@
         for qos_id in cls.qos_specs:
             try:
                 cls.volume_qos_client.delete_qos(qos_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 # The qos_specs may have already been deleted which is OK.
                 pass
 
         for qos_id in cls.qos_specs:
             try:
                 cls.volume_qos_client.wait_for_resource_deletion(qos_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 # The qos_specs may have already been deleted which is OK.
                 pass
diff --git a/tempest/api/volume/test_availability_zone.py b/tempest/api/volume/test_availability_zone.py
index bd3d2a1..b6e226d 100644
--- a/tempest/api/volume/test_availability_zone.py
+++ b/tempest/api/volume/test_availability_zone.py
@@ -24,8 +24,8 @@
     """
 
     @classmethod
-    def resource_setup(cls):
-        super(AvailabilityZoneV2TestJSON, cls).resource_setup()
+    def setup_clients(cls):
+        super(AvailabilityZoneV2TestJSON, cls).setup_clients()
         cls.client = cls.availability_zone_client
 
     @test.attr(type='gate')
diff --git a/tempest/api/volume/test_snapshot_metadata.py b/tempest/api/volume/test_snapshot_metadata.py
index 03474ba..e1fe779 100644
--- a/tempest/api/volume/test_snapshot_metadata.py
+++ b/tempest/api/volume/test_snapshot_metadata.py
@@ -20,9 +20,13 @@
 class SnapshotV2MetadataTestJSON(base.BaseVolumeTest):
 
     @classmethod
+    def setup_clients(cls):
+        super(SnapshotV2MetadataTestJSON, cls).setup_clients()
+        cls.client = cls.snapshots_client
+
+    @classmethod
     def resource_setup(cls):
         super(SnapshotV2MetadataTestJSON, cls).resource_setup()
-        cls.client = cls.snapshots_client
         # Create a volume
         cls.volume = cls.create_volume()
         # Create a snapshot
diff --git a/tempest/api/volume/test_volume_transfers.py b/tempest/api/volume/test_volume_transfers.py
index b2961bd..6f75403 100644
--- a/tempest/api/volume/test_volume_transfers.py
+++ b/tempest/api/volume/test_volume_transfers.py
@@ -17,6 +17,7 @@
 
 from tempest.api.volume import base
 from tempest import clients
+from tempest.common import credentials
 from tempest import config
 from tempest import test
 
@@ -26,21 +27,25 @@
 class VolumesV2TransfersTest(base.BaseVolumeTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(VolumesV2TransfersTest, cls).resource_setup()
-
-        # Add another tenant to test volume-transfer
-        cls.os_alt = clients.Manager(cls.isolated_creds.get_alt_creds(),
-                                     interface=cls._interface)
-        # Add admin tenant to cleanup resources
-        try:
-            creds = cls.isolated_creds.get_admin_creds()
-            cls.os_adm = clients.Manager(
-                credentials=creds, interface=cls._interface)
-        except NotImplementedError:
+    def skip_checks(cls):
+        super(VolumesV2TransfersTest, cls).skip_checks()
+        if not credentials.is_admin_available():
             msg = "Missing Volume Admin API credentials in configuration."
             raise cls.skipException(msg)
 
+    @classmethod
+    def setup_credentials(cls):
+        super(VolumesV2TransfersTest, cls).setup_credentials()
+        # Add another tenant to test volume-transfer
+        cls.os_alt = clients.Manager(cls.isolated_creds.get_alt_creds())
+        # Add admin tenant to cleanup resources
+        creds = cls.isolated_creds.get_admin_creds()
+        cls.os_adm = clients.Manager(credentials=creds)
+
+    @classmethod
+    def setup_clients(cls):
+        super(VolumesV2TransfersTest, cls).setup_clients()
+
         cls.client = cls.volumes_client
         cls.alt_client = cls.os_alt.volumes_client
         cls.alt_tenant_id = cls.alt_client.tenant_id
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index ceabb1c..e5f7aa4 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -24,20 +24,25 @@
 class VolumesV2ActionsTest(base.BaseVolumeTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(VolumesV2ActionsTest, cls).resource_setup()
+    def setup_clients(cls):
+        super(VolumesV2ActionsTest, cls).setup_clients()
         cls.client = cls.volumes_client
         cls.image_client = cls.os.image_client
 
+    @classmethod
+    def resource_setup(cls):
+        super(VolumesV2ActionsTest, cls).resource_setup()
+
         # Create a test shared instance
         srv_name = data_utils.rand_name(cls.__name__ + '-Instance-')
-        resp, cls.server = cls.servers_client.create_server(srv_name,
-                                                            cls.image_ref,
-                                                            cls.flavor_ref)
+        cls.server = cls.servers_client.create_server(srv_name,
+                                                      cls.image_ref,
+                                                      cls.flavor_ref)
         cls.servers_client.wait_for_server_status(cls.server['id'], 'ACTIVE')
 
         # Create a test shared volume for attach/detach tests
         cls.volume = cls.create_volume()
+        cls.client.wait_for_volume_status(cls.volume['id'], 'available')
 
     def _delete_image_with_wait(self, image_id):
         self.image_client.delete_image(image_id)
diff --git a/tempest/api/volume/test_volumes_extend.py b/tempest/api/volume/test_volumes_extend.py
index ebe6084..fab25ec 100644
--- a/tempest/api/volume/test_volumes_extend.py
+++ b/tempest/api/volume/test_volumes_extend.py
@@ -23,8 +23,8 @@
 class VolumesV2ExtendTest(base.BaseVolumeTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(VolumesV2ExtendTest, cls).resource_setup()
+    def setup_clients(cls):
+        super(VolumesV2ExtendTest, cls).setup_clients()
         cls.client = cls.volumes_client
 
     @test.attr(type='gate')
diff --git a/tempest/api/volume/test_volumes_get.py b/tempest/api/volume/test_volumes_get.py
index 6d9c438..3133df4 100644
--- a/tempest/api/volume/test_volumes_get.py
+++ b/tempest/api/volume/test_volumes_get.py
@@ -26,9 +26,13 @@
 class VolumesV2GetTest(base.BaseVolumeTest):
 
     @classmethod
+    def setup_clients(cls):
+        super(VolumesV2GetTest, cls).setup_clients()
+        cls.client = cls.volumes_client
+
+    @classmethod
     def resource_setup(cls):
         super(VolumesV2GetTest, cls).resource_setup()
-        cls.client = cls.volumes_client
 
         cls.name_field = cls.special_fields['name_field']
         cls.descrip_field = cls.special_fields['descrip_field']
@@ -37,15 +41,6 @@
         self.client.delete_volume(volume_id)
         self.client.wait_for_resource_deletion(volume_id)
 
-    def _is_true(self, val):
-        # NOTE(jdg): Temporary conversion method to get cinder patch
-        # merged.  Then we'll make this strict again and
-        # specifically check "true" or "false"
-        if val in ['true', 'True', True]:
-            return True
-        else:
-            return False
-
     def _volume_create_get_update_delete(self, **kwargs):
         # Create a volume, Get it's details and Delete the volume
         volume = {}
@@ -79,13 +74,10 @@
                         'The fetched Volume metadata misses data '
                         'from the created Volume')
 
-        # NOTE(jdg): Revert back to strict true/false checking
-        # after fix for bug #1227837 merges
-        boot_flag = self._is_true(fetched_volume['bootable'])
         if 'imageRef' in kwargs:
-            self.assertEqual(boot_flag, True)
+            self.assertEqual('true', fetched_volume['bootable'])
         if 'imageRef' not in kwargs:
-            self.assertEqual(boot_flag, False)
+            self.assertEqual('false', fetched_volume['bootable'])
 
         # Update Volume
         # Test volume update when display_name is same with original value
@@ -125,13 +117,10 @@
                   self.descrip_field: volume[self.descrip_field]}
         self.client.update_volume(new_volume['id'], **params)
 
-        # NOTE(jdg): Revert back to strict true/false checking
-        # after fix for bug #1227837 merges
-        boot_flag = self._is_true(updated_volume['bootable'])
         if 'imageRef' in kwargs:
-            self.assertEqual(boot_flag, True)
+            self.assertEqual('true', updated_volume['bootable'])
         if 'imageRef' not in kwargs:
-            self.assertEqual(boot_flag, False)
+            self.assertEqual('false', updated_volume['bootable'])
 
     @test.attr(type='smoke')
     def test_volume_create_get_update_delete(self):
diff --git a/tempest/api/volume/test_volumes_list.py b/tempest/api/volume/test_volumes_list.py
index 91beae9..9a8746a 100644
--- a/tempest/api/volume/test_volumes_list.py
+++ b/tempest/api/volume/test_volumes_list.py
@@ -55,9 +55,13 @@
                              [str_vol(v) for v in fetched_list]))
 
     @classmethod
+    def setup_clients(cls):
+        super(VolumesV2ListTestJSON, cls).setup_clients()
+        cls.client = cls.volumes_client
+
+    @classmethod
     def resource_setup(cls):
         super(VolumesV2ListTestJSON, cls).resource_setup()
-        cls.client = cls.volumes_client
         cls.name = cls.VOLUME_FIELDS[1]
 
         # Create 3 test volumes
diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
index dc8d8e2..c827f9e 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -15,18 +15,23 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
 class VolumesV2NegativeTest(base.BaseVolumeTest):
 
     @classmethod
+    def setup_clients(cls):
+        super(VolumesV2NegativeTest, cls).setup_clients()
+        cls.client = cls.volumes_client
+
+    @classmethod
     def resource_setup(cls):
         super(VolumesV2NegativeTest, cls).resource_setup()
-        cls.client = cls.volumes_client
 
         cls.name_field = cls.special_fields['name_field']
 
@@ -37,13 +42,13 @@
     @test.attr(type=['negative', 'gate'])
     def test_volume_get_nonexistent_volume_id(self):
         # Should not be able to get a non-existent volume
-        self.assertRaises(exceptions.NotFound, self.client.get_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.get_volume,
                           str(uuid.uuid4()))
 
     @test.attr(type=['negative', 'gate'])
     def test_volume_delete_nonexistent_volume_id(self):
         # Should not be able to delete a non-existent Volume
-        self.assertRaises(exceptions.NotFound, self.client.delete_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_volume,
                           str(uuid.uuid4()))
 
     @test.attr(type=['negative', 'gate'])
@@ -52,7 +57,7 @@
         # in request
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.BadRequest, self.client.create_volume,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_volume,
                           size='#$%', display_name=v_name, metadata=metadata)
 
     @test.attr(type=['negative', 'gate'])
@@ -61,7 +66,7 @@
         # in request
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.BadRequest, self.client.create_volume,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_volume,
                           size='', display_name=v_name, metadata=metadata)
 
     @test.attr(type=['negative', 'gate'])
@@ -69,7 +74,7 @@
         # Should not be able to create volume with size zero
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.BadRequest, self.client.create_volume,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_volume,
                           size='0', display_name=v_name, metadata=metadata)
 
     @test.attr(type=['negative', 'gate'])
@@ -77,7 +82,7 @@
         # Should not be able to create volume with size negative
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.BadRequest, self.client.create_volume,
+        self.assertRaises(lib_exc.BadRequest, self.client.create_volume,
                           size='-1', display_name=v_name, metadata=metadata)
 
     @test.attr(type=['negative', 'gate'])
@@ -85,7 +90,7 @@
         # Should not be able to create volume with non-existent volume type
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.NotFound, self.client.create_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.create_volume,
                           size='1', volume_type=str(uuid.uuid4()),
                           display_name=v_name, metadata=metadata)
 
@@ -94,7 +99,7 @@
         # Should not be able to create volume with non-existent snapshot
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.NotFound, self.client.create_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.create_volume,
                           size='1', snapshot_id=str(uuid.uuid4()),
                           display_name=v_name, metadata=metadata)
 
@@ -103,7 +108,7 @@
         # Should not be able to create volume with non-existent source volume
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.NotFound, self.client.create_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.create_volume,
                           size='1', source_volid=str(uuid.uuid4()),
                           display_name=v_name, metadata=metadata)
 
@@ -111,7 +116,7 @@
     def test_update_volume_with_nonexistent_volume_id(self):
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.NotFound, self.client.update_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.update_volume,
                           volume_id=str(uuid.uuid4()), display_name=v_name,
                           metadata=metadata)
 
@@ -119,7 +124,7 @@
     def test_update_volume_with_invalid_volume_id(self):
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.NotFound, self.client.update_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.update_volume,
                           volume_id='#$%%&^&^', display_name=v_name,
                           metadata=metadata)
 
@@ -127,42 +132,42 @@
     def test_update_volume_with_empty_volume_id(self):
         v_name = data_utils.rand_name('Volume-')
         metadata = {'Type': 'work'}
-        self.assertRaises(exceptions.NotFound, self.client.update_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.update_volume,
                           volume_id='', display_name=v_name,
                           metadata=metadata)
 
     @test.attr(type=['negative', 'gate'])
     def test_get_invalid_volume_id(self):
         # Should not be able to get volume with invalid id
-        self.assertRaises(exceptions.NotFound, self.client.get_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.get_volume,
                           '#$%%&^&^')
 
     @test.attr(type=['negative', 'gate'])
     def test_get_volume_without_passing_volume_id(self):
         # Should not be able to get volume when empty ID is passed
-        self.assertRaises(exceptions.NotFound, self.client.get_volume, '')
+        self.assertRaises(lib_exc.NotFound, self.client.get_volume, '')
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_invalid_volume_id(self):
         # Should not be able to delete volume when invalid ID is passed
-        self.assertRaises(exceptions.NotFound, self.client.delete_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.delete_volume,
                           '!@#$%^&*()')
 
     @test.attr(type=['negative', 'gate'])
     def test_delete_volume_without_passing_volume_id(self):
         # Should not be able to delete volume when empty ID is passed
-        self.assertRaises(exceptions.NotFound, self.client.delete_volume, '')
+        self.assertRaises(lib_exc.NotFound, self.client.delete_volume, '')
 
     @test.attr(type=['negative', 'gate'])
     @test.services('compute')
     def test_attach_volumes_with_nonexistent_volume_id(self):
         srv_name = data_utils.rand_name('Instance-')
-        resp, server = self.servers_client.create_server(srv_name,
-                                                         self.image_ref,
-                                                         self.flavor_ref)
+        server = self.servers_client.create_server(srv_name,
+                                                   self.image_ref,
+                                                   self.flavor_ref)
         self.addCleanup(self.servers_client.delete_server, server['id'])
         self.servers_client.wait_for_server_status(server['id'], 'ACTIVE')
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.attach_volume,
                           str(uuid.uuid4()),
                           server['id'],
@@ -170,7 +175,7 @@
 
     @test.attr(type=['negative', 'gate'])
     def test_detach_volumes_with_invalid_volume_id(self):
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.detach_volume,
                           'xxx')
 
@@ -178,46 +183,46 @@
     def test_volume_extend_with_size_smaller_than_original_size(self):
         # Extend volume with smaller size than original size.
         extend_size = 0
-        self.assertRaises(exceptions.BadRequest, self.client.extend_volume,
+        self.assertRaises(lib_exc.BadRequest, self.client.extend_volume,
                           self.volume['id'], extend_size)
 
     @test.attr(type=['negative', 'gate'])
     def test_volume_extend_with_non_number_size(self):
         # Extend volume when size is non number.
         extend_size = 'abc'
-        self.assertRaises(exceptions.BadRequest, self.client.extend_volume,
+        self.assertRaises(lib_exc.BadRequest, self.client.extend_volume,
                           self.volume['id'], extend_size)
 
     @test.attr(type=['negative', 'gate'])
     def test_volume_extend_with_None_size(self):
         # Extend volume with None size.
         extend_size = None
-        self.assertRaises(exceptions.BadRequest, self.client.extend_volume,
+        self.assertRaises(lib_exc.BadRequest, self.client.extend_volume,
                           self.volume['id'], extend_size)
 
     @test.attr(type=['negative', 'gate'])
     def test_volume_extend_with_nonexistent_volume_id(self):
         # Extend volume size when volume is nonexistent.
         extend_size = int(self.volume['size']) + 1
-        self.assertRaises(exceptions.NotFound, self.client.extend_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.extend_volume,
                           str(uuid.uuid4()), extend_size)
 
     @test.attr(type=['negative', 'gate'])
     def test_volume_extend_without_passing_volume_id(self):
         # Extend volume size when passing volume id is None.
         extend_size = int(self.volume['size']) + 1
-        self.assertRaises(exceptions.NotFound, self.client.extend_volume,
+        self.assertRaises(lib_exc.NotFound, self.client.extend_volume,
                           None, extend_size)
 
     @test.attr(type=['negative', 'gate'])
     def test_reserve_volume_with_nonexistent_volume_id(self):
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.reserve_volume,
                           str(uuid.uuid4()))
 
     @test.attr(type=['negative', 'gate'])
     def test_unreserve_volume_with_nonexistent_volume_id(self):
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.unreserve_volume,
                           str(uuid.uuid4()))
 
@@ -226,7 +231,7 @@
         # Mark volume as reserved.
         self.client.reserve_volume(self.volume['id'])
         # Mark volume which is marked as reserved before
-        self.assertRaises(exceptions.BadRequest,
+        self.assertRaises(lib_exc.BadRequest,
                           self.client.reserve_volume,
                           self.volume['id'])
         # Unmark volume as reserved.
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
index d667dfd..c4f8096 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -23,13 +23,16 @@
 class VolumesV2SnapshotTestJSON(base.BaseVolumeTest):
 
     @classmethod
+    def skip_checks(cls):
+        super(VolumesV2SnapshotTestJSON, cls).skip_checks()
+        if not CONF.volume_feature_enabled.snapshot:
+            raise cls.skipException("Cinder volume snapshots are disabled")
+
+    @classmethod
     def resource_setup(cls):
         super(VolumesV2SnapshotTestJSON, cls).resource_setup()
         cls.volume_origin = cls.create_volume()
 
-        if not CONF.volume_feature_enabled.snapshot:
-            raise cls.skipException("Cinder volume snapshots are disabled")
-
         cls.name_field = cls.special_fields['name_field']
         cls.descrip_field = cls.special_fields['descrip_field']
 
@@ -64,9 +67,9 @@
         # Create a snapshot when volume status is in-use
         # Create a test instance
         server_name = data_utils.rand_name('instance-')
-        resp, server = self.servers_client.create_server(server_name,
-                                                         self.image_ref,
-                                                         self.flavor_ref)
+        server = self.servers_client.create_server(server_name,
+                                                   self.image_ref,
+                                                   self.flavor_ref)
         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
diff --git a/tempest/api/volume/test_volumes_snapshots_negative.py b/tempest/api/volume/test_volumes_snapshots_negative.py
index 2d7b6de..3ad23f7 100644
--- a/tempest/api/volume/test_volumes_snapshots_negative.py
+++ b/tempest/api/volume/test_volumes_snapshots_negative.py
@@ -12,10 +12,11 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.volume import base
 from tempest.common.utils import data_utils
 from tempest import config
-from tempest import exceptions
 from tempest import test
 
 CONF = config.CONF
@@ -24,9 +25,8 @@
 class VolumesV2SnapshotNegativeTestJSON(base.BaseVolumeTest):
 
     @classmethod
-    def resource_setup(cls):
-        super(VolumesV2SnapshotNegativeTestJSON, cls).resource_setup()
-
+    def skip_checks(cls):
+        super(VolumesV2SnapshotNegativeTestJSON, cls).skip_checks()
         if not CONF.volume_feature_enabled.snapshot:
             raise cls.skipException("Cinder volume snapshots are disabled")
 
@@ -34,7 +34,7 @@
     def test_create_snapshot_with_nonexistent_volume_id(self):
         # Create a snapshot with nonexistent volume id
         s_name = data_utils.rand_name('snap')
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.snapshots_client.create_snapshot,
                           str(uuid.uuid4()), display_name=s_name)
 
@@ -42,7 +42,7 @@
     def test_create_snapshot_without_passing_volume_id(self):
         # Create a snapshot without passing volume id
         s_name = data_utils.rand_name('snap')
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.snapshots_client.create_snapshot,
                           None, display_name=s_name)
 
diff --git a/tempest/api/volume/v2/test_volumes_list.py b/tempest/api/volume/v2/test_volumes_list.py
index bc14b2c..3a21f41 100644
--- a/tempest/api/volume/v2/test_volumes_list.py
+++ b/tempest/api/volume/v2/test_volumes_list.py
@@ -31,9 +31,13 @@
     """
 
     @classmethod
+    def setup_clients(cls):
+        super(VolumesV2ListTestJSON, cls).setup_clients()
+        cls.client = cls.volumes_client
+
+    @classmethod
     def resource_setup(cls):
         super(VolumesV2ListTestJSON, cls).resource_setup()
-        cls.client = cls.volumes_client
 
         # Create 3 test volumes
         cls.volume_list = []
diff --git a/tempest/api_schema/response/compute/baremetal_nodes.py b/tempest/api_schema/response/compute/baremetal_nodes.py
new file mode 100644
index 0000000..2f67d37
--- /dev/null
+++ b/tempest/api_schema/response/compute/baremetal_nodes.py
@@ -0,0 +1,53 @@
+# Copyright 2015 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.
+
+node = {
+    'type': 'object',
+    'properties': {
+        'id': {'type': 'string'},
+        'interfaces': {'type': 'array'},
+        'host': {'type': 'string'},
+        'task_state': {'type': ['string', 'null']},
+        'cpus': {'type': 'integer'},
+        'memory_mb': {'type': 'integer'},
+        'disk_gb': {'type': 'integer'},
+    },
+    'required': ['id', 'interfaces', 'host', 'task_state', 'cpus', 'memory_mb',
+                 'disk_gb']
+}
+
+list_baremetal_nodes = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'nodes': {
+                'type': 'array',
+                'items': node
+            }
+        },
+        'required': ['nodes']
+    }
+}
+
+get_baremetal_node = {
+    'status_code': [200],
+    'response_body': {
+        'type': 'object',
+        'properties': {
+            'node': node
+        },
+        'required': ['node']
+    }
+}
diff --git a/tempest/api_schema/response/compute/v2/images.py b/tempest/api_schema/response/compute/v2/images.py
index 923c744..2317e6b 100644
--- a/tempest/api_schema/response/compute/v2/images.py
+++ b/tempest/api_schema/response/compute/v2/images.py
@@ -12,15 +12,20 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import copy
+
 from tempest.api_schema.response.compute import parameter_types
 
+image_links = copy.deepcopy(parameter_types.links)
+image_links['items']['properties'].update({'type': {'type': 'string'}})
+
 common_image_schema = {
     'type': 'object',
     'properties': {
         'id': {'type': 'string'},
         'status': {'type': 'string'},
         'updated': {'type': 'string'},
-        'links': parameter_types.links,
+        'links': image_links,
         'name': {'type': 'string'},
         'created': {'type': 'string'},
         'minDisk': {'type': 'integer'},
@@ -67,7 +72,7 @@
                     'type': 'object',
                     'properties': {
                         'id': {'type': 'string'},
-                        'links': parameter_types.links,
+                        'links': image_links,
                         'name': {'type': 'string'}
                     },
                     'required': ['id', 'links', 'name']
diff --git a/tempest/auth.py b/tempest/auth.py
index 6a92b5f..7b00f2a 100644
--- a/tempest/auth.py
+++ b/tempest/auth.py
@@ -22,13 +22,11 @@
 
 import six
 
-from tempest import config
 from tempest.openstack.common import log as logging
 from tempest.services.identity.json import token_client as json_id
 from tempest.services.identity.v3.json import token_client as json_v3id
 
 
-CONF = config.CONF
 LOG = logging.getLogger(__name__)
 
 
@@ -38,34 +36,21 @@
     Provide authentication
     """
 
-    def __init__(self, credentials, interface=None):
+    def __init__(self, credentials):
         """
         :param credentials: credentials for authentication
-        :param interface: 'json' or 'xml'. Applicable for tempest client only
-            (deprecated: only json now supported)
         """
-        credentials = self._convert_credentials(credentials)
         if self.check_credentials(credentials):
             self.credentials = credentials
         else:
             raise TypeError("Invalid credentials")
-        self.interface = 'json'
         self.cache = None
         self.alt_auth_data = None
         self.alt_part = None
 
-    def _convert_credentials(self, credentials):
-        # Support dict credentials for backwards compatibility
-        if isinstance(credentials, dict):
-            return get_credentials(**credentials)
-        else:
-            return credentials
-
     def __str__(self):
-        return "Creds :{creds}, interface: {interface}, " \
-               "cached auth data: {cache}".format(
-                   creds=self.credentials, interface=self.interface,
-                   cache=self.cache)
+        return "Creds :{creds}, cached auth data: {cache}".format(
+            creds=self.credentials, cache=self.cache)
 
     @abc.abstractmethod
     def _decorate_request(self, filters, method, url, headers=None, body=None,
@@ -201,9 +186,9 @@
 
     token_expiry_threshold = datetime.timedelta(seconds=60)
 
-    def __init__(self, credentials, interface=None):
-        super(KeystoneAuthProvider, self).__init__(credentials, interface)
-        self.auth_client = self._auth_client()
+    def __init__(self, credentials, auth_url):
+        super(KeystoneAuthProvider, self).__init__(credentials)
+        self.auth_client = self._auth_client(auth_url)
 
     def _decorate_request(self, filters, method, url, headers=None, body=None,
                           auth_data=None):
@@ -251,8 +236,8 @@
 
     EXPIRY_DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
 
-    def _auth_client(self):
-        return json_id.TokenClientJSON()
+    def _auth_client(self, auth_url):
+        return json_id.TokenClientJSON(auth_url)
 
     def _auth_params(self):
         return dict(
@@ -329,15 +314,16 @@
 
     EXPIRY_DATE_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
 
-    def _auth_client(self):
-        return json_v3id.V3TokenClientJSON()
+    def _auth_client(self, auth_url):
+        return json_v3id.V3TokenClientJSON(auth_url)
 
     def _auth_params(self):
         return dict(
             user=self.credentials.username,
             password=self.credentials.password,
-            tenant=self.credentials.tenant_name,
-            domain=self.credentials.user_domain_name,
+            project=self.credentials.tenant_name,
+            user_domain=self.credentials.user_domain_name,
+            project_domain=self.credentials.project_domain_name,
             auth_data=True)
 
     def _fill_credentials(self, auth_data_body):
@@ -440,47 +426,43 @@
             datetime.datetime.utcnow()
 
 
-def get_default_credentials(credential_type, fill_in=True):
-    """
-    Returns configured credentials of the specified type
-    based on the configured auth_version
-    """
-    return get_credentials(fill_in=fill_in, credential_type=credential_type)
+def is_identity_version_supported(identity_version):
+    return identity_version in IDENTITY_VERSION
 
 
-def get_credentials(credential_type=None, fill_in=True, **kwargs):
+def get_credentials(auth_url, fill_in=True, identity_version='v2', **kwargs):
     """
     Builds a credentials object based on the configured auth_version
 
-    :param credential_type (string): requests credentials from tempest
-           configuration file. Valid values are defined in
-           Credentials.TYPE.
-    :param kwargs (dict): take into account only if credential_type is
-           not specified or None. Dict of credential key/value pairs
+    :param auth_url (string): Full URI of the OpenStack Identity API(Keystone)
+           which is used to fetch the token from Identity service.
+    :param fill_in (boolean): obtain a token and fill in all credential
+           details provided by the identity service. When fill_in is not
+           specified, credentials are not validated. Validation can be invoked
+           by invoking ``is_valid()``
+    :param identity_version (string): identity API version is used to
+           select the matching auth provider and credentials class
+    :param kwargs (dict): Dict of credential key/value pairs
 
     Examples:
 
         Returns credentials from the provided parameters:
         >>> get_credentials(username='foo', password='bar')
 
-        Returns credentials from tempest configuration:
-        >>> get_credentials(credential_type='user')
+        Returns credentials including IDs:
+        >>> get_credentials(username='foo', password='bar', fill_in=True)
     """
-    if CONF.identity.auth_version == 'v2':
-        credential_class = KeystoneV2Credentials
-        auth_provider_class = KeystoneV2AuthProvider
-    elif CONF.identity.auth_version == 'v3':
-        credential_class = KeystoneV3Credentials
-        auth_provider_class = KeystoneV3AuthProvider
-    else:
-        raise exceptions.InvalidConfiguration('Unsupported auth version')
-    if credential_type is not None:
-        creds = credential_class.get_default(credential_type)
-    else:
-        creds = credential_class(**kwargs)
+    if not is_identity_version_supported(identity_version):
+        raise exceptions.InvalidIdentityVersion(
+            identity_version=identity_version)
+
+    credential_class, auth_provider_class = IDENTITY_VERSION.get(
+        identity_version)
+
+    creds = credential_class(**kwargs)
     # Fill in the credentials fields that were not specified
     if fill_in:
-        auth_provider = auth_provider_class(creds)
+        auth_provider = auth_provider_class(creds, auth_url)
         creds = auth_provider.fill_credentials()
     return creds
 
@@ -490,18 +472,9 @@
     Set of credentials for accessing OpenStack services
 
     ATTRIBUTES: list of valid class attributes representing credentials.
-
-    TYPES: types of credentials available in the configuration file.
-           For each key there's a tuple (section, prefix) to match the
-           configuration options.
     """
 
     ATTRIBUTES = []
-    TYPES = {
-        'identity_admin': ('identity', 'admin'),
-        'user': ('identity', None),
-        'alt_user': ('identity', 'alt')
-    }
 
     def __init__(self, **kwargs):
         """
@@ -554,21 +527,8 @@
         except AttributeError:
             return default
 
-    @classmethod
-    def get_default(cls, credentials_type):
-        if credentials_type not in cls.TYPES:
-            raise exceptions.InvalidCredentials()
-        creds = cls._get_default(credentials_type)
-        if not creds.is_valid():
-            msg = ("The %s credentials are incorrectly set in the config file."
-                   " Double check that all required values are assigned" %
-                   credentials_type)
-            raise exceptions.InvalidConfiguration(msg)
-        return creds
-
-    @classmethod
-    def _get_default(cls, credentials_type):
-        raise NotImplementedError
+    def get_init_attributes(self):
+        return self._initial.keys()
 
     def is_valid(self):
         raise NotImplementedError
@@ -584,21 +544,8 @@
 
 class KeystoneV2Credentials(Credentials):
 
-    CONF_ATTRIBUTES = ['username', 'password', 'tenant_name']
-    ATTRIBUTES = ['user_id', 'tenant_id']
-    ATTRIBUTES.extend(CONF_ATTRIBUTES)
-
-    @classmethod
-    def _get_default(cls, credentials_type='user'):
-        params = {}
-        section, prefix = cls.TYPES[credentials_type]
-        for attr in cls.CONF_ATTRIBUTES:
-            _section = getattr(CONF, section)
-            if prefix is None:
-                params[attr] = getattr(_section, attr)
-            else:
-                params[attr] = getattr(_section, prefix + "_" + attr)
-        return cls(**params)
+    ATTRIBUTES = ['username', 'password', 'tenant_name', 'user_id',
+                  'tenant_id']
 
     def is_valid(self):
         """
@@ -608,26 +555,15 @@
         return None not in (self.username, self.password)
 
 
-class KeystoneV3Credentials(KeystoneV2Credentials):
+class KeystoneV3Credentials(Credentials):
     """
     Credentials suitable for the Keystone Identity V3 API
     """
 
-    CONF_ATTRIBUTES = ['domain_name', 'password', 'tenant_name', 'username']
-    ATTRIBUTES = ['project_domain_id', 'project_domain_name', 'project_id',
+    ATTRIBUTES = ['domain_name', 'password', 'tenant_name', 'username',
+                  'project_domain_id', 'project_domain_name', 'project_id',
                   'project_name', 'tenant_id', 'tenant_name', 'user_domain_id',
                   'user_domain_name', 'user_id']
-    ATTRIBUTES.extend(CONF_ATTRIBUTES)
-
-    def __init__(self, **kwargs):
-        """
-        If domain is not specified, load the one configured for the
-        identity manager.
-        """
-        domain_fields = set(x for x in self.ATTRIBUTES if 'domain' in x)
-        if not domain_fields.intersection(kwargs.keys()):
-            kwargs['user_domain_name'] = CONF.identity.admin_domain_name
-        super(KeystoneV3Credentials, self).__init__(**kwargs)
 
     def __setattr__(self, key, value):
         parent = super(KeystoneV3Credentials, self)
@@ -685,3 +621,7 @@
              self.project_id is not None,
              self.project_name is not None and valid_project_domain])
         return all([self.password is not None, valid_user, valid_project])
+
+
+IDENTITY_VERSION = {'v2': (KeystoneV2Credentials, KeystoneV2AuthProvider),
+                    'v3': (KeystoneV3Credentials, KeystoneV3AuthProvider)}
diff --git a/tempest/cli/simple_read_only/compute/__init__.py b/tempest/cli/simple_read_only/compute/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/tempest/cli/simple_read_only/compute/__init__.py
+++ /dev/null
diff --git a/tempest/cli/simple_read_only/compute/test_nova.py b/tempest/cli/simple_read_only/compute/test_nova.py
deleted file mode 100644
index aee92fa..0000000
--- a/tempest/cli/simple_read_only/compute/test_nova.py
+++ /dev/null
@@ -1,209 +0,0 @@
-# Copyright 2013 OpenStack Foundation
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-from tempest_lib import decorators
-from tempest_lib import exceptions
-import testtools
-
-from tempest import cli
-from tempest import config
-from tempest.openstack.common import log as logging
-
-CONF = config.CONF
-
-LOG = logging.getLogger(__name__)
-
-
-class SimpleReadOnlyNovaClientTest(cli.ClientTestBase):
-
-    """
-    This is a first pass at a simple read only python-novaclient test. This
-    only exercises client commands that are read only.
-
-    This should test commands:
-    * as a regular user
-    * as a admin user
-    * with and without optional parameters
-    * initially just check return codes, and later test command outputs
-
-    """
-
-    @classmethod
-    def resource_setup(cls):
-        if not CONF.service_available.nova:
-            msg = ("%s skipped as Nova is not available" % cls.__name__)
-            raise cls.skipException(msg)
-        super(SimpleReadOnlyNovaClientTest, cls).resource_setup()
-
-    def nova(self, *args, **kwargs):
-        return self.clients.nova(*args,
-                                 endpoint_type=CONF.compute.endpoint_type,
-                                 **kwargs)
-
-    def test_admin_fake_action(self):
-        self.assertRaises(exceptions.CommandFailed,
-                          self.nova,
-                          'this-does-nova-exist')
-
-    # NOTE(jogo): Commands in order listed in 'nova help'
-
-    # Positional arguments:
-
-    def test_admin_absolute_limites(self):
-        self.nova('absolute-limits')
-        self.nova('absolute-limits', params='--reserved')
-
-    def test_admin_aggregate_list(self):
-        self.nova('aggregate-list')
-
-    def test_admin_availability_zone_list(self):
-        self.assertIn("internal", self.nova('availability-zone-list'))
-
-    def test_admin_cloudpipe_list(self):
-        self.nova('cloudpipe-list')
-
-    def test_admin_credentials(self):
-        self.nova('credentials')
-
-    @testtools.skipIf(CONF.service_available.neutron,
-                      "Neutron does not provide this feature")
-    def test_admin_dns_domains(self):
-        self.nova('dns-domains')
-
-    @decorators.skip_because(bug="1157349")
-    def test_admin_dns_list(self):
-        self.nova('dns-list')
-
-    def test_admin_endpoints(self):
-        self.nova('endpoints')
-
-    def test_admin_flavor_acces_list(self):
-        self.assertRaises(exceptions.CommandFailed,
-                          self.nova,
-                          'flavor-access-list')
-        # Failed to get access list for public flavor type
-        self.assertRaises(exceptions.CommandFailed,
-                          self.nova,
-                          'flavor-access-list',
-                          params='--flavor m1.tiny')
-
-    def test_admin_flavor_list(self):
-        self.assertIn("Memory_MB", self.nova('flavor-list'))
-
-    def test_admin_floating_ip_bulk_list(self):
-        self.nova('floating-ip-bulk-list')
-
-    def test_admin_floating_ip_list(self):
-        self.nova('floating-ip-list')
-
-    def test_admin_floating_ip_pool_list(self):
-        self.nova('floating-ip-pool-list')
-
-    def test_admin_host_list(self):
-        self.nova('host-list')
-
-    def test_admin_hypervisor_list(self):
-        self.nova('hypervisor-list')
-
-    def test_admin_image_list(self):
-        self.nova('image-list')
-
-    @decorators.skip_because(bug="1157349")
-    def test_admin_interface_list(self):
-        self.nova('interface-list')
-
-    def test_admin_keypair_list(self):
-        self.nova('keypair-list')
-
-    def test_admin_list(self):
-        self.nova('list')
-        self.nova('list', params='--all-tenants 1')
-        self.nova('list', params='--all-tenants 0')
-        self.assertRaises(exceptions.CommandFailed,
-                          self.nova,
-                          'list',
-                          params='--all-tenants bad')
-
-    def test_admin_network_list(self):
-        self.nova('network-list')
-
-    def test_admin_rate_limits(self):
-        self.nova('rate-limits')
-
-    def test_admin_secgroup_list(self):
-        self.nova('secgroup-list')
-
-    @decorators.skip_because(bug="1157349")
-    def test_admin_secgroup_list_rules(self):
-        self.nova('secgroup-list-rules')
-
-    @cli.min_client_version(client='nova', version='2.18')
-    def test_admin_server_group_list(self):
-        self.nova('server-group-list')
-
-    def test_admin_servce_list(self):
-        self.nova('service-list')
-
-    def test_admin_usage(self):
-        self.nova('usage')
-
-    def test_admin_usage_list(self):
-        self.nova('usage-list')
-
-    @testtools.skipIf(not CONF.service_available.cinder,
-                      "Skipped as Cinder is not available")
-    def test_admin_volume_list(self):
-        self.nova('volume-list')
-
-    @testtools.skipIf(not CONF.service_available.cinder,
-                      "Skipped as Cinder is not available")
-    def test_admin_volume_snapshot_list(self):
-        self.nova('volume-snapshot-list')
-
-    @testtools.skipIf(not CONF.service_available.cinder,
-                      "Skipped as Cinder is not available")
-    def test_admin_volume_type_list(self):
-        self.nova('volume-type-list')
-
-    def test_admin_help(self):
-        self.nova('help')
-
-    def test_admin_list_extensions(self):
-        self.nova('list-extensions')
-
-    def test_admin_net_list(self):
-        self.nova('net-list')
-
-    def test_agent_list(self):
-        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):
-        self.nova('', flags='--version')
-
-    def test_admin_debug_list(self):
-        self.nova('list', flags='--debug')
-
-    def test_admin_timeout(self):
-        self.nova('list', flags='--timeout %d' % CONF.cli.timeout)
-
-    def test_admin_timing(self):
-        self.nova('list', flags='--timing')
diff --git a/tempest/clients.py b/tempest/clients.py
index 03928ba..fa3f65e 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -15,7 +15,7 @@
 
 import copy
 
-from tempest import auth
+from tempest.common import cred_provider
 from tempest.common import negative_rest_client
 from tempest import config
 from tempest import manager
@@ -29,6 +29,8 @@
     AggregatesClientJSON
 from tempest.services.compute.json.availability_zone_client import \
     AvailabilityZoneClientJSON
+from tempest.services.compute.json.baremetal_nodes_client import \
+    BaremetalNodesClientJSON
 from tempest.services.compute.json.certificates_client import \
     CertificatesClientJSON
 from tempest.services.compute.json.extensions_client import \
@@ -64,7 +66,8 @@
     TenantUsagesClientJSON
 from tempest.services.compute.json.volumes_extensions_client import \
     VolumesExtensionsClientJSON
-from tempest.services.data_processing.v1_1.client import DataProcessingClient
+from tempest.services.data_processing.v1_1.data_processing_client import \
+    DataProcessingClient
 from tempest.services.database.json.flavors_client import \
     DatabaseFlavorsClientJSON
 from tempest.services.database.json.limits_client import \
@@ -155,10 +158,7 @@
     }
     default_params_with_timeout_values.update(default_params)
 
-    def __init__(self, credentials=None, interface='json', service=None):
-        # Set interface and client type first
-        self.interface = interface
-        # super cares for credentials validation
+    def __init__(self, credentials=None, service=None):
         super(Manager, self).__init__(credentials=credentials)
 
         self._set_compute_clients()
@@ -204,6 +204,12 @@
             build_interval=CONF.orchestration.build_interval,
             build_timeout=CONF.orchestration.build_timeout,
             **self.default_params)
+        self.data_processing_client = DataProcessingClient(
+            self.auth_provider,
+            CONF.data_processing.catalog_type,
+            CONF.identity.region,
+            endpoint_type=CONF.data_processing.endpoint_type,
+            **self.default_params_with_timeout_values)
         self.negative_client = negative_rest_client.NegativeRestClient(
             self.auth_provider, service)
 
@@ -214,8 +220,6 @@
                            self.credentials.tenant_name)
         self.ec2api_client = botoclients.APIClientEC2(*ec2_client_args)
         self.s3_client = botoclients.ObjectClientS3(*ec2_client_args)
-        self.data_processing_client = DataProcessingClient(
-            self.auth_provider)
 
     def _set_compute_clients(self):
         params = {
@@ -267,6 +271,8 @@
             InstanceUsagesAuditLogClientJSON(self.auth_provider, **params)
         self.tenant_networks_client = \
             TenantNetworksClientJSON(self.auth_provider, **params)
+        self.baremetal_nodes_client = BaremetalNodesClientJSON(
+            self.auth_provider, **params)
 
         # NOTE: The following client needs special timeout values because
         # the API is a proxy for the other component.
@@ -296,16 +302,27 @@
             **self.default_params_with_timeout_values)
 
     def _set_identity_clients(self):
-        self.identity_client = IdentityClientJSON(self.auth_provider)
-        self.identity_v3_client = IdentityV3ClientJSON(self.auth_provider)
-        self.endpoints_client = EndPointClientJSON(self.auth_provider)
-        self.service_client = ServiceClientJSON(self.auth_provider)
-        self.policy_client = PolicyClientJSON(self.auth_provider)
-        self.region_client = RegionClientJSON(self.auth_provider)
-        self.token_client = TokenClientJSON()
+        params = {
+            'service': CONF.identity.catalog_type,
+            'region': CONF.identity.region,
+            'endpoint_type': 'adminURL'
+        }
+        params.update(self.default_params_with_timeout_values)
+
+        self.identity_client = IdentityClientJSON(self.auth_provider,
+                                                  **params)
+        self.identity_v3_client = IdentityV3ClientJSON(self.auth_provider,
+                                                       **params)
+        self.endpoints_client = EndPointClientJSON(self.auth_provider,
+                                                   **params)
+        self.service_client = ServiceClientJSON(self.auth_provider, **params)
+        self.policy_client = PolicyClientJSON(self.auth_provider, **params)
+        self.region_client = RegionClientJSON(self.auth_provider, **params)
+        self.credentials_client = CredentialsClientJSON(self.auth_provider,
+                                                        **params)
+        self.token_client = TokenClientJSON(CONF.identity.uri)
         if CONF.identity_feature_enabled.api_v3:
-            self.token_v3_client = V3TokenClientJSON()
-        self.credentials_client = CredentialsClientJSON(self.auth_provider)
+            self.token_v3_client = V3TokenClientJSON(CONF.identity.uri_v3)
 
     def _set_volume_clients(self):
         params = {
@@ -330,9 +347,12 @@
                                                     **params)
         self.snapshots_v2_client = SnapshotsV2ClientJSON(self.auth_provider,
                                                          **params)
-        self.volumes_client = VolumesClientJSON(self.auth_provider, **params)
-        self.volumes_v2_client = VolumesV2ClientJSON(self.auth_provider,
-                                                     **params)
+        self.volumes_client = VolumesClientJSON(
+            self.auth_provider, default_volume_size=CONF.volume.volume_size,
+            **params)
+        self.volumes_v2_client = VolumesV2ClientJSON(
+            self.auth_provider, default_volume_size=CONF.volume.volume_size,
+            **params)
         self.volume_types_client = VolumeTypesClientJSON(self.auth_provider,
                                                          **params)
         self.volume_services_client = VolumesServicesClientJSON(
@@ -376,8 +396,8 @@
     managed client objects
     """
 
-    def __init__(self, interface='json', service=None):
+    def __init__(self, service=None):
         super(AdminManager, self).__init__(
-            credentials=auth.get_default_credentials('identity_admin'),
-            interface=interface,
+            credentials=cred_provider.get_configured_credentials(
+                'identity_admin'),
             service=service)
diff --git a/tempest/cmd/cleanup.py b/tempest/cmd/cleanup.py
index 28992b9..669f506 100755
--- a/tempest/cmd/cleanup.py
+++ b/tempest/cmd/cleanup.py
@@ -54,9 +54,9 @@
 import json
 import sys
 
-from tempest import auth
 from tempest import clients
 from tempest.cmd import cleanup_service
+from tempest.common import cred_provider
 from tempest import config
 from tempest.openstack.common import log as logging
 
@@ -159,7 +159,8 @@
         kwargs = {"username": CONF.identity.admin_username,
                   "password": CONF.identity.admin_password,
                   "tenant_name": tenant['name']}
-        mgr = clients.Manager(credentials=auth.get_credentials(**kwargs))
+        mgr = clients.Manager(credentials=cred_provider.get_credentials(
+            **kwargs))
         kwargs = {'data': tenant_data,
                   'is_dry_run': is_dry_run,
                   'saved_state_json': None,
@@ -221,7 +222,7 @@
                 needs_role = False
                 LOG.debug("User already had admin privilege for this tenant")
         if needs_role:
-            LOG.debug("Adding admin priviledge for : %s" % tenant_id)
+            LOG.debug("Adding admin privilege for : %s" % tenant_id)
             id_cl.assign_user_role(tenant_id, self.admin_id,
                                    self.admin_role_id)
             self.admin_role_added.append(tenant_id)
diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py
index 9c4a5dc..67eb182 100644
--- a/tempest/cmd/cleanup_service.py
+++ b/tempest/cmd/cleanup_service.py
@@ -297,7 +297,7 @@
 
     def list(self):
         client = self.client
-        _, floating_ips = client.list_floating_ips()
+        floating_ips = client.list_floating_ips()
         LOG.debug("List count, %s Floating IPs" % len(floating_ips))
         return floating_ips
 
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 889b2dd..b11a3c8 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -110,11 +110,11 @@
 import unittest
 
 import netaddr
+from tempest_lib import exceptions as lib_exc
 import yaml
 
 import tempest.auth
 from tempest import config
-from tempest import exceptions
 from tempest.openstack.common import log as logging
 from tempest.openstack.common import timeutils
 from tempest.services.compute.json import flavors_client
@@ -176,8 +176,13 @@
             username=user,
             password=pw,
             tenant_name=tenant)
-        _auth = tempest.auth.KeystoneV2AuthProvider(_creds)
-        self.identity = identity_client.IdentityClientJSON(_auth)
+        _auth = tempest.auth.KeystoneV2AuthProvider(_creds, CONF.identity.uri)
+        self.identity = identity_client.IdentityClientJSON(
+            _auth,
+            CONF.identity.catalog_type,
+            CONF.identity.region,
+            endpoint_type='adminURL',
+            **default_params_with_timeout_values)
         self.servers = servers_client.ServersClientJSON(_auth,
                                                         **compute_params)
         self.flavors = flavors_client.FlavorsClientJSON(_auth,
@@ -232,9 +237,6 @@
         LOG.error("%s not found in USERS: %s" % (name, USERS))
 
 
-def resp_ok(response):
-    return 200 >= int(response['status']) < 300
-
 ###################
 #
 # TENANTS
@@ -297,7 +299,7 @@
             USERS[user]['tenant_id'],
             USERS[user]['id'],
             role['id'])
-    except exceptions.Conflict:
+    except lib_exc.Conflict:
         # don't care if it's already assigned
         pass
 
@@ -313,14 +315,14 @@
     for u in users:
         try:
             tenant = admin.identity.get_tenant_by_name(u['tenant'])
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             LOG.error("Tenant: %s - not found" % u['tenant'])
             continue
         try:
             admin.identity.get_user_by_username(tenant['id'], u['name'])
             LOG.warn("User '%s' already exists in this environment"
                      % u['name'])
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             admin.identity.create_user(
                 u['name'], u['pass'], tenant['id'],
                 "%s@%s" % (u['name'], tenant['id']),
@@ -432,7 +434,7 @@
                 found,
                 "Couldn't find expected server %s" % server['name'])
 
-            r, found = client.servers.get_server(found['id'])
+            found = client.servers.get_server(found['id'])
             # validate neutron is enabled and ironic disabled:
             if (CONF.service_available.neutron and
                     not CONF.baremetal.driver_enabled):
@@ -707,7 +709,7 @@
                                           cidr=subnet['range'],
                                           name=subnet['name'],
                                           ip_version=ip_version)
-        except exceptions.BadRequest as e:
+        except lib_exc.BadRequest as e:
             is_overlapping_cidr = 'overlaps with another subnet' in str(e)
             if not is_overlapping_cidr:
                 raise
@@ -816,7 +818,7 @@
                 client.networks, 'networks', x)['id'])
             kwargs['networks'] = [{'uuid': get_net_id(network)}
                                   for network in server['networks']]
-        resp, body = client.servers.create_server(
+        body = client.servers.create_server(
             server['name'], image_id, flavor_id, **kwargs)
         server_id = body['id']
         client.servers.wait_for_server_status(server_id, 'ACTIVE')
diff --git a/tempest/cmd/verify_tempest_config.py b/tempest/cmd/verify_tempest_config.py
index 65a3a95..697965f 100755
--- a/tempest/cmd/verify_tempest_config.py
+++ b/tempest/cmd/verify_tempest_config.py
@@ -154,7 +154,7 @@
 
 def verify_extensions(os, service, results):
     extensions_client = get_extension_client(os, service)
-    if service == 'neutron' or service == 'cinder':
+    if service != 'swift':
         resp = extensions_client.list_extensions()
     else:
         __, resp = extensions_client.list_extensions()
@@ -327,7 +327,7 @@
         CONF_PARSER = moves.configparser.SafeConfigParser()
         CONF_PARSER.optionxform = str
         CONF_PARSER.readfp(conf_file)
-    os = clients.AdminManager(interface='json')
+    os = clients.AdminManager()
     services = check_service_availability(os, update)
     results = {}
     for service in ['nova', 'cinder', 'neutron', 'swift']:
diff --git a/tempest/common/accounts.py b/tempest/common/accounts.py
index 66285e4..dd8d498 100644
--- a/tempest/common/accounts.py
+++ b/tempest/common/accounts.py
@@ -17,7 +17,6 @@
 
 import yaml
 
-from tempest import auth
 from tempest.common import cred_provider
 from tempest import config
 from tempest import exceptions
@@ -109,9 +108,9 @@
 
     def get_hash(self, creds):
         for _hash in self.hash_dict:
-            # Comparing on the attributes that are expected in the YAML
+            # Comparing on the attributes that were read from the YAML
             if all([getattr(creds, k) == self.hash_dict[_hash][k] for k in
-                    creds.CONF_ATTRIBUTES]):
+                    creds.get_init_attributes()]):
                 return _hash
         raise AttributeError('Invalid credentials %s' % creds)
 
@@ -123,7 +122,7 @@
         if self.isolated_creds.get('primary'):
             return self.isolated_creds.get('primary')
         creds = self._get_creds()
-        primary_credential = auth.get_credentials(**creds)
+        primary_credential = cred_provider.get_credentials(**creds)
         self.isolated_creds['primary'] = primary_credential
         return primary_credential
 
@@ -131,7 +130,7 @@
         if self.isolated_creds.get('alt'):
             return self.isolated_creds.get('alt')
         creds = self._get_creds()
-        alt_credential = auth.get_credentials(**creds)
+        alt_credential = cred_provider.get_credentials(**creds)
         self.isolated_creds['alt'] = alt_credential
         return alt_credential
 
@@ -189,9 +188,10 @@
             return self.isolated_creds.get('primary')
         if not self.use_default_creds:
             creds = self.get_creds(0)
-            primary_credential = auth.get_credentials(**creds)
+            primary_credential = cred_provider.get_credentials(**creds)
         else:
-            primary_credential = auth.get_default_credentials('user')
+            primary_credential = cred_provider.get_configured_credentials(
+                'user')
         self.isolated_creds['primary'] = primary_credential
         return primary_credential
 
@@ -200,9 +200,10 @@
             return self.isolated_creds.get('alt')
         if not self.use_default_creds:
             creds = self.get_creds(1)
-            alt_credential = auth.get_credentials(**creds)
+            alt_credential = cred_provider.get_credentials(**creds)
         else:
-            alt_credential = auth.get_default_credentials('alt_user')
+            alt_credential = cred_provider.get_configured_credentials(
+                'alt_user')
         self.isolated_creds['alt'] = alt_credential
         return alt_credential
 
@@ -210,4 +211,5 @@
         self.isolated_creds = {}
 
     def get_admin_creds(self):
-        return auth.get_default_credentials("identity_admin", fill_in=False)
+        return cred_provider.get_configured_credentials(
+            "identity_admin", fill_in=False)
diff --git a/tempest/common/cred_provider.py b/tempest/common/cred_provider.py
index c5be0c0..033410e 100644
--- a/tempest/common/cred_provider.py
+++ b/tempest/common/cred_provider.py
@@ -16,17 +16,78 @@
 
 import six
 
+from tempest import auth
 from tempest import config
+from tempest import exceptions
 from tempest.openstack.common import log as logging
 
 CONF = config.CONF
 LOG = logging.getLogger(__name__)
 
+# Type of credentials available from configuration
+CREDENTIAL_TYPES = {
+    'identity_admin': ('identity', 'admin'),
+    'user': ('identity', None),
+    'alt_user': ('identity', 'alt')
+}
+
+
+# Read credentials from configuration, builds a Credentials object
+# based on the specified or configured version
+def get_configured_credentials(credential_type, fill_in=True,
+                               identity_version=None):
+    identity_version = identity_version or CONF.identity.auth_version
+    if identity_version not in ('v2', 'v3'):
+        raise exceptions.InvalidConfiguration(
+            'Unsupported auth version: %s' % identity_version)
+    if credential_type not in CREDENTIAL_TYPES:
+        raise exceptions.InvalidCredentials()
+    conf_attributes = ['username', 'password', 'tenant_name']
+    if identity_version == 'v3':
+        conf_attributes.append('domain_name')
+    # Read the parts of credentials from config
+    params = {}
+    section, prefix = CREDENTIAL_TYPES[credential_type]
+    for attr in conf_attributes:
+        _section = getattr(CONF, section)
+        if prefix is None:
+            params[attr] = getattr(_section, attr)
+        else:
+            params[attr] = getattr(_section, prefix + "_" + attr)
+    # Build and validate credentials. We are reading configured credentials,
+    # so validate them even if fill_in is False
+    credentials = get_credentials(fill_in=fill_in, **params)
+    if not fill_in:
+        if not credentials.is_valid():
+            msg = ("The %s credentials are incorrectly set in the config file."
+                   " Double check that all required values are assigned" %
+                   credential_type)
+            raise exceptions.InvalidConfiguration(msg)
+    return credentials
+
+
+# Wrapper around auth.get_credentials to use the configured identity version
+# is none is specified
+def get_credentials(fill_in=True, identity_version=None, **kwargs):
+    identity_version = identity_version or CONF.identity.auth_version
+    # In case of "v3" add the domain from config if not specified
+    if identity_version == 'v3':
+        domain_fields = set(x for x in auth.KeystoneV3Credentials.ATTRIBUTES
+                            if 'domain' in x)
+        if not domain_fields.intersection(kwargs.keys()):
+            kwargs['user_domain_name'] = CONF.identity.admin_domain_name
+        auth_url = CONF.identity.uri_v3
+    else:
+        auth_url = CONF.identity.uri
+    return auth.get_credentials(auth_url,
+                                fill_in=fill_in,
+                                identity_version=identity_version,
+                                **kwargs)
+
 
 @six.add_metaclass(abc.ABCMeta)
 class CredentialProvider(object):
-    def __init__(self, name, interface='json', password='pass',
-                 network_resources=None):
+    def __init__(self, name, password='pass', network_resources=None):
         self.name = name
 
     @abc.abstractmethod
diff --git a/tempest/common/credentials.py b/tempest/common/credentials.py
index 08b592f..6a4ee08c 100644
--- a/tempest/common/credentials.py
+++ b/tempest/common/credentials.py
@@ -12,6 +12,7 @@
 #    limitations under the License.
 
 from tempest.common import accounts
+from tempest.common import cred_provider
 from tempest.common import isolated_creds
 from tempest import config
 
@@ -37,3 +38,22 @@
             return accounts.Accounts(name=name)
         else:
             return accounts.NotLockingAccounts(name=name)
+
+
+# We want a helper function here to check and see if admin credentials
+# are available so we can do a single call from skip_checks if admin
+# creds area vailable.
+def is_admin_available():
+    is_admin = True
+    # In the case of a pre-provisioned account, if even if creds were
+    # configured, the admin credentials won't be available
+    if (CONF.auth.locking_credentials_provider and
+        not CONF.auth.allow_tenant_isolation):
+        is_admin = False
+    else:
+        try:
+            cred_provider.get_configured_credentials('identity_admin')
+        except NotImplementedError:
+            is_admin = False
+
+    return is_admin
diff --git a/tempest/common/isolated_creds.py b/tempest/common/isolated_creds.py
index a663931..3eed689 100644
--- a/tempest/common/isolated_creds.py
+++ b/tempest/common/isolated_creds.py
@@ -13,8 +13,8 @@
 #    under the License.
 
 import netaddr
+from tempest_lib import exceptions as lib_exc
 
-from tempest import auth
 from tempest import clients
 from tempest.common import cred_provider
 from tempest.common.utils import data_utils
@@ -28,15 +28,12 @@
 
 class IsolatedCreds(cred_provider.CredentialProvider):
 
-    def __init__(self, name, interface='json', password='pass',
-                 network_resources=None):
-        super(IsolatedCreds, self).__init__(name, interface, password,
-                                            network_resources)
+    def __init__(self, name, password='pass', network_resources=None):
+        super(IsolatedCreds, self).__init__(name, password, network_resources)
         self.network_resources = network_resources
         self.isolated_creds = {}
         self.isolated_net_resources = {}
         self.ports = []
-        self.interface = interface
         self.password = password
         self.identity_admin_client, self.network_admin_client = (
             self._get_admin_clients())
@@ -48,7 +45,7 @@
             identity
             network
         """
-        os = clients.AdminManager(interface=self.interface)
+        os = clients.AdminManager()
         return os.identity_client, os.network_client
 
     def _create_tenant(self, name, description):
@@ -81,7 +78,7 @@
             role = next(r for r in roles if r['name'] == role_name)
         except StopIteration:
             msg = 'No "%s" role found' % role_name
-            raise exceptions.NotFound(msg)
+            raise lib_exc.NotFound(msg)
         self.identity_admin_client.assign_user_role(tenant['id'], user['id'],
                                                     role['id'])
 
@@ -129,7 +126,7 @@
         return self._get_credentials(user, tenant)
 
     def _get_credentials(self, user, tenant):
-        return auth.get_credentials(
+        return cred_provider.get_credentials(
             username=user['name'], user_id=user['id'],
             tenant_name=tenant['name'], tenant_id=tenant['id'],
             password=self.password)
@@ -201,7 +198,7 @@
                                       tenant_id=tenant_id,
                                       ip_version=4)
                 break
-            except exceptions.BadRequest as e:
+            except lib_exc.BadRequest as e:
                 if 'overlaps with another subnet' not in str(e):
                     raise
         else:
@@ -282,7 +279,7 @@
         net_client = self.network_admin_client
         try:
             net_client.delete_router(router_id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             LOG.warn('router with name: %s not found for delete' %
                      router_name)
 
@@ -290,7 +287,7 @@
         net_client = self.network_admin_client
         try:
             net_client.delete_subnet(subnet_id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             LOG.warn('subnet with name: %s not found for delete' %
                      subnet_name)
 
@@ -298,7 +295,7 @@
         net_client = self.network_admin_client
         try:
             net_client.delete_network(network_id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             LOG.warn('network with name: %s not found for delete' %
                      network_name)
 
@@ -310,7 +307,7 @@
         for secgroup in secgroups_to_delete:
             try:
                 net_client.delete_security_group(secgroup['id'])
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 LOG.warn('Security group %s, id %s not found for clean-up' %
                          (secgroup['name'], secgroup['id']))
 
@@ -326,7 +323,7 @@
                 try:
                     net_client.remove_router_interface_with_subnet_id(
                         router['id'], subnet['id'])
-                except exceptions.NotFound:
+                except lib_exc.NotFound:
                     LOG.warn('router with name: %s not found for delete' %
                              router['name'])
                 self._clear_isolated_router(router['id'], router['name'])
@@ -336,6 +333,7 @@
             if (not self.network_resources or
                 self.network_resources.get('network')):
                 self._clear_isolated_network(network['id'], network['name'])
+        self.isolated_net_resources = {}
 
     def clear_isolated_creds(self):
         if not self.isolated_creds:
@@ -344,14 +342,15 @@
         for creds in self.isolated_creds.itervalues():
             try:
                 self._delete_user(creds.user_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 LOG.warn("user with name: %s not found for delete" %
                          creds.username)
             try:
                 self._delete_tenant(creds.tenant_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 LOG.warn("tenant with name: %s not found for delete" %
                          creds.tenant_name)
+        self.isolated_creds = {}
 
     def is_multi_user(self):
         return True
diff --git a/tempest/common/service_client.py b/tempest/common/service_client.py
index 69e25e2..8949609 100644
--- a/tempest/common/service_client.py
+++ b/tempest/common/service_client.py
@@ -16,7 +16,6 @@
 from tempest_lib import exceptions as lib_exceptions
 
 from tempest import config
-from tempest import exceptions
 
 CONF = config.CONF
 
@@ -59,22 +58,12 @@
                 method, url,
                 extra_headers=extra_headers,
                 headers=headers, body=body)
-        except lib_exceptions.Unauthorized as ex:
-            raise exceptions.Unauthorized(ex)
-        except lib_exceptions.NotFound as ex:
-            raise exceptions.NotFound(ex)
-        except lib_exceptions.BadRequest as ex:
-            raise exceptions.BadRequest(ex)
-        except lib_exceptions.Conflict as ex:
-            raise exceptions.Conflict(ex)
-        except lib_exceptions.OverLimit as ex:
-            raise exceptions.OverLimit(ex)
         # TODO(oomichi): This is just a workaround for failing gate tests
         # when separating Forbidden from Unauthorized in tempest-lib.
         # We will need to remove this translation and replace negative tests
         # with lib_exceptions.Forbidden in the future.
         except lib_exceptions.Forbidden as ex:
-            raise exceptions.Unauthorized(ex)
+            raise lib_exceptions.Unauthorized(ex)
 
 
 class ResponseBody(dict):
@@ -94,6 +83,18 @@
         return "response: %s\nBody: %s" % (self.response, body)
 
 
+class ResponseBodyData(object):
+    """Class that wraps an http response and string data into a single value.
+    """
+
+    def __init__(self, response, data):
+        self.response = response
+        self.data = data
+
+    def __str__(self):
+        return "response: %s\nBody: %s" % (self.response, self.data)
+
+
 class ResponseBodyList(list):
     """Class that wraps an http response and list body into a single value.
 
diff --git a/tempest/common/waiters.py b/tempest/common/waiters.py
index c77c81e..9b11676 100644
--- a/tempest/common/waiters.py
+++ b/tempest/common/waiters.py
@@ -32,7 +32,7 @@
 
     # NOTE(afazekas): UNKNOWN status possible on ERROR
     # or in a very early stage.
-    resp, body = client.get_server(server_id)
+    body = client.get_server(server_id)
     old_status = server_status = body['status']
     old_task_state = task_state = _get_task_state(body)
     start_time = int(time.time())
@@ -59,7 +59,7 @@
                 return
 
         time.sleep(client.build_interval)
-        resp, body = client.get_server(server_id)
+        body = client.get_server(server_id)
         server_status = body['status']
         task_state = _get_task_state(body)
         if (server_status != old_status) or (task_state != old_task_state):
diff --git a/tempest/config.py b/tempest/config.py
index c60434a..4588b20 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -455,7 +455,13 @@
     cfg.ListOpt('dns_servers',
                 default=["8.8.8.8", "8.8.4.4"],
                 help="List of dns servers which should be used"
-                     " for subnet creation")
+                     " for subnet creation"),
+    cfg.StrOpt('port_vnic_type',
+               choices=[None, 'normal', 'direct', 'macvtap'],
+               help="vnic_type to use when Launching instances"
+                    " with pre-configured ports."
+                    " Supported ports are:"
+                    " ['normal','direct','macvtap']"),
 ]
 
 network_feature_group = cfg.OptGroup(name='network-feature-enabled',
diff --git a/tempest/exceptions.py b/tempest/exceptions.py
index 7ddeeff..09f7016 100644
--- a/tempest/exceptions.py
+++ b/tempest/exceptions.py
@@ -63,6 +63,10 @@
     message = "Invalid service tag"
 
 
+class InvalidIdentityVersion(TempestException):
+    message = "Invalid version %(identity_version) of the identity service"
+
+
 class TimeoutException(TempestException):
     message = "Request timed out"
 
@@ -151,26 +155,10 @@
     message = "The success code is different than the expected one"
 
 
-class NotFound(RestClientException):
-    message = "Object not found"
-
-
-class Unauthorized(RestClientException):
-    message = 'Unauthorized'
-
-
 class BadRequest(RestClientException):
     message = "Bad request"
 
 
-class OverLimit(RestClientException):
-    message = "Quota exceeded"
-
-
-class Conflict(RestClientException):
-    message = "An object with that identifier already exists"
-
-
 class ResponseWithNonEmptyBody(RFCViolation):
     message = ("RFC Violation! Response with %(status)d HTTP Status Code "
                "MUST NOT have a body")
diff --git a/tempest/manager.py b/tempest/manager.py
index 538b619..50f7e6e 100644
--- a/tempest/manager.py
+++ b/tempest/manager.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 from tempest import auth
+from tempest.common import cred_provider
 from tempest import config
 from tempest import exceptions
 
@@ -39,7 +40,7 @@
         """
         self.auth_version = CONF.identity.auth_version
         if credentials is None:
-            self.credentials = auth.get_default_credentials('user')
+            self.credentials = cred_provider.get_configured_credentials('user')
         else:
             self.credentials = credentials
         # Check if passed or default credentials are valid
@@ -53,15 +54,14 @@
     @classmethod
     def get_auth_provider_class(cls, credentials):
         if isinstance(credentials, auth.KeystoneV3Credentials):
-            return auth.KeystoneV3AuthProvider
+            return auth.KeystoneV3AuthProvider, CONF.identity.uri_v3
         else:
-            return auth.KeystoneV2AuthProvider
+            return auth.KeystoneV2AuthProvider, CONF.identity.uri
 
     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(credentials)
-        return auth_provider_class(
-            interface=getattr(self, 'interface', None),
-            credentials=credentials)
+        auth_provider_class, auth_url = self.get_auth_provider_class(
+            credentials)
+        return auth_provider_class(credentials, auth_url)
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 8e9f3ea..eb7265f 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -19,9 +19,10 @@
 
 import netaddr
 import six
+from tempest_lib import exceptions as lib_exc
 
-from tempest import auth
 from tempest import clients
+from tempest.common import cred_provider
 from tempest.common import credentials
 from tempest.common.utils import data_utils
 from tempest.common.utils.linux import remote_client
@@ -110,7 +111,7 @@
             # Tempest clients return dicts, so there is no common delete
             # method available. Using a callable instead
             delete_thing(*args, **kwargs)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             # If the resource is already missing, mission accomplished.
             pass
 
@@ -186,8 +187,8 @@
 
         LOG.debug("Creating a server (name: %s, image: %s, flavor: %s)",
                   name, image, flavor)
-        _, server = self.servers_client.create_server(name, image, flavor,
-                                                      **create_kwargs)
+        server = self.servers_client.create_server(name, image, flavor,
+                                                   **create_kwargs)
         if wait_on_delete:
             self.addCleanup(self.servers_client.wait_for_server_termination,
                             server['id'])
@@ -202,7 +203,7 @@
         # The instance retrieved on creation is missing network
         # details, necessitating retrieval after it becomes active to
         # ensure correct details.
-        _, server = self.servers_client.get_server(server['id'])
+        server = self.servers_client.get_server(server['id'])
         self.assertEqual(server['name'], name)
         return server
 
@@ -512,7 +513,7 @@
         Nova clients
         """
 
-        _, floating_ip = self.floating_ips_client.create_floating_ip(pool_name)
+        floating_ip = self.floating_ips_client.create_floating_ip(pool_name)
         self.addCleanup(self.delete_wrapper,
                         self.floating_ips_client.delete_floating_ip,
                         floating_ip['id'])
@@ -628,7 +629,7 @@
             try:
                 result = client.create_subnet(**subnet)
                 break
-            except exceptions.Conflict as e:
+            except lib_exc.Conflict as e:
                 is_overlapping_cidr = 'overlaps with another subnet' in str(e)
                 if not is_overlapping_cidr:
                     raise
@@ -639,14 +640,15 @@
         self.addCleanup(self.delete_wrapper, subnet.delete)
         return subnet
 
-    def _create_port(self, network, client=None, namestart='port-quotatest'):
+    def _create_port(self, network_id, client=None, namestart='port-quotatest',
+                     **kwargs):
         if not client:
             client = self.network_client
         name = data_utils.rand_name(namestart)
         result = client.create_port(
             name=name,
-            network_id=network.id,
-            tenant_id=network.tenant_id)
+            network_id=network_id,
+            **kwargs)
         self.assertIsNotNone(result, 'Unable to allocate port')
         port = net_resources.DeletablePort(client=client,
                                            **result['port'])
@@ -915,7 +917,7 @@
                 try:
                     sg_rule = self._create_security_group_rule(
                         client=client, secgroup=secgroup, **ruleset)
-                except exceptions.Conflict as ex:
+                except lib_exc.Conflict as ex:
                     # if rule already exist - skip rule and continue
                     msg = 'Security group rule already exists'
                     if msg not in ex._error_string:
@@ -1047,6 +1049,66 @@
             subnet.add_to_router(router.id)
         return network, subnet, router
 
+    def create_server(self, name=None, image=None, flavor=None,
+                      wait_on_boot=True, wait_on_delete=True,
+                      create_kwargs=None):
+        vnic_type = CONF.network.port_vnic_type
+
+        # If vnic_type is configured create port for
+        # every network
+        if vnic_type:
+            ports = []
+            networks = []
+            create_port_body = {'binding:vnic_type': vnic_type,
+                                'namestart': 'port-smoke'}
+            if create_kwargs:
+                net_client = create_kwargs.get("network_client",
+                                               self.network_client)
+
+                # Convert security group names to security group ids
+                # to pass to create_port
+                if create_kwargs.get('security_groups'):
+                    security_groups = net_client.list_security_groups().get(
+                        'security_groups')
+                    sec_dict = dict([(s['name'], s['id'])
+                                    for s in security_groups])
+
+                    sec_groups_names = [s['name'] for s in create_kwargs[
+                        'security_groups']]
+                    security_groups_ids = [sec_dict[s]
+                                           for s in sec_groups_names]
+
+                    if security_groups_ids:
+                        create_port_body[
+                            'security_groups'] = security_groups_ids
+                networks = create_kwargs.get('networks')
+            else:
+                net_client = self.network_client
+            # If there are no networks passed to us we look up
+            # for the tenant's private networks and create a port
+            # if there is only one private network. The same behaviour
+            # as we would expect when passing the call to the clients
+            # with no networks
+            if not networks:
+                networks = net_client.list_networks(filters={
+                    'router:external': False})
+                self.assertEqual(1, len(networks),
+                                 "There is more than one"
+                                 " network for the tenant")
+            for net in networks:
+                net_id = net['uuid']
+                port = self._create_port(network_id=net_id,
+                                         client=net_client,
+                                         **create_port_body)
+                ports.append({'port': port.id})
+            if ports:
+                create_kwargs['networks'] = ports
+
+        return super(NetworkScenarioTest, self).create_server(
+            name=name, image=image, flavor=flavor,
+            wait_on_boot=wait_on_boot, wait_on_delete=wait_on_delete,
+            create_kwargs=create_kwargs)
+
 
 # power/provision states as of icehouse
 class BaremetalPowerStates(object):
@@ -1124,7 +1186,7 @@
             node = None
             try:
                 node = self.get_node(instance_id=instance_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
             return node is not None
 
@@ -1187,7 +1249,7 @@
         self.servers_client.wait_for_server_status(self.instance['id'],
                                                    'ACTIVE')
         self.node = self.get_node(instance_id=self.instance['id'])
-        _, self.instance = self.servers_client.get_server(self.instance['id'])
+        self.instance = self.servers_client.get_server(self.instance['id'])
 
     def terminate_instance(self):
         self.servers_client.delete_server(self.instance['id'])
@@ -1259,8 +1321,9 @@
 
     @classmethod
     def credentials(cls):
-        admin_creds = auth.get_default_credentials('identity_admin')
-        creds = auth.get_default_credentials('user')
+        admin_creds = cred_provider.get_configured_credentials(
+            'identity_admin')
+        creds = cred_provider.get_configured_credentials('user')
         admin_creds.tenant_name = creds.tenant_name
         return admin_creds
 
diff --git a/tempest/scenario/orchestration/test_server_cfn_init.py b/tempest/scenario/orchestration/test_server_cfn_init.py
index 6052e0b..9c38d2f 100644
--- a/tempest/scenario/orchestration/test_server_cfn_init.py
+++ b/tempest/scenario/orchestration/test_server_cfn_init.py
@@ -81,7 +81,7 @@
 
         server_resource = self.client.get_resource(sid, 'SmokeServer')
         server_id = server_resource['physical_resource_id']
-        _, server = self.servers_client.get_server(server_id)
+        server = self.servers_client.get_server(server_id)
         server_ip =\
             server['addresses'][CONF.compute.network_for_ssh][0]['addr']
 
diff --git a/tempest/scenario/test_baremetal_basic_ops.py b/tempest/scenario/test_baremetal_basic_ops.py
index fd4449a..fe49dc1 100644
--- a/tempest/scenario/test_baremetal_basic_ops.py
+++ b/tempest/scenario/test_baremetal_basic_ops.py
@@ -104,7 +104,7 @@
         return int(ephemeral)
 
     def add_floating_ip(self):
-        _, floating_ip = self.floating_ips_client.create_floating_ip()
+        floating_ip = self.floating_ips_client.create_floating_ip()
         self.floating_ips_client.associate_floating_ip_to_server(
             floating_ip['ip'], self.instance['id'])
         return floating_ip['ip']
diff --git a/tempest/scenario/test_large_ops.py b/tempest/scenario/test_large_ops.py
index 99a2023..ac766ea 100644
--- a/tempest/scenario/test_large_ops.py
+++ b/tempest/scenario/test_large_ops.py
@@ -12,7 +12,7 @@
 #    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_lib import exceptions
+from tempest_lib import exceptions as lib_exc
 
 from tempest.common.utils import data_utils
 from tempest import config
@@ -54,7 +54,7 @@
             function, args, kwargs = cls._cleanup_resources.pop(-1)
             try:
                 function(*args, **kwargs)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
         super(TestLargeOpsScenario, cls).resource_cleanup()
 
diff --git a/tempest/scenario/test_load_balancer_basic.py b/tempest/scenario/test_load_balancer_basic.py
index 57a5406..426ada3 100644
--- a/tempest/scenario/test_load_balancer_basic.py
+++ b/tempest/scenario/test_load_balancer_basic.py
@@ -161,7 +161,7 @@
         """
         for server_id, ip in self.server_ips.iteritems():
             private_key = self.servers_keypairs[server_id]['private_key']
-            server_name = self.servers_client.get_server(server_id)[1]['name']
+            server_name = self.servers_client.get_server(server_id)['name']
             username = config.scenario.ssh_user
             ssh_client = self.get_remote_client(
                 server_or_ip=ip,
@@ -185,7 +185,7 @@
 
             # Start netcat
             start_server = ('while true; do '
-                            'sudo nc -l -p %(port)s -e sh /tmp/%(script)s; '
+                            'sudo nc -ll -p %(port)s -e sh /tmp/%(script)s; '
                             'done &')
             cmd = start_server % {'port': self.port1,
                                   'script': 'script1'}
diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py
index 4624038..f13ff0f 100644
--- a/tempest/scenario/test_minimum_basic.py
+++ b/tempest/scenario/test_minimum_basic.py
@@ -59,7 +59,7 @@
         self.assertIn(self.server['id'], [x['id'] for x in servers])
 
     def nova_show(self):
-        _, got_server = self.servers_client.get_server(self.server['id'])
+        got_server = self.servers_client.get_server(self.server['id'])
         self.assertThat(
             self.server, custom_matchers.MatchesDictExceptForKeys(
                 got_server, excluded_keys=['OS-EXT-AZ:availability_zone']))
@@ -109,7 +109,7 @@
                         self.server['id'], secgroup['name'])
 
         def wait_for_secgroup_add():
-            _, body = self.servers_client.get_server(self.server['id'])
+            body = self.servers_client.get_server(self.server['id'])
             return {'name': secgroup['name']} in body['security_groups']
 
         if not test.call_until_true(wait_for_secgroup_add,
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index 0251b60..a7d28bb 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -243,7 +243,7 @@
         def check_ports():
             self.new_port_list = [port for port in
                                   self._list_ports(device_id=server['id'])
-                                  if port != old_port]
+                                  if port['id'] != old_port['id']]
             return len(self.new_port_list) == 1
 
         if not test.call_until_true(check_ports, CONF.network.build_timeout,
@@ -381,6 +381,9 @@
 
     @testtools.skipUnless(CONF.compute_feature_enabled.interface_attach,
                           'NIC hotplug not available')
+    @testtools.skipIf(CONF.network.port_vnic_type in ['direct', 'macvtap'],
+                      'NIC hotplug not supported for '
+                      'vnic_type direct or macvtap')
     @test.attr(type='smoke')
     @test.services('compute', 'network')
     def test_hotplug_nic(self):
@@ -511,6 +514,9 @@
                         msg="DHCP renewal failed to fetch "
                             "new DNS nameservers")
 
+    @testtools.skipIf(CONF.baremetal.driver_enabled,
+                      'admin_state of instance ports cannot be altered '
+                      'for baremetal nodes')
     @test.attr(type='smoke')
     @test.services('compute', 'network')
     def test_update_instance_port_admin_state(self):
diff --git a/tempest/scenario/test_security_groups_basic_ops.py b/tempest/scenario/test_security_groups_basic_ops.py
index 83739fd..394aed0 100644
--- a/tempest/scenario/test_security_groups_basic_ops.py
+++ b/tempest/scenario/test_security_groups_basic_ops.py
@@ -76,6 +76,8 @@
            * test that traffic is blocked with default security group
            * test that traffic is enabled after updating port with new security
            group having appropriate rule
+        8. _test_multiple_security_groups: test multiple security groups can be
+           associated with the vm
 
     assumptions:
         1. alt_tenant/user existed and is different from primary_tenant/user
@@ -238,7 +240,8 @@
             ],
             'key_name': tenant.keypair['name'],
             'security_groups': security_groups_names,
-            'tenant_id': tenant.creds.tenant_id
+            'tenant_id': tenant.creds.tenant_id,
+            'network_client': tenant.manager.network_client
         }
         server = self.create_server(name=name, create_kwargs=create_kwargs)
         self.assertEqual(
@@ -511,3 +514,37 @@
             for tenant in self.tenants.values():
                 self._log_console_output(servers=tenant.servers)
             raise
+
+    @test.attr(type='smoke')
+    @test.services('compute', 'network')
+    def test_multiple_security_groups(self):
+        """
+        This test verifies multiple security groups and checks that rules
+        provided in the both the groups is applied onto VM
+        """
+        tenant = self.primary_tenant
+        ip = self._get_server_ip(tenant.access_point,
+                                 floating=self.floating_ip_access)
+        ssh_login = CONF.compute.image_ssh_user
+        private_key = tenant.keypair['private_key']
+        self.check_vm_connectivity(ip,
+                                   should_connect=False)
+        ruleset = dict(
+            protocol='icmp',
+            direction='ingress'
+        )
+        self._create_security_group_rule(
+            secgroup=tenant.security_groups['default'],
+            **ruleset
+        )
+        """
+        Vm now has 2 security groups one with ssh rule(
+        already added in setUp() method),and other with icmp rule
+        (added in the above step).The check_vm_connectivity tests
+        -that vm ping test is successful
+        -ssh to vm is successful
+        """
+        self.check_vm_connectivity(ip,
+                                   username=ssh_login,
+                                   private_key=private_key,
+                                   should_connect=True)
diff --git a/tempest/scenario/test_server_advanced_ops.py b/tempest/scenario/test_server_advanced_ops.py
index d10fcce..0e0e174 100644
--- a/tempest/scenario/test_server_advanced_ops.py
+++ b/tempest/scenario/test_server_advanced_ops.py
@@ -74,19 +74,19 @@
         self.servers_client.suspend_server(instance_id)
         self.servers_client.wait_for_server_status(instance_id,
                                                    'SUSPENDED')
-        _, fetched_instance = self.servers_client.get_server(instance_id)
+        fetched_instance = self.servers_client.get_server(instance_id)
         LOG.debug("Resuming instance %s. Current status: %s",
                   instance_id, fetched_instance['status'])
         self.servers_client.resume_server(instance_id)
         self.servers_client.wait_for_server_status(instance_id,
                                                    'ACTIVE')
-        _, fetched_instance = self.servers_client.get_server(instance_id)
+        fetched_instance = self.servers_client.get_server(instance_id)
         LOG.debug("Suspending instance %s. Current status: %s",
                   instance_id, fetched_instance['status'])
         self.servers_client.suspend_server(instance_id)
         self.servers_client.wait_for_server_status(instance_id,
                                                    'SUSPENDED')
-        _, fetched_instance = self.servers_client.get_server(instance_id)
+        fetched_instance = self.servers_client.get_server(instance_id)
         LOG.debug("Resuming instance %s. Current status: %s",
                   instance_id, fetched_instance['status'])
         self.servers_client.resume_server(instance_id)
diff --git a/tempest/scenario/test_server_basic_ops.py b/tempest/scenario/test_server_basic_ops.py
index 23743c5..509ce60 100644
--- a/tempest/scenario/test_server_basic_ops.py
+++ b/tempest/scenario/test_server_basic_ops.py
@@ -80,7 +80,7 @@
     def verify_ssh(self):
         if self.run_ssh:
             # Obtain a floating IP
-            _, floating_ip = self.floating_ips_client.create_floating_ip()
+            floating_ip = self.floating_ips_client.create_floating_ip()
             self.addCleanup(self.delete_wrapper,
                             self.floating_ips_client.delete_floating_ip,
                             floating_ip['id'])
diff --git a/tempest/scenario/test_shelve_instance.py b/tempest/scenario/test_shelve_instance.py
index 8882177..5ba650d 100644
--- a/tempest/scenario/test_shelve_instance.py
+++ b/tempest/scenario/test_shelve_instance.py
@@ -77,7 +77,7 @@
                                     create_kwargs=create_kwargs)
 
         if CONF.compute.use_floatingip_for_ssh:
-            _, floating_ip = self.floating_ips_client.create_floating_ip()
+            floating_ip = self.floating_ips_client.create_floating_ip()
             self.addCleanup(self.delete_wrapper,
                             self.floating_ips_client.delete_floating_ip,
                             floating_ip['id'])
diff --git a/tempest/scenario/test_stamp_pattern.py b/tempest/scenario/test_stamp_pattern.py
index 9efd55b..e97f089 100644
--- a/tempest/scenario/test_stamp_pattern.py
+++ b/tempest/scenario/test_stamp_pattern.py
@@ -16,6 +16,7 @@
 import time
 
 from tempest_lib import decorators
+from tempest_lib import exceptions as lib_exc
 import testtools
 
 from tempest.common.utils import data_utils
@@ -85,7 +86,7 @@
             try:
                 while self.snapshots_client.get_snapshot(snapshot['id']):
                     time.sleep(1)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
         self.addCleanup(cleaner)
         self._wait_for_volume_status(volume, 'available')
diff --git a/tempest/scenario/test_volume_boot_pattern.py b/tempest/scenario/test_volume_boot_pattern.py
index c8f438e..21a399c 100644
--- a/tempest/scenario/test_volume_boot_pattern.py
+++ b/tempest/scenario/test_volume_boot_pattern.py
@@ -101,7 +101,7 @@
 
     def _ssh_to_server(self, server, keypair):
         if CONF.compute.use_floatingip_for_ssh:
-            _, floating_ip = self.floating_ips_client.create_floating_ip()
+            floating_ip = self.floating_ips_client.create_floating_ip()
             self.addCleanup(self.delete_wrapper,
                             self.floating_ips_client.delete_floating_ip,
                             floating_ip['id'])
diff --git a/tempest/scenario/utils.py b/tempest/scenario/utils.py
index f997a65..68ec6e7 100644
--- a/tempest/scenario/utils.py
+++ b/tempest/scenario/utils.py
@@ -21,8 +21,8 @@
 import testscenarios
 import testtools
 
-from tempest import auth
 from tempest import clients
+from tempest.common import cred_provider
 from tempest.common.utils import misc
 from tempest import config
 from tempest import exceptions
@@ -101,7 +101,7 @@
 
     def __init__(self):
         os = clients.Manager(
-            auth.get_default_credentials('user', fill_in=False))
+            cred_provider.get_configured_credentials('user', fill_in=False))
         self.images_client = os.images_client
         self.flavors_client = os.flavors_client
         self.image_pattern = CONF.input_scenario.image_regex
@@ -120,12 +120,15 @@
         if not CONF.service_available.glance:
             return []
         if not hasattr(self, '_scenario_images'):
-            images = self.images_client.list_images()
-            self._scenario_images = [
-                (self._normalize_name(i['name']), dict(image_ref=i['id']))
-                for i in images if re.search(self.image_pattern,
-                                             str(i['name']))
-            ]
+            try:
+                images = self.images_client.list_images()
+                self._scenario_images = [
+                    (self._normalize_name(i['name']), dict(image_ref=i['id']))
+                    for i in images if re.search(self.image_pattern,
+                                                 str(i['name']))
+                ]
+            except Exception:
+                self._scenario_images = []
         return self._scenario_images
 
     @property
@@ -134,12 +137,15 @@
         :return: a scenario with name and uuid of flavors
         """
         if not hasattr(self, '_scenario_flavors'):
-            flavors = self.flavors_client.list_flavors()
-            self._scenario_flavors = [
-                (self._normalize_name(f['name']), dict(flavor_ref=f['id']))
-                for f in flavors if re.search(self.flavor_pattern,
-                                              str(f['name']))
-            ]
+            try:
+                flavors = self.flavors_client.list_flavors()
+                self._scenario_flavors = [
+                    (self._normalize_name(f['name']), dict(flavor_ref=f['id']))
+                    for f in flavors if re.search(self.flavor_pattern,
+                                                  str(f['name']))
+                ]
+            except Exception:
+                self._scenario_flavors = []
         return self._scenario_flavors
 
 
diff --git a/tempest/services/baremetal/v1/json/baremetal_client.py b/tempest/services/baremetal/v1/json/baremetal_client.py
index 1c72a2b..09b6cd1 100644
--- a/tempest/services/baremetal/v1/json/baremetal_client.py
+++ b/tempest/services/baremetal/v1/json/baremetal_client.py
@@ -136,18 +136,18 @@
         Create a baremetal node with the specified parameters.
 
         :param cpu_arch: CPU architecture of the node. Default: x86_64.
-        :param cpu_num: Number of CPUs. Default: 8.
-        :param storage: Disk size. Default: 1024.
-        :param memory: Available RAM. Default: 4096.
+        :param cpus: Number of CPUs. Default: 8.
+        :param local_gb: Disk size. Default: 1024.
+        :param memory_mb: Available RAM. Default: 4096.
         :param driver: Driver name. Default: "fake"
         :return: A tuple with the server response and the created node.
 
         """
         node = {'chassis_uuid': chassis_id,
                 'properties': {'cpu_arch': kwargs.get('cpu_arch', 'x86_64'),
-                               'cpu_num': kwargs.get('cpu_num', 8),
-                               'storage': kwargs.get('storage', 1024),
-                               'memory': kwargs.get('memory', 4096)},
+                               'cpus': kwargs.get('cpus', 8),
+                               'local_gb': kwargs.get('local_gb', 1024),
+                               'memory_mb': kwargs.get('memory_mb', 4096)},
                 'driver': kwargs.get('driver', 'fake')}
 
         return self._create_request('nodes', node)
@@ -232,9 +232,9 @@
 
         """
         node_attributes = ('properties/cpu_arch',
-                           'properties/cpu_num',
-                           'properties/storage',
-                           'properties/memory',
+                           'properties/cpus',
+                           'properties/local_gb',
+                           'properties/memory_mb',
                            'driver',
                            'instance_uuid')
 
diff --git a/tempest/services/botoclients.py b/tempest/services/botoclients.py
index f581e89..50d0779 100644
--- a/tempest/services/botoclients.py
+++ b/tempest/services/botoclients.py
@@ -15,6 +15,7 @@
 
 import ConfigParser
 import contextlib
+from tempest_lib import exceptions as lib_exc
 import types
 import urlparse
 
@@ -65,7 +66,7 @@
             ec2_cred = keystone.ec2.create(keystone.auth_user_id,
                                            keystone.auth_tenant_id)
         if not all((ec2_cred, ec2_cred.access, ec2_cred.secret)):
-            raise exceptions.NotFound("Unable to get access and secret keys")
+            raise lib_exc.NotFound("Unable to get access and secret keys")
         return ec2_cred
 
     def _config_boto_timeout(self, timeout, retries):
diff --git a/tempest/services/compute/json/aggregates_client.py b/tempest/services/compute/json/aggregates_client.py
index 94ea713..10955fd 100644
--- a/tempest/services/compute/json/aggregates_client.py
+++ b/tempest/services/compute/json/aggregates_client.py
@@ -15,10 +15,11 @@
 
 import json
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api_schema.response.compute import aggregates as schema
 from tempest.api_schema.response.compute.v2 import aggregates as v2_schema
 from tempest.common import service_client
-from tempest import exceptions
 
 
 class AggregatesClientJSON(service_client.ServiceClient):
@@ -68,7 +69,7 @@
     def is_resource_deleted(self, id):
         try:
             self.get_aggregate(id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
diff --git a/tempest/services/compute/json/availability_zone_client.py b/tempest/services/compute/json/availability_zone_client.py
index e37c9d9..343c412 100644
--- a/tempest/services/compute/json/availability_zone_client.py
+++ b/tempest/services/compute/json/availability_zone_client.py
@@ -25,11 +25,13 @@
         resp, body = self.get('os-availability-zone')
         body = json.loads(body)
         self.validate_response(schema.get_availability_zone_list, resp, body)
-        return resp, body['availabilityZoneInfo']
+        return service_client.ResponseBodyList(resp,
+                                               body['availabilityZoneInfo'])
 
     def get_availability_zone_list_detail(self):
         resp, body = self.get('os-availability-zone/detail')
         body = json.loads(body)
         self.validate_response(schema.get_availability_zone_list_detail, resp,
                                body)
-        return resp, body['availabilityZoneInfo']
+        return service_client.ResponseBodyList(resp,
+                                               body['availabilityZoneInfo'])
diff --git a/tempest/services/compute/json/baremetal_nodes_client.py b/tempest/services/compute/json/baremetal_nodes_client.py
new file mode 100644
index 0000000..d8bbadd
--- /dev/null
+++ b/tempest/services/compute/json/baremetal_nodes_client.py
@@ -0,0 +1,43 @@
+# Copyright 2015 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 json
+import urllib
+
+from tempest.api_schema.response.compute import baremetal_nodes as schema
+from tempest.common import service_client
+
+
+class BaremetalNodesClientJSON(service_client.ServiceClient):
+    """
+    Tests Baremetal API
+    """
+
+    def list_baremetal_nodes(self, params=None):
+        """List all baremetal nodes."""
+        url = 'os-baremetal-nodes'
+        if params:
+            url += '?%s' % urllib.urlencode(params)
+        resp, body = self.get(url)
+        body = json.loads(body)
+        self.validate_response(schema.list_baremetal_nodes, resp, body)
+        return service_client.ResponseBodyList(resp, body['nodes'])
+
+    def get_baremetal_node(self, baremetal_node_id):
+        """Returns the details of a single baremetal node."""
+        url = 'os-baremetal-nodes/%s' % baremetal_node_id
+        resp, body = self.get(url)
+        body = json.loads(body)
+        self.validate_response(schema.get_baremetal_node, resp, body)
+        return service_client.ResponseBody(resp, body['node'])
diff --git a/tempest/services/compute/json/certificates_client.py b/tempest/services/compute/json/certificates_client.py
index b705c37..4a30f1e 100644
--- a/tempest/services/compute/json/certificates_client.py
+++ b/tempest/services/compute/json/certificates_client.py
@@ -27,7 +27,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.get_certificate, resp, body)
-        return resp, body['certificate']
+        return service_client.ResponseBody(resp, body['certificate'])
 
     def create_certificate(self):
         """create certificates."""
@@ -35,4 +35,4 @@
         resp, body = self.post(url, None)
         body = json.loads(body)
         self.validate_response(v2schema.create_certificate, resp, body)
-        return resp, body['certificate']
+        return service_client.ResponseBody(resp, body['certificate'])
diff --git a/tempest/services/compute/json/extensions_client.py b/tempest/services/compute/json/extensions_client.py
index d3148b4..09561b3 100644
--- a/tempest/services/compute/json/extensions_client.py
+++ b/tempest/services/compute/json/extensions_client.py
@@ -26,14 +26,14 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.list_extensions, resp, body)
-        return resp, body['extensions']
+        return service_client.ResponseBodyList(resp, body['extensions'])
 
     def is_enabled(self, extension):
-        _, extensions = self.list_extensions()
+        extensions = self.list_extensions()
         exts = extensions['extensions']
         return any([e for e in exts if e['name'] == extension])
 
     def get_extension(self, extension_alias):
         resp, body = self.get('extensions/%s' % extension_alias)
         body = json.loads(body)
-        return resp, body['extension']
+        return service_client.ResponseBody(resp, body['extension'])
diff --git a/tempest/services/compute/json/fixed_ips_client.py b/tempest/services/compute/json/fixed_ips_client.py
index 5797c16..31cf5b2 100644
--- a/tempest/services/compute/json/fixed_ips_client.py
+++ b/tempest/services/compute/json/fixed_ips_client.py
@@ -26,11 +26,11 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.fixed_ips, resp, body)
-        return resp, body['fixed_ip']
+        return service_client.ResponseBody(resp, body['fixed_ip'])
 
     def reserve_fixed_ip(self, ip, body):
         """This reserves and unreserves fixed ips."""
         url = "os-fixed-ips/%s/action" % (ip)
         resp, body = self.post(url, json.dumps(body))
         self.validate_response(schema.fixed_ip_action, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp)
diff --git a/tempest/services/compute/json/floating_ips_client.py b/tempest/services/compute/json/floating_ips_client.py
index 9c586e3..0354ba4 100644
--- a/tempest/services/compute/json/floating_ips_client.py
+++ b/tempest/services/compute/json/floating_ips_client.py
@@ -16,9 +16,10 @@
 import json
 import urllib
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api_schema.response.compute.v2 import floating_ips as schema
 from tempest.common import service_client
-from tempest import exceptions
 
 
 class FloatingIPsClientJSON(service_client.ServiceClient):
@@ -32,17 +33,15 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.list_floating_ips, resp, body)
-        return resp, body['floating_ips']
+        return service_client.ResponseBodyList(resp, body['floating_ips'])
 
     def get_floating_ip_details(self, floating_ip_id):
         """Get the details of a floating IP."""
         url = "os-floating-ips/%s" % str(floating_ip_id)
         resp, body = self.get(url)
         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']
+        return service_client.ResponseBody(resp, body['floating_ip'])
 
     def create_floating_ip(self, pool_name=None):
         """Allocate a floating IP to the project."""
@@ -52,14 +51,14 @@
         resp, body = self.post(url, post_body)
         body = json.loads(body)
         self.validate_response(schema.floating_ip, resp, body)
-        return resp, body['floating_ip']
+        return service_client.ResponseBody(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
+        return service_client.ResponseBody(resp, body)
 
     def associate_floating_ip_to_server(self, floating_ip, server_id):
         """Associate the provided floating IP to a specific server."""
@@ -73,7 +72,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
+        return service_client.ResponseBody(resp, body)
 
     def disassociate_floating_ip_from_server(self, floating_ip, server_id):
         """Disassociate the provided floating IP from a specific server."""
@@ -87,12 +86,12 @@
         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
+        return service_client.ResponseBody(resp, body)
 
     def is_resource_deleted(self, id):
         try:
             self.get_floating_ip_details(id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
@@ -110,7 +109,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.floating_ip_pools, resp, body)
-        return resp, body['floating_ip_pools']
+        return service_client.ResponseBodyList(resp, body['floating_ip_pools'])
 
     def create_floating_ips_bulk(self, ip_range, pool, interface):
         """Allocate floating IPs in bulk."""
@@ -123,14 +122,15 @@
         resp, body = self.post('os-floating-ips-bulk', post_body)
         body = json.loads(body)
         self.validate_response(schema.create_floating_ips_bulk, resp, body)
-        return resp, body['floating_ips_bulk_create']
+        return service_client.ResponseBody(resp,
+                                           body['floating_ips_bulk_create'])
 
     def list_floating_ips_bulk(self):
         """Returns a list of all floating IPs bulk."""
         resp, body = self.get('os-floating-ips-bulk')
         body = json.loads(body)
         self.validate_response(schema.list_floating_ips_bulk, resp, body)
-        return resp, body['floating_ip_info']
+        return service_client.ResponseBodyList(resp, body['floating_ip_info'])
 
     def delete_floating_ips_bulk(self, ip_range):
         """Deletes the provided floating IPs bulk."""
@@ -138,4 +138,5 @@
         resp, body = self.put('os-floating-ips-bulk/delete', post_body)
         body = json.loads(body)
         self.validate_response(schema.delete_floating_ips_bulk, resp, body)
-        return resp, body['floating_ips_bulk_delete']
+        data = body['floating_ips_bulk_delete']
+        return service_client.ResponseBodyData(resp, data)
diff --git a/tempest/services/compute/json/images_client.py b/tempest/services/compute/json/images_client.py
index a5755da..0ceb6d1 100644
--- a/tempest/services/compute/json/images_client.py
+++ b/tempest/services/compute/json/images_client.py
@@ -16,10 +16,11 @@
 import json
 import urllib
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api_schema.response.compute.v2 import images as schema
 from tempest.common import service_client
 from tempest.common import waiters
-from tempest import exceptions
 
 
 class ImagesClientJSON(service_client.ServiceClient):
@@ -131,7 +132,7 @@
     def is_resource_deleted(self, id):
         try:
             self.get_image(id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
diff --git a/tempest/services/compute/json/instance_usage_audit_log_client.py b/tempest/services/compute/json/instance_usage_audit_log_client.py
index 80d7334..551d751 100644
--- a/tempest/services/compute/json/instance_usage_audit_log_client.py
+++ b/tempest/services/compute/json/instance_usage_audit_log_client.py
@@ -28,11 +28,13 @@
         body = json.loads(body)
         self.validate_response(schema.list_instance_usage_audit_log,
                                resp, body)
-        return resp, body["instance_usage_audit_logs"]
+        return service_client.ResponseBody(resp,
+                                           body["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)
         body = json.loads(body)
         self.validate_response(schema.get_instance_usage_audit_log, resp, body)
-        return resp, body["instance_usage_audit_log"]
+        return service_client.ResponseBody(resp,
+                                           body["instance_usage_audit_log"])
diff --git a/tempest/services/compute/json/migrations_client.py b/tempest/services/compute/json/migrations_client.py
index b41abc8..a65b655 100644
--- a/tempest/services/compute/json/migrations_client.py
+++ b/tempest/services/compute/json/migrations_client.py
@@ -31,4 +31,4 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.list_migrations, resp, body)
-        return resp, body['migrations']
+        return service_client.ResponseBodyList(resp, body['migrations'])
diff --git a/tempest/services/compute/json/security_groups_client.py b/tempest/services/compute/json/security_groups_client.py
index 410ad60..5aefa7b 100644
--- a/tempest/services/compute/json/security_groups_client.py
+++ b/tempest/services/compute/json/security_groups_client.py
@@ -16,9 +16,10 @@
 import json
 import urllib
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api_schema.response.compute.v2 import security_groups as schema
 from tempest.common import service_client
-from tempest import exceptions
 
 
 class SecurityGroupsClientJSON(service_client.ServiceClient):
@@ -128,12 +129,12 @@
         for sg in body['security_groups']:
             if sg['id'] == security_group_id:
                 return service_client.ResponseBodyList(resp, sg['rules'])
-        raise exceptions.NotFound('No such Security Group')
+        raise lib_exc.NotFound('No such Security Group')
 
     def is_resource_deleted(self, id):
         try:
             self.get_security_group(id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
index be23b78..6a5bce7 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -18,6 +18,8 @@
 import time
 import urllib
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api_schema.response.compute import servers as common_schema
 from tempest.api_schema.response.compute.v2 import servers as schema
 from tempest.common import service_client
@@ -90,13 +92,13 @@
         # NOTE(maurosr): this deals with the case of multiple server create
         # with return reservation id set True
         if 'reservation_id' in body:
-            return resp, body
+            return service_client.ResponseBody(resp, body)
         if CONF.compute_feature_enabled.enable_instance_password:
             create_schema = schema.create_server_with_admin_pass
         else:
             create_schema = schema.create_server
         self.validate_response(create_schema, resp, body)
-        return resp, body['server']
+        return service_client.ResponseBody(resp, body['server'])
 
     def update_server(self, server_id, name=None, meta=None, accessIPv4=None,
                       accessIPv6=None, disk_config=None):
@@ -130,20 +132,20 @@
         resp, body = self.put("servers/%s" % str(server_id), post_body)
         body = json.loads(body)
         self.validate_response(schema.update_server, resp, body)
-        return resp, body['server']
+        return service_client.ResponseBody(resp, body['server'])
 
     def get_server(self, server_id):
         """Returns the details of an existing server."""
         resp, body = self.get("servers/%s" % str(server_id))
         body = json.loads(body)
         self.validate_response(schema.get_server, resp, body)
-        return resp, body['server']
+        return service_client.ResponseBody(resp, body['server'])
 
     def delete_server(self, server_id):
         """Deletes the given server."""
         resp, body = self.delete("servers/%s" % str(server_id))
         self.validate_response(common_schema.delete_server, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def list_servers(self, params=None):
         """Lists all servers for a user."""
@@ -182,8 +184,8 @@
         start_time = int(time.time())
         while True:
             try:
-                resp, body = self.get_server(server_id)
-            except exceptions.NotFound:
+                body = self.get_server(server_id)
+            except lib_exc.NotFound:
                 return
 
             server_status = body['status']
diff --git a/tempest/services/compute/json/tenant_usages_client.py b/tempest/services/compute/json/tenant_usages_client.py
index 5dc1d5d..bbc1051 100644
--- a/tempest/services/compute/json/tenant_usages_client.py
+++ b/tempest/services/compute/json/tenant_usages_client.py
@@ -30,7 +30,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.list_tenant, resp, body)
-        return resp, body['tenant_usages'][0]
+        return service_client.ResponseBodyList(resp, body['tenant_usages'][0])
 
     def get_tenant_usage(self, tenant_id, params=None):
         url = 'os-simple-tenant-usage/%s' % tenant_id
@@ -40,4 +40,4 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.get_tenant, resp, body)
-        return resp, body['tenant_usage']
+        return service_client.ResponseBodyList(resp, body['tenant_usage'])
diff --git a/tempest/services/compute/json/volumes_extensions_client.py b/tempest/services/compute/json/volumes_extensions_client.py
index 2e3e49c..a9cada8 100644
--- a/tempest/services/compute/json/volumes_extensions_client.py
+++ b/tempest/services/compute/json/volumes_extensions_client.py
@@ -17,6 +17,8 @@
 import time
 import urllib
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api_schema.response.compute.v2 import volumes as schema
 from tempest.common import service_client
 from tempest import exceptions
@@ -102,7 +104,7 @@
     def is_resource_deleted(self, id):
         try:
             self.get_volume(id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
diff --git a/tempest/services/data_processing/v1_1/client.py b/tempest/services/data_processing/v1_1/data_processing_client.py
similarity index 97%
rename from tempest/services/data_processing/v1_1/client.py
rename to tempest/services/data_processing/v1_1/data_processing_client.py
index 8879373..04cf9a3 100644
--- a/tempest/services/data_processing/v1_1/client.py
+++ b/tempest/services/data_processing/v1_1/data_processing_client.py
@@ -15,20 +15,10 @@
 import json
 
 from tempest.common import service_client
-from tempest import config
-
-CONF = config.CONF
 
 
 class DataProcessingClient(service_client.ServiceClient):
 
-    def __init__(self, auth_provider):
-        super(DataProcessingClient, self).__init__(
-            auth_provider,
-            CONF.data_processing.catalog_type,
-            CONF.identity.region,
-            endpoint_type=CONF.data_processing.endpoint_type)
-
     def _request_and_check_resp(self, request_func, uri, resp_status):
         """Make a request using specified request_func and check response
         status code.
diff --git a/tempest/services/database/json/limits_client.py b/tempest/services/database/json/limits_client.py
index 4daf028..6168bfd 100644
--- a/tempest/services/database/json/limits_client.py
+++ b/tempest/services/database/json/limits_client.py
@@ -15,11 +15,8 @@
 
 import urllib
 
-from tempest import config
 from tempest_lib.common import rest_client
 
-CONF = config.CONF
-
 
 class DatabaseLimitsClientJSON(rest_client.RestClient):
 
diff --git a/tempest/services/identity/json/identity_client.py b/tempest/services/identity/json/identity_client.py
index d4f57e0..6c4a6b4 100644
--- a/tempest/services/identity/json/identity_client.py
+++ b/tempest/services/identity/json/identity_client.py
@@ -11,23 +11,13 @@
 #    under the License.
 
 import json
+from tempest_lib import exceptions as lib_exc
 
 from tempest.common import service_client
-from tempest import config
-from tempest import exceptions
-
-CONF = config.CONF
 
 
 class IdentityClientJSON(service_client.ServiceClient):
 
-    def __init__(self, auth_provider):
-        super(IdentityClientJSON, self).__init__(
-            auth_provider,
-            CONF.identity.catalog_type,
-            CONF.identity.region,
-            endpoint_type='adminURL')
-
     def has_admin_extensions(self):
         """
         Returns True if the KSADM Admin Extensions are supported
@@ -134,7 +124,7 @@
         for tenant in tenants:
             if tenant['name'] == tenant_name:
                 return tenant
-        raise exceptions.NotFound('No such tenant')
+        raise lib_exc.NotFound('No such tenant')
 
     def update_tenant(self, tenant_id, **kwargs):
         """Updates a tenant."""
@@ -227,7 +217,7 @@
         for user in users:
             if user['name'] == username:
                 return user
-        raise exceptions.NotFound('No such user')
+        raise lib_exc.NotFound('No such user')
 
     def create_service(self, name, type, **kwargs):
         """Create a service."""
diff --git a/tempest/services/identity/json/token_client.py b/tempest/services/identity/json/token_client.py
index 93936bc..b28dabb 100644
--- a/tempest/services/identity/json/token_client.py
+++ b/tempest/services/identity/json/token_client.py
@@ -13,19 +13,16 @@
 #    under the License.
 
 import json
+from tempest_lib import exceptions as lib_exc
 
 from tempest.common import service_client
-from tempest import config
 from tempest import exceptions
 
-CONF = config.CONF
-
 
 class TokenClientJSON(service_client.ServiceClient):
 
-    def __init__(self):
+    def __init__(self, auth_url):
         super(TokenClientJSON, self).__init__(None, None, None)
-        auth_url = CONF.identity.uri
 
         # Normalize URI to ensure /tokens is in it.
         if 'tokens' not in auth_url:
@@ -87,7 +84,7 @@
 
         if resp.status in [401, 403]:
             resp_body = json.loads(resp_body)
-            raise exceptions.Unauthorized(resp_body['error']['message'])
+            raise lib_exc.Unauthorized(resp_body['error']['message'])
         elif resp.status not in [200, 201]:
             raise exceptions.IdentityError(
                 'Unexpected status code {0}'.format(resp.status))
diff --git a/tempest/services/identity/v3/json/base.py b/tempest/services/identity/v3/json/base.py
deleted file mode 100644
index cba480a..0000000
--- a/tempest/services/identity/v3/json/base.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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 import service_client
-from tempest import config
-
-CONF = config.CONF
-
-
-class IdentityV3Client(service_client.ServiceClient):
-    """
-    Base identity v3 client class
-    """
-
-    def __init__(self, auth_provider):
-        super(IdentityV3Client, self).__init__(
-            auth_provider,
-            CONF.identity.catalog_type,
-            CONF.identity.region,
-            endpoint_type='adminURL')
-        self.api_version = "v3"
diff --git a/tempest/services/identity/v3/json/credentials_client.py b/tempest/services/identity/v3/json/credentials_client.py
index 1289e48..0a614cd 100644
--- a/tempest/services/identity/v3/json/credentials_client.py
+++ b/tempest/services/identity/v3/json/credentials_client.py
@@ -16,10 +16,10 @@
 import json
 
 from tempest.common import service_client
-from tempest.services.identity.v3.json import base
 
 
-class CredentialsClientJSON(base.IdentityV3Client):
+class CredentialsClientJSON(service_client.ServiceClient):
+    api_version = "v3"
 
     def create_credential(self, access_key, secret_key, user_id, project_id):
         """Creates a credential."""
diff --git a/tempest/services/identity/v3/json/endpoints_client.py b/tempest/services/identity/v3/json/endpoints_client.py
index d71836e..5b7e812 100644
--- a/tempest/services/identity/v3/json/endpoints_client.py
+++ b/tempest/services/identity/v3/json/endpoints_client.py
@@ -16,10 +16,10 @@
 import json
 
 from tempest.common import service_client
-from tempest.services.identity.v3.json import base
 
 
-class EndPointClientJSON(base.IdentityV3Client):
+class EndPointClientJSON(service_client.ServiceClient):
+    api_version = "v3"
 
     def list_endpoints(self):
         """GET endpoints."""
diff --git a/tempest/services/identity/v3/json/identity_client.py b/tempest/services/identity/v3/json/identity_client.py
index f3d9d2d..be5aa80 100644
--- a/tempest/services/identity/v3/json/identity_client.py
+++ b/tempest/services/identity/v3/json/identity_client.py
@@ -17,13 +17,10 @@
 import urllib
 
 from tempest.common import service_client
-from tempest import config
-from tempest.services.identity.v3.json import base
-
-CONF = config.CONF
 
 
-class IdentityV3ClientJSON(base.IdentityV3Client):
+class IdentityV3ClientJSON(service_client.ServiceClient):
+    api_version = "v3"
 
     def create_user(self, user_name, password=None, project_id=None,
                     email=None, domain_id='default', **kwargs):
diff --git a/tempest/services/identity/v3/json/policy_client.py b/tempest/services/identity/v3/json/policy_client.py
index 25931c8..8c9c9ce 100644
--- a/tempest/services/identity/v3/json/policy_client.py
+++ b/tempest/services/identity/v3/json/policy_client.py
@@ -16,10 +16,10 @@
 import json
 
 from tempest.common import service_client
-from tempest.services.identity.v3.json import base
 
 
-class PolicyClientJSON(base.IdentityV3Client):
+class PolicyClientJSON(service_client.ServiceClient):
+    api_version = "v3"
 
     def create_policy(self, blob, type):
         """Creates a Policy."""
diff --git a/tempest/services/identity/v3/json/region_client.py b/tempest/services/identity/v3/json/region_client.py
index 482cbc6..faaf43c 100644
--- a/tempest/services/identity/v3/json/region_client.py
+++ b/tempest/services/identity/v3/json/region_client.py
@@ -17,10 +17,10 @@
 import urllib
 
 from tempest.common import service_client
-from tempest.services.identity.v3.json import base
 
 
-class RegionClientJSON(base.IdentityV3Client):
+class RegionClientJSON(service_client.ServiceClient):
+    api_version = "v3"
 
     def create_region(self, description, **kwargs):
         """Create region."""
diff --git a/tempest/services/identity/v3/json/service_client.py b/tempest/services/identity/v3/json/service_client.py
index 2e2df13..e039dc6 100644
--- a/tempest/services/identity/v3/json/service_client.py
+++ b/tempest/services/identity/v3/json/service_client.py
@@ -16,10 +16,10 @@
 import json
 
 from tempest.common import service_client
-from tempest.services.identity.v3.json import base
 
 
-class ServiceClientJSON(base.IdentityV3Client):
+class ServiceClientJSON(service_client.ServiceClient):
+    api_version = "v3"
 
     def update_service(self, service_id, **kwargs):
         """Updates a service."""
diff --git a/tempest/services/identity/v3/json/token_client.py b/tempest/services/identity/v3/json/token_client.py
index 14c4a0a..582897a 100644
--- a/tempest/services/identity/v3/json/token_client.py
+++ b/tempest/services/identity/v3/json/token_client.py
@@ -13,19 +13,16 @@
 #    under the License.
 
 import json
+from tempest_lib import exceptions as lib_exc
 
 from tempest.common import service_client
-from tempest import config
 from tempest import exceptions
 
-CONF = config.CONF
-
 
 class V3TokenClientJSON(service_client.ServiceClient):
 
-    def __init__(self):
+    def __init__(self, auth_url):
         super(V3TokenClientJSON, self).__init__(None, None, None)
-        auth_url = CONF.identity.uri_v3
         if not auth_url:
             raise exceptions.InvalidConfiguration('you must specify a v3 uri '
                                                   'if using the v3 identity '
@@ -35,23 +32,22 @@
 
         self.auth_url = auth_url
 
-    def auth(self, user=None, password=None, tenant=None, user_type='id',
-             domain=None, token=None):
+    def auth(self, user=None, password=None, project=None, user_type='id',
+             user_domain=None, project_domain=None, token=None):
         """
         :param user: user id or name, as specified in user_type
-        :param domain: the user and tenant domain
+        :param user_domain: the user domain
+        :param project_domain: the project domain
         :param token: a token to re-scope.
 
         Accepts different combinations of credentials. Restrictions:
-        - tenant and domain are only name (no id)
-        - user domain and tenant domain are assumed identical
-        - domain scope is not supported here
+        - project and domain are only name (no id)
         Sample sample valid combinations:
         - token
-        - token, tenant, domain
+        - token, project, project_domain
         - user_id, password
-        - username, password, domain
-        - username, password, tenant, domain
+        - username, password, user_domain
+        - username, password, project, user_domain, project_domain
         Validation is left to the server side.
         """
         creds = {
@@ -78,13 +74,13 @@
                 id_obj['password']['user']['id'] = user
             else:
                 id_obj['password']['user']['name'] = user
-            if domain is not None:
-                _domain = dict(name=domain)
+            if user_domain is not None:
+                _domain = dict(name=user_domain)
                 id_obj['password']['user']['domain'] = _domain
-        if tenant is not None:
-            _domain = dict(name=domain)
-            project = dict(name=tenant, domain=_domain)
-            scope = dict(project=project)
+        if project is not None:
+            _domain = dict(name=project_domain)
+            _project = dict(name=project, domain=_domain)
+            scope = dict(project=_project)
             creds['auth']['scope'] = scope
 
         body = json.dumps(creds)
@@ -112,21 +108,22 @@
 
         if resp.status in [401, 403]:
             resp_body = json.loads(resp_body)
-            raise exceptions.Unauthorized(resp_body['error']['message'])
+            raise lib_exc.Unauthorized(resp_body['error']['message'])
         elif resp.status not in [200, 201, 204]:
             raise exceptions.IdentityError(
                 'Unexpected status code {0}'.format(resp.status))
 
         return resp, json.loads(resp_body)
 
-    def get_token(self, user, password, tenant, domain='Default',
-                  auth_data=False):
+    def get_token(self, user, password, project=None, project_domain='Default',
+                  user_domain='Default', auth_data=False):
         """
         :param user: username
         Returns (token id, token data) for supplied credentials
         """
-        body = self.auth(user, password, tenant, user_type='name',
-                         domain=domain)
+        body = self.auth(user, password, project, user_type='name',
+                         user_domain=user_domain,
+                         project_domain=project_domain)
 
         token = body.response.get('x-subject-token')
         if auth_data:
diff --git a/tempest/services/image/v1/json/image_client.py b/tempest/services/image/v1/json/image_client.py
index a7b8f63..4ea710f 100644
--- a/tempest/services/image/v1/json/image_client.py
+++ b/tempest/services/image/v1/json/image_client.py
@@ -20,6 +20,8 @@
 import time
 import urllib
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.common import glance_http
 from tempest.common import service_client
 from tempest.common.utils import misc as misc_utils
@@ -237,13 +239,12 @@
         url = 'v1/images/%s' % image_id
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
-        # We can't return a ResponseBody because the body is a string
-        return resp, body
+        return service_client.ResponseBodyData(resp, body)
 
     def is_resource_deleted(self, id):
         try:
             self.get_image_meta(id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
diff --git a/tempest/services/image/v2/json/image_client.py b/tempest/services/image/v2/json/image_client.py
index 4b1d52d..50f273c 100644
--- a/tempest/services/image/v2/json/image_client.py
+++ b/tempest/services/image/v2/json/image_client.py
@@ -17,11 +17,11 @@
 import urllib
 
 import jsonschema
+from tempest_lib import exceptions as lib_exc
 
 from tempest.common import glance_http
 from tempest.common import service_client
 from tempest import config
-from tempest import exceptions
 
 CONF = config.CONF
 
@@ -120,7 +120,7 @@
     def is_resource_deleted(self, id):
         try:
             self.get_image(id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
@@ -141,8 +141,7 @@
         url = 'v2/images/%s/file' % image_id
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
-        # We can't return a ResponseBody because the body is a string
-        return resp, body
+        return service_client.ResponseBodyData(resp, body)
 
     def add_image_tag(self, image_id, tag):
         url = 'v2/images/%s/tags/%s' % (image_id, tag)
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index e92708c..ba069e8 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -14,6 +14,8 @@
 import time
 import urllib
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.common import service_client
 from tempest.common.utils import misc
 from tempest import exceptions
@@ -211,7 +213,7 @@
             getattr(self, method)(id)
         except AttributeError:
             raise Exception("Unknown resource type %s " % resource_type)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
@@ -318,6 +320,8 @@
                 cur_gw_info.pop('enable_snat', None)
         update_body['external_gateway_info'] = kwargs.get(
             'external_gateway_info', body['router']['external_gateway_info'])
+        if 'distributed' in kwargs:
+            update_body['distributed'] = kwargs['distributed']
         update_body = dict(router=update_body)
         update_body = json.dumps(update_body)
         resp, body = self.put(uri, update_body)
diff --git a/tempest/services/orchestration/json/orchestration_client.py b/tempest/services/orchestration/json/orchestration_client.py
index c813977..1a4c5d9 100644
--- a/tempest/services/orchestration/json/orchestration_client.py
+++ b/tempest/services/orchestration/json/orchestration_client.py
@@ -18,6 +18,8 @@
 import time
 import urllib
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.common import service_client
 from tempest import exceptions
 
@@ -159,7 +161,7 @@
             try:
                 body = self.get_resource(
                     stack_identifier, resource_name)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 # ignore this, as the resource may not have
                 # been created yet
                 pass
@@ -194,7 +196,7 @@
         while True:
             try:
                 body = self.get_stack(stack_identifier)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 if status == 'DELETE_COMPLETE':
                     return
             stack_name = body['stack_name']
diff --git a/tempest/services/telemetry/json/telemetry_client.py b/tempest/services/telemetry/json/telemetry_client.py
index dd899e4..a249625 100644
--- a/tempest/services/telemetry/json/telemetry_client.py
+++ b/tempest/services/telemetry/json/telemetry_client.py
@@ -127,7 +127,7 @@
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
         body = self.deserialize(body)
-        return resp, body
+        return service_client.ResponseBodyData(resp, body)
 
     def alarm_set_state(self, alarm_id, state):
         uri = "%s/alarms/%s/state" % (self.uri_prefix, alarm_id)
@@ -135,4 +135,4 @@
         resp, body = self.put(uri, body)
         self.expected_success(200, resp.status)
         body = self.deserialize(body)
-        return resp, body
+        return service_client.ResponseBodyData(resp, body)
diff --git a/tempest/services/volume/json/admin/volume_types_client.py b/tempest/services/volume/json/admin/volume_types_client.py
index 6049eb6..c905155 100644
--- a/tempest/services/volume/json/admin/volume_types_client.py
+++ b/tempest/services/volume/json/admin/volume_types_client.py
@@ -19,7 +19,6 @@
 from tempest_lib import exceptions as lib_exc
 
 from tempest.common import service_client
-from tempest import exceptions
 
 
 class BaseVolumeTypesClientJSON(service_client.ServiceClient):
@@ -42,7 +41,7 @@
             else:
                 msg = (" resource value is either not defined or incorrect.")
                 raise lib_exc.UnprocessableEntity(msg)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
diff --git a/tempest/services/volume/json/qos_client.py b/tempest/services/volume/json/qos_client.py
index 6aa56f7..14ff506 100644
--- a/tempest/services/volume/json/qos_client.py
+++ b/tempest/services/volume/json/qos_client.py
@@ -27,7 +27,7 @@
     def is_resource_deleted(self, qos_id):
         try:
             self.get_qos(qos_id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
diff --git a/tempest/services/volume/json/snapshots_client.py b/tempest/services/volume/json/snapshots_client.py
index 100b34c..8430b63 100644
--- a/tempest/services/volume/json/snapshots_client.py
+++ b/tempest/services/volume/json/snapshots_client.py
@@ -14,6 +14,8 @@
 import time
 import urllib
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.common import service_client
 from tempest import exceptions
 from tempest.openstack.common import log as logging
@@ -127,7 +129,7 @@
     def is_resource_deleted(self, id):
         try:
             self.get_snapshot(id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
diff --git a/tempest/services/volume/json/volumes_client.py b/tempest/services/volume/json/volumes_client.py
index d834905..059664c 100644
--- a/tempest/services/volume/json/volumes_client.py
+++ b/tempest/services/volume/json/volumes_client.py
@@ -17,11 +17,10 @@
 import time
 import urllib
 
-from tempest.common import service_client
-from tempest import config
-from tempest import exceptions
+from tempest_lib import exceptions as lib_exc
 
-CONF = config.CONF
+from tempest.common import service_client
+from tempest import exceptions
 
 
 class BaseVolumesClientJSON(service_client.ServiceClient):
@@ -31,6 +30,12 @@
 
     create_resp = 200
 
+    def __init__(self, auth_provider, service, region,
+                 default_volume_size=1, **kwargs):
+        super(BaseVolumesClientJSON, self).__init__(
+            auth_provider, service, region, **kwargs)
+        self.default_volume_size = default_volume_size
+
     def get_attachment_from_volume(self, volume):
         """Return the element 'attachment' from input volumes."""
         return volume['attachments'][0]
@@ -77,10 +82,8 @@
         snapshot_id: When specified the volume is created from this snapshot
         imageRef: When specified the volume is created from this image
         """
-        # for bug #1293885:
-        # If no size specified, read volume size from CONF
         if size is None:
-            size = CONF.volume.volume_size
+            size = self.default_volume_size
         post_body = {'size': size}
         post_body.update(kwargs)
         post_body = json.dumps({'volume': post_body})
@@ -181,7 +184,7 @@
     def is_resource_deleted(self, id):
         try:
             self.get_volume(id)
-        except exceptions.NotFound:
+        except lib_exc.NotFound:
             return True
         return False
 
@@ -333,6 +336,14 @@
         self.expected_success(200, resp.status)
         return service_client.ResponseBody(resp, body)
 
+    def retype_volume(self, volume_id, volume_type, **kwargs):
+        """Updates volume with new volume type."""
+        post_body = {'new_type': volume_type}
+        post_body.update(kwargs)
+        post_body = json.dumps({'os-retype': post_body})
+        resp, body = self.post('volumes/%s/action' % volume_id, post_body)
+        self.expected_success(202, resp.status)
+
 
 class VolumesClientJSON(BaseVolumesClientJSON):
     """
diff --git a/tempest/stress/actions/server_create_destroy.py b/tempest/stress/actions/server_create_destroy.py
index 34e299d..d0e4eea 100644
--- a/tempest/stress/actions/server_create_destroy.py
+++ b/tempest/stress/actions/server_create_destroy.py
@@ -28,7 +28,7 @@
     def run(self):
         name = data_utils.rand_name("instance")
         self.logger.info("creating %s" % name)
-        _, server = self.manager.servers_client.create_server(
+        server = self.manager.servers_client.create_server(
             name, self.image, self.flavor)
         server_id = server['id']
         self.manager.servers_client.wait_for_server_status(server_id,
diff --git a/tempest/stress/actions/ssh_floating.py b/tempest/stress/actions/ssh_floating.py
index c473df6..b2c612e 100644
--- a/tempest/stress/actions/ssh_floating.py
+++ b/tempest/stress/actions/ssh_floating.py
@@ -74,9 +74,9 @@
         self.logger.info("creating %s" % name)
         vm_args = self.vm_extra_args.copy()
         vm_args['security_groups'] = [self.sec_grp]
-        _, server = servers_client.create_server(name, self.image,
-                                                 self.flavor,
-                                                 **vm_args)
+        server = servers_client.create_server(name, self.image,
+                                              self.flavor,
+                                              **vm_args)
         self.server_id = server['id']
         if self.wait_after_vm_create:
             self.manager.servers_client.wait_for_server_status(self.server_id,
@@ -104,7 +104,7 @@
 
     def _create_floating_ip(self):
         floating_cli = self.manager.floating_ips_client
-        _, self.floating = floating_cli.create_floating_ip(self.floating_pool)
+        self.floating = floating_cli.create_floating_ip(self.floating_pool)
 
     def _destroy_floating_ip(self):
         cli = self.manager.floating_ips_client
@@ -144,7 +144,7 @@
         cli = self.manager.floating_ips_client
 
         def func():
-            _, floating = cli.get_floating_ip_details(self.floating['id'])
+            floating = cli.get_floating_ip_details(self.floating['id'])
             return floating['instance_id'] is None
 
         if not tempest.test.call_until_true(func, self.check_timeout,
diff --git a/tempest/stress/actions/volume_attach_delete.py b/tempest/stress/actions/volume_attach_delete.py
index 9c4070f..2e1d623 100644
--- a/tempest/stress/actions/volume_attach_delete.py
+++ b/tempest/stress/actions/volume_attach_delete.py
@@ -28,7 +28,7 @@
         # Step 1: create volume
         name = data_utils.rand_name("volume")
         self.logger.info("creating volume: %s" % name)
-        _, volume = self.manager.volumes_client.create_volume(
+        volume = self.manager.volumes_client.create_volume(
             size=1,
             display_name=name)
         self.manager.volumes_client.wait_for_volume_status(volume['id'],
@@ -38,7 +38,7 @@
         # Step 2: create vm instance
         vm_name = data_utils.rand_name("instance")
         self.logger.info("creating vm: %s" % vm_name)
-        _, server = self.manager.servers_client.create_server(
+        server = self.manager.servers_client.create_server(
             vm_name, self.image, self.flavor)
         server_id = server['id']
         self.manager.servers_client.wait_for_server_status(server_id, 'ACTIVE')
diff --git a/tempest/stress/actions/volume_attach_verify.py b/tempest/stress/actions/volume_attach_verify.py
index 3c052ac..c013af3 100644
--- a/tempest/stress/actions/volume_attach_verify.py
+++ b/tempest/stress/actions/volume_attach_verify.py
@@ -36,9 +36,9 @@
         vm_args = self.vm_extra_args.copy()
         vm_args['security_groups'] = [self.sec_grp]
         vm_args['key_name'] = self.key['name']
-        _, server = servers_client.create_server(name, self.image,
-                                                 self.flavor,
-                                                 **vm_args)
+        server = servers_client.create_server(name, self.image,
+                                              self.flavor,
+                                              **vm_args)
         self.server_id = server['id']
         self.manager.servers_client.wait_for_server_status(self.server_id,
                                                            'ACTIVE')
@@ -65,7 +65,7 @@
 
     def _create_floating_ip(self):
         floating_cli = self.manager.floating_ips_client
-        _, self.floating = floating_cli.create_floating_ip(self.floating_pool)
+        self.floating = floating_cli.create_floating_ip(self.floating_pool)
 
     def _destroy_floating_ip(self):
         cli = self.manager.floating_ips_client
@@ -77,7 +77,7 @@
         name = data_utils.rand_name("volume")
         self.logger.info("creating volume: %s" % name)
         volumes_client = self.manager.volumes_client
-        _, self.volume = volumes_client.create_volume(
+        self.volume = volumes_client.create_volume(
             size=1,
             display_name=name)
         volumes_client.wait_for_volume_status(self.volume['id'],
@@ -95,7 +95,7 @@
         cli = self.manager.floating_ips_client
 
         def func():
-            _, floating = cli.get_floating_ip_details(self.floating['id'])
+            floating = cli.get_floating_ip_details(self.floating['id'])
             return floating['instance_id'] is None
 
         if not tempest.test.call_until_true(func, CONF.compute.build_timeout,
diff --git a/tempest/stress/cleanup.py b/tempest/stress/cleanup.py
index 9bc55fa..86325f5 100644
--- a/tempest/stress/cleanup.py
+++ b/tempest/stress/cleanup.py
@@ -55,7 +55,7 @@
         except Exception:
             pass
 
-    _, floating_ips = admin_manager.floating_ips_client.list_floating_ips()
+    floating_ips = admin_manager.floating_ips_client.list_floating_ips()
     LOG.info("Cleanup::remove %s floating ips" % len(floating_ips))
     for f in floating_ips:
         try:
diff --git a/tempest/stress/driver.py b/tempest/stress/driver.py
index 49fac3d..1c27815 100644
--- a/tempest/stress/driver.py
+++ b/tempest/stress/driver.py
@@ -19,8 +19,8 @@
 
 from six import moves
 
-from tempest import auth
 from tempest import clients
+from tempest.common import cred_provider
 from tempest.common import ssh
 from tempest.common.utils import data_utils
 from tempest import config
@@ -148,9 +148,9 @@
                                             password,
                                             tenant['id'],
                                             "email")
-                creds = auth.get_credentials(username=username,
-                                             password=password,
-                                             tenant_name=tenant_name)
+                creds = cred_provider.get_credentials(username=username,
+                                                      password=password,
+                                                      tenant_name=tenant_name)
                 manager = clients.Manager(credentials=creds)
 
             test_obj = importutils.import_class(test['action'])
diff --git a/tempest/test.py b/tempest/test.py
index 28e1e2c..d4123a4 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -359,7 +359,7 @@
                                                    level=None))
 
     @classmethod
-    def get_client_manager(cls, interface=None):
+    def get_client_manager(cls):
         """
         Returns an OpenStack client manager
         """
@@ -373,12 +373,7 @@
             )
 
         creds = cls.isolated_creds.get_primary_creds()
-        params = dict(credentials=creds, service=cls._service)
-        if getattr(cls, '_interface', None):
-            interface = cls._interface
-        if interface:
-            params['interface'] = interface
-        os = clients.Manager(**params)
+        os = clients.Manager(credentials=creds, service=cls._service)
         return os
 
     @classmethod
@@ -394,13 +389,12 @@
         """
         Returns an instance of the Identity Admin API client
         """
-        os = clients.AdminManager(interface=cls._interface,
-                                  service=cls._service)
+        os = clients.AdminManager(service=cls._service)
         admin_client = os.identity_client
         return admin_client
 
     @classmethod
-    def set_network_resources(self, network=False, router=False, subnet=False,
+    def set_network_resources(cls, network=False, router=False, subnet=False,
                               dhcp=False):
         """Specify which network resources should be created
 
@@ -413,8 +407,8 @@
         # in order to ensure that even if it's called multiple times in
         # a chain of overloaded methods, the attribute is set only
         # in the leaf class
-        if not self.network_resources:
-            self.network_resources = {
+        if not cls.network_resources:
+            cls.network_resources = {
                 'network': network,
                 'router': router,
                 'subnet': subnet,
@@ -436,8 +430,7 @@
         super(NegativeAutoTest, cls).setUpClass()
         os = cls.get_client_manager()
         cls.client = os.negative_client
-        os_admin = clients.AdminManager(interface=cls._interface,
-                                        service=cls._service)
+        os_admin = clients.AdminManager(service=cls._service)
         cls.admin_client = os_admin.negative_client
 
     @staticmethod
diff --git a/tempest/tests/cmd/test_verify_tempest_config.py b/tempest/tests/cmd/test_verify_tempest_config.py
index 1abe29a..17e2550 100644
--- a/tempest/tests/cmd/test_verify_tempest_config.py
+++ b/tempest/tests/cmd/test_verify_tempest_config.py
@@ -282,8 +282,8 @@
 
     def test_verify_extensions_nova(self):
         def fake_list_extensions():
-            return (None, [{'alias': 'fake1'}, {'alias': 'fake2'},
-                           {'alias': 'not_fake'}])
+            return ([{'alias': 'fake1'}, {'alias': 'fake2'},
+                     {'alias': 'not_fake'}])
         fake_os = mock.MagicMock()
         fake_os.extensions_client.list_extensions = fake_list_extensions
         self.useFixture(mockpatch.PatchObject(
@@ -303,9 +303,9 @@
 
     def test_verify_extensions_nova_all(self):
         def fake_list_extensions():
-            return (None, {'extensions': [{'alias': 'fake1'},
-                                          {'alias': 'fake2'},
-                                          {'alias': 'not_fake'}]})
+            return ({'extensions': [{'alias': 'fake1'},
+                                    {'alias': 'fake2'},
+                                    {'alias': 'not_fake'}]})
         fake_os = mock.MagicMock()
         fake_os.extensions_client.list_extensions = fake_list_extensions
         self.useFixture(mockpatch.PatchObject(
diff --git a/tempest/tests/common/test_accounts.py b/tempest/tests/common/test_accounts.py
index f45f2cf..a836a20 100644
--- a/tempest/tests/common/test_accounts.py
+++ b/tempest/tests/common/test_accounts.py
@@ -73,7 +73,8 @@
         test_account_class = accounts.Accounts('test_name')
         hash_list = self._get_hash_list(self.test_accounts)
         test_cred_dict = self.test_accounts[3]
-        test_creds = auth.get_credentials(**test_cred_dict)
+        test_creds = auth.get_credentials(fake_identity.FAKE_AUTH_URL,
+                                          **test_cred_dict)
         results = test_account_class.get_hash(test_creds)
         self.assertEqual(hash_list[3], results)
 
diff --git a/tempest/tests/common/test_cred_provider.py b/tempest/tests/common/test_cred_provider.py
new file mode 100644
index 0000000..160ecaa
--- /dev/null
+++ b/tempest/tests/common/test_cred_provider.py
@@ -0,0 +1,97 @@
+# Copyright 2015 Hewlett-Packard Development Company, L.P.
+#
+#    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 oslo.config import cfg
+
+from tempest import auth
+from tempest.common import cred_provider
+from tempest.common import tempest_fixtures as fixtures
+from tempest.services.identity.json import token_client as v2_client
+from tempest.services.identity.v3.json import token_client as v3_client
+from tempest.tests import fake_identity
+# Note: eventually the auth module will move to tempest-lib, and so wil its
+# unit tests. *CredentialsTests will be imported from tempest-lib then.
+from tempest.tests import test_credentials as test_creds
+
+
+class ConfiguredV2CredentialsTests(test_creds.CredentialsTests):
+    attributes = {
+        'username': 'fake_username',
+        'password': 'fake_password',
+        'tenant_name': 'fake_tenant_name'
+    }
+
+    identity_response = fake_identity._fake_v2_response
+    credentials_class = auth.KeystoneV2Credentials
+    tokenclient_class = v2_client.TokenClientJSON
+    identity_version = 'v2'
+
+    def setUp(self):
+        super(ConfiguredV2CredentialsTests, self).setUp()
+        self.stubs.Set(self.tokenclient_class, 'raw_request',
+                       self.identity_response)
+
+    def _verify_credentials(self, credentials_class, filled=True,
+                            identity_version=None):
+        for ctype in cred_provider.CREDENTIAL_TYPES:
+            if identity_version is None:
+                creds = cred_provider.get_configured_credentials(
+                    credential_type=ctype, fill_in=filled)
+            else:
+                creds = cred_provider.get_configured_credentials(
+                    credential_type=ctype, fill_in=filled,
+                    identity_version=identity_version)
+            self._check(creds, credentials_class, filled)
+
+    def test_get_configured_credentials(self):
+        self.useFixture(fixtures.LockFixture('auth_version'))
+        self._verify_credentials(credentials_class=self.credentials_class)
+
+    def test_get_configured_credentials_unfilled(self):
+        self.useFixture(fixtures.LockFixture('auth_version'))
+        self._verify_credentials(credentials_class=self.credentials_class,
+                                 filled=False)
+
+    def test_get_configured_credentials_version(self):
+        # version specified and not loaded from config
+        self.useFixture(fixtures.LockFixture('auth_version'))
+        self._verify_credentials(credentials_class=self.credentials_class,
+                                 identity_version=self.identity_version)
+
+    def test_is_valid(self):
+        creds = self._get_credentials()
+        self.assertTrue(creds.is_valid())
+
+
+class ConfiguredV3CredentialsTests(ConfiguredV2CredentialsTests):
+    attributes = {
+        'username': 'fake_username',
+        'password': 'fake_password',
+        'project_name': 'fake_project_name',
+        'user_domain_name': 'fake_domain_name'
+    }
+
+    credentials_class = auth.KeystoneV3Credentials
+    identity_response = fake_identity._fake_v3_response
+    tokenclient_class = v3_client.V3TokenClientJSON
+    identity_version = 'v3'
+
+    def setUp(self):
+        super(ConfiguredV3CredentialsTests, self).setUp()
+        # Additional config items reset by cfg fixture after each test
+        cfg.CONF.set_default('auth_version', 'v3', group='identity')
+        # Identity group items
+        for prefix in ['', 'alt_', 'admin_']:
+            cfg.CONF.set_default(prefix + 'domain_name', 'fake_domain_name',
+                                 group='identity')
diff --git a/tempest/tests/common/test_service_clients.py b/tempest/tests/common/test_service_clients.py
index 2b31d6b..afe4abc 100644
--- a/tempest/tests/common/test_service_clients.py
+++ b/tempest/tests/common/test_service_clients.py
@@ -43,8 +43,18 @@
 from tempest.services.compute.json import tenant_usages_client
 from tempest.services.compute.json import volumes_extensions_client \
     as compute_volumes_extensions_client
+from tempest.services.data_processing.v1_1 import data_processing_client
 from tempest.services.database.json import flavors_client as db_flavor_client
 from tempest.services.database.json import versions_client as db_version_client
+from tempest.services.identity.json import identity_client as \
+    identity_v2_identity_client
+from tempest.services.identity.v3.json import credentials_client
+from tempest.services.identity.v3.json import endpoints_client
+from tempest.services.identity.v3.json import identity_client as \
+    identity_v3_identity_client
+from tempest.services.identity.v3.json import policy_client
+from tempest.services.identity.v3.json import region_client
+from tempest.services.identity.v3.json import service_client
 from tempest.services.messaging.json import messaging_client
 from tempest.services.network.json import network_client
 from tempest.services.object_storage import account_client
@@ -117,6 +127,7 @@
             services_client.ServicesClientJSON,
             tenant_usages_client.TenantUsagesClientJSON,
             compute_volumes_extensions_client.VolumesExtensionsClientJSON,
+            data_processing_client.DataProcessingClient,
             db_flavor_client.DatabaseFlavorsClientJSON,
             db_version_client.DatabaseVersionsClientJSON,
             messaging_client.MessagingClientJSON,
@@ -146,6 +157,13 @@
             volume_v2_qos_client.QosSpecsV2ClientJSON,
             volume_v2_snapshots_client.SnapshotsV2ClientJSON,
             volume_v2_volumes_client.VolumesV2ClientJSON,
+            identity_v2_identity_client.IdentityClientJSON,
+            credentials_client.CredentialsClientJSON,
+            endpoints_client.EndPointClientJSON,
+            identity_v3_identity_client.IdentityV3ClientJSON,
+            policy_client.PolicyClientJSON,
+            region_client.RegionClientJSON,
+            service_client.ServiceClientJSON
         ]
 
         for client in test_clients:
diff --git a/tempest/tests/fake_identity.py b/tempest/tests/fake_identity.py
index 97098e1..ad78f85 100644
--- a/tempest/tests/fake_identity.py
+++ b/tempest/tests/fake_identity.py
@@ -17,6 +17,7 @@
 
 import httplib2
 
+FAKE_AUTH_URL = 'http://fake_uri.com/auth'
 
 TOKEN = "fake_token"
 ALT_TOKEN = "alt_fake_token"
diff --git a/tempest/tests/negative/test_negative_auto_test.py b/tempest/tests/negative/test_negative_auto_test.py
index fb1da43..7a127cd 100644
--- a/tempest/tests/negative/test_negative_auto_test.py
+++ b/tempest/tests/negative/test_negative_auto_test.py
@@ -21,7 +21,6 @@
 
 class TestNegativeAutoTest(base.TestCase):
     # Fake entries
-    _interface = 'json'
     _service = 'compute'
 
     fake_input_desc = {"name": "list-flavors-with-detail",
diff --git a/tempest/tests/test_auth.py b/tempest/tests/test_auth.py
index 90bb8a7..c236dbe 100644
--- a/tempest/tests/test_auth.py
+++ b/tempest/tests/test_auth.py
@@ -30,11 +30,7 @@
 from tempest.tests import fake_identity
 
 
-def fake_get_default_credentials(credential_type, fill_in=True):
-    return fake_credentials.FakeCredentials()
-
-
-def fake_get_credentials(credential_type=None, fill_in=True, **kwargs):
+def fake_get_credentials(fill_in=True, identity_version='v2', **kwargs):
     return fake_credentials.FakeCredentials()
 
 
@@ -42,11 +38,11 @@
     _auth_provider_class = None
     credentials = fake_credentials.FakeCredentials()
 
-    def _auth(self, credentials, **params):
+    def _auth(self, credentials, auth_url, **params):
         """
         returns auth method according to keystone
         """
-        return self._auth_provider_class(credentials, **params)
+        return self._auth_provider_class(credentials, auth_url, **params)
 
     def setUp(self):
         super(BaseAuthTestsSetUp, self).setUp()
@@ -54,9 +50,8 @@
         self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakePrivate)
         self.fake_http = fake_http.fake_httplib2(return_type=200)
         self.stubs.Set(auth, 'get_credentials', fake_get_credentials)
-        self.stubs.Set(auth, 'get_default_credentials',
-                       fake_get_default_credentials)
-        self.auth_provider = self._auth(self.credentials)
+        self.auth_provider = self._auth(self.credentials,
+                                        fake_identity.FAKE_AUTH_URL)
 
 
 class TestBaseAuthProvider(BaseAuthTestsSetUp):
@@ -84,14 +79,15 @@
 
     _auth_provider_class = FakeAuthProviderImpl
 
+    def _auth(self, credentials, auth_url, **params):
+        """
+        returns auth method according to keystone
+        """
+        return self._auth_provider_class(credentials, **params)
+
     def test_check_credentials_bad_type(self):
         self.assertFalse(self.auth_provider.check_credentials([]))
 
-    def test_instantiate_with_dict(self):
-        # Dict credentials are only supported for backward compatibility
-        auth_provider = self._auth(credentials={})
-        self.assertIsInstance(auth_provider.credentials, auth.Credentials)
-
     def test_auth_data_property_when_cache_exists(self):
         self.auth_provider.cache = 'foo'
         self.useFixture(mockpatch.PatchObject(self.auth_provider,
diff --git a/tempest/tests/test_credentials.py b/tempest/tests/test_credentials.py
index 6e447d6..54a3360 100644
--- a/tempest/tests/test_credentials.py
+++ b/tempest/tests/test_credentials.py
@@ -15,8 +15,6 @@
 
 import copy
 
-from oslo.config import cfg
-
 from tempest import auth
 from tempest.common import tempest_fixtures as fixtures
 from tempest import config
@@ -37,6 +35,18 @@
             attributes = self.attributes
         return self.credentials_class(**attributes)
 
+    def _check(self, credentials, credentials_class, filled):
+        # Check the right version of credentials has been returned
+        self.assertIsInstance(credentials, credentials_class)
+        # Check the id attributes are filled in
+        attributes = [x for x in credentials.ATTRIBUTES if (
+            '_id' in x and x != 'domain_id')]
+        for attr in attributes:
+            if filled:
+                self.assertIsNotNone(getattr(credentials, attr))
+            else:
+                self.assertIsNone(getattr(credentials, attr))
+
     def setUp(self):
         super(CredentialsTests, self).setUp()
         self.useFixture(fake_config.ConfigFixture())
@@ -51,18 +61,6 @@
                           self._get_credentials,
                           attributes=dict(invalid='fake'))
 
-    def test_default(self):
-        self.useFixture(fixtures.LockFixture('auth_version'))
-        for ctype in self.credentials_class.TYPES:
-            self.assertRaises(NotImplementedError,
-                              self.credentials_class.get_default,
-                              credentials_type=ctype)
-
-    def test_invalid_default(self):
-        self.assertRaises(exceptions.InvalidCredentials,
-                          auth.Credentials.get_default,
-                          credentials_type='invalid_type')
-
     def test_is_valid(self):
         creds = self._get_credentials()
         self.assertRaises(NotImplementedError, creds.is_valid)
@@ -78,39 +76,19 @@
     identity_response = fake_identity._fake_v2_response
     credentials_class = auth.KeystoneV2Credentials
     tokenclient_class = v2_client.TokenClientJSON
+    identity_version = 'v2'
 
     def setUp(self):
         super(KeystoneV2CredentialsTests, self).setUp()
         self.stubs.Set(self.tokenclient_class, 'raw_request',
                        self.identity_response)
 
-    def _verify_credentials(self, credentials_class, filled=True,
-                            creds_dict=None):
-
-        def _check(credentials):
-            # Check the right version of credentials has been returned
-            self.assertIsInstance(credentials, credentials_class)
-            # Check the id attributes are filled in
-            attributes = [x for x in credentials.ATTRIBUTES if (
-                '_id' in x and x != 'domain_id')]
-            for attr in attributes:
-                if filled:
-                    self.assertIsNotNone(getattr(credentials, attr))
-                else:
-                    self.assertIsNone(getattr(credentials, attr))
-
-        if creds_dict is None:
-            for ctype in auth.Credentials.TYPES:
-                creds = auth.get_default_credentials(credential_type=ctype,
-                                                     fill_in=filled)
-                _check(creds)
-        else:
-            creds = auth.get_credentials(fill_in=filled, **creds_dict)
-            _check(creds)
-
-    def test_get_default_credentials(self):
-        self.useFixture(fixtures.LockFixture('auth_version'))
-        self._verify_credentials(credentials_class=self.credentials_class)
+    def _verify_credentials(self, credentials_class, creds_dict, filled=True):
+        creds = auth.get_credentials(fake_identity.FAKE_AUTH_URL,
+                                     fill_in=filled,
+                                     identity_version=self.identity_version,
+                                     **creds_dict)
+        self._check(creds, credentials_class, filled)
 
     def test_get_credentials(self):
         self.useFixture(fixtures.LockFixture('auth_version'))
@@ -120,8 +98,8 @@
     def test_get_credentials_not_filled(self):
         self.useFixture(fixtures.LockFixture('auth_version'))
         self._verify_credentials(credentials_class=self.credentials_class,
-                                 filled=False,
-                                 creds_dict=self.attributes)
+                                 creds_dict=self.attributes,
+                                 filled=False)
 
     def test_is_valid(self):
         creds = self._get_credentials()
@@ -144,15 +122,6 @@
         # credential requirements
         self._test_is_not_valid('tenant_name')
 
-    def test_default(self):
-        self.useFixture(fixtures.LockFixture('auth_version'))
-        for ctype in self.credentials_class.TYPES:
-            creds = self.credentials_class.get_default(credentials_type=ctype)
-            for attr in self.attributes.keys():
-                # Default configuration values related to credentials
-                # are defined as fake_* in fake_config.py
-                self.assertEqual(getattr(creds, attr), 'fake_' + attr)
-
     def test_reset_all_attributes(self):
         creds = self._get_credentials()
         initial_creds = copy.deepcopy(creds)
@@ -189,28 +158,7 @@
     credentials_class = auth.KeystoneV3Credentials
     identity_response = fake_identity._fake_v3_response
     tokenclient_class = v3_client.V3TokenClientJSON
-
-    def setUp(self):
-        super(KeystoneV3CredentialsTests, self).setUp()
-        # Additional config items reset by cfg fixture after each test
-        cfg.CONF.set_default('auth_version', 'v3', group='identity')
-        # Identity group items
-        for prefix in ['', 'alt_', 'admin_']:
-            cfg.CONF.set_default(prefix + 'domain_name', 'fake_domain_name',
-                                 group='identity')
-
-    def test_default(self):
-        self.useFixture(fixtures.LockFixture('auth_version'))
-        for ctype in self.credentials_class.TYPES:
-            creds = self.credentials_class.get_default(credentials_type=ctype)
-            for attr in self.attributes.keys():
-                if attr == 'project_name':
-                    config_value = 'fake_tenant_name'
-                elif attr == 'user_domain_name':
-                    config_value = 'fake_domain_name'
-                else:
-                    config_value = 'fake_' + attr
-                self.assertEqual(getattr(creds, attr), config_value)
+    identity_version = 'v3'
 
     def test_is_not_valid(self):
         # NOTE(mtreinish) For a Keystone V3 credential object a project name
