diff --git a/tempest/api/compute/admin/test_quotas.py b/tempest/api/compute/admin/test_quotas.py
index 7c666a2..fc70fdb 100644
--- a/tempest/api/compute/admin/test_quotas.py
+++ b/tempest/api/compute/admin/test_quotas.py
@@ -99,8 +99,8 @@
         tenant_name = data_utils.rand_name('cpu_quota_tenant_')
         tenant_desc = tenant_name + '-desc'
         identity_client = self.os_adm.identity_client
-        _, tenant = identity_client.create_tenant(name=tenant_name,
-                                                  description=tenant_desc)
+        tenant = identity_client.create_tenant(name=tenant_name,
+                                               description=tenant_desc)
         tenant_id = tenant['id']
         self.addCleanup(identity_client.delete_tenant, tenant_id)
 
@@ -113,10 +113,10 @@
         user_name = data_utils.rand_name('cpu_quota_user_')
         password = data_utils.rand_name('password-')
         email = user_name + '@testmail.tm'
-        _, user = identity_client.create_user(name=user_name,
-                                              password=password,
-                                              tenant_id=tenant_id,
-                                              email=email)
+        user = identity_client.create_user(name=user_name,
+                                           password=password,
+                                           tenant_id=tenant_id,
+                                           email=email)
         user_id = user['id']
         self.addCleanup(identity_client.delete_user, user_id)
 
@@ -134,8 +134,8 @@
         tenant_name = data_utils.rand_name('ram_quota_tenant_')
         tenant_desc = tenant_name + '-desc'
         identity_client = self.os_adm.identity_client
-        _, tenant = identity_client.create_tenant(name=tenant_name,
-                                                  description=tenant_desc)
+        tenant = identity_client.create_tenant(name=tenant_name,
+                                               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)
diff --git a/tempest/api/identity/admin/test_roles.py b/tempest/api/identity/admin/test_roles.py
index fabc0ed..c6c7dc3 100644
--- a/tempest/api/identity/admin/test_roles.py
+++ b/tempest/api/identity/admin/test_roles.py
@@ -28,7 +28,7 @@
         super(RolesTestJSON, cls).resource_setup()
         for _ in moves.xrange(5):
             role_name = data_utils.rand_name(name='role-')
-            _, role = cls.client.create_role(role_name)
+            role = cls.client.create_role(role_name)
             cls.data.roles.append(role)
 
     def _get_role_params(self):
@@ -49,7 +49,7 @@
     @test.attr(type='gate')
     def test_list_roles(self):
         """Return a list of all roles."""
-        _, body = self.client.list_roles()
+        body = self.client.list_roles()
         found = [role for role in body if role in self.data.roles]
         self.assertTrue(any(found))
         self.assertEqual(len(found), len(self.data.roles))
@@ -58,16 +58,16 @@
     def test_role_create_delete(self):
         """Role should be created, verified, and deleted."""
         role_name = data_utils.rand_name(name='role-test-')
-        _, body = self.client.create_role(role_name)
+        body = self.client.create_role(role_name)
         self.assertEqual(role_name, body['name'])
 
-        _, body = self.client.list_roles()
+        body = self.client.list_roles()
         found = [role for role in body if role['name'] == role_name]
         self.assertTrue(any(found))
 
-        _, body = self.client.delete_role(found[0]['id'])
+        body = self.client.delete_role(found[0]['id'])
 
-        _, body = self.client.list_roles()
+        body = self.client.list_roles()
         found = [role for role in body if role['name'] == role_name]
         self.assertFalse(any(found))
 
@@ -77,7 +77,7 @@
         self.data.setup_test_role()
         role_id = self.data.role['id']
         role_name = self.data.role['name']
-        _, body = self.client.get_role(role_id)
+        body = self.client.get_role(role_id)
         self.assertEqual(role_id, body['id'])
         self.assertEqual(role_name, body['name'])
 
@@ -86,15 +86,15 @@
         """Assign a role to a user on a tenant."""
         (user, tenant, role) = self._get_role_params()
         self.client.assign_user_role(tenant['id'], user['id'], role['id'])
-        _, roles = self.client.list_user_roles(tenant['id'], user['id'])
+        roles = self.client.list_user_roles(tenant['id'], user['id'])
         self.assert_role_in_role_list(role, roles)
 
     @test.attr(type='gate')
     def test_remove_user_role(self):
         """Remove a role assigned to a user on a tenant."""
         (user, tenant, role) = self._get_role_params()
-        _, user_role = self.client.assign_user_role(tenant['id'],
-                                                    user['id'], role['id'])
+        user_role = self.client.assign_user_role(tenant['id'],
+                                                 user['id'], role['id'])
         self.client.remove_user_role(tenant['id'], user['id'],
                                      user_role['id'])
 
@@ -103,5 +103,5 @@
         """List roles assigned to a user on tenant."""
         (user, tenant, role) = self._get_role_params()
         self.client.assign_user_role(tenant['id'], user['id'], role['id'])
-        _, roles = self.client.list_user_roles(tenant['id'], user['id'])
+        roles = self.client.list_user_roles(tenant['id'], user['id'])
         self.assert_role_in_role_list(role, roles)
diff --git a/tempest/api/identity/admin/test_roles_negative.py b/tempest/api/identity/admin/test_roles_negative.py
index d0eb334..58f726a 100644
--- a/tempest/api/identity/admin/test_roles_negative.py
+++ b/tempest/api/identity/admin/test_roles_negative.py
@@ -72,7 +72,7 @@
     def test_role_create_duplicate(self):
         # Role names should be unique
         role_name = data_utils.rand_name(name='role-dup-')
-        _, body = self.client.create_role(role_name)
+        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,
@@ -82,7 +82,7 @@
     def test_delete_role_by_unauthorized_user(self):
         # Non-administrator user should not be able to delete role
         role_name = data_utils.rand_name(name='role-')
-        _, body = self.client.create_role(role_name)
+        body = self.client.create_role(role_name)
         self.data.roles.append(body)
         role_id = body.get('id')
         self.assertRaises(exceptions.Unauthorized,
@@ -92,7 +92,7 @@
     def test_delete_role_request_without_token(self):
         # Request to delete role without a valid token should fail
         role_name = data_utils.rand_name(name='role-')
-        _, body = self.client.create_role(role_name)
+        body = self.client.create_role(role_name)
         self.data.roles.append(body)
         role_id = body.get('id')
         token = self.client.auth_provider.get_token()
@@ -158,9 +158,9 @@
         # Non-administrator user should not be authorized to
         # remove a user's role
         (user, tenant, role) = self._get_role_params()
-        resp, user_role = self.client.assign_user_role(tenant['id'],
-                                                       user['id'],
-                                                       role['id'])
+        self.client.assign_user_role(tenant['id'],
+                                     user['id'],
+                                     role['id'])
         self.assertRaises(exceptions.Unauthorized,
                           self.non_admin_client.remove_user_role,
                           tenant['id'], user['id'], role['id'])
@@ -169,9 +169,9 @@
     def test_remove_user_role_request_without_token(self):
         # Request to remove a user's role without a valid token
         (user, tenant, role) = self._get_role_params()
-        resp, user_role = self.client.assign_user_role(tenant['id'],
-                                                       user['id'],
-                                                       role['id'])
+        self.client.assign_user_role(tenant['id'],
+                                     user['id'],
+                                     role['id'])
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
         self.assertRaises(exceptions.Unauthorized,
@@ -183,9 +183,9 @@
     def test_remove_user_role_non_existent_role(self):
         # Attempt to delete a non existent role from a user should fail
         (user, tenant, role) = self._get_role_params()
-        resp, user_role = self.client.assign_user_role(tenant['id'],
-                                                       user['id'],
-                                                       role['id'])
+        self.client.assign_user_role(tenant['id'],
+                                     user['id'],
+                                     role['id'])
         non_existent_role = str(uuid.uuid4().hex)
         self.assertRaises(exceptions.NotFound, self.client.remove_user_role,
                           tenant['id'], user['id'], non_existent_role)
@@ -194,9 +194,9 @@
     def test_remove_user_role_non_existent_tenant(self):
         # Attempt to remove a role from a non existent tenant should fail
         (user, tenant, role) = self._get_role_params()
-        resp, user_role = self.client.assign_user_role(tenant['id'],
-                                                       user['id'],
-                                                       role['id'])
+        self.client.assign_user_role(tenant['id'],
+                                     user['id'],
+                                     role['id'])
         non_existent_tenant = str(uuid.uuid4().hex)
         self.assertRaises(exceptions.NotFound, self.client.remove_user_role,
                           non_existent_tenant, user['id'], role['id'])
diff --git a/tempest/api/identity/admin/test_services.py b/tempest/api/identity/admin/test_services.py
index b8f09ad..03d6e35 100644
--- a/tempest/api/identity/admin/test_services.py
+++ b/tempest/api/identity/admin/test_services.py
@@ -38,7 +38,7 @@
         name = data_utils.rand_name('service-')
         type = data_utils.rand_name('type--')
         description = data_utils.rand_name('description-')
-        _, service_data = self.client.create_service(
+        service_data = self.client.create_service(
             name, type, description=description)
         self.assertFalse(service_data['id'] is None)
         self.addCleanup(self._del_service, service_data['id'])
@@ -51,7 +51,7 @@
         self.assertIn('description', service_data)
         self.assertEqual(description, service_data['description'])
         # Get service
-        _, fetched_service = self.client.get_service(service_data['id'])
+        fetched_service = self.client.get_service(service_data['id'])
         # verifying the existence of service created
         self.assertIn('id', fetched_service)
         self.assertEqual(fetched_service['id'], service_data['id'])
@@ -68,7 +68,7 @@
         # Create a service only with name and type
         name = data_utils.rand_name('service-')
         type = data_utils.rand_name('type--')
-        _, service = self.client.create_service(name, type)
+        service = self.client.create_service(name, type)
         self.assertIn('id', service)
         self.addCleanup(self._del_service, service['id'])
         self.assertIn('name', service)
@@ -84,7 +84,7 @@
             name = data_utils.rand_name('service-')
             type = data_utils.rand_name('type--')
             description = data_utils.rand_name('description-')
-            _, service = self.client.create_service(
+            service = self.client.create_service(
                 name, type, description=description)
             services.append(service)
         service_ids = map(lambda x: x['id'], services)
@@ -95,6 +95,6 @@
 
         self.addCleanup(delete_services)
         # List and Verify Services
-        _, body = self.client.list_services()
+        body = self.client.list_services()
         found = [serv for serv in body if serv['id'] in service_ids]
         self.assertEqual(len(found), len(services), 'Services not found')
diff --git a/tempest/api/identity/admin/test_tenant_negative.py b/tempest/api/identity/admin/test_tenant_negative.py
index 57a2fec..75f0152 100644
--- a/tempest/api/identity/admin/test_tenant_negative.py
+++ b/tempest/api/identity/admin/test_tenant_negative.py
@@ -42,7 +42,7 @@
     def test_tenant_delete_by_unauthorized_user(self):
         # Non-administrator user should not be able to delete a tenant
         tenant_name = data_utils.rand_name(name='tenant-')
-        _, tenant = self.client.create_tenant(tenant_name)
+        tenant = self.client.create_tenant(tenant_name)
         self.data.tenants.append(tenant)
         self.assertRaises(exceptions.Unauthorized,
                           self.non_admin_client.delete_tenant, tenant['id'])
@@ -51,7 +51,7 @@
     def test_tenant_delete_request_without_token(self):
         # Request to delete a tenant without a valid token should fail
         tenant_name = data_utils.rand_name(name='tenant-')
-        _, tenant = self.client.create_tenant(tenant_name)
+        tenant = self.client.create_tenant(tenant_name)
         self.data.tenants.append(tenant)
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
@@ -69,7 +69,7 @@
     def test_tenant_create_duplicate(self):
         # Tenant names should be unique
         tenant_name = data_utils.rand_name(name='tenant-')
-        _, body = self.client.create_tenant(tenant_name)
+        body = self.client.create_tenant(tenant_name)
         tenant = body
         self.data.tenants.append(tenant)
         tenant1_id = body.get('id')
@@ -119,7 +119,7 @@
     def test_tenant_update_by_unauthorized_user(self):
         # Non-administrator user should not be able to update a tenant
         tenant_name = data_utils.rand_name(name='tenant-')
-        _, tenant = self.client.create_tenant(tenant_name)
+        tenant = self.client.create_tenant(tenant_name)
         self.data.tenants.append(tenant)
         self.assertRaises(exceptions.Unauthorized,
                           self.non_admin_client.update_tenant, tenant['id'])
@@ -128,7 +128,7 @@
     def test_tenant_update_request_without_token(self):
         # Request to update a tenant without a valid token should fail
         tenant_name = data_utils.rand_name(name='tenant-')
-        _, tenant = self.client.create_tenant(tenant_name)
+        tenant = self.client.create_tenant(tenant_name)
         self.data.tenants.append(tenant)
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
diff --git a/tempest/api/identity/admin/test_tenants.py b/tempest/api/identity/admin/test_tenants.py
index 778bd5c..549e952 100644
--- a/tempest/api/identity/admin/test_tenants.py
+++ b/tempest/api/identity/admin/test_tenants.py
@@ -29,11 +29,11 @@
         tenants = []
         for _ in moves.xrange(3):
             tenant_name = data_utils.rand_name(name='tenant-new')
-            _, tenant = self.client.create_tenant(tenant_name)
+            tenant = self.client.create_tenant(tenant_name)
             self.data.tenants.append(tenant)
             tenants.append(tenant)
         tenant_ids = map(lambda x: x['id'], tenants)
-        _, body = self.client.list_tenants()
+        body = self.client.list_tenants()
         found = [t for t in body if t['id'] in tenant_ids]
         self.assertEqual(len(found), len(tenants), 'Tenants not created')
 
@@ -41,7 +41,7 @@
             self.client.delete_tenant(tenant['id'])
             self.data.tenants.remove(tenant)
 
-        _, body = self.client.list_tenants()
+        body = self.client.list_tenants()
         found = [tenant for tenant in body if tenant['id'] in tenant_ids]
         self.assertFalse(any(found), 'Tenants failed to delete')
 
@@ -50,15 +50,15 @@
         # Create tenant with a description
         tenant_name = data_utils.rand_name(name='tenant-')
         tenant_desc = data_utils.rand_name(name='desc-')
-        _, body = self.client.create_tenant(tenant_name,
-                                            description=tenant_desc)
+        body = self.client.create_tenant(tenant_name,
+                                         description=tenant_desc)
         tenant = body
         self.data.tenants.append(tenant)
         tenant_id = body['id']
         desc1 = body['description']
         self.assertEqual(desc1, tenant_desc, 'Description should have '
                          'been sent in response for create')
-        _, body = self.client.get_tenant(tenant_id)
+        body = self.client.get_tenant(tenant_id)
         desc2 = body['description']
         self.assertEqual(desc2, tenant_desc, 'Description does not appear'
                          'to be set')
@@ -69,13 +69,13 @@
     def test_tenant_create_enabled(self):
         # Create a tenant that is enabled
         tenant_name = data_utils.rand_name(name='tenant-')
-        _, body = self.client.create_tenant(tenant_name, enabled=True)
+        body = self.client.create_tenant(tenant_name, enabled=True)
         tenant = body
         self.data.tenants.append(tenant)
         tenant_id = body['id']
         en1 = body['enabled']
         self.assertTrue(en1, 'Enable should be True in response')
-        _, body = self.client.get_tenant(tenant_id)
+        body = self.client.get_tenant(tenant_id)
         en2 = body['enabled']
         self.assertTrue(en2, 'Enable should be True in lookup')
         self.client.delete_tenant(tenant_id)
@@ -85,14 +85,14 @@
     def test_tenant_create_not_enabled(self):
         # Create a tenant that is not enabled
         tenant_name = data_utils.rand_name(name='tenant-')
-        _, body = self.client.create_tenant(tenant_name, enabled=False)
+        body = self.client.create_tenant(tenant_name, enabled=False)
         tenant = body
         self.data.tenants.append(tenant)
         tenant_id = body['id']
         en1 = body['enabled']
         self.assertEqual('false', str(en1).lower(),
                          'Enable should be False in response')
-        _, body = self.client.get_tenant(tenant_id)
+        body = self.client.get_tenant(tenant_id)
         en2 = body['enabled']
         self.assertEqual('false', str(en2).lower(),
                          'Enable should be False in lookup')
@@ -103,7 +103,7 @@
     def test_tenant_update_name(self):
         # Update name attribute of a tenant
         t_name1 = data_utils.rand_name(name='tenant-')
-        _, body = self.client.create_tenant(t_name1)
+        body = self.client.create_tenant(t_name1)
         tenant = body
         self.data.tenants.append(tenant)
 
@@ -111,11 +111,11 @@
         resp1_name = body['name']
 
         t_name2 = data_utils.rand_name(name='tenant2-')
-        _, body = self.client.update_tenant(t_id, name=t_name2)
+        body = self.client.update_tenant(t_id, name=t_name2)
         resp2_name = body['name']
         self.assertNotEqual(resp1_name, resp2_name)
 
-        _, body = self.client.get_tenant(t_id)
+        body = self.client.get_tenant(t_id)
         resp3_name = body['name']
 
         self.assertNotEqual(resp1_name, resp3_name)
@@ -130,7 +130,7 @@
         # Update description attribute of a tenant
         t_name = data_utils.rand_name(name='tenant-')
         t_desc = data_utils.rand_name(name='desc-')
-        _, body = self.client.create_tenant(t_name, description=t_desc)
+        body = self.client.create_tenant(t_name, description=t_desc)
         tenant = body
         self.data.tenants.append(tenant)
 
@@ -138,11 +138,11 @@
         resp1_desc = body['description']
 
         t_desc2 = data_utils.rand_name(name='desc2-')
-        _, body = self.client.update_tenant(t_id, description=t_desc2)
+        body = self.client.update_tenant(t_id, description=t_desc2)
         resp2_desc = body['description']
         self.assertNotEqual(resp1_desc, resp2_desc)
 
-        _, body = self.client.get_tenant(t_id)
+        body = self.client.get_tenant(t_id)
         resp3_desc = body['description']
 
         self.assertNotEqual(resp1_desc, resp3_desc)
@@ -157,7 +157,7 @@
         # Update the enabled attribute of a tenant
         t_name = data_utils.rand_name(name='tenant-')
         t_en = False
-        _, body = self.client.create_tenant(t_name, enabled=t_en)
+        body = self.client.create_tenant(t_name, enabled=t_en)
         tenant = body
         self.data.tenants.append(tenant)
 
@@ -165,11 +165,11 @@
         resp1_en = body['enabled']
 
         t_en2 = True
-        _, body = self.client.update_tenant(t_id, enabled=t_en2)
+        body = self.client.update_tenant(t_id, enabled=t_en2)
         resp2_en = body['enabled']
         self.assertNotEqual(resp1_en, resp2_en)
 
-        _, body = self.client.get_tenant(t_id)
+        body = self.client.get_tenant(t_id)
         resp3_en = body['enabled']
 
         self.assertNotEqual(resp1_en, resp3_en)
diff --git a/tempest/api/identity/admin/test_tokens.py b/tempest/api/identity/admin/test_tokens.py
index bfdc7d6..bec621c 100644
--- a/tempest/api/identity/admin/test_tokens.py
+++ b/tempest/api/identity/admin/test_tokens.py
@@ -28,21 +28,21 @@
         user_password = data_utils.rand_name(name='pass-')
         # first:create a tenant
         tenant_name = data_utils.rand_name(name='tenant-')
-        _, tenant = self.client.create_tenant(tenant_name)
+        tenant = self.client.create_tenant(tenant_name)
         self.data.tenants.append(tenant)
         # second:create a user
-        _, user = self.client.create_user(user_name, user_password,
-                                          tenant['id'], '')
+        user = self.client.create_user(user_name, user_password,
+                                       tenant['id'], '')
         self.data.users.append(user)
         # then get a token for the user
-        _, body = self.token_client.auth(user_name,
-                                         user_password,
-                                         tenant['name'])
+        body = self.token_client.auth(user_name,
+                                      user_password,
+                                      tenant['name'])
         self.assertEqual(body['token']['tenant']['name'],
                          tenant['name'])
         # Perform GET Token
         token_id = body['token']['id']
-        _, token_details = self.client.get_token(token_id)
+        token_details = self.client.get_token(token_id)
         self.assertEqual(token_id, token_details['token']['id'])
         self.assertEqual(user['id'], token_details['user']['id'])
         self.assertEqual(user_name, token_details['user']['name'])
@@ -62,22 +62,22 @@
         user_password = data_utils.rand_name(name='pass-')
         tenant_id = None  # No default tenant so will get unscoped token.
         email = ''
-        _, user = self.client.create_user(user_name, user_password,
-                                          tenant_id, email)
+        user = self.client.create_user(user_name, user_password,
+                                       tenant_id, email)
         self.data.users.append(user)
 
         # Create a couple tenants.
         tenant1_name = data_utils.rand_name(name='tenant-')
-        _, tenant1 = self.client.create_tenant(tenant1_name)
+        tenant1 = self.client.create_tenant(tenant1_name)
         self.data.tenants.append(tenant1)
 
         tenant2_name = data_utils.rand_name(name='tenant-')
-        _, tenant2 = self.client.create_tenant(tenant2_name)
+        tenant2 = self.client.create_tenant(tenant2_name)
         self.data.tenants.append(tenant2)
 
         # Create a role
         role_name = data_utils.rand_name(name='role-')
-        _, role = self.client.create_role(role_name)
+        role = self.client.create_role(role_name)
         self.data.roles.append(role)
 
         # Grant the user the role on the tenants.
@@ -88,13 +88,13 @@
                                      role['id'])
 
         # Get an unscoped token.
-        _, body = self.token_client.auth(user_name, user_password)
+        body = self.token_client.auth(user_name, user_password)
 
         token_id = body['token']['id']
 
         # Use the unscoped token to get a token scoped to tenant1
-        _, body = self.token_client.auth_token(token_id,
-                                               tenant=tenant1_name)
+        body = self.token_client.auth_token(token_id,
+                                            tenant=tenant1_name)
 
         scoped_token_id = body['token']['id']
 
@@ -102,5 +102,5 @@
         self.client.delete_token(scoped_token_id)
 
         # Use the unscoped token to get a token scoped to tenant2
-        _, body = self.token_client.auth_token(token_id,
-                                               tenant=tenant2_name)
+        body = self.token_client.auth_token(token_id,
+                                            tenant=tenant2_name)
diff --git a/tempest/api/identity/admin/test_users.py b/tempest/api/identity/admin/test_users.py
index 84a8103..25312e8 100644
--- a/tempest/api/identity/admin/test_users.py
+++ b/tempest/api/identity/admin/test_users.py
@@ -34,9 +34,9 @@
     def test_create_user(self):
         # Create a user
         self.data.setup_test_tenant()
-        _, user = self.client.create_user(self.alt_user, self.alt_password,
-                                          self.data.tenant['id'],
-                                          self.alt_email)
+        user = self.client.create_user(self.alt_user, self.alt_password,
+                                       self.data.tenant['id'],
+                                       self.alt_email)
         self.data.users.append(user)
         self.assertEqual(self.alt_user, user['name'])
 
@@ -45,9 +45,9 @@
         # Create a user with enabled : False
         self.data.setup_test_tenant()
         name = data_utils.rand_name('test_user_')
-        _, user = self.client.create_user(name, self.alt_password,
-                                          self.data.tenant['id'],
-                                          self.alt_email, enabled=False)
+        user = self.client.create_user(name, self.alt_password,
+                                       self.data.tenant['id'],
+                                       self.alt_email, enabled=False)
         self.data.users.append(user)
         self.assertEqual(name, user['name'])
         self.assertEqual('false', str(user['enabled']).lower())
@@ -58,22 +58,22 @@
         # Test case to check if updating of user attributes is successful.
         test_user = data_utils.rand_name('test_user_')
         self.data.setup_test_tenant()
-        _, user = self.client.create_user(test_user, self.alt_password,
-                                          self.data.tenant['id'],
-                                          self.alt_email)
+        user = self.client.create_user(test_user, self.alt_password,
+                                       self.data.tenant['id'],
+                                       self.alt_email)
         # Delete the User at the end of this method
         self.addCleanup(self.client.delete_user, user['id'])
         # Updating user details with new values
         u_name2 = data_utils.rand_name('user2-')
         u_email2 = u_name2 + '@testmail.tm'
-        _, update_user = self.client.update_user(user['id'], name=u_name2,
-                                                 email=u_email2,
-                                                 enabled=False)
+        update_user = self.client.update_user(user['id'], name=u_name2,
+                                              email=u_email2,
+                                              enabled=False)
         self.assertEqual(u_name2, update_user['name'])
         self.assertEqual(u_email2, update_user['email'])
         self.assertEqual('false', str(update_user['enabled']).lower())
         # GET by id after updating
-        _, updated_user = self.client.get_user(user['id'])
+        updated_user = self.client.get_user(user['id'])
         # Assert response body of GET after updating
         self.assertEqual(u_name2, updated_user['name'])
         self.assertEqual(u_email2, updated_user['email'])
@@ -84,9 +84,9 @@
         # Delete a user
         test_user = data_utils.rand_name('test_user_')
         self.data.setup_test_tenant()
-        _, user = self.client.create_user(test_user, self.alt_password,
-                                          self.data.tenant['id'],
-                                          self.alt_email)
+        user = self.client.create_user(test_user, self.alt_password,
+                                       self.data.tenant['id'],
+                                       self.alt_email)
         self.client.delete_user(user['id'])
 
     @test.attr(type='smoke')
@@ -121,7 +121,7 @@
     def test_get_users(self):
         # Get a list of users and find the test user
         self.data.setup_test_user()
-        _, users = self.client.get_users()
+        users = self.client.get_users()
         self.assertThat([u['name'] for u in users],
                         matchers.Contains(self.data.test_user),
                         "Could not find %s" % self.data.test_user)
@@ -133,20 +133,20 @@
         user_ids = list()
         fetched_user_ids = list()
         alt_tenant_user1 = data_utils.rand_name('tenant_user1_')
-        _, user1 = self.client.create_user(alt_tenant_user1, 'password1',
-                                           self.data.tenant['id'],
-                                           'user1@123')
+        user1 = self.client.create_user(alt_tenant_user1, 'password1',
+                                        self.data.tenant['id'],
+                                        'user1@123')
         user_ids.append(user1['id'])
         self.data.users.append(user1)
 
         alt_tenant_user2 = data_utils.rand_name('tenant_user2_')
-        _, user2 = self.client.create_user(alt_tenant_user2, 'password2',
-                                           self.data.tenant['id'],
-                                           'user2@123')
+        user2 = self.client.create_user(alt_tenant_user2, 'password2',
+                                        self.data.tenant['id'],
+                                        'user2@123')
         user_ids.append(user2['id'])
         self.data.users.append(user2)
         # List of users for the respective tenant ID
-        _, body = self.client.list_users_for_tenant(self.data.tenant['id'])
+        body = self.client.list_users_for_tenant(self.data.tenant['id'])
         for i in body:
             fetched_user_ids.append(i['id'])
         # verifying the user Id in the list
@@ -168,20 +168,20 @@
         user_ids = list()
         fetched_user_ids = list()
         user_ids.append(user['id'])
-        _, role = self.client.assign_user_role(tenant['id'], user['id'],
-                                               role['id'])
+        role = self.client.assign_user_role(tenant['id'], user['id'],
+                                            role['id'])
 
         alt_user2 = data_utils.rand_name('second_user_')
-        _, second_user = self.client.create_user(alt_user2, 'password1',
-                                                 self.data.tenant['id'],
-                                                 'user2@123')
+        second_user = self.client.create_user(alt_user2, 'password1',
+                                              self.data.tenant['id'],
+                                              'user2@123')
         user_ids.append(second_user['id'])
         self.data.users.append(second_user)
-        _, role = self.client.assign_user_role(tenant['id'],
-                                               second_user['id'],
-                                               role['id'])
+        role = self.client.assign_user_role(tenant['id'],
+                                            second_user['id'],
+                                            role['id'])
         # List of users with roles for the respective tenant ID
-        _, body = self.client.list_users_for_tenant(self.data.tenant['id'])
+        body = self.client.list_users_for_tenant(self.data.tenant['id'])
         for i in body:
             fetched_user_ids.append(i['id'])
         # verifying the user Id in the list
@@ -197,12 +197,12 @@
         self.data.setup_test_user()
         # Updating the user with new password
         new_pass = data_utils.rand_name('pass-')
-        _, update_user = self.client.update_user_password(
+        update_user = self.client.update_user_password(
             self.data.user['id'], new_pass)
         self.assertEqual(update_user['id'], self.data.user['id'])
 
         # Validate the updated password
         # Get a token
-        _, body = self.token_client.auth(self.data.test_user, new_pass,
-                                         self.data.test_tenant)
+        body = self.token_client.auth(self.data.test_user, new_pass,
+                                      self.data.test_tenant)
         self.assertTrue('id' in body['token'])
diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py
index c9010ee..08bfd4f 100644
--- a/tempest/api/identity/base.py
+++ b/tempest/api/identity/base.py
@@ -46,7 +46,7 @@
 
     @classmethod
     def get_user_by_name(cls, name):
-        _, users = cls.client.get_users()
+        users = cls.client.get_users()
         user = [u for u in users if u['name'] == name]
         if len(user) > 0:
             return user[0]
@@ -54,16 +54,16 @@
     @classmethod
     def get_tenant_by_name(cls, name):
         try:
-            _, tenants = cls.client.list_tenants()
+            tenants = cls.client.list_tenants()
         except AttributeError:
-            _, tenants = cls.client.list_projects()
+            tenants = cls.client.list_projects()
         tenant = [t for t in tenants if t['name'] == name]
         if len(tenant) > 0:
             return tenant[0]
 
     @classmethod
     def get_role_by_name(cls, name):
-        _, roles = cls.client.list_roles()
+        roles = cls.client.list_roles()
         role = [r for r in roles if r['name'] == name]
         if len(role) > 0:
             return role[0]
@@ -161,17 +161,17 @@
             self.test_user = data_utils.rand_name('test_user_')
             self.test_password = data_utils.rand_name('pass_')
             self.test_email = self.test_user + '@testmail.tm'
-            _, self.user = self.client.create_user(self.test_user,
-                                                   self.test_password,
-                                                   self.tenant['id'],
-                                                   self.test_email)
+            self.user = self.client.create_user(self.test_user,
+                                                self.test_password,
+                                                self.tenant['id'],
+                                                self.test_email)
             self.users.append(self.user)
 
         def setup_test_tenant(self):
             """Set up a test tenant."""
             self.test_tenant = data_utils.rand_name('test_tenant_')
             self.test_description = data_utils.rand_name('desc_')
-            _, self.tenant = self.client.create_tenant(
+            self.tenant = self.client.create_tenant(
                 name=self.test_tenant,
                 description=self.test_description)
             self.tenants.append(self.tenant)
@@ -179,7 +179,7 @@
         def setup_test_role(self):
             """Set up a test role."""
             self.test_role = data_utils.rand_name('role')
-            _, self.role = self.client.create_role(self.test_role)
+            self.role = self.client.create_role(self.test_role)
             self.roles.append(self.role)
 
         def setup_test_v3_user(self):
diff --git a/tempest/api/identity/test_extension.py b/tempest/api/identity/test_extension.py
index 829628a..e3badfc 100644
--- a/tempest/api/identity/test_extension.py
+++ b/tempest/api/identity/test_extension.py
@@ -23,7 +23,7 @@
     @test.attr(type='gate')
     def test_list_extensions(self):
         # List all the extensions
-        _, body = self.non_admin_client.list_extensions()
+        body = self.non_admin_client.list_extensions()
         self.assertNotEmpty(body)
         keys = ['name', 'updated', 'alias', 'links',
                 'namespace', 'description']
diff --git a/tempest/api/network/admin/test_quotas.py b/tempest/api/network/admin/test_quotas.py
index 54aa54c..f8dfca9 100644
--- a/tempest/api/network/admin/test_quotas.py
+++ b/tempest/api/network/admin/test_quotas.py
@@ -50,7 +50,7 @@
         # Add a tenant to conduct the test
         test_tenant = data_utils.rand_name('test_tenant_')
         test_description = data_utils.rand_name('desc_')
-        _, tenant = self.identity_admin_client.create_tenant(
+        tenant = self.identity_admin_client.create_tenant(
             name=test_tenant,
             description=test_description)
         tenant_id = tenant['id']
diff --git a/tempest/api/network/test_routers.py b/tempest/api/network/test_routers.py
index 5e8a851..210a8af 100644
--- a/tempest/api/network/test_routers.py
+++ b/tempest/api/network/test_routers.py
@@ -94,7 +94,7 @@
         # Test creating router from admin user setting tenant_id.
         test_tenant = data_utils.rand_name('test_tenant_')
         test_description = data_utils.rand_name('desc_')
-        _, tenant = self.identity_admin_client.create_tenant(
+        tenant = self.identity_admin_client.create_tenant(
             name=test_tenant, description=test_description)
         tenant_id = tenant['id']
         self.addCleanup(self.identity_admin_client.delete_tenant, tenant_id)
diff --git a/tempest/api/object_storage/base.py b/tempest/api/object_storage/base.py
index fcb80f5..36c9f5a 100644
--- a/tempest/api/object_storage/base.py
+++ b/tempest/api/object_storage/base.py
@@ -122,7 +122,7 @@
 
     def _get_role_id(self, role_name):
         try:
-            _, roles = self.client.list_roles()
+            roles = self.client.list_roles()
             return next(r['id'] for r in roles if r['name'] == role_name)
         except StopIteration:
             msg = "Role name '%s' is not found" % role_name
diff --git a/tempest/api/volume/admin/test_volume_quotas.py b/tempest/api/volume/admin/test_volume_quotas.py
index 50bab56..80ef914 100644
--- a/tempest/api/volume/admin/test_volume_quotas.py
+++ b/tempest/api/volume/admin/test_volume_quotas.py
@@ -100,7 +100,7 @@
         # Admin can delete the resource quota set for a tenant
         tenant_name = data_utils.rand_name('quota_tenant_')
         identity_client = self.os_adm.identity_client
-        tenant = identity_client.create_tenant(tenant_name)[1]
+        tenant = identity_client.create_tenant(tenant_name)
         tenant_id = tenant['id']
         self.addCleanup(identity_client.delete_tenant, tenant_id)
         _, quota_set_default = self.quotas_client.get_default_quota_set(
diff --git a/tempest/cmd/cleanup.py b/tempest/cmd/cleanup.py
index 28f0aa8..28992b9 100755
--- a/tempest/cmd/cleanup.py
+++ b/tempest/cmd/cleanup.py
@@ -180,7 +180,7 @@
                                           CONF.identity.admin_username)
         self.admin_id = user['id']
 
-        _, roles = id_cl.list_roles()
+        roles = id_cl.list_roles()
         for role in roles:
             if role['name'] == CONF.identity.admin_role:
                 self.admin_role_id = role['id']
@@ -215,7 +215,7 @@
     def _add_admin(self, tenant_id):
         id_cl = self.admin_mgr.identity_client
         needs_role = True
-        _, roles = id_cl.list_user_roles(tenant_id, self.admin_id)
+        roles = id_cl.list_user_roles(tenant_id, self.admin_id)
         for role in roles:
             if role['id'] == self.admin_role_id:
                 needs_role = False
diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py
index 0941008..227fbe6 100644
--- a/tempest/cmd/cleanup_service.py
+++ b/tempest/cmd/cleanup_service.py
@@ -886,7 +886,7 @@
 
     def list(self):
         client = self.client
-        _, users = client.get_users()
+        users = client.get_users()
 
         if not self.is_save_state:
             users = [user for user in users if user['id']
@@ -929,7 +929,7 @@
     def list(self):
         client = self.client
         try:
-            _, roles = client.list_roles()
+            roles = client.list_roles()
             # reconcile roles with saved state and never list admin role
             if not self.is_save_state:
                 roles = [role for role in roles if
@@ -967,7 +967,7 @@
 
     def list(self):
         client = self.client
-        _, tenants = client.list_tenants()
+        tenants = client.list_tenants()
         if not self.is_save_state:
             tenants = [tenant for tenant in tenants if (tenant['id']
                        not in self.saved_state_json['tenants'].keys()
@@ -1009,7 +1009,7 @@
 
     def list(self):
         client = self.client
-        _, domains = client.list_domains()
+        domains = client.list_domains()
         if not self.is_save_state:
             domains = [domain for domain in domains if domain['id']
                        not in self.saved_state_json['domains'].keys()]
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 819f4e2..001e3dc 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -196,7 +196,7 @@
     Don't create the tenants if they already exist.
     """
     admin = keystone_admin()
-    _, body = admin.identity.list_tenants()
+    body = admin.identity.list_tenants()
     existing = [x['name'] for x in body]
     for tenant in tenants:
         if tenant not in existing:
@@ -209,7 +209,7 @@
     admin = keystone_admin()
     for tenant in tenants:
         tenant_id = admin.identity.get_tenant_by_name(tenant)['id']
-        r, body = admin.identity.delete_tenant(tenant_id)
+        admin.identity.delete_tenant(tenant_id)
 
 ##############
 #
@@ -237,7 +237,7 @@
 
 def _assign_swift_role(user):
     admin = keystone_admin()
-    resp, roles = admin.identity.list_roles()
+    roles = admin.identity.list_roles()
     role = next(r for r in roles if r['name'] == 'Member')
     LOG.debug(USERS[user])
     try:
@@ -281,7 +281,7 @@
         tenant_id = admin.identity.get_tenant_by_name(user['tenant'])['id']
         user_id = admin.identity.get_user_by_username(tenant_id,
                                                       user['name'])['id']
-        r, body = admin.identity.delete_user(user_id)
+        admin.identity.delete_user(user_id)
 
 
 def collect_users(users):
@@ -345,7 +345,7 @@
         LOG.info("checking users")
         for name, user in self.users.iteritems():
             client = keystone_admin()
-            _, found = client.identity.get_user(user['id'])
+            found = client.identity.get_user(user['id'])
             self.assertEqual(found['name'], user['name'])
             self.assertEqual(found['tenantId'], user['tenant_id'])
 
diff --git a/tempest/common/isolated_creds.py b/tempest/common/isolated_creds.py
index 9a9ef82..f478f95 100644
--- a/tempest/common/isolated_creds.py
+++ b/tempest/common/isolated_creds.py
@@ -52,26 +52,26 @@
         return os.identity_client, os.network_client
 
     def _create_tenant(self, name, description):
-        _, tenant = self.identity_admin_client.create_tenant(
+        tenant = self.identity_admin_client.create_tenant(
             name=name, description=description)
         return tenant
 
     def _get_tenant_by_name(self, name):
-        _, tenant = self.identity_admin_client.get_tenant_by_name(name)
+        tenant = self.identity_admin_client.get_tenant_by_name(name)
         return tenant
 
     def _create_user(self, username, password, tenant, email):
-        _, user = self.identity_admin_client.create_user(
+        user = self.identity_admin_client.create_user(
             username, password, tenant['id'], email)
         return user
 
     def _get_user(self, tenant, username):
-        _, user = self.identity_admin_client.get_user_by_username(
+        user = self.identity_admin_client.get_user_by_username(
             tenant['id'], username)
         return user
 
     def _list_roles(self):
-        _, roles = self.identity_admin_client.list_roles()
+        roles = self.identity_admin_client.list_roles()
         return roles
 
     def _assign_user_role(self, tenant, user, role_name):
diff --git a/tempest/services/identity/json/identity_client.py b/tempest/services/identity/json/identity_client.py
index 5a4ce72..f6c77e1 100644
--- a/tempest/services/identity/json/identity_client.py
+++ b/tempest/services/identity/json/identity_client.py
@@ -51,14 +51,14 @@
         post_body = json.dumps({'role': post_body})
         resp, body = self.post('OS-KSADM/roles', post_body)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def get_role(self, role_id):
         """Get a role by its id."""
         resp, body = self.get('OS-KSADM/roles/%s' % role_id)
         self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body['role']
+        return rest_client.ResponseBody(resp, body['role'])
 
     def create_tenant(self, name, **kwargs):
         """
@@ -75,7 +75,7 @@
         post_body = json.dumps({'tenant': post_body})
         resp, body = self.post('tenants', post_body)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def delete_role(self, role_id):
         """Delete a role."""
@@ -88,49 +88,49 @@
         url = '/tenants/%s/users/%s/roles' % (tenant_id, user_id)
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBodyList(resp, self._parse_resp(body))
 
     def assign_user_role(self, tenant_id, user_id, role_id):
         """Add roles to a user on a tenant."""
         resp, body = self.put('/tenants/%s/users/%s/roles/OS-KSADM/%s' %
                               (tenant_id, user_id, role_id), "")
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def remove_user_role(self, tenant_id, user_id, role_id):
         """Removes a role assignment for a user on a tenant."""
         resp, body = self.delete('/tenants/%s/users/%s/roles/OS-KSADM/%s' %
                                  (tenant_id, user_id, role_id))
         self.expected_success(204, resp.status)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def delete_tenant(self, tenant_id):
         """Delete a tenant."""
         resp, body = self.delete('tenants/%s' % str(tenant_id))
         self.expected_success(204, resp.status)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def get_tenant(self, tenant_id):
         """Get tenant details."""
         resp, body = self.get('tenants/%s' % str(tenant_id))
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def list_roles(self):
         """Returns roles."""
         resp, body = self.get('OS-KSADM/roles')
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBodyList(resp, self._parse_resp(body))
 
     def list_tenants(self):
         """Returns tenants."""
         resp, body = self.get('tenants')
         self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body['tenants']
+        return rest_client.ResponseBodyList(resp, body['tenants'])
 
     def get_tenant_by_name(self, tenant_name):
-        _, tenants = self.list_tenants()
+        tenants = self.list_tenants()
         for tenant in tenants:
             if tenant['name'] == tenant_name:
                 return tenant
@@ -138,7 +138,7 @@
 
     def update_tenant(self, tenant_id, **kwargs):
         """Updates a tenant."""
-        _, body = self.get_tenant(tenant_id)
+        body = self.get_tenant(tenant_id)
         name = kwargs.get('name', body['name'])
         desc = kwargs.get('description', body['description'])
         en = kwargs.get('enabled', body['enabled'])
@@ -151,7 +151,7 @@
         post_body = json.dumps({'tenant': post_body})
         resp, body = self.post('tenants/%s' % tenant_id, post_body)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def create_user(self, name, password, tenant_id, email, **kwargs):
         """Create a user."""
@@ -167,32 +167,32 @@
         post_body = json.dumps({'user': post_body})
         resp, body = self.post('users', post_body)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def update_user(self, user_id, **kwargs):
         """Updates a user."""
         put_body = json.dumps({'user': kwargs})
         resp, body = self.put('users/%s' % user_id, put_body)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def get_user(self, user_id):
         """GET a user."""
         resp, body = self.get("users/%s" % user_id)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def delete_user(self, user_id):
         """Delete a user."""
         resp, body = self.delete("users/%s" % user_id)
         self.expected_success(204, resp.status)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def get_users(self):
         """Get the list of users."""
         resp, body = self.get("users")
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBodyList(resp, self._parse_resp(body))
 
     def enable_disable_user(self, user_id, enabled):
         """Enables or disables a user."""
@@ -202,28 +202,28 @@
         put_body = json.dumps({'user': put_body})
         resp, body = self.put('users/%s/enabled' % user_id, put_body)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def get_token(self, token_id):
         """Get token details."""
         resp, body = self.get("tokens/%s" % token_id)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def delete_token(self, token_id):
         """Delete a token."""
         resp, body = self.delete("tokens/%s" % token_id)
         self.expected_success(204, resp.status)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def list_users_for_tenant(self, tenant_id):
         """List users for a Tenant."""
         resp, body = self.get('/tenants/%s/users' % tenant_id)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBodyList(resp, self._parse_resp(body))
 
     def get_user_by_username(self, tenant_id, username):
-        _, users = self.list_users_for_tenant(tenant_id)
+        users = self.list_users_for_tenant(tenant_id)
         for user in users:
             if user['name'] == username:
                 return user
@@ -239,27 +239,27 @@
         post_body = json.dumps({'OS-KSADM:service': post_body})
         resp, body = self.post('/OS-KSADM/services', post_body)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def get_service(self, service_id):
         """Get Service."""
         url = '/OS-KSADM/services/%s' % service_id
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def list_services(self):
         """List Service - Returns Services."""
         resp, body = self.get('/OS-KSADM/services')
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBodyList(resp, self._parse_resp(body))
 
     def delete_service(self, service_id):
         """Delete Service."""
         url = '/OS-KSADM/services/%s' % service_id
         resp, body = self.delete(url)
         self.expected_success(204, resp.status)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def update_user_password(self, user_id, new_pass):
         """Update User Password."""
@@ -270,14 +270,14 @@
         put_body = json.dumps({'user': put_body})
         resp, body = self.put('users/%s/OS-KSADM/password' % user_id, put_body)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return rest_client.ResponseBody(resp, self._parse_resp(body))
 
     def list_extensions(self):
         """List all the extensions."""
         resp, body = self.get('/extensions')
         self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body['extensions']['values']
+        return rest_client.ResponseBodyList(resp, body['extensions']['values'])
 
 
 class TokenClientJSON(IdentityClientJSON):
@@ -309,7 +309,7 @@
         resp, body = self.post(self.auth_url, body=body)
         self.expected_success(200, resp.status)
 
-        return resp, body['access']
+        return rest_client.ResponseBody(resp, body['access'])
 
     def auth_token(self, token_id, tenant=None):
         creds = {
@@ -327,7 +327,7 @@
         resp, body = self.post(self.auth_url, body=body)
         self.expected_success(200, resp.status)
 
-        return resp, body['access']
+        return rest_client.ResponseBody(resp, body['access'])
 
     def request(self, method, url, extra_headers=False, headers=None,
                 body=None):
@@ -359,7 +359,7 @@
         """
         Returns (token id, token data) for supplied credentials
         """
-        resp, body = self.auth(user, password, tenant)
+        body = self.auth(user, password, tenant)
 
         if auth_data:
             return body['token']['id'], body
diff --git a/tempest/stress/cleanup.py b/tempest/stress/cleanup.py
index 2587331..b494db6 100644
--- a/tempest/stress/cleanup.py
+++ b/tempest/stress/cleanup.py
@@ -63,13 +63,13 @@
         except Exception:
             pass
 
-    _, users = admin_manager.identity_client.get_users()
+    users = admin_manager.identity_client.get_users()
     LOG.info("Cleanup::remove %s users" % len(users))
     for user in users:
         if user['name'].startswith("stress_user"):
             admin_manager.identity_client.delete_user(user['id'])
 
-    _, tenants = admin_manager.identity_client.list_tenants()
+    tenants = admin_manager.identity_client.list_tenants()
     LOG.info("Cleanup::remove %s tenants" % len(tenants))
     for tenant in tenants:
         if tenant['name'].startswith("stress_tenant"):
diff --git a/tempest/stress/driver.py b/tempest/stress/driver.py
index 642108a..49fac3d 100644
--- a/tempest/stress/driver.py
+++ b/tempest/stress/driver.py
@@ -143,7 +143,7 @@
                 tenant_name = data_utils.rand_name("stress_tenant")
                 password = "pass"
                 identity_client = admin_manager.identity_client
-                _, tenant = identity_client.create_tenant(name=tenant_name)
+                tenant = identity_client.create_tenant(name=tenant_name)
                 identity_client.create_user(username,
                                             password,
                                             tenant['id'],
diff --git a/tempest/tests/test_tenant_isolation.py b/tempest/tests/test_tenant_isolation.py
index 053dae1..994b4a2 100644
--- a/tempest/tests/test_tenant_isolation.py
+++ b/tempest/tests/test_tenant_isolation.py
@@ -17,6 +17,7 @@
 
 from tempest.common import http
 from tempest.common import isolated_creds
+from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common.fixture import mockpatch
@@ -51,41 +52,42 @@
         user_fix = self.useFixture(mockpatch.PatchObject(
             json_iden_client.IdentityClientJSON,
             'create_user',
-            return_value=({'status': 200},
-                          {'id': id, 'name': name})))
+            return_value=(rest_client.ResponseBody
+                          (200, {'id': id, 'name': name}))))
         return user_fix
 
     def _mock_tenant_create(self, id, name):
         tenant_fix = self.useFixture(mockpatch.PatchObject(
             json_iden_client.IdentityClientJSON,
             'create_tenant',
-            return_value=({'status': 200},
-                          {'id': id, 'name': name})))
+            return_value=(rest_client.ResponseBody
+                          (200, {'id': id, 'name': name}))))
         return tenant_fix
 
     def _mock_list_roles(self, id, name):
         roles_fix = self.useFixture(mockpatch.PatchObject(
             json_iden_client.IdentityClientJSON,
             'list_roles',
-            return_value=({'status': 200},
-                          [{'id': id, 'name': name},
-                           {'id': '1', 'name': 'FakeRole'}])))
+            return_value=(rest_client.ResponseBodyList
+                          (200,
+                           [{'id': id, 'name': name},
+                            {'id': '1', 'name': 'FakeRole'}]))))
         return roles_fix
 
     def _mock_assign_user_role(self):
         tenant_fix = self.useFixture(mockpatch.PatchObject(
             json_iden_client.IdentityClientJSON,
             'assign_user_role',
-            return_value=({'status': 200},
-                          {})))
+            return_value=(rest_client.ResponseBody
+                          (200, {}))))
         return tenant_fix
 
     def _mock_list_role(self):
         roles_fix = self.useFixture(mockpatch.PatchObject(
             json_iden_client.IdentityClientJSON,
             'list_roles',
-            return_value=({'status': 200},
-                          [{'id': '1', 'name': 'FakeRole'}])))
+            return_value=(rest_client.ResponseBodyList
+                          (200, [{'id': '1', 'name': 'FakeRole'}]))))
         return roles_fix
 
     def _mock_network_create(self, iso_creds, id, name):
