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..4f5c6c8 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()
 
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..96f4b43 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
 
 
@@ -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):
diff --git a/tempest/api/baremetal/admin/test_ports.py b/tempest/api/baremetal/admin/test_ports.py
index 4aedaa4..0076dee 100644
--- a/tempest/api/baremetal/admin/test_ports.py
+++ b/tempest/api/baremetal/admin/test_ports.py
@@ -10,9 +10,11 @@
 #    License for the specific language governing permissions and limitations
 #    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
 
 
@@ -57,7 +59,7 @@
         _, body = self.client.show_port(uuid)
         self._assertExpected(port, body)
 
-    @test.skip_because(bug='1398350')
+    @decorators.skip_because(bug='1398350')
     @test.attr(type='smoke')
     def test_create_port_with_extra(self):
         node_id = self.node['uuid']
@@ -79,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):
@@ -231,7 +234,7 @@
         _, body = self.client.show_port(port['uuid'])
         self.assertEqual(extra, body['extra'])
 
-    @test.skip_because(bug='1398350')
+    @decorators.skip_because(bug='1398350')
     @test.attr(type='smoke')
     def test_update_port_mixed_ops(self):
         node_id = self.node['uuid']
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 1953040..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
 
 
@@ -45,8 +45,7 @@
         cls.rxtx = 2
 
     def flavor_clean_up(self, flavor_id):
-        resp, body = self.client.delete_flavor(flavor_id)
-        self.assertEqual(resp.status, 202)
+        self.client.delete_flavor(flavor_id)
         self.client.wait_for_resource_deletion(flavor_id)
 
     def _create_flavor(self, flavor_id):
@@ -55,15 +54,14 @@
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
 
         # Create the flavor
-        resp, flavor = self.client.create_flavor(flavor_name,
-                                                 self.ram, self.vcpus,
-                                                 self.disk,
-                                                 flavor_id,
-                                                 ephemeral=self.ephemeral,
-                                                 swap=self.swap,
-                                                 rxtx=self.rxtx)
+        flavor = self.client.create_flavor(flavor_name,
+                                           self.ram, self.vcpus,
+                                           self.disk,
+                                           flavor_id,
+                                           ephemeral=self.ephemeral,
+                                           swap=self.swap,
+                                           rxtx=self.rxtx)
         self.addCleanup(self.flavor_clean_up, flavor['id'])
-        self.assertEqual(200, resp.status)
         self.assertEqual(flavor['name'], flavor_name)
         self.assertEqual(flavor['vcpus'], self.vcpus)
         self.assertEqual(flavor['disk'], self.disk)
@@ -75,8 +73,7 @@
         self.assertEqual(flavor['os-flavor-access:is_public'], True)
 
         # Verify flavor is retrieved
-        resp, flavor = self.client.get_flavor_details(flavor['id'])
-        self.assertEqual(resp.status, 200)
+        flavor = self.client.get_flavor_details(flavor['id'])
         self.assertEqual(flavor['name'], flavor_name)
 
         return flavor['id']
@@ -109,18 +106,17 @@
         new_flavor_id = data_utils.rand_int_id(start=1000)
 
         # Create the flavor
-        resp, flavor = self.client.create_flavor(flavor_name,
-                                                 self.ram, self.vcpus,
-                                                 self.disk,
-                                                 new_flavor_id,
-                                                 ephemeral=self.ephemeral,
-                                                 swap=self.swap,
-                                                 rxtx=self.rxtx)
+        flavor = self.client.create_flavor(flavor_name,
+                                           self.ram, self.vcpus,
+                                           self.disk,
+                                           new_flavor_id,
+                                           ephemeral=self.ephemeral,
+                                           swap=self.swap,
+                                           rxtx=self.rxtx)
         self.addCleanup(self.flavor_clean_up, flavor['id'])
         flag = False
         # Verify flavor is retrieved
-        resp, flavors = self.client.list_flavors_with_detail()
-        self.assertEqual(resp.status, 200)
+        flavors = self.client.list_flavors_with_detail()
         for flavor in flavors:
             if flavor['name'] == flavor_name:
                 flag = True
@@ -142,12 +138,11 @@
         new_flavor_id = data_utils.rand_int_id(start=1000)
 
         # Create the flavor
-        resp, flavor = self.client.create_flavor(flavor_name,
-                                                 self.ram, self.vcpus,
-                                                 self.disk,
-                                                 new_flavor_id)
+        flavor = self.client.create_flavor(flavor_name,
+                                           self.ram, self.vcpus,
+                                           self.disk,
+                                           new_flavor_id)
         self.addCleanup(self.flavor_clean_up, flavor['id'])
-        self.assertEqual(200, resp.status)
         self.assertEqual(flavor['name'], flavor_name)
         self.assertEqual(flavor['ram'], self.ram)
         self.assertEqual(flavor['vcpus'], self.vcpus)
@@ -156,14 +151,12 @@
         verify_flavor_response_extension(flavor)
 
         # Verify flavor is retrieved
-        resp, flavor = self.client.get_flavor_details(new_flavor_id)
-        self.assertEqual(resp.status, 200)
+        flavor = self.client.get_flavor_details(new_flavor_id)
         self.assertEqual(flavor['name'], flavor_name)
         verify_flavor_response_extension(flavor)
 
         # Check if flavor is present in list
-        resp, flavors = self.user_client.list_flavors_with_detail()
-        self.assertEqual(resp.status, 200)
+        flavors = self.user_client.list_flavors_with_detail()
         for flavor in flavors:
             if flavor['name'] == flavor_name:
                 verify_flavor_response_extension(flavor)
@@ -180,16 +173,15 @@
         new_flavor_id = data_utils.rand_int_id(start=1000)
 
         # Create the flavor
-        resp, flavor = self.client.create_flavor(flavor_name,
-                                                 self.ram, self.vcpus,
-                                                 self.disk,
-                                                 new_flavor_id,
-                                                 is_public="False")
+        flavor = self.client.create_flavor(flavor_name,
+                                           self.ram, self.vcpus,
+                                           self.disk,
+                                           new_flavor_id,
+                                           is_public="False")
         self.addCleanup(self.flavor_clean_up, flavor['id'])
         # Verify flavor is retrieved
         flag = False
-        resp, flavors = self.client.list_flavors_with_detail()
-        self.assertEqual(resp.status, 200)
+        flavors = self.client.list_flavors_with_detail()
         for flavor in flavors:
             if flavor['name'] == flavor_name:
                 flag = True
@@ -197,8 +189,7 @@
 
         # Verify flavor is not retrieved with other user
         flag = False
-        resp, flavors = self.user_client.list_flavors_with_detail()
-        self.assertEqual(resp.status, 200)
+        flavors = self.user_client.list_flavors_with_detail()
         for flavor in flavors:
             if flavor['name'] == flavor_name:
                 flag = True
@@ -211,16 +202,15 @@
         new_flavor_id = data_utils.rand_int_id(start=1000)
 
         # Create the flavor
-        resp, flavor = self.client.create_flavor(flavor_name,
-                                                 self.ram, self.vcpus,
-                                                 self.disk,
-                                                 new_flavor_id,
-                                                 is_public="False")
+        flavor = self.client.create_flavor(flavor_name,
+                                           self.ram, self.vcpus,
+                                           self.disk,
+                                           new_flavor_id,
+                                           is_public="False")
         self.addCleanup(self.flavor_clean_up, flavor['id'])
-        self.assertEqual(200, resp.status)
 
         # 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'])
 
@@ -232,17 +222,16 @@
         new_flavor_id = data_utils.rand_int_id(start=1000)
 
         # Create the flavor
-        resp, flavor = self.client.create_flavor(flavor_name,
-                                                 self.ram, self.vcpus,
-                                                 self.disk,
-                                                 new_flavor_id,
-                                                 is_public="True")
+        flavor = self.client.create_flavor(flavor_name,
+                                           self.ram, self.vcpus,
+                                           self.disk,
+                                           new_flavor_id,
+                                           is_public="True")
         self.addCleanup(self.flavor_clean_up, flavor['id'])
         flag = False
         self.new_client = self.flavors_client
         # Verify flavor is retrieved with new user
-        resp, flavors = self.new_client.list_flavors_with_detail()
-        self.assertEqual(resp.status, 200)
+        flavors = self.new_client.list_flavors_with_detail()
         for flavor in flavors:
             if flavor['name'] == flavor_name:
                 flag = True
@@ -256,19 +245,19 @@
         flavor_name_public = data_utils.rand_name(self.flavor_name_prefix)
 
         # Create a non public flavor
-        resp, flavor = self.client.create_flavor(flavor_name_not_public,
-                                                 self.ram, self.vcpus,
-                                                 self.disk,
-                                                 flavor_id_not_public,
-                                                 is_public="False")
+        flavor = self.client.create_flavor(flavor_name_not_public,
+                                           self.ram, self.vcpus,
+                                           self.disk,
+                                           flavor_id_not_public,
+                                           is_public="False")
         self.addCleanup(self.flavor_clean_up, flavor['id'])
 
         # Create a public flavor
-        resp, flavor = self.client.create_flavor(flavor_name_public,
-                                                 self.ram, self.vcpus,
-                                                 self.disk,
-                                                 flavor_id_public,
-                                                 is_public="True")
+        flavor = self.client.create_flavor(flavor_name_public,
+                                           self.ram, self.vcpus,
+                                           self.disk,
+                                           flavor_id_public,
+                                           is_public="True")
         self.addCleanup(self.flavor_clean_up, flavor['id'])
 
         def _flavor_lookup(flavors, flavor_name):
@@ -280,8 +269,7 @@
         def _test_string_variations(variations, flavor_name):
             for string in variations:
                 params = {'is_public': string}
-                r, flavors = self.client.list_flavors_with_detail(params)
-                self.assertEqual(r.status, 200)
+                flavors = self.client.list_flavors_with_detail(params)
                 flavor = _flavor_lookup(flavors, flavor_name)
                 self.assertIsNotNone(flavor)
 
@@ -297,12 +285,11 @@
         new_flavor_id = data_utils.rand_int_id(start=1000)
 
         ram = "1024"
-        resp, flavor = self.client.create_flavor(flavor_name,
-                                                 ram, self.vcpus,
-                                                 self.disk,
-                                                 new_flavor_id)
+        flavor = self.client.create_flavor(flavor_name,
+                                           ram, self.vcpus,
+                                           self.disk,
+                                           new_flavor_id)
         self.addCleanup(self.flavor_clean_up, flavor['id'])
-        self.assertEqual(200, resp.status)
         self.assertEqual(flavor['name'], flavor_name)
         self.assertEqual(flavor['vcpus'], self.vcpus)
         self.assertEqual(flavor['disk'], self.disk)
diff --git a/tempest/api/compute/admin/test_flavors_access.py b/tempest/api/compute/admin/test_flavors_access.py
index 19707d0..8a33ce7 100644
--- a/tempest/api/compute/admin/test_flavors_access.py
+++ b/tempest/api/compute/admin/test_flavors_access.py
@@ -49,15 +49,13 @@
         # private flavor will return an empty access list
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
         new_flavor_id = data_utils.rand_int_id(start=1000)
-        resp, new_flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     is_public='False')
+        new_flavor = self.client.create_flavor(flavor_name,
+                                               self.ram, self.vcpus,
+                                               self.disk,
+                                               new_flavor_id,
+                                               is_public='False')
         self.addCleanup(self.client.delete_flavor, new_flavor['id'])
-        self.assertEqual(resp.status, 200)
-        resp, flavor_access = self.client.list_flavor_access(new_flavor_id)
-        self.assertEqual(resp.status, 200)
+        flavor_access = self.client.list_flavor_access(new_flavor_id)
         self.assertEqual(len(flavor_access), 0, str(flavor_access))
 
     @test.attr(type='gate')
@@ -65,34 +63,30 @@
         # Test to add and remove flavor access to a given tenant.
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
         new_flavor_id = data_utils.rand_int_id(start=1000)
-        resp, new_flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     is_public='False')
+        new_flavor = self.client.create_flavor(flavor_name,
+                                               self.ram, self.vcpus,
+                                               self.disk,
+                                               new_flavor_id,
+                                               is_public='False')
         self.addCleanup(self.client.delete_flavor, new_flavor['id'])
         # Add flavor access to a tenant.
         resp_body = {
             "tenant_id": str(self.tenant_id),
             "flavor_id": str(new_flavor['id']),
         }
-        add_resp, add_body = \
+        add_body = \
             self.client.add_flavor_access(new_flavor['id'], self.tenant_id)
-        self.assertEqual(add_resp.status, 200)
         self.assertIn(resp_body, add_body)
 
         # The flavor is present in list.
-        resp, flavors = self.flavors_client.list_flavors_with_detail()
-        self.assertEqual(resp.status, 200)
+        flavors = self.flavors_client.list_flavors_with_detail()
         self.assertIn(new_flavor['id'], map(lambda x: x['id'], flavors))
 
         # Remove flavor access from a tenant.
-        remove_resp, remove_body = \
+        remove_body = \
             self.client.remove_flavor_access(new_flavor['id'], self.tenant_id)
-        self.assertEqual(remove_resp.status, 200)
         self.assertNotIn(resp_body, remove_body)
 
         # The flavor is not present in list.
-        resp, flavors = self.flavors_client.list_flavors_with_detail()
-        self.assertEqual(resp.status, 200)
+        flavors = self.flavors_client.list_flavors_with_detail()
         self.assertNotIn(new_flavor['id'], map(lambda x: x['id'], flavors))
diff --git a/tempest/api/compute/admin/test_flavors_access_negative.py b/tempest/api/compute/admin/test_flavors_access_negative.py
index c49652d..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
 
 
@@ -47,14 +47,13 @@
         # Test to list flavor access with exceptions by querying public flavor
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
         new_flavor_id = data_utils.rand_int_id(start=1000)
-        resp, new_flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     is_public='True')
+        new_flavor = self.client.create_flavor(flavor_name,
+                                               self.ram, self.vcpus,
+                                               self.disk,
+                                               new_flavor_id,
+                                               is_public='True')
         self.addCleanup(self.client.delete_flavor, new_flavor['id'])
-        self.assertEqual(resp.status, 200)
-        self.assertRaises(exceptions.NotFound,
+        self.assertRaises(lib_exc.NotFound,
                           self.client.list_flavor_access,
                           new_flavor_id)
 
@@ -63,13 +62,13 @@
         # Test to add flavor access as a user without admin privileges.
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
         new_flavor_id = data_utils.rand_int_id(start=1000)
-        resp, new_flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     is_public='False')
+        new_flavor = self.client.create_flavor(flavor_name,
+                                               self.ram, self.vcpus,
+                                               self.disk,
+                                               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)
@@ -79,17 +78,17 @@
         # Test to remove flavor access as a user without admin privileges.
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
         new_flavor_id = data_utils.rand_int_id(start=1000)
-        resp, new_flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     is_public='False')
+        new_flavor = self.client.create_flavor(flavor_name,
+                                               self.ram, self.vcpus,
+                                               self.disk,
+                                               new_flavor_id,
+                                               is_public='False')
         self.addCleanup(self.client.delete_flavor, new_flavor['id'])
         # Add flavor access to a tenant.
         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)
@@ -99,11 +98,11 @@
         # Create a new flavor.
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
         new_flavor_id = data_utils.rand_int_id(start=1000)
-        resp, new_flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     is_public='False')
+        new_flavor = self.client.create_flavor(flavor_name,
+                                               self.ram, self.vcpus,
+                                               self.disk,
+                                               new_flavor_id,
+                                               is_public='False')
         self.addCleanup(self.client.delete_flavor, new_flavor['id'])
 
         # Add flavor access to a tenant.
@@ -113,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)
@@ -123,15 +122,15 @@
         # Create a new flavor.
         flavor_name = data_utils.rand_name(self.flavor_name_prefix)
         new_flavor_id = data_utils.rand_int_id(start=1000)
-        resp, new_flavor = self.client.create_flavor(flavor_name,
-                                                     self.ram, self.vcpus,
-                                                     self.disk,
-                                                     new_flavor_id,
-                                                     is_public='False')
+        new_flavor = self.client.create_flavor(flavor_name,
+                                               self.ram, self.vcpus,
+                                               self.disk,
+                                               new_flavor_id,
+                                               is_public='False')
         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.py b/tempest/api/compute/admin/test_flavors_extra_specs.py
index 5157d2e..55c3358 100644
--- a/tempest/api/compute/admin/test_flavors_extra_specs.py
+++ b/tempest/api/compute/admin/test_flavors_extra_specs.py
@@ -43,16 +43,16 @@
         swap = 1024
         rxtx = 1
         # Create a flavor so as to set/get/unset extra specs
-        resp, cls.flavor = cls.client.create_flavor(flavor_name,
-                                                    ram, vcpus,
-                                                    disk,
-                                                    cls.new_flavor_id,
-                                                    ephemeral=ephemeral,
-                                                    swap=swap, rxtx=rxtx)
+        cls.flavor = cls.client.create_flavor(flavor_name,
+                                              ram, vcpus,
+                                              disk,
+                                              cls.new_flavor_id,
+                                              ephemeral=ephemeral,
+                                              swap=swap, rxtx=rxtx)
 
     @classmethod
     def resource_cleanup(cls):
-        resp, body = cls.client.delete_flavor(cls.flavor['id'])
+        cls.client.delete_flavor(cls.flavor['id'])
         cls.client.wait_for_resource_deletion(cls.flavor['id'])
         super(FlavorsExtraSpecsTestJSON, cls).resource_cleanup()
 
@@ -63,47 +63,34 @@
         # Assigning extra specs values that are to be set
         specs = {"key1": "value1", "key2": "value2"}
         # SET extra specs to the flavor created in setUp
-        set_resp, set_body = \
+        set_body = \
             self.client.set_flavor_extra_spec(self.flavor['id'], specs)
-        self.assertEqual(set_resp.status, 200)
         self.assertEqual(set_body, specs)
         # GET extra specs and verify
-        get_resp, get_body = \
-            self.client.get_flavor_extra_spec(self.flavor['id'])
-        self.assertEqual(get_resp.status, 200)
+        get_body = self.client.get_flavor_extra_spec(self.flavor['id'])
         self.assertEqual(get_body, specs)
 
         # UPDATE the value of the extra specs key1
-        update_resp, update_body = \
+        update_body = \
             self.client.update_flavor_extra_spec(self.flavor['id'],
                                                  "key1",
                                                  key1="value")
-        self.assertEqual(update_resp.status, 200)
         self.assertEqual({"key1": "value"}, update_body)
 
         # GET extra specs and verify the value of the key2
         # is the same as before
-        get_resp, get_body = \
-            self.client.get_flavor_extra_spec(self.flavor['id'])
-        self.assertEqual(get_resp.status, 200)
+        get_body = self.client.get_flavor_extra_spec(self.flavor['id'])
         self.assertEqual(get_body, {"key1": "value", "key2": "value2"})
 
         # UNSET extra specs that were set in this test
-        unset_resp, _ = \
-            self.client.unset_flavor_extra_spec(self.flavor['id'], "key1")
-        self.assertEqual(unset_resp.status, 200)
-        unset_resp, _ = \
-            self.client.unset_flavor_extra_spec(self.flavor['id'], "key2")
-        self.assertEqual(unset_resp.status, 200)
+        self.client.unset_flavor_extra_spec(self.flavor['id'], "key1")
+        self.client.unset_flavor_extra_spec(self.flavor['id'], "key2")
 
     @test.attr(type='gate')
     def test_flavor_non_admin_get_all_keys(self):
         specs = {"key1": "value1", "key2": "value2"}
-        set_resp, set_body = self.client.set_flavor_extra_spec(
-            self.flavor['id'], specs)
-        resp, body = self.flavors_client.get_flavor_extra_spec(
-            self.flavor['id'])
-        self.assertEqual(resp.status, 200)
+        self.client.set_flavor_extra_spec(self.flavor['id'], specs)
+        body = self.flavors_client.get_flavor_extra_spec(self.flavor['id'])
 
         for key in specs:
             self.assertEqual(body[key], specs[key])
@@ -111,13 +98,10 @@
     @test.attr(type='gate')
     def test_flavor_non_admin_get_specific_key(self):
         specs = {"key1": "value1", "key2": "value2"}
-        resp, body = self.client.set_flavor_extra_spec(
-            self.flavor['id'], specs)
-        self.assertEqual(resp.status, 200)
+        body = self.client.set_flavor_extra_spec(self.flavor['id'], specs)
         self.assertEqual(body['key1'], 'value1')
         self.assertIn('key2', body)
-        resp, body = self.flavors_client.get_flavor_extra_spec_with_key(
+        body = self.flavors_client.get_flavor_extra_spec_with_key(
             self.flavor['id'], 'key1')
-        self.assertEqual(resp.status, 200)
         self.assertEqual(body['key1'], 'value1')
         self.assertNotIn('key2', body)
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 20860c8..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
 
 
@@ -44,16 +45,16 @@
         swap = 1024
         rxtx = 1
         # Create a flavor
-        resp, cls.flavor = cls.client.create_flavor(flavor_name,
-                                                    ram, vcpus,
-                                                    disk,
-                                                    cls.new_flavor_id,
-                                                    ephemeral=ephemeral,
-                                                    swap=swap, rxtx=rxtx)
+        cls.flavor = cls.client.create_flavor(flavor_name,
+                                              ram, vcpus,
+                                              disk,
+                                              cls.new_flavor_id,
+                                              ephemeral=ephemeral,
+                                              swap=swap, rxtx=rxtx)
 
     @classmethod
     def resource_cleanup(cls):
-        resp, body = cls.client.delete_flavor(cls.flavor['id'])
+        cls.client.delete_flavor(cls.flavor['id'])
         cls.client.wait_for_resource_deletion(cls.flavor['id'])
         super(FlavorsExtraSpecsNegativeTestJSON, cls).resource_cleanup()
 
@@ -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)
@@ -70,11 +71,10 @@
     def test_flavor_non_admin_update_specific_key(self):
         # non admin user is not allowed to update flavor extra spec
         specs = {"key1": "value1", "key2": "value2"}
-        resp, body = self.client.set_flavor_extra_spec(
+        body = self.client.set_flavor_extra_spec(
             self.flavor['id'], specs)
-        self.assertEqual(resp.status, 200)
         self.assertEqual(body['key1'], 'value1')
-        self.assertRaises(exceptions.Unauthorized,
+        self.assertRaises(lib_exc.Unauthorized,
                           self.flavors_client.
                           update_flavor_extra_spec,
                           self.flavor['id'],
@@ -84,10 +84,9 @@
     @test.attr(type=['negative', 'gate'])
     def test_flavor_non_admin_unset_keys(self):
         specs = {"key1": "value1", "key2": "value2"}
-        set_resp, set_body = self.client.set_flavor_extra_spec(
-            self.flavor['id'], specs)
+        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')
@@ -95,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")
@@ -110,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",
@@ -119,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 fb27360..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
 
 
@@ -59,27 +60,23 @@
 
         # no need to specify flavor_id, we can get the flavor_id from a
         # response of create_flavor() call.
-        resp, flavor = self.client.create_flavor(flavor_name,
-                                                 self.ram,
-                                                 self.vcpus, self.disk,
-                                                 None,
-                                                 ephemeral=self.ephemeral,
-                                                 swap=self.swap,
-                                                 rxtx=self.rxtx)
+        flavor = self.client.create_flavor(flavor_name,
+                                           self.ram,
+                                           self.vcpus, self.disk,
+                                           None,
+                                           ephemeral=self.ephemeral,
+                                           swap=self.swap,
+                                           rxtx=self.rxtx)
         # Delete the flavor
         new_flavor_id = flavor['id']
-        resp_delete, body = self.client.delete_flavor(new_flavor_id)
-        self.assertEqual(200, resp.status)
-        self.assertEqual(202, resp_delete.status)
+        self.client.delete_flavor(new_flavor_id)
 
         # Deleted flavors can be seen via detailed GET
-        resp, flavor = self.client.get_flavor_details(new_flavor_id)
-        self.assertEqual(resp.status, 200)
+        flavor = self.client.get_flavor_details(new_flavor_id)
         self.assertEqual(flavor['name'], flavor_name)
 
         # Deleted flavors should not show up in a list however
-        resp, flavors = self.client.list_flavors_with_detail()
-        self.assertEqual(resp.status, 200)
+        flavors = self.client.list_flavors_with_detail()
         flag = True
         for flavor in flavors:
             if flavor['name'] == flavor_name:
@@ -92,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,
@@ -101,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)
 
@@ -109,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.py b/tempest/api/compute/admin/test_quotas.py
index fc70fdb..b0fcf94 100644
--- a/tempest/api/compute/admin/test_quotas.py
+++ b/tempest/api/compute/admin/test_quotas.py
@@ -54,9 +54,8 @@
     def test_get_default_quotas(self):
         # Admin can get the default resource quota set for a tenant
         expected_quota_set = self.default_quota_set | set(['id'])
-        resp, quota_set = self.adm_client.get_default_quota_set(
+        quota_set = self.adm_client.get_default_quota_set(
             self.demo_tenant_id)
-        self.assertEqual(200, resp.status)
         self.assertEqual(quota_set['id'], self.demo_tenant_id)
         for quota in expected_quota_set:
             self.assertIn(quota, quota_set.keys())
@@ -64,7 +63,7 @@
     @test.attr(type='gate')
     def test_update_all_quota_resources_for_tenant(self):
         # Admin can update all the resource quota limits for a tenant
-        resp, default_quota_set = self.adm_client.get_default_quota_set(
+        default_quota_set = self.adm_client.get_default_quota_set(
             self.demo_tenant_id)
         new_quota_set = {'injected_file_content_bytes': 20480,
                          'metadata_items': 256, 'injected_files': 10,
@@ -73,7 +72,7 @@
                          'instances': 20, 'security_group_rules': 20,
                          'cores': 2, 'security_groups': 20}
         # Update limits for all quota resources
-        resp, quota_set = self.adm_client.update_quota_set(
+        quota_set = self.adm_client.update_quota_set(
             self.demo_tenant_id,
             force=True,
             **new_quota_set)
@@ -88,7 +87,6 @@
             default_quota_set.pop('server_group_members')
         self.addCleanup(self.adm_client.update_quota_set,
                         self.demo_tenant_id, **default_quota_set)
-        self.assertEqual(200, resp.status)
         for quota in new_quota_set:
             self.assertIn(quota, quota_set.keys())
 
@@ -105,8 +103,7 @@
         self.addCleanup(identity_client.delete_tenant, tenant_id)
 
         self.adm_client.update_quota_set(tenant_id, ram='5120')
-        resp, quota_set = self.adm_client.get_quota_set(tenant_id)
-        self.assertEqual(200, resp.status)
+        quota_set = self.adm_client.get_quota_set(tenant_id)
         self.assertEqual(5120, quota_set['ram'])
 
         # Verify that GET shows the updated quota set of user
@@ -123,9 +120,8 @@
         self.adm_client.update_quota_set(tenant_id,
                                          user_id=user_id,
                                          ram='2048')
-        resp, quota_set = self.adm_client.get_quota_set(tenant_id,
-                                                        user_id=user_id)
-        self.assertEqual(200, resp.status)
+        quota_set = self.adm_client.get_quota_set(tenant_id,
+                                                  user_id=user_id)
         self.assertEqual(2048, quota_set['ram'])
 
     @test.attr(type='gate')
@@ -138,17 +134,14 @@
                                                description=tenant_desc)
         tenant_id = tenant['id']
         self.addCleanup(identity_client.delete_tenant, tenant_id)
-        resp, quota_set_default = self.adm_client.get_quota_set(tenant_id)
+        quota_set_default = self.adm_client.get_quota_set(tenant_id)
         ram_default = quota_set_default['ram']
 
-        resp, body = self.adm_client.update_quota_set(tenant_id, ram='5120')
-        self.assertEqual(200, resp.status)
+        self.adm_client.update_quota_set(tenant_id, ram='5120')
 
-        resp, body = self.adm_client.delete_quota_set(tenant_id)
-        self.assertEqual(202, resp.status)
+        self.adm_client.delete_quota_set(tenant_id)
 
-        resp, quota_set_new = self.adm_client.get_quota_set(tenant_id)
-        self.assertEqual(200, resp.status)
+        quota_set_new = self.adm_client.get_quota_set(tenant_id)
         self.assertEqual(ram_default, quota_set_new['ram'])
 
 
@@ -169,9 +162,8 @@
 
     def _restore_default_quotas(self, original_defaults):
         LOG.debug("restoring quota class defaults")
-        resp, body = self.adm_client.update_quota_class_set(
+        self.adm_client.update_quota_class_set(
             'default', **original_defaults)
-        self.assertEqual(200, resp.status)
 
     # NOTE(sdague): this test is problematic as it changes
     # global state, and possibly needs to be part of a set of
@@ -179,8 +171,7 @@
     # 'danger' flag.
     def test_update_default_quotas(self):
         LOG.debug("get the current 'default' quota class values")
-        resp, body = self.adm_client.get_quota_class_set('default')
-        self.assertEqual(200, resp.status)
+        body = self.adm_client.get_quota_class_set('default')
         self.assertIn('id', body)
         self.assertEqual('default', body.pop('id'))
         # restore the defaults when the test is done
@@ -192,9 +183,8 @@
             # to a very small number which causes issues.
             body[quota] = default + 100
         LOG.debug("update limits for the default quota class set")
-        resp, update_body = self.adm_client.update_quota_class_set('default',
-                                                                   **body)
-        self.assertEqual(200, resp.status)
+        update_body = self.adm_client.update_quota_class_set('default',
+                                                             **body)
         LOG.debug("assert that the response has all of the changed values")
         self.assertThat(update_body.items(),
                         matchers.ContainsAll(body.items()))
diff --git a/tempest/api/compute/admin/test_quotas_negative.py b/tempest/api/compute/admin/test_quotas_negative.py
index 0c511d7..2fb7be6 100644
--- a/tempest/api/compute/admin/test_quotas_negative.py
+++ b/tempest/api/compute/admin/test_quotas_negative.py
@@ -12,10 +12,12 @@
 #    License for the specific language governing permissions and limitations
 #    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
@@ -37,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)
@@ -47,23 +49,23 @@
     @test.attr(type=['negative', 'gate'])
     def test_create_server_when_cpu_quota_is_full(self):
         # Disallow server creation when tenant's vcpu quota is full
-        resp, quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
+        quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
         default_vcpu_quota = quota_set['cores']
         vcpu_quota = 0  # Set the quota to zero to conserve resources
 
-        resp, quota_set = self.adm_client.update_quota_set(self.demo_tenant_id,
-                                                           force=True,
-                                                           cores=vcpu_quota)
+        quota_set = self.adm_client.update_quota_set(self.demo_tenant_id,
+                                                     force=True,
+                                                     cores=vcpu_quota)
 
         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'])
     def test_create_server_when_memory_quota_is_full(self):
         # Disallow server creation when tenant's memory quota is full
-        resp, quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
+        quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
         default_mem_quota = quota_set['ram']
         mem_quota = 0  # Set the quota to zero to conserve resources
 
@@ -73,13 +75,13 @@
 
         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'])
     def test_create_server_when_instances_quota_is_full(self):
         # Once instances quota limit is reached, disallow server creation
-        resp, quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
+        quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
         default_instances_quota = quota_set['instances']
         instances_quota = 0  # Set quota to zero to disallow server creation
 
@@ -88,21 +90,21 @@
                                          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)
 
-    @test.skip_because(bug="1186354",
-                       condition=CONF.service_available.neutron)
+    @decorators.skip_because(bug="1186354",
+                             condition=CONF.service_available.neutron)
     @test.attr(type='gate')
     @test.services('network')
     def test_security_groups_exceed_limit(self):
         # Negative test: Creation Security Groups over limit should FAIL
 
-        resp, quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
+        quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
         default_sg_quota = quota_set['security_groups']
         sg_quota = 0  # Set the quota to zero to conserve resources
 
-        resp, quota_set =\
+        quota_set =\
             self.adm_client.update_quota_set(self.demo_tenant_id,
                                              force=True,
                                              security_groups=sg_quota)
@@ -114,23 +116,23 @@
         # 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")
 
-    @test.skip_because(bug="1186354",
-                       condition=CONF.service_available.neutron)
+    @decorators.skip_because(bug="1186354",
+                             condition=CONF.service_available.neutron)
     @test.attr(type=['negative', 'gate'])
     @test.services('network')
     def test_security_groups_rules_exceed_limit(self):
         # Negative test: Creation of Security Group Rules should FAIL
         # when we reach limit maxSecurityGroupRules
 
-        resp, quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
+        quota_set = self.adm_client.get_quota_set(self.demo_tenant_id)
         default_sg_rules_quota = quota_set['security_group_rules']
         sg_rules_quota = 0  # Set the quota to zero to conserve resources
 
-        resp, quota_set =\
+        quota_set =\
             self.adm_client.update_quota_set(
                 self.demo_tenant_id,
                 force=True,
@@ -153,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..31103df 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
@@ -59,7 +59,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 5210077..6110b89 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -12,6 +12,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import decorators
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import test
@@ -33,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')
@@ -59,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
@@ -102,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}
@@ -130,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'
@@ -138,11 +138,11 @@
         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')
-    @test.skip_because(bug="1240043")
+    @decorators.skip_because(bug="1240043")
     def test_get_server_diagnostics_by_admin(self):
         # Retrieve server diagnostics by admin user
         resp, diagnostic = self.client.get_server_diagnostics(self.s1_id)
@@ -177,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
@@ -197,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 2f0af72..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,16 +41,16 @@
         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):
         flavor_id = data_utils.rand_int_id(start=1000)
         while True:
             try:
-                resp, body = self.flavors_client.get_flavor_details(flavor_id)
-            except exceptions.NotFound:
+                self.flavors_client.get_flavor_details(flavor_id)
+            except lib_exc.NotFound:
                 break
             flavor_id = data_utils.rand_int_id(start=1000)
         return flavor_id
@@ -63,16 +63,15 @@
         self.useFixture(fixtures.LockFixture('compute_quotas'))
         flavor_name = data_utils.rand_name("flavor-")
         flavor_id = self._get_unused_flavor_id()
-        resp, quota_set = self.quotas_client.get_default_quota_set(
-            self.tenant_id)
+        quota_set = self.quotas_client.get_default_quota_set(self.tenant_id)
         ram = int(quota_set['ram']) + 1
         vcpus = 8
         disk = 10
-        resp, flavor_ref = self.flavors_client.create_flavor(flavor_name,
-                                                             ram, vcpus, disk,
-                                                             flavor_id)
+        flavor_ref = self.flavors_client.create_flavor(flavor_name,
+                                                       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'])
@@ -86,47 +85,46 @@
         flavor_name = data_utils.rand_name("flavor-")
         flavor_id = self._get_unused_flavor_id()
         ram = 512
-        resp, quota_set = self.quotas_client.get_default_quota_set(
-            self.tenant_id)
+        quota_set = self.quotas_client.get_default_quota_set(self.tenant_id)
         vcpus = int(quota_set['cores']) + 1
         disk = 10
-        resp, flavor_ref = self.flavors_client.create_flavor(flavor_name,
-                                                             ram, vcpus, disk,
-                                                             flavor_id)
+        flavor_ref = self.flavors_client.create_flavor(flavor_name,
+                                                       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()))
 
@@ -137,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..4120a9a 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -13,6 +13,7 @@
 #    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
@@ -107,7 +108,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 +148,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 +161,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 +175,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:
@@ -198,7 +199,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 +227,7 @@
 
         cls.servers.extend(servers)
 
-        return resp, body
+        return body
 
     @classmethod
     def create_security_group(cls, name=None, description=None):
@@ -274,7 +275,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 +317,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,20 +329,17 @@
 
 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)
+            cls.os_adm = clients.Manager(credentials=creds)
         except NotImplementedError:
             msg = ("Missing Compute Admin API credentials in configuration.")
             raise cls.skipException(msg)
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/flavors/test_flavors.py b/tempest/api/compute/flavors/test_flavors.py
index 992f86a..c91ce17 100644
--- a/tempest/api/compute/flavors/test_flavors.py
+++ b/tempest/api/compute/flavors/test_flavors.py
@@ -31,8 +31,8 @@
     @test.attr(type='smoke')
     def test_list_flavors(self):
         # List of all flavors should contain the expected flavor
-        resp, flavors = self.client.list_flavors()
-        resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+        flavors = self.client.list_flavors()
+        flavor = self.client.get_flavor_details(self.flavor_ref)
         flavor_min_detail = {'id': flavor['id'], 'links': flavor['links'],
                              'name': flavor['name']}
         self.assertIn(flavor_min_detail, flavors)
@@ -40,88 +40,88 @@
     @test.attr(type='smoke')
     def test_list_flavors_with_detail(self):
         # Detailed list of all flavors should contain the expected flavor
-        resp, flavors = self.client.list_flavors_with_detail()
-        resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+        flavors = self.client.list_flavors_with_detail()
+        flavor = self.client.get_flavor_details(self.flavor_ref)
         self.assertIn(flavor, flavors)
 
     @test.attr(type='smoke')
     def test_get_flavor(self):
         # The expected flavor details should be returned
-        resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+        flavor = self.client.get_flavor_details(self.flavor_ref)
         self.assertEqual(self.flavor_ref, flavor['id'])
 
     @test.attr(type='gate')
     def test_list_flavors_limit_results(self):
         # Only the expected number of flavors should be returned
         params = {'limit': 1}
-        resp, flavors = self.client.list_flavors(params)
+        flavors = self.client.list_flavors(params)
         self.assertEqual(1, len(flavors))
 
     @test.attr(type='gate')
     def test_list_flavors_detailed_limit_results(self):
         # Only the expected number of flavors (detailed) should be returned
         params = {'limit': 1}
-        resp, flavors = self.client.list_flavors_with_detail(params)
+        flavors = self.client.list_flavors_with_detail(params)
         self.assertEqual(1, len(flavors))
 
     @test.attr(type='gate')
     def test_list_flavors_using_marker(self):
         # The list of flavors should start from the provided marker
-        resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+        flavor = self.client.get_flavor_details(self.flavor_ref)
         flavor_id = flavor['id']
 
         params = {'marker': flavor_id}
-        resp, flavors = self.client.list_flavors(params)
+        flavors = self.client.list_flavors(params)
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]),
                          'The list of flavors did not start after the marker.')
 
     @test.attr(type='gate')
     def test_list_flavors_detailed_using_marker(self):
         # The list of flavors should start from the provided marker
-        resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+        flavor = self.client.get_flavor_details(self.flavor_ref)
         flavor_id = flavor['id']
 
         params = {'marker': flavor_id}
-        resp, flavors = self.client.list_flavors_with_detail(params)
+        flavors = self.client.list_flavors_with_detail(params)
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]),
                          'The list of flavors did not start after the marker.')
 
     @test.attr(type='gate')
     def test_list_flavors_detailed_filter_by_min_disk(self):
         # The detailed list of flavors should be filtered by disk space
-        resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+        flavor = self.client.get_flavor_details(self.flavor_ref)
         flavor_id = flavor['id']
 
         params = {self._min_disk: flavor['disk'] + 1}
-        resp, flavors = self.client.list_flavors_with_detail(params)
+        flavors = self.client.list_flavors_with_detail(params)
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
 
     @test.attr(type='gate')
     def test_list_flavors_detailed_filter_by_min_ram(self):
         # The detailed list of flavors should be filtered by RAM
-        resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+        flavor = self.client.get_flavor_details(self.flavor_ref)
         flavor_id = flavor['id']
 
         params = {self._min_ram: flavor['ram'] + 1}
-        resp, flavors = self.client.list_flavors_with_detail(params)
+        flavors = self.client.list_flavors_with_detail(params)
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
 
     @test.attr(type='gate')
     def test_list_flavors_filter_by_min_disk(self):
         # The list of flavors should be filtered by disk space
-        resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+        flavor = self.client.get_flavor_details(self.flavor_ref)
         flavor_id = flavor['id']
 
         params = {self._min_disk: flavor['disk'] + 1}
-        resp, flavors = self.client.list_flavors(params)
+        flavors = self.client.list_flavors(params)
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
 
     @test.attr(type='gate')
     def test_list_flavors_filter_by_min_ram(self):
         # The list of flavors should be filtered by RAM
-        resp, flavor = self.client.get_flavor_details(self.flavor_ref)
+        flavor = self.client.get_flavor_details(self.flavor_ref)
         flavor_id = flavor['id']
 
         params = {self._min_ram: flavor['ram'] + 1}
-        resp, flavors = self.client.list_flavors(params)
+        flavors = self.client.list_flavors(params)
         self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
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..2fce564 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
 
 
@@ -32,10 +31,10 @@
         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 +42,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 +50,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 +58,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 +74,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 +88,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 +108,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..08e73ca 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
@@ -33,11 +34,11 @@
         cls.client = cls.floating_ips_client
 
         # 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 +53,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 +64,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 +73,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 +82,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 +91,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..ca46918 100644
--- a/tempest/api/compute/floating_ips/test_list_floating_ips.py
+++ b/tempest/api/compute/floating_ips/test_list_floating_ips.py
@@ -26,7 +26,7 @@
         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 +40,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 +52,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 +72,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..b3ff132 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
@@ -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 6156c5a..12aa886 100644
--- a/tempest/api/compute/images/test_images_oneserver.py
+++ b/tempest/api/compute/images/test_images_oneserver.py
@@ -59,11 +59,11 @@
                         % 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):
-        resp, flavor = self.flavors_client.get_flavor_details(flavor_id)
+        flavor = self.flavors_client.get_flavor_details(flavor_id)
         return flavor['disk']
 
     @test.attr(type='smoke')
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.py b/tempest/api/compute/keypairs/test_keypairs.py
index ce10fbe..d7884ab 100644
--- a/tempest/api/compute/keypairs/test_keypairs.py
+++ b/tempest/api/compute/keypairs/test_keypairs.py
@@ -28,12 +28,12 @@
         cls.client = cls.keypairs_client
 
     def _delete_keypair(self, keypair_name):
-        resp, _ = self.client.delete_keypair(keypair_name)
+        self.client.delete_keypair(keypair_name)
 
     def _create_keypair(self, keypair_name, pub_key=None):
-        resp, body = self.client.create_keypair(keypair_name, pub_key)
+        body = self.client.create_keypair(keypair_name, pub_key)
         self.addCleanup(self._delete_keypair, keypair_name)
-        return resp, body
+        return body
 
     @test.attr(type='gate')
     def test_keypairs_create_list_delete(self):
@@ -42,7 +42,7 @@
         key_list = list()
         for i in range(3):
             k_name = data_utils.rand_name('keypair-')
-            resp, keypair = self._create_keypair(k_name)
+            keypair = self._create_keypair(k_name)
             # Need to pop these keys so that our compare doesn't fail later,
             # as the keypair dicts from list API doesn't have them.
             keypair.pop('private_key')
@@ -50,8 +50,7 @@
             key_list.append(keypair)
         # Fetch all keypairs and verify the list
         # has all created keypairs
-        resp, fetched_list = self.client.list_keypairs()
-        self.assertEqual(200, resp.status)
+        fetched_list = self.client.list_keypairs()
         # We need to remove the extra 'keypair' element in the
         # returned dict. See comment in keypairs_client.list_keypairs()
         new_list = list()
@@ -68,7 +67,7 @@
     def test_keypair_create_delete(self):
         # Keypair should be created, verified and deleted
         k_name = data_utils.rand_name('keypair-')
-        resp, keypair = self._create_keypair(k_name)
+        keypair = self._create_keypair(k_name)
         private_key = keypair['private_key']
         key_name = keypair['name']
         self.assertEqual(key_name, k_name,
@@ -81,9 +80,8 @@
     def test_get_keypair_detail(self):
         # Keypair should be created, Got details by name and deleted
         k_name = data_utils.rand_name('keypair-')
-        resp, keypair = self._create_keypair(k_name)
-        resp, keypair_detail = self.client.get_keypair(k_name)
-        self.assertEqual(200, resp.status)
+        self._create_keypair(k_name)
+        keypair_detail = self.client.get_keypair(k_name)
         self.assertIn('name', keypair_detail)
         self.assertIn('public_key', keypair_detail)
         self.assertEqual(keypair_detail['name'], k_name,
@@ -106,7 +104,7 @@
                    "LOeB1kYMOBaiUPLQTWXR3JpckqFIQwhIH0zoHlJvZE8hh90"
                    "XcPojYN56tI0OlrGqojbediJYD0rUsJu4weZpbn8vilb3JuDY+jws"
                    "snSA8wzBx3A/8y9Pp1B nova@ubuntu")
-        resp, keypair = self._create_keypair(k_name, pub_key)
+        keypair = self._create_keypair(k_name, pub_key)
         self.assertFalse('private_key' in keypair,
                          "Field private_key is not empty!")
         key_name = keypair['name']
diff --git a/tempest/api/compute/keypairs/test_keypairs_negative.py b/tempest/api/compute/keypairs/test_keypairs_negative.py
index 2cc6f00..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,37 +60,35 @@
         # 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'])
     def test_create_keypair_with_duplicate_name(self):
         # Keypairs with duplicate names should not be created
         k_name = data_utils.rand_name('keypair-')
-        resp, _ = self.client.create_keypair(k_name)
-        self.assertEqual(200, resp.status)
+        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)
-        resp, _ = self.client.delete_keypair(k_name)
-        self.assertEqual(202, resp.status)
+        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 4420ac7..520dfa9 100644
--- a/tempest/api/compute/limits/test_absolute_limits.py
+++ b/tempest/api/compute/limits/test_absolute_limits.py
@@ -27,7 +27,7 @@
     @test.attr(type='gate')
     def test_absLimits_get(self):
         # To check if all limits are present in the response
-        resp, absolute_limits = self.client.get_absolute_limits()
+        absolute_limits = self.client.get_absolute_limits()
         expected_elements = ['maxImageMeta', 'maxPersonality',
                              'maxPersonalitySize',
                              'maxServerMeta', 'maxTotalCores',
diff --git a/tempest/api/compute/limits/test_absolute_limits_negative.py b/tempest/api/compute/limits/test_absolute_limits_negative.py
index d537d83..9776db3 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
 
 
@@ -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/test_security_group_rules_negative.py b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
index d97c404..dc63936 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
@@ -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..0f68665 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.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.security_groups import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -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 988482b..4c8de27 100644
--- a/tempest/api/compute/security_groups/test_security_groups_negative.py
+++ b/tempest/api/compute/security_groups/test_security_groups_negative.py
@@ -13,12 +13,13 @@
 #    License for the specific language governing permissions and limitations
 #    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
@@ -52,11 +53,11 @@
         # 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)
 
-    @test.skip_because(bug="1161411",
-                       condition=CONF.service_available.neutron)
+    @decorators.skip_because(bug="1161411",
+                             condition=CONF.service_available.neutron)
     @test.attr(type=['negative', 'smoke'])
     @test.services('network')
     def test_security_group_create_with_invalid_group_name(self):
@@ -64,20 +65,20 @@
         # 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)
 
-    @test.skip_because(bug="1161411",
-                       condition=CONF.service_available.neutron)
+    @decorators.skip_because(bug="1161411",
+                             condition=CONF.service_available.neutron)
     @test.attr(type=['negative', 'smoke'])
     @test.services('network')
     def test_security_group_create_with_invalid_group_description(self):
@@ -85,14 +86,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)
 
@@ -107,7 +108,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)
 
@@ -122,7 +123,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)
 
@@ -131,7 +132,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'])
@@ -139,7 +140,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,
@@ -152,7 +153,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)
 
@@ -167,7 +168,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)
 
@@ -182,7 +183,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)
 
@@ -193,7 +194,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..c0b58ff 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -49,7 +49,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 +148,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 13ec045..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):
@@ -89,7 +89,7 @@
     def test_verify_created_server_vcpus(self):
         # Verify that the number of vcpus reported by the instance matches
         # the amount stated by the flavor
-        resp, flavor = self.flavors_client.get_flavor_details(self.flavor_ref)
+        flavor = self.flavors_client.get_flavor_details(self.flavor_ref)
         linux_client = remote_client.RemoteClient(self.server, self.ssh_user,
                                                   self.password)
         self.assertEqual(flavor['vcpus'], linux_client.get_number_of_vcpus())
@@ -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
@@ -210,13 +209,12 @@
             disk = 0
 
             # Create a flavor with extra specs
-            resp, flavor = (self.flavor_client.
-                            create_flavor(flavor_with_eph_disk_name,
-                                          ram, vcpus, disk,
-                                          flavor_with_eph_disk_id,
-                                          ephemeral=1))
+            flavor = (self.flavor_client.
+                      create_flavor(flavor_with_eph_disk_name,
+                                    ram, vcpus, disk,
+                                    flavor_with_eph_disk_id,
+                                    ephemeral=1))
             self.addCleanup(flavor_clean_up, flavor['id'])
-            self.assertEqual(200, resp.status)
 
             return flavor['id']
 
@@ -229,18 +227,16 @@
             disk = 0
 
             # Create a flavor without extra specs
-            resp, flavor = (self.flavor_client.
-                            create_flavor(flavor_no_eph_disk_name,
-                                          ram, vcpus, disk,
-                                          flavor_no_eph_disk_id))
+            flavor = (self.flavor_client.
+                      create_flavor(flavor_no_eph_disk_name,
+                                    ram, vcpus, disk,
+                                    flavor_no_eph_disk_id))
             self.addCleanup(flavor_clean_up, flavor['id'])
-            self.assertEqual(200, resp.status)
 
             return flavor['id']
 
         def flavor_clean_up(flavor_id):
-            resp, body = self.flavor_client.delete_flavor(flavor_id)
-            self.assertEqual(resp.status, 202)
+            self.flavor_client.delete_flavor(flavor_id)
             self.flavor_client.wait_for_resource_deletion(flavor_id)
 
         flavor_with_eph_disk_id = create_flavor_with_extra_specs()
@@ -248,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 9d1ea9e..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,18 +115,17 @@
         # 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')
 
-        resp, volume = volumes_client.create_volume(1)
+        volume = volumes_client.create_volume(1)
         self.addCleanup(volumes_client.delete_volume, volume['id'])
         volumes_client.wait_for_volume_status(volume['id'], 'available')
-        resp, body = self.client.attach_volume(server['id'],
-                                               volume['id'],
-                                               device=device)
+        self.client.attach_volume(server['id'],
+                                  volume['id'],
+                                  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 7964cf7..c5148c1 100644
--- a/tempest/api/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -13,11 +13,13 @@
 #    License for the specific language governing permissions and limitations
 #    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
@@ -46,29 +48,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:
@@ -259,7 +261,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)
@@ -269,14 +271,14 @@
         self.assertNotIn(self.s2_name, map(lambda x: x['name'], servers))
         self.assertNotIn(self.s3_name, map(lambda x: x['name'], servers))
 
-    @test.skip_because(bug="1182883",
-                       condition=CONF.service_available.neutron)
+    @decorators.skip_because(bug="1182883",
+                             condition=CONF.service_available.neutron)
     @test.attr(type='gate')
     def test_list_servers_filtered_by_ip_regex(self):
         # 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 17e3669..f849b8c 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -17,13 +17,14 @@
 import logging
 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
@@ -46,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()
@@ -70,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()
@@ -78,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()
@@ -100,7 +101,7 @@
         # The server should be power cycled
         self._test_reboot_server('HARD')
 
-    @test.skip_because(bug="1014647")
+    @decorators.skip_because(bug="1014647")
     @test.attr(type='smoke')
     def test_reboot_server_soft(self):
         # The server should be signaled to reboot gracefully
@@ -130,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'])
@@ -147,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
@@ -164,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)
 
@@ -176,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
@@ -203,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:
@@ -239,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,
@@ -261,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 "
@@ -357,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'],
@@ -382,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)
@@ -434,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)
@@ -459,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..46e8642 100644
--- a/tempest/api/compute/servers/test_server_addresses.py
+++ b/tempest/api/compute/servers/test_server_addresses.py
@@ -26,7 +26,7 @@
         super(ServerAddressesTestJSON, 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='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..3329583 100644
--- a/tempest/api/compute/servers/test_server_addresses_negative.py
+++ b/tempest/api/compute/servers/test_server_addresses_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.compute import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -26,19 +27,19 @@
         super(ServerAddressesNegativeTestJSON, 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=['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_group.py b/tempest/api/compute/servers/test_server_group.py
index 0af19c0..fe5dca0 100644
--- a/tempest/api/compute/servers/test_server_group.py
+++ b/tempest/api/compute/servers/test_server_group.py
@@ -13,6 +13,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import decorators
+
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest import test
@@ -74,7 +76,7 @@
         policy = ['anti-affinity']
         self._create_delete_server_group(policy)
 
-    @test.skip_because(bug="1324348")
+    @decorators.skip_because(bug="1324348")
     @test.attr(type='gate')
     def test_create_delete_server_group_with_multiple_policies(self):
         # Create and Delete the server-group with multiple policies
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 ee1e652..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')
@@ -122,7 +123,7 @@
         # A 403 Forbidden or 413 Overlimit (old behaviour) exception
         # will be raised while exceeding metadata items limit for
         # tenant.
-        _, quota_set = self.quotas.get_quota_set(self.tenant_id)
+        quota_set = self.quotas.get_quota_set(self.tenant_id)
         quota_metadata = quota_set['metadata_items']
         if quota_metadata == -1:
             raise self.skipException("No limit for metadata_items")
@@ -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..a1658df 100644
--- a/tempest/api/compute/servers/test_server_rescue.py
+++ b/tempest/api/compute/servers/test_server_rescue.py
@@ -33,7 +33,7 @@
         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 +46,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 +90,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 f1e2f7f..0583106 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
@@ -36,8 +37,8 @@
         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']
@@ -49,7 +50,7 @@
         cls.servers_client.wait_for_server_status(cls.server_id, 'ACTIVE')
 
     def _create_volume(self):
-        resp, volume = self.volumes_extensions_client.create_volume(
+        volume = self.volumes_extensions_client.create_volume(
             1, display_name=data_utils.rand_name(
                 self.__class__.__name__ + '_volume'))
         self.addCleanup(self.delete_volume, volume['id'])
@@ -81,26 +82,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 +118,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 +145,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 aba6dff..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)
 
@@ -62,38 +62,37 @@
         # Specify a keypair while creating a server
 
         key_name = data_utils.rand_name('key')
-        resp, keypair = self.keypairs_client.create_keypair(key_name)
-        resp, body = self.keypairs_client.list_keypairs()
-        resp, server = self.create_test_server(key_name=key_name)
-        self.assertEqual('202', resp['status'])
+        self.keypairs_client.create_keypair(key_name)
+        self.keypairs_client.list_keypairs()
+        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 48af084..bc26881 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -14,6 +14,7 @@
 #    under the License.
 
 import netaddr
+from tempest_lib import decorators
 
 from tempest.api.compute import base
 from tempest import config
@@ -30,11 +31,11 @@
         cls.set_network_resources(network=True, subnet=True)
         super(VirtualInterfacesTestJSON, 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.skip_because(bug="1183436",
-                       condition=CONF.service_available.neutron)
+    @decorators.skip_because(bug="1183436",
+                             condition=CONF.service_available.neutron)
     @test.attr(type='gate')
     @test.services('network')
     def test_list_virtual_interfaces(self):
diff --git a/tempest/api/compute/servers/test_virtual_interfaces_negative.py b/tempest/api/compute/servers/test_virtual_interfaces_negative.py
index e81ccc6..d66b7ba 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces_negative.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces_negative.py
@@ -15,8 +15,9 @@
 
 import uuid
 
+from tempest_lib import exceptions as lib_exc
+
 from tempest.api.compute import base
-from tempest import exceptions
 from tempest import test
 
 
@@ -35,6 +36,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 fda4107..754b15a 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
 
@@ -53,8 +54,8 @@
         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'])
+        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,
@@ -68,8 +69,7 @@
         cls.image = cls.images_client.get_image(image_id)
 
         cls.keypairname = data_utils.rand_name('keypair')
-        resp, keypair = \
-            cls.keypairs_client.create_keypair(cls.keypairname)
+        cls.keypairs_client.create_keypair(cls.keypairname)
 
         name = data_utils.rand_name('security')
         description = data_utils.rand_name('description')
@@ -94,32 +94,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')
 
@@ -136,38 +136,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')
@@ -179,7 +179,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)
 
@@ -197,39 +197,39 @@
             )
             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
             if (resp['status'] is not None):
-                resp, _ = self.alt_keypairs_client.delete_keypair(k_name)
+                self.alt_keypairs_client.delete_keypair(k_name)
                 LOG.error("Create keypair request should not happen "
                           "if the tenant id does not match the current user")
 
     @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'])
 
@@ -248,7 +248,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:
@@ -261,14 +261,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'])
 
@@ -289,7 +289,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,
@@ -306,7 +306,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'])
 
@@ -314,7 +314,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)
@@ -323,7 +323,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)
 
@@ -334,7 +334,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')
 
@@ -346,7 +346,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')
 
@@ -357,7 +357,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')
 
@@ -369,13 +369,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 180dffd..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,15 +69,13 @@
             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
 
     def _volume_clean_up(self, server_id, volume_id):
-        resp, body = self.volumes_client.get_volume(volume_id)
+        body = self.volumes_client.get_volume(volume_id)
         if body['status'] == 'in-use':
             self.servers_client.detach_volume(server_id, volume_id)
             self.volumes_client.wait_for_volume_status(volume_id, 'available')
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/test_quotas.py b/tempest/api/compute/test_quotas.py
index 4177751..db2e281 100644
--- a/tempest/api/compute/test_quotas.py
+++ b/tempest/api/compute/test_quotas.py
@@ -43,16 +43,14 @@
     def test_get_quotas(self):
         # User can get the quota set for it's tenant
         expected_quota_set = self.default_quota_set | set(['id'])
-        resp, quota_set = self.client.get_quota_set(self.tenant_id)
-        self.assertEqual(200, resp.status)
+        quota_set = self.client.get_quota_set(self.tenant_id)
         self.assertEqual(quota_set['id'], self.tenant_id)
         for quota in expected_quota_set:
             self.assertIn(quota, quota_set.keys())
 
         # get the quota set using user id
-        resp, quota_set = self.client.get_quota_set(self.tenant_id,
-                                                    self.user_id)
-        self.assertEqual(200, resp.status)
+        quota_set = self.client.get_quota_set(self.tenant_id,
+                                              self.user_id)
         self.assertEqual(quota_set['id'], self.tenant_id)
         for quota in expected_quota_set:
             self.assertIn(quota, quota_set.keys())
@@ -61,8 +59,7 @@
     def test_get_default_quotas(self):
         # User can get the default quota set for it's tenant
         expected_quota_set = self.default_quota_set | set(['id'])
-        resp, quota_set = self.client.get_default_quota_set(self.tenant_id)
-        self.assertEqual(200, resp.status)
+        quota_set = self.client.get_default_quota_set(self.tenant_id)
         self.assertEqual(quota_set['id'], self.tenant_id)
         for quota in expected_quota_set:
             self.assertIn(quota, quota_set.keys())
@@ -70,9 +67,7 @@
     @test.attr(type='smoke')
     def test_compare_tenant_quotas_with_default_quotas(self):
         # Tenants are created with the default quota values
-        resp, defualt_quota_set = \
+        defualt_quota_set = \
             self.client.get_default_quota_set(self.tenant_id)
-        self.assertEqual(200, resp.status)
-        resp, tenant_quota_set = self.client.get_quota_set(self.tenant_id)
-        self.assertEqual(200, resp.status)
+        tenant_quota_set = self.client.get_quota_set(self.tenant_id)
         self.assertEqual(defualt_quota_set, tenant_quota_set)
diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
index 7fef52f..64ea555 100644
--- a/tempest/api/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -53,8 +53,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'] = (
@@ -68,7 +68,7 @@
                                                    'available')
 
         # Attach the volume to the server
-        _, self.attachment = self.servers_client.attach_volume(
+        self.attachment = self.servers_client.attach_volume(
             self.server['id'],
             self.volume['id'],
             device='/dev/%s' % self.device)
@@ -116,13 +116,13 @@
         # Create Server, Volume and attach that Volume to Server
         self._create_and_attach()
         # List Volume attachment of the server
-        _, body = self.servers_client.list_volume_attachments(
+        body = self.servers_client.list_volume_attachments(
             self.server['id'])
         self.assertEqual(1, len(body))
         self.assertIn(self.attachment, body)
 
         # Get Volume attachment of the server
-        _, body = self.servers_client.get_volume_attachment(
+        body = self.servers_client.get_volume_attachment(
             self.server['id'],
             self.attachment['id'])
         self.assertEqual(self.server['id'], body['serverId'])
diff --git a/tempest/api/compute/volumes/test_volumes_get.py b/tempest/api/compute/volumes/test_volumes_get.py
index d441427..69998d2 100644
--- a/tempest/api/compute/volumes/test_volumes_get.py
+++ b/tempest/api/compute/volumes/test_volumes_get.py
@@ -38,14 +38,13 @@
     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
-        resp, volume = self.client.create_volume(size=1,
-                                                 display_name=v_name,
-                                                 metadata=metadata)
+        volume = self.client.create_volume(size=1,
+                                           display_name=v_name,
+                                           metadata=metadata)
         self.addCleanup(self.delete_volume, volume['id'])
-        self.assertEqual(200, resp.status)
         self.assertIn('id', volume)
         self.assertIn('displayName', volume)
         self.assertEqual(volume['displayName'], v_name,
@@ -56,8 +55,7 @@
         # Wait for Volume status to become ACTIVE
         self.client.wait_for_volume_status(volume['id'], 'available')
         # GET Volume
-        resp, fetched_volume = self.client.get_volume(volume['id'])
-        self.assertEqual(200, resp.status)
+        fetched_volume = self.client.get_volume(volume['id'])
         # Verification of details of fetched Volume
         self.assertEqual(v_name,
                          fetched_volume['displayName'],
diff --git a/tempest/api/compute/volumes/test_volumes_list.py b/tempest/api/compute/volumes/test_volumes_list.py
index 6bf9519..ba7ee6b 100644
--- a/tempest/api/compute/volumes/test_volumes_list.py
+++ b/tempest/api/compute/volumes/test_volumes_list.py
@@ -42,14 +42,14 @@
         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:
-                resp, volume = cls.client.create_volume(size=1,
-                                                        display_name=v_name,
-                                                        metadata=metadata)
+                volume = cls.client.create_volume(size=1,
+                                                  display_name=v_name,
+                                                  metadata=metadata)
                 cls.client.wait_for_volume_status(volume['id'], 'available')
-                resp, volume = cls.client.get_volume(volume['id'])
+                volume = cls.client.get_volume(volume['id'])
                 cls.volume_list.append(volume)
                 cls.volume_id_list.append(volume['id'])
             except Exception:
@@ -79,8 +79,7 @@
     def test_volume_list(self):
         # Should return the list of Volumes
         # Fetch all Volumes
-        resp, fetched_list = self.client.list_volumes()
-        self.assertEqual(200, resp.status)
+        fetched_list = self.client.list_volumes()
         # Now check if all the Volumes created in setup are in fetched list
         missing_volumes = [
             v for v in self.volume_list if v not in fetched_list
@@ -95,8 +94,7 @@
     def test_volume_list_with_details(self):
         # Should return the list of Volumes with details
         # Fetch all Volumes
-        resp, fetched_list = self.client.list_volumes_with_detail()
-        self.assertEqual(200, resp.status)
+        fetched_list = self.client.list_volumes_with_detail()
         # Now check if all the Volumes created in setup are in fetched list
         missing_volumes = [
             v for v in self.volume_list if v not in fetched_list
@@ -111,8 +109,7 @@
     def test_volume_list_param_limit(self):
         # Return the list of volumes based on limit set
         params = {'limit': 2}
-        resp, fetched_vol_list = self.client.list_volumes(params=params)
-        self.assertEqual(200, resp.status)
+        fetched_vol_list = self.client.list_volumes(params=params)
 
         self.assertEqual(len(fetched_vol_list), params['limit'],
                          "Failed to list volumes by limit set")
@@ -121,9 +118,7 @@
     def test_volume_list_with_detail_param_limit(self):
         # Return the list of volumes with details based on limit set.
         params = {'limit': 2}
-        resp, fetched_vol_list = \
-            self.client.list_volumes_with_detail(params=params)
-        self.assertEqual(200, resp.status)
+        fetched_vol_list = self.client.list_volumes_with_detail(params=params)
 
         self.assertEqual(len(fetched_vol_list), params['limit'],
                          "Failed to list volume details by limit set")
@@ -132,10 +127,9 @@
     def test_volume_list_param_offset_and_limit(self):
         # Return the list of volumes based on offset and limit set.
         # get all volumes list
-        response, all_vol_list = self.client.list_volumes()
+        all_vol_list = self.client.list_volumes()
         params = {'offset': 1, 'limit': 1}
-        resp, fetched_vol_list = self.client.list_volumes(params=params)
-        self.assertEqual(200, resp.status)
+        fetched_vol_list = self.client.list_volumes(params=params)
 
         # Validating length of the fetched volumes
         self.assertEqual(len(fetched_vol_list), params['limit'],
@@ -150,11 +144,9 @@
     def test_volume_list_with_detail_param_offset_and_limit(self):
         # Return the list of volumes details based on offset and limit set.
         # get all volumes list
-        response, all_vol_list = self.client.list_volumes_with_detail()
+        all_vol_list = self.client.list_volumes_with_detail()
         params = {'offset': 1, 'limit': 1}
-        resp, fetched_vol_list = \
-            self.client.list_volumes_with_detail(params=params)
-        self.assertEqual(200, resp.status)
+        fetched_vol_list = self.client.list_volumes_with_detail(params=params)
 
         # Validating length of the fetched volumes
         self.assertEqual(len(fetched_vol_list), params['limit'],
diff --git a/tempest/api/compute/volumes/test_volumes_negative.py b/tempest/api/compute/volumes/test_volumes_negative.py
index f0f9879..ed54aaf 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
@@ -39,7 +40,7 @@
         # 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 +48,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 +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'])
@@ -65,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'])
@@ -73,28 +74,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 2ec1017..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
 
@@ -77,12 +88,12 @@
         object. All resources created in this method will be automatically
         removed in tearDownClass method.
         """
-        _, resp_body = cls.client.create_node_group_template(name, plugin_name,
-                                                             hadoop_version,
-                                                             node_processes,
-                                                             flavor_id,
-                                                             node_configs,
-                                                             **kwargs)
+        resp_body = cls.client.create_node_group_template(name, plugin_name,
+                                                          hadoop_version,
+                                                          node_processes,
+                                                          flavor_id,
+                                                          node_configs,
+                                                          **kwargs)
         # store id of created node group template
         cls._node_group_templates.append(resp_body['id'])
 
@@ -97,11 +108,11 @@
         object. All resources created in this method will be automatically
         removed in tearDownClass method.
         """
-        _, resp_body = cls.client.create_cluster_template(name, plugin_name,
-                                                          hadoop_version,
-                                                          node_groups,
-                                                          cluster_configs,
-                                                          **kwargs)
+        resp_body = cls.client.create_cluster_template(name, plugin_name,
+                                                       hadoop_version,
+                                                       node_groups,
+                                                       cluster_configs,
+                                                       **kwargs)
         # store id of created cluster template
         cls._cluster_templates.append(resp_body['id'])
 
@@ -115,7 +126,7 @@
         object. All resources created in this method will be automatically
         removed in tearDownClass method.
         """
-        _, resp_body = cls.client.create_data_source(name, type, url, **kwargs)
+        resp_body = cls.client.create_data_source(name, type, url, **kwargs)
         # store id of created data source
         cls._data_sources.append(resp_body['id'])
 
@@ -128,7 +139,7 @@
         It returns created object. All resources created in this method will
         be automatically removed in tearDownClass method.
         """
-        _, resp_body = cls.client.create_job_binary_internal(name, data)
+        resp_body = cls.client.create_job_binary_internal(name, data)
         # store id of created job binary internal
         cls._job_binary_internals.append(resp_body['id'])
 
@@ -142,7 +153,7 @@
         object. All resources created in this method will be automatically
         removed in tearDownClass method.
         """
-        _, resp_body = cls.client.create_job_binary(name, url, extra, **kwargs)
+        resp_body = cls.client.create_job_binary(name, url, extra, **kwargs)
         # store id of created job binary
         cls._job_binaries.append(resp_body['id'])
 
@@ -156,8 +167,8 @@
         object. All resources created in this method will be automatically
         removed in tearDownClass method.
         """
-        _, resp_body = cls.client.create_job(name,
-                                             job_type, mains, libs, **kwargs)
+        resp_body = cls.client.create_job(name,
+                                          job_type, mains, libs, **kwargs)
         # store id of created job
         cls._jobs.append(resp_body['id'])
 
diff --git a/tempest/api/data_processing/test_cluster_templates.py b/tempest/api/data_processing/test_cluster_templates.py
index 537f90c..422ea5b 100644
--- a/tempest/api/data_processing/test_cluster_templates.py
+++ b/tempest/api/data_processing/test_cluster_templates.py
@@ -120,7 +120,7 @@
         template_info = self._create_cluster_template()
 
         # check for cluster template in list
-        _, templates = self.client.list_cluster_templates()
+        templates = self.client.list_cluster_templates()
         templates_info = [(template['id'], template['name'])
                           for template in templates]
         self.assertIn(template_info, templates_info)
@@ -130,7 +130,7 @@
         template_id, template_name = self._create_cluster_template()
 
         # check cluster template fetch by id
-        _, template = self.client.get_cluster_template(template_id)
+        template = self.client.get_cluster_template(template_id)
         self.assertEqual(template_name, template['name'])
         self.assertDictContainsSubset(self.cluster_template, template)
 
diff --git a/tempest/api/data_processing/test_data_sources.py b/tempest/api/data_processing/test_data_sources.py
index 3650751..a50f44b 100644
--- a/tempest/api/data_processing/test_data_sources.py
+++ b/tempest/api/data_processing/test_data_sources.py
@@ -68,13 +68,13 @@
 
     def _list_data_sources(self, source_info):
         # check for data source in list
-        _, sources = self.client.list_data_sources()
+        sources = self.client.list_data_sources()
         sources_info = [(source['id'], source['name']) for source in sources]
         self.assertIn(source_info, sources_info)
 
     def _get_data_source(self, source_id, source_name, source_body):
         # check data source fetch by id
-        _, source = self.client.get_data_source(source_id)
+        source = self.client.get_data_source(source_id)
         self.assertEqual(source_name, source['name'])
         self.assertDictContainsSubset(source_body, source)
 
diff --git a/tempest/api/data_processing/test_job_binaries.py b/tempest/api/data_processing/test_job_binaries.py
index d006991..2f6d998 100644
--- a/tempest/api/data_processing/test_job_binaries.py
+++ b/tempest/api/data_processing/test_job_binaries.py
@@ -78,7 +78,7 @@
         binary_info = self._create_job_binary(self.swift_job_binary_with_extra)
 
         # check for job binary in list
-        _, binaries = self.client.list_job_binaries()
+        binaries = self.client.list_job_binaries()
         binaries_info = [(binary['id'], binary['name']) for binary in binaries]
         self.assertIn(binary_info, binaries_info)
 
@@ -88,7 +88,7 @@
             self._create_job_binary(self.swift_job_binary_with_extra))
 
         # check job binary fetch by id
-        _, binary = self.client.get_job_binary(binary_id)
+        binary = self.client.get_job_binary(binary_id)
         self.assertEqual(binary_name, binary['name'])
         self.assertDictContainsSubset(self.swift_job_binary, binary)
 
@@ -109,7 +109,7 @@
         binary_info = self._create_job_binary(self.internal_db_job_binary)
 
         # check for job binary in list
-        _, binaries = self.client.list_job_binaries()
+        binaries = self.client.list_job_binaries()
         binaries_info = [(binary['id'], binary['name']) for binary in binaries]
         self.assertIn(binary_info, binaries_info)
 
@@ -119,7 +119,7 @@
             self._create_job_binary(self.internal_db_job_binary))
 
         # check job binary fetch by id
-        _, binary = self.client.get_job_binary(binary_id)
+        binary = self.client.get_job_binary(binary_id)
         self.assertEqual(binary_name, binary['name'])
         self.assertDictContainsSubset(self.internal_db_job_binary, binary)
 
diff --git a/tempest/api/data_processing/test_job_binary_internals.py b/tempest/api/data_processing/test_job_binary_internals.py
index 7e99867..b8121a0 100644
--- a/tempest/api/data_processing/test_job_binary_internals.py
+++ b/tempest/api/data_processing/test_job_binary_internals.py
@@ -55,7 +55,7 @@
         binary_info = self._create_job_binary_internal()
 
         # check for job binary internal in list
-        _, binaries = self.client.list_job_binary_internals()
+        binaries = self.client.list_job_binary_internals()
         binaries_info = [(binary['id'], binary['name']) for binary in binaries]
         self.assertIn(binary_info, binaries_info)
 
@@ -64,7 +64,7 @@
         binary_id, binary_name = self._create_job_binary_internal()
 
         # check job binary internal fetch by id
-        _, binary = self.client.get_job_binary_internal(binary_id)
+        binary = self.client.get_job_binary_internal(binary_id)
         self.assertEqual(binary_name, binary['name'])
 
     @test.attr(type='smoke')
diff --git a/tempest/api/data_processing/test_jobs.py b/tempest/api/data_processing/test_jobs.py
index 5af2eef..a7beb0e 100644
--- a/tempest/api/data_processing/test_jobs.py
+++ b/tempest/api/data_processing/test_jobs.py
@@ -69,7 +69,7 @@
         job_info = self._create_job()
 
         # check for job in list
-        _, jobs = self.client.list_jobs()
+        jobs = self.client.list_jobs()
         jobs_info = [(job['id'], job['name']) for job in jobs]
         self.assertIn(job_info, jobs_info)
 
@@ -78,7 +78,7 @@
         job_id, job_name = self._create_job()
 
         # check job fetch by id
-        _, job = self.client.get_job(job_id)
+        job = self.client.get_job(job_id)
         self.assertEqual(job_name, job['name'])
 
     @test.attr(type='smoke')
diff --git a/tempest/api/data_processing/test_node_group_templates.py b/tempest/api/data_processing/test_node_group_templates.py
index f3f59fc..d37e910 100644
--- a/tempest/api/data_processing/test_node_group_templates.py
+++ b/tempest/api/data_processing/test_node_group_templates.py
@@ -69,7 +69,7 @@
         template_info = self._create_node_group_template()
 
         # check for node group template in list
-        _, templates = self.client.list_node_group_templates()
+        templates = self.client.list_node_group_templates()
         templates_info = [(template['id'], template['name'])
                           for template in templates]
         self.assertIn(template_info, templates_info)
@@ -79,7 +79,7 @@
         template_id, template_name = self._create_node_group_template()
 
         # check node group template fetch by id
-        _, template = self.client.get_node_group_template(template_id)
+        template = self.client.get_node_group_template(template_id)
         self.assertEqual(template_name, template['name'])
         self.assertDictContainsSubset(self.node_group_template, template)
 
diff --git a/tempest/api/data_processing/test_plugins.py b/tempest/api/data_processing/test_plugins.py
index 4b4ec48..8c9b720 100644
--- a/tempest/api/data_processing/test_plugins.py
+++ b/tempest/api/data_processing/test_plugins.py
@@ -25,7 +25,7 @@
 
         It ensures main plugins availability.
         """
-        _, plugins = self.client.list_plugins()
+        plugins = self.client.list_plugins()
         plugins_names = [plugin['name'] for plugin in plugins]
         for enabled_plugin in CONF.data_processing_feature_enabled.plugins:
             self.assertIn(enabled_plugin, plugins_names)
@@ -39,12 +39,12 @@
     @test.attr(type='smoke')
     def test_plugin_get(self):
         for plugin_name in self._list_all_plugin_names():
-            _, plugin = self.client.get_plugin(plugin_name)
+            plugin = self.client.get_plugin(plugin_name)
             self.assertEqual(plugin_name, plugin['name'])
 
             for plugin_version in plugin['versions']:
-                _, detailed_plugin = self.client.get_plugin(plugin_name,
-                                                            plugin_version)
+                detailed_plugin = self.client.get_plugin(plugin_name,
+                                                         plugin_version)
                 self.assertEqual(plugin_name, detailed_plugin['name'])
 
                 # check that required image tags contains name and version
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 aed1abe..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')
@@ -55,7 +55,7 @@
     @test.services('compute')
     def test_compare_db_flavors_with_os(self):
         _, db_flavors = self.client.list_db_flavors()
-        _, os_flavors = self.os_flavors_client.list_flavors_with_detail()
+        os_flavors = self.os_flavors_client.list_flavors_with_detail()
         self.assertEqual(len(os_flavors), len(db_flavors),
                          "OS flavors %s do not match DB flavors %s" %
                          (os_flavors, db_flavors))
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..72d323a 100644
--- a/tempest/api/identity/admin/v3/test_default_project_id.py
+++ b/tempest/api/identity/admin/v3/test_default_project_id.py
@@ -18,7 +18,6 @@
 
 
 class TestDefaultProjectId (base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -74,8 +73,7 @@
                                            domain_name=dom_name)
         auth_provider = auth.KeystoneV3AuthProvider(creds)
         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..2283c21 100644
--- a/tempest/api/identity/admin/v3/test_endpoints.py
+++ b/tempest/api/identity/admin/v3/test_endpoints.py
@@ -19,7 +19,6 @@
 
 
 class EndPointsTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/identity/admin/v3/test_endpoints_negative.py b/tempest/api/identity/admin/v3/test_endpoints_negative.py
index 9da0a57..cf41f9c 100644
--- a/tempest/api/identity/admin/v3/test_endpoints_negative.py
+++ b/tempest/api/identity/admin/v3/test_endpoints_negative.py
@@ -14,15 +14,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 EndpointsNegativeTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -51,7 +50,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 +60,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 +75,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..6dfddb0 100644
--- a/tempest/api/identity/admin/v3/test_groups.py
+++ b/tempest/api/identity/admin/v3/test_groups.py
@@ -19,7 +19,6 @@
 
 
 class GroupsV3TestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
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..359c0cf 100644
--- a/tempest/api/identity/admin/v3/test_regions.py
+++ b/tempest/api/identity/admin/v3/test_regions.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 RegionsTestJSON(base.BaseIdentityV3AdminTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -40,7 +40,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 b0f48fa..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):
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 b907151..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')
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..8f07a6a 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
 
@@ -31,8 +31,8 @@
     @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)
+        cls.os_adm = clients.AdminManager()
+        cls.os = clients.Manager()
 
     @classmethod
     def disable_user(cls, user_name):
@@ -149,11 +149,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 +226,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..344742b 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
 
@@ -35,7 +35,6 @@
         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:
@@ -48,7 +47,7 @@
         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:
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 1b004dd..c9064b0 100644
--- a/tempest/api/messaging/test_claims.py
+++ b/tempest/api/messaging/test_claims.py
@@ -16,6 +16,8 @@
 import logging
 import urlparse
 
+from tempest_lib import decorators
+
 from tempest.api.messaging import base
 from tempest.common.utils import data_utils
 from tempest import config
@@ -27,7 +29,6 @@
 
 
 class TestClaims(base.BaseMessagingTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -65,7 +66,7 @@
         # Delete Claimed message
         self.client.delete_messages(claimed_message_uri)
 
-    @test.skip_because(bug="1331517")
+    @decorators.skip_because(bug="1331517")
     @test.attr(type='smoke')
     def test_query_claim(self):
         # Post a Claim
@@ -79,7 +80,7 @@
         claimed_message_uri = body[0]['href']
         self.delete_messages(claimed_message_uri)
 
-    @test.skip_because(bug="1328111")
+    @decorators.skip_because(bug="1328111")
     @test.attr(type='smoke')
     def test_update_claim(self):
         # Post a Claim
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/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 b606115..107d8cd 100644
--- a/tempest/api/network/test_load_balancer.py
+++ b/tempest/api/network/test_load_balancer.py
@@ -13,13 +13,14 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import decorators
+
 from tempest.api.network import base
 from tempest.common.utils import data_utils
 from tempest import test
 
 
 class LoadBalancerTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     """
     Tests the following operations in the Neutron API using the REST client for
@@ -422,6 +423,6 @@
         self.assertEqual(2, member['weight'])
 
 
-@test.skip_because(bug="1402007")
+@decorators.skip_because(bug="1402007")
 class LoadBalancerIpV6TestJSON(LoadBalancerTestJSON):
     _ip_version = 6
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..3d26b48 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
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 447c3f3..e620ae6 100644
--- a/tempest/api/network/test_service_type_management.py
+++ b/tempest/api/network/test_service_type_management.py
@@ -10,12 +10,13 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import decorators
+
 from tempest.api.network import base
 from tempest import test
 
 
 class ServiceTypeManagementTestJSON(base.BaseNetworkTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -24,7 +25,7 @@
             msg = "Neutron Service Type Management not enabled."
             raise cls.skipException(msg)
 
-    @test.skip_because(bug="1400370")
+    @decorators.skip_because(bug="1400370")
     @test.attr(type='smoke')
     def test_service_provider_list(self):
         body = self.client.list_service_providers()
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..79a1960 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
@@ -93,10 +93,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 +126,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_negative.py b/tempest/api/object_storage/test_account_quotas_negative.py
index a6ea6ee..0e136bf 100644
--- a/tempest/api/object_storage/test_account_quotas_negative.py
+++ b/tempest/api/object_storage/test_account_quotas_negative.py
@@ -14,11 +14,13 @@
 # License for the specific language governing permissions and limitations
 # 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
@@ -83,21 +85,21 @@
         """
 
         # 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"})
 
     @test.attr(type=["negative", "smoke"])
-    @test.skip_because(bug="1310597")
+    @decorators.skip_because(bug="1310597")
     @test.requires_ext(extension='account_quotas', service='object')
     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_negative.py b/tempest/api/object_storage/test_container_acl_negative.py
index 138d25a..7fe472c 100644
--- a/tempest/api/object_storage/test_container_acl_negative.py
+++ b/tempest/api/object_storage/test_container_acl_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.object_storage import base
 from tempest import clients
 from tempest.common.utils import data_utils
-from tempest import exceptions
 from tempest import test
 
 
@@ -47,7 +48,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 +64,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 +78,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 +95,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 +112,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 +135,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 +154,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 +176,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 +202,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_container_sync.py b/tempest/api/object_storage/test_container_sync.py
index 7f8cb8b..09b0ce0 100644
--- a/tempest/api/object_storage/test_container_sync.py
+++ b/tempest/api/object_storage/test_container_sync.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import decorators
 import testtools
 import time
 import urlparse
@@ -112,7 +113,7 @@
                 self.assertEqual(object_content, obj_name[::-1])
 
     @test.attr(type='slow')
-    @test.skip_because(bug='1317133')
+    @decorators.skip_because(bug='1317133')
     @testtools.skipIf(
         not CONF.object_storage_feature_enabled.container_sync,
         'Old-style container sync function is disabled')
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 d3dffbf..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,20 +95,20 @@
         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
     def _create_keypair(cls, name_start='keypair-heat-'):
         kp_name = data_utils.rand_name(name_start)
-        _, body = cls.keypairs_client.create_keypair(kp_name)
+        body = cls.keypairs_client.create_keypair(kp_name)
         cls.keypairs.append(kp_name)
         return body
 
@@ -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 e840e3b..7ec0646 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
@@ -52,20 +54,20 @@
 
     @classmethod
     def create_alarm(cls, **kwargs):
-        resp, body = cls.telemetry_client.create_alarm(
+        body = cls.telemetry_client.create_alarm(
             name=data_utils.rand_name('telemetry_alarm'),
             type='threshold', **kwargs)
         cls.alarm_ids.append(body['alarm_id'])
-        return resp, body
+        return body
 
     @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 +82,7 @@
         for resource_id in list_of_ids:
             try:
                 method(resource_id)
-            except exceptions.NotFound:
+            except lib_exc.NotFound:
                 pass
 
     @classmethod
@@ -100,10 +102,9 @@
         timeout = CONF.compute.build_timeout
         start = timeutils.utcnow()
         while timeutils.delta_seconds(start, timeutils.utcnow()) < timeout:
-            resp, body = self.telemetry_client.list_samples(metric, query)
-            self.assertEqual(resp.status, 200)
+            body = self.telemetry_client.list_samples(metric, query)
             if body:
-                return resp, body
+                return body
             time.sleep(CONF.compute.build_interval)
 
         raise exceptions.TimeoutException(
diff --git a/tempest/api/telemetry/test_telemetry_alarming_api.py b/tempest/api/telemetry/test_telemetry_alarming_api.py
index b45d545..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):
@@ -32,8 +32,7 @@
     @test.attr(type="gate")
     def test_alarm_list(self):
         # List alarms
-        resp, alarm_list = self.telemetry_client.list_alarms()
-        self.assertEqual(200, resp.status)
+        alarm_list = self.telemetry_client.list_alarms()
 
         # Verify created alarm in the list
         fetched_ids = [a['alarm_id'] for a in alarm_list]
@@ -47,9 +46,8 @@
     def test_create_update_get_delete_alarm(self):
         # Create an alarm
         alarm_name = data_utils.rand_name('telemetry_alarm')
-        resp, body = self.telemetry_client.create_alarm(
+        body = self.telemetry_client.create_alarm(
             name=alarm_name, type='threshold', threshold_rule=self.rule)
-        self.assertEqual(201, resp.status)
         self.assertEqual(alarm_name, body['name'])
         alarm_id = body['alarm_id']
         self.assertDictContainsSubset(self.rule, body['threshold_rule'])
@@ -59,40 +57,35 @@
                     'threshold': 70.0,
                     'period': 60}
         alarm_name = data_utils.rand_name('telemetry-alarm-update')
-        resp, body = self.telemetry_client.update_alarm(
+        body = self.telemetry_client.update_alarm(
             alarm_id,
             threshold_rule=new_rule,
             name=alarm_name,
             type='threshold')
-        self.assertEqual(200, resp.status)
         self.assertEqual(alarm_name, body['name'])
         self.assertDictContainsSubset(new_rule, body['threshold_rule'])
         # Get and verify details of an alarm after update
-        resp, body = self.telemetry_client.get_alarm(alarm_id)
-        self.assertEqual(200, resp.status)
+        body = self.telemetry_client.get_alarm(alarm_id)
         self.assertEqual(alarm_name, body['name'])
         self.assertDictContainsSubset(new_rule, body['threshold_rule'])
         # Delete alarm and verify if deleted
-        resp, _ = self.telemetry_client.delete_alarm(alarm_id)
-        self.assertEqual(204, resp.status)
-        self.assertRaises(exceptions.NotFound,
+        self.telemetry_client.delete_alarm(alarm_id)
+        self.assertRaises(lib_exc.NotFound,
                           self.telemetry_client.get_alarm, alarm_id)
 
     @test.attr(type="gate")
     def test_set_get_alarm_state(self):
         alarm_states = ['ok', 'alarm', 'insufficient data']
-        _, alarm = self.create_alarm(threshold_rule=self.rule)
+        alarm = self.create_alarm(threshold_rule=self.rule)
         # Set alarm state and verify
         new_state =\
             [elem for elem in alarm_states if elem != alarm['state']][0]
-        resp, state = self.telemetry_client.alarm_set_state(alarm['alarm_id'],
-                                                            new_state)
-        self.assertEqual(200, resp.status)
-        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
-        resp, state = self.telemetry_client.alarm_get_state(alarm['alarm_id'])
-        self.assertEqual(200, resp.status)
-        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):
@@ -100,15 +93,13 @@
                 "operator": "or"}
         # Verifies alarm create
         alarm_name = data_utils.rand_name('combination_alarm')
-        resp, body = self.telemetry_client.create_alarm(name=alarm_name,
-                                                        combination_rule=rule,
-                                                        type='combination')
-        self.assertEqual(201, resp.status)
+        body = self.telemetry_client.create_alarm(name=alarm_name,
+                                                  combination_rule=rule,
+                                                  type='combination')
         self.assertEqual(alarm_name, body['name'])
         alarm_id = body['alarm_id']
         self.assertDictContainsSubset(rule, body['combination_rule'])
         # Verify alarm delete
-        resp, _ = self.telemetry_client.delete_alarm(alarm_id)
-        self.assertEqual(204, resp.status)
-        self.assertRaises(exceptions.NotFound,
+        self.telemetry_client.delete_alarm(alarm_id)
+        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 e64cd4a..048e305 100644
--- a/tempest/api/telemetry/test_telemetry_notification_api.py
+++ b/tempest/api/telemetry/test_telemetry_notification_api.py
@@ -10,6 +10,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import decorators
 import testtools
 
 from tempest.api.telemetry import base
@@ -20,7 +21,6 @@
 
 
 class TelemetryNotificationAPITestJSON(base.BaseTelemetryTest):
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -34,8 +34,7 @@
                       "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'])
 
@@ -46,7 +45,7 @@
     @test.services("image")
     @testtools.skipIf(not CONF.image_feature_enabled.api_v1,
                       "Glance api v1 is disabled")
-    @test.skip_because(bug='1351627')
+    @decorators.skip_because(bug='1351627')
     def test_check_glance_v1_notifications(self):
         body = self.create_image(self.image_client)
         self.image_client.update_image(body['id'], data='data')
@@ -62,7 +61,7 @@
     @test.services("image")
     @testtools.skipIf(not CONF.image_feature_enabled.api_v2,
                       "Glance api v2 is disabled")
-    @test.skip_because(bug='1351627')
+    @decorators.skip_because(bug='1351627')
     def test_check_glance_v2_notifications(self):
         body = self.create_image(self.image_client_v2)
 
diff --git a/tempest/api/volume/admin/test_multi_backend.py b/tempest/api/volume/admin/test_multi_backend.py
index 65c4bd3..245161a 100644
--- a/tempest/api/volume/admin/test_multi_backend.py
+++ b/tempest/api/volume/admin/test_multi_backend.py
@@ -22,7 +22,6 @@
 
 
 class VolumeMultiBackendV2Test(base.BaseVolumeAdminTest):
-    _interface = "json"
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/volume/admin/test_snapshots_actions.py b/tempest/api/volume/admin/test_snapshots_actions.py
index 6c64298..e7d9d7b 100644
--- a/tempest/api/volume/admin/test_snapshots_actions.py
+++ b/tempest/api/volume/admin/test_snapshots_actions.py
@@ -19,7 +19,6 @@
 
 
 class SnapshotsActionsV2Test(base.BaseVolumeAdminTest):
-    _interface = "json"
 
     @classmethod
     def resource_setup(cls):
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..2a30b54 100644
--- a/tempest/api/volume/admin/test_volume_quotas.py
+++ b/tempest/api/volume/admin/test_volume_quotas.py
@@ -23,7 +23,6 @@
 
 
 class BaseVolumeQuotasAdminV2TestJSON(base.BaseVolumeAdminTest):
-    _interface = "json"
     force_tenant_isolation = True
 
     @classmethod
diff --git a/tempest/api/volume/admin/test_volume_quotas_negative.py b/tempest/api/volume/admin/test_volume_quotas_negative.py
index 5cf6af0..f972457 100644
--- a/tempest/api/volume/admin/test_volume_quotas_negative.py
+++ b/tempest/api/volume/admin/test_volume_quotas_negative.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.volume import base
-from tempest import exceptions
 from tempest import test
 
 
 class BaseVolumeQuotasNegativeV2TestJSON(base.BaseVolumeAdminTest):
-    _interface = "json"
     force_tenant_isolation = True
 
     @classmethod
@@ -42,13 +42,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 +65,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 +73,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..f2c1dda 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)
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..439dd35 100644
--- a/tempest/api/volume/admin/test_volumes_actions.py
+++ b/tempest/api/volume/admin/test_volumes_actions.py
@@ -19,7 +19,6 @@
 
 
 class VolumesActionsV2Test(base.BaseVolumeAdminTest):
-    _interface = "json"
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/volume/admin/test_volumes_backup.py b/tempest/api/volume/admin/test_volumes_backup.py
index 0739480..d572893 100644
--- a/tempest/api/volume/admin/test_volumes_backup.py
+++ b/tempest/api/volume/admin/test_volumes_backup.py
@@ -24,7 +24,6 @@
 
 
 class VolumesBackupsV2Test(base.BaseVolumeAdminTest):
-    _interface = "json"
 
     @classmethod
     def resource_setup(cls):
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index 127a216..2489b79 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,7 +31,6 @@
     """Base test case class for all Cinder API tests."""
 
     _api_version = 2
-    _interface = 'json'
 
     @classmethod
     def resource_setup(cls):
@@ -153,8 +154,7 @@
 
         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)
@@ -208,13 +208,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_volume_transfers.py b/tempest/api/volume/test_volume_transfers.py
index b2961bd..7451050 100644
--- a/tempest/api/volume/test_volume_transfers.py
+++ b/tempest/api/volume/test_volume_transfers.py
@@ -30,13 +30,11 @@
         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)
+        cls.os_alt = clients.Manager(cls.isolated_creds.get_alt_creds())
         # Add admin tenant to cleanup resources
         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 Volume Admin API credentials in configuration."
             raise cls.skipException(msg)
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index ceabb1c..8b91c7f 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -31,9 +31,9 @@
 
         # 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
diff --git a/tempest/api/volume/test_volumes_get.py b/tempest/api/volume/test_volumes_get.py
index 6d9c438..2a49210 100644
--- a/tempest/api/volume/test_volumes_get.py
+++ b/tempest/api/volume/test_volumes_get.py
@@ -37,15 +37,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 +70,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 +113,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_negative.py b/tempest/api/volume/test_volumes_negative.py
index dc8d8e2..595ddf4 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -15,9 +15,10 @@
 
 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
 
 
@@ -37,13 +38,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 +53,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 +62,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 +70,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 +78,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 +86,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 +95,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 +104,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 +112,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 +120,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 +128,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 +171,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 +179,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 +227,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 179eb09..98598c1 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -64,13 +64,13 @@
         # 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
-        _, body = self.servers_client.attach_volume(
+        self.servers_client.attach_volume(
             server['id'], self.volume_origin['id'], mountpoint)
         self.volumes_client.wait_for_volume_status(self.volume_origin['id'],
                                                    'in-use')
diff --git a/tempest/api/volume/test_volumes_snapshots_negative.py b/tempest/api/volume/test_volumes_snapshots_negative.py
index 2d7b6de..8b68ea9 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
@@ -34,7 +35,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 +43,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_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 63c9102..f78bb20 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,8 +186,8 @@
 
     token_expiry_threshold = datetime.timedelta(seconds=60)
 
-    def __init__(self, credentials, interface=None):
-        super(KeystoneAuthProvider, self).__init__(credentials, interface)
+    def __init__(self, credentials):
+        super(KeystoneAuthProvider, self).__init__(credentials)
         self.auth_client = self._auth_client()
 
     def _decorate_request(self, filters, method, url, headers=None, body=None,
@@ -441,44 +426,38 @@
             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(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 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)
@@ -491,18 +470,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):
         """
@@ -555,21 +525,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
@@ -585,21 +542,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):
         """
@@ -609,26 +553,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)
@@ -686,3 +619,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 5efeb75..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 exceptions
-import testtools
-
-from tempest import cli
-from tempest import config
-from tempest.openstack.common import log as logging
-import tempest.test
-
-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')
-
-    @tempest.test.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')
-
-    @tempest.test.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')
-
-    @tempest.test.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..096470e 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.
@@ -330,9 +336,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 +385,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..c52704a 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,
diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py
index 80f2e22..67eb182 100644
--- a/tempest/cmd/cleanup_service.py
+++ b/tempest/cmd/cleanup_service.py
@@ -244,7 +244,7 @@
 
     def list(self):
         client = self.client
-        _, keypairs = client.list_keypairs()
+        keypairs = client.list_keypairs()
         LOG.debug("List count, %s Keypairs" % len(keypairs))
         return keypairs
 
@@ -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
 
@@ -778,7 +778,7 @@
 
     def list(self):
         client = self.client
-        _, alarms = client.list_alarms()
+        alarms = client.list_alarms()
         LOG.debug("List count, %s Alarms" % len(alarms))
         return alarms
 
@@ -805,7 +805,7 @@
 
     def list(self):
         client = self.client
-        _, flavors = client.list_flavors({"is_public": None})
+        flavors = client.list_flavors({"is_public": None})
         if not self.is_save_state:
             # recreate list removing saved flavors
             flavors = [flavor for flavor in flavors if flavor['id']
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index a170edc..e9b6621 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
@@ -232,9 +232,6 @@
         LOG.error("%s not found in USERS: %s" % (name, USERS))
 
 
-def resp_ok(response):
-    return 200 >= int(response['status']) < 300
-
 ###################
 #
 # TENANTS
@@ -297,7 +294,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 +310,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 +429,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):
@@ -474,11 +471,10 @@
         LOG.info("checking telemetry")
         for server in self.res['servers']:
             client = client_for_user(server['owner'])
-            response, body = client.telemetry.list_samples(
+            body = client.telemetry.list_samples(
                 'instance',
                 query=('metadata.display_name', 'eq', server['name'])
             )
-            self.assertEqual(response.status, 200)
             self.assertTrue(len(body) >= 1, 'expecting at least one sample')
             self._confirm_telemetry_sample(server, body[-1])
 
@@ -708,7 +704,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
@@ -789,7 +785,7 @@
 
 
 def _get_flavor_by_name(client, name):
-    r, body = client.flavors.list_flavors()
+    body = client.flavors.list_flavors()
     for flavor in body:
         if name == flavor['name']:
             return flavor
@@ -817,7 +813,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..d899303 100644
--- a/tempest/common/cred_provider.py
+++ b/tempest/common/cred_provider.py
@@ -16,17 +16,74 @@
 
 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
+    return auth.get_credentials(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/isolated_creds.py b/tempest/common/isolated_creds.py
index a663931..f81c3ed 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'])
@@ -344,12 +341,12 @@
         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)
 
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..421d2de 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
@@ -63,5 +64,4 @@
                 'Credentials must be specified')
         auth_provider_class = self.get_auth_provider_class(credentials)
         return auth_provider_class(
-            interface=getattr(self, 'interface', None),
             credentials=credentials)
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 0fcc75b..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
 
@@ -160,7 +161,7 @@
             client = self.keypairs_client
         name = data_utils.rand_name(self.__class__.__name__)
         # We don't need to create a keypair by pubkey in scenario
-        resp, body = client.create_keypair(name)
+        body = client.create_keypair(name)
         self.addCleanup(client.delete_keypair, name)
         return body
 
@@ -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
 
@@ -417,7 +418,7 @@
     def nova_volume_attach(self):
         # TODO(andreaf) Device should be here CONF.compute.volume_device_name
         volume = self.servers_client.attach_volume(
-            self.server['id'], self.volume['id'], '/dev/vdb')[1]
+            self.server['id'], self.volume['id'], '/dev/vdb')
         self.assertEqual(self.volume['id'], volume['id'])
         self.volumes_client.wait_for_volume_status(volume['id'], 'in-use')
         # Refresh the volume after the attachment
@@ -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 18b759e..9c38d2f 100644
--- a/tempest/scenario/orchestration/test_server_cfn_init.py
+++ b/tempest/scenario/orchestration/test_server_cfn_init.py
@@ -12,6 +12,8 @@
 
 import json
 
+from tempest_lib import decorators
+
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common import log as logging
@@ -79,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']
 
@@ -123,7 +125,7 @@
                                    log_console_of_servers=[server])
 
     @test.attr(type='slow')
-    @test.skip_because(bug='1374175')
+    @decorators.skip_because(bug='1374175')
     @test.services('orchestration', 'compute')
     def test_server_cfn_init(self):
         self.assign_keypair()
diff --git a/tempest/scenario/test_baremetal_basic_ops.py b/tempest/scenario/test_baremetal_basic_ops.py
index d59e31e..fe49dc1 100644
--- a/tempest/scenario/test_baremetal_basic_ops.py
+++ b/tempest/scenario/test_baremetal_basic_ops.py
@@ -97,14 +97,14 @@
     def get_flavor_ephemeral_size(self):
         """Returns size of the ephemeral partition in GiB."""
         f_id = self.instance['flavor']['id']
-        _, flavor = self.flavors_client.get_flavor_details(f_id)
+        flavor = self.flavors_client.get_flavor_details(f_id)
         ephemeral = flavor.get('OS-FLV-EXT-DATA:ephemeral')
         if not ephemeral or ephemeral == 'N/A':
             return None
         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_dashboard_basic_ops.py b/tempest/scenario/test_dashboard_basic_ops.py
index 35f6689..1313050 100644
--- a/tempest/scenario/test_dashboard_basic_ops.py
+++ b/tempest/scenario/test_dashboard_basic_ops.py
@@ -65,7 +65,7 @@
 
     def check_login_page(self):
         response = urllib2.urlopen(CONF.dashboard.dashboard_url)
-        self.assertIn("Log In", response.read())
+        self.assertIn("id_username", response.read())
 
     def user_login(self, username, password):
         self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())
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..5ec1d6c 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,
diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py
index 5ea48e0..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']))
@@ -78,7 +78,7 @@
     def nova_volume_attach(self):
         volume_device_path = '/dev/' + CONF.compute.volume_device_name
         volume = self.servers_client.attach_volume(
-            self.server['id'], self.volume['id'], volume_device_path)[1]
+            self.server['id'], self.volume['id'], volume_device_path)
         self.assertEqual(self.volume['id'], volume['id'])
         self.volumes_client.wait_for_volume_status(volume['id'], 'in-use')
         # Refresh the volume after the attachment
@@ -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_advanced_server_ops.py b/tempest/scenario/test_network_advanced_server_ops.py
index 194a0bd..598c6d1 100644
--- a/tempest/scenario/test_network_advanced_server_ops.py
+++ b/tempest/scenario/test_network_advanced_server_ops.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import decorators
 import testtools
 
 from tempest.common.utils import data_utils
@@ -92,7 +93,7 @@
         self.servers_client.wait_for_server_status(self.server['id'], 'ACTIVE')
         self._check_network_connectivity()
 
-    @test.skip_because(bug="1323658")
+    @decorators.skip_because(bug="1323658")
     @test.services('compute', 'network')
     def test_server_connectivity_stop_start(self):
         self._setup_network_and_servers()
@@ -140,7 +141,7 @@
         self.servers_client.resume_server(self.server['id'])
         self._wait_server_status_and_check_network_connectivity()
 
-    @test.skip_because(bug="1323658")
+    @decorators.skip_because(bug="1323658")
     @testtools.skipUnless(CONF.compute_feature_enabled.resize,
                           'Resize is not available.')
     @test.services('compute', 'network')
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index de211fb..265f9e5 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -16,6 +16,7 @@
 import collections
 import re
 
+from tempest_lib import decorators
 import testtools
 
 from tempest.common.utils import data_utils
@@ -242,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,
@@ -380,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):
@@ -438,7 +442,7 @@
                                  act_serv=servers,
                                  trgt_serv=dns_servers))
 
-    @test.skip_because(bug="1412325")
+    @decorators.skip_because(bug="1412325")
     @testtools.skipUnless(CONF.scenario.dhcp_client,
                           "DHCP client is not available.")
     @test.attr(type='smoke')
diff --git a/tempest/scenario/test_security_groups_basic_ops.py b/tempest/scenario/test_security_groups_basic_ops.py
index 83739fd..55ab18f 100644
--- a/tempest/scenario/test_security_groups_basic_ops.py
+++ b/tempest/scenario/test_security_groups_basic_ops.py
@@ -238,7 +238,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(
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 cfc1d37..e97f089 100644
--- a/tempest/scenario/test_stamp_pattern.py
+++ b/tempest/scenario/test_stamp_pattern.py
@@ -15,6 +15,8 @@
 
 import time
 
+from tempest_lib import decorators
+from tempest_lib import exceptions as lib_exc
 import testtools
 
 from tempest.common.utils import data_utils
@@ -84,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')
@@ -101,7 +103,7 @@
 
     def _attach_volume(self, server, volume):
         # TODO(andreaf) we should use device from config instead if vdb
-        _, attached_volume = self.servers_client.attach_volume(
+        attached_volume = self.servers_client.attach_volume(
             server['id'], volume['id'], device='/dev/vdb')
         self.assertEqual(volume['id'], attached_volume['id'])
         self._wait_for_volume_status(attached_volume, 'in-use')
@@ -137,7 +139,7 @@
         got_timestamp = ssh_client.exec_command('sudo cat /mnt/timestamp')
         self.assertEqual(self.timestamp, got_timestamp)
 
-    @tempest.test.skip_because(bug="1205344")
+    @decorators.skip_because(bug="1205344")
     @testtools.skipUnless(CONF.compute_feature_enabled.snapshot,
                           'Snapshotting is not available.')
     @tempest.test.services('compute', 'network', 'volume', 'image')
diff --git a/tempest/scenario/test_swift_telemetry_middleware.py b/tempest/scenario/test_swift_telemetry_middleware.py
index e8eb45c..dce6023 100644
--- a/tempest/scenario/test_swift_telemetry_middleware.py
+++ b/tempest/scenario/test_swift_telemetry_middleware.py
@@ -71,7 +71,7 @@
             Otherwise returning False will case _check_samples to be
             called again.
             """
-            _, results = self.telemetry_client.list_samples(
+            results = self.telemetry_client.list_samples(
                 'storage.api.request')
             LOG.debug('got samples %s', results)
 
diff --git a/tempest/scenario/test_volume_boot_pattern.py b/tempest/scenario/test_volume_boot_pattern.py
index 910fd79..21a399c 100644
--- a/tempest/scenario/test_volume_boot_pattern.py
+++ b/tempest/scenario/test_volume_boot_pattern.py
@@ -10,6 +10,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from tempest_lib import decorators
+
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest.openstack.common import log
@@ -99,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'])
@@ -130,7 +132,7 @@
         actual = self._get_content(ssh_client)
         self.assertEqual(expected, actual)
 
-    @test.skip_because(bug='1373513')
+    @decorators.skip_because(bug='1373513')
     @test.services('compute', 'volume', 'image')
     def test_volume_boot_pattern(self):
         keypair = self.create_keypair()
diff --git a/tempest/scenario/utils.py b/tempest/scenario/utils.py
index 7967949..061f5c8 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
@@ -67,7 +67,7 @@
 
     def is_flavor_enough(self, flavor_id, image_id):
         _image = self.images_client.get_image(image_id)
-        _, _flavor = self.flavors_client.get_flavor_details(flavor_id)
+        _flavor = self.flavors_client.get_flavor_details(flavor_id)
         return self._is_flavor_enough(_flavor, _image)
 
 
@@ -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
@@ -134,7 +134,7 @@
         :return: a scenario with name and uuid of flavors
         """
         if not hasattr(self, '_scenario_flavors'):
-            _, flavors = self.flavors_client.list_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,
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/flavors_client.py b/tempest/services/compute/json/flavors_client.py
index b42ea40..433c325 100644
--- a/tempest/services/compute/json/flavors_client.py
+++ b/tempest/services/compute/json/flavors_client.py
@@ -34,7 +34,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(common_schema.list_flavors, resp, body)
-        return resp, body['flavors']
+        return service_client.ResponseBodyList(resp, body['flavors'])
 
     def list_flavors_with_detail(self, params=None):
         url = 'flavors/detail'
@@ -44,13 +44,13 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(v2schema.list_flavors_details, resp, body)
-        return resp, body['flavors']
+        return service_client.ResponseBodyList(resp, body['flavors'])
 
     def get_flavor_details(self, flavor_id):
         resp, body = self.get("flavors/%s" % str(flavor_id))
         body = json.loads(body)
         self.validate_response(v2schema.create_get_flavor_details, resp, body)
-        return resp, body['flavor']
+        return service_client.ResponseBody(resp, body['flavor'])
 
     def create_flavor(self, name, ram, vcpus, disk, flavor_id, **kwargs):
         """Creates a new flavor or instance type."""
@@ -74,19 +74,19 @@
 
         body = json.loads(body)
         self.validate_response(v2schema.create_get_flavor_details, resp, body)
-        return resp, body['flavor']
+        return service_client.ResponseBody(resp, body['flavor'])
 
     def delete_flavor(self, flavor_id):
         """Deletes the given flavor."""
         resp, body = self.delete("flavors/{0}".format(flavor_id))
         self.validate_response(v2schema.delete_flavor, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def is_resource_deleted(self, id):
         # Did not use get_flavor_details(id) for verification as it gives
         # 200 ok even for deleted id. LP #981263
         # we can remove the loop here and use get by ID when bug gets sortedout
-        resp, flavors = self.list_flavors_with_detail()
+        flavors = self.list_flavors_with_detail()
         for flavor in flavors:
             if flavor['id'] == id:
                 return False
@@ -105,7 +105,7 @@
         body = json.loads(body)
         self.validate_response(schema_extra_specs.flavor_extra_specs,
                                resp, body)
-        return resp, body['extra_specs']
+        return service_client.ResponseBody(resp, body['extra_specs'])
 
     def get_flavor_extra_spec(self, flavor_id):
         """Gets extra Specs details of the mentioned flavor."""
@@ -113,7 +113,7 @@
         body = json.loads(body)
         self.validate_response(schema_extra_specs.flavor_extra_specs,
                                resp, body)
-        return resp, body['extra_specs']
+        return service_client.ResponseBody(resp, body['extra_specs'])
 
     def get_flavor_extra_spec_with_key(self, flavor_id, key):
         """Gets extra Specs key-value of the mentioned flavor and key."""
@@ -122,7 +122,7 @@
         body = json.loads(body)
         self.validate_response(schema_extra_specs.flavor_extra_specs_key,
                                resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def update_flavor_extra_spec(self, flavor_id, key, **kwargs):
         """Update specified extra Specs of the mentioned flavor and key."""
@@ -131,14 +131,14 @@
         body = json.loads(body)
         self.validate_response(schema_extra_specs.flavor_extra_specs_key,
                                resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def unset_flavor_extra_spec(self, flavor_id, key):
         """Unsets extra Specs from the mentioned flavor."""
         resp, body = self.delete('flavors/%s/os-extra_specs/%s' %
                                  (str(flavor_id), key))
         self.validate_response(v2schema.unset_flavor_extra_specs, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def list_flavor_access(self, flavor_id):
         """Gets flavor access information given the flavor id."""
@@ -146,7 +146,7 @@
         body = json.loads(body)
         self.validate_response(schema_access.add_remove_list_flavor_access,
                                resp, body)
-        return resp, body['flavor_access']
+        return service_client.ResponseBodyList(resp, body['flavor_access'])
 
     def add_flavor_access(self, flavor_id, tenant_id):
         """Add flavor access for the specified tenant."""
@@ -160,7 +160,7 @@
         body = json.loads(body)
         self.validate_response(schema_access.add_remove_list_flavor_access,
                                resp, body)
-        return resp, body['flavor_access']
+        return service_client.ResponseBodyList(resp, body['flavor_access'])
 
     def remove_flavor_access(self, flavor_id, tenant_id):
         """Remove flavor access from the specified tenant."""
@@ -174,4 +174,4 @@
         body = json.loads(body)
         self.validate_response(schema_access.add_remove_list_flavor_access,
                                resp, body)
-        return resp, body['flavor_access']
+        return service_client.ResponseBody(resp, body['flavor_access'])
diff --git a/tempest/services/compute/json/floating_ips_client.py b/tempest/services/compute/json/floating_ips_client.py
index 9c586e3..8e3a3c9 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,7 +33,7 @@
         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."""
@@ -40,9 +41,9 @@
         resp, body = self.get(url)
         body = json.loads(body)
         if resp.status == 404:
-            raise exceptions.NotFound(body)
+            raise lib_exc.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 +53,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 +74,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 +88,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 +111,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 +124,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 +140,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/keypairs_client.py b/tempest/services/compute/json/keypairs_client.py
index 69dd9ae..18729c3 100644
--- a/tempest/services/compute/json/keypairs_client.py
+++ b/tempest/services/compute/json/keypairs_client.py
@@ -31,13 +31,13 @@
         # For now we shall adhere to the spec, but the spec for keypairs
         # is yet to be found
         self.validate_response(common_schema.list_keypairs, resp, body)
-        return resp, body['keypairs']
+        return service_client.ResponseBodyList(resp, body['keypairs'])
 
     def get_keypair(self, key_name):
         resp, body = self.get("os-keypairs/%s" % str(key_name))
         body = json.loads(body)
         self.validate_response(schema.get_keypair, resp, body)
-        return resp, body['keypair']
+        return service_client.ResponseBody(resp, body['keypair'])
 
     def create_keypair(self, name, pub_key=None):
         post_body = {'keypair': {'name': name}}
@@ -47,9 +47,9 @@
         resp, body = self.post("os-keypairs", body=post_body)
         body = json.loads(body)
         self.validate_response(schema.create_keypair, resp, body)
-        return resp, body['keypair']
+        return service_client.ResponseBody(resp, body['keypair'])
 
     def delete_keypair(self, key_name):
         resp, body = self.delete("os-keypairs/%s" % str(key_name))
         self.validate_response(schema.delete_keypair, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/compute/json/limits_client.py b/tempest/services/compute/json/limits_client.py
index 3a725ae..8769906 100644
--- a/tempest/services/compute/json/limits_client.py
+++ b/tempest/services/compute/json/limits_client.py
@@ -25,7 +25,7 @@
         resp, body = self.get("limits")
         body = json.loads(body)
         self.validate_response(schema.get_limit, resp, body)
-        return resp, body['limits']['absolute']
+        return service_client.ResponseBody(resp, body['limits']['absolute'])
 
     def get_specific_absolute_limit(self, absolute_limit):
         resp, body = self.get("limits")
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/quotas_client.py b/tempest/services/compute/json/quotas_client.py
index f9f02a5..ea0f423 100644
--- a/tempest/services/compute/json/quotas_client.py
+++ b/tempest/services/compute/json/quotas_client.py
@@ -32,7 +32,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.quota_set, resp, body)
-        return resp, body['quota_set']
+        return service_client.ResponseBody(resp, body['quota_set'])
 
     def get_default_quota_set(self, tenant_id):
         """List the default quota set for a tenant."""
@@ -41,7 +41,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.quota_set, resp, body)
-        return resp, body['quota_set']
+        return service_client.ResponseBody(resp, body['quota_set'])
 
     def update_quota_set(self, tenant_id, user_id=None,
                          force=None, injected_file_content_bytes=None,
@@ -106,13 +106,13 @@
 
         body = json.loads(body)
         self.validate_response(schema.quota_set_update, resp, body)
-        return resp, body['quota_set']
+        return service_client.ResponseBody(resp, body['quota_set'])
 
     def delete_quota_set(self, tenant_id):
         """Delete the tenant's quota set."""
         resp, body = self.delete('os-quota-sets/%s' % str(tenant_id))
         self.validate_response(schema.delete_quota, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
 
 class QuotaClassesClientJSON(service_client.ServiceClient):
@@ -124,7 +124,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(classes_schema.quota_set, resp, body)
-        return resp, body['quota_class_set']
+        return service_client.ResponseBody(resp, body['quota_class_set'])
 
     def update_quota_class_set(self, quota_class_id, **kwargs):
         """
@@ -137,4 +137,4 @@
 
         body = json.loads(body)
         self.validate_response(classes_schema.quota_set_update, resp, body)
-        return resp, body['quota_class_set']
+        return service_client.ResponseBody(resp, body['quota_class_set'])
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 cbe1ca8..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']
@@ -364,14 +366,14 @@
                                post_body)
         body = json.loads(body)
         self.validate_response(schema.attach_volume, resp, body)
-        return resp, body['volumeAttachment']
+        return service_client.ResponseBody(resp, body['volumeAttachment'])
 
     def detach_volume(self, server_id, volume_id):
         """Detaches a volume from a server instance."""
         resp, body = self.delete('servers/%s/os-volume_attachments/%s' %
                                  (server_id, volume_id))
         self.validate_response(schema.detach_volume, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def get_volume_attachment(self, server_id, attach_id):
         """Return details about the given volume attachment."""
@@ -379,7 +381,7 @@
             str(server_id), attach_id))
         body = json.loads(body)
         self.validate_response(schema.get_volume_attachment, resp, body)
-        return resp, body['volumeAttachment']
+        return service_client.ResponseBody(resp, body['volumeAttachment'])
 
     def list_volume_attachments(self, server_id):
         """Returns the list of volume attachments for a given instance."""
@@ -387,7 +389,7 @@
             str(server_id)))
         body = json.loads(body)
         self.validate_response(schema.list_volume_attachments, resp, body)
-        return resp, body['volumeAttachments']
+        return service_client.ResponseBodyList(resp, body['volumeAttachments'])
 
     def add_security_group(self, server_id, name):
         """Adds a security group to the server."""
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 61d0b23..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
@@ -33,7 +35,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.list_volumes, resp, body)
-        return resp, body['volumes']
+        return service_client.ResponseBodyList(resp, body['volumes'])
 
     def list_volumes_with_detail(self, params=None):
         """List all the details of volumes."""
@@ -44,7 +46,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.list_volumes, resp, body)
-        return resp, body['volumes']
+        return service_client.ResponseBodyList(resp, body['volumes'])
 
     def get_volume(self, volume_id):
         """Returns the details of a single volume."""
@@ -52,7 +54,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.create_get_volume, resp, body)
-        return resp, body['volume']
+        return service_client.ResponseBody(resp, body['volume'])
 
     def create_volume(self, size, **kwargs):
         """
@@ -71,23 +73,23 @@
         resp, body = self.post('os-volumes', post_body)
         body = json.loads(body)
         self.validate_response(schema.create_get_volume, resp, body)
-        return resp, body['volume']
+        return service_client.ResponseBody(resp, body['volume'])
 
     def delete_volume(self, volume_id):
         """Deletes the Specified Volume."""
         resp, body = self.delete("os-volumes/%s" % str(volume_id))
         self.validate_response(schema.delete_volume, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def wait_for_volume_status(self, volume_id, status):
         """Waits for a Volume to reach a given status."""
-        resp, body = self.get_volume(volume_id)
+        body = self.get_volume(volume_id)
         volume_status = body['status']
         start = int(time.time())
 
         while volume_status != status:
             time.sleep(self.build_interval)
-            resp, body = self.get_volume(volume_id)
+            body = self.get_volume(volume_id)
             volume_status = body['status']
             if volume_status == 'error':
                 raise exceptions.VolumeBuildErrorException(volume_id=volume_id)
@@ -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 79%
rename from tempest/services/data_processing/v1_1/client.py
rename to tempest/services/data_processing/v1_1/data_processing_client.py
index 55b6be6..04cf9a3 100644
--- a/tempest/services/data_processing/v1_1/client.py
+++ b/tempest/services/data_processing/v1_1/data_processing_client.py
@@ -15,25 +15,25 @@
 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.
 
-        It returns pair: resp and response body.
+        It returns a ResponseBody.
+        """
+        resp, body = request_func(uri)
+        self.expected_success(resp_status, resp.status)
+        return service_client.ResponseBody(resp, body)
+
+    def _request_and_check_resp_data(self, request_func, uri, resp_status):
+        """Make a request using specified request_func and check response
+        status code.
+
+        It returns pair: resp and response data.
         """
         resp, body = request_func(uri)
         self.expected_success(resp_status, resp.status)
@@ -44,20 +44,35 @@
         """Make a request using specified request_func, check response status
         code and parse response body.
 
-        It returns pair: resp and parsed resource(s) body.
+        It returns a ResponseBody.
         """
         headers = {'Content-Type': 'application/json'}
         resp, body = request_func(uri, headers=headers, *args, **kwargs)
         self.expected_success(resp_status, resp.status)
         body = json.loads(body)
-        return resp, body[resource_name]
+        return service_client.ResponseBody(resp, body[resource_name])
+
+    def _request_check_and_parse_resp_list(self, request_func, uri,
+                                           resp_status, resource_name,
+                                           *args, **kwargs):
+        """Make a request using specified request_func, check response status
+        code and parse response body.
+
+        It returns a ResponseBodyList.
+        """
+        headers = {'Content-Type': 'application/json'}
+        resp, body = request_func(uri, headers=headers, *args, **kwargs)
+        self.expected_success(resp_status, resp.status)
+        body = json.loads(body)
+        return service_client.ResponseBodyList(resp, body[resource_name])
 
     def list_node_group_templates(self):
         """List all node group templates for a user."""
 
         uri = 'node-group-templates'
-        return self._request_check_and_parse_resp(self.get, uri,
-                                                  200, 'node_group_templates')
+        return self._request_check_and_parse_resp_list(self.get, uri,
+                                                       200,
+                                                       'node_group_templates')
 
     def get_node_group_template(self, tmpl_id):
         """Returns the details of a single node group template."""
@@ -98,8 +113,8 @@
         """List all enabled plugins."""
 
         uri = 'plugins'
-        return self._request_check_and_parse_resp(self.get,
-                                                  uri, 200, 'plugins')
+        return self._request_check_and_parse_resp_list(self.get,
+                                                       uri, 200, 'plugins')
 
     def get_plugin(self, plugin_name, plugin_version=None):
         """Returns the details of a single plugin."""
@@ -113,8 +128,9 @@
         """List all cluster templates for a user."""
 
         uri = 'cluster-templates'
-        return self._request_check_and_parse_resp(self.get, uri,
-                                                  200, 'cluster_templates')
+        return self._request_check_and_parse_resp_list(self.get, uri,
+                                                       200,
+                                                       'cluster_templates')
 
     def get_cluster_template(self, tmpl_id):
         """Returns the details of a single cluster template."""
@@ -154,8 +170,9 @@
         """List all data sources for a user."""
 
         uri = 'data-sources'
-        return self._request_check_and_parse_resp(self.get,
-                                                  uri, 200, 'data_sources')
+        return self._request_check_and_parse_resp_list(self.get,
+                                                       uri, 200,
+                                                       'data_sources')
 
     def get_data_source(self, source_id):
         """Returns the details of a single data source."""
@@ -191,8 +208,8 @@
         """List all job binary internals for a user."""
 
         uri = 'job-binary-internals'
-        return self._request_check_and_parse_resp(self.get,
-                                                  uri, 200, 'binaries')
+        return self._request_check_and_parse_resp_list(self.get,
+                                                       uri, 200, 'binaries')
 
     def get_job_binary_internal(self, job_binary_id):
         """Returns the details of a single job binary internal."""
@@ -218,14 +235,14 @@
         """Returns data of a single job binary internal."""
 
         uri = 'job-binary-internals/%s/data' % job_binary_id
-        return self._request_and_check_resp(self.get, uri, 200)
+        return self._request_and_check_resp_data(self.get, uri, 200)
 
     def list_job_binaries(self):
         """List all job binaries for a user."""
 
         uri = 'job-binaries'
-        return self._request_check_and_parse_resp(self.get,
-                                                  uri, 200, 'binaries')
+        return self._request_check_and_parse_resp_list(self.get,
+                                                       uri, 200, 'binaries')
 
     def get_job_binary(self, job_binary_id):
         """Returns the details of a single job binary."""
@@ -261,13 +278,14 @@
         """Returns data of a single job binary."""
 
         uri = 'job-binaries/%s/data' % job_binary_id
-        return self._request_and_check_resp(self.get, uri, 200)
+        return self._request_and_check_resp_data(self.get, uri, 200)
 
     def list_jobs(self):
         """List all jobs for a user."""
 
         uri = 'jobs'
-        return self._request_check_and_parse_resp(self.get, uri, 200, 'jobs')
+        return self._request_check_and_parse_resp_list(self.get,
+                                                       uri, 200, 'jobs')
 
     def get_job(self, job_id):
         """Returns the details of a single job."""
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..6fbb3a9 100644
--- a/tempest/services/identity/json/identity_client.py
+++ b/tempest/services/identity/json/identity_client.py
@@ -11,10 +11,10 @@
 #    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
 
@@ -134,7 +134,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 +227,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..1e8b31e 100644
--- a/tempest/services/identity/json/token_client.py
+++ b/tempest/services/identity/json/token_client.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 import json
+from tempest_lib import exceptions as lib_exc
 
 from tempest.common import service_client
 from tempest import config
@@ -87,7 +88,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/identity_client.py b/tempest/services/identity/v3/json/identity_client.py
index f3d9d2d..95c52bf 100644
--- a/tempest/services/identity/v3/json/identity_client.py
+++ b/tempest/services/identity/v3/json/identity_client.py
@@ -17,11 +17,8 @@
 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):
 
diff --git a/tempest/services/identity/v3/json/token_client.py b/tempest/services/identity/v3/json/token_client.py
index 891de9f..5d75efa 100644
--- a/tempest/services/identity/v3/json/token_client.py
+++ b/tempest/services/identity/v3/json/token_client.py
@@ -13,6 +13,7 @@
 #    under the License.
 
 import json
+from tempest_lib import exceptions as lib_exc
 
 from tempest.common import service_client
 from tempest import config
@@ -111,7 +112,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, 204]:
             raise exceptions.IdentityError(
                 'Unexpected status code {0}'.format(resp.status))
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..5106225 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
 
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 2967cfa..a249625 100644
--- a/tempest/services/telemetry/json/telemetry_client.py
+++ b/tempest/services/telemetry/json/telemetry_client.py
@@ -45,8 +45,9 @@
         uri = "%s/meters/%s" % (self.uri_prefix, meter_name)
         body = self.serialize(sample_list)
         resp, body = self.post(uri, body)
+        self.expected_success(200, resp.status)
         body = self.deserialize(body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def helper_list(self, uri, query=None, period=None):
         uri_dict = {}
@@ -59,8 +60,9 @@
         if uri_dict:
             uri += "?%s" % urllib.urlencode(uri_dict)
         resp, body = self.get(uri)
+        self.expected_success(200, resp.status)
         body = self.deserialize(body)
-        return resp, body
+        return service_client.ResponseBodyList(resp, body)
 
     def list_resources(self, query=None):
         uri = '%s/resources' % self.uri_prefix
@@ -85,45 +87,52 @@
     def get_resource(self, resource_id):
         uri = '%s/resources/%s' % (self.uri_prefix, resource_id)
         resp, body = self.get(uri)
+        self.expected_success(200, resp.status)
         body = self.deserialize(body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def get_alarm(self, alarm_id):
         uri = '%s/alarms/%s' % (self.uri_prefix, alarm_id)
         resp, body = self.get(uri)
+        self.expected_success(200, resp.status)
         body = self.deserialize(body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def delete_alarm(self, alarm_id):
         uri = "%s/alarms/%s" % (self.uri_prefix, alarm_id)
         resp, body = self.delete(uri)
+        self.expected_success(204, resp.status)
         if body:
             body = self.deserialize(body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def create_alarm(self, **kwargs):
         uri = "%s/alarms" % self.uri_prefix
         body = self.serialize(kwargs)
         resp, body = self.post(uri, body)
+        self.expected_success(201, resp.status)
         body = self.deserialize(body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def update_alarm(self, alarm_id, **kwargs):
         uri = "%s/alarms/%s" % (self.uri_prefix, alarm_id)
         body = self.serialize(kwargs)
         resp, body = self.put(uri, body)
+        self.expected_success(200, resp.status)
         body = self.deserialize(body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def alarm_get_state(self, alarm_id):
         uri = "%s/alarms/%s/state" % (self.uri_prefix, alarm_id)
         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)
         body = self.serialize(state)
         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..9ef1686 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
 
diff --git a/tempest/stress/actions/volume_attach_verify.py b/tempest/stress/actions/volume_attach_verify.py
index aa3cad0..3c052ac 100644
--- a/tempest/stress/actions/volume_attach_verify.py
+++ b/tempest/stress/actions/volume_attach_verify.py
@@ -24,7 +24,7 @@
 
     def _create_keypair(self):
         keyname = data_utils.rand_name("key")
-        _, self.key = self.manager.keypairs_client.create_keypair(keyname)
+        self.key = self.manager.keypairs_client.create_keypair(keyname)
 
     def _delete_keypair(self):
         self.manager.keypairs_client.delete_keypair(self.key['name'])
diff --git a/tempest/stress/cleanup.py b/tempest/stress/cleanup.py
index 94d4b30..86325f5 100644
--- a/tempest/stress/cleanup.py
+++ b/tempest/stress/cleanup.py
@@ -37,7 +37,7 @@
         except Exception:
             pass
 
-    _, keypairs = admin_manager.keypairs_client.list_keypairs()
+    keypairs = admin_manager.keypairs_client.list_keypairs()
     LOG.info("Cleanup::remove %s keypairs" % len(keypairs))
     for k in keypairs:
         try:
@@ -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:
@@ -95,7 +95,7 @@
         except Exception:
             pass
 
-    _, vols = admin_manager.volumes_client.list_volumes({"all_tenants": True})
+    vols = admin_manager.volumes_client.list_volumes({"all_tenants": True})
     LOG.info("Cleanup::remove %s volumes" % len(vols))
     for v in vols:
         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 cc8370c..d4123a4 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -39,9 +39,6 @@
 
 CONF = config.CONF
 
-# All the successful HTTP status codes from RFC 2616
-HTTP_SUCCESS = (200, 201, 202, 203, 204, 205, 206)
-
 
 def attr(*args, **kwargs):
     """A decorator which applies the  testtools attr decorator
@@ -140,35 +137,6 @@
     return decorator
 
 
-def skip_because(*args, **kwargs):
-    """A decorator useful to skip tests hitting known bugs
-
-    @param bug: bug number causing the test to skip
-    @param condition: optional condition to be True for the skip to have place
-    @param interface: skip the test if it is the same as self._interface
-    """
-    def decorator(f):
-        @functools.wraps(f)
-        def wrapper(self, *func_args, **func_kwargs):
-            skip = False
-            if "condition" in kwargs:
-                if kwargs["condition"] is True:
-                    skip = True
-            elif "interface" in kwargs:
-                if kwargs["interface"] == self._interface:
-                    skip = True
-            else:
-                skip = True
-            if "bug" in kwargs and skip is True:
-                if not kwargs['bug'].isdigit():
-                    raise ValueError('bug must be a valid bug number')
-                msg = "Skipped until Bug: %s is resolved." % kwargs["bug"]
-                raise testtools.TestCase.skipException(msg)
-            return f(self, *func_args, **func_kwargs)
-        return wrapper
-    return decorator
-
-
 def requires_ext(*args, **kwargs):
     """A decorator to skip tests if an extension is not enabled
 
@@ -391,7 +359,7 @@
                                                    level=None))
 
     @classmethod
-    def get_client_manager(cls, interface=None):
+    def get_client_manager(cls):
         """
         Returns an OpenStack client manager
         """
@@ -405,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
@@ -426,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
 
@@ -445,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,
@@ -468,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_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..443b67e 100644
--- a/tempest/tests/common/test_service_clients.py
+++ b/tempest/tests/common/test_service_clients.py
@@ -43,6 +43,7 @@
 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.messaging.json import messaging_client
@@ -117,6 +118,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,
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..0317ad6 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()
 
 
@@ -54,8 +50,6 @@
         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)
 
 
@@ -87,11 +81,6 @@
     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..7621f6e 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,18 @@
     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(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 +97,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 +121,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 +157,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
diff --git a/tempest/tests/test_decorators.py b/tempest/tests/test_decorators.py
index 32cefd0..1f1835e 100644
--- a/tempest/tests/test_decorators.py
+++ b/tempest/tests/test_decorators.py
@@ -150,70 +150,6 @@
                                      allow_inheritance=True)
 
 
-class TestSkipBecauseDecorator(BaseDecoratorsTest):
-    def _test_skip_because_helper(self, expected_to_skip=True,
-                                  **decorator_args):
-        class TestFoo(test.BaseTestCase):
-            _interface = 'json'
-
-            @test.skip_because(**decorator_args)
-            def test_bar(self):
-                return 0
-
-        t = TestFoo('test_bar')
-        if expected_to_skip:
-            self.assertRaises(testtools.TestCase.skipException, t.test_bar)
-        else:
-            # assert that test_bar returned 0
-            self.assertEqual(TestFoo('test_bar').test_bar(), 0)
-
-    def test_skip_because_bug(self):
-        self._test_skip_because_helper(bug='12345')
-
-    def test_skip_because_bug_and_interface_match(self):
-        self._test_skip_because_helper(bug='12346', interface='json')
-
-    def test_skip_because_bug_interface_not_match(self):
-        self._test_skip_because_helper(expected_to_skip=False,
-                                       bug='12347', interface='xml')
-
-    def test_skip_because_bug_and_condition_true(self):
-        self._test_skip_because_helper(bug='12348', condition=True)
-
-    def test_skip_because_bug_and_condition_false(self):
-        self._test_skip_because_helper(expected_to_skip=False,
-                                       bug='12349', condition=False)
-
-    def test_skip_because_bug_condition_false_and_interface_match(self):
-        """
-        Assure that only condition will be evaluated if both parameters are
-        passed.
-        """
-        self._test_skip_because_helper(expected_to_skip=False,
-                                       bug='12350', condition=False,
-                                       interface='json')
-
-    def test_skip_because_bug_condition_true_and_interface_not_match(self):
-        """
-        Assure that only condition will be evaluated if both parameters are
-        passed.
-        """
-        self._test_skip_because_helper(bug='12351', condition=True,
-                                       interface='xml')
-
-    def test_skip_because_bug_without_bug_never_skips(self):
-        """Never skip without a bug parameter."""
-        self._test_skip_because_helper(expected_to_skip=False,
-                                       condition=True)
-        self._test_skip_because_helper(expected_to_skip=False,
-                                       interface='json')
-
-    def test_skip_because_invalid_bug_number(self):
-        """Raise ValueError if with an invalid bug number"""
-        self.assertRaises(ValueError, self._test_skip_because_helper,
-                          bug='critical_bug')
-
-
 class TestRequiresExtDecorator(BaseDecoratorsTest):
     def setUp(self):
         super(TestRequiresExtDecorator, self).setUp()
diff --git a/tempest/thirdparty/boto/test.py b/tempest/thirdparty/boto/test.py
index 5bd3556..edd9de1 100644
--- a/tempest/thirdparty/boto/test.py
+++ b/tempest/thirdparty/boto/test.py
@@ -79,7 +79,7 @@
 
     except keystoneclient.exceptions.Unauthorized:
         EC2_CAN_CONNECT_ERROR = "AWS credentials not set," +\
-                                " faild to get them even by keystoneclient"
+                                " failed to get them even by keystoneclient"
     except Exception as exc:
         EC2_CAN_CONNECT_ERROR = str(exc)
 
@@ -96,7 +96,7 @@
         S3_CAN_CONNECT_ERROR = str(exc)
     except keystoneclient.exceptions.Unauthorized:
         S3_CAN_CONNECT_ERROR = "AWS credentials not set," +\
-                               " faild to get them even by keystoneclient"
+                               " failed to get them even by keystoneclient"
     boto_logger.logger.setLevel(level)
     return {'A_I_IMAGES_READY': A_I_IMAGES_READY,
             'S3_CAN_CONNECT_ERROR': S3_CAN_CONNECT_ERROR,
