diff --git a/tempest/api/identity/admin/v2/test_endpoints.py b/tempest/api/identity/admin/v2/test_endpoints.py
index 3af2e90..bff4f91 100644
--- a/tempest/api/identity/admin/v2/test_endpoints.py
+++ b/tempest/api/identity/admin/v2/test_endpoints.py
@@ -27,9 +27,8 @@
         s_name = data_utils.rand_name('service')
         s_type = data_utils.rand_name('type')
         s_description = data_utils.rand_name('description')
-        cls.service_data =\
-            cls.client.create_service(s_name, s_type,
-                                      description=s_description)
+        cls.service_data = cls.client.create_service(
+            s_name, s_type, description=s_description)['OS-KSADM:service']
         cls.service_id = cls.service_data['id']
         cls.service_ids.append(cls.service_id)
         # Create endpoints so as to use for LIST and GET test cases
@@ -41,7 +40,7 @@
                                                   region,
                                                   publicurl=url,
                                                   adminurl=url,
-                                                  internalurl=url)
+                                                  internalurl=url)['endpoint']
             # list_endpoints() will return 'enabled' field
             endpoint['enabled'] = True
             cls.setup_endpoints.append(endpoint)
@@ -57,7 +56,7 @@
     @test.idempotent_id('11f590eb-59d8-4067-8b2b-980c7f387f51')
     def test_list_endpoints(self):
         # Get a list of endpoints
-        fetched_endpoints = self.client.list_endpoints()
+        fetched_endpoints = self.client.list_endpoints()['endpoints']
         # Asserting LIST endpoints
         missing_endpoints =\
             [e for e in self.setup_endpoints if e not in fetched_endpoints]
@@ -73,18 +72,18 @@
                                                region,
                                                publicurl=url,
                                                adminurl=url,
-                                               internalurl=url)
+                                               internalurl=url)['endpoint']
         # Asserting Create Endpoint response body
         self.assertIn('id', endpoint)
         self.assertEqual(region, endpoint['region'])
         self.assertEqual(url, endpoint['publicurl'])
         # Checking if created endpoint is present in the list of endpoints
-        fetched_endpoints = self.client.list_endpoints()
+        fetched_endpoints = self.client.list_endpoints()['endpoints']
         fetched_endpoints_id = [e['id'] for e in fetched_endpoints]
         self.assertIn(endpoint['id'], fetched_endpoints_id)
         # Deleting the endpoint created in this method
         self.client.delete_endpoint(endpoint['id'])
         # Checking whether endpoint is deleted successfully
-        fetched_endpoints = self.client.list_endpoints()
+        fetched_endpoints = self.client.list_endpoints()['endpoints']
         fetched_endpoints_id = [e['id'] for e in fetched_endpoints]
         self.assertNotIn(endpoint['id'], fetched_endpoints_id)
diff --git a/tempest/api/identity/admin/v2/test_roles.py b/tempest/api/identity/admin/v2/test_roles.py
index 0b28a07..78beead 100644
--- a/tempest/api/identity/admin/v2/test_roles.py
+++ b/tempest/api/identity/admin/v2/test_roles.py
@@ -27,7 +27,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)['role']
             cls.data.roles.append(role)
 
     def _get_role_params(self):
@@ -48,7 +48,7 @@
     @test.idempotent_id('75d9593f-50b7-4fcf-bd64-e3fb4a278e23')
     def test_list_roles(self):
         """Return a list of all roles."""
-        body = self.client.list_roles()
+        body = self.client.list_roles()['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))
@@ -57,16 +57,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)['role']
         self.assertEqual(role_name, body['name'])
 
-        body = self.client.list_roles()
+        body = self.client.list_roles()['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.list_roles()
+        body = self.client.list_roles()['roles']
         found = [role for role in body if role['name'] == role_name]
         self.assertFalse(any(found))
 
@@ -85,7 +85,7 @@
         """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'])['roles']
         self.assert_role_in_role_list(role, roles)
 
     @test.idempotent_id('f0b9292c-d3ba-4082-aa6c-440489beef69')
@@ -93,7 +93,8 @@
         """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['id'],
+                                                 role['id'])['role']
         self.client.remove_user_role(tenant['id'], user['id'],
                                      user_role['id'])
 
@@ -102,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'])['roles']
         self.assert_role_in_role_list(role, roles)
diff --git a/tempest/api/identity/admin/v2/test_roles_negative.py b/tempest/api/identity/admin/v2/test_roles_negative.py
index b38b7dd..5932aba 100644
--- a/tempest/api/identity/admin/v2/test_roles_negative.py
+++ b/tempest/api/identity/admin/v2/test_roles_negative.py
@@ -78,7 +78,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)['role']
         role1_id = body.get('id')
         self.addCleanup(self.client.delete_role, role1_id)
         self.assertRaises(lib_exc.Conflict, self.client.create_role,
@@ -89,7 +89,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)['role']
         self.data.roles.append(body)
         role_id = body.get('id')
         self.assertRaises(lib_exc.Forbidden,
@@ -100,7 +100,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)['role']
         self.data.roles.append(body)
         role_id = body.get('id')
         token = self.client.auth_provider.get_token()
diff --git a/tempest/api/identity/admin/v2/test_services.py b/tempest/api/identity/admin/v2/test_services.py
index ef93981..eebeedb 100644
--- a/tempest/api/identity/admin/v2/test_services.py
+++ b/tempest/api/identity/admin/v2/test_services.py
@@ -38,7 +38,7 @@
         type = data_utils.rand_name('type')
         description = data_utils.rand_name('description')
         service_data = self.client.create_service(
-            name, type, description=description)
+            name, type, description=description)['OS-KSADM:service']
         self.assertFalse(service_data['id'] is None)
         self.addCleanup(self._del_service, service_data['id'])
         # Verifying response body of create service
@@ -50,7 +50,8 @@
         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'])
+                           ['OS-KSADM:service'])
         # verifying the existence of service created
         self.assertIn('id', fetched_service)
         self.assertEqual(fetched_service['id'], service_data['id'])
@@ -67,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)['OS-KSADM:service']
         self.assertIn('id', service)
         self.addCleanup(self._del_service, service['id'])
         self.assertIn('name', service)
@@ -85,7 +86,7 @@
             type = data_utils.rand_name('type')
             description = data_utils.rand_name('description')
             service = self.client.create_service(
-                name, type, description=description)
+                name, type, description=description)['OS-KSADM:service']
             services.append(service)
         service_ids = map(lambda x: x['id'], services)
 
@@ -95,6 +96,6 @@
 
         self.addCleanup(delete_services)
         # List and Verify Services
-        body = self.client.list_services()
+        body = self.client.list_services()['OS-KSADM: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/v2/test_tenant_negative.py b/tempest/api/identity/admin/v2/test_tenant_negative.py
index bccb5ca..74558d1 100644
--- a/tempest/api/identity/admin/v2/test_tenant_negative.py
+++ b/tempest/api/identity/admin/v2/test_tenant_negative.py
@@ -45,7 +45,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)['tenant']
         self.data.tenants.append(tenant)
         self.assertRaises(lib_exc.Forbidden,
                           self.non_admin_client.delete_tenant, tenant['id'])
@@ -55,7 +55,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)['tenant']
         self.data.tenants.append(tenant)
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
@@ -75,7 +75,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']
         tenant = body
         self.data.tenants.append(tenant)
         tenant1_id = body.get('id')
@@ -131,7 +131,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)['tenant']
         self.data.tenants.append(tenant)
         self.assertRaises(lib_exc.Forbidden,
                           self.non_admin_client.update_tenant, tenant['id'])
@@ -141,7 +141,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)['tenant']
         self.data.tenants.append(tenant)
         token = self.client.auth_provider.get_token()
         self.client.delete_token(token)
diff --git a/tempest/api/identity/admin/v2/test_tenants.py b/tempest/api/identity/admin/v2/test_tenants.py
index 9fff5f3..2ec5c4f 100644
--- a/tempest/api/identity/admin/v2/test_tenants.py
+++ b/tempest/api/identity/admin/v2/test_tenants.py
@@ -28,7 +28,7 @@
         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)['tenant']
             self.data.tenants.append(tenant)
             tenants.append(tenant)
         tenant_ids = map(lambda x: x['id'], tenants)
@@ -50,14 +50,14 @@
         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)
+                                         description=tenant_desc)['tenant']
         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)['tenant']
         desc2 = body['description']
         self.assertEqual(desc2, tenant_desc, 'Description does not appear'
                          'to be set')
@@ -68,13 +68,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']
         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)['tenant']
         en2 = body['enabled']
         self.assertTrue(en2, 'Enable should be True in lookup')
         self.client.delete_tenant(tenant_id)
@@ -84,14 +84,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']
         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)['tenant']
         en2 = body['enabled']
         self.assertEqual('false', str(en2).lower(),
                          'Enable should be False in lookup')
@@ -102,7 +102,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']
         tenant = body
         self.data.tenants.append(tenant)
 
@@ -110,11 +110,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)['tenant']
         resp2_name = body['name']
         self.assertNotEqual(resp1_name, resp2_name)
 
-        body = self.client.get_tenant(t_id)
+        body = self.client.get_tenant(t_id)['tenant']
         resp3_name = body['name']
 
         self.assertNotEqual(resp1_name, resp3_name)
@@ -129,7 +129,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']
         tenant = body
         self.data.tenants.append(tenant)
 
@@ -137,11 +137,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)['tenant']
         resp2_desc = body['description']
         self.assertNotEqual(resp1_desc, resp2_desc)
 
-        body = self.client.get_tenant(t_id)
+        body = self.client.get_tenant(t_id)['tenant']
         resp3_desc = body['description']
 
         self.assertNotEqual(resp1_desc, resp3_desc)
@@ -156,7 +156,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']
         tenant = body
         self.data.tenants.append(tenant)
 
@@ -164,11 +164,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)['tenant']
         resp2_en = body['enabled']
         self.assertNotEqual(resp1_en, resp2_en)
 
-        body = self.client.get_tenant(t_id)
+        body = self.client.get_tenant(t_id)['tenant']
         resp3_en = body['enabled']
 
         self.assertNotEqual(resp1_en, resp3_en)
diff --git a/tempest/api/identity/admin/v2/test_tokens.py b/tempest/api/identity/admin/v2/test_tokens.py
index 66d00d1..981a9ea 100644
--- a/tempest/api/identity/admin/v2/test_tokens.py
+++ b/tempest/api/identity/admin/v2/test_tokens.py
@@ -27,11 +27,11 @@
         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)['tenant']
         self.data.tenants.append(tenant)
         # second:create a user
         user = self.client.create_user(user_name, user_password,
-                                       tenant['id'], '')
+                                       tenant['id'], '')['user']
         self.data.users.append(user)
         # then get a token for the user
         body = self.token_client.auth(user_name,
@@ -41,7 +41,7 @@
                          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)['access']
         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,21 +62,21 @@
         tenant_id = None  # No default tenant so will get unscoped token.
         email = ''
         user = self.client.create_user(user_name, user_password,
-                                       tenant_id, email)
+                                       tenant_id, email)['user']
         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)['tenant']
         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)['tenant']
         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)['role']
         self.data.roles.append(role)
 
         # Grant the user the role on the tenants.
diff --git a/tempest/api/identity/admin/v2/test_users.py b/tempest/api/identity/admin/v2/test_users.py
index bfbcfe7..6ee5218 100644
--- a/tempest/api/identity/admin/v2/test_users.py
+++ b/tempest/api/identity/admin/v2/test_users.py
@@ -36,7 +36,7 @@
         self.data.setup_test_tenant()
         user = self.client.create_user(self.alt_user, self.alt_password,
                                        self.data.tenant['id'],
-                                       self.alt_email)
+                                       self.alt_email)['user']
         self.data.users.append(user)
         self.assertEqual(self.alt_user, user['name'])
 
@@ -47,7 +47,7 @@
         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)
+                                       self.alt_email, enabled=False)['user']
         self.data.users.append(user)
         self.assertEqual(name, user['name'])
         self.assertEqual(False, user['enabled'])
@@ -60,7 +60,7 @@
         self.data.setup_test_tenant()
         user = self.client.create_user(test_user, self.alt_password,
                                        self.data.tenant['id'],
-                                       self.alt_email)
+                                       self.alt_email)['user']
         # Delete the User at the end of this method
         self.addCleanup(self.client.delete_user, user['id'])
         # Updating user details with new values
@@ -68,12 +68,12 @@
         u_email2 = u_name2 + '@testmail.tm'
         update_user = self.client.update_user(user['id'], name=u_name2,
                                               email=u_email2,
-                                              enabled=False)
+                                              enabled=False)['user']
         self.assertEqual(u_name2, update_user['name'])
         self.assertEqual(u_email2, update_user['email'])
         self.assertEqual(False, update_user['enabled'])
         # GET by id after updating
-        updated_user = self.client.get_user(user['id'])
+        updated_user = self.client.get_user(user['id'])['user']
         # Assert response body of GET after updating
         self.assertEqual(u_name2, updated_user['name'])
         self.assertEqual(u_email2, updated_user['email'])
@@ -86,7 +86,7 @@
         self.data.setup_test_tenant()
         user = self.client.create_user(test_user, self.alt_password,
                                        self.data.tenant['id'],
-                                       self.alt_email)
+                                       self.alt_email)['user']
         self.client.delete_user(user['id'])
 
     @test.idempotent_id('aca696c3-d645-4f45-b728-63646045beb1')
@@ -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()['users']
         self.assertThat([u['name'] for u in users],
                         matchers.Contains(self.data.test_user),
                         "Could not find %s" % self.data.test_user)
@@ -135,18 +135,19 @@
         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@123')['user']
         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@123')['user']
         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'])
+                ['users'])
         for i in body:
             fetched_user_ids.append(i['id'])
         # verifying the user Id in the list
@@ -169,19 +170,20 @@
         fetched_user_ids = list()
         user_ids.append(user['id'])
         role = self.client.assign_user_role(tenant['id'], user['id'],
-                                            role['id'])
+                                            role['id'])['role']
 
         alt_user2 = data_utils.rand_name('second_user')
         second_user = self.client.create_user(alt_user2, 'password1',
                                               self.data.tenant['id'],
-                                              'user2@123')
+                                              'user2@123')['user']
         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['id'])['role']
         # 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'])
+                ['users'])
         for i in body:
             fetched_user_ids.append(i['id'])
         # verifying the user Id in the list
@@ -198,7 +200,7 @@
         # Updating the user with new password
         new_pass = data_utils.rand_name('pass')
         update_user = self.client.update_user_password(
-            self.data.user['id'], new_pass)
+            self.data.user['id'], new_pass)['user']
         self.assertEqual(update_user['id'], self.data.user['id'])
 
         # Validate the updated password
diff --git a/tempest/api/identity/base.py b/tempest/api/identity/base.py
index ada292f..95826b0 100644
--- a/tempest/api/identity/base.py
+++ b/tempest/api/identity/base.py
@@ -39,7 +39,7 @@
 
     @classmethod
     def get_user_by_name(cls, name):
-        users = cls.client.get_users()
+        users = cls.client.get_users()['users']
         user = [u for u in users if u['name'] == name]
         if len(user) > 0:
             return user[0]
@@ -47,11 +47,7 @@
     @classmethod
     def get_tenant_by_name(cls, name):
         try:
-            tenants = cls.client.list_tenants()
-            # TODO(jswarren): always retrieve 'tenants' value
-            # once both clients return full response objects
-            if 'tenants' in tenants:
-                tenants = tenants['tenants']
+            tenants = cls.client.list_tenants()['tenants']
         except AttributeError:
             tenants = cls.client.list_projects()['projects']
         tenant = [t for t in tenants if t['name'] == name]
@@ -60,7 +56,7 @@
 
     @classmethod
     def get_role_by_name(cls, name):
-        roles = cls.client.list_roles()
+        roles = cls.client.list_roles()['roles']
         role = [r for r in roles if r['name'] == name]
         if len(role) > 0:
             return role[0]
@@ -214,7 +210,7 @@
             self.user = self.client.create_user(self.test_user,
                                                 self.test_password,
                                                 self.tenant['id'],
-                                                self.test_email)
+                                                self.test_email)['user']
             self.users.append(self.user)
 
         def setup_test_tenant(self):
@@ -223,13 +219,13 @@
             self.test_description = data_utils.rand_name('desc')
             self.tenant = self.client.create_tenant(
                 name=self.test_tenant,
-                description=self.test_description)
+                description=self.test_description)['tenant']
             self.tenants.append(self.tenant)
 
         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)['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 b1d65b4..01e5661 100644
--- a/tempest/api/identity/test_extension.py
+++ b/tempest/api/identity/test_extension.py
@@ -22,7 +22,7 @@
     @test.idempotent_id('85f3f661-f54c-4d48-b563-72ae952b9383')
     def test_list_extensions(self):
         # List all the extensions
-        body = self.non_admin_client.list_extensions()
+        body = self.non_admin_client.list_extensions()['extensions']['values']
         self.assertNotEmpty(body)
         keys = ['name', 'updated', 'alias', 'links',
                 'namespace', 'description']
diff --git a/tempest/api/identity/v2/test_api_discovery.py b/tempest/api/identity/v2/test_api_discovery.py
index 8132ee1..57c78ef 100644
--- a/tempest/api/identity/v2/test_api_discovery.py
+++ b/tempest/api/identity/v2/test_api_discovery.py
@@ -23,7 +23,7 @@
     @test.attr(type='smoke')
     @test.idempotent_id('ea889a68-a15f-4166-bfb1-c12456eae853')
     def test_api_version_resources(self):
-        descr = self.non_admin_client.get_api_description()
+        descr = self.non_admin_client.get_api_description()['version']
         expected_resources = ('id', 'links', 'media-types', 'status',
                               'updated')
 
@@ -34,7 +34,7 @@
     @test.attr(type='smoke')
     @test.idempotent_id('007a0be0-78fe-4fdb-bbee-e9216cc17bb2')
     def test_api_media_types(self):
-        descr = self.non_admin_client.get_api_description()
+        descr = self.non_admin_client.get_api_description()['version']
         # Get MIME type bases and descriptions
         media_types = [(media_type['base'], media_type['type']) for
                        media_type in descr['media-types']]
@@ -49,7 +49,7 @@
     @test.attr(type='smoke')
     @test.idempotent_id('77fd6be0-8801-48e6-b9bf-38cdd2f253ec')
     def test_api_version_statuses(self):
-        descr = self.non_admin_client.get_api_description()
+        descr = self.non_admin_client.get_api_description()['version']
         status = descr['status'].lower()
         supported_statuses = ['current', 'stable', 'experimental',
                               'supported', 'deprecated']
diff --git a/tempest/api/identity/v2/test_ec2_credentials.py b/tempest/api/identity/v2/test_ec2_credentials.py
index dbb50be..17963b8 100644
--- a/tempest/api/identity/v2/test_ec2_credentials.py
+++ b/tempest/api/identity/v2/test_ec2_credentials.py
@@ -38,7 +38,7 @@
         """Create user ec2 credentials."""
         resp = self.non_admin_client.create_user_ec2_credentials(
             self.creds.credentials.user_id,
-            self.creds.credentials.tenant_id)
+            self.creds.credentials.tenant_id)["credential"]
         access = resp['access']
         self.addCleanup(
             self.non_admin_client.delete_user_ec2_credentials,
@@ -55,11 +55,13 @@
         fetched_creds = []
         # create first ec2 credentials
         creds1 = self.non_admin_client.create_user_ec2_credentials(
-            self.creds.credentials.user_id, self.creds.credentials.tenant_id)
+            self.creds.credentials.user_id,
+            self.creds.credentials.tenant_id)["credential"]
         created_creds.append(creds1['access'])
         # create second ec2 credentials
         creds2 = self.non_admin_client.create_user_ec2_credentials(
-            self.creds.credentials.user_id, self.creds.credentials.tenant_id)
+            self.creds.credentials.user_id,
+            self.creds.credentials.tenant_id)["credential"]
         created_creds.append(creds2['access'])
         # add credentials to be cleaned up
         self.addCleanup(
@@ -70,7 +72,7 @@
             self.creds.credentials.user_id, creds2['access'])
         # get the list of user ec2 credentials
         resp = self.non_admin_client.list_user_ec2_credentials(
-            self.creds.credentials.user_id)
+            self.creds.credentials.user_id)["credentials"]
         fetched_creds = [cred['access'] for cred in resp]
         # created credentials should be in a fetched list
         missing = [cred for cred in created_creds
@@ -84,7 +86,7 @@
         """Get the definite user ec2 credentials."""
         resp = self.non_admin_client.create_user_ec2_credentials(
             self.creds.credentials.user_id,
-            self.creds.credentials.tenant_id)
+            self.creds.credentials.tenant_id)["credential"]
         self.addCleanup(
             self.non_admin_client.delete_user_ec2_credentials,
             self.creds.credentials.user_id, resp['access'])
@@ -100,7 +102,7 @@
         """Delete user ec2 credentials."""
         resp = self.non_admin_client.create_user_ec2_credentials(
             self.creds.credentials.user_id,
-            self.creds.credentials.tenant_id)
+            self.creds.credentials.tenant_id)["credential"]
         access = resp['access']
         self.non_admin_client.delete_user_ec2_credentials(
             self.creds.credentials.user_id, access)
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 5566f63..2dbcd98 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -278,7 +278,7 @@
     existing = [x['name'] for x in body]
     for tenant in tenants:
         if tenant not in existing:
-            admin.identity.create_tenant(tenant)
+            admin.identity.create_tenant(tenant)['tenant']
         else:
             LOG.warn("Tenant '%s' already exists in this environment" % tenant)
 
@@ -423,7 +423,7 @@
         LOG.info("checking users")
         for name, user in six.iteritems(self.users):
             client = keystone_admin()
-            found = client.identity.get_user(user['id'])
+            found = client.identity.get_user(user['id'])['user']
             self.assertEqual(found['name'], user['name'])
             self.assertEqual(found['tenantId'], user['tenant_id'])
 
diff --git a/tempest/common/cred_client.py b/tempest/common/cred_client.py
index 7c3a77f..4d391d0 100644
--- a/tempest/common/cred_client.py
+++ b/tempest/common/cred_client.py
@@ -81,7 +81,7 @@
         self.identity_client.delete_user(user_id)
 
     def _list_roles(self):
-        roles = self.identity_client.list_roles()
+        roles = self.identity_client.list_roles()['roles']
         return roles
 
 
@@ -89,7 +89,7 @@
 
     def create_project(self, name, description):
         tenant = self.identity_client.create_tenant(
-            name=name, description=description)
+            name=name, description=description)['tenant']
         return tenant
 
     def get_credentials(self, user, project, password):
diff --git a/tempest/services/botoclients.py b/tempest/services/botoclients.py
index ede464f..bedb9ec 100644
--- a/tempest/services/botoclients.py
+++ b/tempest/services/botoclients.py
@@ -94,14 +94,15 @@
         :return: EC2 credentials
         """
         ec2_cred_list = identity_client.list_user_ec2_credentials(
-            identity_client.user_id)
+            identity_client.user_id)['credentials']
         for cred in ec2_cred_list:
             if cred['tenant_id'] == identity_client.tenant_id:
                 ec2_cred = cred
                 break
         else:
-            ec2_cred = identity_client.create_user_ec2_credentials(
+            ec2_cred = (identity_client.create_user_ec2_credentials(
                 identity_client.user_id, identity_client.tenant_id)
+                ['credential'])
         if not all((ec2_cred, ec2_cred['access'], ec2_cred['secret'])):
             raise lib_exc.NotFound("Unable to get access and secret keys")
         else:
diff --git a/tempest/services/identity/v2/json/identity_client.py b/tempest/services/identity/v2/json/identity_client.py
index 81e967d..cf4c546 100644
--- a/tempest/services/identity/v2/json/identity_client.py
+++ b/tempest/services/identity/v2/json/identity_client.py
@@ -24,7 +24,8 @@
         url = ''
         resp, body = self.get(url)
         self.expected_success([200, 203], resp.status)
-        return service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def has_admin_extensions(self):
         """
@@ -49,7 +50,8 @@
         post_body = json.dumps({'role': post_body})
         resp, body = self.post('OS-KSADM/roles', post_body)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def get_role(self, role_id):
         """Get a role by its id."""
@@ -73,7 +75,8 @@
         post_body = json.dumps({'tenant': post_body})
         resp, body = self.post('tenants', post_body)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def delete_role(self, role_id):
         """Delete a role."""
@@ -86,14 +89,16 @@
         url = '/tenants/%s/users/%s/roles' % (tenant_id, user_id)
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBodyList(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(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 service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def remove_user_role(self, tenant_id, user_id, role_id):
         """Removes a role assignment for a user on a tenant."""
@@ -112,13 +117,15 @@
         """Get tenant details."""
         resp, body = self.get('tenants/%s' % str(tenant_id))
         self.expected_success(200, resp.status)
-        return service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def list_roles(self):
         """Returns roles."""
         resp, body = self.get('OS-KSADM/roles')
         self.expected_success(200, resp.status)
-        return service_client.ResponseBodyList(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def list_tenants(self):
         """Returns tenants."""
@@ -136,7 +143,7 @@
 
     def update_tenant(self, tenant_id, **kwargs):
         """Updates a tenant."""
-        body = self.get_tenant(tenant_id)
+        body = self.get_tenant(tenant_id)['tenant']
         name = kwargs.get('name', body['name'])
         desc = kwargs.get('description', body['description'])
         en = kwargs.get('enabled', body['enabled'])
@@ -149,7 +156,8 @@
         post_body = json.dumps({'tenant': post_body})
         resp, body = self.post('tenants/%s' % tenant_id, post_body)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def create_user(self, name, password, tenant_id, email, **kwargs):
         """Create a user."""
@@ -165,20 +173,23 @@
         post_body = json.dumps({'user': post_body})
         resp, body = self.post('users', post_body)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(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 service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(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 service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def delete_user(self, user_id):
         """Delete a user."""
@@ -190,7 +201,8 @@
         """Get the list of users."""
         resp, body = self.get("users")
         self.expected_success(200, resp.status)
-        return service_client.ResponseBodyList(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def enable_disable_user(self, user_id, enabled):
         """Enables or disables a user."""
@@ -200,13 +212,15 @@
         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 service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(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 service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def delete_token(self, token_id):
         """Delete a token."""
@@ -218,10 +232,11 @@
         """List users for a Tenant."""
         resp, body = self.get('/tenants/%s/users' % tenant_id)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBodyList(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(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)['users']
         for user in users:
             if user['name'] == username:
                 return user
@@ -237,20 +252,23 @@
         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 service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(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 service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def list_services(self):
         """List Service - Returns Services."""
         resp, body = self.get('/OS-KSADM/services')
         self.expected_success(200, resp.status)
-        return service_client.ResponseBodyList(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def delete_service(self, service_id):
         """Delete Service."""
@@ -271,13 +289,15 @@
         post_body = json.dumps({'endpoint': post_body})
         resp, body = self.post('/endpoints', post_body)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def list_endpoints(self):
         """List Endpoints - Returns Endpoints."""
         resp, body = self.get('/endpoints')
         self.expected_success(200, resp.status)
-        return service_client.ResponseBodyList(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def delete_endpoint(self, endpoint_id):
         """Delete an endpoint."""
@@ -295,7 +315,8 @@
         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 service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def update_user_own_password(self, user_id, new_pass, old_pass):
         """User updates own password"""
@@ -313,15 +334,15 @@
         resp, body = self.get('/extensions')
         self.expected_success(200, resp.status)
         body = json.loads(body)
-        return service_client.ResponseBodyList(resp,
-                                               body['extensions']['values'])
+        return service_client.ResponseBody(resp, body)
 
     def create_user_ec2_credentials(self, user_id, tenant_id):
         post_body = json.dumps({'tenant_id': tenant_id})
         resp, body = self.post('/users/%s/credentials/OS-EC2' % user_id,
                                post_body)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBody(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def delete_user_ec2_credentials(self, user_id, access):
         resp, body = self.delete('/users/%s/credentials/OS-EC2/%s' %
@@ -332,7 +353,8 @@
     def list_user_ec2_credentials(self, user_id):
         resp, body = self.get('/users/%s/credentials/OS-EC2' % user_id)
         self.expected_success(200, resp.status)
-        return service_client.ResponseBodyList(resp, self._parse_resp(body))
+        body = json.loads(body)
+        return service_client.ResponseBody(resp, body)
 
     def show_user_ec2_credentials(self, user_id, access):
         resp, body = self.get('/users/%s/credentials/OS-EC2/%s' %
diff --git a/tempest/stress/cleanup.py b/tempest/stress/cleanup.py
index 9456590..1350d95 100644
--- a/tempest/stress/cleanup.py
+++ b/tempest/stress/cleanup.py
@@ -68,7 +68,7 @@
         except Exception:
             pass
 
-    users = admin_manager.identity_client.get_users()
+    users = admin_manager.identity_client.get_users()['users']
     LOG.info("Cleanup::remove %s users" % len(users))
     for user in users:
         if user['name'].startswith("stress_user"):
diff --git a/tempest/tests/services/compute/test_flavors_client.py b/tempest/tests/services/compute/test_flavors_client.py
new file mode 100644
index 0000000..6c0edb8
--- /dev/null
+++ b/tempest/tests/services/compute/test_flavors_client.py
@@ -0,0 +1,255 @@
+# Copyright 2015 IBM Corp.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import copy
+import httplib2
+
+from oslo_serialization import jsonutils as json
+from oslotest import mockpatch
+
+from tempest.services.compute.json import flavors_client
+from tempest.tests import fake_auth_provider
+from tempest.tests.services.compute import base
+
+
+class TestFlavorsClient(base.BaseComputeServiceTest):
+
+    FAKE_FLAVOR = {
+        "disk": 1,
+        "id": "1",
+        "links": [{
+            "href": "http://openstack.example.com/v2/openstack/flavors/1",
+            "rel": "self"}, {
+            "href": "http://openstack.example.com/openstack/flavors/1",
+            "rel": "bookmark"}],
+        "name": "m1.tiny",
+        "ram": 512,
+        "swap": 1,
+        "vcpus": 1
+    }
+
+    EXTRA_SPECS = {"extra_specs": {
+        "key1": "value1",
+        "key2": "value2"}
+    }
+
+    FAKE_FLAVOR_ACCESS = {
+        "flavor_id": "10",
+        "tenant_id": "1a951d988e264818afe520e78697dcbf"
+    }
+
+    def setUp(self):
+        super(TestFlavorsClient, self).setUp()
+        fake_auth = fake_auth_provider.FakeAuthProvider()
+        self.client = flavors_client.FlavorsClient(fake_auth,
+                                                   'compute', 'regionOne')
+
+    def _test_list_flavors(self, bytes_body=False):
+        flavor = copy.deepcopy(TestFlavorsClient.FAKE_FLAVOR)
+        # Remove extra attributes
+        for attribute in ('disk', 'vcpus', 'ram', 'swap'):
+            del flavor[attribute]
+        expected = {'flavors': [flavor]}
+        self.check_service_client_function(
+            self.client.list_flavors,
+            'tempest.common.service_client.ServiceClient.get',
+            expected,
+            bytes_body)
+
+    def test_list_flavors_str_body(self):
+        self._test_list_flavors(bytes_body=False)
+
+    def test_list_flavors_byte_body(self):
+        self._test_list_flavors(bytes_body=True)
+
+    def _test_show_flavor(self, bytes_body=False):
+        expected = {"flavor": TestFlavorsClient.FAKE_FLAVOR}
+        self.check_service_client_function(
+            self.client.show_flavor,
+            'tempest.common.service_client.ServiceClient.get',
+            expected,
+            bytes_body,
+            flavor_id='fake-id')
+
+    def test_show_flavor_str_body(self):
+        self._test_show_flavor(bytes_body=False)
+
+    def test_show_flavor_byte_body(self):
+        self._test_show_flavor(bytes_body=True)
+
+    def _test_create_flavor(self, bytes_body=False):
+        expected = {"flavor": TestFlavorsClient.FAKE_FLAVOR}
+        request = copy.deepcopy(TestFlavorsClient.FAKE_FLAVOR)
+        # The 'links' parameter should not be passed in
+        del request['links']
+        self.check_service_client_function(
+            self.client.create_flavor,
+            'tempest.common.service_client.ServiceClient.post',
+            expected,
+            bytes_body,
+            **request)
+
+    def test_create_flavor_str_body(self):
+        self._test_create_flavor(bytes_body=False)
+
+    def test_create_flavor__byte_body(self):
+        self._test_create_flavor(bytes_body=True)
+
+    def test_delete_flavor(self):
+        self.check_service_client_function(
+            self.client.delete_flavor,
+            'tempest.common.service_client.ServiceClient.delete',
+            {}, status=202, flavor_id='c782b7a9-33cd-45f0-b795-7f87f456408b')
+
+    def _test_is_resource_deleted(self, flavor_id, is_deleted=True,
+                                  bytes_body=False):
+        body = json.dumps({'flavors': [TestFlavorsClient.FAKE_FLAVOR]})
+        if bytes_body:
+            body = body.encode('utf-8')
+        response = (httplib2.Response({'status': 200}), body)
+        self.useFixture(mockpatch.Patch(
+            'tempest.common.service_client.ServiceClient.get',
+            return_value=response))
+        self.assertEqual(is_deleted,
+                         self.client.is_resource_deleted(flavor_id))
+
+    def test_is_resource_deleted_true_str_body(self):
+        self._test_is_resource_deleted('2', bytes_body=False)
+
+    def test_is_resource_deleted_true_byte_body(self):
+        self._test_is_resource_deleted('2', bytes_body=True)
+
+    def test_is_resource_deleted_false_str_body(self):
+        self._test_is_resource_deleted('1', is_deleted=False, bytes_body=False)
+
+    def test_is_resource_deleted_false_byte_body(self):
+        self._test_is_resource_deleted('1', is_deleted=False, bytes_body=True)
+
+    def _test_set_flavor_extra_spec(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.set_flavor_extra_spec,
+            'tempest.common.service_client.ServiceClient.post',
+            TestFlavorsClient.EXTRA_SPECS,
+            bytes_body,
+            flavor_id='8c7aae5a-d315-4216-875b-ed9b6a5bcfc6',
+            **TestFlavorsClient.EXTRA_SPECS)
+
+    def test_set_flavor_extra_spec_str_body(self):
+        self._test_set_flavor_extra_spec(bytes_body=False)
+
+    def test_set_flavor_extra_spec_byte_body(self):
+        self._test_set_flavor_extra_spec(bytes_body=True)
+
+    def _test_list_flavor_extra_specs(self, bytes_body=False):
+        self.check_service_client_function(
+            self.client.list_flavor_extra_specs,
+            'tempest.common.service_client.ServiceClient.get',
+            TestFlavorsClient.EXTRA_SPECS,
+            bytes_body,
+            flavor_id='8c7aae5a-d315-4216-875b-ed9b6a5bcfc6')
+
+    def test_list_flavor_extra_specs_str_body(self):
+        self._test_list_flavor_extra_specs(bytes_body=False)
+
+    def test_list_flavor_extra_specs__byte_body(self):
+        self._test_list_flavor_extra_specs(bytes_body=True)
+
+    def _test_show_flavor_extra_spec(self, bytes_body=False):
+        expected = {"key": "value"}
+        self.check_service_client_function(
+            self.client.show_flavor_extra_spec,
+            'tempest.common.service_client.ServiceClient.get',
+            expected,
+            bytes_body,
+            flavor_id='8c7aae5a-d315-4216-875b-ed9b6a5bcfc6',
+            key='key')
+
+    def test_show_flavor_extra_spec_str_body(self):
+        self._test_show_flavor_extra_spec(bytes_body=False)
+
+    def test_show_flavor_extra_spec__byte_body(self):
+        self._test_show_flavor_extra_spec(bytes_body=True)
+
+    def _test_update_flavor_extra_spec(self, bytes_body=False):
+        expected = {"key1": "value"}
+        self.check_service_client_function(
+            self.client.update_flavor_extra_spec,
+            'tempest.common.service_client.ServiceClient.put',
+            expected,
+            bytes_body,
+            flavor_id='8c7aae5a-d315-4216-875b-ed9b6a5bcfc6',
+            key='key1', **expected)
+
+    def test_update_flavor_extra_spec_str_body(self):
+        self._test_update_flavor_extra_spec(bytes_body=False)
+
+    def test_update_flavor_extra_spec_byte_body(self):
+        self._test_update_flavor_extra_spec(bytes_body=True)
+
+    def test_unset_flavor_extra_spec(self):
+        self.check_service_client_function(
+            self.client.unset_flavor_extra_spec,
+            'tempest.common.service_client.ServiceClient.delete', {},
+            flavor_id='c782b7a9-33cd-45f0-b795-7f87f456408b', key='key')
+
+    def _test_list_flavor_access(self, bytes_body=False):
+        expected = {'flavor_access': [TestFlavorsClient.FAKE_FLAVOR_ACCESS]}
+        self.check_service_client_function(
+            self.client.list_flavor_access,
+            'tempest.common.service_client.ServiceClient.get',
+            expected,
+            bytes_body,
+            flavor_id='8c7aae5a-d315-4216-875b-ed9b6a5bcfc6')
+
+    def test_list_flavor_access_str_body(self):
+        self._test_list_flavor_access(bytes_body=False)
+
+    def test_list_flavor_access_byte_body(self):
+        self._test_list_flavor_access(bytes_body=True)
+
+    def _test_add_flavor_access(self, bytes_body=False):
+        expected = {
+            "flavor_access": [TestFlavorsClient.FAKE_FLAVOR_ACCESS]
+        }
+        self.check_service_client_function(
+            self.client.add_flavor_access,
+            'tempest.common.service_client.ServiceClient.post',
+            expected,
+            bytes_body,
+            flavor_id='8c7aae5a-d315-4216-875b-ed9b6a5bcfc6',
+            tenant_id='1a951d988e264818afe520e78697dcbf')
+
+    def test_add_flavor_access_str_body(self):
+        self._test_add_flavor_access(bytes_body=False)
+
+    def test_add_flavor_access_byte_body(self):
+        self._test_add_flavor_access(bytes_body=True)
+
+    def _test_remove_flavor_access(self, bytes_body=False):
+        expected = {
+            "flavor_access": [TestFlavorsClient.FAKE_FLAVOR_ACCESS]
+        }
+        self.check_service_client_function(
+            self.client.remove_flavor_access,
+            'tempest.common.service_client.ServiceClient.post',
+            expected,
+            bytes_body,
+            flavor_id='10',
+            tenant_id='a6edd4d66ad04245b5d2d8716ecc91e3')
+
+    def test_remove_flavor_access_str_body(self):
+        self._test_remove_flavor_access(bytes_body=False)
+
+    def test_remove_flavor_access_byte_body(self):
+        self._test_remove_flavor_access(bytes_body=True)
diff --git a/tempest/tests/test_tenant_isolation.py b/tempest/tests/test_tenant_isolation.py
index 7bdc1d7..cc4de2d 100644
--- a/tempest/tests/test_tenant_isolation.py
+++ b/tempest/tests/test_tenant_isolation.py
@@ -55,7 +55,7 @@
             json_iden_client.IdentityClient,
             'create_user',
             return_value=(service_client.ResponseBody
-                          (200, {'id': id, 'name': name}))))
+                          (200, {'user': {'id': id, 'name': name}}))))
         return user_fix
 
     def _mock_tenant_create(self, id, name):
@@ -63,28 +63,29 @@
             json_iden_client.IdentityClient,
             'create_tenant',
             return_value=(service_client.ResponseBody
-                          (200, {'id': id, 'name': name}))))
+                          (200, {'tenant': {'id': id, 'name': name}}))))
         return tenant_fix
 
     def _mock_list_roles(self, id, name):
         roles_fix = self.useFixture(mockpatch.PatchObject(
             json_iden_client.IdentityClient,
             'list_roles',
-            return_value=(service_client.ResponseBodyList
+            return_value=(service_client.ResponseBody
                           (200,
-                           [{'id': id, 'name': name},
-                            {'id': '1', 'name': 'FakeRole'}]))))
+                           {'roles': [{'id': id, 'name': name},
+                            {'id': '1', 'name': 'FakeRole'},
+                            {'id': '2', 'name': 'Member'}]}))))
         return roles_fix
 
     def _mock_list_2_roles(self):
         roles_fix = self.useFixture(mockpatch.PatchObject(
             json_iden_client.IdentityClient,
             'list_roles',
-            return_value=(service_client.ResponseBodyList
+            return_value=(service_client.ResponseBody
                           (200,
-                           [{'id': '1234', 'name': 'role1'},
+                           {'roles': [{'id': '1234', 'name': 'role1'},
                             {'id': '1', 'name': 'FakeRole'},
-                            {'id': '12345', 'name': 'role2'}]))))
+                            {'id': '12345', 'name': 'role2'}]}))))
         return roles_fix
 
     def _mock_assign_user_role(self):
@@ -99,20 +100,22 @@
         roles_fix = self.useFixture(mockpatch.PatchObject(
             json_iden_client.IdentityClient,
             'list_roles',
-            return_value=(service_client.ResponseBodyList
-                          (200, [{'id': '1', 'name': 'FakeRole'}]))))
+            return_value=(service_client.ResponseBody
+                          (200, {'roles': [{'id': '1',
+                                 'name': 'FakeRole'}]}))))
         return roles_fix
 
     def _mock_list_ec2_credentials(self, user_id, tenant_id):
         ec2_creds_fix = self.useFixture(mockpatch.PatchObject(
             json_iden_client.IdentityClient,
             'list_user_ec2_credentials',
-            return_value=(service_client.ResponseBodyList
-                          (200, [{'access': 'fake_access',
-                                  'secret': 'fake_secret',
-                                  'tenant_id': tenant_id,
-                                  'user_id': user_id,
-                                  'trust_id': None}]))))
+            return_value=(service_client.ResponseBody
+                          (200, {'credentials': [{
+                                 'access': 'fake_access',
+                                 'secret': 'fake_secret',
+                                 'tenant_id': tenant_id,
+                                 'user_id': user_id,
+                                 'trust_id': None}]}))))
         return ec2_creds_fix
 
     def _mock_network_create(self, iso_creds, id, name):
