diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index f0805c0..78215db 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -248,7 +248,9 @@
 # Time in seconds between build status checks. (integer value)
 #build_interval = 1
 
-# Timeout in seconds to wait for an instance to build. (integer value)
+# Timeout in seconds to wait for an instance to build. Other services
+# that do not define build_timeout will inherit this value, for
+# example the image service. (integer value)
 #build_timeout = 300
 
 # Catalog type of the Compute service. (string value)
@@ -736,7 +738,7 @@
 # Catalog type of the Neutron service. (string value)
 #catalog_type = network
 
-# List of dns servers whichs hould be used for subnet creation (list
+# List of dns servers which should be used for subnet creation (list
 # value)
 #dns_servers = 8.8.8.8,8.8.4.4
 
diff --git a/tempest/api/compute/servers/test_create_server.py b/tempest/api/compute/servers/test_create_server.py
index b561b4e..1c4dc59 100644
--- a/tempest/api/compute/servers/test_create_server.py
+++ b/tempest/api/compute/servers/test_create_server.py
@@ -130,23 +130,23 @@
         # Verify that the networks order given at the server creation is
         # preserved within the server.
         name_net1 = data_utils.rand_name(self.__class__.__name__)
-        _, net1 = self.network_client.create_network(name=name_net1)
+        net1 = self.network_client.create_network(name=name_net1)
         self.addCleanup(self.network_client.delete_network,
                         net1['network']['id'])
 
         name_net2 = data_utils.rand_name(self.__class__.__name__)
-        _, net2 = self.network_client.create_network(name=name_net2)
+        net2 = self.network_client.create_network(name=name_net2)
         self.addCleanup(self.network_client.delete_network,
                         net2['network']['id'])
 
-        _, subnet1 = self.network_client.create_subnet(
+        subnet1 = self.network_client.create_subnet(
             network_id=net1['network']['id'],
             cidr='19.80.0.0/24',
             ip_version=4)
         self.addCleanup(self.network_client.delete_subnet,
                         subnet1['subnet']['id'])
 
-        _, subnet2 = self.network_client.create_subnet(
+        subnet2 = self.network_client.create_subnet(
             network_id=net2['network']['id'],
             cidr='19.86.0.0/24',
             ip_version=4)
diff --git a/tempest/api/compute/servers/test_server_personality.py b/tempest/api/compute/servers/test_server_personality.py
index de5b6c1..c6d48bc 100644
--- a/tempest/api/compute/servers/test_server_personality.py
+++ b/tempest/api/compute/servers/test_server_personality.py
@@ -36,6 +36,8 @@
         personality = []
         max_file_limit = \
             self.user_client.get_specific_absolute_limit("maxPersonality")
+        if max_file_limit == -1:
+            raise self.skipException("No limit for personality files")
         for i in range(0, int(max_file_limit) + 1):
             path = 'etc/test' + str(i) + '.txt'
             personality.append({'path': path,
@@ -52,6 +54,8 @@
         file_contents = 'This is a test file.'
         max_file_limit = \
             self.user_client.get_specific_absolute_limit("maxPersonality")
+        if max_file_limit == -1:
+            raise self.skipException("No limit for personality files")
         person = []
         for i in range(0, int(max_file_limit)):
             path = 'etc/test' + str(i) + '.txt'
diff --git a/tempest/api/network/admin/test_agent_management.py b/tempest/api/network/admin/test_agent_management.py
index 53b9ddd..e7fd016 100644
--- a/tempest/api/network/admin/test_agent_management.py
+++ b/tempest/api/network/admin/test_agent_management.py
@@ -26,13 +26,13 @@
         if not test.is_extension_enabled('agent', 'network'):
             msg = "agent extension not enabled."
             raise cls.skipException(msg)
-        resp, body = cls.admin_client.list_agents()
+        body = cls.admin_client.list_agents()
         agents = body['agents']
         cls.agent = agents[0]
 
     @test.attr(type='smoke')
     def test_list_agent(self):
-        _, body = self.admin_client.list_agents()
+        body = self.admin_client.list_agents()
         agents = body['agents']
         # Hearthbeats must be excluded from comparison
         self.agent.pop('heartbeat_timestamp', None)
@@ -44,12 +44,12 @@
 
     @test.attr(type=['smoke'])
     def test_list_agents_non_admin(self):
-        _, body = self.client.list_agents()
+        body = self.client.list_agents()
         self.assertEqual(len(body["agents"]), 0)
 
     @test.attr(type='smoke')
     def test_show_agent(self):
-        _, body = self.admin_client.show_agent(self.agent['id'])
+        body = self.admin_client.show_agent(self.agent['id'])
         agent = body['agent']
         self.assertEqual(agent['id'], self.agent['id'])
 
@@ -59,8 +59,8 @@
         # Try to update the 'admin_state_up' to the original
         # one to avoid the negative effect.
         agent_status = {'admin_state_up': origin_status}
-        _, body = self.admin_client.update_agent(agent_id=self.agent['id'],
-                                                 agent_info=agent_status)
+        body = self.admin_client.update_agent(agent_id=self.agent['id'],
+                                              agent_info=agent_status)
         updated_status = body['agent']['admin_state_up']
         self.assertEqual(origin_status, updated_status)
 
@@ -69,8 +69,8 @@
         self.useFixture(fixtures.LockFixture('agent_description'))
         description = 'description for update agent.'
         agent_description = {'description': description}
-        _, body = self.admin_client.update_agent(agent_id=self.agent['id'],
-                                                 agent_info=agent_description)
+        body = self.admin_client.update_agent(agent_id=self.agent['id'],
+                                              agent_info=agent_description)
         self.addCleanup(self._restore_agent)
         updated_description = body['agent']['description']
         self.assertEqual(updated_description, description)
diff --git a/tempest/api/network/admin/test_dhcp_agent_scheduler.py b/tempest/api/network/admin/test_dhcp_agent_scheduler.py
index a938fa6..a89f25c 100644
--- a/tempest/api/network/admin/test_dhcp_agent_scheduler.py
+++ b/tempest/api/network/admin/test_dhcp_agent_scheduler.py
@@ -34,12 +34,12 @@
 
     @test.attr(type='smoke')
     def test_list_dhcp_agent_hosting_network(self):
-        _, body = self.admin_client.list_dhcp_agent_hosting_network(
+        self.admin_client.list_dhcp_agent_hosting_network(
             self.network['id'])
 
     @test.attr(type='smoke')
     def test_list_networks_hosted_by_one_dhcp(self):
-        resp, body = self.admin_client.list_dhcp_agent_hosting_network(
+        body = self.admin_client.list_dhcp_agent_hosting_network(
             self.network['id'])
         agents = body['agents']
         self.assertIsNotNone(agents)
@@ -49,7 +49,7 @@
 
     def _check_network_in_dhcp_agent(self, network_id, agent):
         network_ids = []
-        _, body = self.admin_client.list_networks_hosted_by_one_dhcp_agent(
+        body = self.admin_client.list_networks_hosted_by_one_dhcp_agent(
             agent['id'])
         networks = body['networks']
         for network in networks:
@@ -63,7 +63,7 @@
         self.ports.remove(self.port)
         agent = dict()
         agent['agent_type'] = None
-        resp, body = self.admin_client.list_agents()
+        body = self.admin_client.list_agents()
         agents = body['agents']
         for a in agents:
             if a['agent_type'] == 'DHCP agent':
@@ -82,14 +82,14 @@
             self._remove_network_from_dhcp_agent(network_id, agent)
 
     def _remove_network_from_dhcp_agent(self, network_id, agent):
-        _, body = self.admin_client.remove_network_from_dhcp_agent(
+        self.admin_client.remove_network_from_dhcp_agent(
             agent_id=agent['id'],
             network_id=network_id)
         self.assertFalse(self._check_network_in_dhcp_agent(
             network_id, agent))
 
     def _add_dhcp_agent_to_network(self, network_id, agent):
-        _, body = self.admin_client.add_dhcp_agent_to_network(agent['id'],
-                                                              network_id)
+        self.admin_client.add_dhcp_agent_to_network(agent['id'],
+                                                    network_id)
         self.assertTrue(self._check_network_in_dhcp_agent(
             network_id, agent))
diff --git a/tempest/api/network/admin/test_external_network_extension.py b/tempest/api/network/admin/test_external_network_extension.py
index 75ee217..06cce48 100644
--- a/tempest/api/network/admin/test_external_network_extension.py
+++ b/tempest/api/network/admin/test_external_network_extension.py
@@ -26,7 +26,7 @@
         post_body = {'name': data_utils.rand_name('network-')}
         if external:
             post_body['router:external'] = external
-        _, body = self.admin_client.create_network(**post_body)
+        body = self.admin_client.create_network(**post_body)
         network = body['network']
         self.addCleanup(self.admin_client.delete_network, network['id'])
         return network
@@ -45,8 +45,8 @@
         network = self._create_network(external=False)
         self.assertFalse(network.get('router:external', False))
         update_body = {'router:external': True}
-        _, body = self.admin_client.update_network(network['id'],
-                                                   **update_body)
+        body = self.admin_client.update_network(network['id'],
+                                                **update_body)
         updated_network = body['network']
         # Verify that router:external parameter was updated
         self.assertTrue(updated_network['router:external'])
@@ -57,7 +57,7 @@
         # List networks as a normal user and confirm the external
         # network extension attribute is returned for those networks
         # that were created as external
-        _, body = self.client.list_networks()
+        body = self.client.list_networks()
         networks_list = [net['id'] for net in body['networks']]
         self.assertIn(external_network['id'], networks_list)
         self.assertIn(self.network['id'], networks_list)
@@ -72,12 +72,12 @@
         external_network = self._create_network()
         # Show an external network as a normal user and confirm the
         # external network extension attribute is returned.
-        _, body = self.client.show_network(external_network['id'])
+        body = self.client.show_network(external_network['id'])
         show_ext_net = body['network']
         self.assertEqual(external_network['name'], show_ext_net['name'])
         self.assertEqual(external_network['id'], show_ext_net['id'])
         self.assertTrue(show_ext_net['router:external'])
-        _, body = self.client.show_network(self.network['id'])
+        body = self.client.show_network(self.network['id'])
         show_net = body['network']
         # Verify with show that router:external is False for network
         self.assertEqual(self.network['name'], show_net['name'])
@@ -91,29 +91,29 @@
         """
         # Set cls.client to admin to use base.create_subnet()
         client = self.admin_client
-        _, body = client.create_network(**{'router:external': True})
+        body = client.create_network(**{'router:external': True})
         external_network = body['network']
         self.addCleanup(self._try_delete_resource,
                         client.delete_network,
                         external_network['id'])
         subnet = self.create_subnet(external_network, client=client)
-        _, body = client.create_floatingip(
+        body = client.create_floatingip(
             floating_network_id=external_network['id'])
         created_floating_ip = body['floatingip']
         self.addCleanup(self._try_delete_resource,
                         client.delete_floatingip,
                         created_floating_ip['id'])
-        _, floatingip_list = client.list_floatingips(
+        floatingip_list = client.list_floatingips(
             network=external_network['id'])
         self.assertIn(created_floating_ip['id'],
                       (f['id'] for f in floatingip_list['floatingips']))
         client.delete_network(external_network['id'])
         # Verifies floating ip is deleted
-        _, floatingip_list = client.list_floatingips()
+        floatingip_list = client.list_floatingips()
         self.assertNotIn(created_floating_ip['id'],
                          (f['id'] for f in floatingip_list['floatingips']))
         # Verifies subnet is deleted
-        _, subnet_list = client.list_subnets()
+        subnet_list = client.list_subnets()
         self.assertNotIn(subnet['id'],
                          (s['id'] for s in subnet_list))
         # Removes subnet from the cleanup list
diff --git a/tempest/api/network/admin/test_floating_ips_admin_actions.py b/tempest/api/network/admin/test_floating_ips_admin_actions.py
index 2fe7bf8..62ba1b3 100644
--- a/tempest/api/network/admin/test_floating_ips_admin_actions.py
+++ b/tempest/api/network/admin/test_floating_ips_admin_actions.py
@@ -36,18 +36,18 @@
     @test.attr(type='smoke')
     def test_list_floating_ips_from_admin_and_nonadmin(self):
         # Create floating ip from admin user
-        _, floating_ip_admin = self.admin_client.create_floatingip(
+        floating_ip_admin = self.admin_client.create_floatingip(
             floating_network_id=self.ext_net_id)
         self.addCleanup(self.admin_client.delete_floatingip,
                         floating_ip_admin['floatingip']['id'])
         # Create floating ip from alt user
-        _, body = self.alt_client.create_floatingip(
+        body = self.alt_client.create_floatingip(
             floating_network_id=self.ext_net_id)
         floating_ip_alt = body['floatingip']
         self.addCleanup(self.alt_client.delete_floatingip,
                         floating_ip_alt['id'])
         # List floating ips from admin
-        _, body = self.admin_client.list_floatingips()
+        body = self.admin_client.list_floatingips()
         floating_ip_ids_admin = [f['id'] for f in body['floatingips']]
         # Check that admin sees all floating ips
         self.assertIn(self.floating_ip['id'], floating_ip_ids_admin)
@@ -55,7 +55,7 @@
                       floating_ip_ids_admin)
         self.assertIn(floating_ip_alt['id'], floating_ip_ids_admin)
         # List floating ips from nonadmin
-        resp, body = self.client.list_floatingips()
+        body = self.client.list_floatingips()
         floating_ip_ids = [f['id'] for f in body['floatingips']]
         # Check that nonadmin user doesn't see floating ip created from admin
         # and floating ip that is created in another tenant (alt user)
diff --git a/tempest/api/network/admin/test_l3_agent_scheduler.py b/tempest/api/network/admin/test_l3_agent_scheduler.py
index 8fccb1f..a6de581 100644
--- a/tempest/api/network/admin/test_l3_agent_scheduler.py
+++ b/tempest/api/network/admin/test_l3_agent_scheduler.py
@@ -40,7 +40,7 @@
             msg = "L3 Agent Scheduler Extension not enabled."
             raise cls.skipException(msg)
         # Trying to get agent details for L3 Agent
-        resp, body = cls.admin_client.list_agents()
+        body = cls.admin_client.list_agents()
         agents = body['agents']
         for agent in agents:
             if agent['agent_type'] == 'L3 agent':
@@ -52,18 +52,18 @@
 
     @test.attr(type='smoke')
     def test_list_routers_on_l3_agent(self):
-        _, body = self.admin_client.list_routers_on_l3_agent(self.agent['id'])
+        self.admin_client.list_routers_on_l3_agent(self.agent['id'])
 
     @test.attr(type='smoke')
     def test_add_list_remove_router_on_l3_agent(self):
         l3_agent_ids = list()
         name = data_utils.rand_name('router1-')
-        resp, router = self.client.create_router(name)
+        router = self.client.create_router(name)
         self.addCleanup(self.client.delete_router, router['router']['id'])
-        _, body = self.admin_client.add_router_to_l3_agent(
+        self.admin_client.add_router_to_l3_agent(
             self.agent['id'],
             router['router']['id'])
-        _, body = self.admin_client.list_l3_agents_hosting_router(
+        body = self.admin_client.list_l3_agents_hosting_router(
             router['router']['id'])
         for agent in body['agents']:
             l3_agent_ids.append(agent['id'])
@@ -71,7 +71,7 @@
             self.assertEqual('L3 agent', agent['agent_type'])
         self.assertIn(self.agent['id'], l3_agent_ids)
         del l3_agent_ids[:]
-        _, body = self.admin_client.remove_router_from_l3_agent(
+        body = self.admin_client.remove_router_from_l3_agent(
             self.agent['id'],
             router['router']['id'])
         # NOTE(afazekas): The deletion not asserted, because neutron
diff --git a/tempest/api/network/admin/test_lbaas_agent_scheduler.py b/tempest/api/network/admin/test_lbaas_agent_scheduler.py
index 03296a4..da1af36 100644
--- a/tempest/api/network/admin/test_lbaas_agent_scheduler.py
+++ b/tempest/api/network/admin/test_lbaas_agent_scheduler.py
@@ -49,13 +49,13 @@
     @test.attr(type='smoke')
     def test_list_pools_on_lbaas_agent(self):
         found = False
-        _, body = self.admin_client.list_agents(
+        body = self.admin_client.list_agents(
             agent_type="Loadbalancer agent")
         agents = body['agents']
         for a in agents:
             msg = 'Load Balancer agent expected'
             self.assertEqual(a['agent_type'], 'Loadbalancer agent', msg)
-            _, body = (
+            body = (
                 self.admin_client.list_pools_hosted_by_one_lbaas_agent(
                     a['id']))
             pools = body['pools']
@@ -66,6 +66,6 @@
 
     @test.attr(type='smoke')
     def test_show_lbaas_agent_hosting_pool(self):
-        _, body = self.admin_client.show_lbaas_agent_hosting_pool(
+        body = self.admin_client.show_lbaas_agent_hosting_pool(
             self.pool['id'])
         self.assertEqual('Loadbalancer agent', body['agent']['agent_type'])
diff --git a/tempest/api/network/admin/test_load_balancer_admin_actions.py b/tempest/api/network/admin/test_load_balancer_admin_actions.py
index 15d06e3..e81616b 100644
--- a/tempest/api/network/admin/test_load_balancer_admin_actions.py
+++ b/tempest/api/network/admin/test_load_balancer_admin_actions.py
@@ -46,7 +46,7 @@
     @test.attr(type='smoke')
     def test_create_vip_as_admin_for_another_tenant(self):
         name = data_utils.rand_name('vip-')
-        _, body = self.admin_client.create_pool(
+        body = self.admin_client.create_pool(
             name=data_utils.rand_name('pool-'),
             lb_method="ROUND_ROBIN",
             protocol="HTTP",
@@ -54,24 +54,24 @@
             tenant_id=self.tenant_id)
         pool = body['pool']
         self.addCleanup(self.admin_client.delete_pool, pool['id'])
-        _, body = self.admin_client.create_vip(name=name,
-                                               protocol="HTTP",
-                                               protocol_port=80,
-                                               subnet_id=self.subnet['id'],
-                                               pool_id=pool['id'],
-                                               tenant_id=self.tenant_id)
+        body = self.admin_client.create_vip(name=name,
+                                            protocol="HTTP",
+                                            protocol_port=80,
+                                            subnet_id=self.subnet['id'],
+                                            pool_id=pool['id'],
+                                            tenant_id=self.tenant_id)
         vip = body['vip']
         self.addCleanup(self.admin_client.delete_vip, vip['id'])
         self.assertIsNotNone(vip['id'])
         self.assertEqual(self.tenant_id, vip['tenant_id'])
-        _, body = self.client.show_vip(vip['id'])
+        body = self.client.show_vip(vip['id'])
         show_vip = body['vip']
         self.assertEqual(vip['id'], show_vip['id'])
         self.assertEqual(vip['name'], show_vip['name'])
 
     @test.attr(type='smoke')
     def test_create_health_monitor_as_admin_for_another_tenant(self):
-        _, body = (
+        body = (
             self.admin_client.create_health_monitor(delay=4,
                                                     max_retries=3,
                                                     type="TCP",
@@ -82,13 +82,13 @@
                         health_monitor['id'])
         self.assertIsNotNone(health_monitor['id'])
         self.assertEqual(self.tenant_id, health_monitor['tenant_id'])
-        _, body = self.client.show_health_monitor(health_monitor['id'])
+        body = self.client.show_health_monitor(health_monitor['id'])
         show_health_monitor = body['health_monitor']
         self.assertEqual(health_monitor['id'], show_health_monitor['id'])
 
     @test.attr(type='smoke')
     def test_create_pool_from_admin_user_other_tenant(self):
-        _, body = self.admin_client.create_pool(
+        body = self.admin_client.create_pool(
             name=data_utils.rand_name('pool-'),
             lb_method="ROUND_ROBIN",
             protocol="HTTP",
@@ -101,10 +101,10 @@
 
     @test.attr(type='smoke')
     def test_create_member_from_admin_user_other_tenant(self):
-        _, body = self.admin_client.create_member(address="10.0.9.47",
-                                                  protocol_port=80,
-                                                  pool_id=self.pool['id'],
-                                                  tenant_id=self.tenant_id)
+        body = self.admin_client.create_member(address="10.0.9.47",
+                                               protocol_port=80,
+                                               pool_id=self.pool['id'],
+                                               tenant_id=self.tenant_id)
         member = body['member']
         self.addCleanup(self.admin_client.delete_member, member['id'])
         self.assertIsNotNone(member['id'])
diff --git a/tempest/api/network/admin/test_quotas.py b/tempest/api/network/admin/test_quotas.py
index 72aef36..54aa54c 100644
--- a/tempest/api/network/admin/test_quotas.py
+++ b/tempest/api/network/admin/test_quotas.py
@@ -57,14 +57,14 @@
         self.addCleanup(self.identity_admin_client.delete_tenant, tenant_id)
 
         # Change quotas for tenant
-        _, quota_set = self.admin_client.update_quotas(tenant_id,
-                                                       **new_quotas)
+        quota_set = self.admin_client.update_quotas(tenant_id,
+                                                    **new_quotas)
         self.addCleanup(self.admin_client.reset_quotas, tenant_id)
         for key, value in new_quotas.iteritems():
             self.assertEqual(value, quota_set[key])
 
         # Confirm our tenant is listed among tenants with non default quotas
-        _, non_default_quotas = self.admin_client.list_quotas()
+        non_default_quotas = self.admin_client.list_quotas()
         found = False
         for qs in non_default_quotas['quotas']:
             if qs['tenant_id'] == tenant_id:
@@ -72,14 +72,14 @@
         self.assertTrue(found)
 
         # Confirm from API quotas were changed as requested for tenant
-        _, quota_set = self.admin_client.show_quotas(tenant_id)
+        quota_set = self.admin_client.show_quotas(tenant_id)
         quota_set = quota_set['quota']
         for key, value in new_quotas.iteritems():
             self.assertEqual(value, quota_set[key])
 
         # Reset quotas to default and confirm
-        _, body = self.admin_client.reset_quotas(tenant_id)
-        _, non_default_quotas = self.admin_client.list_quotas()
+        self.admin_client.reset_quotas(tenant_id)
+        non_default_quotas = self.admin_client.list_quotas()
         for q in non_default_quotas['quotas']:
             self.assertNotEqual(tenant_id, q['tenant_id'])
 
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index b13dd22..12b2d13 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -185,7 +185,7 @@
         """Wrapper utility that returns a test network."""
         network_name = network_name or data_utils.rand_name('test-network-')
 
-        resp, body = cls.client.create_network(name=network_name)
+        body = cls.client.create_network(name=network_name)
         network = body['network']
         cls.networks.append(network)
         return network
@@ -216,7 +216,7 @@
             else:
                 gateway_ip = gateway
             try:
-                resp, body = client.create_subnet(
+                body = client.create_subnet(
                     network_id=network['id'],
                     cidr=str(subnet_cidr),
                     ip_version=ip_version,
@@ -237,8 +237,8 @@
     @classmethod
     def create_port(cls, network, **kwargs):
         """Wrapper utility that returns a test port."""
-        resp, body = cls.client.create_port(network_id=network['id'],
-                                            **kwargs)
+        body = cls.client.create_port(network_id=network['id'],
+                                      **kwargs)
         port = body['port']
         cls.ports.append(port)
         return port
@@ -246,8 +246,8 @@
     @classmethod
     def update_port(cls, port, **kwargs):
         """Wrapper utility that updates a test port."""
-        resp, body = cls.client.update_port(port['id'],
-                                            **kwargs)
+        body = cls.client.update_port(port['id'],
+                                      **kwargs)
         return body['port']
 
     @classmethod
@@ -258,7 +258,7 @@
             ext_gw_info['network_id'] = external_network_id
         if enable_snat:
             ext_gw_info['enable_snat'] = enable_snat
-        resp, body = cls.client.create_router(
+        body = cls.client.create_router(
             router_name, external_gateway_info=ext_gw_info,
             admin_state_up=admin_state_up)
         router = body['router']
@@ -268,7 +268,7 @@
     @classmethod
     def create_floatingip(cls, external_network_id):
         """Wrapper utility that returns a test floating IP."""
-        resp, body = cls.client.create_floatingip(
+        body = cls.client.create_floatingip(
             floating_network_id=external_network_id)
         fip = body['floatingip']
         cls.floating_ips.append(fip)
@@ -277,7 +277,7 @@
     @classmethod
     def create_pool(cls, name, lb_method, protocol, subnet):
         """Wrapper utility that returns a test pool."""
-        resp, body = cls.client.create_pool(
+        body = cls.client.create_pool(
             name=name,
             lb_method=lb_method,
             protocol=protocol,
@@ -289,25 +289,25 @@
     @classmethod
     def update_pool(cls, name):
         """Wrapper utility that returns a test pool."""
-        resp, body = cls.client.update_pool(name=name)
+        body = cls.client.update_pool(name=name)
         pool = body['pool']
         return pool
 
     @classmethod
     def create_vip(cls, name, protocol, protocol_port, subnet, pool):
         """Wrapper utility that returns a test vip."""
-        resp, body = cls.client.create_vip(name=name,
-                                           protocol=protocol,
-                                           protocol_port=protocol_port,
-                                           subnet_id=subnet['id'],
-                                           pool_id=pool['id'])
+        body = cls.client.create_vip(name=name,
+                                     protocol=protocol,
+                                     protocol_port=protocol_port,
+                                     subnet_id=subnet['id'],
+                                     pool_id=pool['id'])
         vip = body['vip']
         cls.vips.append(vip)
         return vip
 
     @classmethod
     def update_vip(cls, name):
-        resp, body = cls.client.update_vip(name=name)
+        body = cls.client.update_vip(name=name)
         vip = body['vip']
         return vip
 
@@ -316,47 +316,47 @@
         """Wrapper utility that returns a test member."""
         ip_version = ip_version if ip_version is not None else cls._ip_version
         member_address = "fd00::abcd" if ip_version == 6 else "10.0.9.46"
-        resp, body = cls.client.create_member(address=member_address,
-                                              protocol_port=protocol_port,
-                                              pool_id=pool['id'])
+        body = cls.client.create_member(address=member_address,
+                                        protocol_port=protocol_port,
+                                        pool_id=pool['id'])
         member = body['member']
         cls.members.append(member)
         return member
 
     @classmethod
     def update_member(cls, admin_state_up):
-        resp, body = cls.client.update_member(admin_state_up=admin_state_up)
+        body = cls.client.update_member(admin_state_up=admin_state_up)
         member = body['member']
         return member
 
     @classmethod
     def create_health_monitor(cls, delay, max_retries, Type, timeout):
         """Wrapper utility that returns a test health monitor."""
-        resp, body = cls.client.create_health_monitor(delay=delay,
-                                                      max_retries=max_retries,
-                                                      type=Type,
-                                                      timeout=timeout)
+        body = cls.client.create_health_monitor(delay=delay,
+                                                max_retries=max_retries,
+                                                type=Type,
+                                                timeout=timeout)
         health_monitor = body['health_monitor']
         cls.health_monitors.append(health_monitor)
         return health_monitor
 
     @classmethod
     def update_health_monitor(cls, admin_state_up):
-        resp, body = cls.client.update_vip(admin_state_up=admin_state_up)
+        body = cls.client.update_vip(admin_state_up=admin_state_up)
         health_monitor = body['health_monitor']
         return health_monitor
 
     @classmethod
     def create_router_interface(cls, router_id, subnet_id):
         """Wrapper utility that returns a router interface."""
-        resp, interface = cls.client.add_router_interface_with_subnet_id(
+        interface = cls.client.add_router_interface_with_subnet_id(
             router_id, subnet_id)
         return interface
 
     @classmethod
     def create_vpnservice(cls, subnet_id, router_id):
         """Wrapper utility that returns a test vpn service."""
-        resp, body = cls.client.create_vpnservice(
+        body = cls.client.create_vpnservice(
             subnet_id=subnet_id, router_id=router_id, admin_state_up=True,
             name=data_utils.rand_name("vpnservice-"))
         vpnservice = body['vpnservice']
@@ -366,7 +366,7 @@
     @classmethod
     def create_ikepolicy(cls, name):
         """Wrapper utility that returns a test ike policy."""
-        resp, body = cls.client.create_ikepolicy(name=name)
+        body = cls.client.create_ikepolicy(name=name)
         ikepolicy = body['ikepolicy']
         cls.ikepolicies.append(ikepolicy)
         return ikepolicy
@@ -374,7 +374,7 @@
     @classmethod
     def create_firewall_rule(cls, action, protocol):
         """Wrapper utility that returns a test firewall rule."""
-        resp, body = cls.client.create_firewall_rule(
+        body = cls.client.create_firewall_rule(
             name=data_utils.rand_name("fw-rule"),
             action=action,
             protocol=protocol)
@@ -385,7 +385,7 @@
     @classmethod
     def create_firewall_policy(cls):
         """Wrapper utility that returns a test firewall policy."""
-        resp, body = cls.client.create_firewall_policy(
+        body = cls.client.create_firewall_policy(
             name=data_utils.rand_name("fw-policy"))
         fw_policy = body['firewall_policy']
         cls.fw_policies.append(fw_policy)
@@ -393,7 +393,7 @@
 
     @classmethod
     def delete_router(cls, router):
-        resp, body = cls.client.list_router_interfaces(router['id'])
+        body = cls.client.list_router_interfaces(router['id'])
         interfaces = body['ports']
         for i in interfaces:
             cls.client.remove_router_interface_with_subnet_id(
@@ -403,7 +403,7 @@
     @classmethod
     def create_ipsecpolicy(cls, name):
         """Wrapper utility that returns a test ipsec policy."""
-        _, body = cls.client.create_ipsecpolicy(name=name)
+        body = cls.client.create_ipsecpolicy(name=name)
         ipsecpolicy = body['ipsecpolicy']
         cls.ipsecpolicies.append(ipsecpolicy)
         return ipsecpolicy
@@ -428,7 +428,7 @@
     @classmethod
     def create_metering_label(cls, name, description):
         """Wrapper utility that returns a test metering label."""
-        resp, body = cls.admin_client.create_metering_label(
+        body = cls.admin_client.create_metering_label(
             description=description,
             name=data_utils.rand_name("metering-label"))
         metering_label = body['metering_label']
@@ -439,7 +439,7 @@
     def create_metering_label_rule(cls, remote_ip_prefix, direction,
                                    metering_label_id):
         """Wrapper utility that returns a test metering label rule."""
-        resp, body = cls.admin_client.create_metering_label_rule(
+        body = cls.admin_client.create_metering_label_rule(
             remote_ip_prefix=remote_ip_prefix, direction=direction,
             metering_label_id=metering_label_id)
         metering_label_rule = body['metering_label_rule']
diff --git a/tempest/api/network/base_routers.py b/tempest/api/network/base_routers.py
index 38985a0..1b580b0 100644
--- a/tempest/api/network/base_routers.py
+++ b/tempest/api/network/base_routers.py
@@ -29,14 +29,14 @@
         self.client.delete_router(router_id)
         # Asserting that the router is not found in the list
         # after deletion
-        _, list_body = self.client.list_routers()
+        list_body = self.client.list_routers()
         routers_list = list()
         for router in list_body['routers']:
             routers_list.append(router['id'])
         self.assertNotIn(router_id, routers_list)
 
     def _add_router_interface_with_subnet_id(self, router_id, subnet_id):
-        _, interface = self.client.add_router_interface_with_subnet_id(
+        interface = self.client.add_router_interface_with_subnet_id(
             router_id, subnet_id)
         self.addCleanup(self._remove_router_interface_with_subnet_id,
                         router_id, subnet_id)
@@ -44,11 +44,11 @@
         return interface
 
     def _remove_router_interface_with_subnet_id(self, router_id, subnet_id):
-        _, body = self.client.remove_router_interface_with_subnet_id(
+        body = self.client.remove_router_interface_with_subnet_id(
             router_id, subnet_id)
         self.assertEqual(subnet_id, body['subnet_id'])
 
     def _remove_router_interface_with_port_id(self, router_id, port_id):
-        _, body = self.client.remove_router_interface_with_port_id(router_id,
-                                                                   port_id)
+        body = self.client.remove_router_interface_with_port_id(router_id,
+                                                                port_id)
         self.assertEqual(port_id, body['port_id'])
diff --git a/tempest/api/network/base_security_groups.py b/tempest/api/network/base_security_groups.py
index 622ed01..623e2d0 100644
--- a/tempest/api/network/base_security_groups.py
+++ b/tempest/api/network/base_security_groups.py
@@ -26,7 +26,7 @@
     def _create_security_group(self):
         # Create a security group
         name = data_utils.rand_name('secgroup-')
-        _, group_create_body = self.client.create_security_group(name=name)
+        group_create_body = self.client.create_security_group(name=name)
         self.addCleanup(self._delete_security_group,
                         group_create_body['security_group']['id'])
         self.assertEqual(group_create_body['security_group']['name'], name)
@@ -36,7 +36,7 @@
         self.client.delete_security_group(secgroup_id)
         # Asserting that the security group is not found in the list
         # after deletion
-        _, list_body = self.client.list_security_groups()
+        list_body = self.client.list_security_groups()
         secgroup_list = list()
         for secgroup in list_body['security_groups']:
             secgroup_list.append(secgroup['id'])
@@ -46,7 +46,7 @@
         self.client.delete_security_group_rule(rule_id)
         # Asserting that the security group is not found in the list
         # after deletion
-        _, list_body = self.client.list_security_group_rules()
+        list_body = self.client.list_security_group_rules()
         rules_list = list()
         for rule in list_body['security_group_rules']:
             rules_list.append(rule['id'])
diff --git a/tempest/api/network/test_allowed_address_pair.py b/tempest/api/network/test_allowed_address_pair.py
index 7b7a5db..57887ac 100644
--- a/tempest/api/network/test_allowed_address_pair.py
+++ b/tempest/api/network/test_allowed_address_pair.py
@@ -58,14 +58,14 @@
         # Create port with allowed address pair attribute
         allowed_address_pairs = [{'ip_address': self.ip_address,
                                   'mac_address': self.mac_address}]
-        _, body = self.client.create_port(
+        body = self.client.create_port(
             network_id=self.network['id'],
             allowed_address_pairs=allowed_address_pairs)
         port_id = body['port']['id']
         self.addCleanup(self.client.delete_port, port_id)
 
         # Confirm port was created with allowed address pair attribute
-        _, body = self.client.list_ports()
+        body = self.client.list_ports()
         ports = body['ports']
         port = [p for p in ports if p['id'] == port_id]
         msg = 'Created port not found in list of ports returned by Neutron'
@@ -75,7 +75,7 @@
     @test.attr(type='smoke')
     def _update_port_with_address(self, address, mac_address=None, **kwargs):
         # Create a port without allowed address pair
-        _, body = self.client.create_port(network_id=self.network['id'])
+        body = self.client.create_port(network_id=self.network['id'])
         port_id = body['port']['id']
         self.addCleanup(self.client.delete_port, port_id)
         if mac_address is None:
@@ -86,7 +86,7 @@
                                   'mac_address': mac_address}]
         if kwargs:
             allowed_address_pairs.append(kwargs['allowed_address_pairs'])
-        _, body = self.client.update_port(
+        body = self.client.update_port(
             port_id, allowed_address_pairs=allowed_address_pairs)
         allowed_address_pair = body['port']['allowed_address_pairs']
         self.assertEqual(allowed_address_pair, allowed_address_pairs)
@@ -105,7 +105,7 @@
     @test.attr(type='smoke')
     def test_update_port_with_multiple_ip_mac_address_pair(self):
         # Create an ip _address and mac_address through port create
-        _, resp = self.client.create_port(network_id=self.network['id'])
+        resp = self.client.create_port(network_id=self.network['id'])
         newportid = resp['port']['id']
         self.addCleanup(self.client.delete_port, newportid)
         ipaddress = resp['port']['fixed_ips'][0]['ip_address']
diff --git a/tempest/api/network/test_dhcp_ipv6.py b/tempest/api/network/test_dhcp_ipv6.py
index 5bc63d0..6ce1216 100644
--- a/tempest/api/network/test_dhcp_ipv6.py
+++ b/tempest/api/network/test_dhcp_ipv6.py
@@ -25,7 +25,6 @@
 
 
 class NetworksTestDHCPv6(base.BaseNetworkTest):
-    _interface = 'json'
     _ip_version = 6
 
     """ Test DHCPv6 specific features using SLAAC, stateless and
@@ -39,7 +38,7 @@
     """
 
     @classmethod
-    def resource_setup(cls):
+    def skip_checks(cls):
         msg = None
         if not CONF.network_feature_enabled.ipv6:
             msg = "IPv6 is not enabled"
@@ -47,6 +46,9 @@
             msg = "DHCPv6 attributes are not enabled."
         if msg:
             raise cls.skipException(msg)
+
+    @classmethod
+    def resource_setup(cls):
         super(NetworksTestDHCPv6, cls).resource_setup()
         cls.network = cls.create_network()
 
@@ -57,10 +59,10 @@
         del things_list[index]
 
     def _clean_network(self):
-        resp, body = self.client.list_ports()
+        body = self.client.list_ports()
         ports = body['ports']
         for port in ports:
-            if (port['device_owner'] == 'network:router_interface'
+            if (port['device_owner'].startswith('network:router_interface')
                 and port['device_id'] in [r['id'] for r in self.routers]):
                 self.client.remove_router_interface_with_port_id(
                     port['device_id'], port['id']
@@ -69,13 +71,13 @@
                 if port['id'] in [p['id'] for p in self.ports]:
                     self.client.delete_port(port['id'])
                     self._remove_from_list_by_index(self.ports, port)
-        resp, body = self.client.list_subnets()
+        body = self.client.list_subnets()
         subnets = body['subnets']
         for subnet in subnets:
             if subnet['id'] in [s['id'] for s in self.subnets]:
                 self.client.delete_subnet(subnet['id'])
                 self._remove_from_list_by_index(self.subnets, subnet)
-        resp, body = self.client.list_routers()
+        body = self.client.list_routers()
         routers = body['routers']
         for router in routers:
             if router['id'] in [r['id'] for r in self.routers]:
@@ -197,7 +199,7 @@
                                              subnet_slaac]
                 self.client.delete_port(port['id'])
                 self.ports.pop()
-                _, body = self.client.list_ports()
+                body = self.client.list_ports()
                 ports_id_list = [i['id'] for i in body['ports']]
                 self.assertNotIn(port['id'], ports_id_list)
                 self._clean_network()
@@ -361,7 +363,7 @@
             admin_state_up=True)
         port = self.create_router_interface(router['id'],
                                             subnet['id'])
-        _, body = self.client.show_port(port['port_id'])
+        body = self.client.show_port(port['port_id'])
         return subnet, body['port']
 
     def test_dhcp_stateful_router(self):
@@ -371,7 +373,6 @@
         for ra_mode, add_mode in (
                 ('dhcpv6-stateful', 'dhcpv6-stateful'),
                 ('dhcpv6-stateful', None),
-                (None, 'dhcpv6-stateful'),
         ):
             kwargs = {'ipv6_ra_mode': ra_mode,
                       'ipv6_address_mode': add_mode}
diff --git a/tempest/api/network/test_extensions.py b/tempest/api/network/test_extensions.py
index 1c7feb3..54c3cb9 100644
--- a/tempest/api/network/test_extensions.py
+++ b/tempest/api/network/test_extensions.py
@@ -47,14 +47,14 @@
         expected_alias = [ext for ext in expected_alias if
                           test.is_extension_enabled(ext, 'network')]
         actual_alias = list()
-        _, extensions = self.client.list_extensions()
+        extensions = self.client.list_extensions()
         list_extensions = extensions['extensions']
         # Show and verify the details of the available extensions
         for ext in list_extensions:
             ext_name = ext['name']
             ext_alias = ext['alias']
             actual_alias.append(ext['alias'])
-            _, ext_details = self.client.show_extension(ext_alias)
+            ext_details = self.client.show_extension(ext_alias)
             ext_details = ext_details['extension']
 
             self.assertIsNotNone(ext_details)
diff --git a/tempest/api/network/test_extra_dhcp_options.py b/tempest/api/network/test_extra_dhcp_options.py
index 6d083b3..bd70323 100644
--- a/tempest/api/network/test_extra_dhcp_options.py
+++ b/tempest/api/network/test_extra_dhcp_options.py
@@ -57,14 +57,14 @@
     @test.attr(type='smoke')
     def test_create_list_port_with_extra_dhcp_options(self):
         # Create a port with Extra DHCP Options
-        _, body = self.client.create_port(
+        body = self.client.create_port(
             network_id=self.network['id'],
             extra_dhcp_opts=self.extra_dhcp_opts)
         port_id = body['port']['id']
         self.addCleanup(self.client.delete_port, port_id)
 
         # Confirm port created has Extra DHCP Options
-        _, body = self.client.list_ports()
+        body = self.client.list_ports()
         ports = body['ports']
         port = [p for p in ports if p['id'] == port_id]
         self.assertTrue(port)
@@ -74,12 +74,12 @@
     def test_update_show_port_with_extra_dhcp_options(self):
         # Update port with extra dhcp options
         name = data_utils.rand_name('new-port-name')
-        _, body = self.client.update_port(
+        body = self.client.update_port(
             self.port['id'],
             name=name,
             extra_dhcp_opts=self.extra_dhcp_opts)
         # Confirm extra dhcp options were added to the port
-        _, body = self.client.show_port(self.port['id'])
+        body = self.client.show_port(self.port['id'])
         self._confirm_extra_dhcp_options(body['port'], self.extra_dhcp_opts)
 
     def _confirm_extra_dhcp_options(self, port, extra_dhcp_opts):
diff --git a/tempest/api/network/test_floating_ips.py b/tempest/api/network/test_floating_ips.py
index 9beae0a..1151c5d 100644
--- a/tempest/api/network/test_floating_ips.py
+++ b/tempest/api/network/test_floating_ips.py
@@ -67,7 +67,7 @@
     @test.attr(type='smoke')
     def test_create_list_show_update_delete_floating_ip(self):
         # Creates a floating IP
-        _, body = self.client.create_floatingip(
+        body = self.client.create_floatingip(
             floating_network_id=self.ext_net_id,
             port_id=self.ports[0]['id'])
         created_floating_ip = body['floatingip']
@@ -82,7 +82,7 @@
         self.assertIn(created_floating_ip['fixed_ip_address'],
                       [ip['ip_address'] for ip in self.ports[0]['fixed_ips']])
         # Verifies the details of a floating_ip
-        _, floating_ip = self.client.show_floatingip(created_floating_ip['id'])
+        floating_ip = self.client.show_floatingip(created_floating_ip['id'])
         shown_floating_ip = floating_ip['floatingip']
         self.assertEqual(shown_floating_ip['id'], created_floating_ip['id'])
         self.assertEqual(shown_floating_ip['floating_network_id'],
@@ -94,13 +94,13 @@
         self.assertEqual(shown_floating_ip['port_id'], self.ports[0]['id'])
 
         # Verify the floating ip exists in the list of all floating_ips
-        _, floating_ips = self.client.list_floatingips()
+        floating_ips = self.client.list_floatingips()
         floatingip_id_list = list()
         for f in floating_ips['floatingips']:
             floatingip_id_list.append(f['id'])
         self.assertIn(created_floating_ip['id'], floatingip_id_list)
         # Associate floating IP to the other port
-        _, floating_ip = self.client.update_floatingip(
+        floating_ip = self.client.update_floatingip(
             created_floating_ip['id'],
             port_id=self.ports[1]['id'])
         updated_floating_ip = floating_ip['floatingip']
@@ -110,7 +110,7 @@
         self.assertEqual(updated_floating_ip['router_id'], self.router['id'])
 
         # Disassociate floating IP from the port
-        _, floating_ip = self.client.update_floatingip(
+        floating_ip = self.client.update_floatingip(
             created_floating_ip['id'],
             port_id=None)
         updated_floating_ip = floating_ip['floatingip']
@@ -121,21 +121,21 @@
     @test.attr(type='smoke')
     def test_floating_ip_delete_port(self):
         # Create a floating IP
-        _, body = self.client.create_floatingip(
+        body = self.client.create_floatingip(
             floating_network_id=self.ext_net_id)
         created_floating_ip = body['floatingip']
         self.addCleanup(self.client.delete_floatingip,
                         created_floating_ip['id'])
         # Create a port
-        resp, port = self.client.create_port(network_id=self.network['id'])
+        port = self.client.create_port(network_id=self.network['id'])
         created_port = port['port']
-        _, floating_ip = self.client.update_floatingip(
+        floating_ip = self.client.update_floatingip(
             created_floating_ip['id'],
             port_id=created_port['id'])
         # Delete port
         self.client.delete_port(created_port['id'])
         # Verifies the details of the floating_ip
-        _, floating_ip = self.client.show_floatingip(created_floating_ip['id'])
+        floating_ip = self.client.show_floatingip(created_floating_ip['id'])
         shown_floating_ip = floating_ip['floatingip']
         # Confirm the fields are back to None
         self.assertEqual(shown_floating_ip['id'], created_floating_ip['id'])
@@ -146,7 +146,7 @@
     @test.attr(type='smoke')
     def test_floating_ip_update_different_router(self):
         # Associate a floating IP to a port on a router
-        _, body = self.client.create_floatingip(
+        body = self.client.create_floatingip(
             floating_network_id=self.ext_net_id,
             port_id=self.ports[1]['id'])
         created_floating_ip = body['floatingip']
@@ -160,7 +160,7 @@
         self.create_router_interface(router2['id'], subnet2['id'])
         port_other_router = self.create_port(network2)
         # Associate floating IP to the other port on another router
-        _, floating_ip = self.client.update_floatingip(
+        floating_ip = self.client.update_floatingip(
             created_floating_ip['id'],
             port_id=port_other_router['id'])
         updated_floating_ip = floating_ip['floatingip']
@@ -171,7 +171,7 @@
 
     @test.attr(type='smoke')
     def test_create_floating_ip_specifying_a_fixed_ip_address(self):
-        _, body = self.client.create_floatingip(
+        body = self.client.create_floatingip(
             floating_network_id=self.ext_net_id,
             port_id=self.ports[1]['id'],
             fixed_ip_address=self.ports[1]['fixed_ips'][0]['ip_address'])
@@ -181,7 +181,7 @@
         self.assertIsNotNone(created_floating_ip['id'])
         self.assertEqual(created_floating_ip['fixed_ip_address'],
                          self.ports[1]['fixed_ips'][0]['ip_address'])
-        _, floating_ip = self.client.update_floatingip(
+        floating_ip = self.client.update_floatingip(
             created_floating_ip['id'],
             port_id=None)
         self.assertIsNone(floating_ip['floatingip']['port_id'])
@@ -193,12 +193,12 @@
         list_ips = [str(ip) for ip in ips[-3:-1]]
         fixed_ips = [{'ip_address': list_ips[0]}, {'ip_address': list_ips[1]}]
         # Create port
-        _, body = self.client.create_port(network_id=self.network['id'],
-                                          fixed_ips=fixed_ips)
+        body = self.client.create_port(network_id=self.network['id'],
+                                       fixed_ips=fixed_ips)
         port = body['port']
         self.addCleanup(self.client.delete_port, port['id'])
         # Create floating ip
-        _, body = self.client.create_floatingip(
+        body = self.client.create_floatingip(
             floating_network_id=self.ext_net_id,
             port_id=port['id'],
             fixed_ip_address=list_ips[0])
@@ -207,9 +207,9 @@
         self.assertIsNotNone(floating_ip['id'])
         self.assertEqual(floating_ip['fixed_ip_address'], list_ips[0])
         # Update floating ip
-        _, body = self.client.update_floatingip(floating_ip['id'],
-                                                port_id=port['id'],
-                                                fixed_ip_address=list_ips[1])
+        body = self.client.update_floatingip(floating_ip['id'],
+                                             port_id=port['id'],
+                                             fixed_ip_address=list_ips[1])
         update_floating_ip = body['floatingip']
         self.assertEqual(update_floating_ip['fixed_ip_address'],
                          list_ips[1])
diff --git a/tempest/api/network/test_fwaas_extensions.py b/tempest/api/network/test_fwaas_extensions.py
index 0c36820..8104567 100644
--- a/tempest/api/network/test_fwaas_extensions.py
+++ b/tempest/api/network/test_fwaas_extensions.py
@@ -88,7 +88,7 @@
         target_states = ('ACTIVE', 'CREATED')
 
         def _wait():
-            _, firewall = self.client.show_firewall(fw_id)
+            firewall = self.client.show_firewall(fw_id)
             firewall = firewall['firewall']
             return firewall['status'] in target_states
 
@@ -100,7 +100,7 @@
 
     def test_list_firewall_rules(self):
         # List firewall rules
-        _, fw_rules = self.client.list_firewall_rules()
+        fw_rules = self.client.list_firewall_rules()
         fw_rules = fw_rules['firewall_rules']
         self.assertIn((self.fw_rule['id'],
                        self.fw_rule['name'],
@@ -117,32 +117,32 @@
 
     def test_create_update_delete_firewall_rule(self):
         # Create firewall rule
-        _, body = self.client.create_firewall_rule(
+        body = self.client.create_firewall_rule(
             name=data_utils.rand_name("fw-rule"),
             action="allow",
             protocol="tcp")
         fw_rule_id = body['firewall_rule']['id']
 
         # Update firewall rule
-        _, body = self.client.update_firewall_rule(fw_rule_id,
-                                                   shared=True)
+        body = self.client.update_firewall_rule(fw_rule_id,
+                                                shared=True)
         self.assertTrue(body["firewall_rule"]['shared'])
 
         # Delete firewall rule
         self.client.delete_firewall_rule(fw_rule_id)
         # Confirm deletion
-        resp, fw_rules = self.client.list_firewall_rules()
+        fw_rules = self.client.list_firewall_rules()
         self.assertNotIn(fw_rule_id,
                          [m['id'] for m in fw_rules['firewall_rules']])
 
     def test_show_firewall_rule(self):
         # show a created firewall rule
-        _, fw_rule = self.client.show_firewall_rule(self.fw_rule['id'])
+        fw_rule = self.client.show_firewall_rule(self.fw_rule['id'])
         for key, value in fw_rule['firewall_rule'].iteritems():
             self.assertEqual(self.fw_rule[key], value)
 
     def test_list_firewall_policies(self):
-        _, fw_policies = self.client.list_firewall_policies()
+        fw_policies = self.client.list_firewall_policies()
         fw_policies = fw_policies['firewall_policies']
         self.assertIn((self.fw_policy['id'],
                        self.fw_policy['name'],
@@ -153,15 +153,15 @@
 
     def test_create_update_delete_firewall_policy(self):
         # Create firewall policy
-        _, body = self.client.create_firewall_policy(
+        body = self.client.create_firewall_policy(
             name=data_utils.rand_name("fw-policy"))
         fw_policy_id = body['firewall_policy']['id']
         self.addCleanup(self._try_delete_policy, fw_policy_id)
 
         # Update firewall policy
-        _, body = self.client.update_firewall_policy(fw_policy_id,
-                                                     shared=True,
-                                                     name="updated_policy")
+        body = self.client.update_firewall_policy(fw_policy_id,
+                                                  shared=True,
+                                                  name="updated_policy")
         updated_fw_policy = body["firewall_policy"]
         self.assertTrue(updated_fw_policy['shared'])
         self.assertEqual("updated_policy", updated_fw_policy['name'])
@@ -169,13 +169,13 @@
         # Delete firewall policy
         self.client.delete_firewall_policy(fw_policy_id)
         # Confirm deletion
-        resp, fw_policies = self.client.list_firewall_policies()
+        fw_policies = self.client.list_firewall_policies()
         fw_policies = fw_policies['firewall_policies']
         self.assertNotIn(fw_policy_id, [m['id'] for m in fw_policies])
 
     def test_show_firewall_policy(self):
         # show a created firewall policy
-        _, fw_policy = self.client.show_firewall_policy(self.fw_policy['id'])
+        fw_policy = self.client.show_firewall_policy(self.fw_policy['id'])
         fw_policy = fw_policy['firewall_policy']
         for key, value in fw_policy.iteritems():
             self.assertEqual(self.fw_policy[key], value)
@@ -191,7 +191,7 @@
             router['id'], subnet['id'])
 
         # Create firewall
-        _, body = self.client.create_firewall(
+        body = self.client.create_firewall(
             name=data_utils.rand_name("firewall"),
             firewall_policy_id=self.fw_policy['id'])
         created_firewall = body['firewall']
@@ -202,7 +202,7 @@
         self._wait_until_ready(firewall_id)
 
         # show a created firewall
-        _, firewall = self.client.show_firewall(firewall_id)
+        firewall = self.client.show_firewall(firewall_id)
         firewall = firewall['firewall']
 
         for key, value in firewall.iteritems():
@@ -211,7 +211,7 @@
             self.assertEqual(created_firewall[key], value)
 
         # list firewall
-        _, firewalls = self.client.list_firewalls()
+        firewalls = self.client.list_firewalls()
         firewalls = firewalls['firewalls']
         self.assertIn((created_firewall['id'],
                        created_firewall['name'],
@@ -226,14 +226,14 @@
     @test.attr(type='smoke')
     def test_firewall_rule_insertion_position_removal_rule_from_policy(self):
         # Create firewall rule
-        resp, body = self.client.create_firewall_rule(
+        body = self.client.create_firewall_rule(
             name=data_utils.rand_name("fw-rule"),
             action="allow",
             protocol="tcp")
         fw_rule_id1 = body['firewall_rule']['id']
         self.addCleanup(self._try_delete_rule, fw_rule_id1)
         # Create firewall policy
-        _, body = self.client.create_firewall_policy(
+        body = self.client.create_firewall_policy(
             name=data_utils.rand_name("fw-policy"))
         fw_policy_id = body['firewall_policy']['id']
         self.addCleanup(self._try_delete_policy, fw_policy_id)
@@ -245,7 +245,7 @@
         # Verify insertion of rule in policy
         self.assertIn(fw_rule_id1, self._get_list_fw_rule_ids(fw_policy_id))
         # Create another firewall rule
-        _, body = self.client.create_firewall_rule(
+        body = self.client.create_firewall_rule(
             name=data_utils.rand_name("fw-rule"),
             action="allow",
             protocol="icmp")
@@ -257,7 +257,7 @@
             fw_policy_id, fw_rule_id2, fw_rule_id1, '')
 
         # Verify the posiition of rule after insertion
-        _, fw_rule = self.client.show_firewall_rule(
+        fw_rule = self.client.show_firewall_rule(
             fw_rule_id2)
 
         self.assertEqual(int(fw_rule['firewall_rule']['position']), 2)
@@ -268,7 +268,7 @@
         self.client.insert_firewall_rule_in_policy(
             fw_policy_id, fw_rule_id2, '', fw_rule_id1)
         # Verify the posiition of rule after insertion
-        _, fw_rule = self.client.show_firewall_rule(
+        fw_rule = self.client.show_firewall_rule(
             fw_rule_id2)
         self.assertEqual(int(fw_rule['firewall_rule']['position']), 1)
         # Remove rule from the firewall policy
@@ -285,21 +285,21 @@
         self.assertNotIn(fw_rule_id1, self._get_list_fw_rule_ids(fw_policy_id))
 
     def _get_list_fw_rule_ids(self, fw_policy_id):
-        _, fw_policy = self.client.show_firewall_policy(
+        fw_policy = self.client.show_firewall_policy(
             fw_policy_id)
         return [ruleid for ruleid in fw_policy['firewall_policy']
                 ['firewall_rules']]
 
     def test_update_firewall_policy_audited_attribute(self):
         # Create firewall rule
-        _, body = self.client.create_firewall_rule(
+        body = self.client.create_firewall_rule(
             name=data_utils.rand_name("fw-rule"),
             action="allow",
             protocol="icmp")
         fw_rule_id = body['firewall_rule']['id']
         self.addCleanup(self._try_delete_rule, fw_rule_id)
         # Create firewall policy
-        _, body = self.client.create_firewall_policy(
+        body = self.client.create_firewall_policy(
             name=data_utils.rand_name('fw-policy'))
         fw_policy_id = body['firewall_policy']['id']
         self.addCleanup(self._try_delete_policy, fw_policy_id)
@@ -310,6 +310,6 @@
         # Insert Firewall rule to firewall policy
         self.client.insert_firewall_rule_in_policy(
             fw_policy_id, fw_rule_id, '', '')
-        _, body = self.client.show_firewall_policy(
+        body = self.client.show_firewall_policy(
             fw_policy_id)
         self.assertFalse(body['firewall_policy']['audited'])
diff --git a/tempest/api/network/test_load_balancer.py b/tempest/api/network/test_load_balancer.py
index 41294f6..289da7e 100644
--- a/tempest/api/network/test_load_balancer.py
+++ b/tempest/api/network/test_load_balancer.py
@@ -68,31 +68,31 @@
         delete_obj = getattr(self.client, 'delete_' + obj_name)
         list_objs = getattr(self.client, 'list_' + obj_name + 's')
 
-        _, body = create_obj(**kwargs)
+        body = create_obj(**kwargs)
         obj = body[obj_name]
         self.addCleanup(delete_obj, obj['id'])
         for key, value in obj.iteritems():
             # It is not relevant to filter by all arguments. That is why
             # there is a list of attr to except
             if key not in attr_exceptions:
-                _, body = list_objs(**{key: value})
+                body = list_objs(**{key: value})
                 objs = [v[key] for v in body[obj_name + 's']]
                 self.assertIn(value, objs)
 
     @test.attr(type='smoke')
     def test_list_vips(self):
         # Verify the vIP exists in the list of all vIPs
-        _, body = self.client.list_vips()
+        body = self.client.list_vips()
         vips = body['vips']
         self.assertIn(self.vip['id'], [v['id'] for v in vips])
 
     @test.attr(type='smoke')
     def test_list_vips_with_filter(self):
         name = data_utils.rand_name('vip-')
-        _, body = self.client.create_pool(name=data_utils.rand_name("pool-"),
-                                          lb_method="ROUND_ROBIN",
-                                          protocol="HTTPS",
-                                          subnet_id=self.subnet['id'])
+        body = self.client.create_pool(name=data_utils.rand_name("pool-"),
+                                       lb_method="ROUND_ROBIN",
+                                       protocol="HTTPS",
+                                       subnet_id=self.subnet['id'])
         pool = body['pool']
         self.addCleanup(self.client.delete_pool, pool['id'])
         attr_exceptions = ['status', 'session_persistence',
@@ -108,22 +108,22 @@
         # Creates a vip
         name = data_utils.rand_name('vip-')
         address = self.subnet['allocation_pools'][0]['end']
-        resp, body = self.client.create_pool(
+        body = self.client.create_pool(
             name=data_utils.rand_name("pool-"),
             lb_method='ROUND_ROBIN',
             protocol='HTTP',
             subnet_id=self.subnet['id'])
         pool = body['pool']
-        _, body = self.client.create_vip(name=name,
-                                         protocol="HTTP",
-                                         protocol_port=80,
-                                         subnet_id=self.subnet['id'],
-                                         pool_id=pool['id'],
-                                         address=address)
+        body = self.client.create_vip(name=name,
+                                      protocol="HTTP",
+                                      protocol_port=80,
+                                      subnet_id=self.subnet['id'],
+                                      pool_id=pool['id'],
+                                      address=address)
         vip = body['vip']
         vip_id = vip['id']
         # Confirm VIP's address correctness with a show
-        _, body = self.client.show_vip(vip_id)
+        body = self.client.show_vip(vip_id)
         vip = body['vip']
         self.assertEqual(address, vip['address'])
         # Verification of vip update
@@ -132,12 +132,12 @@
         persistence_type = "HTTP_COOKIE"
         update_data = {"session_persistence": {
             "type": persistence_type}}
-        _, body = self.client.update_vip(vip_id,
-                                         name=new_name,
-                                         description=new_description,
-                                         connection_limit=10,
-                                         admin_state_up=False,
-                                         **update_data)
+        body = self.client.update_vip(vip_id,
+                                      name=new_name,
+                                      description=new_description,
+                                      connection_limit=10,
+                                      admin_state_up=False,
+                                      **update_data)
         updated_vip = body['vip']
         self.assertEqual(new_name, updated_vip['name'])
         self.assertEqual(new_description, updated_vip['description'])
@@ -149,10 +149,10 @@
         self.client.wait_for_resource_deletion('vip', vip['id'])
         # Verification of pool update
         new_name = "New_pool"
-        _, body = self.client.update_pool(pool['id'],
-                                          name=new_name,
-                                          description="new_description",
-                                          lb_method='LEAST_CONNECTIONS')
+        body = self.client.update_pool(pool['id'],
+                                       name=new_name,
+                                       description="new_description",
+                                       lb_method='LEAST_CONNECTIONS')
         updated_pool = body['pool']
         self.assertEqual(new_name, updated_pool['name'])
         self.assertEqual('new_description', updated_pool['description'])
@@ -162,7 +162,7 @@
     @test.attr(type='smoke')
     def test_show_vip(self):
         # Verifies the details of a vip
-        _, body = self.client.show_vip(self.vip['id'])
+        body = self.client.show_vip(self.vip['id'])
         vip = body['vip']
         for key, value in vip.iteritems():
             # 'status' should not be confirmed in api tests
@@ -172,14 +172,14 @@
     @test.attr(type='smoke')
     def test_show_pool(self):
         # Here we need to new pool without any dependence with vips
-        _, body = self.client.create_pool(name=data_utils.rand_name("pool-"),
-                                          lb_method='ROUND_ROBIN',
-                                          protocol='HTTP',
-                                          subnet_id=self.subnet['id'])
+        body = self.client.create_pool(name=data_utils.rand_name("pool-"),
+                                       lb_method='ROUND_ROBIN',
+                                       protocol='HTTP',
+                                       subnet_id=self.subnet['id'])
         pool = body['pool']
         self.addCleanup(self.client.delete_pool, pool['id'])
         # Verifies the details of a pool
-        _, body = self.client.show_pool(pool['id'])
+        body = self.client.show_pool(pool['id'])
         shown_pool = body['pool']
         for key, value in pool.iteritems():
             # 'status' should not be confirmed in api tests
@@ -189,7 +189,7 @@
     @test.attr(type='smoke')
     def test_list_pools(self):
         # Verify the pool exists in the list of all pools
-        _, body = self.client.list_pools()
+        body = self.client.list_pools()
         pools = body['pools']
         self.assertIn(self.pool['id'], [p['id'] for p in pools])
 
@@ -207,7 +207,7 @@
     @test.attr(type='smoke')
     def test_list_members(self):
         # Verify the member exists in the list of all members
-        _, body = self.client.list_members()
+        body = self.client.list_members()
         members = body['members']
         self.assertIn(self.member['id'], [m['id'] for m in members])
 
@@ -222,13 +222,13 @@
     @test.attr(type='smoke')
     def test_create_update_delete_member(self):
         # Creates a member
-        _, body = self.client.create_member(address=self.member_address,
-                                            protocol_port=80,
-                                            pool_id=self.pool['id'])
+        body = self.client.create_member(address=self.member_address,
+                                         protocol_port=80,
+                                         pool_id=self.pool['id'])
         member = body['member']
         # Verification of member update
-        _, body = self.client.update_member(member['id'],
-                                            admin_state_up=False)
+        body = self.client.update_member(member['id'],
+                                         admin_state_up=False)
         updated_member = body['member']
         self.assertFalse(updated_member['admin_state_up'])
         # Verification of member delete
@@ -237,7 +237,7 @@
     @test.attr(type='smoke')
     def test_show_member(self):
         # Verifies the details of a member
-        _, body = self.client.show_member(self.member['id'])
+        body = self.client.show_member(self.member['id'])
         member = body['member']
         for key, value in member.iteritems():
             # 'status' should not be confirmed in api tests
@@ -247,7 +247,7 @@
     @test.attr(type='smoke')
     def test_list_health_monitors(self):
         # Verify the health monitor exists in the list of all health monitors
-        _, body = self.client.list_health_monitors()
+        body = self.client.list_health_monitors()
         health_monitors = body['health_monitors']
         self.assertIn(self.health_monitor['id'],
                       [h['id'] for h in health_monitors])
@@ -262,27 +262,27 @@
     @test.attr(type='smoke')
     def test_create_update_delete_health_monitor(self):
         # Creates a health_monitor
-        _, body = self.client.create_health_monitor(delay=4,
-                                                    max_retries=3,
-                                                    type="TCP",
-                                                    timeout=1)
+        body = self.client.create_health_monitor(delay=4,
+                                                 max_retries=3,
+                                                 type="TCP",
+                                                 timeout=1)
         health_monitor = body['health_monitor']
         # Verification of health_monitor update
-        _, body = (self.client.update_health_monitor
-                   (health_monitor['id'],
-                    admin_state_up=False))
+        body = (self.client.update_health_monitor
+                (health_monitor['id'],
+                 admin_state_up=False))
         updated_health_monitor = body['health_monitor']
         self.assertFalse(updated_health_monitor['admin_state_up'])
         # Verification of health_monitor delete
-        _, body = self.client.delete_health_monitor(health_monitor['id'])
+        body = self.client.delete_health_monitor(health_monitor['id'])
 
     @test.attr(type='smoke')
     def test_create_health_monitor_http_type(self):
         hm_type = "HTTP"
-        _, body = self.client.create_health_monitor(delay=4,
-                                                    max_retries=3,
-                                                    type=hm_type,
-                                                    timeout=1)
+        body = self.client.create_health_monitor(delay=4,
+                                                 max_retries=3,
+                                                 type=hm_type,
+                                                 timeout=1)
         health_monitor = body['health_monitor']
         self.addCleanup(self.client.delete_health_monitor,
                         health_monitor['id'])
@@ -290,18 +290,18 @@
 
     @test.attr(type='smoke')
     def test_update_health_monitor_http_method(self):
-        _, body = self.client.create_health_monitor(delay=4,
-                                                    max_retries=3,
-                                                    type="HTTP",
-                                                    timeout=1)
+        body = self.client.create_health_monitor(delay=4,
+                                                 max_retries=3,
+                                                 type="HTTP",
+                                                 timeout=1)
         health_monitor = body['health_monitor']
         self.addCleanup(self.client.delete_health_monitor,
                         health_monitor['id'])
-        _, body = (self.client.update_health_monitor
-                   (health_monitor['id'],
-                    http_method="POST",
-                    url_path="/home/user",
-                    expected_codes="290"))
+        body = (self.client.update_health_monitor
+                (health_monitor['id'],
+                 http_method="POST",
+                 url_path="/home/user",
+                 expected_codes="290"))
         updated_health_monitor = body['health_monitor']
         self.assertEqual("POST", updated_health_monitor['http_method'])
         self.assertEqual("/home/user", updated_health_monitor['url_path'])
@@ -310,7 +310,7 @@
     @test.attr(type='smoke')
     def test_show_health_monitor(self):
         # Verifies the details of a health_monitor
-        _, body = self.client.show_health_monitor(self.health_monitor['id'])
+        body = self.client.show_health_monitor(self.health_monitor['id'])
         health_monitor = body['health_monitor']
         for key, value in health_monitor.iteritems():
             # 'status' should not be confirmed in api tests
@@ -320,12 +320,12 @@
     @test.attr(type='smoke')
     def test_associate_disassociate_health_monitor_with_pool(self):
         # Verify that a health monitor can be associated with a pool
-        _, body = (self.client.associate_health_monitor_with_pool
-                   (self.health_monitor['id'], self.pool['id']))
-        resp, body = self.client.show_health_monitor(
+        self.client.associate_health_monitor_with_pool(
+            self.health_monitor['id'], self.pool['id'])
+        body = self.client.show_health_monitor(
             self.health_monitor['id'])
         health_monitor = body['health_monitor']
-        resp, body = self.client.show_pool(self.pool['id'])
+        body = self.client.show_pool(self.pool['id'])
         pool = body['pool']
         self.assertIn(pool['id'],
                       [p['pool_id'] for p in health_monitor['pools']])
@@ -333,9 +333,9 @@
         # Verify that a health monitor can be disassociated from a pool
         (self.client.disassociate_health_monitor_with_pool
             (self.health_monitor['id'], self.pool['id']))
-        _, body = self.client.show_pool(self.pool['id'])
+        body = self.client.show_pool(self.pool['id'])
         pool = body['pool']
-        resp, body = self.client.show_health_monitor(
+        body = self.client.show_health_monitor(
             self.health_monitor['id'])
         health_monitor = body['health_monitor']
         self.assertNotIn(health_monitor['id'], pool['health_monitors'])
@@ -345,7 +345,7 @@
     @test.attr(type='smoke')
     def test_get_lb_pool_stats(self):
         # Verify the details of pool stats
-        _, body = self.client.list_lb_pool_stats(self.pool['id'])
+        body = self.client.list_lb_pool_stats(self.pool['id'])
         stats = body['stats']
         self.assertIn("bytes_in", stats)
         self.assertIn("total_connections", stats)
@@ -358,10 +358,10 @@
             (self.health_monitor['id'], self.pool['id']))
         self.client.update_health_monitor(
             self.health_monitor['id'], admin_state_up=False)
-        _, body = self.client.show_pool(self.pool['id'])
+        body = self.client.show_pool(self.pool['id'])
         health_monitors = body['pool']['health_monitors']
         for health_monitor_id in health_monitors:
-            _, body = self.client.show_health_monitor(health_monitor_id)
+            body = self.client.show_health_monitor(health_monitor_id)
             self.assertFalse(body['health_monitor']['admin_state_up'])
             (self.client.disassociate_health_monitor_with_pool
                 (self.health_monitor['id'], self.pool['id']))
@@ -370,25 +370,25 @@
     def test_update_admin_state_up_of_pool(self):
         self.client.update_pool(self.pool['id'],
                                 admin_state_up=False)
-        _, body = self.client.show_pool(self.pool['id'])
+        body = self.client.show_pool(self.pool['id'])
         pool = body['pool']
         self.assertFalse(pool['admin_state_up'])
 
     @test.attr(type='smoke')
     def test_show_vip_associated_with_pool(self):
-        _, body = self.client.show_pool(self.pool['id'])
+        body = self.client.show_pool(self.pool['id'])
         pool = body['pool']
-        _, body = self.client.show_vip(pool['vip_id'])
+        body = self.client.show_vip(pool['vip_id'])
         vip = body['vip']
         self.assertEqual(self.vip['name'], vip['name'])
         self.assertEqual(self.vip['id'], vip['id'])
 
     @test.attr(type='smoke')
     def test_show_members_associated_with_pool(self):
-        _, body = self.client.show_pool(self.pool['id'])
+        body = self.client.show_pool(self.pool['id'])
         members = body['pool']['members']
         for member_id in members:
-            _, body = self.client.show_member(member_id)
+            body = self.client.show_member(member_id)
             self.assertIsNotNone(body['member']['status'])
             self.assertEqual(member_id, body['member']['id'])
             self.assertIsNotNone(body['member']['admin_state_up'])
@@ -396,28 +396,28 @@
     @test.attr(type='smoke')
     def test_update_pool_related_to_member(self):
         # Create new pool
-        _, body = self.client.create_pool(name=data_utils.rand_name("pool-"),
-                                          lb_method='ROUND_ROBIN',
-                                          protocol='HTTP',
-                                          subnet_id=self.subnet['id'])
+        body = self.client.create_pool(name=data_utils.rand_name("pool-"),
+                                       lb_method='ROUND_ROBIN',
+                                       protocol='HTTP',
+                                       subnet_id=self.subnet['id'])
         new_pool = body['pool']
         self.addCleanup(self.client.delete_pool, new_pool['id'])
         # Update member with new pool's id
-        _, body = self.client.update_member(self.member['id'],
-                                            pool_id=new_pool['id'])
+        body = self.client.update_member(self.member['id'],
+                                         pool_id=new_pool['id'])
         # Confirm with show that pool_id change
-        resp, body = self.client.show_member(self.member['id'])
+        body = self.client.show_member(self.member['id'])
         member = body['member']
         self.assertEqual(member['pool_id'], new_pool['id'])
         # Update member with old pool id, this is needed for clean up
-        _, body = self.client.update_member(self.member['id'],
-                                            pool_id=self.pool['id'])
+        body = self.client.update_member(self.member['id'],
+                                         pool_id=self.pool['id'])
 
     @test.attr(type='smoke')
     def test_update_member_weight(self):
         self.client.update_member(self.member['id'],
                                   weight=2)
-        _, body = self.client.show_member(self.member['id'])
+        body = self.client.show_member(self.member['id'])
         member = body['member']
         self.assertEqual(2, member['weight'])
 
diff --git a/tempest/api/network/test_metering_extensions.py b/tempest/api/network/test_metering_extensions.py
index daf9948..6ba1ea4 100644
--- a/tempest/api/network/test_metering_extensions.py
+++ b/tempest/api/network/test_metering_extensions.py
@@ -23,7 +23,7 @@
 LOG = logging.getLogger(__name__)
 
 
-class MeteringJSON(base.BaseAdminNetworkTest):
+class MeteringTestJSON(base.BaseAdminNetworkTest):
     _interface = 'json'
 
     """
@@ -36,7 +36,7 @@
 
     @classmethod
     def resource_setup(cls):
-        super(MeteringJSON, cls).resource_setup()
+        super(MeteringTestJSON, cls).resource_setup()
         if not test.is_extension_enabled('metering', 'network'):
             msg = "metering extension not enabled."
             raise cls.skipException(msg)
@@ -52,25 +52,24 @@
 
     def _delete_metering_label(self, metering_label_id):
         # Deletes a label and verifies if it is deleted or not
-        _, body = self.admin_client.delete_metering_label(metering_label_id)
+        self.admin_client.delete_metering_label(metering_label_id)
         # Asserting that the label is not found in list after deletion
-        resp, labels = (self.admin_client.list_metering_labels(
-                        id=metering_label_id))
+        labels = self.admin_client.list_metering_labels(id=metering_label_id)
         self.assertEqual(len(labels['metering_labels']), 0)
 
     def _delete_metering_label_rule(self, metering_label_rule_id):
         # Deletes a rule and verifies if it is deleted or not
-        _, body = (self.admin_client.delete_metering_label_rule(
-                   metering_label_rule_id))
+        self.admin_client.delete_metering_label_rule(
+            metering_label_rule_id)
         # Asserting that the rule is not found in list after deletion
-        resp, rules = (self.admin_client.list_metering_label_rules(
-                       id=metering_label_rule_id))
+        rules = (self.admin_client.list_metering_label_rules(
+                 id=metering_label_rule_id))
         self.assertEqual(len(rules['metering_label_rules']), 0)
 
     @test.attr(type='smoke')
     def test_list_metering_labels(self):
         # Verify label filtering
-        _, body = self.admin_client.list_metering_labels(id=33)
+        body = self.admin_client.list_metering_labels(id=33)
         metering_labels = body['metering_labels']
         self.assertEqual(0, len(metering_labels))
 
@@ -79,22 +78,21 @@
         # Creates a label
         name = data_utils.rand_name('metering-label-')
         description = "label created by tempest"
-        _, body = (self.admin_client.create_metering_label(name=name,
-                   description=description))
+        body = self.admin_client.create_metering_label(name=name,
+                                                       description=description)
         metering_label = body['metering_label']
         self.addCleanup(self._delete_metering_label,
                         metering_label['id'])
         # Assert whether created labels are found in labels list or fail
         # if created labels are not found in labels list
-        resp, labels = (self.admin_client.list_metering_labels(
-                        id=metering_label['id']))
+        labels = (self.admin_client.list_metering_labels(
+                  id=metering_label['id']))
         self.assertEqual(len(labels['metering_labels']), 1)
 
     @test.attr(type='smoke')
     def test_show_metering_label(self):
         # Verifies the details of a label
-        _, body = (self.admin_client.show_metering_label(
-                   self.metering_label['id']))
+        body = self.admin_client.show_metering_label(self.metering_label['id'])
         metering_label = body['metering_label']
         self.assertEqual(self.metering_label['id'], metering_label['id'])
         self.assertEqual(self.metering_label['tenant_id'],
@@ -106,7 +104,7 @@
     @test.attr(type='smoke')
     def test_list_metering_label_rules(self):
         # Verify rule filtering
-        _, body = self.admin_client.list_metering_label_rules(id=33)
+        body = self.admin_client.list_metering_label_rules(id=33)
         metering_label_rules = body['metering_label_rules']
         self.assertEqual(0, len(metering_label_rules))
 
@@ -115,24 +113,24 @@
         # Creates a rule
         remote_ip_prefix = ("10.0.1.0/24" if self._ip_version == 4
                             else "fd03::/64")
-        _, body = (self.admin_client.create_metering_label_rule(
-                   remote_ip_prefix=remote_ip_prefix,
-                   direction="ingress",
-                   metering_label_id=self.metering_label['id']))
+        body = (self.admin_client.create_metering_label_rule(
+                remote_ip_prefix=remote_ip_prefix,
+                direction="ingress",
+                metering_label_id=self.metering_label['id']))
         metering_label_rule = body['metering_label_rule']
         self.addCleanup(self._delete_metering_label_rule,
                         metering_label_rule['id'])
         # Assert whether created rules are found in rules list or fail
         # if created rules are not found in rules list
-        resp, rules = (self.admin_client.list_metering_label_rules(
-                       id=metering_label_rule['id']))
+        rules = (self.admin_client.list_metering_label_rules(
+                 id=metering_label_rule['id']))
         self.assertEqual(len(rules['metering_label_rules']), 1)
 
     @test.attr(type='smoke')
     def test_show_metering_label_rule(self):
         # Verifies the details of a rule
-        _, body = (self.admin_client.show_metering_label_rule(
-                   self.metering_label_rule['id']))
+        body = (self.admin_client.show_metering_label_rule(
+                self.metering_label_rule['id']))
         metering_label_rule = body['metering_label_rule']
         self.assertEqual(self.metering_label_rule['id'],
                          metering_label_rule['id'])
@@ -145,5 +143,5 @@
         self.assertFalse(metering_label_rule['excluded'])
 
 
-class MeteringIpV6JSON(MeteringJSON):
+class MeteringIpV6TestJSON(MeteringTestJSON):
     _ip_version = 6
diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py
index ccc489e..1f827da 100644
--- a/tempest/api/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -160,7 +160,7 @@
         self.assertEqual('ACTIVE', network['status'])
         # Verify network update
         new_name = "New_network"
-        _, body = self.client.update_network(net_id, name=new_name)
+        body = self.client.update_network(net_id, name=new_name)
         updated_net = body['network']
         self.assertEqual(updated_net['name'], new_name)
         # Find a cidr that is not in use yet and create a subnet with it
@@ -168,14 +168,14 @@
         subnet_id = subnet['id']
         # Verify subnet update
         new_name = "New_subnet"
-        _, body = self.client.update_subnet(subnet_id, name=new_name)
+        body = self.client.update_subnet(subnet_id, name=new_name)
         updated_subnet = body['subnet']
         self.assertEqual(updated_subnet['name'], new_name)
 
     @test.attr(type='smoke')
     def test_show_network(self):
         # Verify the details of a network
-        _, body = self.client.show_network(self.network['id'])
+        body = self.client.show_network(self.network['id'])
         network = body['network']
         for key in ['id', 'name']:
             self.assertEqual(network[key], self.network[key])
@@ -184,8 +184,8 @@
     def test_show_network_fields(self):
         # Verify specific fields of a network
         fields = ['id', 'name']
-        _, body = self.client.show_network(self.network['id'],
-                                           fields=fields)
+        body = self.client.show_network(self.network['id'],
+                                        fields=fields)
         network = body['network']
         self.assertEqual(sorted(network.keys()), sorted(fields))
         for field_name in fields:
@@ -194,7 +194,7 @@
     @test.attr(type='smoke')
     def test_list_networks(self):
         # Verify the network exists in the list of all networks
-        _, body = self.client.list_networks()
+        body = self.client.list_networks()
         networks = [network['id'] for network in body['networks']
                     if network['id'] == self.network['id']]
         self.assertNotEmpty(networks, "Created network not found in the list")
@@ -203,7 +203,7 @@
     def test_list_networks_fields(self):
         # Verify specific fields of the networks
         fields = ['id', 'name']
-        _, body = self.client.list_networks(fields=fields)
+        body = self.client.list_networks(fields=fields)
         networks = body['networks']
         self.assertNotEmpty(networks, "Network list returned is empty")
         for network in networks:
@@ -212,7 +212,7 @@
     @test.attr(type='smoke')
     def test_show_subnet(self):
         # Verify the details of a subnet
-        _, body = self.client.show_subnet(self.subnet['id'])
+        body = self.client.show_subnet(self.subnet['id'])
         subnet = body['subnet']
         self.assertNotEmpty(subnet, "Subnet returned has no fields")
         for key in ['id', 'cidr']:
@@ -223,8 +223,8 @@
     def test_show_subnet_fields(self):
         # Verify specific fields of a subnet
         fields = ['id', 'network_id']
-        _, body = self.client.show_subnet(self.subnet['id'],
-                                          fields=fields)
+        body = self.client.show_subnet(self.subnet['id'],
+                                       fields=fields)
         subnet = body['subnet']
         self.assertEqual(sorted(subnet.keys()), sorted(fields))
         for field_name in fields:
@@ -233,7 +233,7 @@
     @test.attr(type='smoke')
     def test_list_subnets(self):
         # Verify the subnet exists in the list of all subnets
-        _, body = self.client.list_subnets()
+        body = self.client.list_subnets()
         subnets = [subnet['id'] for subnet in body['subnets']
                    if subnet['id'] == self.subnet['id']]
         self.assertNotEmpty(subnets, "Created subnet not found in the list")
@@ -242,7 +242,7 @@
     def test_list_subnets_fields(self):
         # Verify specific fields of subnets
         fields = ['id', 'network_id']
-        _, body = self.client.list_subnets(fields=fields)
+        body = self.client.list_subnets(fields=fields)
         subnets = body['subnets']
         self.assertNotEmpty(subnets, "Subnet list returned is empty")
         for subnet in subnets:
@@ -260,7 +260,7 @@
     def test_delete_network_with_subnet(self):
         # Creates a network
         name = data_utils.rand_name('network-')
-        _, body = self.client.create_network(name=name)
+        body = self.client.create_network(name=name)
         network = body['network']
         net_id = network['id']
         self.addCleanup(self._try_delete_network, net_id)
@@ -270,7 +270,7 @@
         subnet_id = subnet['id']
 
         # Delete network while the subnet still exists
-        _, body = self.client.delete_network(net_id)
+        body = self.client.delete_network(net_id)
 
         # Verify that the subnet got automatically deleted.
         self.assertRaises(exceptions.NotFound, self.client.show_subnet,
@@ -331,8 +331,8 @@
                   'gateway_ip': new_gateway, 'enable_dhcp': True}
 
         new_name = "New_subnet"
-        _, body = self.client.update_subnet(subnet_id, name=new_name,
-                                            **kwargs)
+        body = self.client.update_subnet(subnet_id, name=new_name,
+                                         **kwargs)
         updated_subnet = body['subnet']
         kwargs['name'] = new_name
         self.assertEqual(sorted(updated_subnet['dns_nameservers']),
@@ -350,7 +350,7 @@
     @test.attr(type='smoke')
     def test_external_network_visibility(self):
         """Verifies user can see external networks but not subnets."""
-        _, body = self.client.list_networks(**{'router:external': True})
+        body = self.client.list_networks(**{'router:external': True})
         networks = [network['id'] for network in body['networks']]
         self.assertNotEmpty(networks, "No external networks found")
 
@@ -364,7 +364,7 @@
         # subnets_iter is a list (iterator) of lists. This flattens it to a
         # list of UUIDs
         public_subnets_iter = itertools.chain(*subnets_iter)
-        _, body = self.client.list_subnets()
+        body = self.client.list_subnets()
         subnets = [sub['id'] for sub in body['subnets']
                    if sub['id'] in public_subnets_iter]
         self.assertEmpty(subnets, "Public subnets visible")
@@ -396,7 +396,7 @@
         for n in created_networks:
             self.client.delete_network(n['id'])
         # Asserting that the networks are not found in the list after deletion
-        resp, body = self.client.list_networks()
+        body = self.client.list_networks()
         networks_list = [network['id'] for network in body['networks']]
         for n in created_networks:
             self.assertNotIn(n['id'], networks_list)
@@ -405,7 +405,7 @@
         for n in created_subnets:
             self.client.delete_subnet(n['id'])
         # Asserting that the subnets are not found in the list after deletion
-        resp, body = self.client.list_subnets()
+        body = self.client.list_subnets()
         subnets_list = [subnet['id'] for subnet in body['subnets']]
         for n in created_subnets:
             self.assertNotIn(n['id'], subnets_list)
@@ -414,7 +414,7 @@
         for n in created_ports:
             self.client.delete_port(n['id'])
         # Asserting that the ports are not found in the list after deletion
-        resp, body = self.client.list_ports()
+        body = self.client.list_ports()
         ports_list = [port['id'] for port in body['ports']]
         for n in created_ports:
             self.assertNotIn(n['id'], ports_list)
@@ -424,11 +424,11 @@
         # Creates 2 networks in one request
         network_names = [data_utils.rand_name('network-'),
                          data_utils.rand_name('network-')]
-        _, body = self.client.create_bulk_network(network_names)
+        body = self.client.create_bulk_network(network_names)
         created_networks = body['networks']
         self.addCleanup(self._delete_networks, created_networks)
         # Asserting that the networks are found in the list after creation
-        resp, body = self.client.list_networks()
+        body = self.client.list_networks()
         networks_list = [network['id'] for network in body['networks']]
         for n in created_networks:
             self.assertIsNotNone(n['id'])
@@ -455,11 +455,11 @@
             }
             subnets_list.append(p1)
         del subnets_list[1]['name']
-        _, body = self.client.create_bulk_subnet(subnets_list)
+        body = self.client.create_bulk_subnet(subnets_list)
         created_subnets = body['subnets']
         self.addCleanup(self._delete_subnets, created_subnets)
         # Asserting that the subnets are found in the list after creation
-        resp, body = self.client.list_subnets()
+        body = self.client.list_subnets()
         subnets_list = [subnet['id'] for subnet in body['subnets']]
         for n in created_subnets:
             self.assertIsNotNone(n['id'])
@@ -480,11 +480,11 @@
             }
             port_list.append(p1)
         del port_list[1]['name']
-        _, body = self.client.create_bulk_port(port_list)
+        body = self.client.create_bulk_port(port_list)
         created_ports = body['ports']
         self.addCleanup(self._delete_ports, created_ports)
         # Asserting that the ports are found in the list after creation
-        resp, body = self.client.list_ports()
+        body = self.client.list_ports()
         ports_list = [port['id'] for port in body['ports']]
         for n in created_ports:
             self.assertIsNotNone(n['id'])
@@ -534,7 +534,7 @@
         # Verifies Subnet GW is None in IPv4
         self.assertEqual(subnet2['gateway_ip'], None)
         # Verifies all 2 subnets in the same network
-        _, body = self.client.list_subnets()
+        body = self.client.list_subnets()
         subnets = [sub['id'] for sub in body['subnets']
                    if sub['network_id'] == network['id']]
         test_subnet_ids = [sub['id'] for sub in (subnet1, subnet2)]
diff --git a/tempest/api/network/test_ports.py b/tempest/api/network/test_ports.py
index d919f2e..80097db 100644
--- a/tempest/api/network/test_ports.py
+++ b/tempest/api/network/test_ports.py
@@ -45,23 +45,23 @@
 
     def _delete_port(self, port_id):
         self.client.delete_port(port_id)
-        _, body = self.client.list_ports()
+        body = self.client.list_ports()
         ports_list = body['ports']
         self.assertFalse(port_id in [n['id'] for n in ports_list])
 
     @test.attr(type='smoke')
     def test_create_update_delete_port(self):
         # Verify port creation
-        _, body = self.client.create_port(network_id=self.network['id'])
+        body = self.client.create_port(network_id=self.network['id'])
         port = body['port']
         # Schedule port deletion with verification upon test completion
         self.addCleanup(self._delete_port, port['id'])
         self.assertTrue(port['admin_state_up'])
         # Verify port update
         new_name = "New_Port"
-        _, body = self.client.update_port(port['id'],
-                                          name=new_name,
-                                          admin_state_up=False)
+        body = self.client.update_port(port['id'],
+                                       name=new_name,
+                                       admin_state_up=False)
         updated_port = body['port']
         self.assertEqual(updated_port['name'], new_name)
         self.assertFalse(updated_port['admin_state_up'])
@@ -72,7 +72,7 @@
         network2 = self.create_network(network_name=name)
         network_list = [network1['id'], network2['id']]
         port_list = [{'network_id': net_id} for net_id in network_list]
-        _, body = self.client.create_bulk_port(port_list)
+        body = self.client.create_bulk_port(port_list)
         created_ports = body['ports']
         port1 = created_ports[0]
         port2 = created_ports[1]
@@ -86,7 +86,7 @@
     @test.attr(type='smoke')
     def test_show_port(self):
         # Verify the details of port
-        _, body = self.client.show_port(self.port['id'])
+        body = self.client.show_port(self.port['id'])
         port = body['port']
         self.assertIn('id', port)
         # TODO(Santosh)- This is a temporary workaround to compare create_port
@@ -100,8 +100,8 @@
     def test_show_port_fields(self):
         # Verify specific fields of a port
         fields = ['id', 'mac_address']
-        _, body = self.client.show_port(self.port['id'],
-                                        fields=fields)
+        body = self.client.show_port(self.port['id'],
+                                     fields=fields)
         port = body['port']
         self.assertEqual(sorted(port.keys()), sorted(fields))
         for field_name in fields:
@@ -110,7 +110,7 @@
     @test.attr(type='smoke')
     def test_list_ports(self):
         # Verify the port exists in the list of all ports
-        _, body = self.client.list_ports()
+        body = self.client.list_ports()
         ports = [port['id'] for port in body['ports']
                  if port['id'] == self.port['id']]
         self.assertNotEmpty(ports, "Created port not found in the list")
@@ -121,14 +121,14 @@
         network = self.create_network()
         self.create_subnet(network)
         router = self.create_router(data_utils.rand_name('router-'))
-        resp, port = self.client.create_port(network_id=network['id'])
+        port = self.client.create_port(network_id=network['id'])
         # Add router interface to port created above
-        resp, interface = self.client.add_router_interface_with_port_id(
+        self.client.add_router_interface_with_port_id(
             router['id'], port['port']['id'])
         self.addCleanup(self.client.remove_router_interface_with_port_id,
                         router['id'], port['port']['id'])
         # List ports filtered by router_id
-        _, port_list = self.client.list_ports(device_id=router['id'])
+        port_list = self.client.list_ports(device_id=router['id'])
         ports = port_list['ports']
         self.assertEqual(len(ports), 1)
         self.assertEqual(ports[0]['id'], port['port']['id'])
@@ -138,7 +138,7 @@
     def test_list_ports_fields(self):
         # Verify specific fields of ports
         fields = ['id', 'mac_address']
-        _, body = self.client.list_ports(fields=fields)
+        body = self.client.list_ports(fields=fields)
         ports = body['ports']
         self.assertNotEmpty(ports, "Port list returned is empty")
         # Asserting the fields returned are correct
@@ -173,20 +173,19 @@
         self.create_subnet(self.network)
         security_groups_list = list()
         for name in security_groups_names:
-            _, group_create_body = self.client.create_security_group(
+            group_create_body = self.client.create_security_group(
                 name=name)
             self.addCleanup(self.client.delete_security_group,
                             group_create_body['security_group']['id'])
             security_groups_list.append(group_create_body['security_group']
                                         ['id'])
         # Create a port
-        _, body = self.client.create_port(**post_body)
+        body = self.client.create_port(**post_body)
         self.addCleanup(self.client.delete_port, body['port']['id'])
         port = body['port']
         # Update the port with security groups
         update_body = {"security_groups": security_groups_list}
-        _, body = self.client.update_port(
-            port['id'], **update_body)
+        body = self.client.update_port(port['id'], **update_body)
         # Verify the security groups updated to port
         port_show = body['port']
         for security_group in security_groups_list:
@@ -206,16 +205,16 @@
     @test.attr(type='smoke')
     def test_create_show_delete_port_user_defined_mac(self):
         # Create a port for a legal mac
-        _, body = self.client.create_port(network_id=self.network['id'])
+        body = self.client.create_port(network_id=self.network['id'])
         old_port = body['port']
         free_mac_address = old_port['mac_address']
         self.client.delete_port(old_port['id'])
         # Create a new port with user defined mac
-        _, body = self.client.create_port(network_id=self.network['id'],
-                                          mac_address=free_mac_address)
+        body = self.client.create_port(network_id=self.network['id'],
+                                       mac_address=free_mac_address)
         self.addCleanup(self.client.delete_port, body['port']['id'])
         port = body['port']
-        _, body = self.client.show_port(port['id'])
+        body = self.client.show_port(port['id'])
         show_port = body['port']
         self.assertEqual(free_mac_address,
                          show_port['mac_address'])
@@ -253,7 +252,7 @@
     def test_create_port_binding_ext_attr(self):
         post_body = {"network_id": self.network['id'],
                      "binding:host_id": self.host_id}
-        _, body = self.admin_client.create_port(**post_body)
+        body = self.admin_client.create_port(**post_body)
         port = body['port']
         self.addCleanup(self.admin_client.delete_port, port['id'])
         host_id = port['binding:host_id']
@@ -263,11 +262,11 @@
     @test.attr(type='smoke')
     def test_update_port_binding_ext_attr(self):
         post_body = {"network_id": self.network['id']}
-        _, body = self.admin_client.create_port(**post_body)
+        body = self.admin_client.create_port(**post_body)
         port = body['port']
         self.addCleanup(self.admin_client.delete_port, port['id'])
         update_body = {"binding:host_id": self.host_id}
-        _, body = self.admin_client.update_port(port['id'], **update_body)
+        body = self.admin_client.update_port(port['id'], **update_body)
         updated_port = body['port']
         host_id = updated_port['binding:host_id']
         self.assertIsNotNone(host_id)
@@ -277,7 +276,7 @@
     def test_list_ports_binding_ext_attr(self):
         # Create a new port
         post_body = {"network_id": self.network['id']}
-        _, body = self.admin_client.create_port(**post_body)
+        body = self.admin_client.create_port(**post_body)
         port = body['port']
         self.addCleanup(self.admin_client.delete_port, port['id'])
 
@@ -288,7 +287,7 @@
 
         # List all ports, ensure new port is part of list and its binding
         # attributes are set and accurate
-        _, body = self.admin_client.list_ports()
+        body = self.admin_client.list_ports()
         ports_list = body['ports']
         pids_list = [p['id'] for p in ports_list]
         self.assertIn(port['id'], pids_list)
@@ -300,10 +299,10 @@
 
     @test.attr(type='smoke')
     def test_show_port_binding_ext_attr(self):
-        _, body = self.admin_client.create_port(network_id=self.network['id'])
+        body = self.admin_client.create_port(network_id=self.network['id'])
         port = body['port']
         self.addCleanup(self.admin_client.delete_port, port['id'])
-        _, body = self.admin_client.show_port(port['id'])
+        body = self.admin_client.show_port(port['id'])
         show_port = body['port']
         self.assertEqual(port['binding:host_id'],
                          show_port['binding:host_id'])
diff --git a/tempest/api/network/test_routers.py b/tempest/api/network/test_routers.py
index 34650c5..5e8a851 100644
--- a/tempest/api/network/test_routers.py
+++ b/tempest/api/network/test_routers.py
@@ -57,7 +57,7 @@
         # NOTE(salv-orlando): Do not invoke self.create_router
         # as we need to check the response code
         name = data_utils.rand_name('router-')
-        _, create_body = self.client.create_router(
+        create_body = self.client.create_router(
             name, external_gateway_info={
                 "network_id": CONF.network.public_network_id},
             admin_state_up=False)
@@ -68,24 +68,24 @@
             CONF.network.public_network_id)
         self.assertEqual(create_body['router']['admin_state_up'], False)
         # Show details of the created router
-        _, show_body = self.client.show_router(create_body['router']['id'])
+        show_body = self.client.show_router(create_body['router']['id'])
         self.assertEqual(show_body['router']['name'], name)
         self.assertEqual(
             show_body['router']['external_gateway_info']['network_id'],
             CONF.network.public_network_id)
         self.assertEqual(show_body['router']['admin_state_up'], False)
         # List routers and verify if created router is there in response
-        _, list_body = self.client.list_routers()
+        list_body = self.client.list_routers()
         routers_list = list()
         for router in list_body['routers']:
             routers_list.append(router['id'])
         self.assertIn(create_body['router']['id'], routers_list)
         # Update the name of router and verify if it is updated
         updated_name = 'updated ' + name
-        _, update_body = self.client.update_router(create_body['router']['id'],
-                                                   name=updated_name)
+        update_body = self.client.update_router(create_body['router']['id'],
+                                                name=updated_name)
         self.assertEqual(update_body['router']['name'], updated_name)
-        resp, show_body = self.client.show_router(
+        show_body = self.client.show_router(
             create_body['router']['id'])
         self.assertEqual(show_body['router']['name'], updated_name)
 
@@ -100,8 +100,8 @@
         self.addCleanup(self.identity_admin_client.delete_tenant, tenant_id)
 
         name = data_utils.rand_name('router-')
-        _, create_body = self.admin_client.create_router(name,
-                                                         tenant_id=tenant_id)
+        create_body = self.admin_client.create_router(name,
+                                                      tenant_id=tenant_id)
         self.addCleanup(self.admin_client.delete_router,
                         create_body['router']['id'])
         self.assertEqual(tenant_id, create_body['router']['tenant_id'])
@@ -127,7 +127,7 @@
             external_gateway_info = {
                 'network_id': CONF.network.public_network_id,
                 'enable_snat': enable_snat}
-            _, create_body = self.admin_client.create_router(
+            create_body = self.admin_client.create_router(
                 name, external_gateway_info=external_gateway_info)
             self.addCleanup(self.admin_client.delete_router,
                             create_body['router']['id'])
@@ -141,14 +141,14 @@
         subnet = self.create_subnet(network)
         router = self._create_router(data_utils.rand_name('router-'))
         # Add router interface with subnet id
-        _, interface = self.client.add_router_interface_with_subnet_id(
+        interface = self.client.add_router_interface_with_subnet_id(
             router['id'], subnet['id'])
         self.addCleanup(self._remove_router_interface_with_subnet_id,
                         router['id'], subnet['id'])
         self.assertIn('subnet_id', interface.keys())
         self.assertIn('port_id', interface.keys())
         # Verify router id is equal to device id in port details
-        resp, show_port_body = self.client.show_port(
+        show_port_body = self.client.show_port(
             interface['port_id'])
         self.assertEqual(show_port_body['port']['device_id'],
                          router['id'])
@@ -158,23 +158,23 @@
         network = self.create_network()
         self.create_subnet(network)
         router = self._create_router(data_utils.rand_name('router-'))
-        resp, port_body = self.client.create_port(
+        port_body = self.client.create_port(
             network_id=network['id'])
         # add router interface to port created above
-        _, interface = self.client.add_router_interface_with_port_id(
+        interface = self.client.add_router_interface_with_port_id(
             router['id'], port_body['port']['id'])
         self.addCleanup(self._remove_router_interface_with_port_id,
                         router['id'], port_body['port']['id'])
         self.assertIn('subnet_id', interface.keys())
         self.assertIn('port_id', interface.keys())
         # Verify router id is equal to device id in port details
-        resp, show_port_body = self.client.show_port(
+        show_port_body = self.client.show_port(
             interface['port_id'])
         self.assertEqual(show_port_body['port']['device_id'],
                          router['id'])
 
     def _verify_router_gateway(self, router_id, exp_ext_gw_info=None):
-        _, show_body = self.admin_client.show_router(router_id)
+        show_body = self.admin_client.show_router(router_id)
         actual_ext_gw_info = show_body['router']['external_gateway_info']
         if exp_ext_gw_info is None:
             self.assertIsNone(actual_ext_gw_info)
@@ -184,14 +184,14 @@
             self.assertEqual(v, actual_ext_gw_info[k])
 
     def _verify_gateway_port(self, router_id):
-        resp, list_body = self.admin_client.list_ports(
+        list_body = self.admin_client.list_ports(
             network_id=CONF.network.public_network_id,
             device_id=router_id)
         self.assertEqual(len(list_body['ports']), 1)
         gw_port = list_body['ports'][0]
         fixed_ips = gw_port['fixed_ips']
         self.assertGreaterEqual(len(fixed_ips), 1)
-        resp, public_net_body = self.admin_client.show_network(
+        public_net_body = self.admin_client.show_network(
             CONF.network.public_network_id)
         public_subnet_id = public_net_body['network']['subnets'][0]
         self.assertIn(public_subnet_id,
@@ -205,7 +205,6 @@
             external_gateway_info={
                 'network_id': CONF.network.public_network_id})
         # Verify operation - router
-        _, show_body = self.client.show_router(router['id'])
         self._verify_router_gateway(
             router['id'],
             {'network_id': CONF.network.public_network_id})
@@ -249,7 +248,7 @@
         self.client.update_router(router['id'], external_gateway_info={})
         self._verify_router_gateway(router['id'])
         # No gateway port expected
-        resp, list_body = self.admin_client.list_ports(
+        list_body = self.admin_client.list_ports(
             network_id=CONF.network.public_network_id,
             device_id=router['id'])
         self.assertFalse(list_body['ports'])
@@ -289,31 +288,31 @@
         cidr = netaddr.IPNetwork(self.subnet['cidr'])
         next_hop = str(cidr[2])
         destination = str(self.subnet['cidr'])
-        _, extra_route = self.client.update_extra_routes(self.router['id'],
-                                                         next_hop, destination)
+        extra_route = self.client.update_extra_routes(self.router['id'],
+                                                      next_hop, destination)
         self.assertEqual(1, len(extra_route['router']['routes']))
         self.assertEqual(destination,
                          extra_route['router']['routes'][0]['destination'])
         self.assertEqual(next_hop,
                          extra_route['router']['routes'][0]['nexthop'])
-        _, show_body = self.client.show_router(self.router['id'])
+        show_body = self.client.show_router(self.router['id'])
         self.assertEqual(destination,
                          show_body['router']['routes'][0]['destination'])
         self.assertEqual(next_hop,
                          show_body['router']['routes'][0]['nexthop'])
 
     def _delete_extra_routes(self, router_id):
-        resp, _ = self.client.delete_extra_routes(router_id)
+        self.client.delete_extra_routes(router_id)
 
     @test.attr(type='smoke')
     def test_update_router_admin_state(self):
         self.router = self._create_router(data_utils.rand_name('router-'))
         self.assertFalse(self.router['admin_state_up'])
         # Update router admin state
-        _, update_body = self.client.update_router(self.router['id'],
-                                                   admin_state_up=True)
+        update_body = self.client.update_router(self.router['id'],
+                                                admin_state_up=True)
         self.assertTrue(update_body['router']['admin_state_up'])
-        _, show_body = self.client.show_router(self.router['id'])
+        show_body = self.client.show_router(self.router['id'])
         self.assertTrue(show_body['router']['admin_state_up'])
 
     @test.attr(type='smoke')
@@ -336,7 +335,7 @@
                                       interface02['port_id'])
 
     def _verify_router_interface(self, router_id, subnet_id, port_id):
-        _, show_port_body = self.client.show_port(port_id)
+        show_port_body = self.client.show_port(port_id)
         interface_port = show_port_body['port']
         self.assertEqual(router_id, interface_port['device_id'])
         self.assertEqual(subnet_id,
diff --git a/tempest/api/network/test_security_groups.py b/tempest/api/network/test_security_groups.py
index b995b1d..415dedd 100644
--- a/tempest/api/network/test_security_groups.py
+++ b/tempest/api/network/test_security_groups.py
@@ -42,7 +42,7 @@
                                            remote_ip_prefix=None):
         # Create Security Group rule with the input params and validate
         # that SG rule is created with the same parameters.
-        resp, rule_create_body = self.client.create_security_group_rule(
+        rule_create_body = self.client.create_security_group_rule(
             security_group_id=sg_id,
             direction=direction,
             ethertype=ethertype,
@@ -71,7 +71,7 @@
     @test.attr(type='smoke')
     def test_list_security_groups(self):
         # Verify the that security group belonging to tenant exist in list
-        _, body = self.client.list_security_groups()
+        body = self.client.list_security_groups()
         security_groups = body['security_groups']
         found = None
         for n in security_groups:
@@ -85,7 +85,7 @@
         group_create_body, name = self._create_security_group()
 
         # List security groups and verify if created group is there in response
-        _, list_body = self.client.list_security_groups()
+        list_body = self.client.list_security_groups()
         secgroup_list = list()
         for secgroup in list_body['security_groups']:
             secgroup_list.append(secgroup['id'])
@@ -93,7 +93,7 @@
         # Update the security group
         new_name = data_utils.rand_name('security-')
         new_description = data_utils.rand_name('security-description')
-        _, update_body = self.client.update_security_group(
+        update_body = self.client.update_security_group(
             group_create_body['security_group']['id'],
             name=new_name,
             description=new_description)
@@ -102,7 +102,7 @@
         self.assertEqual(update_body['security_group']['description'],
                          new_description)
         # Show details of the updated security group
-        resp, show_body = self.client.show_security_group(
+        show_body = self.client.show_security_group(
             group_create_body['security_group']['id'])
         self.assertEqual(show_body['security_group']['name'], new_name)
         self.assertEqual(show_body['security_group']['description'],
@@ -115,7 +115,7 @@
         # Create rules for each protocol
         protocols = ['tcp', 'udp', 'icmp']
         for protocol in protocols:
-            _, rule_create_body = self.client.create_security_group_rule(
+            rule_create_body = self.client.create_security_group_rule(
                 security_group_id=group_create_body['security_group']['id'],
                 protocol=protocol,
                 direction='ingress',
@@ -123,7 +123,7 @@
             )
 
             # Show details of the created security rule
-            _, show_rule_body = self.client.show_security_group_rule(
+            show_rule_body = self.client.show_security_group_rule(
                 rule_create_body['security_group_rule']['id']
             )
             create_dict = rule_create_body['security_group_rule']
@@ -133,7 +133,7 @@
                                  "%s does not match." % key)
 
             # List rules and verify created rule is in response
-            _, rule_list_body = self.client.list_security_group_rules()
+            rule_list_body = self.client.list_security_group_rules()
             rule_list = [rule['id']
                          for rule in rule_list_body['security_group_rules']]
             self.assertIn(rule_create_body['security_group_rule']['id'],
@@ -221,7 +221,7 @@
         direction = 'ingress'
         protocol = 17
         security_group_id = group_create_body['security_group']['id']
-        _, rule_create_body = self.client.create_security_group_rule(
+        rule_create_body = self.client.create_security_group_rule(
             security_group_id=security_group_id,
             direction=direction,
             protocol=protocol
diff --git a/tempest/api/network/test_security_groups_negative.py b/tempest/api/network/test_security_groups_negative.py
index b9e8666..fb51e30 100644
--- a/tempest/api/network/test_security_groups_negative.py
+++ b/tempest/api/network/test_security_groups_negative.py
@@ -164,7 +164,7 @@
         min_port = 66
         max_port = 67
         # Create a rule with valid params
-        resp, _ = self.client.create_security_group_rule(
+        self.client.create_security_group_rule(
             security_group_id=body['security_group']['id'],
             direction='ingress',
             ethertype=self.ethertype,
@@ -193,3 +193,22 @@
 class NegativeSecGroupIPv6Test(NegativeSecGroupTest):
     _ip_version = 6
     _tenant_network_cidr = CONF.network.tenant_network_v6_cidr
+
+    @test.attr(type=['negative', 'gate'])
+    def test_create_security_group_rule_wrong_ip_prefix_version(self):
+        group_create_body, _ = self._create_security_group()
+
+        # Create rule with bad remote_ip_prefix
+        pairs = ({'ethertype': 'IPv6',
+                  'ip_prefix': CONF.network.tenant_network_cidr},
+                 {'ethertype': 'IPv4',
+                  'ip_prefix': CONF.network.tenant_network_v6_cidr})
+        for pair in pairs:
+            self.assertRaisesRegexp(
+                exceptions.BadRequest,
+                "Conflicting value ethertype",
+                self.client.create_security_group_rule,
+                security_group_id=group_create_body['security_group']['id'],
+                protocol='tcp', direction='ingress',
+                ethertype=pair['ethertype'],
+                remote_ip_prefix=pair['ip_prefix'])
diff --git a/tempest/api/network/test_service_type_management.py b/tempest/api/network/test_service_type_management.py
index 7f8b479..447c3f3 100644
--- a/tempest/api/network/test_service_type_management.py
+++ b/tempest/api/network/test_service_type_management.py
@@ -27,5 +27,5 @@
     @test.skip_because(bug="1400370")
     @test.attr(type='smoke')
     def test_service_provider_list(self):
-        _, body = self.client.list_service_providers()
+        body = self.client.list_service_providers()
         self.assertIsInstance(body['service_providers'], list)
diff --git a/tempest/api/network/test_vpnaas_extensions.py b/tempest/api/network/test_vpnaas_extensions.py
index 46f10c4..56e1a05 100644
--- a/tempest/api/network/test_vpnaas_extensions.py
+++ b/tempest/api/network/test_vpnaas_extensions.py
@@ -57,13 +57,13 @@
     def _delete_ike_policy(self, ike_policy_id):
         # Deletes a ike policy and verifies if it is deleted or not
         ike_list = list()
-        resp, all_ike = self.client.list_ikepolicies()
+        all_ike = self.client.list_ikepolicies()
         for ike in all_ike['ikepolicies']:
             ike_list.append(ike['id'])
         if ike_policy_id in ike_list:
             self.client.delete_ikepolicy(ike_policy_id)
             # Asserting that the policy is not found in list after deletion
-            resp, ikepolicies = self.client.list_ikepolicies()
+            ikepolicies = self.client.list_ikepolicies()
             ike_id_list = list()
             for i in ikepolicies['ikepolicies']:
                 ike_id_list.append(i['id'])
@@ -86,7 +86,7 @@
     def _delete_vpn_service(self, vpn_service_id):
         self.client.delete_vpnservice(vpn_service_id)
         # Asserting if vpn service is found in the list after deletion
-        _, body = self.client.list_vpnservices()
+        body = self.client.list_vpnservices()
         vpn_services = [vs['id'] for vs in body['vpnservices']]
         self.assertNotIn(vpn_service_id, vpn_services)
 
@@ -97,7 +97,7 @@
         # TODO(jroovers) This is a temporary workaround to get the tenant_id
         # of the the current client. Replace this once tenant_isolation for
         # neutron is fixed.
-        _, body = self.client.show_network(self.network['id'])
+        body = self.client.show_network(self.network['id'])
         return body['network']['tenant_id']
 
     @test.attr(type='smoke')
@@ -105,15 +105,15 @@
         tenant_id = self._get_tenant_id()
         # Create IPSec policy for the newly created tenant
         name = data_utils.rand_name('ipsec-policy')
-        _, body = (self.admin_client.
-                   create_ipsecpolicy(name=name, tenant_id=tenant_id))
+        body = (self.admin_client.
+                create_ipsecpolicy(name=name, tenant_id=tenant_id))
         ipsecpolicy = body['ipsecpolicy']
         self.assertIsNotNone(ipsecpolicy['id'])
         self.addCleanup(self.admin_client.delete_ipsecpolicy,
                         ipsecpolicy['id'])
 
         # Assert that created ipsec policy is found in API list call
-        _, body = self.client.list_ipsecpolicies()
+        body = self.client.list_ipsecpolicies()
         ipsecpolicies = [policy['id'] for policy in body['ipsecpolicies']]
         self.assertIn(ipsecpolicy['id'], ipsecpolicies)
 
@@ -128,7 +128,7 @@
                                      external_network_id=self.ext_net_id)
         self.create_router_interface(router2['id'], subnet2['id'])
         name = data_utils.rand_name('vpn-service')
-        _, body = self.admin_client.create_vpnservice(
+        body = self.admin_client.create_vpnservice(
             subnet_id=subnet2['id'],
             router_id=router2['id'],
             name=name,
@@ -138,7 +138,7 @@
         self.assertIsNotNone(vpnservice['id'])
         self.addCleanup(self.admin_client.delete_vpnservice, vpnservice['id'])
         # Assert that created vpnservice is found in API list call
-        _, body = self.client.list_vpnservices()
+        body = self.client.list_vpnservices()
         vpn_services = [vs['id'] for vs in body['vpnservices']]
         self.assertIn(vpnservice['id'], vpn_services)
 
@@ -148,24 +148,24 @@
 
         # Create IKE policy for the newly created tenant
         name = data_utils.rand_name('ike-policy')
-        _, body = (self.admin_client.
-                   create_ikepolicy(name=name, ike_version="v1",
-                                    encryption_algorithm="aes-128",
-                                    auth_algorithm="sha1",
-                                    tenant_id=tenant_id))
+        body = (self.admin_client.
+                create_ikepolicy(name=name, ike_version="v1",
+                                 encryption_algorithm="aes-128",
+                                 auth_algorithm="sha1",
+                                 tenant_id=tenant_id))
         ikepolicy = body['ikepolicy']
         self.assertIsNotNone(ikepolicy['id'])
         self.addCleanup(self.admin_client.delete_ikepolicy, ikepolicy['id'])
 
         # Assert that created ike policy is found in API list call
-        _, body = self.client.list_ikepolicies()
+        body = self.client.list_ikepolicies()
         ikepolicies = [ikp['id'] for ikp in body['ikepolicies']]
         self.assertIn(ikepolicy['id'], ikepolicies)
 
     @test.attr(type='smoke')
     def test_list_vpn_services(self):
         # Verify the VPN service exists in the list of all VPN services
-        _, body = self.client.list_vpnservices()
+        body = self.client.list_vpnservices()
         vpnservices = body['vpnservices']
         self.assertIn(self.vpnservice['id'], [v['id'] for v in vpnservices])
 
@@ -178,14 +178,14 @@
                                      external_network_id=self.ext_net_id)
         self.create_router_interface(router1['id'], subnet1['id'])
         name = data_utils.rand_name('vpn-service1')
-        _, body = self.client.create_vpnservice(subnet_id=subnet1['id'],
-                                                router_id=router1['id'],
-                                                name=name,
-                                                admin_state_up=True)
+        body = self.client.create_vpnservice(subnet_id=subnet1['id'],
+                                             router_id=router1['id'],
+                                             name=name,
+                                             admin_state_up=True)
         vpnservice = body['vpnservice']
         self.addCleanup(self._delete_vpn_service, vpnservice['id'])
         # Assert if created vpnservices are not found in vpnservices list
-        resp, body = self.client.list_vpnservices()
+        body = self.client.list_vpnservices()
         vpn_services = [vs['id'] for vs in body['vpnservices']]
         self.assertIsNotNone(vpnservice['id'])
         self.assertIn(vpnservice['id'], vpn_services)
@@ -198,7 +198,7 @@
     @test.attr(type='smoke')
     def test_show_vpn_service(self):
         # Verifies the details of a vpn service
-        _, body = self.client.show_vpnservice(self.vpnservice['id'])
+        body = self.client.show_vpnservice(self.vpnservice['id'])
         vpnservice = body['vpnservice']
         self.assertEqual(self.vpnservice['id'], vpnservice['id'])
         self.assertEqual(self.vpnservice['name'], vpnservice['name'])
@@ -214,7 +214,7 @@
     @test.attr(type='smoke')
     def test_list_ike_policies(self):
         # Verify the ike policy exists in the list of all IKE policies
-        _, body = self.client.list_ikepolicies()
+        body = self.client.list_ikepolicies()
         ikepolicies = body['ikepolicies']
         self.assertIn(self.ikepolicy['id'], [i['id'] for i in ikepolicies])
 
@@ -222,11 +222,11 @@
     def test_create_update_delete_ike_policy(self):
         # Creates a IKE policy
         name = data_utils.rand_name('ike-policy')
-        _, body = (self.client.create_ikepolicy(
-                   name=name,
-                   ike_version="v1",
-                   encryption_algorithm="aes-128",
-                   auth_algorithm="sha1"))
+        body = (self.client.create_ikepolicy(
+                name=name,
+                ike_version="v1",
+                encryption_algorithm="aes-128",
+                auth_algorithm="sha1"))
         ikepolicy = body['ikepolicy']
         self.assertIsNotNone(ikepolicy['id'])
         self.addCleanup(self._delete_ike_policy, ikepolicy['id'])
@@ -240,7 +240,7 @@
                    'lifetime': {'units': "seconds", 'value': 2000}}
         self.client.update_ikepolicy(ikepolicy['id'], **new_ike)
         # Confirm that update was successful by verifying using 'show'
-        _, body = self.client.show_ikepolicy(ikepolicy['id'])
+        body = self.client.show_ikepolicy(ikepolicy['id'])
         ike_policy = body['ikepolicy']
         for key, value in new_ike.iteritems():
             self.assertIn(key, ike_policy)
@@ -248,14 +248,14 @@
 
         # Verification of ike policy delete
         self.client.delete_ikepolicy(ikepolicy['id'])
-        _, body = self.client.list_ikepolicies()
+        body = self.client.list_ikepolicies()
         ikepolicies = [ikp['id'] for ikp in body['ikepolicies']]
         self.assertNotIn(ike_policy['id'], ikepolicies)
 
     @test.attr(type='smoke')
     def test_show_ike_policy(self):
         # Verifies the details of a ike policy
-        _, body = self.client.show_ikepolicy(self.ikepolicy['id'])
+        body = self.client.show_ikepolicy(self.ikepolicy['id'])
         ikepolicy = body['ikepolicy']
         self.assertEqual(self.ikepolicy['id'], ikepolicy['id'])
         self.assertEqual(self.ikepolicy['name'], ikepolicy['name'])
@@ -277,7 +277,7 @@
     @test.attr(type='smoke')
     def test_list_ipsec_policies(self):
         # Verify the ipsec policy exists in the list of all ipsec policies
-        _, body = self.client.list_ipsecpolicies()
+        body = self.client.list_ipsecpolicies()
         ipsecpolicies = body['ipsecpolicies']
         self.assertIn(self.ipsecpolicy['id'], [i['id'] for i in ipsecpolicies])
 
@@ -288,7 +288,7 @@
                              'pfs': 'group5',
                              'encryption_algorithm': "aes-128",
                              'auth_algorithm': 'sha1'}
-        _, resp_body = self.client.create_ipsecpolicy(**ipsec_policy_body)
+        resp_body = self.client.create_ipsecpolicy(**ipsec_policy_body)
         ipsecpolicy = resp_body['ipsecpolicy']
         self.addCleanup(self._delete_ipsec_policy, ipsecpolicy['id'])
         self._assertExpected(ipsec_policy_body, ipsecpolicy)
@@ -298,8 +298,8 @@
                      'name': data_utils.rand_name("New-IPSec"),
                      'encryption_algorithm': "aes-256",
                      'lifetime': {'units': "seconds", 'value': '2000'}}
-        _, body = self.client.update_ipsecpolicy(ipsecpolicy['id'],
-                                                 **new_ipsec)
+        body = self.client.update_ipsecpolicy(ipsecpolicy['id'],
+                                              **new_ipsec)
         updated_ipsec_policy = body['ipsecpolicy']
         self._assertExpected(new_ipsec, updated_ipsec_policy)
         # Verification of ipsec policy delete
@@ -310,6 +310,6 @@
     @test.attr(type='smoke')
     def test_show_ipsec_policy(self):
         # Verifies the details of an ipsec policy
-        _, body = self.client.show_ipsecpolicy(self.ipsecpolicy['id'])
+        body = self.client.show_ipsecpolicy(self.ipsecpolicy['id'])
         ipsecpolicy = body['ipsecpolicy']
         self._assertExpected(self.ipsecpolicy, ipsecpolicy)
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index 5a586fc..6896362 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -51,7 +51,7 @@
 
     @classmethod
     def _get_default_network(cls):
-        _, networks = cls.network_client.list_networks()
+        networks = cls.network_client.list_networks()
         for net in networks['networks']:
             if net['name'] == CONF.compute.fixed_network_name:
                 return net
diff --git a/tempest/api/orchestration/stacks/test_neutron_resources.py b/tempest/api/orchestration/stacks/test_neutron_resources.py
index f1a4f85..8352719 100644
--- a/tempest/api/orchestration/stacks/test_neutron_resources.py
+++ b/tempest/api/orchestration/stacks/test_neutron_resources.py
@@ -107,7 +107,7 @@
     def test_created_network(self):
         """Verifies created network."""
         network_id = self.test_resources.get('Network')['physical_resource_id']
-        _, body = self.network_client.show_network(network_id)
+        body = self.network_client.show_network(network_id)
         network = body['network']
         self.assertIsInstance(network, dict)
         self.assertEqual(network_id, network['id'])
@@ -119,7 +119,7 @@
     def test_created_subnet(self):
         """Verifies created subnet."""
         subnet_id = self.test_resources.get('Subnet')['physical_resource_id']
-        _, body = self.network_client.show_subnet(subnet_id)
+        body = self.network_client.show_subnet(subnet_id)
         subnet = body['subnet']
         network_id = self.test_resources.get('Network')['physical_resource_id']
         self.assertEqual(subnet_id, subnet['id'])
@@ -137,7 +137,7 @@
     def test_created_router(self):
         """Verifies created router."""
         router_id = self.test_resources.get('Router')['physical_resource_id']
-        _, body = self.network_client.show_router(router_id)
+        body = self.network_client.show_router(router_id)
         router = body['router']
         self.assertEqual(self.neutron_basic_template['resources'][
             'Router']['properties']['name'], router['name'])
@@ -152,7 +152,7 @@
         router_id = self.test_resources.get('Router')['physical_resource_id']
         network_id = self.test_resources.get('Network')['physical_resource_id']
         subnet_id = self.test_resources.get('Subnet')['physical_resource_id']
-        _, body = self.network_client.list_ports()
+        body = self.network_client.list_ports()
         ports = body['ports']
         router_ports = filter(lambda port: port['device_id'] ==
                               router_id, ports)
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
index 21d0a86..b7e9422 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -70,11 +70,14 @@
         self.addCleanup(self.servers_client.delete_server, server['id'])
         self.servers_client.wait_for_server_status(server['id'], 'ACTIVE')
         mountpoint = '/dev/%s' % CONF.compute.volume_device_name
-        _, body = self.volumes_client.attach_volume(
-            self.volume_origin['id'], server['id'], mountpoint)
+        _, body = self.servers_client.attach_volume(
+            server['id'], self.volume_origin['id'], mountpoint)
         self.volumes_client.wait_for_volume_status(self.volume_origin['id'],
                                                    'in-use')
-        self.addCleanup(self._detach, self.volume_origin['id'])
+        self.addCleanup(self.volumes_client.wait_for_volume_status,
+                        self.volume_origin['id'], 'available')
+        self.addCleanup(self.servers_client.detach_volume, server['id'],
+                        self.volume_origin['id'])
         # Snapshot a volume even if it's attached to an instance
         snapshot = self.create_snapshot(self.volume_origin['id'],
                                         force=True)
diff --git a/tempest/auth.py b/tempest/auth.py
index 022a450..2550cfb 100644
--- a/tempest/auth.py
+++ b/tempest/auth.py
@@ -561,7 +561,10 @@
             raise exceptions.InvalidCredentials()
         creds = cls._get_default(credentials_type)
         if not creds.is_valid():
-            raise exceptions.InvalidConfiguration()
+            msg = ("The %s credentials are incorrectly set in the config file."
+                   " Double check that all required values are assigned" %
+                   credentials_type)
+            raise exceptions.InvalidConfiguration(msg)
         return creds
 
     @classmethod
diff --git a/tempest/cmd/cleanup.py b/tempest/cmd/cleanup.py
index f36ef56..28f0aa8 100755
--- a/tempest/cmd/cleanup.py
+++ b/tempest/cmd/cleanup.py
@@ -19,18 +19,18 @@
 Runtime Arguments
 -----------------
 
---init-saved-state: Before you can execute cleanup you must initialize
-the saved state by running it with the --init-saved-state flag
+**--init-saved-state**: Before you can execute cleanup you must initialize
+the saved state by running it with the **--init-saved-state** flag
 (creating ./saved_state.json), which protects your deployment from
 cleanup deleting objects you want to keep.  Typically you would run
-cleanup with --init-saved-state prior to a tempest run. If this is not
+cleanup with **--init-saved-state** prior to a tempest run. If this is not
 the case saved_state.json must be edited, removing objects you want
 cleanup to delete.
 
---dry-run: Creates a report (dry_run.json) of the tenants that will be
+**--dry-run**: Creates a report (dry_run.json) of the tenants that will be
 cleaned up (in the "_tenants_to_clean" array), and the global objects
 that will be removed (tenants, users, flavors and images).  Once
-cleanup is executed in normal mode, running it again with --dry-run
+cleanup is executed in normal mode, running it again with **--dry-run**
 should yield an empty report.
 
 **NOTE**: The _tenants_to_clean array in dry-run.json lists the
@@ -38,17 +38,17 @@
 delete the tenant itself. This may differ from the tenants array as you
 can clean the tempest and alternate tempest tenants but by default,
 cleanup deletes the objects in the tempest and alternate tempest tenants
-but does not delete those tenants unless the --delete-tempest-conf-objects
+but does not delete those tenants unless the **--delete-tempest-conf-objects**
 flag is used to force their deletion.
 
 **Normal mode**: running with no arguments, will query your deployment and
 build a list of objects to delete after filtering out the objects found in
-saved_state.json and based on the --delete-tempest-conf-objects flag.
+saved_state.json and based on the **--delete-tempest-conf-objects** flag.
 
 By default the tempest and alternate tempest users and tenants are not
 deleted and the admin user specified in tempest.conf is never deleted.
 
-Please run with --help to see full list of options.
+Please run with **--help** to see full list of options.
 """
 import argparse
 import json
diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py
index 67843e6..db862c7 100644
--- a/tempest/cmd/cleanup_service.py
+++ b/tempest/cmd/cleanup_service.py
@@ -85,7 +85,7 @@
     net_cl = am.network_client
     id_cl = am.identity_client
 
-    _, networks = net_cl.list_networks()
+    networks = net_cl.list_networks()
     tenant = id_cl.get_tenant_by_name(tenant_name)
     t_id = tenant['id']
     n_id = None
@@ -357,7 +357,7 @@
 
     def list(self):
         client = self.client
-        _, networks = client.list_networks()
+        networks = client.list_networks()
         networks = self._filter_by_tenant_id(networks['networks'])
         # filter out networks declared in tempest.conf
         if self.is_preserve:
@@ -385,7 +385,7 @@
 
     def list(self):
         client = self.client
-        _, ipsecpols = client.list_ipsecpolicies()
+        ipsecpols = client.list_ipsecpolicies()
         ipsecpols = ipsecpols['ipsecpolicies']
         ipsecpols = self._filter_by_tenant_id(ipsecpols)
         LOG.debug("List count, %s IP Security Policies" % len(ipsecpols))
@@ -410,7 +410,7 @@
 
     def list(self):
         client = self.client
-        _, fwpols = client.list_firewall_policies()
+        fwpols = client.list_firewall_policies()
         fwpols = fwpols['firewall_policies']
         fwpols = self._filter_by_tenant_id(fwpols)
         LOG.debug("List count, %s Firewall Policies" % len(fwpols))
@@ -435,7 +435,7 @@
 
     def list(self):
         client = self.client
-        _, fwrules = client.list_firewall_rules()
+        fwrules = client.list_firewall_rules()
         fwrules = fwrules['firewall_rules']
         fwrules = self._filter_by_tenant_id(fwrules)
         LOG.debug("List count, %s Firewall Rules" % len(fwrules))
@@ -460,7 +460,7 @@
 
     def list(self):
         client = self.client
-        _, ikepols = client.list_ikepolicies()
+        ikepols = client.list_ikepolicies()
         ikepols = ikepols['ikepolicies']
         ikepols = self._filter_by_tenant_id(ikepols)
         LOG.debug("List count, %s IKE Policies" % len(ikepols))
@@ -485,7 +485,7 @@
 
     def list(self):
         client = self.client
-        _, vpnsrvs = client.list_vpnservices()
+        vpnsrvs = client.list_vpnservices()
         vpnsrvs = vpnsrvs['vpnservices']
         vpnsrvs = self._filter_by_tenant_id(vpnsrvs)
         LOG.debug("List count, %s VPN Services" % len(vpnsrvs))
@@ -510,7 +510,7 @@
 
     def list(self):
         client = self.client
-        _, flips = client.list_floatingips()
+        flips = client.list_floatingips()
         flips = flips['floatingips']
         flips = self._filter_by_tenant_id(flips)
         LOG.debug("List count, %s Network Floating IPs" % len(flips))
@@ -535,7 +535,7 @@
 
     def list(self):
         client = self.client
-        _, routers = client.list_routers()
+        routers = client.list_routers()
         routers = routers['routers']
         routers = self._filter_by_tenant_id(routers)
         if self.is_preserve:
@@ -551,7 +551,7 @@
         for router in routers:
             try:
                 rid = router['id']
-                _, ports = client.list_router_interfaces(rid)
+                ports = client.list_router_interfaces(rid)
                 ports = ports['ports']
                 for port in ports:
                     subid = port['fixed_ips'][0]['subnet_id']
@@ -570,7 +570,7 @@
 
     def list(self):
         client = self.client
-        _, hms = client.list_health_monitors()
+        hms = client.list_health_monitors()
         hms = hms['health_monitors']
         hms = self._filter_by_tenant_id(hms)
         LOG.debug("List count, %s Health Monitors" % len(hms))
@@ -595,7 +595,7 @@
 
     def list(self):
         client = self.client
-        _, members = client.list_members()
+        members = client.list_members()
         members = members['members']
         members = self._filter_by_tenant_id(members)
         LOG.debug("List count, %s Members" % len(members))
@@ -620,7 +620,7 @@
 
     def list(self):
         client = self.client
-        _, vips = client.list_vips()
+        vips = client.list_vips()
         vips = vips['vips']
         vips = self._filter_by_tenant_id(vips)
         LOG.debug("List count, %s VIPs" % len(vips))
@@ -645,7 +645,7 @@
 
     def list(self):
         client = self.client
-        _, pools = client.list_pools()
+        pools = client.list_pools()
         pools = pools['pools']
         pools = self._filter_by_tenant_id(pools)
         LOG.debug("List count, %s Pools" % len(pools))
@@ -670,7 +670,7 @@
 
     def list(self):
         client = self.client
-        _, rules = client.list_metering_label_rules()
+        rules = client.list_metering_label_rules()
         rules = rules['metering_label_rules']
         rules = self._filter_by_tenant_id(rules)
         LOG.debug("List count, %s Metering Label Rules" % len(rules))
@@ -695,7 +695,7 @@
 
     def list(self):
         client = self.client
-        _, labels = client.list_metering_labels()
+        labels = client.list_metering_labels()
         labels = labels['metering_labels']
         labels = self._filter_by_tenant_id(labels)
         LOG.debug("List count, %s Metering Labels" % len(labels))
@@ -720,7 +720,7 @@
 
     def list(self):
         client = self.client
-        _, ports = client.list_ports()
+        ports = client.list_ports()
         ports = ports['ports']
         ports = self._filter_by_tenant_id(ports)
         if self.is_preserve:
@@ -747,7 +747,7 @@
 
     def list(self):
         client = self.client
-        _, subnets = client.list_subnets()
+        subnets = client.list_subnets()
         subnets = subnets['subnets']
         subnets = self._filter_by_tenant_id(subnets)
         if self.is_preserve:
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 6879db9..97aa62b 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -509,15 +509,10 @@
 def _get_router_namespace(client, network):
     network_id = _get_resource_by_name(client.networks,
                                        'networks', network)['id']
-    resp, n_body = client.networks.list_routers()
-    if not resp_ok(resp):
-        raise ValueError("unable to routers list: [%s] %s" % (resp, n_body))
+    n_body = client.networks.list_routers()
     for router in n_body['routers']:
         router_id = router['id']
-        resp, r_body = client.networks.list_router_interfaces(router_id)
-        if not resp_ok(resp):
-            raise ValueError("unable to router interfaces list: [%s] %s" %
-                             (resp, r_body))
+        r_body = client.networks.list_router_interfaces(router_id)
         for port in r_body['ports']:
             if port['network_id'] == network_id:
                 return "qrouter-%s" % router_id
@@ -527,9 +522,12 @@
     get_resources = getattr(client, 'list_%s' % resource)
     if get_resources is None:
         raise AttributeError("client doesn't have method list_%s" % resource)
-    r, body = get_resources()
-    if not resp_ok(r):
-        raise ValueError("unable to list %s: [%s] %s" % (resource, r, body))
+    # Until all tempest client methods are changed to return only one value,
+    # we cannot assume they all have the same signature so we need to discard
+    # the unused response first value it two values are being returned.
+    body = get_resources()
+    if type(body) == tuple:
+        body = body[1]
     if isinstance(body, dict):
         body = body[resource]
     for res in body:
@@ -544,7 +542,7 @@
         client = client_for_user(network['owner'])
 
         # only create a network if the name isn't here
-        r, body = client.networks.list_networks()
+        body = client.networks.list_networks()
         if any(item['name'] == network['name'] for item in body['networks']):
             LOG.warning("Dupplicated network name: %s" % network['name'])
             continue
@@ -596,7 +594,7 @@
         client = client_for_user(router['owner'])
 
         # only create a router if the name isn't here
-        r, body = client.networks.list_routers()
+        body = client.networks.list_routers()
         if any(item['name'] == router['name'] for item in body['routers']):
             LOG.warning("Dupplicated router name: %s" % router['name'])
             continue
diff --git a/tempest/cmd/verify_tempest_config.py b/tempest/cmd/verify_tempest_config.py
index 21c9894..974ee2e 100755
--- a/tempest/cmd/verify_tempest_config.py
+++ b/tempest/cmd/verify_tempest_config.py
@@ -154,7 +154,10 @@
 
 def verify_extensions(os, service, results):
     extensions_client = get_extension_client(os, service)
-    __, resp = extensions_client.list_extensions()
+    if service == 'neutron':
+        resp = extensions_client.list_extensions()
+    else:
+        __, resp = extensions_client.list_extensions()
     # For Nova, Cinder and Neutron we use the alias name rather than the
     # 'name' field because the alias is considered to be the canonical
     # name.
diff --git a/tempest/common/custom_matchers.py b/tempest/common/custom_matchers.py
index 39e3a67..298a94e 100644
--- a/tempest/common/custom_matchers.py
+++ b/tempest/common/custom_matchers.py
@@ -122,33 +122,21 @@
 
     def match(self, actual):
         for key, value in actual.iteritems():
-            if key == 'content-length' and not value.isdigit():
+            if key in ('content-length', 'x-account-bytes-used',
+                       'x-account-container-count', 'x-account-object-count',
+                       'x-container-bytes-used', 'x-container-object-count')\
+                and not value.isdigit():
+                return InvalidFormat(key, value)
+            elif key in ('content-type', 'date', 'last-modified',
+                         'x-copied-from-last-modified') and not value:
                 return InvalidFormat(key, value)
             elif key == 'x-timestamp' and not re.match("^\d+\.?\d*\Z", value):
                 return InvalidFormat(key, value)
-            elif key == 'x-account-bytes-used' and not value.isdigit():
-                return InvalidFormat(key, value)
-            elif key == 'x-account-container-count' and not value.isdigit():
-                return InvalidFormat(key, value)
-            elif key == 'x-account-object-count' and not value.isdigit():
-                return InvalidFormat(key, value)
-            elif key == 'x-container-bytes-used' and not value.isdigit():
-                return InvalidFormat(key, value)
-            elif key == 'x-container-object-count' and not value.isdigit():
-                return InvalidFormat(key, value)
-            elif key == 'content-type' and not value:
-                return InvalidFormat(key, value)
             elif key == 'x-copied-from' and not re.match("\S+/\S+", value):
                 return InvalidFormat(key, value)
-            elif key == 'x-copied-from-last-modified' and not value:
-                return InvalidFormat(key, value)
             elif key == 'x-trans-id' and \
                 not re.match("^tx[0-9a-f]{21}-[0-9a-f]{10}.*", value):
                 return InvalidFormat(key, value)
-            elif key == 'date' and not value:
-                return InvalidFormat(key, value)
-            elif key == 'last-modified' and not value:
-                return InvalidFormat(key, value)
             elif key == 'accept-ranges' and not value == 'bytes':
                 return InvalidFormat(key, value)
             elif key == 'etag' and not value.isalnum():
diff --git a/tempest/common/isolated_creds.py b/tempest/common/isolated_creds.py
index 1ce1e39..9a9ef82 100644
--- a/tempest/common/isolated_creds.py
+++ b/tempest/common/isolated_creds.py
@@ -174,7 +174,7 @@
         return network, subnet, router
 
     def _create_network(self, name, tenant_id):
-        _, resp_body = self.network_admin_client.create_network(
+        resp_body = self.network_admin_client.create_network(
             name=name, tenant_id=tenant_id)
         return resp_body['network']
 
@@ -184,7 +184,7 @@
         for subnet_cidr in base_cidr.subnet(mask_bits):
             try:
                 if self.network_resources:
-                    _, resp_body = self.network_admin_client.\
+                    resp_body = self.network_admin_client.\
                         create_subnet(
                             network_id=network_id, cidr=str(subnet_cidr),
                             name=subnet_name,
@@ -192,7 +192,7 @@
                             enable_dhcp=self.network_resources['dhcp'],
                             ip_version=4)
                 else:
-                    _, resp_body = self.network_admin_client.\
+                    resp_body = self.network_admin_client.\
                         create_subnet(network_id=network_id,
                                       cidr=str(subnet_cidr),
                                       name=subnet_name,
@@ -210,7 +210,7 @@
     def _create_router(self, router_name, tenant_id):
         external_net_id = dict(
             network_id=CONF.network.public_network_id)
-        _, resp_body = self.network_admin_client.create_router(
+        resp_body = self.network_admin_client.create_router(
             router_name,
             external_gateway_info=external_net_id,
             tenant_id=tenant_id)
@@ -302,8 +302,8 @@
 
     def _cleanup_default_secgroup(self, tenant):
         net_client = self.network_admin_client
-        _, resp_body = net_client.list_security_groups(tenant_id=tenant,
-                                                       name="default")
+        resp_body = net_client.list_security_groups(tenant_id=tenant,
+                                                    name="default")
         secgroups_to_delete = resp_body['security_groups']
         for secgroup in secgroups_to_delete:
             try:
diff --git a/tempest/config.py b/tempest/config.py
index 0d4e08a..4f5eae0 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -185,7 +185,9 @@
                help="Time in seconds between build status checks."),
     cfg.IntOpt('build_timeout',
                default=300,
-               help="Timeout in seconds to wait for an instance to build."),
+               help="Timeout in seconds to wait for an instance to build. "
+                    "Other services that do not define build_timeout will "
+                    "inherit this value, for example the image service."),
     cfg.BoolOpt('run_ssh',
                 default=False,
                 help="Should the tests ssh to instances?"),
@@ -455,7 +457,7 @@
                     "checks."),
     cfg.ListOpt('dns_servers',
                 default=["8.8.8.8", "8.8.4.4"],
-                help="List of dns servers whichs hould be used"
+                help="List of dns servers which should be used"
                      " for subnet creation")
 ]
 
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 410d90a..9cb24b9 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -14,7 +14,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import logging
 import os
 import subprocess
 
@@ -36,13 +35,6 @@
 
 LOG = log.getLogger(__name__)
 
-# NOTE(afazekas): Workaround for the stdout logging
-LOG_nova_client = logging.getLogger('novaclient.client')
-LOG_nova_client.addHandler(log.NullHandler())
-
-LOG_cinder_client = logging.getLogger('cinderclient.client')
-LOG_cinder_client.addHandler(log.NullHandler())
-
 
 class ScenarioTest(tempest.test.BaseTestCase):
     """Base class for scenario tests. Uses tempest own clients. """
@@ -556,9 +548,9 @@
         if not client:
             client = self.network_client
         if not tenant_id:
-            tenant_id = client.rest_client.tenant_id
+            tenant_id = client.tenant_id
         name = data_utils.rand_name(namestart)
-        _, result = client.create_network(name=name, tenant_id=tenant_id)
+        result = client.create_network(name=name, tenant_id=tenant_id)
         network = net_resources.DeletableNetwork(client=client,
                                                  **result['network'])
         self.assertEqual(network.name, name)
@@ -585,7 +577,7 @@
         def temp(*args, **kwargs):
             temp_method = self.admin_manager.network_client.__getattr__(
                 'list_%s' % resource_type)
-            _, resource_list = temp_method(*args, **kwargs)
+            resource_list = temp_method(*args, **kwargs)
             return resource_list[resource_type]
         return temp
 
@@ -634,7 +626,7 @@
                 **kwargs
             )
             try:
-                _, result = client.create_subnet(**subnet)
+                result = client.create_subnet(**subnet)
                 break
             except exceptions.Conflict as e:
                 is_overlapping_cidr = 'overlaps with another subnet' in str(e)
@@ -651,7 +643,7 @@
         if not client:
             client = self.network_client
         name = data_utils.rand_name(namestart)
-        _, result = client.create_port(
+        result = client.create_port(
             name=name,
             network_id=network.id,
             tenant_id=network.tenant_id)
@@ -690,7 +682,7 @@
             port_id, ip4 = self._get_server_port_id_and_ip4(thing)
         else:
             ip4 = None
-        _, result = client.create_floatingip(
+        result = client.create_floatingip(
             floating_network_id=external_network_id,
             port_id=port_id,
             tenant_id=thing['tenant_id'],
@@ -751,9 +743,9 @@
         # The target login is assumed to have been configured for
         # key-based authentication by cloud-init.
         try:
-            for net_name, ip_addresses in server['networks'].iteritems():
+            for net_name, ip_addresses in server['addresses'].iteritems():
                 for ip_address in ip_addresses:
-                    self.check_vm_connectivity(ip_address,
+                    self.check_vm_connectivity(ip_address['addr'],
                                                username,
                                                private_key,
                                                should_connect=should_connect)
@@ -791,7 +783,7 @@
         if client is None:
             client = self.network_client
         if tenant_id is None:
-            tenant_id = client.rest_client.tenant_id
+            tenant_id = client.tenant_id
         secgroup = self._create_empty_security_group(namestart=namestart,
                                                      client=client,
                                                      tenant_id=tenant_id)
@@ -817,13 +809,13 @@
         if client is None:
             client = self.network_client
         if not tenant_id:
-            tenant_id = client.rest_client.tenant_id
+            tenant_id = client.tenant_id
         sg_name = data_utils.rand_name(namestart)
         sg_desc = sg_name + " description"
         sg_dict = dict(name=sg_name,
                        description=sg_desc)
         sg_dict['tenant_id'] = tenant_id
-        _, result = client.create_security_group(**sg_dict)
+        result = client.create_security_group(**sg_dict)
         secgroup = net_resources.DeletableSecurityGroup(
             client=client,
             **result['security_group']
@@ -842,7 +834,7 @@
         if client is None:
             client = self.network_client
         if not tenant_id:
-            tenant_id = client.rest_client.tenant_id
+            tenant_id = client.tenant_id
         sgs = [
             sg for sg in client.list_security_groups().values()[0]
             if sg['tenant_id'] == tenant_id and sg['name'] == 'default'
@@ -874,7 +866,7 @@
         if client is None:
             client = self.network_client
         if not tenant_id:
-            tenant_id = client.rest_client.tenant_id
+            tenant_id = client.tenant_id
         if secgroup is None:
             secgroup = self._default_security_group(client=client,
                                                     tenant_id=tenant_id)
@@ -883,7 +875,7 @@
                        tenant_id=secgroup.tenant_id)
         ruleset.update(kwargs)
 
-        _, sg_rule = client.create_security_group_rule(**ruleset)
+        sg_rule = client.create_security_group_rule(**ruleset)
         sg_rule = net_resources.DeletableSecurityGroupRule(
             client=client,
             **sg_rule['security_group_rule']
@@ -937,9 +929,9 @@
         """Wrapper utility that returns a test pool."""
         client = self.network_client
         name = data_utils.rand_name('pool')
-        _, resp_pool = client.create_pool(protocol=protocol, name=name,
-                                          subnet_id=subnet_id,
-                                          lb_method=lb_method)
+        resp_pool = client.create_pool(protocol=protocol, name=name,
+                                       subnet_id=subnet_id,
+                                       lb_method=lb_method)
         pool = net_resources.DeletablePool(client=client, **resp_pool['pool'])
         self.assertEqual(pool['name'], name)
         self.addCleanup(self.delete_wrapper, pool.delete)
@@ -948,9 +940,9 @@
     def _create_member(self, address, protocol_port, pool_id):
         """Wrapper utility that returns a test member."""
         client = self.network_client
-        _, resp_member = client.create_member(protocol_port=protocol_port,
-                                              pool_id=pool_id,
-                                              address=address)
+        resp_member = client.create_member(protocol_port=protocol_port,
+                                           pool_id=pool_id,
+                                           address=address)
         member = net_resources.DeletableMember(client=client,
                                                **resp_member['member'])
         self.addCleanup(self.delete_wrapper, member.delete)
@@ -960,9 +952,9 @@
         """Wrapper utility that returns a test vip."""
         client = self.network_client
         name = data_utils.rand_name('vip')
-        _, resp_vip = client.create_vip(protocol=protocol, name=name,
-                                        subnet_id=subnet_id, pool_id=pool_id,
-                                        protocol_port=protocol_port)
+        resp_vip = client.create_vip(protocol=protocol, name=name,
+                                     subnet_id=subnet_id, pool_id=pool_id,
+                                     protocol_port=protocol_port)
         vip = net_resources.DeletableVip(client=client, **resp_vip['vip'])
         self.assertEqual(vip['name'], name)
         self.addCleanup(self.delete_wrapper, vip.delete)
@@ -986,7 +978,7 @@
         if not client:
             client = self.network_client
         if not tenant_id:
-            tenant_id = client.rest_client.tenant_id
+            tenant_id = client.tenant_id
         router_id = CONF.network.public_router_id
         network_id = CONF.network.public_network_id
         if router_id:
@@ -1005,11 +997,11 @@
         if not client:
             client = self.network_client
         if not tenant_id:
-            tenant_id = client.rest_client.tenant_id
+            tenant_id = client.tenant_id
         name = data_utils.rand_name(namestart)
-        _, result = client.create_router(name=name,
-                                         admin_state_up=True,
-                                         tenant_id=tenant_id)
+        result = client.create_router(name=name,
+                                      admin_state_up=True,
+                                      tenant_id=tenant_id)
         router = net_resources.DeletableRouter(client=client,
                                                **result['router'])
         self.assertEqual(router.name, name)
@@ -1274,7 +1266,7 @@
 
     @classmethod
     def _get_default_network(cls):
-        _, networks = cls.networks_client.list_networks()
+        networks = cls.networks_client.list_networks()
         for net in networks:
             if net['label'] == CONF.compute.fixed_network_name:
                 return net
diff --git a/tempest/scenario/test_baremetal_basic_ops.py b/tempest/scenario/test_baremetal_basic_ops.py
index ea10140..d59e31e 100644
--- a/tempest/scenario/test_baremetal_basic_ops.py
+++ b/tempest/scenario/test_baremetal_basic_ops.py
@@ -112,7 +112,7 @@
     def validate_ports(self):
         for port in self.get_ports(self.node['uuid']):
             n_port_id = port['extra']['vif_port_id']
-            _, body = self.network_client.show_port(n_port_id)
+            body = self.network_client.show_port(n_port_id)
             n_port = body['port']
             self.assertEqual(n_port['device_id'], self.instance['id'])
             self.assertEqual(n_port['mac_address'], port['address'])
diff --git a/tempest/scenario/test_network_v6.py b/tempest/scenario/test_network_v6.py
index a75fa02..1a82e78 100644
--- a/tempest/scenario/test_network_v6.py
+++ b/tempest/scenario/test_network_v6.py
@@ -68,15 +68,15 @@
          one IPv4 subnet
          Creates router with ports on both subnets
         """
-        net = self._create_network(tenant_id=self.tenant_id)
-        sub4 = self._create_subnet(network=net,
+        self.network = self._create_network(tenant_id=self.tenant_id)
+        sub4 = self._create_subnet(network=self.network,
                                    namestart='sub4',
                                    ip_version=4,)
         # since https://bugs.launchpad.net/neutron/+bug/1394112 we need
         # to specify gateway_ip manually
         net_range = netaddr.IPNetwork(CONF.network.tenant_network_v6_cidr)
         gateway_ip = (netaddr.IPAddress(net_range) + 1).format()
-        sub6 = self._create_subnet(network=net,
+        sub6 = self._create_subnet(network=self.network,
                                    namestart='sub6',
                                    ip_version=6,
                                    gateway_ip=gateway_ip,
@@ -101,7 +101,10 @@
     def prepare_server(self):
         username = CONF.compute.image_ssh_user
 
-        srv = self.create_server(create_kwargs=self.srv_kwargs)
+        create_kwargs = self.srv_kwargs
+        create_kwargs['networks'] = [{'uuid': self.network.id}]
+
+        srv = self.create_server(create_kwargs=create_kwargs)
         fip = self.create_floating_ip(thing=srv)
         self.define_server_ips(srv=srv)
         ssh = self.get_remote_client(
diff --git a/tempest/services/compute/json/agents_client.py b/tempest/services/compute/json/agents_client.py
index 5b76a56..eacd367 100644
--- a/tempest/services/compute/json/agents_client.py
+++ b/tempest/services/compute/json/agents_client.py
@@ -17,21 +17,14 @@
 
 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 rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class AgentsClientJSON(rest_client.RestClient):
+class AgentsClientJSON(base.ComputeClient):
     """
     Tests Agents API
     """
 
-    def __init__(self, auth_provider):
-        super(AgentsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
-
     def list_agents(self, params=None):
         """List all agent builds."""
         url = 'os-agents'
diff --git a/tempest/services/compute/json/aggregates_client.py b/tempest/services/compute/json/aggregates_client.py
index 09927d3..1539259 100644
--- a/tempest/services/compute/json/aggregates_client.py
+++ b/tempest/services/compute/json/aggregates_client.py
@@ -17,18 +17,11 @@
 
 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 rest_client
-from tempest import config
 from tempest import exceptions
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class AggregatesClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(AggregatesClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class AggregatesClientJSON(base.ComputeClient):
 
     def list_aggregates(self):
         """Get aggregate list."""
diff --git a/tempest/services/compute/json/availability_zone_client.py b/tempest/services/compute/json/availability_zone_client.py
index 00f8330..b8bda68 100644
--- a/tempest/services/compute/json/availability_zone_client.py
+++ b/tempest/services/compute/json/availability_zone_client.py
@@ -16,18 +16,10 @@
 import json
 
 from tempest.api_schema.response.compute.v2 import availability_zone as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class AvailabilityZoneClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(AvailabilityZoneClientJSON, self).__init__(
-            auth_provider)
-        self.service = CONF.compute.catalog_type
+class AvailabilityZoneClientJSON(base.ComputeClient):
 
     def get_availability_zone_list(self):
         resp, body = self.get('os-availability-zone')
diff --git a/tempest/services/compute/json/base.py b/tempest/services/compute/json/base.py
new file mode 100644
index 0000000..b712452
--- /dev/null
+++ b/tempest/services/compute/json/base.py
@@ -0,0 +1,36 @@
+# Copyright 2014 NEC Corporation.  All rights reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.common import rest_client
+from tempest import config
+
+CONF = config.CONF
+
+
+class ComputeClient(rest_client.RestClient):
+    """
+    Base compute client class
+    """
+
+    def __init__(self, auth_provider,
+                 build_interval=None, build_timeout=None):
+        if build_interval is None:
+            build_interval = CONF.compute.build_interval
+        if build_timeout is None:
+            build_timeout = CONF.compute.build_timeout
+
+        super(ComputeClient, self).__init__(auth_provider)
+        self.service = CONF.compute.catalog_type
+        self.build_interval = build_interval
+        self.build_timeout = build_timeout
diff --git a/tempest/services/compute/json/certificates_client.py b/tempest/services/compute/json/certificates_client.py
index 356ded2..123f0b9 100644
--- a/tempest/services/compute/json/certificates_client.py
+++ b/tempest/services/compute/json/certificates_client.py
@@ -17,17 +17,10 @@
 
 from tempest.api_schema.response.compute import certificates as schema
 from tempest.api_schema.response.compute.v2 import certificates as v2schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class CertificatesClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(CertificatesClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class CertificatesClientJSON(base.ComputeClient):
 
     def get_certificate(self, id):
         url = "os-certificates/%s" % (id)
diff --git a/tempest/services/compute/json/extensions_client.py b/tempest/services/compute/json/extensions_client.py
index 41d1c4e..69ad7c0 100644
--- a/tempest/services/compute/json/extensions_client.py
+++ b/tempest/services/compute/json/extensions_client.py
@@ -16,17 +16,10 @@
 import json
 
 from tempest.api_schema.response.compute.v2 import extensions as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class ExtensionsClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(ExtensionsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class ExtensionsClientJSON(base.ComputeClient):
 
     def list_extensions(self):
         url = 'extensions'
diff --git a/tempest/services/compute/json/fixed_ips_client.py b/tempest/services/compute/json/fixed_ips_client.py
index 5903334..8fd24b6 100644
--- a/tempest/services/compute/json/fixed_ips_client.py
+++ b/tempest/services/compute/json/fixed_ips_client.py
@@ -16,17 +16,10 @@
 import json
 
 from tempest.api_schema.response.compute.v2 import fixed_ips as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class FixedIPsClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(FixedIPsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class FixedIPsClientJSON(base.ComputeClient):
 
     def get_fixed_ip_details(self, fixed_ip):
         url = "os-fixed-ips/%s" % (fixed_ip)
diff --git a/tempest/services/compute/json/flavors_client.py b/tempest/services/compute/json/flavors_client.py
index 8faf8a7..6276d3c 100644
--- a/tempest/services/compute/json/flavors_client.py
+++ b/tempest/services/compute/json/flavors_client.py
@@ -21,17 +21,10 @@
 from tempest.api_schema.response.compute import flavors_extra_specs \
     as schema_extra_specs
 from tempest.api_schema.response.compute.v2 import flavors as v2schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class FlavorsClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(FlavorsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class FlavorsClientJSON(base.ComputeClient):
 
     def list_flavors(self, params=None):
         url = 'flavors'
diff --git a/tempest/services/compute/json/floating_ips_client.py b/tempest/services/compute/json/floating_ips_client.py
index 0ed1720..788b4d2 100644
--- a/tempest/services/compute/json/floating_ips_client.py
+++ b/tempest/services/compute/json/floating_ips_client.py
@@ -17,17 +17,11 @@
 import urllib
 
 from tempest.api_schema.response.compute.v2 import floating_ips as schema
-from tempest.common import rest_client
-from tempest import config
 from tempest import exceptions
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class FloatingIPsClientJSON(rest_client.RestClient):
-    def __init__(self, auth_provider):
-        super(FloatingIPsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class FloatingIPsClientJSON(base.ComputeClient):
 
     def list_floating_ips(self, params=None):
         """Returns a list of all floating IPs filtered by any parameters."""
diff --git a/tempest/services/compute/json/hosts_client.py b/tempest/services/compute/json/hosts_client.py
index 8644173..5d306f9 100644
--- a/tempest/services/compute/json/hosts_client.py
+++ b/tempest/services/compute/json/hosts_client.py
@@ -17,17 +17,10 @@
 
 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 rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class HostsClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(HostsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class HostsClientJSON(base.ComputeClient):
 
     def list_hosts(self, params=None):
         """Lists all hosts."""
diff --git a/tempest/services/compute/json/hypervisor_client.py b/tempest/services/compute/json/hypervisor_client.py
index 8eacf61..52b50c8 100644
--- a/tempest/services/compute/json/hypervisor_client.py
+++ b/tempest/services/compute/json/hypervisor_client.py
@@ -17,17 +17,10 @@
 
 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 rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class HypervisorClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(HypervisorClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class HypervisorClientJSON(base.ComputeClient):
 
     def get_hypervisor_list(self):
         """List hypervisors information."""
diff --git a/tempest/services/compute/json/images_client.py b/tempest/services/compute/json/images_client.py
index 079a91e..a4cfe57 100644
--- a/tempest/services/compute/json/images_client.py
+++ b/tempest/services/compute/json/images_client.py
@@ -17,21 +17,12 @@
 import urllib
 
 from tempest.api_schema.response.compute.v2 import images as schema
-from tempest.common import rest_client
 from tempest.common import waiters
-from tempest import config
 from tempest import exceptions
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class ImagesClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(ImagesClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
-        self.build_interval = CONF.compute.build_interval
-        self.build_timeout = CONF.compute.build_timeout
+class ImagesClientJSON(base.ComputeClient):
 
     def create_image(self, server_id, name, meta=None):
         """Creates an image of the original server."""
diff --git a/tempest/services/compute/json/instance_usage_audit_log_client.py b/tempest/services/compute/json/instance_usage_audit_log_client.py
index 4b0362b..f79c3de 100644
--- a/tempest/services/compute/json/instance_usage_audit_log_client.py
+++ b/tempest/services/compute/json/instance_usage_audit_log_client.py
@@ -17,18 +17,10 @@
 
 from tempest.api_schema.response.compute.v2 import instance_usage_audit_logs \
     as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class InstanceUsagesAuditLogClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(InstanceUsagesAuditLogClientJSON, self).__init__(
-            auth_provider)
-        self.service = CONF.compute.catalog_type
+class InstanceUsagesAuditLogClientJSON(base.ComputeClient):
 
     def list_instance_usage_audit_logs(self):
         url = 'os-instance_usage_audit_log'
diff --git a/tempest/services/compute/json/interfaces_client.py b/tempest/services/compute/json/interfaces_client.py
index 620ed68..f1e2660 100644
--- a/tempest/services/compute/json/interfaces_client.py
+++ b/tempest/services/compute/json/interfaces_client.py
@@ -19,18 +19,11 @@
 from tempest.api_schema.response.compute import interfaces as common_schema
 from tempest.api_schema.response.compute import servers as servers_schema
 from tempest.api_schema.response.compute.v2 import interfaces as schema
-from tempest.common import rest_client
-from tempest import config
 from tempest import exceptions
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class InterfacesClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(InterfacesClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class InterfacesClientJSON(base.ComputeClient):
 
     def list_interfaces(self, server):
         resp, body = self.get('servers/%s/os-interface' % server)
diff --git a/tempest/services/compute/json/keypairs_client.py b/tempest/services/compute/json/keypairs_client.py
index 31c42a5..c4406f5 100644
--- a/tempest/services/compute/json/keypairs_client.py
+++ b/tempest/services/compute/json/keypairs_client.py
@@ -17,17 +17,10 @@
 
 from tempest.api_schema.response.compute import keypairs as common_schema
 from tempest.api_schema.response.compute.v2 import keypairs as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class KeyPairsClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(KeyPairsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class KeyPairsClientJSON(base.ComputeClient):
 
     def list_keypairs(self):
         resp, body = self.get("os-keypairs")
diff --git a/tempest/services/compute/json/limits_client.py b/tempest/services/compute/json/limits_client.py
index 81c602b..66a0649 100644
--- a/tempest/services/compute/json/limits_client.py
+++ b/tempest/services/compute/json/limits_client.py
@@ -16,17 +16,10 @@
 import json
 
 from tempest.api_schema.response.compute.v2 import limits as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class LimitsClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(LimitsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class LimitsClientJSON(base.ComputeClient):
 
     def get_absolute_limits(self):
         resp, body = self.get("limits")
diff --git a/tempest/services/compute/json/migrations_client.py b/tempest/services/compute/json/migrations_client.py
index f4abbb2..de183f1 100644
--- a/tempest/services/compute/json/migrations_client.py
+++ b/tempest/services/compute/json/migrations_client.py
@@ -16,17 +16,10 @@
 import urllib
 
 from tempest.api_schema.response.compute import migrations as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class MigrationsClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(MigrationsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class MigrationsClientJSON(base.ComputeClient):
 
     def list_migrations(self, params=None):
         """Lists all migrations."""
diff --git a/tempest/services/compute/json/networks_client.py b/tempest/services/compute/json/networks_client.py
index 40eb1a6..5a2744d 100644
--- a/tempest/services/compute/json/networks_client.py
+++ b/tempest/services/compute/json/networks_client.py
@@ -15,17 +15,10 @@
 
 import json
 
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class NetworksClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(NetworksClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class NetworksClientJSON(base.ComputeClient):
 
     def list_networks(self):
         resp, body = self.get("os-networks")
diff --git a/tempest/services/compute/json/quotas_client.py b/tempest/services/compute/json/quotas_client.py
index b691529..0fee57a 100644
--- a/tempest/services/compute/json/quotas_client.py
+++ b/tempest/services/compute/json/quotas_client.py
@@ -18,17 +18,10 @@
 from tempest.api_schema.response.compute.v2\
     import quota_classes as classes_schema
 from tempest.api_schema.response.compute.v2 import quotas as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class QuotasClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(QuotasClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class QuotasClientJSON(base.ComputeClient):
 
     def get_quota_set(self, tenant_id, user_id=None):
         """List the quota set for a tenant."""
@@ -122,11 +115,7 @@
         return resp, body
 
 
-class QuotaClassesClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(QuotaClassesClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class QuotaClassesClientJSON(base.ComputeClient):
 
     def get_quota_class_set(self, quota_class_id):
         """List the quota class set for a quota class."""
diff --git a/tempest/services/compute/json/security_group_default_rules_client.py b/tempest/services/compute/json/security_group_default_rules_client.py
index 7743f9c..efaf329 100644
--- a/tempest/services/compute/json/security_group_default_rules_client.py
+++ b/tempest/services/compute/json/security_group_default_rules_client.py
@@ -17,18 +17,10 @@
 
 from tempest.api_schema.response.compute.v2 import \
     security_group_default_rule as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class SecurityGroupDefaultRulesClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(SecurityGroupDefaultRulesClientJSON,
-              self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class SecurityGroupDefaultRulesClientJSON(base.ComputeClient):
 
     def create_security_default_group_rule(self, ip_protocol, from_port,
                                            to_port, **kwargs):
diff --git a/tempest/services/compute/json/security_groups_client.py b/tempest/services/compute/json/security_groups_client.py
index 733a50b..a301a0f 100644
--- a/tempest/services/compute/json/security_groups_client.py
+++ b/tempest/services/compute/json/security_groups_client.py
@@ -17,18 +17,11 @@
 import urllib
 
 from tempest.api_schema.response.compute.v2 import security_groups as schema
-from tempest.common import rest_client
-from tempest import config
 from tempest import exceptions
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class SecurityGroupsClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(SecurityGroupsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class SecurityGroupsClientJSON(base.ComputeClient):
 
     def list_security_groups(self, params=None):
         """List all security groups for a user."""
diff --git a/tempest/services/compute/json/servers_client.py b/tempest/services/compute/json/servers_client.py
index 4268b1a..400f9a7 100644
--- a/tempest/services/compute/json/servers_client.py
+++ b/tempest/services/compute/json/servers_client.py
@@ -20,20 +20,15 @@
 
 from tempest.api_schema.response.compute import servers as common_schema
 from tempest.api_schema.response.compute.v2 import servers as schema
-from tempest.common import rest_client
 from tempest.common import waiters
 from tempest import config
 from tempest import exceptions
+from tempest.services.compute.json import base
 
 CONF = config.CONF
 
 
-class ServersClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(ServersClientJSON, self).__init__(auth_provider)
-
-        self.service = CONF.compute.catalog_type
+class ServersClientJSON(base.ComputeClient):
 
     def create_server(self, name, image_ref, flavor_ref, **kwargs):
         """
diff --git a/tempest/services/compute/json/services_client.py b/tempest/services/compute/json/services_client.py
index e56263c..8d73c37 100644
--- a/tempest/services/compute/json/services_client.py
+++ b/tempest/services/compute/json/services_client.py
@@ -18,17 +18,10 @@
 import urllib
 
 from tempest.api_schema.response.compute import services as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class ServicesClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(ServicesClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class ServicesClientJSON(base.ComputeClient):
 
     def list_services(self, params=None):
         url = 'os-services'
diff --git a/tempest/services/compute/json/tenant_usages_client.py b/tempest/services/compute/json/tenant_usages_client.py
index a0b9b4a..eac23bb 100644
--- a/tempest/services/compute/json/tenant_usages_client.py
+++ b/tempest/services/compute/json/tenant_usages_client.py
@@ -17,17 +17,10 @@
 import urllib
 
 from tempest.api_schema.response.compute.v2 import tenant_usages as schema
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.compute.json import base
 
 
-class TenantUsagesClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(TenantUsagesClientJSON, self).__init__(auth_provider)
-        self.service = CONF.compute.catalog_type
+class TenantUsagesClientJSON(base.ComputeClient):
 
     def list_tenant_usages(self, params=None):
         url = 'os-simple-tenant-usage'
diff --git a/tempest/services/compute/json/volumes_extensions_client.py b/tempest/services/compute/json/volumes_extensions_client.py
index afa6937..69b9bea 100644
--- a/tempest/services/compute/json/volumes_extensions_client.py
+++ b/tempest/services/compute/json/volumes_extensions_client.py
@@ -18,21 +18,20 @@
 import urllib
 
 from tempest.api_schema.response.compute.v2 import volumes as schema
-from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
+from tempest.services.compute.json import base
 
 CONF = config.CONF
 
 
-class VolumesExtensionsClientJSON(rest_client.RestClient):
+class VolumesExtensionsClientJSON(base.ComputeClient):
 
     def __init__(self, auth_provider):
         super(VolumesExtensionsClientJSON, self).__init__(
-            auth_provider)
-        self.service = CONF.compute.catalog_type
-        self.build_interval = CONF.volume.build_interval
-        self.build_timeout = CONF.volume.build_timeout
+            auth_provider,
+            build_interval=CONF.volume.build_interval,
+            build_timeout=CONF.volume.build_timeout)
 
     def list_volumes(self, params=None):
         """List all the volumes created."""
diff --git a/tempest/services/identity/v3/json/base.py b/tempest/services/identity/v3/json/base.py
new file mode 100644
index 0000000..3df0dab
--- /dev/null
+++ b/tempest/services/identity/v3/json/base.py
@@ -0,0 +1,30 @@
+# Copyright 2014 NEC Corporation.  All rights reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.common import rest_client
+from tempest import config
+
+CONF = config.CONF
+
+
+class IdentityV3Client(rest_client.RestClient):
+    """
+    Base identity v3 client class
+    """
+
+    def __init__(self, auth_provider):
+        super(IdentityV3Client, self).__init__(auth_provider)
+        self.service = CONF.identity.catalog_type
+        self.endpoint_url = 'adminURL'
+        self.api_version = "v3"
diff --git a/tempest/services/identity/v3/json/credentials_client.py b/tempest/services/identity/v3/json/credentials_client.py
index d424f4c..42acd2a 100644
--- a/tempest/services/identity/v3/json/credentials_client.py
+++ b/tempest/services/identity/v3/json/credentials_client.py
@@ -15,19 +15,10 @@
 
 import json
 
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.identity.v3.json import base
 
 
-class CredentialsClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(CredentialsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.identity.catalog_type
-        self.endpoint_url = 'adminURL'
-        self.api_version = "v3"
+class CredentialsClientJSON(base.IdentityV3Client):
 
     def create_credential(self, access_key, secret_key, user_id, project_id):
         """Creates a credential."""
diff --git a/tempest/services/identity/v3/json/endpoints_client.py b/tempest/services/identity/v3/json/endpoints_client.py
index c3fedb2..9316a4b 100644
--- a/tempest/services/identity/v3/json/endpoints_client.py
+++ b/tempest/services/identity/v3/json/endpoints_client.py
@@ -15,19 +15,10 @@
 
 import json
 
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.identity.v3.json import base
 
 
-class EndPointClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(EndPointClientJSON, self).__init__(auth_provider)
-        self.service = CONF.identity.catalog_type
-        self.endpoint_url = 'adminURL'
-        self.api_version = "v3"
+class EndPointClientJSON(base.IdentityV3Client):
 
     def list_endpoints(self):
         """GET endpoints."""
diff --git a/tempest/services/identity/v3/json/identity_client.py b/tempest/services/identity/v3/json/identity_client.py
index 6ac4901..4c8d8df 100644
--- a/tempest/services/identity/v3/json/identity_client.py
+++ b/tempest/services/identity/v3/json/identity_client.py
@@ -19,17 +19,12 @@
 from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
+from tempest.services.identity.v3.json import base
 
 CONF = config.CONF
 
 
-class IdentityV3ClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(IdentityV3ClientJSON, self).__init__(auth_provider)
-        self.service = CONF.identity.catalog_type
-        self.endpoint_url = 'adminURL'
-        self.api_version = "v3"
+class IdentityV3ClientJSON(base.IdentityV3Client):
 
     def create_user(self, user_name, password=None, project_id=None,
                     email=None, domain_id='default', **kwargs):
diff --git a/tempest/services/identity/v3/json/policy_client.py b/tempest/services/identity/v3/json/policy_client.py
index 579243c..04374a2 100644
--- a/tempest/services/identity/v3/json/policy_client.py
+++ b/tempest/services/identity/v3/json/policy_client.py
@@ -16,18 +16,10 @@
 import json
 
 from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.identity.v3.json import base
 
 
-class PolicyClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(PolicyClientJSON, self).__init__(auth_provider)
-        self.service = CONF.identity.catalog_type
-        self.endpoint_url = 'adminURL'
-        self.api_version = "v3"
+class PolicyClientJSON(base.IdentityV3Client):
 
     def create_policy(self, blob, type):
         """Creates a Policy."""
diff --git a/tempest/services/identity/v3/json/region_client.py b/tempest/services/identity/v3/json/region_client.py
index becea6b..8545778 100644
--- a/tempest/services/identity/v3/json/region_client.py
+++ b/tempest/services/identity/v3/json/region_client.py
@@ -16,19 +16,10 @@
 import json
 import urllib
 
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.identity.v3.json import base
 
 
-class RegionClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(RegionClientJSON, self).__init__(auth_provider)
-        self.service = CONF.identity.catalog_type
-        self.endpoint_url = 'adminURL'
-        self.api_version = "v3"
+class RegionClientJSON(base.IdentityV3Client):
 
     def create_region(self, description, **kwargs):
         """Create region."""
diff --git a/tempest/services/identity/v3/json/service_client.py b/tempest/services/identity/v3/json/service_client.py
index 8e89957..b8b2556 100644
--- a/tempest/services/identity/v3/json/service_client.py
+++ b/tempest/services/identity/v3/json/service_client.py
@@ -15,19 +15,10 @@
 
 import json
 
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.identity.v3.json import base
 
 
-class ServiceClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(ServiceClientJSON, self).__init__(auth_provider)
-        self.service = CONF.identity.catalog_type
-        self.endpoint_url = 'adminURL'
-        self.api_version = "v3"
+class ServiceClientJSON(base.IdentityV3Client):
 
     def update_service(self, service_id, **kwargs):
         """Updates a service."""
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index 809c98b..c622ee4 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -11,12 +11,18 @@
 #    under the License.
 
 import json
+import time
+import urllib
 
 from tempest.common import rest_client
-from tempest.services.network import network_client_base
+from tempest.common.utils import misc
+from tempest import config
+from tempest import exceptions
+
+CONF = config.CONF
 
 
-class NetworkClientJSON(network_client_base.NetworkClientBase):
+class NetworkClientJSON(rest_client.RestClient):
 
     """
     Tempest REST client for Neutron. Uses v2 of the Neutron API, since the
@@ -31,8 +37,228 @@
     quotas
     """
 
-    def get_rest_client(self, auth_provider):
-        return rest_client.RestClient(auth_provider)
+    def __init__(self, auth_provider):
+        super(NetworkClientJSON, self).__init__(auth_provider)
+        self.service = CONF.network.catalog_type
+        self.build_timeout = CONF.network.build_timeout
+        self.build_interval = CONF.network.build_interval
+        self.version = '2.0'
+        self.uri_prefix = "v%s" % (self.version)
+
+    def get_uri(self, plural_name):
+        # get service prefix from resource name
+
+        # The following list represents resource names that do not require
+        # changing underscore to a hyphen
+        hyphen_exceptions = ["health_monitors", "firewall_rules",
+                             "firewall_policies"]
+        # the following map is used to construct proper URI
+        # for the given neutron resource
+        service_resource_prefix_map = {
+            'networks': '',
+            'subnets': '',
+            'ports': '',
+            'pools': 'lb',
+            'vips': 'lb',
+            'health_monitors': 'lb',
+            'members': 'lb',
+            'ipsecpolicies': 'vpn',
+            'vpnservices': 'vpn',
+            'ikepolicies': 'vpn',
+            'ipsecpolicies': 'vpn',
+            'metering_labels': 'metering',
+            'metering_label_rules': 'metering',
+            'firewall_rules': 'fw',
+            'firewall_policies': 'fw',
+            'firewalls': 'fw'
+        }
+        service_prefix = service_resource_prefix_map.get(
+            plural_name)
+        if plural_name not in hyphen_exceptions:
+            plural_name = plural_name.replace("_", "-")
+        if service_prefix:
+            uri = '%s/%s/%s' % (self.uri_prefix, service_prefix,
+                                plural_name)
+        else:
+            uri = '%s/%s' % (self.uri_prefix, plural_name)
+        return uri
+
+    def pluralize(self, resource_name):
+        # get plural from map or just add 's'
+
+        # map from resource name to a plural name
+        # needed only for those which can't be constructed as name + 's'
+        resource_plural_map = {
+            'security_groups': 'security_groups',
+            'security_group_rules': 'security_group_rules',
+            'ipsecpolicy': 'ipsecpolicies',
+            'ikepolicy': 'ikepolicies',
+            'ipsecpolicy': 'ipsecpolicies',
+            'quotas': 'quotas',
+            'firewall_policy': 'firewall_policies'
+        }
+        return resource_plural_map.get(resource_name, resource_name + 's')
+
+    def _lister(self, plural_name):
+        def _list(**filters):
+            uri = self.get_uri(plural_name)
+            if filters:
+                uri += '?' + urllib.urlencode(filters, doseq=1)
+            resp, body = self.get(uri)
+            result = {plural_name: self.deserialize_list(body)}
+            self.expected_success(200, resp.status)
+            return rest_client.ResponseBody(resp, result)
+
+        return _list
+
+    def _deleter(self, resource_name):
+        def _delete(resource_id):
+            plural = self.pluralize(resource_name)
+            uri = '%s/%s' % (self.get_uri(plural), resource_id)
+            resp, body = self.delete(uri)
+            self.expected_success(204, resp.status)
+            return rest_client.ResponseBody(resp, body)
+
+        return _delete
+
+    def _shower(self, resource_name):
+        def _show(resource_id, **fields):
+            # fields is a dict which key is 'fields' and value is a
+            # list of field's name. An example:
+            # {'fields': ['id', 'name']}
+            plural = self.pluralize(resource_name)
+            uri = '%s/%s' % (self.get_uri(plural), resource_id)
+            if fields:
+                uri += '?' + urllib.urlencode(fields, doseq=1)
+            resp, body = self.get(uri)
+            body = self.deserialize_single(body)
+            self.expected_success(200, resp.status)
+            return rest_client.ResponseBody(resp, body)
+
+        return _show
+
+    def _creater(self, resource_name):
+        def _create(**kwargs):
+            plural = self.pluralize(resource_name)
+            uri = self.get_uri(plural)
+            post_data = self.serialize({resource_name: kwargs})
+            resp, body = self.post(uri, post_data)
+            body = self.deserialize_single(body)
+            self.expected_success(201, resp.status)
+            return rest_client.ResponseBody(resp, body)
+
+        return _create
+
+    def _updater(self, resource_name):
+        def _update(res_id, **kwargs):
+            plural = self.pluralize(resource_name)
+            uri = '%s/%s' % (self.get_uri(plural), res_id)
+            post_data = self.serialize({resource_name: kwargs})
+            resp, body = self.put(uri, post_data)
+            body = self.deserialize_single(body)
+            self.expected_success(200, resp.status)
+            return rest_client.ResponseBody(resp, body)
+
+        return _update
+
+    def __getattr__(self, name):
+        method_prefixes = ["list_", "delete_", "show_", "create_", "update_"]
+        method_functors = [self._lister,
+                           self._deleter,
+                           self._shower,
+                           self._creater,
+                           self._updater]
+        for index, prefix in enumerate(method_prefixes):
+            prefix_len = len(prefix)
+            if name[:prefix_len] == prefix:
+                return method_functors[index](name[prefix_len:])
+        raise AttributeError(name)
+
+    # Common methods that are hard to automate
+    def create_bulk_network(self, names):
+        network_list = [{'name': name} for name in names]
+        post_data = {'networks': network_list}
+        body = self.serialize_list(post_data, "networks", "network")
+        uri = self.get_uri("networks")
+        resp, body = self.post(uri, body)
+        body = {'networks': self.deserialize_list(body)}
+        self.expected_success(201, resp.status)
+        return rest_client.ResponseBody(resp, body)
+
+    def create_bulk_subnet(self, subnet_list):
+        post_data = {'subnets': subnet_list}
+        body = self.serialize_list(post_data, 'subnets', 'subnet')
+        uri = self.get_uri('subnets')
+        resp, body = self.post(uri, body)
+        body = {'subnets': self.deserialize_list(body)}
+        self.expected_success(201, resp.status)
+        return rest_client.ResponseBody(resp, body)
+
+    def create_bulk_port(self, port_list):
+        post_data = {'ports': port_list}
+        body = self.serialize_list(post_data, 'ports', 'port')
+        uri = self.get_uri('ports')
+        resp, body = self.post(uri, body)
+        body = {'ports': self.deserialize_list(body)}
+        self.expected_success(201, resp.status)
+        return rest_client.ResponseBody(resp, body)
+
+    def wait_for_resource_deletion(self, resource_type, id):
+        """Waits for a resource to be deleted."""
+        start_time = int(time.time())
+        while True:
+            if self.is_resource_deleted(resource_type, id):
+                return
+            if int(time.time()) - start_time >= self.build_timeout:
+                raise exceptions.TimeoutException
+            time.sleep(self.build_interval)
+
+    def is_resource_deleted(self, resource_type, id):
+        method = 'show_' + resource_type
+        try:
+            getattr(self, method)(id)
+        except AttributeError:
+            raise Exception("Unknown resource type %s " % resource_type)
+        except exceptions.NotFound:
+            return True
+        return False
+
+    def wait_for_resource_status(self, fetch, status, interval=None,
+                                 timeout=None):
+        """
+        @summary: Waits for a network resource to reach a status
+        @param fetch: the callable to be used to query the resource status
+        @type fecth: callable that takes no parameters and returns the resource
+        @param status: the status that the resource has to reach
+        @type status: String
+        @param interval: the number of seconds to wait between each status
+          query
+        @type interval: Integer
+        @param timeout: the maximum number of seconds to wait for the resource
+          to reach the desired status
+        @type timeout: Integer
+        """
+        if not interval:
+            interval = self.build_interval
+        if not timeout:
+            timeout = self.build_timeout
+        start_time = time.time()
+
+        while time.time() - start_time <= timeout:
+            resource = fetch()
+            if resource['status'] == status:
+                return
+            time.sleep(interval)
+
+        # At this point, the wait has timed out
+        message = 'Resource %s' % (str(resource))
+        message += ' failed to reach status %s' % status
+        message += ' (current: %s)' % resource['status']
+        message += ' within the required time %s' % timeout
+        caller = misc.find_test_caller()
+        if caller:
+            message = '(%s) %s' % (caller, message)
+        raise exceptions.TimeoutException(message)
 
     def deserialize_single(self, body):
         return json.loads(body)
@@ -59,15 +285,15 @@
         body = json.dumps(put_body)
         uri = '%s/quotas/%s' % (self.uri_prefix, tenant_id)
         resp, body = self.put(uri, body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body['quota']
+        return rest_client.ResponseBody(resp, body['quota'])
 
     def reset_quotas(self, tenant_id):
         uri = '%s/quotas/%s' % (self.uri_prefix, tenant_id)
         resp, body = self.delete(uri)
-        self.rest_client.expected_success(204, resp.status)
-        return resp, body
+        self.expected_success(204, resp.status)
+        return rest_client.ResponseBody(resp, body)
 
     def create_router(self, name, admin_state_up=True, **kwargs):
         post_body = {'router': kwargs}
@@ -76,14 +302,14 @@
         body = json.dumps(post_body)
         uri = '%s/routers' % (self.uri_prefix)
         resp, body = self.post(uri, body)
-        self.rest_client.expected_success(201, resp.status)
+        self.expected_success(201, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def _update_router(self, router_id, set_enable_snat, **kwargs):
         uri = '%s/routers/%s' % (self.uri_prefix, router_id)
         resp, body = self.get(uri)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
         update_body = {}
         update_body['name'] = kwargs.get('name', body['router']['name'])
@@ -103,9 +329,9 @@
         update_body = dict(router=update_body)
         update_body = json.dumps(update_body)
         resp, body = self.put(uri, update_body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def update_router(self, router_id, **kwargs):
         """Update a router leaving enable_snat to its default value."""
@@ -130,9 +356,9 @@
         update_body = {"subnet_id": subnet_id}
         update_body = json.dumps(update_body)
         resp, body = self.put(uri, update_body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def add_router_interface_with_port_id(self, router_id, port_id):
         uri = '%s/routers/%s/add_router_interface' % (self.uri_prefix,
@@ -140,9 +366,9 @@
         update_body = {"port_id": port_id}
         update_body = json.dumps(update_body)
         resp, body = self.put(uri, update_body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def remove_router_interface_with_subnet_id(self, router_id, subnet_id):
         uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
@@ -150,9 +376,9 @@
         update_body = {"subnet_id": subnet_id}
         update_body = json.dumps(update_body)
         resp, body = self.put(uri, update_body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def remove_router_interface_with_port_id(self, router_id, port_id):
         uri = '%s/routers/%s/remove_router_interface' % (self.uri_prefix,
@@ -160,9 +386,9 @@
         update_body = {"port_id": port_id}
         update_body = json.dumps(update_body)
         resp, body = self.put(uri, update_body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def associate_health_monitor_with_pool(self, health_monitor_id,
                                            pool_id):
@@ -175,24 +401,24 @@
         uri = '%s/lb/pools/%s/health_monitors' % (self.uri_prefix,
                                                   pool_id)
         resp, body = self.post(uri, body)
-        self.rest_client.expected_success(201, resp.status)
+        self.expected_success(201, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def disassociate_health_monitor_with_pool(self, health_monitor_id,
                                               pool_id):
         uri = '%s/lb/pools/%s/health_monitors/%s' % (self.uri_prefix, pool_id,
                                                      health_monitor_id)
         resp, body = self.delete(uri)
-        self.rest_client.expected_success(204, resp.status)
-        return resp, body
+        self.expected_success(204, resp.status)
+        return rest_client.ResponseBody(resp, body)
 
     def list_router_interfaces(self, uuid):
         uri = '%s/ports?device_id=%s' % (self.uri_prefix, uuid)
         resp, body = self.get(uri)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def update_agent(self, agent_id, agent_info):
         """
@@ -203,75 +429,75 @@
         agent = {"agent": agent_info}
         body = json.dumps(agent)
         resp, body = self.put(uri, body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def list_pools_hosted_by_one_lbaas_agent(self, agent_id):
         uri = '%s/agents/%s/loadbalancer-pools' % (self.uri_prefix, agent_id)
         resp, body = self.get(uri)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def show_lbaas_agent_hosting_pool(self, pool_id):
         uri = ('%s/lb/pools/%s/loadbalancer-agent' %
                (self.uri_prefix, pool_id))
         resp, body = self.get(uri)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def list_routers_on_l3_agent(self, agent_id):
         uri = '%s/agents/%s/l3-routers' % (self.uri_prefix, agent_id)
         resp, body = self.get(uri)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def list_l3_agents_hosting_router(self, router_id):
         uri = '%s/routers/%s/l3-agents' % (self.uri_prefix, router_id)
         resp, body = self.get(uri)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def add_router_to_l3_agent(self, agent_id, router_id):
         uri = '%s/agents/%s/l3-routers' % (self.uri_prefix, agent_id)
         post_body = {"router_id": router_id}
         body = json.dumps(post_body)
         resp, body = self.post(uri, body)
-        self.rest_client.expected_success(201, resp.status)
+        self.expected_success(201, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def remove_router_from_l3_agent(self, agent_id, router_id):
         uri = '%s/agents/%s/l3-routers/%s' % (
             self.uri_prefix, agent_id, router_id)
         resp, body = self.delete(uri)
-        self.rest_client.expected_success(204, resp.status)
-        return resp, body
+        self.expected_success(204, resp.status)
+        return rest_client.ResponseBody(resp, body)
 
     def list_dhcp_agent_hosting_network(self, network_id):
         uri = '%s/networks/%s/dhcp-agents' % (self.uri_prefix, network_id)
         resp, body = self.get(uri)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def list_networks_hosted_by_one_dhcp_agent(self, agent_id):
         uri = '%s/agents/%s/dhcp-networks' % (self.uri_prefix, agent_id)
         resp, body = self.get(uri)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def remove_network_from_dhcp_agent(self, agent_id, network_id):
         uri = '%s/agents/%s/dhcp-networks/%s' % (self.uri_prefix, agent_id,
                                                  network_id)
         resp, body = self.delete(uri)
-        self.rest_client.expected_success(204, resp.status)
-        return resp, body
+        self.expected_success(204, resp.status)
+        return rest_client.ResponseBody(resp, body)
 
     def create_ikepolicy(self, name, **kwargs):
         post_body = {
@@ -284,9 +510,9 @@
         body = json.dumps(post_body)
         uri = '%s/vpn/ikepolicies' % (self.uri_prefix)
         resp, body = self.post(uri, body)
-        self.rest_client.expected_success(201, resp.status)
+        self.expected_success(201, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def update_extra_routes(self, router_id, nexthop, destination):
         uri = '%s/routers/%s' % (self.uri_prefix, router_id)
@@ -298,9 +524,9 @@
         }
         body = json.dumps(put_body)
         resp, body = self.put(uri, body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def delete_extra_routes(self, router_id):
         uri = '%s/routers/%s' % (self.uri_prefix, router_id)
@@ -312,25 +538,25 @@
         }
         body = json.dumps(put_body)
         resp, body = self.put(uri, body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def list_lb_pool_stats(self, pool_id):
         uri = '%s/lb/pools/%s/stats' % (self.uri_prefix, pool_id)
         resp, body = self.get(uri)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def add_dhcp_agent_to_network(self, agent_id, network_id):
         post_body = {'network_id': network_id}
         body = json.dumps(post_body)
         uri = '%s/agents/%s/dhcp-networks' % (self.uri_prefix, agent_id)
         resp, body = self.post(uri, body)
-        self.rest_client.expected_success(201, resp.status)
+        self.expected_success(201, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def insert_firewall_rule_in_policy(self, firewall_policy_id,
                                        firewall_rule_id, insert_after="",
@@ -344,9 +570,9 @@
         }
         body = json.dumps(body)
         resp, body = self.put(uri, body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
 
     def remove_firewall_rule_from_policy(self, firewall_policy_id,
                                          firewall_rule_id):
@@ -355,6 +581,6 @@
         update_body = {"firewall_rule_id": firewall_rule_id}
         update_body = json.dumps(update_body)
         resp, body = self.put(uri, update_body)
-        self.rest_client.expected_success(200, resp.status)
+        self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body
+        return rest_client.ResponseBody(resp, body)
diff --git a/tempest/services/network/network_client_base.py b/tempest/services/network/network_client_base.py
deleted file mode 100644
index 2c767d9..0000000
--- a/tempest/services/network/network_client_base.py
+++ /dev/null
@@ -1,267 +0,0 @@
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import time
-import urllib
-
-from tempest.common.utils import misc
-from tempest import config
-from tempest import exceptions
-
-CONF = config.CONF
-
-# the following map is used to construct proper URI
-# for the given neutron resource
-service_resource_prefix_map = {
-    'networks': '',
-    'subnets': '',
-    'ports': '',
-    'pools': 'lb',
-    'vips': 'lb',
-    'health_monitors': 'lb',
-    'members': 'lb',
-    'ipsecpolicies': 'vpn',
-    'vpnservices': 'vpn',
-    'ikepolicies': 'vpn',
-    'ipsecpolicies': 'vpn',
-    'metering_labels': 'metering',
-    'metering_label_rules': 'metering',
-    'firewall_rules': 'fw',
-    'firewall_policies': 'fw',
-    'firewalls': 'fw'
-}
-
-# The following list represents resource names that do not require
-# changing underscore to a hyphen
-hyphen_exceptions = ["health_monitors", "firewall_rules", "firewall_policies"]
-
-# map from resource name to a plural name
-# needed only for those which can't be constructed as name + 's'
-resource_plural_map = {
-    'security_groups': 'security_groups',
-    'security_group_rules': 'security_group_rules',
-    'ipsecpolicy': 'ipsecpolicies',
-    'ikepolicy': 'ikepolicies',
-    'ipsecpolicy': 'ipsecpolicies',
-    'quotas': 'quotas',
-    'firewall_policy': 'firewall_policies'
-}
-
-
-class NetworkClientBase(object):
-    def __init__(self, auth_provider):
-        self.rest_client = self.get_rest_client(
-            auth_provider)
-        self.rest_client.service = CONF.network.catalog_type
-        self.version = '2.0'
-        self.uri_prefix = "v%s" % (self.version)
-        self.build_timeout = CONF.network.build_timeout
-        self.build_interval = CONF.network.build_interval
-
-    def get_rest_client(self, auth_provider):
-        raise NotImplementedError
-
-    def post(self, uri, body, headers=None):
-        return self.rest_client.post(uri, body, headers)
-
-    def put(self, uri, body, headers=None):
-        return self.rest_client.put(uri, body, headers)
-
-    def get(self, uri, headers=None):
-        return self.rest_client.get(uri, headers)
-
-    def delete(self, uri, headers=None):
-        return self.rest_client.delete(uri, headers)
-
-    def deserialize_list(self, body):
-        raise NotImplementedError
-
-    def deserialize_single(self, body):
-        raise NotImplementedError
-
-    def get_uri(self, plural_name):
-        # get service prefix from resource name
-        service_prefix = service_resource_prefix_map.get(
-            plural_name)
-        if plural_name not in hyphen_exceptions:
-            plural_name = plural_name.replace("_", "-")
-        if service_prefix:
-            uri = '%s/%s/%s' % (self.uri_prefix, service_prefix,
-                                plural_name)
-        else:
-            uri = '%s/%s' % (self.uri_prefix, plural_name)
-        return uri
-
-    def pluralize(self, resource_name):
-        # get plural from map or just add 's'
-        return resource_plural_map.get(resource_name, resource_name + 's')
-
-    def _lister(self, plural_name):
-        def _list(**filters):
-            uri = self.get_uri(plural_name)
-            if filters:
-                uri += '?' + urllib.urlencode(filters, doseq=1)
-            resp, body = self.get(uri)
-            result = {plural_name: self.deserialize_list(body)}
-            self.rest_client.expected_success(200, resp.status)
-            return resp, result
-
-        return _list
-
-    def _deleter(self, resource_name):
-        def _delete(resource_id):
-            plural = self.pluralize(resource_name)
-            uri = '%s/%s' % (self.get_uri(plural), resource_id)
-            resp, body = self.delete(uri)
-            self.rest_client.expected_success(204, resp.status)
-            return resp, body
-
-        return _delete
-
-    def _shower(self, resource_name):
-        def _show(resource_id, **fields):
-            # fields is a dict which key is 'fields' and value is a
-            # list of field's name. An example:
-            # {'fields': ['id', 'name']}
-            plural = self.pluralize(resource_name)
-            uri = '%s/%s' % (self.get_uri(plural), resource_id)
-            if fields:
-                uri += '?' + urllib.urlencode(fields, doseq=1)
-            resp, body = self.get(uri)
-            body = self.deserialize_single(body)
-            self.rest_client.expected_success(200, resp.status)
-            return resp, body
-
-        return _show
-
-    def _creater(self, resource_name):
-        def _create(**kwargs):
-            plural = self.pluralize(resource_name)
-            uri = self.get_uri(plural)
-            post_data = self.serialize({resource_name: kwargs})
-            resp, body = self.post(uri, post_data)
-            body = self.deserialize_single(body)
-            self.rest_client.expected_success(201, resp.status)
-            return resp, body
-
-        return _create
-
-    def _updater(self, resource_name):
-        def _update(res_id, **kwargs):
-            plural = self.pluralize(resource_name)
-            uri = '%s/%s' % (self.get_uri(plural), res_id)
-            post_data = self.serialize({resource_name: kwargs})
-            resp, body = self.put(uri, post_data)
-            body = self.deserialize_single(body)
-            self.rest_client.expected_success(200, resp.status)
-            return resp, body
-
-        return _update
-
-    def __getattr__(self, name):
-        method_prefixes = ["list_", "delete_", "show_", "create_", "update_"]
-        method_functors = [self._lister,
-                           self._deleter,
-                           self._shower,
-                           self._creater,
-                           self._updater]
-        for index, prefix in enumerate(method_prefixes):
-            prefix_len = len(prefix)
-            if name[:prefix_len] == prefix:
-                return method_functors[index](name[prefix_len:])
-        raise AttributeError(name)
-
-    # Common methods that are hard to automate
-    def create_bulk_network(self, names):
-        network_list = [{'name': name} for name in names]
-        post_data = {'networks': network_list}
-        body = self.serialize_list(post_data, "networks", "network")
-        uri = self.get_uri("networks")
-        resp, body = self.post(uri, body)
-        body = {'networks': self.deserialize_list(body)}
-        self.rest_client.expected_success(201, resp.status)
-        return resp, body
-
-    def create_bulk_subnet(self, subnet_list):
-        post_data = {'subnets': subnet_list}
-        body = self.serialize_list(post_data, 'subnets', 'subnet')
-        uri = self.get_uri('subnets')
-        resp, body = self.post(uri, body)
-        body = {'subnets': self.deserialize_list(body)}
-        self.rest_client.expected_success(201, resp.status)
-        return resp, body
-
-    def create_bulk_port(self, port_list):
-        post_data = {'ports': port_list}
-        body = self.serialize_list(post_data, 'ports', 'port')
-        uri = self.get_uri('ports')
-        resp, body = self.post(uri, body)
-        body = {'ports': self.deserialize_list(body)}
-        self.rest_client.expected_success(201, resp.status)
-        return resp, body
-
-    def wait_for_resource_deletion(self, resource_type, id):
-        """Waits for a resource to be deleted."""
-        start_time = int(time.time())
-        while True:
-            if self.is_resource_deleted(resource_type, id):
-                return
-            if int(time.time()) - start_time >= self.build_timeout:
-                raise exceptions.TimeoutException
-            time.sleep(self.build_interval)
-
-    def is_resource_deleted(self, resource_type, id):
-        method = 'show_' + resource_type
-        try:
-            getattr(self, method)(id)
-        except AttributeError:
-            raise Exception("Unknown resource type %s " % resource_type)
-        except exceptions.NotFound:
-            return True
-        return False
-
-    def wait_for_resource_status(self, fetch, status, interval=None,
-                                 timeout=None):
-        """
-        @summary: Waits for a network resource to reach a status
-        @param fetch: the callable to be used to query the resource status
-        @type fecth: callable that takes no parameters and returns the resource
-        @param status: the status that the resource has to reach
-        @type status: String
-        @param interval: the number of seconds to wait between each status
-          query
-        @type interval: Integer
-        @param timeout: the maximum number of seconds to wait for the resource
-          to reach the desired status
-        @type timeout: Integer
-        """
-        if not interval:
-            interval = self.build_interval
-        if not timeout:
-            timeout = self.build_timeout
-        start_time = time.time()
-
-        while time.time() - start_time <= timeout:
-            resource = fetch()
-            if resource['status'] == status:
-                return
-            time.sleep(interval)
-
-        # At this point, the wait has timed out
-        message = 'Resource %s' % (str(resource))
-        message += ' failed to reach status %s' % status
-        message += ' (current: %s)' % resource['status']
-        message += ' within the required time %s' % timeout
-        caller = misc.find_test_caller()
-        if caller:
-            message = '(%s) %s' % (caller, message)
-        raise exceptions.TimeoutException(message)
diff --git a/tempest/services/network/resources.py b/tempest/services/network/resources.py
index a84b4d5..513d2cf 100644
--- a/tempest/services/network/resources.py
+++ b/tempest/services/network/resources.py
@@ -82,7 +82,7 @@
         self._router_ids = set()
 
     def update(self, *args, **kwargs):
-        _, result = self.client.update_subnet(subnet=self.id, *args, **kwargs)
+        result = self.client.update_subnet(subnet=self.id, *args, **kwargs)
         super(DeletableSubnet, self).update(**result['subnet'])
 
     def add_to_router(self, router_id):
@@ -108,9 +108,9 @@
         return self.update(external_gateway_info=dict())
 
     def update(self, *args, **kwargs):
-        _, result = self.client.update_router(self.id,
-                                              *args,
-                                              **kwargs)
+        result = self.client.update_router(self.id,
+                                           *args,
+                                           **kwargs)
         return super(DeletableRouter, self).update(**result['router'])
 
     def delete(self):
@@ -121,15 +121,15 @@
 class DeletableFloatingIp(DeletableResource):
 
     def refresh(self, *args, **kwargs):
-        _, result = self.client.show_floatingip(self.id,
-                                                *args,
-                                                **kwargs)
+        result = self.client.show_floatingip(self.id,
+                                             *args,
+                                             **kwargs)
         super(DeletableFloatingIp, self).update(**result['floatingip'])
 
     def update(self, *args, **kwargs):
-        _, result = self.client.update_floatingip(self.id,
-                                                  *args,
-                                                  **kwargs)
+        result = self.client.update_floatingip(self.id,
+                                               *args,
+                                               **kwargs)
         super(DeletableFloatingIp, self).update(**result['floatingip'])
 
     def __repr__(self):
@@ -183,5 +183,5 @@
         self.client.delete_vip(self.id)
 
     def refresh(self):
-        _, result = self.client.show_vip(self.id)
-        super(DeletableVip, self).update(**result['vip'])
\ No newline at end of file
+        result = self.client.show_vip(self.id)
+        super(DeletableVip, self).update(**result['vip'])
diff --git a/tempest/services/object_storage/account_client.py b/tempest/services/object_storage/account_client.py
index a2044ef..23984cd 100644
--- a/tempest/services/object_storage/account_client.py
+++ b/tempest/services/object_storage/account_client.py
@@ -18,17 +18,14 @@
 from xml.etree import ElementTree as etree
 
 from tempest.common import http
-from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
+from tempest.services.object_storage import base
 
 CONF = config.CONF
 
 
-class AccountClient(rest_client.RestClient):
-    def __init__(self, auth_provider):
-        super(AccountClient, self).__init__(auth_provider)
-        self.service = CONF.object_storage.catalog_type
+class AccountClient(base.ObjectStorageClient):
 
     def create_account(self, data=None,
                        params=None,
@@ -167,17 +164,10 @@
         return resp, body
 
 
-class AccountClientCustomizedHeader(rest_client.RestClient):
+class AccountClientCustomizedHeader(base.ObjectStorageClient):
 
     # TODO(andreaf) This class is now redundant, to be removed in next patch
 
-    def __init__(self, auth_provider):
-        super(AccountClientCustomizedHeader, self).__init__(
-            auth_provider)
-        # Overwrites json-specific header encoding in rest_client.RestClient
-        self.service = CONF.object_storage.catalog_type
-        self.format = 'json'
-
     def request(self, method, url, extra_headers=False, headers=None,
                 body=None):
         """A simple HTTP request interface."""
diff --git a/tempest/services/object_storage/base.py b/tempest/services/object_storage/base.py
new file mode 100644
index 0000000..c903ca5
--- /dev/null
+++ b/tempest/services/object_storage/base.py
@@ -0,0 +1,29 @@
+# Copyright 2014 NEC Corporation.  All rights reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.common import rest_client
+from tempest import config
+
+CONF = config.CONF
+
+
+class ObjectStorageClient(rest_client.RestClient):
+    """
+    Base object storage client class
+    """
+
+    def __init__(self, auth_provider):
+        super(ObjectStorageClient, self).__init__(auth_provider)
+        self.service = CONF.object_storage.catalog_type
+        self.format = 'json'
diff --git a/tempest/services/object_storage/container_client.py b/tempest/services/object_storage/container_client.py
index 182c4d0..c55826b 100644
--- a/tempest/services/object_storage/container_client.py
+++ b/tempest/services/object_storage/container_client.py
@@ -17,20 +17,10 @@
 import urllib
 from xml.etree import ElementTree as etree
 
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.object_storage import base
 
 
-class ContainerClient(rest_client.RestClient):
-    def __init__(self, auth_provider):
-        super(ContainerClient, self).__init__(auth_provider)
-
-        # Overwrites json-specific header encoding in rest_client.RestClient
-        self.headers = {}
-        self.service = CONF.object_storage.catalog_type
-        self.format = 'json'
+class ContainerClient(base.ObjectStorageClient):
 
     def create_container(
             self, container_name,
diff --git a/tempest/services/object_storage/object_client.py b/tempest/services/object_storage/object_client.py
index 7a69fa8..a93a9df 100644
--- a/tempest/services/object_storage/object_client.py
+++ b/tempest/services/object_storage/object_client.py
@@ -18,18 +18,14 @@
 import urlparse
 
 from tempest.common import http
-from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
+from tempest.services.object_storage import base
 
 CONF = config.CONF
 
 
-class ObjectClient(rest_client.RestClient):
-    def __init__(self, auth_provider):
-        super(ObjectClient, self).__init__(auth_provider)
-
-        self.service = CONF.object_storage.catalog_type
+class ObjectClient(base.ObjectStorageClient):
 
     def create_object(self, container, object_name, data,
                       params=None, metadata=None):
@@ -182,17 +178,10 @@
         return resp.status, resp.reason, resp_headers
 
 
-class ObjectClientCustomizedHeader(rest_client.RestClient):
+class ObjectClientCustomizedHeader(base.ObjectStorageClient):
 
     # TODO(andreaf) This class is now redundant, to be removed in next patch
 
-    def __init__(self, auth_provider):
-        super(ObjectClientCustomizedHeader, self).__init__(
-            auth_provider)
-        # Overwrites json-specific header encoding in rest_client.RestClient
-        self.service = CONF.object_storage.catalog_type
-        self.format = 'json'
-
     def request(self, method, url, extra_headers=False, headers=None,
                 body=None):
         """A simple HTTP request interface."""
diff --git a/tempest/services/telemetry/json/telemetry_client.py b/tempest/services/telemetry/json/telemetry_client.py
index 996aceb..d2dd375 100644
--- a/tempest/services/telemetry/json/telemetry_client.py
+++ b/tempest/services/telemetry/json/telemetry_client.py
@@ -13,15 +13,22 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import urllib
+
 from tempest.common import rest_client
+from tempest import config
 from tempest.openstack.common import jsonutils as json
-import tempest.services.telemetry.telemetry_client_base as client
+
+CONF = config.CONF
 
 
-class TelemetryClientJSON(client.TelemetryClientBase):
+class TelemetryClientJSON(rest_client.RestClient):
 
-    def get_rest_client(self, auth_provider):
-        return rest_client.RestClient(auth_provider)
+    def __init__(self, auth_provider):
+        super(TelemetryClientJSON, self).__init__(auth_provider)
+        self.service = CONF.telemetry.catalog_type
+        self.version = '2'
+        self.uri_prefix = "v%s" % self.version
 
     def deserialize(self, body):
         return json.loads(body.replace("\n", ""))
@@ -42,4 +49,87 @@
 
     def create_sample(self, meter_name, sample_list):
         uri = "%s/meters/%s" % (self.uri_prefix, meter_name)
-        return self.post(uri, str(sample_list))
+        body = self.serialize(sample_list)
+        resp, body = self.post(uri, body)
+        body = self.deserialize(body)
+        return resp, body
+
+    def helper_list(self, uri, query=None, period=None):
+        uri_dict = {}
+        if query:
+            uri_dict = {'q.field': query[0],
+                        'q.op': query[1],
+                        'q.value': query[2]}
+        if period:
+            uri_dict['period'] = period
+        if uri_dict:
+            uri += "?%s" % urllib.urlencode(uri_dict)
+        resp, body = self.get(uri)
+        body = self.deserialize(body)
+        return resp, body
+
+    def list_resources(self, query=None):
+        uri = '%s/resources' % self.uri_prefix
+        return self.helper_list(uri, query)
+
+    def list_meters(self, query=None):
+        uri = '%s/meters' % self.uri_prefix
+        return self.helper_list(uri, query)
+
+    def list_alarms(self, query=None):
+        uri = '%s/alarms' % self.uri_prefix
+        return self.helper_list(uri, query)
+
+    def list_statistics(self, meter, period=None, query=None):
+        uri = "%s/meters/%s/statistics" % (self.uri_prefix, meter)
+        return self.helper_list(uri, query, period)
+
+    def list_samples(self, meter_id, query=None):
+        uri = '%s/meters/%s' % (self.uri_prefix, meter_id)
+        return self.helper_list(uri, query)
+
+    def get_resource(self, resource_id):
+        uri = '%s/resources/%s' % (self.uri_prefix, resource_id)
+        resp, body = self.get(uri)
+        body = self.deserialize(body)
+        return resp, body
+
+    def get_alarm(self, alarm_id):
+        uri = '%s/alarms/%s' % (self.uri_prefix, alarm_id)
+        resp, body = self.get(uri)
+        body = self.deserialize(body)
+        return resp, body
+
+    def delete_alarm(self, alarm_id):
+        uri = "%s/alarms/%s" % (self.uri_prefix, alarm_id)
+        resp, body = self.delete(uri)
+        if body:
+            body = self.deserialize(body)
+        return resp, body
+
+    def create_alarm(self, **kwargs):
+        uri = "%s/alarms" % self.uri_prefix
+        body = self.serialize(kwargs)
+        resp, body = self.post(uri, body)
+        body = self.deserialize(body)
+        return resp, body
+
+    def update_alarm(self, alarm_id, **kwargs):
+        uri = "%s/alarms/%s" % (self.uri_prefix, alarm_id)
+        body = self.serialize(kwargs)
+        resp, body = self.put(uri, body)
+        body = self.deserialize(body)
+        return resp, body
+
+    def alarm_get_state(self, alarm_id):
+        uri = "%s/alarms/%s/state" % (self.uri_prefix, alarm_id)
+        resp, body = self.get(uri)
+        body = self.deserialize(body)
+        return resp, body
+
+    def alarm_set_state(self, alarm_id, state):
+        uri = "%s/alarms/%s/state" % (self.uri_prefix, alarm_id)
+        body = self.serialize(state)
+        resp, body = self.put(uri, body)
+        body = self.deserialize(body)
+        return resp, body
diff --git a/tempest/services/telemetry/telemetry_client_base.py b/tempest/services/telemetry/telemetry_client_base.py
deleted file mode 100644
index a184a77..0000000
--- a/tempest/services/telemetry/telemetry_client_base.py
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright 2013 OpenStack Foundation
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-
-import abc
-import urllib
-
-import six
-
-from tempest import config
-
-CONF = config.CONF
-
-
-@six.add_metaclass(abc.ABCMeta)
-class TelemetryClientBase(object):
-
-    """
-    Tempest REST client for Ceilometer V2 API.
-    Implements the following basic Ceilometer abstractions:
-    resources
-    meters
-    alarms
-    queries
-    statistics
-    """
-
-    def __init__(self, auth_provider):
-        self.rest_client = self.get_rest_client(auth_provider)
-        self.rest_client.service = CONF.telemetry.catalog_type
-        self.version = '2'
-        self.uri_prefix = "v%s" % self.version
-
-    @abc.abstractmethod
-    def get_rest_client(self, auth_provider):
-        """
-        :param config:
-        :param username:
-        :param password:
-        :param auth_url:
-        :param tenant_name:
-        :return: RestClient
-        """
-
-    @abc.abstractmethod
-    def deserialize(self, body):
-        """
-        :param body:
-        :return: Deserialize body
-        """
-
-    @abc.abstractmethod
-    def serialize(self, body):
-        """
-        :param body:
-        :return: Serialize body
-        """
-
-    def post(self, uri, body):
-        body = self.serialize(body)
-        resp, body = self.rest_client.post(uri, body)
-        body = self.deserialize(body)
-        return resp, body
-
-    def put(self, uri, body):
-        body = self.serialize(body)
-        resp, body = self.rest_client.put(uri, body)
-        body = self.deserialize(body)
-        return resp, body
-
-    def get(self, uri):
-        resp, body = self.rest_client.get(uri)
-        body = self.deserialize(body)
-        return resp, body
-
-    def delete(self, uri):
-        resp, body = self.rest_client.delete(uri)
-        if body:
-            body = self.deserialize(body)
-        return resp, body
-
-    def helper_list(self, uri, query=None, period=None):
-        uri_dict = {}
-        if query:
-            uri_dict = {'q.field': query[0],
-                        'q.op': query[1],
-                        'q.value': query[2]}
-        if period:
-            uri_dict['period'] = period
-        if uri_dict:
-            uri += "?%s" % urllib.urlencode(uri_dict)
-        return self.get(uri)
-
-    def list_resources(self, query=None):
-        uri = '%s/resources' % self.uri_prefix
-        return self.helper_list(uri, query)
-
-    def list_meters(self, query=None):
-        uri = '%s/meters' % self.uri_prefix
-        return self.helper_list(uri, query)
-
-    def list_alarms(self, query=None):
-        uri = '%s/alarms' % self.uri_prefix
-        return self.helper_list(uri, query)
-
-    def list_statistics(self, meter, period=None, query=None):
-        uri = "%s/meters/%s/statistics" % (self.uri_prefix, meter)
-        return self.helper_list(uri, query, period)
-
-    def list_samples(self, meter_id, query=None):
-        uri = '%s/meters/%s' % (self.uri_prefix, meter_id)
-        return self.helper_list(uri, query)
-
-    def get_resource(self, resource_id):
-        uri = '%s/resources/%s' % (self.uri_prefix, resource_id)
-        return self.get(uri)
-
-    def get_alarm(self, alarm_id):
-        uri = '%s/alarms/%s' % (self.uri_prefix, alarm_id)
-        return self.get(uri)
-
-    def delete_alarm(self, alarm_id):
-        uri = "%s/alarms/%s" % (self.uri_prefix, alarm_id)
-        return self.delete(uri)
-
-    def create_alarm(self, **kwargs):
-        uri = "%s/alarms" % self.uri_prefix
-        return self.post(uri, kwargs)
-
-    def update_alarm(self, alarm_id, **kwargs):
-        uri = "%s/alarms/%s" % (self.uri_prefix, alarm_id)
-        return self.put(uri, kwargs)
-
-    def alarm_get_state(self, alarm_id):
-        uri = "%s/alarms/%s/state" % (self.uri_prefix, alarm_id)
-        return self.get(uri)
-
-    def alarm_set_state(self, alarm_id, state):
-        uri = "%s/alarms/%s/state" % (self.uri_prefix, alarm_id)
-        return self.put(uri, state)
diff --git a/tempest/services/volume/json/admin/volume_hosts_client.py b/tempest/services/volume/json/admin/volume_hosts_client.py
index 10cb0be..e7add30 100644
--- a/tempest/services/volume/json/admin/volume_hosts_client.py
+++ b/tempest/services/volume/json/admin/volume_hosts_client.py
@@ -16,24 +16,14 @@
 import json
 import urllib
 
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.volume.json import base
 
 
-class BaseVolumeHostsClientJSON(rest_client.RestClient):
+class BaseVolumeHostsClientJSON(base.VolumeClient):
     """
     Client class to send CRUD Volume Hosts API requests to a Cinder endpoint
     """
 
-    def __init__(self, auth_provider):
-        super(BaseVolumeHostsClientJSON, self).__init__(auth_provider)
-
-        self.service = CONF.volume.catalog_type
-        self.build_interval = CONF.volume.build_interval
-        self.build_timeout = CONF.volume.build_timeout
-
     def list_hosts(self, params=None):
         """Lists all hosts."""
 
diff --git a/tempest/services/volume/json/admin/volume_quotas_client.py b/tempest/services/volume/json/admin/volume_quotas_client.py
index 5b49040..f08cb64 100644
--- a/tempest/services/volume/json/admin/volume_quotas_client.py
+++ b/tempest/services/volume/json/admin/volume_quotas_client.py
@@ -16,27 +16,17 @@
 
 import urllib
 
-from tempest.common import rest_client
-from tempest import config
 from tempest.openstack.common import jsonutils
-
-CONF = config.CONF
+from tempest.services.volume.json import base
 
 
-class BaseVolumeQuotasClientJSON(rest_client.RestClient):
+class BaseVolumeQuotasClientJSON(base.VolumeClient):
     """
     Client class to send CRUD Volume Quotas API requests to a Cinder endpoint
     """
 
     TYPE = "json"
 
-    def __init__(self, auth_provider):
-        super(BaseVolumeQuotasClientJSON, self).__init__(auth_provider)
-
-        self.service = CONF.volume.catalog_type
-        self.build_interval = CONF.volume.build_interval
-        self.build_timeout = CONF.volume.build_timeout
-
     def get_default_quota_set(self, tenant_id):
         """List the default volume quota set for a tenant."""
 
diff --git a/tempest/services/volume/json/admin/volume_services_client.py b/tempest/services/volume/json/admin/volume_services_client.py
index 88c6db0..5d4f9db 100644
--- a/tempest/services/volume/json/admin/volume_services_client.py
+++ b/tempest/services/volume/json/admin/volume_services_client.py
@@ -16,17 +16,10 @@
 import json
 import urllib
 
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.volume.json import base
 
 
-class BaseVolumesServicesClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(BaseVolumesServicesClientJSON, self).__init__(auth_provider)
-        self.service = CONF.volume.catalog_type
+class BaseVolumesServicesClientJSON(base.VolumeClient):
 
     def list_services(self, params=None):
         url = 'os-services'
diff --git a/tempest/services/volume/json/admin/volume_types_client.py b/tempest/services/volume/json/admin/volume_types_client.py
index eedf880..171ad35 100644
--- a/tempest/services/volume/json/admin/volume_types_client.py
+++ b/tempest/services/volume/json/admin/volume_types_client.py
@@ -16,25 +16,15 @@
 import json
 import urllib
 
-from tempest.common import rest_client
-from tempest import config
 from tempest import exceptions
-
-CONF = config.CONF
+from tempest.services.volume.json import base
 
 
-class BaseVolumeTypesClientJSON(rest_client.RestClient):
+class BaseVolumeTypesClientJSON(base.VolumeClient):
     """
     Client class to send CRUD Volume Types API requests to a Cinder endpoint
     """
 
-    def __init__(self, auth_provider):
-        super(BaseVolumeTypesClientJSON, self).__init__(auth_provider)
-
-        self.service = CONF.volume.catalog_type
-        self.build_interval = CONF.volume.build_interval
-        self.build_timeout = CONF.volume.build_timeout
-
     def is_resource_deleted(self, resource):
         # to use this method self.resource must be defined to respective value
         # Resource is a dictionary containing resource id and type
diff --git a/tempest/services/volume/json/availability_zone_client.py b/tempest/services/volume/json/availability_zone_client.py
index 5ad2287..9f2c570 100644
--- a/tempest/services/volume/json/availability_zone_client.py
+++ b/tempest/services/volume/json/availability_zone_client.py
@@ -15,18 +15,10 @@
 
 import json
 
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.volume.json import base
 
 
-class BaseVolumeAvailabilityZoneClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(BaseVolumeAvailabilityZoneClientJSON, self).__init__(
-            auth_provider)
-        self.service = CONF.volume.catalog_type
+class BaseVolumeAvailabilityZoneClientJSON(base.VolumeClient):
 
     def get_availability_zone_list(self):
         resp, body = self.get('os-availability-zone')
diff --git a/tempest/services/volume/json/backups_client.py b/tempest/services/volume/json/backups_client.py
index 51a017e..e2ba822 100644
--- a/tempest/services/volume/json/backups_client.py
+++ b/tempest/services/volume/json/backups_client.py
@@ -16,24 +16,15 @@
 import json
 import time
 
-from tempest.common import rest_client
-from tempest import config
 from tempest import exceptions
-
-CONF = config.CONF
+from tempest.services.volume.json import base
 
 
-class BaseBackupsClientJSON(rest_client.RestClient):
+class BaseBackupsClientJSON(base.VolumeClient):
     """
     Client class to send CRUD Volume backup API requests to a Cinder endpoint
     """
 
-    def __init__(self, auth_provider):
-        super(BaseBackupsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.volume.catalog_type
-        self.build_interval = CONF.volume.build_interval
-        self.build_timeout = CONF.volume.build_timeout
-
     def create_backup(self, volume_id, container=None, name=None,
                       description=None):
         """Creates a backup of volume."""
diff --git a/tempest/services/volume/json/base.py b/tempest/services/volume/json/base.py
new file mode 100644
index 0000000..8bc2f93
--- /dev/null
+++ b/tempest/services/volume/json/base.py
@@ -0,0 +1,30 @@
+# Copyright 2014 NEC Corporation.  All rights reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.common import rest_client
+from tempest import config
+
+CONF = config.CONF
+
+
+class VolumeClient(rest_client.RestClient):
+    """
+    Base volume client class
+    """
+
+    def __init__(self, auth_provider):
+        super(VolumeClient, self).__init__(auth_provider)
+        self.service = CONF.volume.catalog_type
+        self.build_interval = CONF.volume.build_interval
+        self.build_timeout = CONF.volume.build_timeout
diff --git a/tempest/services/volume/json/extensions_client.py b/tempest/services/volume/json/extensions_client.py
index c84b186..13b91c3 100644
--- a/tempest/services/volume/json/extensions_client.py
+++ b/tempest/services/volume/json/extensions_client.py
@@ -15,17 +15,10 @@
 
 import json
 
-from tempest.common import rest_client
-from tempest import config
-
-CONF = config.CONF
+from tempest.services.volume.json import base
 
 
-class BaseExtensionsClientJSON(rest_client.RestClient):
-
-    def __init__(self, auth_provider):
-        super(BaseExtensionsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.volume.catalog_type
+class BaseExtensionsClientJSON(base.VolumeClient):
 
     def list_extensions(self):
         url = 'extensions'
diff --git a/tempest/services/volume/json/qos_client.py b/tempest/services/volume/json/qos_client.py
index b647bc7..9c13cac 100644
--- a/tempest/services/volume/json/qos_client.py
+++ b/tempest/services/volume/json/qos_client.py
@@ -15,22 +15,13 @@
 import json
 import time
 
-from tempest.common import rest_client
-from tempest import config
 from tempest import exceptions
-
-CONF = config.CONF
+from tempest.services.volume.json import base
 
 
-class BaseQosSpecsClientJSON(rest_client.RestClient):
+class BaseQosSpecsClientJSON(base.VolumeClient):
     """Client class to send CRUD QoS API requests"""
 
-    def __init__(self, auth_provider):
-        super(BaseQosSpecsClientJSON, self).__init__(auth_provider)
-        self.service = CONF.volume.catalog_type
-        self.build_interval = CONF.volume.build_interval
-        self.build_timeout = CONF.volume.build_timeout
-
     def is_resource_deleted(self, qos_id):
         try:
             self.get_qos(qos_id)
diff --git a/tempest/services/volume/json/snapshots_client.py b/tempest/services/volume/json/snapshots_client.py
index e9d5b83..349d1b0 100644
--- a/tempest/services/volume/json/snapshots_client.py
+++ b/tempest/services/volume/json/snapshots_client.py
@@ -14,26 +14,18 @@
 import time
 import urllib
 
-from tempest.common import rest_client
-from tempest import config
 from tempest import exceptions
 from tempest.openstack.common import log as logging
+from tempest.services.volume.json import base
 
-CONF = config.CONF
 
 LOG = logging.getLogger(__name__)
 
 
-class BaseSnapshotsClientJSON(rest_client.RestClient):
+class BaseSnapshotsClientJSON(base.VolumeClient):
     """Base Client class to send CRUD Volume API requests."""
 
-    def __init__(self, auth_provider):
-        super(BaseSnapshotsClientJSON, self).__init__(auth_provider)
-
-        self.service = CONF.volume.catalog_type
-        self.build_interval = CONF.volume.build_interval
-        self.build_timeout = CONF.volume.build_timeout
-        self.create_resp = 200
+    create_resp = 200
 
     def list_snapshots(self, params=None):
         """List all the snapshot."""
diff --git a/tempest/services/volume/json/volumes_client.py b/tempest/services/volume/json/volumes_client.py
index 1e49e5a..f19718e 100644
--- a/tempest/services/volume/json/volumes_client.py
+++ b/tempest/services/volume/json/volumes_client.py
@@ -17,25 +17,19 @@
 import time
 import urllib
 
-from tempest.common import rest_client
 from tempest import config
 from tempest import exceptions
+from tempest.services.volume.json import base
 
 CONF = config.CONF
 
 
-class BaseVolumesClientJSON(rest_client.RestClient):
+class BaseVolumesClientJSON(base.VolumeClient):
     """
     Base client class to send CRUD Volume API requests to a Cinder endpoint
     """
 
-    def __init__(self, auth_provider):
-        super(BaseVolumesClientJSON, self).__init__(auth_provider)
-
-        self.service = CONF.volume.catalog_type
-        self.build_interval = CONF.volume.build_interval
-        self.build_timeout = CONF.volume.build_timeout
-        self.create_resp = 200
+    create_resp = 200
 
     def get_attachment_from_volume(self, volume):
         """Return the element 'attachment' from input volumes."""
diff --git a/tempest/test.py b/tempest/test.py
index d614127..cc8370c 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -273,8 +273,8 @@
             cls.resource_setup()
         except Exception:
             etype, value, trace = sys.exc_info()
-            LOG.info("%s in %s.setUpClass. Invoking tearDownClass." % (
-                cls.__name__, etype))
+            LOG.info("%s raised in %s.setUpClass. Invoking tearDownClass." % (
+                     etype, cls.__name__))
             cls.tearDownClass()
             try:
                 raise etype, value, trace
@@ -320,20 +320,6 @@
                 del trace  # to avoid circular refs
 
     @classmethod
-    def resource_setup(cls):
-        """Class level resource setup for test cases.
-        """
-        pass
-
-    @classmethod
-    def resource_cleanup(cls):
-        """Class level resource cleanup for test cases.
-        Resource cleanup must be able to handle the case of partially setup
-        resources, in case a failure during `resource_setup` should happen.
-        """
-        pass
-
-    @classmethod
     def skip_checks(cls):
         """Class level skip checks. Subclasses verify in here all
         conditions that might prevent the execution of the entire test class.
@@ -361,6 +347,20 @@
         # specify which client is `client` and nothing else.
         pass
 
+    @classmethod
+    def resource_setup(cls):
+        """Class level resource setup for test cases.
+        """
+        pass
+
+    @classmethod
+    def resource_cleanup(cls):
+        """Class level resource cleanup for test cases.
+        Resource cleanup must be able to handle the case of partially setup
+        resources, in case a failure during `resource_setup` should happen.
+        """
+        pass
+
     def setUp(self):
         super(BaseTestCase, self).setUp()
         if not self.setUpClassCalled:
diff --git a/tempest/tests/cmd/test_verify_tempest_config.py b/tempest/tests/cmd/test_verify_tempest_config.py
index 9ff7481..65106cc 100644
--- a/tempest/tests/cmd/test_verify_tempest_config.py
+++ b/tempest/tests/cmd/test_verify_tempest_config.py
@@ -204,9 +204,9 @@
 
     def test_verify_extensions_neutron(self):
         def fake_list_extensions():
-            return (None, {'extensions': [{'alias': 'fake1'},
-                                          {'alias': 'fake2'},
-                                          {'alias': 'not_fake'}]})
+            return {'extensions': [{'alias': 'fake1'},
+                                   {'alias': 'fake2'},
+                                   {'alias': 'not_fake'}]}
         fake_os = mock.MagicMock()
         fake_os.network_client.list_extensions = fake_list_extensions
         self.useFixture(mockpatch.PatchObject(
@@ -226,9 +226,9 @@
 
     def test_verify_extensions_neutron_all(self):
         def fake_list_extensions():
-            return (None, {'extensions': [{'alias': 'fake1'},
-                                          {'alias': 'fake2'},
-                                          {'alias': 'not_fake'}]})
+            return {'extensions': [{'alias': 'fake1'},
+                                   {'alias': 'fake2'},
+                                   {'alias': 'not_fake'}]}
         fake_os = mock.MagicMock()
         fake_os.network_client.list_extensions = fake_list_extensions
         self.useFixture(mockpatch.PatchObject(
diff --git a/tempest/tests/test_tenant_isolation.py b/tempest/tests/test_tenant_isolation.py
index df9719b..053dae1 100644
--- a/tempest/tests/test_tenant_isolation.py
+++ b/tempest/tests/test_tenant_isolation.py
@@ -92,24 +92,21 @@
         net_fix = self.useFixture(mockpatch.PatchObject(
             iso_creds.network_admin_client,
             'create_network',
-            return_value=({'status': 200},
-                          {'network': {'id': id, 'name': name}})))
+            return_value={'network': {'id': id, 'name': name}}))
         return net_fix
 
     def _mock_subnet_create(self, iso_creds, id, name):
         subnet_fix = self.useFixture(mockpatch.PatchObject(
             iso_creds.network_admin_client,
             'create_subnet',
-            return_value=({'status': 200},
-                          {'subnet': {'id': id, 'name': name}})))
+            return_value={'subnet': {'id': id, 'name': name}}))
         return subnet_fix
 
     def _mock_router_create(self, id, name):
         router_fix = self.useFixture(mockpatch.PatchObject(
             json_network_client.NetworkClientJSON,
             'create_router',
-            return_value=({'status': 200},
-                          {'router': {'id': id, 'name': name}})))
+            return_value={'router': {'id': id, 'name': name}}))
         return router_fix
 
     @mock.patch('tempest.common.rest_client.RestClient')
@@ -242,12 +239,11 @@
     @mock.patch('tempest.common.rest_client.RestClient')
     def test_network_cleanup(self, MockRestClient):
         def side_effect(**args):
-            return ({'status': 200},
-                    {"security_groups": [{"tenant_id": args['tenant_id'],
-                                          "name": args['name'],
-                                          "description": args['name'],
-                                          "security_group_rules": [],
-                                          "id": "sg-%s" % args['tenant_id']}]})
+            return {"security_groups": [{"tenant_id": args['tenant_id'],
+                                         "name": args['name'],
+                                         "description": args['name'],
+                                         "security_group_rules": [],
+                                         "id": "sg-%s" % args['tenant_id']}]}
         iso_creds = isolated_creds.IsolatedCreds('test class',
                                                  password='fake_password')
         # Create primary tenant and network
@@ -324,8 +320,8 @@
 
         return_values = (fake_http.fake_httplib({}, status=204), {})
         remove_secgroup_mock = self.patch(
-            'tempest.services.network.network_client_base.'
-            'NetworkClientBase.delete', return_value=return_values)
+            'tempest.services.network.json.network_client.'
+            'NetworkClientJSON.delete', return_value=return_values)
         iso_creds.clear_isolated_creds()
         # Verify default security group delete
         calls = remove_secgroup_mock.mock_calls
diff --git a/tempest/thirdparty/boto/test_ec2_instance_run.py b/tempest/thirdparty/boto/test_ec2_instance_run.py
index 00b17d9..707590e 100644
--- a/tempest/thirdparty/boto/test_ec2_instance_run.py
+++ b/tempest/thirdparty/boto/test_ec2_instance_run.py
@@ -157,19 +157,24 @@
             instance.add_tag('key1', value='value1')
 
         tags = self.ec2_client.get_all_tags()
-        self.assertEqual(tags[0].name, 'key1')
-        self.assertEqual(tags[0].value, 'value1')
+        td = {item.name: item.value for item in tags}
+
+        self.assertIn('key1', td)
+        self.assertEqual('value1', td['key1'])
 
         tags = self.ec2_client.get_all_tags(filters={'key': 'key1'})
-        self.assertEqual(tags[0].name, 'key1')
-        self.assertEqual(tags[0].value, 'value1')
+        td = {item.name: item.value for item in tags}
+        self.assertIn('key1', td)
+        self.assertEqual('value1', td['key1'])
 
         tags = self.ec2_client.get_all_tags(filters={'value': 'value1'})
-        self.assertEqual(tags[0].name, 'key1')
-        self.assertEqual(tags[0].value, 'value1')
+        td = {item.name: item.value for item in tags}
+        self.assertIn('key1', td)
+        self.assertEqual('value1', td['key1'])
 
         tags = self.ec2_client.get_all_tags(filters={'key': 'value2'})
-        self.assertEqual(len(tags), 0, str(tags))
+        td = {item.name: item.value for item in tags}
+        self.assertNotIn('key1', td)
 
         for instance in reservation.instances:
             instance.remove_tag('key1', value='value1')
diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh
index ff554c5..fb4e6d5 100755
--- a/tools/pretty_tox.sh
+++ b/tools/pretty_tox.sh
@@ -3,4 +3,10 @@
 set -o pipefail
 
 TESTRARGS=$1
-python setup.py testr --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace --no-failure-debug -f
+python setup.py testr --testr-args="--subunit $TESTRARGS" | subunit-trace --no-failure-debug -f
+retval=$?
+# NOTE(mtreinish) The pipe above would eat the slowest display from pbr's testr
+# wrapper so just manually print the slowest tests.
+echo -e "\nSlowest Tests:\n"
+testr slowest
+exit $retval
diff --git a/tox.ini b/tox.ini
index edfee15..fe2f79e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -7,7 +7,8 @@
 sitepackages = True
 setenv = VIRTUAL_ENV={envdir}
          OS_TEST_PATH=./tempest/test_discover
-deps = -r{toxinidir}/requirements.txt
+deps = setuptools
+       -r{toxinidir}/requirements.txt
 
 [testenv]
 setenv = VIRTUAL_ENV={envdir}
