diff --git a/tempest/api/compute/admin/test_agents.py b/tempest/api/compute/admin/test_agents.py
index 3bdcfd6..425ce13 100644
--- a/tempest/api/compute/admin/test_agents.py
+++ b/tempest/api/compute/admin/test_agents.py
@@ -37,8 +37,7 @@
             hypervisor='common', os='linux', architecture='x86_64',
             version='7.0', url='xxx://xxxx/xxx/xxx',
             md5hash='add6bb58e139be103324d04d82d8f545')
-        resp, body = self.client.create_agent(**params)
-        self.assertEqual(200, resp.status)
+        body = self.client.create_agent(**params)
         self.agent_id = body['agent_id']
 
     def tearDown(self):
@@ -67,8 +66,7 @@
             hypervisor='kvm', os='win', architecture='x86',
             version='7.0', url='xxx://xxxx/xxx/xxx',
             md5hash='add6bb58e139be103324d04d82d8f545')
-        resp, body = self.client.create_agent(**params)
-        self.assertEqual(200, resp.status)
+        body = self.client.create_agent(**params)
         self.addCleanup(self.client.delete_agent, body['agent_id'])
         for expected_item, value in params.items():
             self.assertEqual(value, body[expected_item])
@@ -79,27 +77,23 @@
         params = self._param_helper(
             version='8.0', url='xxx://xxxx/xxx/xxx2',
             md5hash='add6bb58e139be103324d04d82d8f547')
-        resp, body = self.client.update_agent(self.agent_id, **params)
-        self.assertEqual(200, resp.status)
+        body = self.client.update_agent(self.agent_id, **params)
         for expected_item, value in params.items():
             self.assertEqual(value, body[expected_item])
 
     @test.attr(type='gate')
     def test_delete_agent(self):
         # Delete an agent.
-        resp, _ = self.client.delete_agent(self.agent_id)
-        self.assertEqual(200, resp.status)
+        self.client.delete_agent(self.agent_id)
 
         # Verify the list doesn't contain the deleted agent.
-        resp, agents = self.client.list_agents()
-        self.assertEqual(200, resp.status)
+        agents = self.client.list_agents()
         self.assertNotIn(self.agent_id, map(lambda x: x['agent_id'], agents))
 
     @test.attr(type='gate')
     def test_list_agents(self):
         # List all agents.
-        resp, agents = self.client.list_agents()
-        self.assertEqual(200, resp.status)
+        agents = self.client.list_agents()
         self.assertTrue(len(agents) > 0, 'Cannot get any agents.(%s)' % agents)
         self.assertIn(self.agent_id, map(lambda x: x['agent_id'], agents))
 
@@ -110,14 +104,12 @@
             hypervisor='xen', os='linux', architecture='x86',
             version='7.0', url='xxx://xxxx/xxx/xxx1',
             md5hash='add6bb58e139be103324d04d82d8f546')
-        resp, agent_xen = self.client.create_agent(**params)
-        self.assertEqual(200, resp.status)
+        agent_xen = self.client.create_agent(**params)
         self.addCleanup(self.client.delete_agent, agent_xen['agent_id'])
 
         agent_id_xen = agent_xen['agent_id']
         params_filter = {'hypervisor': agent_xen['hypervisor']}
-        resp, agents = self.client.list_agents(params_filter)
-        self.assertEqual(200, resp.status)
+        agents = self.client.list_agents(params_filter)
         self.assertTrue(len(agents) > 0, 'Cannot get any agents.(%s)' % agents)
         self.assertIn(agent_id_xen, map(lambda x: x['agent_id'], agents))
         self.assertNotIn(self.agent_id, map(lambda x: x['agent_id'], agents))
diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py
index 7c2e604..a866ede 100644
--- a/tempest/api/compute/admin/test_aggregates.py
+++ b/tempest/api/compute/admin/test_aggregates.py
@@ -35,7 +35,7 @@
         cls.aggregate_name_prefix = 'test_aggregate_'
         cls.az_name_prefix = 'test_az_'
 
-        resp, hosts_all = cls.os_adm.hosts_client.list_hosts()
+        hosts_all = cls.os_adm.hosts_client.list_hosts()
         hosts = map(lambda x: x['host_name'],
                     filter(lambda y: y['service'] == 'compute', hosts_all))
         cls.host = hosts[0]
@@ -52,14 +52,12 @@
     def test_aggregate_create_delete(self):
         # Create and delete an aggregate.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self._try_delete_aggregate, aggregate['id'])
-        self.assertEqual(200, resp.status)
         self.assertEqual(aggregate_name, aggregate['name'])
         self.assertIsNone(aggregate['availability_zone'])
 
-        resp, _ = self.client.delete_aggregate(aggregate['id'])
-        self.assertEqual(200, resp.status)
+        self.client.delete_aggregate(aggregate['id'])
         self.client.wait_for_resource_deletion(aggregate['id'])
 
     @test.attr(type='gate')
@@ -67,26 +65,23 @@
         # Create and delete an aggregate.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
         az_name = data_utils.rand_name(self.az_name_prefix)
-        resp, aggregate = self.client.create_aggregate(
+        aggregate = self.client.create_aggregate(
             name=aggregate_name, availability_zone=az_name)
         self.addCleanup(self._try_delete_aggregate, aggregate['id'])
-        self.assertEqual(200, resp.status)
         self.assertEqual(aggregate_name, aggregate['name'])
         self.assertEqual(az_name, aggregate['availability_zone'])
 
-        resp, _ = self.client.delete_aggregate(aggregate['id'])
-        self.assertEqual(200, resp.status)
+        self.client.delete_aggregate(aggregate['id'])
         self.client.wait_for_resource_deletion(aggregate['id'])
 
     @test.attr(type='gate')
     def test_aggregate_create_verify_entry_in_list(self):
         # Create an aggregate and ensure it is listed.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        resp, aggregates = self.client.list_aggregates()
-        self.assertEqual(200, resp.status)
+        aggregates = self.client.list_aggregates()
         self.assertIn((aggregate['id'], aggregate['availability_zone']),
                       map(lambda x: (x['id'], x['availability_zone']),
                           aggregates))
@@ -95,11 +90,10 @@
     def test_aggregate_create_update_metadata_get_details(self):
         # Create an aggregate and ensure its details are returned.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        resp, body = self.client.get_aggregate(aggregate['id'])
-        self.assertEqual(200, resp.status)
+        body = self.client.get_aggregate(aggregate['id'])
         self.assertEqual(aggregate['name'], body['name'])
         self.assertEqual(aggregate['availability_zone'],
                          body['availability_zone'])
@@ -107,13 +101,11 @@
 
         # set the metadata of the aggregate
         meta = {"key": "value"}
-        resp, body = self.client.set_metadata(aggregate['id'], meta)
-        self.assertEqual(200, resp.status)
+        body = self.client.set_metadata(aggregate['id'], meta)
         self.assertEqual(meta, body["metadata"])
 
         # verify the metadata has been set
-        resp, body = self.client.get_aggregate(aggregate['id'])
-        self.assertEqual(200, resp.status)
+        body = self.client.get_aggregate(aggregate['id'])
         self.assertEqual(meta, body["metadata"])
 
     @test.attr(type='gate')
@@ -121,11 +113,10 @@
         # Update an aggregate and ensure properties are updated correctly
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
         az_name = data_utils.rand_name(self.az_name_prefix)
-        resp, aggregate = self.client.create_aggregate(
+        aggregate = self.client.create_aggregate(
             name=aggregate_name, availability_zone=az_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        self.assertEqual(200, resp.status)
         self.assertEqual(aggregate_name, aggregate['name'])
         self.assertEqual(az_name, aggregate['availability_zone'])
         self.assertIsNotNone(aggregate['id'])
@@ -134,15 +125,13 @@
         new_aggregate_name = aggregate_name + '_new'
         new_az_name = az_name + '_new'
 
-        resp, resp_aggregate = self.client.update_aggregate(aggregate_id,
-                                                            new_aggregate_name,
-                                                            new_az_name)
-        self.assertEqual(200, resp.status)
+        resp_aggregate = self.client.update_aggregate(aggregate_id,
+                                                      new_aggregate_name,
+                                                      new_az_name)
         self.assertEqual(new_aggregate_name, resp_aggregate['name'])
         self.assertEqual(new_az_name, resp_aggregate['availability_zone'])
 
-        resp, aggregates = self.client.list_aggregates()
-        self.assertEqual(200, resp.status)
+        aggregates = self.client.list_aggregates()
         self.assertIn((aggregate_id, new_aggregate_name, new_az_name),
                       map(lambda x:
                           (x['id'], x['name'], x['availability_zone']),
@@ -153,18 +142,16 @@
         # Add an host to the given aggregate and remove.
         self.useFixture(fixtures.LockFixture('availability_zone'))
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        resp, body = self.client.add_host(aggregate['id'], self.host)
-        self.assertEqual(200, resp.status)
+        body = self.client.add_host(aggregate['id'], self.host)
         self.assertEqual(aggregate_name, body['name'])
         self.assertEqual(aggregate['availability_zone'],
                          body['availability_zone'])
         self.assertIn(self.host, body['hosts'])
 
-        resp, body = self.client.remove_host(aggregate['id'], self.host)
-        self.assertEqual(200, resp.status)
+        body = self.client.remove_host(aggregate['id'], self.host)
         self.assertEqual(aggregate_name, body['name'])
         self.assertEqual(aggregate['availability_zone'],
                          body['availability_zone'])
@@ -175,12 +162,12 @@
         # Add an host to the given aggregate and list.
         self.useFixture(fixtures.LockFixture('availability_zone'))
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
         self.client.add_host(aggregate['id'], self.host)
         self.addCleanup(self.client.remove_host, aggregate['id'], self.host)
 
-        resp, aggregates = self.client.list_aggregates()
+        aggregates = self.client.list_aggregates()
         aggs = filter(lambda x: x['id'] == aggregate['id'], aggregates)
         self.assertEqual(1, len(aggs))
         agg = aggs[0]
@@ -193,12 +180,12 @@
         # Add an host to the given aggregate and get details.
         self.useFixture(fixtures.LockFixture('availability_zone'))
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
         self.client.add_host(aggregate['id'], self.host)
         self.addCleanup(self.client.remove_host, aggregate['id'], self.host)
 
-        resp, body = self.client.get_aggregate(aggregate['id'])
+        body = self.client.get_aggregate(aggregate['id'])
         self.assertEqual(aggregate_name, body['name'])
         self.assertIsNone(body['availability_zone'])
         self.assertIn(self.host, body['hosts'])
@@ -209,7 +196,7 @@
         self.useFixture(fixtures.LockFixture('availability_zone'))
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
         az_name = data_utils.rand_name(self.az_name_prefix)
-        resp, aggregate = self.client.create_aggregate(
+        aggregate = self.client.create_aggregate(
             name=aggregate_name, availability_zone=az_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
         self.client.add_host(aggregate['id'], self.host)
diff --git a/tempest/api/compute/admin/test_aggregates_negative.py b/tempest/api/compute/admin/test_aggregates_negative.py
index 219d12e..a450e5d 100644
--- a/tempest/api/compute/admin/test_aggregates_negative.py
+++ b/tempest/api/compute/admin/test_aggregates_negative.py
@@ -34,7 +34,7 @@
         cls.aggregate_name_prefix = 'test_aggregate_'
         cls.az_name_prefix = 'test_az_'
 
-        resp, hosts_all = cls.os_adm.hosts_client.list_hosts()
+        hosts_all = cls.os_adm.hosts_client.list_hosts()
         hosts = map(lambda x: x['host_name'],
                     filter(lambda y: y['service'] == 'compute', hosts_all))
         cls.host = hosts[0]
@@ -66,8 +66,7 @@
     def test_aggregate_create_with_existent_aggregate_name(self):
         # creating an aggregate with existent aggregate name is forbidden
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
-        self.assertEqual(200, resp.status)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
         self.assertRaises(exceptions.Conflict,
@@ -78,8 +77,7 @@
     def test_aggregate_delete_as_user(self):
         # Regular user is not allowed to delete an aggregate.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
-        self.assertEqual(200, resp.status)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
         self.assertRaises(exceptions.Unauthorized,
@@ -96,8 +94,7 @@
     def test_aggregate_get_details_as_user(self):
         # Regular user is not allowed to get aggregate details.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
-        self.assertEqual(200, resp.status)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
         self.assertRaises(exceptions.Unauthorized,
@@ -119,7 +116,7 @@
     @test.attr(type=['negative', 'gate'])
     def test_aggregate_add_non_exist_host(self):
         # Adding a non-exist host to an aggregate should raise exceptions.
-        resp, hosts_all = self.os_adm.hosts_client.list_hosts()
+        hosts_all = self.os_adm.hosts_client.list_hosts()
         hosts = map(lambda x: x['host_name'], hosts_all)
         while True:
             non_exist_host = data_utils.rand_name('nonexist_host_')
@@ -127,7 +124,7 @@
                 break
 
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
         self.assertRaises(exceptions.NotFound, self.client.add_host,
@@ -137,8 +134,7 @@
     def test_aggregate_add_host_as_user(self):
         # Regular user is not allowed to add a host to an aggregate.
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
-        self.assertEqual(200, resp.status)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
         self.assertRaises(exceptions.Unauthorized,
@@ -149,12 +145,10 @@
     def test_aggregate_add_existent_host(self):
         self.useFixture(fixtures.LockFixture('availability_zone'))
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
-        self.assertEqual(200, resp.status)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
-        resp, body = self.client.add_host(aggregate['id'], self.host)
-        self.assertEqual(200, resp.status)
+        self.client.add_host(aggregate['id'], self.host)
         self.addCleanup(self.client.remove_host, aggregate['id'], self.host)
 
         self.assertRaises(exceptions.Conflict, self.client.add_host,
@@ -165,11 +159,9 @@
         # Regular user is not allowed to remove a host from an aggregate.
         self.useFixture(fixtures.LockFixture('availability_zone'))
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
-        self.assertEqual(200, resp.status)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
-        resp, body = self.client.add_host(aggregate['id'], self.host)
-        self.assertEqual(200, resp.status)
+        self.client.add_host(aggregate['id'], self.host)
         self.addCleanup(self.client.remove_host, aggregate['id'], self.host)
 
         self.assertRaises(exceptions.Unauthorized,
@@ -180,8 +172,7 @@
     def test_aggregate_remove_nonexistent_host(self):
         non_exist_host = data_utils.rand_name('nonexist_host_')
         aggregate_name = data_utils.rand_name(self.aggregate_name_prefix)
-        resp, aggregate = self.client.create_aggregate(name=aggregate_name)
-        self.assertEqual(200, resp.status)
+        aggregate = self.client.create_aggregate(name=aggregate_name)
         self.addCleanup(self.client.delete_aggregate, aggregate['id'])
 
         self.assertRaises(exceptions.NotFound, self.client.remove_host,
diff --git a/tempest/api/compute/admin/test_hosts.py b/tempest/api/compute/admin/test_hosts.py
index 25965fd..b9d47bb 100644
--- a/tempest/api/compute/admin/test_hosts.py
+++ b/tempest/api/compute/admin/test_hosts.py
@@ -30,19 +30,17 @@
 
     @test.attr(type='gate')
     def test_list_hosts(self):
-        resp, hosts = self.client.list_hosts()
-        self.assertEqual(200, resp.status)
+        hosts = self.client.list_hosts()
         self.assertTrue(len(hosts) >= 2, str(hosts))
 
     @test.attr(type='gate')
     def test_list_hosts_with_zone(self):
         self.useFixture(fixtures.LockFixture('availability_zone'))
-        resp, hosts = self.client.list_hosts()
+        hosts = self.client.list_hosts()
         host = hosts[0]
         zone_name = host['zone']
         params = {'zone': zone_name}
-        resp, hosts = self.client.list_hosts(params)
-        self.assertEqual(200, resp.status)
+        hosts = self.client.list_hosts(params)
         self.assertTrue(len(hosts) >= 1)
         self.assertIn(host, hosts)
 
@@ -51,31 +49,27 @@
         # If send the request with a blank zone, the request will be successful
         # and it will return all the hosts list
         params = {'zone': ''}
-        resp, hosts = self.client.list_hosts(params)
+        hosts = self.client.list_hosts(params)
         self.assertNotEqual(0, len(hosts))
-        self.assertEqual(200, resp.status)
 
     @test.attr(type='gate')
     def test_list_hosts_with_nonexistent_zone(self):
         # If send the request with a nonexistent zone, the request will be
         # successful and no hosts will be retured
         params = {'zone': 'xxx'}
-        resp, hosts = self.client.list_hosts(params)
+        hosts = self.client.list_hosts(params)
         self.assertEqual(0, len(hosts))
-        self.assertEqual(200, resp.status)
 
     @test.attr(type='gate')
     def test_show_host_detail(self):
-        resp, hosts = self.client.list_hosts()
-        self.assertEqual(200, resp.status)
+        hosts = self.client.list_hosts()
 
         hosts = [host for host in hosts if host['service'] == 'compute']
         self.assertTrue(len(hosts) >= 1)
 
         for host in hosts:
             hostname = host['host_name']
-            resp, resources = self.client.show_host_detail(hostname)
-            self.assertEqual(200, resp.status)
+            resources = self.client.show_host_detail(hostname)
             self.assertTrue(len(resources) >= 1)
             host_resource = resources[0]['resource']
             self.assertIsNotNone(host_resource)
diff --git a/tempest/api/compute/admin/test_hosts_negative.py b/tempest/api/compute/admin/test_hosts_negative.py
index 055219f..fc918a3 100644
--- a/tempest/api/compute/admin/test_hosts_negative.py
+++ b/tempest/api/compute/admin/test_hosts_negative.py
@@ -31,8 +31,7 @@
         cls.non_admin_client = cls.os.hosts_client
 
     def _get_host_name(self):
-        resp, hosts = self.client.list_hosts()
-        self.assertEqual(200, resp.status)
+        hosts = self.client.list_hosts()
         self.assertTrue(len(hosts) >= 1)
         hostname = hosts[0]['host_name']
         return hostname
diff --git a/tempest/api/compute/admin/test_hypervisor.py b/tempest/api/compute/admin/test_hypervisor.py
index de3debb..fbfef87 100644
--- a/tempest/api/compute/admin/test_hypervisor.py
+++ b/tempest/api/compute/admin/test_hypervisor.py
@@ -30,8 +30,7 @@
 
     def _list_hypervisors(self):
         # List of hypervisors
-        resp, hypers = self.client.get_hypervisor_list()
-        self.assertEqual(200, resp.status)
+        hypers = self.client.get_hypervisor_list()
         return hypers
 
     def assertHypervisors(self, hypers):
@@ -46,8 +45,7 @@
     @test.attr(type='gate')
     def test_get_hypervisor_list_details(self):
         # Display the details of the all hypervisor
-        resp, hypers = self.client.get_hypervisor_list_details()
-        self.assertEqual(200, resp.status)
+        hypers = self.client.get_hypervisor_list_details()
         self.assertHypervisors(hypers)
 
     @test.attr(type='gate')
@@ -56,9 +54,7 @@
         hypers = self._list_hypervisors()
         self.assertHypervisors(hypers)
 
-        resp, details = (self.client.
-                         get_hypervisor_show_details(hypers[0]['id']))
-        self.assertEqual(200, resp.status)
+        details = self.client.get_hypervisor_show_details(hypers[0]['id'])
         self.assertTrue(len(details) > 0)
         self.assertEqual(details['hypervisor_hostname'],
                          hypers[0]['hypervisor_hostname'])
@@ -70,15 +66,13 @@
         self.assertHypervisors(hypers)
 
         hostname = hypers[0]['hypervisor_hostname']
-        resp, hypervisors = self.client.get_hypervisor_servers(hostname)
-        self.assertEqual(200, resp.status)
+        hypervisors = self.client.get_hypervisor_servers(hostname)
         self.assertTrue(len(hypervisors) > 0)
 
     @test.attr(type='gate')
     def test_get_hypervisor_stats(self):
         # Verify the stats of the all hypervisor
-        resp, stats = self.client.get_hypervisor_stats()
-        self.assertEqual(200, resp.status)
+        stats = self.client.get_hypervisor_stats()
         self.assertTrue(len(stats) > 0)
 
     @test.attr(type='gate')
@@ -94,9 +88,7 @@
         ironic_only = True
         hypers_without_ironic = []
         for hyper in hypers:
-            resp, details = (self.client.
-                             get_hypervisor_show_details(hypers[0]['id']))
-            self.assertEqual(200, resp.status)
+            details = self.client.get_hypervisor_show_details(hypers[0]['id'])
             if details['hypervisor_type'] != 'ironic':
                 hypers_without_ironic.append(hyper)
                 ironic_only = False
@@ -110,8 +102,8 @@
             # because hypervisors might be disabled, this loops looking
             # for any good hit.
             try:
-                resp, uptime = self.client.get_hypervisor_uptime(hyper['id'])
-                if (resp.status == 200) and (len(uptime) > 0):
+                uptime = self.client.get_hypervisor_uptime(hyper['id'])
+                if len(uptime) > 0:
                     has_valid_uptime = True
                     break
             except Exception:
@@ -124,7 +116,6 @@
     def test_search_hypervisor(self):
         hypers = self._list_hypervisors()
         self.assertHypervisors(hypers)
-        resp, hypers = self.client.search_hypervisor(
+        hypers = self.client.search_hypervisor(
             hypers[0]['hypervisor_hostname'])
-        self.assertEqual(200, resp.status)
         self.assertHypervisors(hypers)
diff --git a/tempest/api/compute/admin/test_hypervisor_negative.py b/tempest/api/compute/admin/test_hypervisor_negative.py
index b1f2351..a137a61 100644
--- a/tempest/api/compute/admin/test_hypervisor_negative.py
+++ b/tempest/api/compute/admin/test_hypervisor_negative.py
@@ -35,8 +35,7 @@
 
     def _list_hypervisors(self):
         # List of hypervisors
-        resp, hypers = self.client.get_hypervisor_list()
-        self.assertEqual(200, resp.status)
+        hypers = self.client.get_hypervisor_list()
         return hypers
 
     @test.attr(type=['negative', 'gate'])
diff --git a/tempest/api/compute/admin/test_services.py b/tempest/api/compute/admin/test_services.py
index e7a39f8..5cf4a31 100644
--- a/tempest/api/compute/admin/test_services.py
+++ b/tempest/api/compute/admin/test_services.py
@@ -31,29 +31,27 @@
 
     @test.attr(type='gate')
     def test_list_services(self):
-        resp, services = self.client.list_services()
-        self.assertEqual(200, resp.status)
+        services = self.client.list_services()
         self.assertNotEqual(0, len(services))
 
     @test.attr(type='gate')
     def test_get_service_by_service_binary_name(self):
         binary_name = 'nova-compute'
         params = {'binary': binary_name}
-        resp, services = self.client.list_services(params)
-        self.assertEqual(200, resp.status)
+        services = self.client.list_services(params)
         self.assertNotEqual(0, len(services))
         for service in services:
             self.assertEqual(binary_name, service['binary'])
 
     @test.attr(type='gate')
     def test_get_service_by_host_name(self):
-        resp, services = self.client.list_services()
+        services = self.client.list_services()
         host_name = services[0]['host']
         services_on_host = [service for service in services if
                             service['host'] == host_name]
         params = {'host': host_name}
 
-        resp, services = self.client.list_services(params)
+        services = self.client.list_services(params)
 
         # we could have a periodic job checkin between the 2 service
         # lookups, so only compare binary lists.
@@ -66,13 +64,12 @@
 
     @test.attr(type='gate')
     def test_get_service_by_service_and_host_name(self):
-        resp, services = self.client.list_services()
+        services = self.client.list_services()
         host_name = services[0]['host']
         binary_name = services[0]['binary']
         params = {'host': host_name, 'binary': binary_name}
 
-        resp, services = self.client.list_services(params)
-        self.assertEqual(200, resp.status)
+        services = self.client.list_services(params)
         self.assertEqual(1, len(services))
         self.assertEqual(host_name, services[0]['host'])
         self.assertEqual(binary_name, services[0]['binary'])
diff --git a/tempest/api/compute/admin/test_services_negative.py b/tempest/api/compute/admin/test_services_negative.py
index 534afc5..bb19a39 100644
--- a/tempest/api/compute/admin/test_services_negative.py
+++ b/tempest/api/compute/admin/test_services_negative.py
@@ -37,26 +37,23 @@
     @test.attr(type=['negative', 'gate'])
     def test_get_service_by_invalid_params(self):
         # return all services if send the request with invalid parameter
-        resp, services = self.client.list_services()
+        services = self.client.list_services()
         params = {'xxx': 'nova-compute'}
-        resp, services_xxx = self.client.list_services(params)
-        self.assertEqual(200, resp.status)
+        services_xxx = self.client.list_services(params)
         self.assertEqual(len(services), len(services_xxx))
 
     @test.attr(type=['negative', 'gate'])
     def test_get_service_by_invalid_service_and_valid_host(self):
-        resp, services = self.client.list_services()
+        services = self.client.list_services()
         host_name = services[0]['host']
         params = {'host': host_name, 'binary': 'xxx'}
-        resp, services = self.client.list_services(params)
-        self.assertEqual(200, resp.status)
+        services = self.client.list_services(params)
         self.assertEqual(0, len(services))
 
     @test.attr(type=['negative', 'gate'])
     def test_get_service_with_valid_service_and_invalid_host(self):
-        resp, services = self.client.list_services()
+        services = self.client.list_services()
         binary_name = services[0]['binary']
         params = {'host': 'xxx', 'binary': binary_name}
-        resp, services = self.client.list_services(params)
-        self.assertEqual(200, resp.status)
+        services = self.client.list_services(params)
         self.assertEqual(0, len(services))
diff --git a/tempest/api/compute/test_live_block_migration.py b/tempest/api/compute/test_live_block_migration.py
index cb75d07..e04439f 100644
--- a/tempest/api/compute/test_live_block_migration.py
+++ b/tempest/api/compute/test_live_block_migration.py
@@ -36,7 +36,7 @@
         cls.created_server_ids = []
 
     def _get_compute_hostnames(self):
-        _resp, body = self.admin_hosts_client.list_hosts()
+        body = self.admin_hosts_client.list_hosts()
         return [
             host_record['host_name']
             for host_record in body
diff --git a/tempest/scenario/test_aggregates_basic_ops.py b/tempest/scenario/test_aggregates_basic_ops.py
index 75769ce..469ac4a 100644
--- a/tempest/scenario/test_aggregates_basic_ops.py
+++ b/tempest/scenario/test_aggregates_basic_ops.py
@@ -43,7 +43,7 @@
         return cls.admin_credentials()
 
     def _create_aggregate(self, **kwargs):
-        _, aggregate = self.aggregates_client.create_aggregate(**kwargs)
+        aggregate = self.aggregates_client.create_aggregate(**kwargs)
         self.addCleanup(self._delete_aggregate, aggregate)
         aggregate_name = kwargs['name']
         availability_zone = kwargs['availability_zone']
@@ -55,23 +55,23 @@
         self.aggregates_client.delete_aggregate(aggregate['id'])
 
     def _get_host_name(self):
-        _, hosts = self.hosts_client.list_hosts()
+        hosts = self.hosts_client.list_hosts()
         self.assertTrue(len(hosts) >= 1)
         computes = [x for x in hosts if x['service'] == 'compute']
         return computes[0]['host_name']
 
     def _add_host(self, aggregate_id, host):
-        _, aggregate = self.aggregates_client.add_host(aggregate_id, host)
+        aggregate = self.aggregates_client.add_host(aggregate_id, host)
         self.addCleanup(self._remove_host, aggregate['id'], host)
         self.assertIn(host, aggregate['hosts'])
 
     def _remove_host(self, aggregate_id, host):
-        _, aggregate = self.aggregates_client.remove_host(aggregate_id, host)
+        aggregate = self.aggregates_client.remove_host(aggregate_id, host)
         self.assertNotIn(host, aggregate['hosts'])
 
     def _check_aggregate_details(self, aggregate, aggregate_name, azone,
                                  hosts, metadata):
-        _, aggregate = self.aggregates_client.get_aggregate(aggregate['id'])
+        aggregate = self.aggregates_client.get_aggregate(aggregate['id'])
         self.assertEqual(aggregate_name, aggregate['name'])
         self.assertEqual(azone, aggregate['availability_zone'])
         self.assertEqual(hosts, aggregate['hosts'])
@@ -81,15 +81,15 @@
                              aggregate['metadata'][meta_key])
 
     def _set_aggregate_metadata(self, aggregate, meta):
-        _, aggregate = self.aggregates_client.set_metadata(aggregate['id'],
-                                                           meta)
+        aggregate = self.aggregates_client.set_metadata(aggregate['id'],
+                                                        meta)
 
         for key, value in meta.items():
             self.assertEqual(meta[key], aggregate['metadata'][key])
 
     def _update_aggregate(self, aggregate, aggregate_name,
                           availability_zone):
-        _, aggregate = self.aggregates_client.update_aggregate(
+        aggregate = self.aggregates_client.update_aggregate(
             aggregate['id'], name=aggregate_name,
             availability_zone=availability_zone)
         self.assertEqual(aggregate['name'], aggregate_name)
diff --git a/tempest/services/compute/json/agents_client.py b/tempest/services/compute/json/agents_client.py
index eacd367..95d7880 100644
--- a/tempest/services/compute/json/agents_client.py
+++ b/tempest/services/compute/json/agents_client.py
@@ -17,6 +17,7 @@
 
 from tempest.api_schema.response.compute import agents as common_schema
 from tempest.api_schema.response.compute.v2 import agents as schema
+from tempest.common import service_client
 from tempest.services.compute.json import base
 
 
@@ -33,7 +34,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(common_schema.list_agents, resp, body)
-        return resp, body['agents']
+        return service_client.ResponseBodyList(resp, body['agents'])
 
     def create_agent(self, **kwargs):
         """Create an agent build."""
@@ -41,16 +42,16 @@
         resp, body = self.post('os-agents', post_body)
         body = json.loads(body)
         self.validate_response(schema.create_agent, resp, body)
-        return resp, body['agent']
+        return service_client.ResponseBody(resp, body['agent'])
 
     def delete_agent(self, agent_id):
         """Delete an existing agent build."""
         resp, body = self.delete("os-agents/%s" % str(agent_id))
         self.validate_response(schema.delete_agent, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def update_agent(self, agent_id, **kwargs):
         """Update an agent build."""
         put_body = json.dumps({'para': kwargs})
         resp, body = self.put('os-agents/%s' % str(agent_id), put_body)
-        return resp, self._parse_resp(body)
+        return service_client.ResponseBody(resp, self._parse_resp(body))
diff --git a/tempest/services/compute/json/aggregates_client.py b/tempest/services/compute/json/aggregates_client.py
index 1539259..47dd401 100644
--- a/tempest/services/compute/json/aggregates_client.py
+++ b/tempest/services/compute/json/aggregates_client.py
@@ -17,6 +17,7 @@
 
 from tempest.api_schema.response.compute import aggregates as schema
 from tempest.api_schema.response.compute.v2 import aggregates as v2_schema
+from tempest.common import service_client
 from tempest import exceptions
 from tempest.services.compute.json import base
 
@@ -28,14 +29,14 @@
         resp, body = self.get("os-aggregates")
         body = json.loads(body)
         self.validate_response(schema.list_aggregates, resp, body)
-        return resp, body['aggregates']
+        return service_client.ResponseBodyList(resp, body['aggregates'])
 
     def get_aggregate(self, aggregate_id):
         """Get details of the given aggregate."""
         resp, body = self.get("os-aggregates/%s" % str(aggregate_id))
         body = json.loads(body)
         self.validate_response(schema.get_aggregate, resp, body)
-        return resp, body['aggregate']
+        return service_client.ResponseBody(resp, body['aggregate'])
 
     def create_aggregate(self, **kwargs):
         """Creates a new aggregate."""
@@ -44,7 +45,7 @@
 
         body = json.loads(body)
         self.validate_response(v2_schema.create_aggregate, resp, body)
-        return resp, body['aggregate']
+        return service_client.ResponseBody(resp, body['aggregate'])
 
     def update_aggregate(self, aggregate_id, name, availability_zone=None):
         """Update a aggregate."""
@@ -57,13 +58,13 @@
 
         body = json.loads(body)
         self.validate_response(schema.update_aggregate, resp, body)
-        return resp, body['aggregate']
+        return service_client.ResponseBody(resp, body['aggregate'])
 
     def delete_aggregate(self, aggregate_id):
         """Deletes the given aggregate."""
         resp, body = self.delete("os-aggregates/%s" % str(aggregate_id))
         self.validate_response(v2_schema.delete_aggregate, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def is_resource_deleted(self, id):
         try:
@@ -87,7 +88,7 @@
                                post_body)
         body = json.loads(body)
         self.validate_response(schema.aggregate_add_remove_host, resp, body)
-        return resp, body['aggregate']
+        return service_client.ResponseBody(resp, body['aggregate'])
 
     def remove_host(self, aggregate_id, host):
         """Removes a host from the given aggregate."""
@@ -99,7 +100,7 @@
                                post_body)
         body = json.loads(body)
         self.validate_response(schema.aggregate_add_remove_host, resp, body)
-        return resp, body['aggregate']
+        return service_client.ResponseBody(resp, body['aggregate'])
 
     def set_metadata(self, aggregate_id, meta):
         """Replaces the aggregate's existing metadata with new metadata."""
@@ -111,4 +112,4 @@
                                post_body)
         body = json.loads(body)
         self.validate_response(schema.aggregate_set_metadata, resp, body)
-        return resp, body['aggregate']
+        return service_client.ResponseBody(resp, body['aggregate'])
diff --git a/tempest/services/compute/json/hosts_client.py b/tempest/services/compute/json/hosts_client.py
index 5d306f9..f4e1f12 100644
--- a/tempest/services/compute/json/hosts_client.py
+++ b/tempest/services/compute/json/hosts_client.py
@@ -17,6 +17,7 @@
 
 from tempest.api_schema.response.compute import hosts as schema
 from tempest.api_schema.response.compute.v2 import hosts as v2_schema
+from tempest.common import service_client
 from tempest.services.compute.json import base
 
 
@@ -32,7 +33,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.list_hosts, resp, body)
-        return resp, body['hosts']
+        return service_client.ResponseBodyList(resp, body['hosts'])
 
     def show_host_detail(self, hostname):
         """Show detail information for the host."""
@@ -40,7 +41,7 @@
         resp, body = self.get("os-hosts/%s" % str(hostname))
         body = json.loads(body)
         self.validate_response(schema.show_host_detail, resp, body)
-        return resp, body['host']
+        return service_client.ResponseBodyList(resp, body['host'])
 
     def update_host(self, hostname, **kwargs):
         """Update a host."""
@@ -55,7 +56,7 @@
         resp, body = self.put("os-hosts/%s" % str(hostname), request_body)
         body = json.loads(body)
         self.validate_response(v2_schema.update_host, resp, body)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def startup_host(self, hostname):
         """Startup a host."""
@@ -63,7 +64,7 @@
         resp, body = self.get("os-hosts/%s/startup" % str(hostname))
         body = json.loads(body)
         self.validate_response(v2_schema.startup_host, resp, body)
-        return resp, body['host']
+        return service_client.ResponseBody(resp, body['host'])
 
     def shutdown_host(self, hostname):
         """Shutdown a host."""
@@ -71,7 +72,7 @@
         resp, body = self.get("os-hosts/%s/shutdown" % str(hostname))
         body = json.loads(body)
         self.validate_response(v2_schema.shutdown_host, resp, body)
-        return resp, body['host']
+        return service_client.ResponseBody(resp, body['host'])
 
     def reboot_host(self, hostname):
         """reboot a host."""
@@ -79,4 +80,4 @@
         resp, body = self.get("os-hosts/%s/reboot" % str(hostname))
         body = json.loads(body)
         self.validate_response(v2_schema.reboot_host, resp, body)
-        return resp, body['host']
+        return service_client.ResponseBody(resp, body['host'])
diff --git a/tempest/services/compute/json/hypervisor_client.py b/tempest/services/compute/json/hypervisor_client.py
index 52b50c8..37be874 100644
--- a/tempest/services/compute/json/hypervisor_client.py
+++ b/tempest/services/compute/json/hypervisor_client.py
@@ -17,6 +17,7 @@
 
 from tempest.api_schema.response.compute import hypervisors as common_schema
 from tempest.api_schema.response.compute.v2 import hypervisors as v2schema
+from tempest.common import service_client
 from tempest.services.compute.json import base
 
 
@@ -28,7 +29,7 @@
         body = json.loads(body)
         self.validate_response(common_schema.common_hypervisors_detail,
                                resp, body)
-        return resp, body['hypervisors']
+        return service_client.ResponseBodyList(resp, body['hypervisors'])
 
     def get_hypervisor_list_details(self):
         """Show detailed hypervisors information."""
@@ -36,7 +37,7 @@
         body = json.loads(body)
         self.validate_response(common_schema.common_list_hypervisors_detail,
                                resp, body)
-        return resp, body['hypervisors']
+        return service_client.ResponseBodyList(resp, body['hypervisors'])
 
     def get_hypervisor_show_details(self, hyper_id):
         """Display the details of the specified hypervisor."""
@@ -44,28 +45,28 @@
         body = json.loads(body)
         self.validate_response(common_schema.common_show_hypervisor,
                                resp, body)
-        return resp, body['hypervisor']
+        return service_client.ResponseBody(resp, body['hypervisor'])
 
     def get_hypervisor_servers(self, hyper_name):
         """List instances belonging to the specified hypervisor."""
         resp, body = self.get('os-hypervisors/%s/servers' % hyper_name)
         body = json.loads(body)
         self.validate_response(v2schema.hypervisors_servers, resp, body)
-        return resp, body['hypervisors']
+        return service_client.ResponseBodyList(resp, body['hypervisors'])
 
     def get_hypervisor_stats(self):
         """Get hypervisor statistics over all compute nodes."""
         resp, body = self.get('os-hypervisors/statistics')
         body = json.loads(body)
         self.validate_response(common_schema.hypervisor_statistics, resp, body)
-        return resp, body['hypervisor_statistics']
+        return service_client.ResponseBody(resp, body['hypervisor_statistics'])
 
     def get_hypervisor_uptime(self, hyper_id):
         """Display the uptime of the specified hypervisor."""
         resp, body = self.get('os-hypervisors/%s/uptime' % hyper_id)
         body = json.loads(body)
         self.validate_response(common_schema.hypervisor_uptime, resp, body)
-        return resp, body['hypervisor']
+        return service_client.ResponseBody(resp, body['hypervisor'])
 
     def search_hypervisor(self, hyper_name):
         """Search specified hypervisor."""
@@ -73,4 +74,4 @@
         body = json.loads(body)
         self.validate_response(common_schema.common_hypervisors_detail,
                                resp, body)
-        return resp, body['hypervisors']
+        return service_client.ResponseBodyList(resp, body['hypervisors'])
diff --git a/tempest/services/compute/json/services_client.py b/tempest/services/compute/json/services_client.py
index 8d73c37..52662fa 100644
--- a/tempest/services/compute/json/services_client.py
+++ b/tempest/services/compute/json/services_client.py
@@ -18,6 +18,7 @@
 import urllib
 
 from tempest.api_schema.response.compute import services as schema
+from tempest.common import service_client
 from tempest.services.compute.json import base
 
 
@@ -31,7 +32,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.validate_response(schema.list_services, resp, body)
-        return resp, body['services']
+        return service_client.ResponseBodyList(resp, body['services'])
 
     def enable_service(self, host_name, binary):
         """
@@ -43,7 +44,7 @@
         resp, body = self.put('os-services/enable', post_body)
         body = json.loads(body)
         self.validate_response(schema.enable_service, resp, body)
-        return resp, body['service']
+        return service_client.ResponseBody(resp, body['service'])
 
     def disable_service(self, host_name, binary):
         """
@@ -54,4 +55,4 @@
         post_body = json.dumps({'binary': binary, 'host': host_name})
         resp, body = self.put('os-services/disable', post_body)
         body = json.loads(body)
-        return resp, body['service']
+        return service_client.ResponseBody(resp, body['service'])
