diff --git a/tempest/api/compute/admin/test_migrations.py b/tempest/api/compute/admin/test_migrations.py
index c51ad61..aaf7a78 100644
--- a/tempest/api/compute/admin/test_migrations.py
+++ b/tempest/api/compute/admin/test_migrations.py
@@ -41,8 +41,7 @@
         server = self.create_test_server(wait_until="ACTIVE")
         server_id = server['id']
 
-        resp, _ = self.servers_client.resize(server_id, self.flavor_ref_alt)
-        self.assertEqual(202, resp.status)
+        self.servers_client.resize(server_id, self.flavor_ref_alt)
         self.servers_client.wait_for_server_status(server_id, 'VERIFY_RESIZE')
         self.servers_client.confirm_resize(server_id)
         self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index 6110b89..84c38c1 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -47,19 +47,18 @@
     @test.attr(type='gate')
     def test_list_servers_by_admin(self):
         # Listing servers by admin user returns empty list by default
-        resp, body = self.client.list_servers_with_detail()
+        body = self.client.list_servers_with_detail()
         servers = body['servers']
-        self.assertEqual('200', resp['status'])
         self.assertEqual([], servers)
 
     @test.attr(type='gate')
     def test_list_servers_filter_by_error_status(self):
         # Filter the list of servers by server error status
         params = {'status': 'error'}
-        resp, server = self.client.reset_state(self.s1_id, state='error')
-        resp, body = self.non_admin_client.list_servers(params)
+        self.client.reset_state(self.s1_id, state='error')
+        body = self.non_admin_client.list_servers(params)
         # Reset server's state to 'active'
-        resp, server = self.client.reset_state(self.s1_id, state='active')
+        self.client.reset_state(self.s1_id, state='active')
         # Verify server's state
         server = self.client.get_server(self.s1_id)
         self.assertEqual(server['status'], 'ACTIVE')
@@ -73,7 +72,7 @@
         # Listing servers by admin user with all tenants parameter
         # Here should be listed all servers
         params = {'all_tenants': ''}
-        resp, body = self.client.list_servers_with_detail(params)
+        body = self.client.list_servers_with_detail(params)
         servers = body['servers']
         servers_name = map(lambda x: x['name'], servers)
 
@@ -87,14 +86,14 @@
         # List the primary tenant but get nothing due to odd specified behavior
         tenant_id = self.non_admin_client.tenant_id
         params = {'tenant_id': tenant_id}
-        resp, body = self.client.list_servers_with_detail(params)
+        body = self.client.list_servers_with_detail(params)
         servers = body['servers']
         self.assertEqual([], servers)
 
         # List the admin tenant which has no servers
         admin_tenant_id = self.client.tenant_id
         params = {'all_tenants': '', 'tenant_id': admin_tenant_id}
-        resp, body = self.client.list_servers_with_detail(params)
+        body = self.client.list_servers_with_detail(params)
         servers = body['servers']
         self.assertEqual([], servers)
 
@@ -111,13 +110,10 @@
         self.assertEqual(server['status'], 'ACTIVE')
         hostname = server[self._host_key]
         params = {'host': hostname}
-        resp, body = self.client.list_servers(params)
-        self.assertEqual('200', resp['status'])
+        body = self.client.list_servers(params)
         servers = body['servers']
         nonexistent_params = {'host': 'nonexistent_host'}
-        resp, nonexistent_body = self.client.list_servers(
-            nonexistent_params)
-        self.assertEqual('200', resp['status'])
+        nonexistent_body = self.client.list_servers(nonexistent_params)
         nonexistent_servers = nonexistent_body['servers']
         self.assertIn(test_server['id'], map(lambda x: x['id'], servers))
         self.assertNotIn(test_server['id'],
@@ -126,16 +122,14 @@
     @test.attr(type='gate')
     def test_reset_state_server(self):
         # Reset server's state to 'error'
-        resp, server = self.client.reset_state(self.s1_id)
-        self.assertEqual(202, resp.status)
+        self.client.reset_state(self.s1_id)
 
         # Verify server's state
         server = self.client.get_server(self.s1_id)
         self.assertEqual(server['status'], 'ERROR')
 
         # Reset server's state to 'active'
-        resp, server = self.client.reset_state(self.s1_id, state='active')
-        self.assertEqual(202, resp.status)
+        self.client.reset_state(self.s1_id, state='active')
 
         # Verify server's state
         server = self.client.get_server(self.s1_id)
@@ -145,8 +139,7 @@
     @decorators.skip_because(bug="1240043")
     def test_get_server_diagnostics_by_admin(self):
         # Retrieve server diagnostics by admin user
-        resp, diagnostic = self.client.get_server_diagnostics(self.s1_id)
-        self.assertEqual(200, resp.status)
+        diagnostic = self.client.get_server_diagnostics(self.s1_id)
         basic_attrs = ['rx_packets', 'rx_errors', 'rx_drop',
                        'tx_packets', 'tx_errors', 'tx_drop',
                        'read_req', 'write_req', 'cpu', 'memory']
@@ -159,9 +152,8 @@
         # image and changed to ACTIVE state
 
         # resetting vm state require admin privilege
-        resp, server = self.client.reset_state(self.s1_id, state='error')
-        self.assertEqual(202, resp.status)
-        resp, rebuilt_server = self.non_admin_client.rebuild(
+        self.client.reset_state(self.s1_id, state='error')
+        rebuilt_server = self.non_admin_client.rebuild(
             self.s1_id, self.image_ref_alt)
         self.addCleanup(self.non_admin_client.wait_for_server_status,
                         self.s1_id, 'ACTIVE')
@@ -185,11 +177,9 @@
     def test_reset_network_inject_network_info(self):
         # Reset Network of a Server
         server = self.create_test_server(wait_until='ACTIVE')
-        resp, server_body = self.client.reset_network(server['id'])
-        self.assertEqual(202, resp.status)
+        self.client.reset_network(server['id'])
         # Inject the Network Info into Server
-        resp, server_body = self.client.inject_network_info(server['id'])
-        self.assertEqual(202, resp.status)
+        self.client.inject_network_info(server['id'])
 
     @test.attr(type='gate')
     def test_create_server_with_scheduling_hint(self):
diff --git a/tempest/api/compute/admin/test_servers_negative.py b/tempest/api/compute/admin/test_servers_negative.py
index 7fd87f6..bbe289d 100644
--- a/tempest/api/compute/admin/test_servers_negative.py
+++ b/tempest/api/compute/admin/test_servers_negative.py
@@ -138,8 +138,7 @@
         server = self.create_test_server(wait_until='ACTIVE')
         server_id = server['id']
         # suspend the server.
-        resp, _ = self.client.suspend_server(server_id)
-        self.assertEqual(202, resp.status)
+        self.client.suspend_server(server_id)
         self.client.wait_for_server_status(server_id, 'SUSPENDED')
         # migrate an suspended server should fail
         self.assertRaises(lib_exc.Conflict,
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index c448975..89818b1 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -218,7 +218,7 @@
         servers = [body]
         if 'min_count' in kwargs or 'max_count' in kwargs:
             # Get servers created which name match with name param.
-            r, b = cls.servers_client.list_servers()
+            b = cls.servers_client.list_servers()
             servers = [s for s in b['servers'] if s['name'].startswith(name)]
 
         if 'wait_until' in kwargs:
@@ -260,9 +260,9 @@
             name = data_utils.rand_name(cls.__name__ + "-Server-Group")
         if policy is None:
             policy = ['affinity']
-        resp, body = cls.servers_client.create_server_group(name, policy)
+        body = cls.servers_client.create_server_group(name, policy)
         cls.server_groups.append(body['id'])
-        return resp, body
+        return body
 
     def wait_for(self, condition):
         """Repeatedly calls condition() until a timeout."""
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index 1e2b6e7..743a4e7 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -97,8 +97,7 @@
         server = self.create_test_server(name=server_name)
         server_id = server['id']
         self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
-        resp, body = self.servers_client.add_security_group(server_id,
-                                                            sg['name'])
+        self.servers_client.add_security_group(server_id, sg['name'])
 
         # Check that we are not able to delete the security
         # group since it is in use by an active server
@@ -107,10 +106,9 @@
                           sg['id'])
 
         # Reboot and add the other security group
-        resp, body = self.servers_client.reboot(server_id, 'HARD')
+        self.servers_client.reboot(server_id, 'HARD')
         self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
-        resp, body = self.servers_client.add_security_group(server_id,
-                                                            sg2['name'])
+        self.servers_client.add_security_group(server_id, sg2['name'])
 
         # Check that we are not able to delete the other security
         # group since it is in use by an active server
diff --git a/tempest/api/compute/servers/test_create_server.py b/tempest/api/compute/servers/test_create_server.py
index 73e7d15..6711fa9 100644
--- a/tempest/api/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -70,7 +70,7 @@
     @test.attr(type='smoke')
     def test_list_servers(self):
         # The created server should be in the list of all servers
-        resp, body = self.client.list_servers()
+        body = self.client.list_servers()
         servers = body['servers']
         found = any([i for i in servers if i['id'] == self.server['id']])
         self.assertTrue(found)
@@ -78,7 +78,7 @@
     @test.attr(type='smoke')
     def test_list_servers_with_detail(self):
         # The created server should be in the detailed list of all servers
-        resp, body = self.client.list_servers_with_detail()
+        body = self.client.list_servers_with_detail()
         servers = body['servers']
         found = any([i for i in servers if i['id'] == self.server['id']])
         self.assertTrue(found)
@@ -108,9 +108,8 @@
         # Create a server with the scheduler hint "group".
         name = data_utils.rand_name('server_group')
         policies = ['affinity']
-        resp, body = self.client.create_server_group(name=name,
-                                                     policies=policies)
-        self.assertEqual(200, resp.status)
+        body = self.client.create_server_group(name=name,
+                                               policies=policies)
         group_id = body['id']
         self.addCleanup(self.client.delete_server_group, group_id)
 
@@ -119,8 +118,7 @@
                                          wait_until='ACTIVE')
 
         # Check a server is in the group
-        resp, server_group = self.client.get_server_group(group_id)
-        self.assertEqual(200, resp.status)
+        server_group = self.client.get_server_group(group_id)
         self.assertIn(server['id'], server_group['members'])
 
     @testtools.skipUnless(CONF.service_available.neutron,
@@ -170,7 +168,7 @@
 
         self.addCleanup(cleanup_server)
 
-        _, addresses = self.client.list_addresses(server_multi_nics['id'])
+        addresses = self.client.list_addresses(server_multi_nics['id'])
 
         # We can't predict the ip addresses assigned to the server on networks.
         # Sometimes the assigned addresses are ['19.80.0.2', '19.86.0.2'], at
diff --git a/tempest/api/compute/servers/test_delete_server.py b/tempest/api/compute/servers/test_delete_server.py
index aec2f6f..ba20229 100644
--- a/tempest/api/compute/servers/test_delete_server.py
+++ b/tempest/api/compute/servers/test_delete_server.py
@@ -50,7 +50,7 @@
     def test_delete_server_while_in_shutoff_state(self):
         # Delete a server while it's VM state is Shutoff
         server = self.create_test_server(wait_until='ACTIVE')
-        resp, body = self.client.stop(server['id'])
+        self.client.stop(server['id'])
         self.client.wait_for_server_status(server['id'], 'SHUTOFF')
         self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
@@ -61,7 +61,7 @@
     def test_delete_server_while_in_pause_state(self):
         # Delete a server while it's VM state is Pause
         server = self.create_test_server(wait_until='ACTIVE')
-        resp, body = self.client.pause_server(server['id'])
+        self.client.pause_server(server['id'])
         self.client.wait_for_server_status(server['id'], 'PAUSED')
         self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
@@ -83,8 +83,7 @@
     def test_delete_server_while_in_shelved_state(self):
         # Delete a server while it's VM state is Shelved
         server = self.create_test_server(wait_until='ACTIVE')
-        resp, body = self.client.shelve_server(server['id'])
-        self.assertEqual(202, resp.status)
+        self.client.shelve_server(server['id'])
 
         offload_time = CONF.compute.shelved_offload_time
         if offload_time >= 0:
@@ -103,8 +102,7 @@
     def test_delete_server_while_in_verify_resize_state(self):
         # Delete a server while it's VM state is VERIFY_RESIZE
         server = self.create_test_server(wait_until='ACTIVE')
-        resp, body = self.client.resize(server['id'], self.flavor_ref_alt)
-        self.assertEqual(202, resp.status)
+        self.client.resize(server['id'], self.flavor_ref_alt)
         self.client.wait_for_server_status(server['id'], 'VERIFY_RESIZE')
         self.client.delete_server(server['id'])
         self.client.wait_for_server_termination(server['id'])
@@ -144,8 +142,7 @@
     def test_delete_server_while_in_error_state(self):
         # Delete a server while it's VM state is error
         server = self.create_test_server(wait_until='ACTIVE')
-        resp, body = self.admin_client.reset_state(server['id'], state='error')
-        self.assertEqual(202, resp.status)
+        self.admin_client.reset_state(server['id'], state='error')
         # Verify server's state
         server = self.non_admin_client.get_server(server['id'])
         self.assertEqual(server['status'], 'ERROR')
diff --git a/tempest/api/compute/servers/test_disk_config.py b/tempest/api/compute/servers/test_disk_config.py
index f7a5bfb..76e6128 100644
--- a/tempest/api/compute/servers/test_disk_config.py
+++ b/tempest/api/compute/servers/test_disk_config.py
@@ -48,9 +48,9 @@
         # A server should be rebuilt using the manual disk config option
         self._update_server_with_disk_config(disk_config='AUTO')
 
-        resp, server = self.client.rebuild(self.server_id,
-                                           self.image_ref_alt,
-                                           disk_config='MANUAL')
+        server = self.client.rebuild(self.server_id,
+                                     self.image_ref_alt,
+                                     disk_config='MANUAL')
 
         # Wait for the server to become active
         self.client.wait_for_server_status(server['id'], 'ACTIVE')
@@ -64,9 +64,9 @@
         # A server should be rebuilt using the auto disk config option
         self._update_server_with_disk_config(disk_config='MANUAL')
 
-        resp, server = self.client.rebuild(self.server_id,
-                                           self.image_ref_alt,
-                                           disk_config='AUTO')
+        server = self.client.rebuild(self.server_id,
+                                     self.image_ref_alt,
+                                     disk_config='AUTO')
 
         # Wait for the server to become active
         self.client.wait_for_server_status(server['id'], 'ACTIVE')
diff --git a/tempest/api/compute/servers/test_instance_actions.py b/tempest/api/compute/servers/test_instance_actions.py
index 103c241..e02c41b 100644
--- a/tempest/api/compute/servers/test_instance_actions.py
+++ b/tempest/api/compute/servers/test_instance_actions.py
@@ -30,11 +30,10 @@
     @test.attr(type='gate')
     def test_list_instance_actions(self):
         # List actions of the provided server
-        resp, body = self.client.reboot(self.server_id, 'HARD')
+        self.client.reboot(self.server_id, 'HARD')
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
-        resp, body = self.client.list_instance_actions(self.server_id)
-        self.assertEqual(200, resp.status)
+        body = self.client.list_instance_actions(self.server_id)
         self.assertTrue(len(body) == 2, str(body))
         self.assertTrue(any([i for i in body if i['action'] == 'create']))
         self.assertTrue(any([i for i in body if i['action'] == 'reboot']))
@@ -42,8 +41,7 @@
     @test.attr(type='gate')
     def test_get_instance_action(self):
         # Get the action details of the provided server
-        resp, body = self.client.get_instance_action(self.server_id,
-                                                     self.request_id)
-        self.assertEqual(200, resp.status)
+        body = self.client.get_instance_action(self.server_id,
+                                               self.request_id)
         self.assertEqual(self.server_id, body['instance_uuid'])
         self.assertEqual('create', body['action'])
diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py
index 58740fd..8cc7c80 100644
--- a/tempest/api/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -91,7 +91,7 @@
     def test_list_servers_filter_by_image(self):
         # Filter the list of servers by image
         params = {'image': self.image_ref}
-        resp, body = self.client.list_servers(params)
+        body = self.client.list_servers(params)
         servers = body['servers']
 
         self.assertIn(self.s1['id'], map(lambda x: x['id'], servers))
@@ -102,7 +102,7 @@
     def test_list_servers_filter_by_flavor(self):
         # Filter the list of servers by flavor
         params = {'flavor': self.flavor_ref_alt}
-        resp, body = self.client.list_servers(params)
+        body = self.client.list_servers(params)
         servers = body['servers']
 
         self.assertNotIn(self.s1['id'], map(lambda x: x['id'], servers))
@@ -113,7 +113,7 @@
     def test_list_servers_filter_by_server_name(self):
         # Filter the list of servers by server name
         params = {'name': self.s1_name}
-        resp, body = self.client.list_servers(params)
+        body = self.client.list_servers(params)
         servers = body['servers']
 
         self.assertIn(self.s1_name, map(lambda x: x['name'], servers))
@@ -124,7 +124,7 @@
     def test_list_servers_filter_by_server_status(self):
         # Filter the list of servers by server status
         params = {'status': 'active'}
-        resp, body = self.client.list_servers(params)
+        body = self.client.list_servers(params)
         servers = body['servers']
 
         self.assertIn(self.s1['id'], map(lambda x: x['id'], servers))
@@ -138,7 +138,7 @@
         self.client.stop(self.s1['id'])
         self.client.wait_for_server_status(self.s1['id'],
                                            'SHUTOFF')
-        resp, body = self.client.list_servers(params)
+        body = self.client.list_servers(params)
         self.client.start(self.s1['id'])
         self.client.wait_for_server_status(self.s1['id'],
                                            'ACTIVE')
@@ -152,22 +152,22 @@
     def test_list_servers_filter_by_limit(self):
         # Verify only the expected number of servers are returned
         params = {'limit': 1}
-        resp, servers = self.client.list_servers(params)
+        servers = self.client.list_servers(params)
         self.assertEqual(1, len([x for x in servers['servers'] if 'id' in x]))
 
     @test.attr(type='gate')
     def test_list_servers_filter_by_zero_limit(self):
         # Verify only the expected number of servers are returned
         params = {'limit': 0}
-        resp, servers = self.client.list_servers(params)
+        servers = self.client.list_servers(params)
         self.assertEqual(0, len(servers['servers']))
 
     @test.attr(type='gate')
     def test_list_servers_filter_by_exceed_limit(self):
         # Verify only the expected number of servers are returned
         params = {'limit': 100000}
-        resp, servers = self.client.list_servers(params)
-        resp, all_servers = self.client.list_servers()
+        servers = self.client.list_servers(params)
+        all_servers = self.client.list_servers()
         self.assertEqual(len([x for x in all_servers['servers'] if 'id' in x]),
                          len([x for x in servers['servers'] if 'id' in x]))
 
@@ -187,7 +187,7 @@
     def test_list_servers_detailed_filter_by_flavor(self):
         # Filter the detailed list of servers by flavor
         params = {'flavor': self.flavor_ref_alt}
-        resp, body = self.client.list_servers_with_detail(params)
+        body = self.client.list_servers_with_detail(params)
         servers = body['servers']
 
         self.assertNotIn(self.s1['id'], map(lambda x: x['id'], servers))
@@ -198,7 +198,7 @@
     def test_list_servers_detailed_filter_by_server_name(self):
         # Filter the detailed list of servers by server name
         params = {'name': self.s1_name}
-        resp, body = self.client.list_servers_with_detail(params)
+        body = self.client.list_servers_with_detail(params)
         servers = body['servers']
 
         self.assertIn(self.s1_name, map(lambda x: x['name'], servers))
@@ -209,7 +209,7 @@
     def test_list_servers_detailed_filter_by_server_status(self):
         # Filter the detailed list of servers by server status
         params = {'status': 'active'}
-        resp, body = self.client.list_servers_with_detail(params)
+        body = self.client.list_servers_with_detail(params)
         servers = body['servers']
         test_ids = [s['id'] for s in (self.s1, self.s2, self.s3)]
 
@@ -223,7 +223,7 @@
     def test_list_servers_filtered_by_name_wildcard(self):
         # List all servers that contains '-instance' in name
         params = {'name': '-instance'}
-        resp, body = self.client.list_servers(params)
+        body = self.client.list_servers(params)
         servers = body['servers']
 
         self.assertIn(self.s1_name, map(lambda x: x['name'], servers))
@@ -234,7 +234,7 @@
         part_name = self.s1_name[6:-1]
 
         params = {'name': part_name}
-        resp, body = self.client.list_servers(params)
+        body = self.client.list_servers(params)
         servers = body['servers']
 
         self.assertIn(self.s1_name, map(lambda x: x['name'], servers))
@@ -247,7 +247,7 @@
         regexes = ['^.*\-instance\-[0-9]+$', '^.*\-instance\-.*$']
         for regex in regexes:
             params = {'name': regex}
-            resp, body = self.client.list_servers(params)
+            body = self.client.list_servers(params)
             servers = body['servers']
 
             self.assertIn(self.s1_name, map(lambda x: x['name'], servers))
@@ -258,7 +258,7 @@
         part_name = self.s1_name[-10:]
 
         params = {'name': part_name}
-        resp, body = self.client.list_servers(params)
+        body = self.client.list_servers(params)
         servers = body['servers']
 
         self.assertIn(self.s1_name, map(lambda x: x['name'], servers))
@@ -272,7 +272,7 @@
         self.s1 = self.client.get_server(self.s1['id'])
         ip = self.s1['addresses'][self.fixed_network_name][0]['addr']
         params = {'ip': ip}
-        resp, body = self.client.list_servers(params)
+        body = self.client.list_servers(params)
         servers = body['servers']
 
         self.assertIn(self.s1_name, map(lambda x: x['name'], servers))
@@ -289,7 +289,7 @@
         self.s1 = self.client.get_server(self.s1['id'])
         ip = self.s1['addresses'][self.fixed_network_name][0]['addr'][0:-3]
         params = {'ip': ip}
-        resp, body = self.client.list_servers(params)
+        body = self.client.list_servers(params)
         servers = body['servers']
 
         self.assertIn(self.s1_name, map(lambda x: x['name'], servers))
@@ -300,5 +300,5 @@
     def test_list_servers_detailed_limit_results(self):
         # Verify only the expected number of detailed results are returned
         params = {'limit': 1}
-        resp, servers = self.client.list_servers_with_detail(params)
+        servers = self.client.list_servers_with_detail(params)
         self.assertEqual(1, len(servers['servers']))
diff --git a/tempest/api/compute/servers/test_list_servers_negative.py b/tempest/api/compute/servers/test_list_servers_negative.py
index 2f12882..7ede69c 100644
--- a/tempest/api/compute/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/servers/test_list_servers_negative.py
@@ -52,62 +52,55 @@
     def test_list_servers_with_a_deleted_server(self):
         # Verify deleted servers do not show by default in list servers
         # List servers and verify server not returned
-        resp, body = self.client.list_servers()
+        body = self.client.list_servers()
         servers = body['servers']
         deleted_ids = [s['id'] for s in self.deleted_fixtures]
         actual = [srv for srv in servers
                   if srv['id'] in deleted_ids]
-        self.assertEqual('200', resp['status'])
         self.assertEqual([], actual)
 
     @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_non_existing_image(self):
         # Listing servers for a non existing image returns empty list
         non_existing_image = '1234abcd-zzz0-aaa9-ppp3-0987654abcde'
-        resp, body = self.client.list_servers(dict(image=non_existing_image))
+        body = self.client.list_servers(dict(image=non_existing_image))
         servers = body['servers']
-        self.assertEqual('200', resp['status'])
         self.assertEqual([], servers)
 
     @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_non_existing_flavor(self):
         # Listing servers by non existing flavor returns empty list
         non_existing_flavor = 1234
-        resp, body = self.client.list_servers(dict(flavor=non_existing_flavor))
+        body = self.client.list_servers(dict(flavor=non_existing_flavor))
         servers = body['servers']
-        self.assertEqual('200', resp['status'])
         self.assertEqual([], servers)
 
     @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_non_existing_server_name(self):
         # Listing servers for a non existent server name returns empty list
         non_existing_name = 'junk_server_1234'
-        resp, body = self.client.list_servers(dict(name=non_existing_name))
+        body = self.client.list_servers(dict(name=non_existing_name))
         servers = body['servers']
-        self.assertEqual('200', resp['status'])
         self.assertEqual([], servers)
 
     @test.attr(type=['negative', 'gate'])
     def test_list_servers_status_non_existing(self):
         # Return an empty list when invalid status is specified
         non_existing_status = 'BALONEY'
-        resp, body = self.client.list_servers(dict(status=non_existing_status))
+        body = self.client.list_servers(dict(status=non_existing_status))
         servers = body['servers']
-        self.assertEqual('200', resp['status'])
         self.assertEqual([], servers)
 
     @test.attr(type='gate')
     def test_list_servers_by_limits(self):
         # List servers by specifying limits
-        resp, body = self.client.list_servers({'limit': 1})
-        self.assertEqual('200', resp['status'])
+        body = self.client.list_servers({'limit': 1})
         self.assertEqual(1, len([x for x in body['servers'] if 'id' in x]))
 
     @test.attr(type=['negative', 'gate'])
     def test_list_servers_by_limits_greater_than_actual_count(self):
         # List servers by specifying a greater value for limit
-        resp, body = self.client.list_servers({'limit': 100})
-        self.assertEqual('200', resp['status'])
+        body = self.client.list_servers({'limit': 100})
         self.assertEqual(len(self.existing_fixtures), len(body['servers']))
 
     @test.attr(type=['negative', 'gate'])
@@ -132,17 +125,15 @@
     def test_list_servers_by_changes_since_future_date(self):
         # Return an empty list when a date in the future is passed
         changes_since = {'changes-since': '2051-01-01T12:34:00Z'}
-        resp, body = self.client.list_servers(changes_since)
-        self.assertEqual('200', resp['status'])
+        body = self.client.list_servers(changes_since)
         self.assertEqual(0, len(body['servers']))
 
     @test.attr(type=['negative', 'gate'])
     def test_list_servers_detail_server_is_deleted(self):
         # Server details are not listed for a deleted server
         deleted_ids = [s['id'] for s in self.deleted_fixtures]
-        resp, body = self.client.list_servers_with_detail()
+        body = self.client.list_servers_with_detail()
         servers = body['servers']
         actual = [srv for srv in servers
                   if srv['id'] in deleted_ids]
-        self.assertEqual('200', resp['status'])
         self.assertEqual([], actual)
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index f849b8c..a2a71ae 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -65,8 +65,7 @@
     def test_change_server_password(self):
         # The server's password should be set to the provided password
         new_password = 'Newpass1234'
-        resp, body = self.client.change_password(self.server_id, new_password)
-        self.assertEqual(202, resp.status)
+        self.client.change_password(self.server_id, new_password)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
         if self.run_ssh:
@@ -84,8 +83,7 @@
                                                       self.password)
             boot_time = linux_client.get_boot_time()
 
-        resp, body = self.client.reboot(self.server_id, reboot_type)
-        self.assertEqual(202, resp.status)
+        self.client.reboot(self.server_id, reboot_type)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
         if self.run_ssh:
@@ -116,12 +114,12 @@
         personality = [{'path': 'rebuild.txt',
                        'contents': base64.b64encode(file_contents)}]
         password = 'rebuildPassw0rd'
-        resp, rebuilt_server = self.client.rebuild(self.server_id,
-                                                   self.image_ref_alt,
-                                                   name=new_name,
-                                                   metadata=meta,
-                                                   personality=personality,
-                                                   adminPass=password)
+        rebuilt_server = self.client.rebuild(self.server_id,
+                                             self.image_ref_alt,
+                                             name=new_name,
+                                             metadata=meta,
+                                             personality=personality,
+                                             adminPass=password)
 
         # Verify the properties in the initial response are correct
         self.assertEqual(self.server_id, rebuilt_server['id'])
@@ -152,10 +150,9 @@
         old_image = server['image']['id']
         new_image = self.image_ref_alt \
             if old_image == self.image_ref else self.image_ref
-        resp, server = self.client.stop(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.client.stop(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'SHUTOFF')
-        resp, rebuilt_server = self.client.rebuild(self.server_id, new_image)
+        rebuilt_server = self.client.rebuild(self.server_id, new_image)
 
         # Verify the properties in the initial response are correct
         self.assertEqual(self.server_id, rebuilt_server['id'])
@@ -191,13 +188,11 @@
             self._detect_server_image_flavor(self.server_id)
 
         if stop:
-            resp = self.servers_client.stop(self.server_id)[0]
-            self.assertEqual(202, resp.status)
+            self.servers_client.stop(self.server_id)
             self.servers_client.wait_for_server_status(self.server_id,
                                                        'SHUTOFF')
 
-        resp, server = self.client.resize(self.server_id, new_flavor_ref)
-        self.assertEqual(202, resp.status)
+        self.client.resize(self.server_id, new_flavor_ref)
         self.client.wait_for_server_status(self.server_id, 'VERIFY_RESIZE')
 
         self.client.confirm_resize(self.server_id)
@@ -233,8 +228,7 @@
         previous_flavor_ref, new_flavor_ref = \
             self._detect_server_image_flavor(self.server_id)
 
-        resp, server = self.client.resize(self.server_id, new_flavor_ref)
-        self.assertEqual(202, resp.status)
+        self.client.resize(self.server_id, new_flavor_ref)
         self.client.wait_for_server_status(self.server_id, 'VERIFY_RESIZE')
 
         self.client.revert_resize(self.server_id)
@@ -251,10 +245,10 @@
         # Positive test:create backup successfully and rotate backups correctly
         # create the first and the second backup
         backup1 = data_utils.rand_name('backup-1')
-        resp, _ = self.servers_client.create_backup(self.server_id,
-                                                    'daily',
-                                                    2,
-                                                    backup1)
+        resp = self.servers_client.create_backup(self.server_id,
+                                                 'daily',
+                                                 2,
+                                                 backup1).response
         oldest_backup_exist = True
 
         # the oldest one should be deleted automatically in this test
@@ -271,18 +265,16 @@
 
         image1_id = data_utils.parse_image_id(resp['location'])
         self.addCleanup(_clean_oldest_backup, image1_id)
-        self.assertEqual(202, resp.status)
         self.os.image_client.wait_for_image_status(image1_id, 'active')
 
         backup2 = data_utils.rand_name('backup-2')
         self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
-        resp, _ = self.servers_client.create_backup(self.server_id,
-                                                    'daily',
-                                                    2,
-                                                    backup2)
+        resp = self.servers_client.create_backup(self.server_id,
+                                                 'daily',
+                                                 2,
+                                                 backup2).response
         image2_id = data_utils.parse_image_id(resp['location'])
         self.addCleanup(self.os.image_client.delete_image, image2_id)
-        self.assertEqual(202, resp.status)
         self.os.image_client.wait_for_image_status(image2_id, 'active')
 
         # verify they have been created
@@ -304,13 +296,12 @@
         # the first one will be deleted
         backup3 = data_utils.rand_name('backup-3')
         self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
-        resp, _ = self.servers_client.create_backup(self.server_id,
-                                                    'daily',
-                                                    2,
-                                                    backup3)
+        resp = self.servers_client.create_backup(self.server_id,
+                                                 'daily',
+                                                 2,
+                                                 backup3).response
         image3_id = data_utils.parse_image_id(resp['location'])
         self.addCleanup(self.os.image_client.delete_image, image3_id)
-        self.assertEqual(202, resp.status)
         # the first back up should be deleted
         self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
         self.os.image_client.wait_for_resource_deletion(image1_id)
@@ -329,9 +320,8 @@
                          (image_list[0]['name'], image_list[1]['name']))
 
     def _get_output(self):
-        resp, output = self.servers_client.get_console_output(
-            self.server_id, 10)
-        self.assertEqual(200, resp.status)
+        output = self.servers_client.get_console_output(
+            self.server_id, 10).data
         self.assertTrue(output, "Console output was empty.")
         lines = len(output.split('\n'))
         self.assertEqual(lines, 10)
@@ -348,8 +338,7 @@
         # log file is truncated and we cannot get any console log through
         # "console-log" API.
         # The detail is https://bugs.launchpad.net/nova/+bug/1251920
-        resp, body = self.servers_client.reboot(self.server_id, 'HARD')
-        self.assertEqual(202, resp.status)
+        self.servers_client.reboot(self.server_id, 'HARD')
         self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
 
         self.wait_for(self._get_output)
@@ -361,8 +350,8 @@
         server = self.create_test_server(wait_until='ACTIVE')
 
         def _check_full_length_console_log():
-            _, output = self.servers_client.get_console_output(server['id'],
-                                                               None)
+            output = self.servers_client.get_console_output(server['id'],
+                                                            None).data
             self.assertTrue(output, "Console output was empty.")
             lines = len(output.split('\n'))
 
@@ -386,8 +375,7 @@
         server = self.create_test_server(wait_until='ACTIVE')
         temp_server_id = server['id']
 
-        resp, server = self.servers_client.stop(temp_server_id)
-        self.assertEqual(202, resp.status)
+        self.servers_client.stop(temp_server_id)
         self.servers_client.wait_for_server_status(temp_server_id, 'SHUTOFF')
 
         self.wait_for(self._get_output)
@@ -396,30 +384,25 @@
                           'Pause is not available.')
     @test.attr(type='gate')
     def test_pause_unpause_server(self):
-        resp, server = self.client.pause_server(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.client.pause_server(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'PAUSED')
-        resp, server = self.client.unpause_server(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.client.unpause_server(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
     @testtools.skipUnless(CONF.compute_feature_enabled.suspend,
                           'Suspend is not available.')
     @test.attr(type='gate')
     def test_suspend_resume_server(self):
-        resp, server = self.client.suspend_server(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.client.suspend_server(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'SUSPENDED')
-        resp, server = self.client.resume_server(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.client.resume_server(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
     @testtools.skipUnless(CONF.compute_feature_enabled.shelve,
                           'Shelve is not available.')
     @test.attr(type='gate')
     def test_shelve_unshelve_server(self):
-        resp, server = self.client.shelve_server(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.client.shelve_server(self.server_id)
 
         offload_time = CONF.compute.shelved_offload_time
         if offload_time >= 0:
@@ -430,8 +413,7 @@
             self.client.wait_for_server_status(self.server_id,
                                                'SHELVED')
 
-            resp, server = self.client.shelve_offload_server(self.server_id)
-            self.assertEqual(202, resp.status)
+            self.client.shelve_offload_server(self.server_id)
             self.client.wait_for_server_status(self.server_id,
                                                'SHELVED_OFFLOADED')
 
@@ -442,36 +424,29 @@
         self.assertEqual(1, len(images))
         self.assertEqual(image_name, images[0]['name'])
 
-        resp, server = self.client.unshelve_server(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.client.unshelve_server(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'ACTIVE')
 
     @test.attr(type='gate')
     def test_stop_start_server(self):
-        resp, server = self.servers_client.stop(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.servers_client.stop(self.server_id)
         self.servers_client.wait_for_server_status(self.server_id, 'SHUTOFF')
-        resp, server = self.servers_client.start(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.servers_client.start(self.server_id)
         self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
 
     @test.attr(type='gate')
     def test_lock_unlock_server(self):
         # Lock the server,try server stop(exceptions throw),unlock it and retry
-        resp, server = self.servers_client.lock_server(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.servers_client.lock_server(self.server_id)
         server = self.servers_client.get_server(self.server_id)
         self.assertEqual(server['status'], 'ACTIVE')
         # Locked server is not allowed to be stopped by non-admin user
         self.assertRaises(lib_exc.Conflict,
                           self.servers_client.stop, self.server_id)
-        resp, server = self.servers_client.unlock_server(self.server_id)
-        self.assertEqual(202, resp.status)
-        resp, server = self.servers_client.stop(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.servers_client.unlock_server(self.server_id)
+        self.servers_client.stop(self.server_id)
         self.servers_client.wait_for_server_status(self.server_id, 'SHUTOFF')
-        resp, server = self.servers_client.start(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.servers_client.start(self.server_id)
         self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
 
     def _validate_url(self, url):
@@ -488,11 +463,8 @@
         # Get the VNC console of type 'novnc' and 'xvpvnc'
         console_types = ['novnc', 'xvpvnc']
         for console_type in console_types:
-            resp, body = self.servers_client.get_vnc_console(self.server_id,
-                                                             console_type)
-            self.assertEqual(
-                200, resp.status,
-                "Failed to get Console Type: %s" % (console_types))
+            body = self.servers_client.get_vnc_console(self.server_id,
+                                                       console_type)
             self.assertEqual(console_type, body['type'])
             self.assertNotEqual('', body['url'])
             self._validate_url(body['url'])
diff --git a/tempest/api/compute/servers/test_server_addresses.py b/tempest/api/compute/servers/test_server_addresses.py
index 5a63033..1c7915a 100644
--- a/tempest/api/compute/servers/test_server_addresses.py
+++ b/tempest/api/compute/servers/test_server_addresses.py
@@ -42,8 +42,7 @@
         # All public and private addresses for
         # a server should be returned
 
-        resp, addresses = self.client.list_addresses(self.server['id'])
-        self.assertEqual('200', resp['status'])
+        addresses = self.client.list_addresses(self.server['id'])
 
         # We do not know the exact network configuration, but an instance
         # should at least have a single public or private address
@@ -60,15 +59,14 @@
         # Providing a network type should filter
         # the addresses return by that type
 
-        resp, addresses = self.client.list_addresses(self.server['id'])
+        addresses = self.client.list_addresses(self.server['id'])
 
         # Once again we don't know the environment's exact network config,
         # but the response for each individual network should be the same
         # as the partial result of the full address list
         id = self.server['id']
         for addr_type in addresses:
-            resp, addr = self.client.list_addresses_by_network(id, addr_type)
-            self.assertEqual('200', resp['status'])
+            addr = self.client.list_addresses_by_network(id, addr_type)
 
             addr = addr[addr_type]
             for address in addresses[addr_type]:
diff --git a/tempest/api/compute/servers/test_server_group.py b/tempest/api/compute/servers/test_server_group.py
index fe5dca0..58ff460 100644
--- a/tempest/api/compute/servers/test_server_group.py
+++ b/tempest/api/compute/servers/test_server_group.py
@@ -37,26 +37,23 @@
         server_group_name = data_utils.rand_name('server-group')
         cls.policy = ['affinity']
 
-        _, cls.created_server_group = cls.create_test_server_group(
+        cls.created_server_group = cls.create_test_server_group(
             server_group_name,
             cls.policy)
 
     def _create_server_group(self, name, policy):
         # create the test server-group with given policy
         server_group = {'name': name, 'policies': policy}
-        resp, body = self.create_test_server_group(name, policy)
-        self.assertEqual(200, resp.status)
+        body = self.create_test_server_group(name, policy)
         for key in ['name', 'policies']:
             self.assertEqual(server_group[key], body[key])
         return body
 
     def _delete_server_group(self, server_group):
         # delete the test server-group
-        resp, _ = self.client.delete_server_group(server_group['id'])
-        self.assertEqual(204, resp.status)
+        self.client.delete_server_group(server_group['id'])
         # validation of server-group deletion
-        resp, server_group_list = self.client.list_server_groups()
-        self.assertEqual(200, resp.status)
+        server_group_list = self.client.list_server_groups()
         self.assertNotIn(server_group, server_group_list)
 
     def _create_delete_server_group(self, policy):
@@ -101,14 +98,12 @@
     @test.attr(type='gate')
     def test_get_server_group(self):
         # Get the server-group
-        resp, body = self.client.get_server_group(
+        body = self.client.get_server_group(
             self.created_server_group['id'])
-        self.assertEqual(200, resp.status)
         self.assertEqual(self.created_server_group, body)
 
     @test.attr(type='gate')
     def test_list_server_groups(self):
         # List the server-group
-        resp, body = self.client.list_server_groups()
-        self.assertEqual(200, resp.status)
+        body = self.client.list_server_groups()
         self.assertIn(self.created_server_group, body)
diff --git a/tempest/api/compute/servers/test_server_metadata.py b/tempest/api/compute/servers/test_server_metadata.py
index 7e8247f..c7c74f7 100644
--- a/tempest/api/compute/servers/test_server_metadata.py
+++ b/tempest/api/compute/servers/test_server_metadata.py
@@ -30,16 +30,14 @@
     def setUp(self):
         super(ServerMetadataTestJSON, self).setUp()
         meta = {'key1': 'value1', 'key2': 'value2'}
-        resp, _ = self.client.set_server_metadata(self.server_id, meta)
-        self.assertEqual(resp.status, 200)
+        self.client.set_server_metadata(self.server_id, meta)
 
     @test.attr(type='gate')
     def test_list_server_metadata(self):
         # All metadata key/value pairs for a server should be returned
-        resp, resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = self.client.list_server_metadata(self.server_id)
 
         # Verify the expected metadata items are in the list
-        self.assertEqual(200, resp.status)
         expected = {'key1': 'value1', 'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
 
@@ -48,13 +46,11 @@
         # The server's metadata should be replaced with the provided values
         # Create a new set of metadata for the server
         req_metadata = {'meta2': 'data2', 'meta3': 'data3'}
-        resp, metadata = self.client.set_server_metadata(self.server_id,
-                                                         req_metadata)
-        self.assertEqual(200, resp.status)
+        self.client.set_server_metadata(self.server_id, req_metadata)
 
         # Verify the expected values are correct, and that the
         # previous values have been removed
-        resp, resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = self.client.list_server_metadata(self.server_id)
         self.assertEqual(resp_metadata, req_metadata)
 
     @test.attr(type='gate')
@@ -62,12 +58,10 @@
         # The server's metadata values should be updated to the
         # provided values
         meta = {'key1': 'alt1', 'key3': 'value3'}
-        resp, metadata = self.client.update_server_metadata(self.server_id,
-                                                            meta)
-        self.assertEqual(200, resp.status)
+        self.client.update_server_metadata(self.server_id, meta)
 
         # Verify the values have been updated to the proper values
-        resp, resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = self.client.list_server_metadata(self.server_id)
         expected = {'key1': 'alt1', 'key2': 'value2', 'key3': 'value3'}
         self.assertEqual(expected, resp_metadata)
 
@@ -76,16 +70,15 @@
         # The original metadata should not be lost if empty metadata body is
         # passed
         meta = {}
-        _, metadata = self.client.update_server_metadata(self.server_id, meta)
-        resp, resp_metadata = self.client.list_server_metadata(self.server_id)
+        self.client.update_server_metadata(self.server_id, meta)
+        resp_metadata = self.client.list_server_metadata(self.server_id)
         expected = {'key1': 'value1', 'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
 
     @test.attr(type='gate')
     def test_get_server_metadata_item(self):
         # The value for a specific metadata key should be returned
-        resp, meta = self.client.get_server_metadata_item(self.server_id,
-                                                          'key2')
+        meta = self.client.get_server_metadata_item(self.server_id, 'key2')
         self.assertEqual('value2', meta['key2'])
 
     @test.attr(type='gate')
@@ -93,23 +86,19 @@
         # The item's value should be updated to the provided value
         # Update the metadata value
         meta = {'nova': 'alt'}
-        resp, body = self.client.set_server_metadata_item(self.server_id,
-                                                          'nova', meta)
-        self.assertEqual(200, resp.status)
+        self.client.set_server_metadata_item(self.server_id, 'nova', meta)
 
         # Verify the meta item's value has been updated
-        resp, resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = self.client.list_server_metadata(self.server_id)
         expected = {'key1': 'value1', 'key2': 'value2', 'nova': 'alt'}
         self.assertEqual(expected, resp_metadata)
 
     @test.attr(type='gate')
     def test_delete_server_metadata_item(self):
         # The metadata value/key pair should be deleted from the server
-        resp, meta = self.client.delete_server_metadata_item(self.server_id,
-                                                             'key1')
-        self.assertEqual(204, resp.status)
+        self.client.delete_server_metadata_item(self.server_id, 'key1')
 
         # Verify the metadata item has been removed
-        resp, resp_metadata = self.client.list_server_metadata(self.server_id)
+        resp_metadata = self.client.list_server_metadata(self.server_id)
         expected = {'key2': 'value2'}
         self.assertEqual(expected, resp_metadata)
diff --git a/tempest/api/compute/servers/test_server_password.py b/tempest/api/compute/servers/test_server_password.py
index b2e09f2..a814359 100644
--- a/tempest/api/compute/servers/test_server_password.py
+++ b/tempest/api/compute/servers/test_server_password.py
@@ -28,10 +28,8 @@
 
     @test.attr(type='gate')
     def test_get_server_password(self):
-        resp, body = self.client.get_password(self.server['id'])
-        self.assertEqual(200, resp.status)
+        self.client.get_password(self.server['id'])
 
     @test.attr(type='gate')
     def test_delete_server_password(self):
-        resp, body = self.client.delete_password(self.server['id'])
-        self.assertEqual(204, resp.status)
+        self.client.delete_password(self.server['id'])
diff --git a/tempest/api/compute/servers/test_server_rescue.py b/tempest/api/compute/servers/test_server_rescue.py
index 8d5c8f8..a096fd8 100644
--- a/tempest/api/compute/servers/test_server_rescue.py
+++ b/tempest/api/compute/servers/test_server_rescue.py
@@ -73,18 +73,15 @@
         super(ServerRescueTestJSON, self).tearDown()
 
     def _unrescue(self, server_id):
-        resp, body = self.servers_client.unrescue_server(server_id)
-        self.assertEqual(202, resp.status)
+        self.servers_client.unrescue_server(server_id)
         self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
 
     @test.attr(type='smoke')
     def test_rescue_unrescue_instance(self):
-        resp, body = self.servers_client.rescue_server(
+        self.servers_client.rescue_server(
             self.server_id, adminPass=self.password)
-        self.assertEqual(200, resp.status)
         self.servers_client.wait_for_server_status(self.server_id, 'RESCUE')
-        resp, body = self.servers_client.unrescue_server(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.servers_client.unrescue_server(self.server_id)
         self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
 
     @test.attr(type='gate')
@@ -113,11 +110,8 @@
         self.addCleanup(self._unrescue, self.server_id)
 
         # Add Security group
-        resp, body = self.servers_client.add_security_group(self.server_id,
-                                                            self.sg_name)
-        self.assertEqual(202, resp.status)
+        self.servers_client.add_security_group(self.server_id, self.sg_name)
 
         # Delete Security group
-        resp, body = self.servers_client.remove_security_group(self.server_id,
-                                                               self.sg_name)
-        self.assertEqual(202, resp.status)
+        self.servers_client.remove_security_group(self.server_id,
+                                                  self.sg_name)
diff --git a/tempest/api/compute/servers/test_server_rescue_negative.py b/tempest/api/compute/servers/test_server_rescue_negative.py
index 58353e7..904e42b 100644
--- a/tempest/api/compute/servers/test_server_rescue_negative.py
+++ b/tempest/api/compute/servers/test_server_rescue_negative.py
@@ -71,13 +71,11 @@
                                                               'available')
 
     def _unrescue(self, server_id):
-        resp, body = self.servers_client.unrescue_server(server_id)
-        self.assertEqual(202, resp.status)
+        self.servers_client.unrescue_server(server_id)
         self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
 
     def _unpause(self, server_id):
-        resp, body = self.servers_client.unpause_server(server_id)
-        self.assertEqual(202, resp.status)
+        self.servers_client.unpause_server(server_id)
         self.servers_client.wait_for_server_status(server_id, 'ACTIVE')
 
     @testtools.skipUnless(CONF.compute_feature_enabled.pause,
@@ -85,9 +83,8 @@
     @test.attr(type=['negative', 'gate'])
     def test_rescue_paused_instance(self):
         # Rescue a paused server
-        resp, body = self.servers_client.pause_server(self.server_id)
+        self.servers_client.pause_server(self.server_id)
         self.addCleanup(self._unpause, self.server_id)
-        self.assertEqual(202, resp.status)
         self.servers_client.wait_for_server_status(self.server_id, 'PAUSED')
         self.assertRaises(lib_exc.Conflict,
                           self.servers_client.rescue_server,
diff --git a/tempest/api/compute/servers/test_servers_negative.py b/tempest/api/compute/servers/test_servers_negative.py
index d89aff4..d973242 100644
--- a/tempest/api/compute/servers/test_servers_negative.py
+++ b/tempest/api/compute/servers/test_servers_negative.py
@@ -345,8 +345,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_suspend_server_invalid_state(self):
         # suspend a suspended server.
-        resp, _ = self.client.suspend_server(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.client.suspend_server(self.server_id)
         self.client.wait_for_server_status(self.server_id, 'SUSPENDED')
         self.assertRaises(lib_exc.Conflict,
                           self.client.suspend_server,
@@ -416,8 +415,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_shelve_shelved_server(self):
         # shelve a shelved server.
-        resp, server = self.client.shelve_server(self.server_id)
-        self.assertEqual(202, resp.status)
+        self.client.shelve_server(self.server_id)
 
         offload_time = CONF.compute.shelved_offload_time
         if offload_time >= 0:
diff --git a/tempest/api/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py
index 5c76ba7..564704e 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -49,8 +49,7 @@
     def test_list_virtual_interfaces(self):
         # Positive test:Should be able to GET the virtual interfaces list
         # for a given server_id
-        resp, output = self.client.list_virtual_interfaces(self.server_id)
-        self.assertEqual(200, resp.status)
+        output = self.client.list_virtual_interfaces(self.server_id)
         self.assertIsNotNone(output)
         virt_ifaces = output
         self.assertNotEqual(0, len(virt_ifaces['virtual_interfaces']),
diff --git a/tempest/api/compute/test_authorization.py b/tempest/api/compute/test_authorization.py
index 1211db3..b64981f 100644
--- a/tempest/api/compute/test_authorization.py
+++ b/tempest/api/compute/test_authorization.py
@@ -141,7 +141,7 @@
         # show on alternate tenant
         # Listing servers from alternate tenant
         alt_server_ids = []
-        resp, body = self.alt_client.list_servers()
+        body = self.alt_client.list_servers()
         alt_server_ids = [s['id'] for s in body['servers']]
         self.assertNotIn(self.server['id'], alt_server_ids)
 
diff --git a/tempest/api/compute/test_live_block_migration.py b/tempest/api/compute/test_live_block_migration.py
index 6da6b79..235b058 100644
--- a/tempest/api/compute/test_live_block_migration.py
+++ b/tempest/api/compute/test_live_block_migration.py
@@ -51,7 +51,7 @@
         return self._get_server_details(server_id)[self._host_key]
 
     def _migrate_server_to(self, server_id, dest_host):
-        _resp, body = self.admin_servers_client.live_migrate_server(
+        body = self.admin_servers_client.live_migrate_server(
             server_id, dest_host,
             CONF.compute_feature_enabled.block_migration_for_live_migration)
         return body
diff --git a/tempest/api/compute/test_live_block_migration_negative.py b/tempest/api/compute/test_live_block_migration_negative.py
index 586bc5c..34c75d5 100644
--- a/tempest/api/compute/test_live_block_migration_negative.py
+++ b/tempest/api/compute/test_live_block_migration_negative.py
@@ -35,7 +35,7 @@
         cls.admin_servers_client = cls.os_adm.servers_client
 
     def _migrate_server_to(self, server_id, dest_host):
-        _resp, body = self.admin_servers_client.live_migrate_server(
+        body = self.admin_servers_client.live_migrate_server(
             server_id, dest_host,
             CONF.compute_feature_enabled.
             block_migration_for_live_migration)
diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
index 5b15a08..424b0fa 100644
--- a/tempest/api/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -65,7 +65,7 @@
                                               adminPass=admin_pass)
 
         # Record addresses so that we can ssh later
-        _, self.server['addresses'] = (
+        self.server['addresses'] = (
             self.servers_client.list_addresses(self.server['id']))
 
         # Create a volume and wait for it to become ready
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index 3987ee3..b8a93f0 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -87,8 +87,8 @@
                                                'Server')
                 server_id = body['physical_resource_id']
                 LOG.debug('Console output for %s', server_id)
-                _, output = cls.servers_client.get_console_output(
-                    server_id, None)
+                output = cls.servers_client.get_console_output(
+                    server_id, None).data
                 LOG.debug(output)
             raise e
 
diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py
index 67eb182..480ddd5 100644
--- a/tempest/cmd/cleanup_service.py
+++ b/tempest/cmd/cleanup_service.py
@@ -168,7 +168,7 @@
 
     def list(self):
         client = self.client
-        _, servers_body = client.list_servers()
+        servers_body = client.list_servers()
         servers = servers_body['servers']
         LOG.debug("List count, %s Servers" % len(servers))
         return servers
@@ -192,7 +192,7 @@
 
     def list(self):
         client = self.client
-        _, sgs = client.list_server_groups()
+        sgs = client.list_server_groups()
         LOG.debug("List count, %s Server Groups" % len(sgs))
         return sgs
 
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index b11a3c8..b06968e 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -407,8 +407,7 @@
             # on the cloud. We don't care about the results except that it
             # remains authorized.
             client = client_for_user(user['name'])
-            resp, body = client.servers.list_servers()
-            self.assertEqual(resp['status'], '200')
+            client.servers.list_servers()
 
     def check_objects(self):
         """Check that the objects created are still there."""
@@ -782,7 +781,7 @@
 #######################
 
 def _get_server_by_name(client, name):
-    r, body = client.servers.list_servers()
+    body = client.servers.list_servers()
     for server in body['servers']:
         if name == server['name']:
             return server
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index eb7265f..2af96c7 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -379,13 +379,13 @@
             LOG.debug('Console output not supported, cannot log')
             return
         if not servers:
-            _, servers = self.servers_client.list_servers()
+            servers = self.servers_client.list_servers()
             servers = servers['servers']
         for server in servers:
             console_output = self.servers_client.get_console_output(
-                server['id'], length=None)
-            LOG.debug('Console output for %s\nhead=%s\nbody=\n%s',
-                      server['id'], console_output[0], console_output[1])
+                server['id'], length=None).data
+            LOG.debug('Console output for %s\nbody=\n%s',
+                      server['id'], console_output)
 
     def _log_net_info(self, exc):
         # network debug is called as part of ssh init
diff --git a/tempest/scenario/test_large_ops.py b/tempest/scenario/test_large_ops.py
index ac766ea..fca0a2a 100644
--- a/tempest/scenario/test_large_ops.py
+++ b/tempest/scenario/test_large_ops.py
@@ -87,7 +87,7 @@
             security_groups=[{'name': secgroup['name']}])
         # needed because of bug 1199788
         params = {'name': name}
-        _, server_list = self.servers_client.list_servers(params)
+        server_list = self.servers_client.list_servers(params)
         self.servers = server_list['servers']
         for server in self.servers:
             # after deleting all servers - wait for all servers to clear
diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py
index f13ff0f..e4d7ece 100644
--- a/tempest/scenario/test_minimum_basic.py
+++ b/tempest/scenario/test_minimum_basic.py
@@ -53,7 +53,7 @@
                                          create_kwargs=create_kwargs)
 
     def nova_list(self):
-        _, servers = self.servers_client.list_servers()
+        servers = self.servers_client.list_servers()
         # The list servers in the compute client is inconsistent...
         servers = servers['servers']
         self.assertIn(self.server['id'], [x['id'] for x in servers])
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
index 6a5bce7..b01fbf1 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -157,7 +157,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(common_schema.list_servers, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def list_servers_with_detail(self, params=None):
         """Lists all servers in detail for a user."""
@@ -169,7 +169,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.list_servers_detail, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def wait_for_server_status(self, server_id, status, extra_timeout=0,
                                raise_on_error=True, ready_wait=True):
@@ -202,7 +202,7 @@
         resp, body = self.get("servers/%s/ips" % str(server_id))
         body = json.loads(body)
         self.validate_response(schema.list_addresses, resp, body)
-        return resp, body['addresses']
+        return service_client.ResponseBody(resp, body['addresses'])
 
     def list_addresses_by_network(self, server_id, network_id):
         """Lists all addresses of a specific network type for a server."""
@@ -210,10 +210,11 @@
                               (str(server_id), network_id))
         body = json.loads(body)
         self.validate_response(schema.list_addresses_by_network, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def action(self, server_id, action_name, response_key,
-               schema=common_schema.server_actions_common_schema, **kwargs):
+               schema=common_schema.server_actions_common_schema,
+               response_class=service_client.ResponseBody, **kwargs):
         post_body = json.dumps({action_name: kwargs})
         resp, body = self.post('servers/%s/action' % str(server_id),
                                post_body)
@@ -231,7 +232,7 @@
             body = body[response_key]
         else:
             self.validate_response(schema, resp, body)
-        return resp, body
+        return response_class(resp, body)
 
     def create_backup(self, server_id, backup_type, rotation, name):
         """Backup a server instance."""
@@ -250,7 +251,7 @@
                               str(server_id))
         body = json.loads(body)
         self.validate_response(common_schema.get_password, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def delete_password(self, server_id):
         """
@@ -262,7 +263,7 @@
                                  str(server_id))
         self.validate_response(common_schema.server_actions_delete_password,
                                resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def reboot(self, server_id, reboot_type):
         """Reboots a server."""
@@ -303,7 +304,7 @@
         resp, body = self.get("servers/%s/metadata" % str(server_id))
         body = json.loads(body)
         self.validate_response(common_schema.list_server_metadata, resp, body)
-        return resp, body['metadata']
+        return service_client.ResponseBody(resp, body['metadata'])
 
     def set_server_metadata(self, server_id, meta, no_metadata_field=False):
         if no_metadata_field:
@@ -314,7 +315,7 @@
                               post_body)
         body = json.loads(body)
         self.validate_response(common_schema.set_server_metadata, resp, body)
-        return resp, body['metadata']
+        return service_client.ResponseBody(resp, body['metadata'])
 
     def update_server_metadata(self, server_id, meta):
         post_body = json.dumps({'metadata': meta})
@@ -323,14 +324,14 @@
         body = json.loads(body)
         self.validate_response(common_schema.update_server_metadata,
                                resp, body)
-        return resp, body['metadata']
+        return service_client.ResponseBody(resp, body['metadata'])
 
     def get_server_metadata_item(self, server_id, key):
         resp, body = self.get("servers/%s/metadata/%s" % (str(server_id), key))
         body = json.loads(body)
         self.validate_response(schema.set_get_server_metadata_item,
                                resp, body)
-        return resp, body['meta']
+        return service_client.ResponseBody(resp, body['meta'])
 
     def set_server_metadata_item(self, server_id, key, meta):
         post_body = json.dumps({'meta': meta})
@@ -339,14 +340,14 @@
         body = json.loads(body)
         self.validate_response(schema.set_get_server_metadata_item,
                                resp, body)
-        return resp, body['meta']
+        return service_client.ResponseBody(resp, body['meta'])
 
     def delete_server_metadata_item(self, server_id, key):
         resp, body = self.delete("servers/%s/metadata/%s" %
                                  (str(server_id), key))
         self.validate_response(common_schema.delete_server_metadata_item,
                                resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def stop(self, server_id, **kwargs):
         return self.action(server_id, 'os-stop', None, **kwargs)
@@ -413,7 +414,7 @@
         resp, body = self.post("servers/%s/action" % str(server_id), req_body)
         self.validate_response(common_schema.server_actions_common_schema,
                                resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def migrate_server(self, server_id, **kwargs):
         """Migrates a server to a new host."""
@@ -462,7 +463,9 @@
     def get_console_output(self, server_id, length):
         kwargs = {'length': length} if length else {}
         return self.action(server_id, 'os-getConsoleOutput', 'output',
-                           common_schema.get_console_output, **kwargs)
+                           common_schema.get_console_output,
+                           response_class=service_client.ResponseBodyData,
+                           **kwargs)
 
     def list_virtual_interfaces(self, server_id):
         """
@@ -472,12 +475,14 @@
                               'os-virtual-interfaces']))
         body = json.loads(body)
         self.validate_response(schema.list_virtual_interfaces, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def rescue_server(self, server_id, **kwargs):
         """Rescue the provided server."""
         return self.action(server_id, 'rescue', 'adminPass',
-                           schema.rescue_server, **kwargs)
+                           schema.rescue_server,
+                           response_class=service_client.ResponseBodyData,
+                           **kwargs)
 
     def unrescue_server(self, server_id):
         """Unrescue the provided server."""
@@ -486,7 +491,7 @@
     def get_server_diagnostics(self, server_id):
         """Get the usage data for a server."""
         resp, body = self.get("servers/%s/diagnostics" % str(server_id))
-        return resp, json.loads(body)
+        return service_client.ResponseBody(resp, json.loads(body))
 
     def list_instance_actions(self, server_id):
         """List the provided server action."""
@@ -494,7 +499,7 @@
                               str(server_id))
         body = json.loads(body)
         self.validate_response(schema.list_instance_actions, resp, body)
-        return resp, body['instanceActions']
+        return service_client.ResponseBodyList(resp, body['instanceActions'])
 
     def get_instance_action(self, server_id, request_id):
         """Returns the action details of the provided server."""
@@ -502,7 +507,7 @@
                               (str(server_id), str(request_id)))
         body = json.loads(body)
         self.validate_response(schema.get_instance_action, resp, body)
-        return resp, body['instanceAction']
+        return service_client.ResponseBody(resp, body['instanceAction'])
 
     def force_delete_server(self, server_id, **kwargs):
         """Force delete a server."""
@@ -542,24 +547,24 @@
 
         body = json.loads(body)
         self.validate_response(schema.create_get_server_group, resp, body)
-        return resp, body['server_group']
+        return service_client.ResponseBody(resp, body['server_group'])
 
     def delete_server_group(self, server_group_id):
         """Delete the given server-group."""
         resp, body = self.delete("os-server-groups/%s" % str(server_group_id))
         self.validate_response(schema.delete_server_group, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def list_server_groups(self):
         """List the server-groups."""
         resp, body = self.get("os-server-groups")
         body = json.loads(body)
         self.validate_response(schema.list_server_groups, resp, body)
-        return resp, body['server_groups']
+        return service_client.ResponseBodyList(resp, body['server_groups'])
 
     def get_server_group(self, server_group_id):
         """Get the details of given server_group."""
         resp, body = self.get("os-server-groups/%s" % str(server_group_id))
         body = json.loads(body)
         self.validate_response(schema.create_get_server_group, resp, body)
-        return resp, body['server_group']
+        return service_client.ResponseBody(resp, body['server_group'])
diff --git a/tempest/stress/cleanup.py b/tempest/stress/cleanup.py
index 86325f5..161d93f 100644
--- a/tempest/stress/cleanup.py
+++ b/tempest/stress/cleanup.py
@@ -23,7 +23,7 @@
 def cleanup():
     admin_manager = clients.AdminManager()
 
-    _, body = admin_manager.servers_client.list_servers({"all_tenants": True})
+    body = admin_manager.servers_client.list_servers({"all_tenants": True})
     LOG.info("Cleanup::remove %s servers" % len(body['servers']))
     for s in body['servers']:
         try:
