diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index 4feba59..4f2715f 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -271,7 +271,7 @@
     def _delete_volume(volumes_client, volume_id):
         """Deletes the given volume and waits for it to be gone."""
         try:
-            resp, _ = volumes_client.delete_volume(volume_id)
+            volumes_client.delete_volume(volume_id)
             # TODO(mriedem): We should move the wait_for_resource_deletion
             # into the delete_volume method as a convenience to the caller.
             volumes_client.wait_for_resource_deletion(volume_id)
diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
index 1d22fbd..7fef52f 100644
--- a/tempest/api/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -61,7 +61,7 @@
             self.servers_client.list_addresses(self.server['id']))
 
         # Create a volume and wait for it to become ready
-        _, self.volume = self.volumes_client.create_volume(
+        self.volume = self.volumes_client.create_volume(
             1, display_name='test')
         self.addCleanup(self._delete_volume)
         self.volumes_client.wait_for_volume_status(self.volume['id'],
diff --git a/tempest/api/orchestration/stacks/test_volumes.py b/tempest/api/orchestration/stacks/test_volumes.py
index f47078c..6fddb21 100644
--- a/tempest/api/orchestration/stacks/test_volumes.py
+++ b/tempest/api/orchestration/stacks/test_volumes.py
@@ -33,7 +33,7 @@
 
     def _cinder_verify(self, volume_id, template):
         self.assertIsNotNone(volume_id)
-        _, volume = self.volumes_client.get_volume(volume_id)
+        volume = self.volumes_client.get_volume(volume_id)
         self.assertEqual('available', volume.get('status'))
         self.assertEqual(template['resources']['volume']['properties'][
             'size'], volume.get('size'))
diff --git a/tempest/api/volume/admin/test_multi_backend.py b/tempest/api/volume/admin/test_multi_backend.py
index 9e24993..65c4bd3 100644
--- a/tempest/api/volume/admin/test_multi_backend.py
+++ b/tempest/api/volume/admin/test_multi_backend.py
@@ -60,14 +60,14 @@
             extra_specs = {spec_key_with_prefix: backend_name_key}
         else:
             extra_specs = {spec_key_without_prefix: backend_name_key}
-        _, self.type = self.volume_types_client.create_volume_type(
+        self.type = self.volume_types_client.create_volume_type(
             type_name, extra_specs=extra_specs)
         self.volume_type_id_list.append(self.type['id'])
 
         params = {self.name_field: vol_name, 'volume_type': type_name}
 
-        _, self.volume = self.admin_volume_client.create_volume(size=1,
-                                                                **params)
+        self.volume = self.admin_volume_client.create_volume(size=1,
+                                                             **params)
         if with_prefix:
             self.volume_id_list_with_prefix.append(self.volume['id'])
         else:
@@ -131,7 +131,7 @@
         # the multi backend feature has been enabled
         # if multi-backend is enabled: os-vol-attr:host should be like:
         # host@backend_name
-        _, volume = self.admin_volume_client.get_volume(volume_id)
+        volume = self.admin_volume_client.get_volume(volume_id)
 
         volume1_host = volume['os-vol-host-attr:host']
         msg = ("multi-backend reporting incorrect values for volume %s" %
@@ -142,10 +142,10 @@
         # this test checks that the two volumes created at setUp don't
         # belong to the same backend (if they are, than the
         # volume backend distinction is not working properly)
-        _, volume = self.admin_volume_client.get_volume(volume1_id)
+        volume = self.admin_volume_client.get_volume(volume1_id)
         volume1_host = volume['os-vol-host-attr:host']
 
-        _, volume = self.admin_volume_client.get_volume(volume2_id)
+        volume = self.admin_volume_client.get_volume(volume2_id)
         volume2_host = volume['os-vol-host-attr:host']
 
         msg = ("volumes %s and %s were created in the same backend" %
diff --git a/tempest/api/volume/admin/test_snapshots_actions.py b/tempest/api/volume/admin/test_snapshots_actions.py
index 31dc09f..6c64298 100644
--- a/tempest/api/volume/admin/test_snapshots_actions.py
+++ b/tempest/api/volume/admin/test_snapshots_actions.py
@@ -30,7 +30,7 @@
         vol_name = data_utils.rand_name(cls.__name__ + '-Volume-')
         cls.name_field = cls.special_fields['name_field']
         params = {cls.name_field: vol_name}
-        _, cls.volume = \
+        cls.volume = \
             cls.volumes_client.create_volume(size=1, **params)
         cls.volumes_client.wait_for_volume_status(cls.volume['id'],
                                                   'available')
@@ -38,7 +38,7 @@
         # Create a test shared snapshot for tests
         snap_name = data_utils.rand_name(cls.__name__ + '-Snapshot-')
         params = {cls.name_field: snap_name}
-        _, cls.snapshot = \
+        cls.snapshot = \
             cls.client.create_snapshot(cls.volume['id'], **params)
         cls.client.wait_for_snapshot_status(cls.snapshot['id'],
                                             'available')
@@ -68,9 +68,9 @@
         # and force delete temp snapshot
         temp_snapshot = self.create_snapshot(self.volume['id'])
         if status:
-            _, body = self.admin_snapshots_client.\
+            self.admin_snapshots_client.\
                 reset_snapshot_status(temp_snapshot['id'], status)
-        _, volume_delete = self.admin_snapshots_client.\
+        self.admin_snapshots_client.\
             force_delete_snapshot(temp_snapshot['id'])
         self.client.wait_for_resource_deletion(temp_snapshot['id'])
 
@@ -81,9 +81,9 @@
     def test_reset_snapshot_status(self):
         # Reset snapshot status to creating
         status = 'creating'
-        _, body = self.admin_snapshots_client.\
+        self.admin_snapshots_client.\
             reset_snapshot_status(self.snapshot['id'], status)
-        _, snapshot_get \
+        snapshot_get \
             = self.admin_snapshots_client.get_snapshot(self.snapshot['id'])
         self.assertEqual(status, snapshot_get['status'])
 
@@ -98,9 +98,9 @@
         progress = '80%'
         status = 'error'
         progress_alias = self._get_progress_alias()
-        _, body = self.client.update_snapshot_status(self.snapshot['id'],
-                                                     status, progress)
-        _, snapshot_get \
+        self.client.update_snapshot_status(self.snapshot['id'],
+                                           status, progress)
+        snapshot_get \
             = self.admin_snapshots_client.get_snapshot(self.snapshot['id'])
         self.assertEqual(status, snapshot_get['status'])
         self.assertEqual(progress, snapshot_get[progress_alias])
diff --git a/tempest/api/volume/admin/test_volume_hosts.py b/tempest/api/volume/admin/test_volume_hosts.py
index e966613..a214edf 100644
--- a/tempest/api/volume/admin/test_volume_hosts.py
+++ b/tempest/api/volume/admin/test_volume_hosts.py
@@ -22,7 +22,7 @@
 
     @test.attr(type='gate')
     def test_list_hosts(self):
-        _, hosts = self.hosts_client.list_hosts()
+        hosts = self.hosts_client.list_hosts()
         self.assertTrue(len(hosts) >= 2, "No. of hosts are < 2,"
                         "response of list hosts is: % s" % hosts)
 
diff --git a/tempest/api/volume/admin/test_volume_quotas.py b/tempest/api/volume/admin/test_volume_quotas.py
index 80ef914..52f2d90 100644
--- a/tempest/api/volume/admin/test_volume_quotas.py
+++ b/tempest/api/volume/admin/test_volume_quotas.py
@@ -33,13 +33,13 @@
 
     @test.attr(type='gate')
     def test_list_quotas(self):
-        _, quotas = self.quotas_client.get_quota_set(self.demo_tenant_id)
+        quotas = self.quotas_client.get_quota_set(self.demo_tenant_id)
         for key in QUOTA_KEYS:
             self.assertIn(key, quotas)
 
     @test.attr(type='gate')
     def test_list_default_quotas(self):
-        _, quotas = self.quotas_client.get_default_quota_set(
+        quotas = self.quotas_client.get_default_quota_set(
             self.demo_tenant_id)
         for key in QUOTA_KEYS:
             self.assertIn(key, quotas)
@@ -47,14 +47,14 @@
     @test.attr(type='gate')
     def test_update_all_quota_resources_for_tenant(self):
         # Admin can update all the resource quota limits for a tenant
-        _, default_quota_set = self.quotas_client.get_default_quota_set(
+        default_quota_set = self.quotas_client.get_default_quota_set(
             self.demo_tenant_id)
         new_quota_set = {'gigabytes': 1009,
                          'volumes': 11,
                          'snapshots': 11}
 
         # Update limits for all quota resources
-        _, quota_set = self.quotas_client.update_quota_set(
+        quota_set = self.quotas_client.update_quota_set(
             self.demo_tenant_id,
             **new_quota_set)
 
@@ -70,7 +70,7 @@
 
     @test.attr(type='gate')
     def test_show_quota_usage(self):
-        _, quota_usage = self.quotas_client.get_quota_usage(
+        quota_usage = self.quotas_client.get_quota_usage(
             self.os_adm.credentials.tenant_id)
         for key in QUOTA_KEYS:
             self.assertIn(key, quota_usage)
@@ -79,14 +79,14 @@
 
     @test.attr(type='gate')
     def test_quota_usage(self):
-        _, quota_usage = self.quotas_client.get_quota_usage(
+        quota_usage = self.quotas_client.get_quota_usage(
             self.demo_tenant_id)
 
         volume = self.create_volume(size=1)
         self.addCleanup(self.admin_volume_client.delete_volume,
                         volume['id'])
 
-        _, new_quota_usage = self.quotas_client.get_quota_usage(
+        new_quota_usage = self.quotas_client.get_quota_usage(
             self.demo_tenant_id)
 
         self.assertEqual(quota_usage['volumes']['in_use'] + 1,
@@ -103,7 +103,7 @@
         tenant = identity_client.create_tenant(tenant_name)
         tenant_id = tenant['id']
         self.addCleanup(identity_client.delete_tenant, tenant_id)
-        _, quota_set_default = self.quotas_client.get_default_quota_set(
+        quota_set_default = self.quotas_client.get_default_quota_set(
             tenant_id)
         volume_default = quota_set_default['volumes']
 
@@ -111,7 +111,7 @@
                                             volumes=(int(volume_default) + 5))
 
         self.quotas_client.delete_quota_set(tenant_id)
-        _, quota_set_new = self.quotas_client.get_quota_set(tenant_id)
+        quota_set_new = self.quotas_client.get_quota_set(tenant_id)
         self.assertEqual(volume_default, quota_set_new['volumes'])
 
 
diff --git a/tempest/api/volume/admin/test_volume_quotas_negative.py b/tempest/api/volume/admin/test_volume_quotas_negative.py
index c367ebb..5cf6af0 100644
--- a/tempest/api/volume/admin/test_volume_quotas_negative.py
+++ b/tempest/api/volume/admin/test_volume_quotas_negative.py
@@ -31,7 +31,7 @@
 
         # NOTE(gfidente): no need to restore original quota set
         # after the tests as they only work with tenant isolation.
-        _, quota_set = cls.quotas_client.update_quota_set(
+        cls.quotas_client.update_quota_set(
             cls.demo_tenant_id,
             **cls.shared_quota_set)
 
@@ -62,7 +62,7 @@
                         **self.shared_quota_set)
 
         new_quota_set = {'gigabytes': 2, 'volumes': 2, 'snapshots': 1}
-        _, quota_set = self.quotas_client.update_quota_set(
+        self.quotas_client.update_quota_set(
             self.demo_tenant_id,
             **new_quota_set)
         self.assertRaises(exceptions.OverLimit,
@@ -70,7 +70,7 @@
                           size=1)
 
         new_quota_set = {'gigabytes': 2, 'volumes': 1, 'snapshots': 2}
-        _, quota_set = self.quotas_client.update_quota_set(
+        self.quotas_client.update_quota_set(
             self.demo_tenant_id,
             **self.shared_quota_set)
         self.assertRaises(exceptions.OverLimit,
diff --git a/tempest/api/volume/admin/test_volume_services.py b/tempest/api/volume/admin/test_volume_services.py
index fffc5cb..46db70f 100644
--- a/tempest/api/volume/admin/test_volume_services.py
+++ b/tempest/api/volume/admin/test_volume_services.py
@@ -27,19 +27,19 @@
     @classmethod
     def resource_setup(cls):
         super(VolumesServicesV2TestJSON, cls).resource_setup()
-        _, cls.services = cls.admin_volume_services_client.list_services()
+        cls.services = cls.admin_volume_services_client.list_services()
         cls.host_name = cls.services[0]['host']
         cls.binary_name = cls.services[0]['binary']
 
     @test.attr(type='gate')
     def test_list_services(self):
-        _, services = self.admin_volume_services_client.list_services()
+        services = self.admin_volume_services_client.list_services()
         self.assertNotEqual(0, len(services))
 
     @test.attr(type='gate')
     def test_get_service_by_service_binary_name(self):
         params = {'binary': self.binary_name}
-        _, services = self.admin_volume_services_client.list_services(params)
+        services = self.admin_volume_services_client.list_services(params)
         self.assertNotEqual(0, len(services))
         for service in services:
             self.assertEqual(self.binary_name, service['binary'])
@@ -50,7 +50,7 @@
                             service['host'] == self.host_name]
         params = {'host': self.host_name}
 
-        _, services = self.admin_volume_services_client.list_services(params)
+        services = self.admin_volume_services_client.list_services(params)
 
         # we could have a periodic job checkin between the 2 service
         # lookups, so only compare binary lists.
@@ -64,7 +64,7 @@
     def test_get_service_by_service_and_host_name(self):
         params = {'host': self.host_name, 'binary': self.binary_name}
 
-        _, services = self.admin_volume_services_client.list_services(params)
+        services = self.admin_volume_services_client.list_services(params)
         self.assertEqual(1, len(services))
         self.assertEqual(self.host_name, services[0]['host'])
         self.assertEqual(self.binary_name, services[0]['binary'])
diff --git a/tempest/api/volume/admin/test_volume_types.py b/tempest/api/volume/admin/test_volume_types.py
index a481224..58f1551 100644
--- a/tempest/api/volume/admin/test_volume_types.py
+++ b/tempest/api/volume/admin/test_volume_types.py
@@ -34,7 +34,7 @@
     @test.attr(type='smoke')
     def test_volume_type_list(self):
         # List Volume types.
-        _, body = self.volume_types_client.list_volume_types()
+        body = self.volume_types_client.list_volume_types()
         self.assertIsInstance(body, list)
 
     @test.attr(type='smoke')
@@ -49,14 +49,14 @@
         extra_specs = {"storage_protocol": proto,
                        "vendor_name": vendor}
         body = {}
-        _, body = self.volume_types_client.create_volume_type(
+        body = self.volume_types_client.create_volume_type(
             vol_type_name,
             extra_specs=extra_specs)
         self.assertIn('id', body)
         self.addCleanup(self._delete_volume_type, body['id'])
         self.assertIn('name', body)
         params = {self.name_field: vol_name, 'volume_type': vol_type_name}
-        _, volume = self.volumes_client.create_volume(
+        volume = self.volumes_client.create_volume(
             size=1, **params)
         self.assertIn('id', volume)
         self.addCleanup(self._delete_volume, volume['id'])
@@ -67,7 +67,7 @@
         self.assertTrue(volume['id'] is not None,
                         "Field volume id is empty or not found.")
         self.volumes_client.wait_for_volume_status(volume['id'], 'available')
-        _, fetched_volume = self.volumes_client.get_volume(volume['id'])
+        fetched_volume = self.volumes_client.get_volume(volume['id'])
         self.assertEqual(vol_name, fetched_volume[self.name_field],
                          'The fetched Volume is different '
                          'from the created Volume')
@@ -87,7 +87,7 @@
         vendor = CONF.volume.vendor_name
         extra_specs = {"storage_protocol": proto,
                        "vendor_name": vendor}
-        _, body = self.volume_types_client.create_volume_type(
+        body = self.volume_types_client.create_volume_type(
             name,
             extra_specs=extra_specs)
         self.assertIn('id', body)
@@ -98,7 +98,7 @@
                          "to the requested name")
         self.assertTrue(body['id'] is not None,
                         "Field volume_type id is empty or not found.")
-        _, fetched_volume_type = self.volume_types_client.get_volume_type(
+        fetched_volume_type = self.volume_types_client.get_volume_type(
             body['id'])
         self.assertEqual(name, fetched_volume_type['name'],
                          'The fetched Volume_type is different '
@@ -116,11 +116,11 @@
         provider = "LuksEncryptor"
         control_location = "front-end"
         name = data_utils.rand_name("volume-type-")
-        _, body = self.volume_types_client.create_volume_type(name)
+        body = self.volume_types_client.create_volume_type(name)
         self.addCleanup(self._delete_volume_type, body['id'])
 
         # Create encryption type
-        _, encryption_type = self.volume_types_client.create_encryption_type(
+        encryption_type = self.volume_types_client.create_encryption_type(
             body['id'], provider=provider,
             control_location=control_location)
         self.assertIn('volume_type_id', encryption_type)
@@ -132,7 +132,7 @@
                          "equal to the requested control_location")
 
         # Get encryption type
-        _, fetched_encryption_type = (
+        fetched_encryption_type = (
             self.volume_types_client.get_encryption_type(
                 encryption_type['volume_type_id']))
         self.assertEqual(provider,
@@ -150,7 +150,7 @@
         resource = {"id": encryption_type['volume_type_id'],
                     "type": "encryption-type"}
         self.volume_types_client.wait_for_resource_deletion(resource)
-        _, deleted_encryption_type = (
+        deleted_encryption_type = (
             self.volume_types_client.get_encryption_type(
                 encryption_type['volume_type_id']))
         self.assertEmpty(deleted_encryption_type)
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs.py b/tempest/api/volume/admin/test_volume_types_extra_specs.py
index 3b9f6bb..460a6c3 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs.py
@@ -25,7 +25,7 @@
     def resource_setup(cls):
         super(VolumeTypesExtraSpecsV2Test, cls).resource_setup()
         vol_type_name = data_utils.rand_name('Volume-type-')
-        _, cls.volume_type = cls.volume_types_client.create_volume_type(
+        cls.volume_type = cls.volume_types_client.create_volume_type(
             vol_type_name)
 
     @classmethod
@@ -37,11 +37,11 @@
     def test_volume_type_extra_specs_list(self):
         # List Volume types extra specs.
         extra_specs = {"spec1": "val1"}
-        _, body = self.volume_types_client.create_volume_type_extra_specs(
+        body = self.volume_types_client.create_volume_type_extra_specs(
             self.volume_type['id'], extra_specs)
         self.assertEqual(extra_specs, body,
                          "Volume type extra spec incorrectly created")
-        _, body = self.volume_types_client.list_volume_types_extra_specs(
+        body = self.volume_types_client.list_volume_types_extra_specs(
             self.volume_type['id'])
         self.assertIsInstance(body, dict)
         self.assertIn('spec1', body)
@@ -50,13 +50,13 @@
     def test_volume_type_extra_specs_update(self):
         # Update volume type extra specs
         extra_specs = {"spec2": "val1"}
-        _, body = self.volume_types_client.create_volume_type_extra_specs(
+        body = self.volume_types_client.create_volume_type_extra_specs(
             self.volume_type['id'], extra_specs)
         self.assertEqual(extra_specs, body,
                          "Volume type extra spec incorrectly created")
 
         extra_spec = {"spec2": "val2"}
-        _, body = self.volume_types_client.update_volume_type_extra_specs(
+        body = self.volume_types_client.update_volume_type_extra_specs(
             self.volume_type['id'],
             extra_spec.keys()[0],
             extra_spec)
@@ -68,7 +68,7 @@
     def test_volume_type_extra_spec_create_get_delete(self):
         # Create/Get/Delete volume type extra spec.
         extra_specs = {"spec3": "val1"}
-        _, body = self.volume_types_client.create_volume_type_extra_specs(
+        body = self.volume_types_client.create_volume_type_extra_specs(
             self.volume_type['id'],
             extra_specs)
         self.assertEqual(extra_specs, body,
diff --git a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
index 40af37e..fff0199 100644
--- a/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
+++ b/tempest/api/volume/admin/test_volume_types_extra_specs_negative.py
@@ -29,7 +29,7 @@
         super(ExtraSpecsNegativeV2Test, cls).resource_setup()
         vol_type_name = data_utils.rand_name('Volume-type-')
         cls.extra_specs = {"spec1": "val1"}
-        _, cls.volume_type = cls.volume_types_client.create_volume_type(
+        cls.volume_type = cls.volume_types_client.create_volume_type(
             vol_type_name,
             extra_specs=cls.extra_specs)
 
diff --git a/tempest/api/volume/admin/test_volumes_actions.py b/tempest/api/volume/admin/test_volumes_actions.py
index 8db6106..4feba73 100644
--- a/tempest/api/volume/admin/test_volumes_actions.py
+++ b/tempest/api/volume/admin/test_volumes_actions.py
@@ -31,8 +31,8 @@
         cls.name_field = cls.special_fields['name_field']
         params = {cls.name_field: vol_name}
 
-        _, cls.volume = cls.client.create_volume(size=1,
-                                                 **params)
+        cls.volume = cls.client.create_volume(size=1,
+                                              **params)
         cls.client.wait_for_volume_status(cls.volume['id'], 'available')
 
     @classmethod
@@ -45,9 +45,9 @@
 
     def _reset_volume_status(self, volume_id, status):
         # Reset the volume status
-        _, body = self.admin_volume_client.reset_volume_status(volume_id,
-                                                               status)
-        return _, body
+        body = self.admin_volume_client.reset_volume_status(volume_id,
+                                                            status)
+        return body
 
     def tearDown(self):
         # Set volume's status to available after test
@@ -58,8 +58,8 @@
         # Create a temp volume for force delete tests
         vol_name = utils.rand_name('Volume')
         params = {self.name_field: vol_name}
-        _, temp_volume = self.client.create_volume(size=1,
-                                                   **params)
+        temp_volume = self.client.create_volume(size=1,
+                                                **params)
         self.client.wait_for_volume_status(temp_volume['id'], 'available')
 
         return temp_volume
@@ -68,16 +68,15 @@
         # Create volume, reset volume status, and force delete temp volume
         temp_volume = self._create_temp_volume()
         if status:
-            _, body = self._reset_volume_status(temp_volume['id'], status)
-        _, volume_delete = self.admin_volume_client.\
-            force_delete_volume(temp_volume['id'])
+            self._reset_volume_status(temp_volume['id'], status)
+        self.admin_volume_client.force_delete_volume(temp_volume['id'])
         self.client.wait_for_resource_deletion(temp_volume['id'])
 
     @test.attr(type='gate')
     def test_volume_reset_status(self):
         # test volume reset status : available->error->available
-        _, body = self._reset_volume_status(self.volume['id'], 'error')
-        _, volume_get = self.admin_volume_client.get_volume(
+        self._reset_volume_status(self.volume['id'], 'error')
+        volume_get = self.admin_volume_client.get_volume(
             self.volume['id'])
         self.assertEqual('error', volume_get['status'])
 
diff --git a/tempest/api/volume/admin/test_volumes_backup.py b/tempest/api/volume/admin/test_volumes_backup.py
index 1357d31..0739480 100644
--- a/tempest/api/volume/admin/test_volumes_backup.py
+++ b/tempest/api/volume/admin/test_volumes_backup.py
@@ -40,8 +40,8 @@
         # Create backup
         backup_name = data_utils.rand_name('Backup')
         create_backup = self.backups_adm_client.create_backup
-        _, backup = create_backup(self.volume['id'],
-                                  name=backup_name)
+        backup = create_backup(self.volume['id'],
+                               name=backup_name)
         self.addCleanup(self.backups_adm_client.delete_backup,
                         backup['id'])
         self.assertEqual(backup_name, backup['name'])
@@ -51,16 +51,16 @@
                                                        'available')
 
         # Get a given backup
-        _, backup = self.backups_adm_client.get_backup(backup['id'])
+        backup = self.backups_adm_client.get_backup(backup['id'])
         self.assertEqual(backup_name, backup['name'])
 
         # Get all backups with detail
-        _, backups = self.backups_adm_client.list_backups_with_detail()
+        backups = self.backups_adm_client.list_backups_with_detail()
         self.assertIn((backup['name'], backup['id']),
                       [(m['name'], m['id']) for m in backups])
 
         # Restore backup
-        _, restore = self.backups_adm_client.restore_backup(backup['id'])
+        restore = self.backups_adm_client.restore_backup(backup['id'])
 
         # Delete backup
         self.addCleanup(self.admin_volume_client.delete_volume,
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index 52e48f3..127a216 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -97,7 +97,7 @@
         name_field = cls.special_fields['name_field']
 
         kwargs[name_field] = name
-        _, volume = cls.volumes_client.create_volume(size, **kwargs)
+        volume = cls.volumes_client.create_volume(size, **kwargs)
 
         cls.volumes.append(volume)
         cls.volumes_client.wait_for_volume_status(volume['id'], 'available')
@@ -106,8 +106,8 @@
     @classmethod
     def create_snapshot(cls, volume_id=1, **kwargs):
         """Wrapper utility that returns a test snapshot."""
-        _, snapshot = cls.snapshots_client.create_snapshot(volume_id,
-                                                           **kwargs)
+        snapshot = cls.snapshots_client.create_snapshot(volume_id,
+                                                        **kwargs)
         cls.snapshots.append(snapshot)
         cls.snapshots_client.wait_for_snapshot_status(snapshot['id'],
                                                       'available')
@@ -198,8 +198,8 @@
         """create a test Qos-Specs."""
         name = name or data_utils.rand_name(cls.__name__ + '-QoS')
         consumer = consumer or 'front-end'
-        _, qos_specs = cls.volume_qos_client.create_qos(name, consumer,
-                                                        **kwargs)
+        qos_specs = cls.volume_qos_client.create_qos(name, consumer,
+                                                     **kwargs)
         cls.qos_specs.append(qos_specs['id'])
         return qos_specs
 
diff --git a/tempest/api/volume/test_availability_zone.py b/tempest/api/volume/test_availability_zone.py
index c3d5d02..bd3d2a1 100644
--- a/tempest/api/volume/test_availability_zone.py
+++ b/tempest/api/volume/test_availability_zone.py
@@ -31,7 +31,7 @@
     @test.attr(type='gate')
     def test_get_availability_zone_list(self):
         # List of availability zone
-        _, availability_zone = self.client.get_availability_zone_list()
+        availability_zone = self.client.get_availability_zone_list()
         self.assertTrue(len(availability_zone) > 0)
 
 
diff --git a/tempest/api/volume/test_extensions.py b/tempest/api/volume/test_extensions.py
index 0f6c2d6..dbbdea4 100644
--- a/tempest/api/volume/test_extensions.py
+++ b/tempest/api/volume/test_extensions.py
@@ -30,7 +30,7 @@
     @test.attr(type='gate')
     def test_list_extensions(self):
         # List of all extensions
-        _, extensions = self.volumes_extension_client.list_extensions()
+        extensions = self.volumes_extension_client.list_extensions()
         if len(CONF.volume_feature_enabled.api_extensions) == 0:
             raise self.skipException('There are not any extensions configured')
         extension_list = [extension.get('alias') for extension in extensions]
diff --git a/tempest/api/volume/test_qos.py b/tempest/api/volume/test_qos.py
index a719b79..60c327b 100644
--- a/tempest/api/volume/test_qos.py
+++ b/tempest/api/volume/test_qos.py
@@ -47,12 +47,12 @@
         self.volume_qos_client.wait_for_resource_deletion(body['id'])
 
         # validate the deletion
-        _, list_qos = self.volume_qos_client.list_qos()
+        list_qos = self.volume_qos_client.list_qos()
         self.assertNotIn(body, list_qos)
 
     def _create_test_volume_type(self):
         vol_type_name = utils.rand_name("volume-type")
-        _, vol_type = self.volume_types_client.create_volume_type(
+        vol_type = self.volume_types_client.create_volume_type(
             vol_type_name)
         self.addCleanup(self.volume_types_client.delete_volume_type,
                         vol_type['id'])
@@ -63,7 +63,7 @@
             self.created_qos['id'], vol_type_id)
 
     def _test_get_association_qos(self):
-        _, body = self.volume_qos_client.get_association_qos(
+        body = self.volume_qos_client.get_association_qos(
             self.created_qos['id'])
 
         associations = []
@@ -97,24 +97,24 @@
     @test.attr(type='smoke')
     def test_get_qos(self):
         """Tests the detail of a given qos-specs"""
-        _, body = self.volume_qos_client.get_qos(self.created_qos['id'])
+        body = self.volume_qos_client.get_qos(self.created_qos['id'])
         self.assertEqual(self.qos_name, body['name'])
         self.assertEqual(self.qos_consumer, body['consumer'])
 
     @test.attr(type='smoke')
     def test_list_qos(self):
         """Tests the list of all qos-specs"""
-        _, body = self.volume_qos_client.list_qos()
+        body = self.volume_qos_client.list_qos()
         self.assertIn(self.created_qos, body)
 
     @test.attr(type='smoke')
     def test_set_unset_qos_key(self):
         """Test the addition of a specs key to qos-specs"""
         args = {'iops_bytes': '500'}
-        _, body = self.volume_qos_client.set_qos_key(self.created_qos['id'],
-                                                     iops_bytes='500')
+        body = self.volume_qos_client.set_qos_key(self.created_qos['id'],
+                                                  iops_bytes='500')
         self.assertEqual(args, body)
-        _, body = self.volume_qos_client.get_qos(self.created_qos['id'])
+        body = self.volume_qos_client.get_qos(self.created_qos['id'])
         self.assertEqual(args['iops_bytes'], body['specs']['iops_bytes'])
 
         # test the deletion of a specs key from qos-specs
@@ -123,7 +123,7 @@
         operation = 'qos-key-unset'
         self.volume_qos_client.wait_for_qos_operations(self.created_qos['id'],
                                                        operation, keys)
-        _, body = self.volume_qos_client.get_qos(self.created_qos['id'])
+        body = self.volume_qos_client.get_qos(self.created_qos['id'])
         self.assertNotIn(keys[0], body['specs'])
 
     @test.attr(type='smoke')
diff --git a/tempest/api/volume/test_snapshot_metadata.py b/tempest/api/volume/test_snapshot_metadata.py
index 0dceb3d..03474ba 100644
--- a/tempest/api/volume/test_snapshot_metadata.py
+++ b/tempest/api/volume/test_snapshot_metadata.py
@@ -42,15 +42,15 @@
                     "key3": "value3"}
         expected = {"key2": "value2",
                     "key3": "value3"}
-        _, body = self.client.create_snapshot_metadata(self.snapshot_id,
-                                                       metadata)
+        body = self.client.create_snapshot_metadata(self.snapshot_id,
+                                                    metadata)
         # Get the metadata of the snapshot
-        _, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        body = self.client.get_snapshot_metadata(self.snapshot_id)
         self.assertEqual(metadata, body)
         # Delete one item metadata of the snapshot
         self.client.delete_snapshot_metadata_item(
             self.snapshot_id, "key1")
-        _, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        body = self.client.get_snapshot_metadata(self.snapshot_id)
         self.assertEqual(expected, body)
 
     @test.attr(type='gate')
@@ -62,16 +62,16 @@
         update = {"key3": "value3_update",
                   "key4": "value4"}
         # Create metadata for the snapshot
-        _, body = self.client.create_snapshot_metadata(self.snapshot_id,
-                                                       metadata)
+        body = self.client.create_snapshot_metadata(self.snapshot_id,
+                                                    metadata)
         # Get the metadata of the snapshot
-        _, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        body = self.client.get_snapshot_metadata(self.snapshot_id)
         self.assertEqual(metadata, body)
         # Update metadata item
-        _, body = self.client.update_snapshot_metadata(
+        body = self.client.update_snapshot_metadata(
             self.snapshot_id, update)
         # Get the metadata of the snapshot
-        _, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        body = self.client.get_snapshot_metadata(self.snapshot_id)
         self.assertEqual(update, body)
 
     @test.attr(type='gate')
@@ -85,16 +85,16 @@
                   "key2": "value2",
                   "key3": "value3_update"}
         # Create metadata for the snapshot
-        _, body = self.client.create_snapshot_metadata(self.snapshot_id,
-                                                       metadata)
+        body = self.client.create_snapshot_metadata(self.snapshot_id,
+                                                    metadata)
         # Get the metadata of the snapshot
-        _, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        body = self.client.get_snapshot_metadata(self.snapshot_id)
         self.assertEqual(metadata, body)
         # Update metadata item
-        _, body = self.client.update_snapshot_metadata_item(
+        body = self.client.update_snapshot_metadata_item(
             self.snapshot_id, "key3", update_item)
         # Get the metadata of the snapshot
-        _, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        body = self.client.get_snapshot_metadata(self.snapshot_id)
         self.assertEqual(expect, body)
 
 
diff --git a/tempest/api/volume/test_volume_metadata.py b/tempest/api/volume/test_volume_metadata.py
index ac5d016..4739fd2 100644
--- a/tempest/api/volume/test_volume_metadata.py
+++ b/tempest/api/volume/test_volume_metadata.py
@@ -41,15 +41,15 @@
                     "key3": "value3",
                     "key4": "<value&special_chars>"}
 
-        _, body = self.volumes_client.create_volume_metadata(self.volume_id,
-                                                             metadata)
+        body = self.volumes_client.create_volume_metadata(self.volume_id,
+                                                          metadata)
         # Get the metadata of the volume
-        _, body = self.volumes_client.get_volume_metadata(self.volume_id)
+        body = self.volumes_client.get_volume_metadata(self.volume_id)
         self.assertThat(body.items(), matchers.ContainsAll(metadata.items()))
         # Delete one item metadata of the volume
         self.volumes_client.delete_volume_metadata_item(
             self.volume_id, "key1")
-        _, body = self.volumes_client.get_volume_metadata(self.volume_id)
+        body = self.volumes_client.get_volume_metadata(self.volume_id)
         self.assertNotIn("key1", body)
         del metadata["key1"]
         self.assertThat(body.items(), matchers.ContainsAll(metadata.items()))
@@ -65,16 +65,16 @@
                   "key1": "value1_update"}
 
         # Create metadata for the volume
-        _, body = self.volumes_client.create_volume_metadata(
+        body = self.volumes_client.create_volume_metadata(
             self.volume_id, metadata)
         # Get the metadata of the volume
-        _, body = self.volumes_client.get_volume_metadata(self.volume_id)
+        body = self.volumes_client.get_volume_metadata(self.volume_id)
         self.assertThat(body.items(), matchers.ContainsAll(metadata.items()))
         # Update metadata
-        _, body = self.volumes_client.update_volume_metadata(
+        body = self.volumes_client.update_volume_metadata(
             self.volume_id, update)
         # Get the metadata of the volume
-        _, body = self.volumes_client.get_volume_metadata(self.volume_id)
+        body = self.volumes_client.get_volume_metadata(self.volume_id)
         self.assertThat(body.items(), matchers.ContainsAll(update.items()))
 
     @test.attr(type='gate')
@@ -88,14 +88,14 @@
                   "key2": "value2",
                   "key3": "value3_update"}
         # Create metadata for the volume
-        _, body = self.volumes_client.create_volume_metadata(
+        body = self.volumes_client.create_volume_metadata(
             self.volume_id, metadata)
         self.assertThat(body.items(), matchers.ContainsAll(metadata.items()))
         # Update metadata item
-        _, body = self.volumes_client.update_volume_metadata_item(
+        body = self.volumes_client.update_volume_metadata_item(
             self.volume_id, "key3", update_item)
         # Get the metadata of the volume
-        _, body = self.volumes_client.get_volume_metadata(self.volume_id)
+        body = self.volumes_client.get_volume_metadata(self.volume_id)
         self.assertThat(body.items(), matchers.ContainsAll(expect.items()))
 
 
diff --git a/tempest/api/volume/test_volume_transfers.py b/tempest/api/volume/test_volume_transfers.py
index 2011c1b..b2961bd 100644
--- a/tempest/api/volume/test_volume_transfers.py
+++ b/tempest/api/volume/test_volume_transfers.py
@@ -58,24 +58,24 @@
         self.addCleanup(self._delete_volume, volume['id'])
 
         # Create a volume transfer
-        _, transfer = self.client.create_volume_transfer(volume['id'])
+        transfer = self.client.create_volume_transfer(volume['id'])
         transfer_id = transfer['id']
         auth_key = transfer['auth_key']
         self.client.wait_for_volume_status(volume['id'],
                                            'awaiting-transfer')
 
         # Get a volume transfer
-        _, body = self.client.get_volume_transfer(transfer_id)
+        body = self.client.get_volume_transfer(transfer_id)
         self.assertEqual(volume['id'], body['volume_id'])
 
         # List volume transfers, the result should be greater than
         # or equal to 1
-        _, body = self.client.list_volume_transfers()
+        body = self.client.list_volume_transfers()
         self.assertThat(len(body), matchers.GreaterThan(0))
 
         # Accept a volume transfer by alt_tenant
-        _, body = self.alt_client.accept_volume_transfer(transfer_id,
-                                                         auth_key)
+        body = self.alt_client.accept_volume_transfer(transfer_id,
+                                                      auth_key)
         self.alt_client.wait_for_volume_status(volume['id'], 'available')
 
     def test_create_list_delete_volume_transfer(self):
@@ -84,13 +84,13 @@
         self.addCleanup(self._delete_volume, volume['id'])
 
         # Create a volume transfer
-        _, body = self.client.create_volume_transfer(volume['id'])
+        body = self.client.create_volume_transfer(volume['id'])
         transfer_id = body['id']
         self.client.wait_for_volume_status(volume['id'],
                                            'awaiting-transfer')
 
         # List all volume transfers (looking for the one we created)
-        _, body = self.client.list_volume_transfers()
+        body = self.client.list_volume_transfers()
         for transfer in body:
             if volume['id'] == transfer['volume_id']:
                 break
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index 4fd27b1..ceabb1c 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -57,11 +57,11 @@
     def test_attach_detach_volume_to_instance(self):
         # Volume is attached and detached successfully from an instance
         mountpoint = '/dev/vdc'
-        _, body = self.client.attach_volume(self.volume['id'],
-                                            self.server['id'],
-                                            mountpoint)
+        self.client.attach_volume(self.volume['id'],
+                                  self.server['id'],
+                                  mountpoint)
         self.client.wait_for_volume_status(self.volume['id'], 'in-use')
-        _, body = self.client.detach_volume(self.volume['id'])
+        self.client.detach_volume(self.volume['id'])
         self.client.wait_for_volume_status(self.volume['id'], 'available')
 
     @test.stresstest(class_setup_per='process')
@@ -70,9 +70,9 @@
     def test_get_volume_attachment(self):
         # Verify that a volume's attachment information is retrieved
         mountpoint = '/dev/vdc'
-        _, body = self.client.attach_volume(self.volume['id'],
-                                            self.server['id'],
-                                            mountpoint)
+        self.client.attach_volume(self.volume['id'],
+                                  self.server['id'],
+                                  mountpoint)
         self.client.wait_for_volume_status(self.volume['id'], 'in-use')
         # NOTE(gfidente): added in reverse order because functions will be
         # called in reverse order to the order they are added (LIFO)
@@ -80,7 +80,7 @@
                         self.volume['id'],
                         'available')
         self.addCleanup(self.client.detach_volume, self.volume['id'])
-        _, volume = self.client.get_volume(self.volume['id'])
+        volume = self.client.get_volume(self.volume['id'])
         self.assertIn('attachments', volume)
         attachment = self.client.get_attachment_from_volume(volume)
         self.assertEqual(mountpoint, attachment['device'])
@@ -96,9 +96,9 @@
         # there is no way to delete it from Cinder, so we delete it from Glance
         # using the Glance image_client and from Cinder via tearDownClass.
         image_name = data_utils.rand_name('Image-')
-        _, body = self.client.upload_volume(self.volume['id'],
-                                            image_name,
-                                            CONF.volume.disk_format)
+        body = self.client.upload_volume(self.volume['id'],
+                                         image_name,
+                                         CONF.volume.disk_format)
         image_id = body["image_id"]
         self.addCleanup(self.image_client.delete_image, image_id)
         self.image_client.wait_for_image_status(image_id, 'active')
@@ -107,14 +107,14 @@
     @test.attr(type='gate')
     def test_reserve_unreserve_volume(self):
         # Mark volume as reserved.
-        _, body = self.client.reserve_volume(self.volume['id'])
+        body = self.client.reserve_volume(self.volume['id'])
         # To get the volume info
-        _, body = self.client.get_volume(self.volume['id'])
+        body = self.client.get_volume(self.volume['id'])
         self.assertIn('attaching', body['status'])
         # Unmark volume as reserved.
-        _, body = self.client.unreserve_volume(self.volume['id'])
+        body = self.client.unreserve_volume(self.volume['id'])
         # To get the volume info
-        _, body = self.client.get_volume(self.volume['id'])
+        body = self.client.get_volume(self.volume['id'])
         self.assertIn('available', body['status'])
 
     def _is_true(self, val):
@@ -124,20 +124,19 @@
     def test_volume_readonly_update(self):
         # Update volume readonly true
         readonly = True
-        _, body = self.client.update_volume_readonly(self.volume['id'],
-                                                     readonly)
+        self.client.update_volume_readonly(self.volume['id'],
+                                           readonly)
         # Get Volume information
-        _, fetched_volume = self.client.get_volume(self.volume['id'])
+        fetched_volume = self.client.get_volume(self.volume['id'])
         bool_flag = self._is_true(fetched_volume['metadata']['readonly'])
         self.assertEqual(True, bool_flag)
 
         # Update volume readonly false
         readonly = False
-        _, body = self.client.update_volume_readonly(self.volume['id'],
-                                                     readonly)
+        self.client.update_volume_readonly(self.volume['id'], readonly)
 
         # Get Volume information
-        _, fetched_volume = self.client.get_volume(self.volume['id'])
+        fetched_volume = self.client.get_volume(self.volume['id'])
         bool_flag = self._is_true(fetched_volume['metadata']['readonly'])
         self.assertEqual(False, bool_flag)
 
diff --git a/tempest/api/volume/test_volumes_extend.py b/tempest/api/volume/test_volumes_extend.py
index 2b816ef..ebe6084 100644
--- a/tempest/api/volume/test_volumes_extend.py
+++ b/tempest/api/volume/test_volumes_extend.py
@@ -32,9 +32,9 @@
         # Extend Volume Test.
         self.volume = self.create_volume()
         extend_size = int(self.volume['size']) + 1
-        _, body = self.client.extend_volume(self.volume['id'], extend_size)
+        self.client.extend_volume(self.volume['id'], extend_size)
         self.client.wait_for_volume_status(self.volume['id'], 'available')
-        _, volume = self.client.get_volume(self.volume['id'])
+        volume = self.client.get_volume(self.volume['id'])
         self.assertEqual(int(volume['size']), extend_size)
 
 
diff --git a/tempest/api/volume/test_volumes_get.py b/tempest/api/volume/test_volumes_get.py
index a9c10aa..6d9c438 100644
--- a/tempest/api/volume/test_volumes_get.py
+++ b/tempest/api/volume/test_volumes_get.py
@@ -54,7 +54,7 @@
         # Create a volume
         kwargs[self.name_field] = v_name
         kwargs['metadata'] = metadata
-        _, volume = self.client.create_volume(**kwargs)
+        volume = self.client.create_volume(**kwargs)
         self.assertIn('id', volume)
         self.addCleanup(self._delete_volume, volume['id'])
         self.client.wait_for_volume_status(volume['id'], 'available')
@@ -65,7 +65,7 @@
         self.assertTrue(volume['id'] is not None,
                         "Field volume id is empty or not found.")
         # Get Volume information
-        _, fetched_volume = self.client.get_volume(volume['id'])
+        fetched_volume = self.client.get_volume(volume['id'])
         self.assertEqual(v_name,
                          fetched_volume[self.name_field],
                          'The fetched Volume name is different '
@@ -90,18 +90,18 @@
         # Update Volume
         # Test volume update when display_name is same with original value
         params = {self.name_field: v_name}
-        _, update_volume = self.client.update_volume(volume['id'], **params)
+        self.client.update_volume(volume['id'], **params)
         # Test volume update when display_name is new
         new_v_name = data_utils.rand_name('new-Volume')
         new_desc = 'This is the new description of volume'
         params = {self.name_field: new_v_name,
                   self.descrip_field: new_desc}
-        _, update_volume = self.client.update_volume(volume['id'], **params)
+        update_volume = self.client.update_volume(volume['id'], **params)
         # Assert response body for update_volume method
         self.assertEqual(new_v_name, update_volume[self.name_field])
         self.assertEqual(new_desc, update_volume[self.descrip_field])
         # Assert response body for get_volume method
-        _, updated_volume = self.client.get_volume(volume['id'])
+        updated_volume = self.client.get_volume(volume['id'])
         self.assertEqual(volume['id'], updated_volume['id'])
         self.assertEqual(new_v_name, updated_volume[self.name_field])
         self.assertEqual(new_desc, updated_volume[self.descrip_field])
@@ -116,15 +116,14 @@
         new_v_desc = data_utils.rand_name('@#$%^* description')
         params = {self.descrip_field: new_v_desc,
                   'availability_zone': volume['availability_zone']}
-        _, new_volume = self.client.create_volume(size=1, **params)
+        new_volume = self.client.create_volume(size=1, **params)
         self.assertIn('id', new_volume)
         self.addCleanup(self._delete_volume, new_volume['id'])
         self.client.wait_for_volume_status(new_volume['id'], 'available')
 
         params = {self.name_field: volume[self.name_field],
                   self.descrip_field: volume[self.descrip_field]}
-        _, update_volume = self.client.update_volume(new_volume['id'],
-                                                     **params)
+        self.client.update_volume(new_volume['id'], **params)
 
         # NOTE(jdg): Revert back to strict true/false checking
         # after fix for bug #1227837 merges
diff --git a/tempest/api/volume/test_volumes_list.py b/tempest/api/volume/test_volumes_list.py
index 9c0d238..91beae9 100644
--- a/tempest/api/volume/test_volumes_list.py
+++ b/tempest/api/volume/test_volumes_list.py
@@ -66,7 +66,7 @@
         cls.metadata = {'Type': 'work'}
         for i in range(3):
             volume = cls.create_volume(metadata=cls.metadata)
-            _, volume = cls.client.get_volume(volume['id'])
+            volume = cls.client.get_volume(volume['id'])
             cls.volume_list.append(volume)
             cls.volume_id_list.append(volume['id'])
 
@@ -84,10 +84,10 @@
         and validates result.
         """
         if with_detail:
-            _, fetched_vol_list = \
+            fetched_vol_list = \
                 self.client.list_volumes_with_detail(params=params)
         else:
-            _, fetched_vol_list = self.client.list_volumes(params=params)
+            fetched_vol_list = self.client.list_volumes(params=params)
 
         # Validating params of fetched volumes
         # In v2, only list detail view includes items in params.
@@ -111,7 +111,7 @@
     def test_volume_list(self):
         # Get a list of Volumes
         # Fetch all volumes
-        _, fetched_list = self.client.list_volumes()
+        fetched_list = self.client.list_volumes()
         self.assertVolumesIn(fetched_list, self.volume_list,
                              fields=self.VOLUME_FIELDS)
 
@@ -119,14 +119,14 @@
     def test_volume_list_with_details(self):
         # Get a list of Volumes with details
         # Fetch all Volumes
-        _, fetched_list = self.client.list_volumes_with_detail()
+        fetched_list = self.client.list_volumes_with_detail()
         self.assertVolumesIn(fetched_list, self.volume_list)
 
     @test.attr(type='gate')
     def test_volume_list_by_name(self):
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         params = {self.name: volume[self.name]}
-        _, fetched_vol = self.client.list_volumes(params)
+        fetched_vol = self.client.list_volumes(params)
         self.assertEqual(1, len(fetched_vol), str(fetched_vol))
         self.assertEqual(fetched_vol[0][self.name],
                          volume[self.name])
@@ -135,7 +135,7 @@
     def test_volume_list_details_by_name(self):
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         params = {self.name: volume[self.name]}
-        _, fetched_vol = self.client.list_volumes_with_detail(params)
+        fetched_vol = self.client.list_volumes_with_detail(params)
         self.assertEqual(1, len(fetched_vol), str(fetched_vol))
         self.assertEqual(fetched_vol[0][self.name],
                          volume[self.name])
@@ -143,7 +143,7 @@
     @test.attr(type='gate')
     def test_volumes_list_by_status(self):
         params = {'status': 'available'}
-        _, fetched_list = self.client.list_volumes(params)
+        fetched_list = self.client.list_volumes(params)
         self._list_by_param_value_and_assert(params)
         self.assertVolumesIn(fetched_list, self.volume_list,
                              fields=self.VOLUME_FIELDS)
@@ -151,7 +151,7 @@
     @test.attr(type='gate')
     def test_volumes_list_details_by_status(self):
         params = {'status': 'available'}
-        _, fetched_list = self.client.list_volumes_with_detail(params)
+        fetched_list = self.client.list_volumes_with_detail(params)
         for volume in fetched_list:
             self.assertEqual('available', volume['status'])
         self.assertVolumesIn(fetched_list, self.volume_list)
@@ -161,7 +161,7 @@
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         zone = volume['availability_zone']
         params = {'availability_zone': zone}
-        _, fetched_list = self.client.list_volumes(params)
+        fetched_list = self.client.list_volumes(params)
         self._list_by_param_value_and_assert(params)
         self.assertVolumesIn(fetched_list, self.volume_list,
                              fields=self.VOLUME_FIELDS)
@@ -171,7 +171,7 @@
         volume = self.volume_list[data_utils.rand_int_id(0, 2)]
         zone = volume['availability_zone']
         params = {'availability_zone': zone}
-        _, fetched_list = self.client.list_volumes_with_detail(params)
+        fetched_list = self.client.list_volumes_with_detail(params)
         for volume in fetched_list:
             self.assertEqual(zone, volume['availability_zone'])
         self.assertVolumesIn(fetched_list, self.volume_list)
diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
index 5d3fdef..dc8d8e2 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -224,38 +224,40 @@
     @test.attr(type=['negative', 'gate'])
     def test_reserve_volume_with_negative_volume_status(self):
         # Mark volume as reserved.
-        _, body = self.client.reserve_volume(self.volume['id'])
+        self.client.reserve_volume(self.volume['id'])
         # Mark volume which is marked as reserved before
         self.assertRaises(exceptions.BadRequest,
                           self.client.reserve_volume,
                           self.volume['id'])
         # Unmark volume as reserved.
-        _, body = self.client.unreserve_volume(self.volume['id'])
+        self.client.unreserve_volume(self.volume['id'])
 
     @test.attr(type=['negative', 'gate'])
     def test_list_volumes_with_nonexistent_name(self):
         v_name = data_utils.rand_name('Volume-')
         params = {self.name_field: v_name}
-        _, fetched_volume = self.client.list_volumes(params)
+        fetched_volume = self.client.list_volumes(params)
         self.assertEqual(0, len(fetched_volume))
 
     @test.attr(type=['negative', 'gate'])
     def test_list_volumes_detail_with_nonexistent_name(self):
         v_name = data_utils.rand_name('Volume-')
         params = {self.name_field: v_name}
-        _, fetched_volume = self.client.list_volumes_with_detail(params)
+        fetched_volume = \
+            self.client.list_volumes_with_detail(params)
         self.assertEqual(0, len(fetched_volume))
 
     @test.attr(type=['negative', 'gate'])
     def test_list_volumes_with_invalid_status(self):
         params = {'status': 'null'}
-        _, fetched_volume = self.client.list_volumes(params)
+        fetched_volume = self.client.list_volumes(params)
         self.assertEqual(0, len(fetched_volume))
 
     @test.attr(type=['negative', 'gate'])
     def test_list_volumes_detail_with_invalid_status(self):
         params = {'status': 'null'}
-        _, fetched_volume = self.client.list_volumes_with_detail(params)
+        fetched_volume = \
+            self.client.list_volumes_with_detail(params)
         self.assertEqual(0, len(fetched_volume))
 
 
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
index b7e9422..179eb09 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -44,11 +44,11 @@
         and validates result.
         """
         if with_detail:
-            _, fetched_snap_list = \
+            fetched_snap_list = \
                 self.snapshots_client.\
                 list_snapshots_with_detail(params=params)
         else:
-            _, fetched_snap_list = \
+            fetched_snap_list = \
                 self.snapshots_client.list_snapshots(params=params)
 
         # Validating params of fetched snapshots
@@ -94,14 +94,14 @@
         snapshot = self.create_snapshot(self.volume_origin['id'], **params)
 
         # Get the snap and check for some of its details
-        _, snap_get = self.snapshots_client.get_snapshot(snapshot['id'])
+        snap_get = self.snapshots_client.get_snapshot(snapshot['id'])
         self.assertEqual(self.volume_origin['id'],
                          snap_get['volume_id'],
                          "Referred volume origin mismatch")
 
         # Compare also with the output from the list action
         tracking_data = (snapshot['id'], snapshot[self.name_field])
-        _, snaps_list = self.snapshots_client.list_snapshots()
+        snaps_list = self.snapshots_client.list_snapshots()
         snaps_data = [(f['id'], f[self.name_field]) for f in snaps_list]
         self.assertIn(tracking_data, snaps_data)
 
@@ -110,13 +110,13 @@
         new_desc = 'This is the new description of snapshot.'
         params = {self.name_field: new_s_name,
                   self.descrip_field: new_desc}
-        _, update_snapshot = \
+        update_snapshot = \
             self.snapshots_client.update_snapshot(snapshot['id'], **params)
         # Assert response body for update_snapshot method
         self.assertEqual(new_s_name, update_snapshot[self.name_field])
         self.assertEqual(new_desc, update_snapshot[self.descrip_field])
         # Assert response body for get_snapshot method
-        _, updated_snapshot = \
+        updated_snapshot = \
             self.snapshots_client.get_snapshot(snapshot['id'])
         self.assertEqual(new_s_name, updated_snapshot[self.name_field])
         self.assertEqual(new_desc, updated_snapshot[self.descrip_field])
@@ -172,7 +172,7 @@
         # create a snap based volume and deletes it
         snapshot = self.create_snapshot(self.volume_origin['id'])
         # NOTE(gfidente): size is required also when passing snapshot_id
-        _, volume = self.volumes_client.create_volume(
+        volume = self.volumes_client.create_volume(
             size=1,
             snapshot_id=snapshot['id'])
         self.volumes_client.wait_for_volume_status(volume['id'], 'available')
diff --git a/tempest/api/volume/v2/test_volumes_list.py b/tempest/api/volume/v2/test_volumes_list.py
index c20f3d8..bc14b2c 100644
--- a/tempest/api/volume/v2/test_volumes_list.py
+++ b/tempest/api/volume/v2/test_volumes_list.py
@@ -41,7 +41,7 @@
         cls.metadata = {'Type': 'work'}
         for i in range(3):
             volume = cls.create_volume(metadata=cls.metadata)
-            _, volume = cls.client.get_volume(volume['id'])
+            volume = cls.client.get_volume(volume['id'])
             cls.volume_list.append(volume)
             cls.volume_id_list.append(volume['id'])
 
@@ -65,7 +65,7 @@
                       'sort_dir': sort_dir,
                       'sort_key': sort_key
                       }
-            _, fetched_volume = self.client.list_volumes_with_detail(params)
+            fetched_volume = self.client.list_volumes_with_detail(params)
             self.assertEqual(limit, len(fetched_volume),
                              "The count of volumes is %s, expected:%s " %
                              (len(fetched_volume), limit))
diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py
index 227fbe6..2928777 100644
--- a/tempest/cmd/cleanup_service.py
+++ b/tempest/cmd/cleanup_service.py
@@ -142,7 +142,7 @@
 
     def list(self):
         client = self.client
-        __, snaps = client.list_snapshots()
+        snaps = client.list_snapshots()
         LOG.debug("List count, %s Snapshots" % len(snaps))
         return snaps
 
@@ -323,7 +323,7 @@
 
     def list(self):
         client = self.client
-        _, vols = client.list_volumes()
+        vols = client.list_volumes()
         LOG.debug("List count, %s Volumes" % len(vols))
         return vols
 
diff --git a/tempest/cmd/javelin.py b/tempest/cmd/javelin.py
index 001e3dc..6e1ca7a 100755
--- a/tempest/cmd/javelin.py
+++ b/tempest/cmd/javelin.py
@@ -836,7 +836,7 @@
 #######################
 
 def _get_volume_by_name(client, name):
-    r, body = client.volumes.list_volumes()
+    body = client.volumes.list_volumes()
     for volume in body:
         if name == volume['display_name']:
             return volume
@@ -857,8 +857,8 @@
 
         size = volume['gb']
         v_name = volume['name']
-        resp, body = client.volumes.create_volume(size=size,
-                                                  display_name=v_name)
+        body = client.volumes.create_volume(size=size,
+                                            display_name=v_name)
         client.volumes.wait_for_volume_status(body['id'], 'available')
 
 
diff --git a/tempest/cmd/verify_tempest_config.py b/tempest/cmd/verify_tempest_config.py
index 890c77a..a7e0ee3 100755
--- a/tempest/cmd/verify_tempest_config.py
+++ b/tempest/cmd/verify_tempest_config.py
@@ -154,7 +154,7 @@
 
 def verify_extensions(os, service, results):
     extensions_client = get_extension_client(os, service)
-    if service == 'neutron':
+    if service == 'neutron' or service == 'cinder':
         resp = extensions_client.list_extensions()
     else:
         __, resp = extensions_client.list_extensions()
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index b417472..220a7e7 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -210,7 +210,7 @@
                       imageRef=None, volume_type=None, wait_on_delete=True):
         if name is None:
             name = data_utils.rand_name(self.__class__.__name__)
-        _, volume = self.volumes_client.create_volume(
+        volume = self.volumes_client.create_volume(
             size=size, display_name=name, snapshot_id=snapshot_id,
             imageRef=imageRef, volume_type=volume_type)
 
@@ -230,7 +230,7 @@
         self.volumes_client.wait_for_volume_status(volume['id'], 'available')
         # The volume retrieved on creation has a non-up-to-date status.
         # Retrieval after it becomes active ensures correct details.
-        _, volume = self.volumes_client.get_volume(volume['id'])
+        volume = self.volumes_client.get_volume(volume['id'])
         return volume
 
     def _create_loginable_secgroup_rule(self, secgroup_id=None):
@@ -416,19 +416,19 @@
 
     def nova_volume_attach(self):
         # TODO(andreaf) Device should be here CONF.compute.volume_device_name
-        _, volume = self.servers_client.attach_volume(
-            self.server['id'], self.volume['id'], '/dev/vdb')
+        volume = self.servers_client.attach_volume(
+            self.server['id'], self.volume['id'], '/dev/vdb')[1]
         self.assertEqual(self.volume['id'], volume['id'])
         self.volumes_client.wait_for_volume_status(volume['id'], 'in-use')
         # Refresh the volume after the attachment
-        _, self.volume = self.volumes_client.get_volume(volume['id'])
+        self.volume = self.volumes_client.get_volume(volume['id'])
 
     def nova_volume_detach(self):
         self.servers_client.detach_volume(self.server['id'], self.volume['id'])
         self.volumes_client.wait_for_volume_status(self.volume['id'],
                                                    'available')
 
-        _, volume = self.volumes_client.get_volume(self.volume['id'])
+        volume = self.volumes_client.get_volume(self.volume['id'])
         self.assertEqual('available', volume['status'])
 
     def rebuild_server(self, server_id, image=None,
@@ -1216,7 +1216,7 @@
             name = 'generic'
         randomized_name = data_utils.rand_name('scenario-type-' + name + '-')
         LOG.debug("Creating a volume type: %s", randomized_name)
-        _, body = client.create_volume_type(
+        body = client.create_volume_type(
             randomized_name)
         self.assertIn('id', body)
         self.addCleanup(client.delete_volume_type, body['id'])
diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py
index 16a65c9..5ea48e0 100644
--- a/tempest/scenario/test_minimum_basic.py
+++ b/tempest/scenario/test_minimum_basic.py
@@ -68,21 +68,21 @@
         self.volume = self.create_volume()
 
     def cinder_list(self):
-        _, volumes = self.volumes_client.list_volumes()
+        volumes = self.volumes_client.list_volumes()
         self.assertIn(self.volume['id'], [x['id'] for x in volumes])
 
     def cinder_show(self):
-        _, volume = self.volumes_client.get_volume(self.volume['id'])
+        volume = self.volumes_client.get_volume(self.volume['id'])
         self.assertEqual(self.volume, volume)
 
     def nova_volume_attach(self):
         volume_device_path = '/dev/' + CONF.compute.volume_device_name
-        _, volume = self.servers_client.attach_volume(
-            self.server['id'], self.volume['id'], volume_device_path)
+        volume = self.servers_client.attach_volume(
+            self.server['id'], self.volume['id'], volume_device_path)[1]
         self.assertEqual(self.volume['id'], volume['id'])
         self.volumes_client.wait_for_volume_status(volume['id'], 'in-use')
         # Refresh the volume after the attachment
-        _, self.volume = self.volumes_client.get_volume(volume['id'])
+        self.volume = self.volumes_client.get_volume(volume['id'])
 
     def nova_reboot(self):
         self.servers_client.reboot(self.server['id'], 'SOFT')
@@ -98,7 +98,7 @@
         self.volumes_client.wait_for_volume_status(self.volume['id'],
                                                    'available')
 
-        _, volume = self.volumes_client.get_volume(self.volume['id'])
+        volume = self.volumes_client.get_volume(self.volume['id'])
         self.assertEqual('available', volume['status'])
 
     def create_and_add_security_group(self):
diff --git a/tempest/services/volume/json/admin/volume_hosts_client.py b/tempest/services/volume/json/admin/volume_hosts_client.py
index e7add30..cf566f2 100644
--- a/tempest/services/volume/json/admin/volume_hosts_client.py
+++ b/tempest/services/volume/json/admin/volume_hosts_client.py
@@ -16,6 +16,7 @@
 import json
 import urllib
 
+from tempest.common import service_client
 from tempest.services.volume.json import base
 
 
@@ -34,7 +35,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['hosts']
+        return service_client.ResponseBodyList(resp, body['hosts'])
 
 
 class VolumeHostsClientJSON(BaseVolumeHostsClientJSON):
diff --git a/tempest/services/volume/json/admin/volume_quotas_client.py b/tempest/services/volume/json/admin/volume_quotas_client.py
index f08cb64..1a21a2c 100644
--- a/tempest/services/volume/json/admin/volume_quotas_client.py
+++ b/tempest/services/volume/json/admin/volume_quotas_client.py
@@ -16,6 +16,7 @@
 
 import urllib
 
+from tempest.common import service_client
 from tempest.openstack.common import jsonutils
 from tempest.services.volume.json import base
 
@@ -33,7 +34,7 @@
         url = 'os-quota-sets/%s/defaults' % tenant_id
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return service_client.ResponseBody(resp, self._parse_resp(body))
 
     def get_quota_set(self, tenant_id, params=None):
         """List the quota set for a tenant."""
@@ -44,14 +45,13 @@
 
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return service_client.ResponseBody(resp, self._parse_resp(body))
 
     def get_quota_usage(self, tenant_id):
         """List the quota set for a tenant."""
 
-        resp, body = self.get_quota_set(tenant_id, params={'usage': True})
-        self.expected_success(200, resp.status)
-        return resp, body
+        body = self.get_quota_set(tenant_id, params={'usage': True})
+        return body
 
     def update_quota_set(self, tenant_id, gigabytes=None, volumes=None,
                          snapshots=None):
@@ -69,7 +69,7 @@
         post_body = jsonutils.dumps({'quota_set': post_body})
         resp, body = self.put('os-quota-sets/%s' % tenant_id, post_body)
         self.expected_success(200, resp.status)
-        return resp, self._parse_resp(body)
+        return service_client.ResponseBody(resp, self._parse_resp(body))
 
     def delete_quota_set(self, tenant_id):
         """Delete the tenant's quota set."""
diff --git a/tempest/services/volume/json/admin/volume_services_client.py b/tempest/services/volume/json/admin/volume_services_client.py
index 5d4f9db..d258f3d 100644
--- a/tempest/services/volume/json/admin/volume_services_client.py
+++ b/tempest/services/volume/json/admin/volume_services_client.py
@@ -16,6 +16,7 @@
 import json
 import urllib
 
+from tempest.common import service_client
 from tempest.services.volume.json import base
 
 
@@ -29,7 +30,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['services']
+        return service_client.ResponseBodyList(resp, body['services'])
 
 
 class VolumesServicesClientJSON(BaseVolumesServicesClientJSON):
diff --git a/tempest/services/volume/json/admin/volume_types_client.py b/tempest/services/volume/json/admin/volume_types_client.py
index 171ad35..67f12d6 100644
--- a/tempest/services/volume/json/admin/volume_types_client.py
+++ b/tempest/services/volume/json/admin/volume_types_client.py
@@ -16,6 +16,7 @@
 import json
 import urllib
 
+from tempest.common import service_client
 from tempest import exceptions
 from tempest.services.volume.json import base
 
@@ -34,8 +35,7 @@
             if resource['type'] == "volume-type":
                 self.get_volume_type(resource['id'])
             elif resource['type'] == "encryption-type":
-                resp, body = self.get_encryption_type(resource['id'])
-                assert 200 == resp.status
+                body = self.get_encryption_type(resource['id'])
                 if not body:
                     return True
             else:
@@ -59,7 +59,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['volume_types']
+        return service_client.ResponseBodyList(resp, body['volume_types'])
 
     def get_volume_type(self, volume_id):
         """Returns the details of a single volume_type."""
@@ -67,7 +67,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['volume_type']
+        return service_client.ResponseBody(resp, body['volume_type'])
 
     def create_volume_type(self, name, **kwargs):
         """
@@ -85,7 +85,7 @@
         resp, body = self.post('types', post_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['volume_type']
+        return service_client.ResponseBody(resp, body['volume_type'])
 
     def delete_volume_type(self, volume_id):
         """Deletes the Specified Volume_type."""
@@ -101,7 +101,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['extra_specs']
+        return service_client.ResponseBody(resp, body['extra_specs'])
 
     def get_volume_type_extra_specs(self, vol_type_id, extra_spec_name):
         """Returns the details of a single volume_type extra spec."""
@@ -110,7 +110,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def create_volume_type_extra_specs(self, vol_type_id, extra_spec):
         """
@@ -123,7 +123,7 @@
         resp, body = self.post(url, post_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['extra_specs']
+        return service_client.ResponseBody(resp, body['extra_specs'])
 
     def delete_volume_type_extra_specs(self, vol_id, extra_spec_name):
         """Deletes the Specified Volume_type extra spec."""
@@ -146,7 +146,7 @@
         resp, body = self.put(url, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def get_encryption_type(self, vol_type_id):
         """
@@ -157,7 +157,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def create_encryption_type(self, vol_type_id, **kwargs):
         """
@@ -176,7 +176,7 @@
         resp, body = self.post(url, post_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['encryption']
+        return service_client.ResponseBody(resp, body['encryption'])
 
     def delete_encryption_type(self, vol_type_id):
         """Delete the encryption type for the specified volume-type."""
diff --git a/tempest/services/volume/json/availability_zone_client.py b/tempest/services/volume/json/availability_zone_client.py
index 9f2c570..8a0257e 100644
--- a/tempest/services/volume/json/availability_zone_client.py
+++ b/tempest/services/volume/json/availability_zone_client.py
@@ -15,6 +15,7 @@
 
 import json
 
+from tempest.common import service_client
 from tempest.services.volume.json import base
 
 
@@ -24,7 +25,7 @@
         resp, body = self.get('os-availability-zone')
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['availabilityZoneInfo']
+        return service_client.ResponseBody(resp, body['availabilityZoneInfo'])
 
 
 class VolumeAvailabilityZoneClientJSON(BaseVolumeAvailabilityZoneClientJSON):
diff --git a/tempest/services/volume/json/backups_client.py b/tempest/services/volume/json/backups_client.py
index e2ba822..102e823 100644
--- a/tempest/services/volume/json/backups_client.py
+++ b/tempest/services/volume/json/backups_client.py
@@ -16,6 +16,7 @@
 import json
 import time
 
+from tempest.common import service_client
 from tempest import exceptions
 from tempest.services.volume.json import base
 
@@ -39,7 +40,7 @@
         resp, body = self.post('backups', post_body)
         body = json.loads(body)
         self.expected_success(202, resp.status)
-        return resp, body['backup']
+        return service_client.ResponseBody(resp, body['backup'])
 
     def restore_backup(self, backup_id, volume_id=None):
         """Restore volume from backup."""
@@ -48,13 +49,13 @@
         resp, body = self.post('backups/%s/restore' % (backup_id), post_body)
         body = json.loads(body)
         self.expected_success(202, resp.status)
-        return resp, body['restore']
+        return service_client.ResponseBody(resp, body['restore'])
 
     def delete_backup(self, backup_id):
         """Delete a backup of volume."""
         resp, body = self.delete('backups/%s' % (str(backup_id)))
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def get_backup(self, backup_id):
         """Returns the details of a single backup."""
@@ -62,7 +63,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['backup']
+        return service_client.ResponseBody(resp, body['backup'])
 
     def list_backups_with_detail(self):
         """Information for all the tenant's backups."""
@@ -70,17 +71,17 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['backups']
+        return service_client.ResponseBodyList(resp, body['backups'])
 
     def wait_for_backup_status(self, backup_id, status):
         """Waits for a Backup to reach a given status."""
-        resp, body = self.get_backup(backup_id)
+        body = self.get_backup(backup_id)
         backup_status = body['status']
         start = int(time.time())
 
         while backup_status != status:
             time.sleep(self.build_interval)
-            resp, body = self.get_backup(backup_id)
+            body = self.get_backup(backup_id)
             backup_status = body['status']
             if backup_status == 'error':
                 raise exceptions.VolumeBackupException(backup_id=backup_id)
diff --git a/tempest/services/volume/json/extensions_client.py b/tempest/services/volume/json/extensions_client.py
index 13b91c3..ae79dad 100644
--- a/tempest/services/volume/json/extensions_client.py
+++ b/tempest/services/volume/json/extensions_client.py
@@ -15,6 +15,7 @@
 
 import json
 
+from tempest.common import service_client
 from tempest.services.volume.json import base
 
 
@@ -25,7 +26,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['extensions']
+        return service_client.ResponseBodyList(resp, body['extensions'])
 
 
 class ExtensionsClientJSON(BaseExtensionsClientJSON):
diff --git a/tempest/services/volume/json/qos_client.py b/tempest/services/volume/json/qos_client.py
index 9c13cac..f14c8b4 100644
--- a/tempest/services/volume/json/qos_client.py
+++ b/tempest/services/volume/json/qos_client.py
@@ -15,6 +15,7 @@
 import json
 import time
 
+from tempest.common import service_client
 from tempest import exceptions
 from tempest.services.volume.json import base
 
@@ -46,18 +47,15 @@
         start_time = int(time.time())
         while True:
             if operation == 'qos-key-unset':
-                resp, body = self.get_qos(qos_id)
-                self.expected_success(200, resp.status)
+                body = self.get_qos(qos_id)
                 if not any(key in body['specs'] for key in args):
                     return
             elif operation == 'disassociate':
-                resp, body = self.get_association_qos(qos_id)
-                self.expected_success(200, resp.status)
+                body = self.get_association_qos(qos_id)
                 if not any(args in body[i]['id'] for i in range(0, len(body))):
                     return
             elif operation == 'disassociate-all':
-                resp, body = self.get_association_qos(qos_id)
-                self.expected_success(200, resp.status)
+                body = self.get_association_qos(qos_id)
                 if not body:
                     return
             else:
@@ -80,7 +78,7 @@
         resp, body = self.post('qos-specs', post_body)
         self.expected_success(200, resp.status)
         body = json.loads(body)
-        return resp, body['qos_specs']
+        return service_client.ResponseBody(resp, body['qos_specs'])
 
     def delete_qos(self, qos_id, force=False):
         """Delete the specified QoS specification."""
@@ -94,7 +92,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['qos_specs']
+        return service_client.ResponseBodyList(resp, body['qos_specs'])
 
     def get_qos(self, qos_id):
         """Get the specified QoS specification."""
@@ -102,7 +100,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['qos_specs']
+        return service_client.ResponseBody(resp, body['qos_specs'])
 
     def set_qos_key(self, qos_id, **kwargs):
         """Set the specified keys/values of QoS specification.
@@ -113,7 +111,7 @@
         resp, body = self.put('qos-specs/%s' % qos_id, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['qos_specs']
+        return service_client.ResponseBody(resp, body['qos_specs'])
 
     def unset_qos_key(self, qos_id, keys):
         """Unset the specified keys of QoS specification.
@@ -137,7 +135,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['qos_associations']
+        return service_client.ResponseBodyList(resp, body['qos_associations'])
 
     def disassociate_qos(self, qos_id, vol_type_id):
         """Disassociate the specified QoS with specified volume-type."""
diff --git a/tempest/services/volume/json/snapshots_client.py b/tempest/services/volume/json/snapshots_client.py
index 349d1b0..a27370d 100644
--- a/tempest/services/volume/json/snapshots_client.py
+++ b/tempest/services/volume/json/snapshots_client.py
@@ -14,6 +14,7 @@
 import time
 import urllib
 
+from tempest.common import service_client
 from tempest import exceptions
 from tempest.openstack.common import log as logging
 from tempest.services.volume.json import base
@@ -36,7 +37,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['snapshots']
+        return service_client.ResponseBodyList(resp, body['snapshots'])
 
     def list_snapshots_with_detail(self, params=None):
         """List the details of all snapshots."""
@@ -47,7 +48,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['snapshots']
+        return service_client.ResponseBodyList(resp, body['snapshots'])
 
     def get_snapshot(self, snapshot_id):
         """Returns the details of a single snapshot."""
@@ -55,7 +56,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['snapshot']
+        return service_client.ResponseBody(resp, body['snapshot'])
 
     def create_snapshot(self, volume_id, **kwargs):
         """
@@ -71,7 +72,7 @@
         resp, body = self.post('snapshots', post_body)
         body = json.loads(body)
         self.expected_success(self.create_resp, resp.status)
-        return resp, body['snapshot']
+        return service_client.ResponseBody(resp, body['snapshot'])
 
     def update_snapshot(self, snapshot_id, **kwargs):
         """Updates a snapshot."""
@@ -79,11 +80,11 @@
         resp, body = self.put('snapshots/%s' % snapshot_id, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['snapshot']
+        return service_client.ResponseBody(resp, body['snapshot'])
 
     # NOTE(afazekas): just for the wait function
     def _get_snapshot_status(self, snapshot_id):
-        resp, body = self.get_snapshot(snapshot_id)
+        body = self.get_snapshot(snapshot_id)
         status = body['status']
         # NOTE(afazekas): snapshot can reach an "error"
         # state in a "normal" lifecycle
@@ -140,7 +141,7 @@
         post_body = json.dumps({'os-reset_status': {"status": status}})
         resp, body = self.post('snapshots/%s/action' % snapshot_id, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def update_snapshot_status(self, snapshot_id, status, progress):
         """Update the specified snapshot's status."""
@@ -152,7 +153,7 @@
         url = 'snapshots/%s/action' % str(snapshot_id)
         resp, body = self.post(url, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def create_snapshot_metadata(self, snapshot_id, metadata):
         """Create metadata for the snapshot."""
@@ -161,7 +162,7 @@
         resp, body = self.post(url, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['metadata']
+        return service_client.ResponseBody(resp, body['metadata'])
 
     def get_snapshot_metadata(self, snapshot_id):
         """Get metadata of the snapshot."""
@@ -169,7 +170,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['metadata']
+        return service_client.ResponseBody(resp, body['metadata'])
 
     def update_snapshot_metadata(self, snapshot_id, metadata):
         """Update metadata for the snapshot."""
@@ -178,7 +179,7 @@
         resp, body = self.put(url, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['metadata']
+        return service_client.ResponseBody(resp, body['metadata'])
 
     def update_snapshot_metadata_item(self, snapshot_id, id, meta_item):
         """Update metadata item for the snapshot."""
@@ -187,7 +188,7 @@
         resp, body = self.put(url, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['meta']
+        return service_client.ResponseBody(resp, body['meta'])
 
     def delete_snapshot_metadata_item(self, snapshot_id, id):
         """Delete metadata item for the snapshot."""
@@ -200,7 +201,7 @@
         post_body = json.dumps({'os-force_delete': {}})
         resp, body = self.post('snapshots/%s/action' % snapshot_id, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
 
 class SnapshotsClientJSON(BaseSnapshotsClientJSON):
diff --git a/tempest/services/volume/json/volumes_client.py b/tempest/services/volume/json/volumes_client.py
index f19718e..b12852f 100644
--- a/tempest/services/volume/json/volumes_client.py
+++ b/tempest/services/volume/json/volumes_client.py
@@ -17,6 +17,7 @@
 import time
 import urllib
 
+from tempest.common import service_client
 from tempest import config
 from tempest import exceptions
 from tempest.services.volume.json import base
@@ -44,7 +45,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['volumes']
+        return service_client.ResponseBodyList(resp, body['volumes'])
 
     def list_volumes_with_detail(self, params=None):
         """List the details of all volumes."""
@@ -55,7 +56,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['volumes']
+        return service_client.ResponseBodyList(resp, body['volumes'])
 
     def get_volume(self, volume_id):
         """Returns the details of a single volume."""
@@ -63,7 +64,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['volume']
+        return service_client.ResponseBody(resp, body['volume'])
 
     def create_volume(self, size=None, **kwargs):
         """
@@ -87,7 +88,7 @@
         resp, body = self.post('volumes', post_body)
         body = json.loads(body)
         self.expected_success(self.create_resp, resp.status)
-        return resp, body['volume']
+        return service_client.ResponseBody(resp, body['volume'])
 
     def update_volume(self, volume_id, **kwargs):
         """Updates the Specified Volume."""
@@ -95,7 +96,7 @@
         resp, body = self.put('volumes/%s' % volume_id, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['volume']
+        return service_client.ResponseBody(resp, body['volume'])
 
     def delete_volume(self, volume_id):
         """Deletes the Specified Volume."""
@@ -113,7 +114,8 @@
         resp, body = self.post(url, post_body)
         body = json.loads(body)
         self.expected_success(202, resp.status)
-        return resp, body['os-volume_upload_image']
+        return service_client.ResponseBody(resp,
+                                           body['os-volume_upload_image'])
 
     def attach_volume(self, volume_id, instance_uuid, mountpoint):
         """Attaches a volume to a given instance on a given mountpoint."""
@@ -125,7 +127,7 @@
         url = 'volumes/%s/action' % (volume_id)
         resp, body = self.post(url, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def detach_volume(self, volume_id):
         """Detaches a volume from an instance."""
@@ -134,7 +136,7 @@
         url = 'volumes/%s/action' % (volume_id)
         resp, body = self.post(url, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def reserve_volume(self, volume_id):
         """Reserves a volume."""
@@ -143,7 +145,7 @@
         url = 'volumes/%s/action' % (volume_id)
         resp, body = self.post(url, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def unreserve_volume(self, volume_id):
         """Restore a reserved volume ."""
@@ -152,17 +154,17 @@
         url = 'volumes/%s/action' % (volume_id)
         resp, body = self.post(url, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def wait_for_volume_status(self, volume_id, status):
         """Waits for a Volume to reach a given status."""
-        resp, body = self.get_volume(volume_id)
+        body = self.get_volume(volume_id)
         volume_status = body['status']
         start = int(time.time())
 
         while volume_status != status:
             time.sleep(self.build_interval)
-            resp, body = self.get_volume(volume_id)
+            body = self.get_volume(volume_id)
             volume_status = body['status']
             if volume_status == 'error':
                 raise exceptions.VolumeBuildErrorException(volume_id=volume_id)
@@ -197,14 +199,14 @@
         url = 'volumes/%s/action' % (volume_id)
         resp, body = self.post(url, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def reset_volume_status(self, volume_id, status):
         """Reset the Specified Volume's Status."""
         post_body = json.dumps({'os-reset_status': {"status": status}})
         resp, body = self.post('volumes/%s/action' % volume_id, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def volume_begin_detaching(self, volume_id):
         """Volume Begin Detaching."""
@@ -212,7 +214,7 @@
         post_body = json.dumps({'os-begin_detaching': {}})
         resp, body = self.post('volumes/%s/action' % volume_id, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def volume_roll_detaching(self, volume_id):
         """Volume Roll Detaching."""
@@ -220,7 +222,7 @@
         post_body = json.dumps({'os-roll_detaching': {}})
         resp, body = self.post('volumes/%s/action' % volume_id, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def create_volume_transfer(self, vol_id, display_name=None):
         """Create a volume transfer."""
@@ -233,7 +235,7 @@
         resp, body = self.post('os-volume-transfer', post_body)
         body = json.loads(body)
         self.expected_success(202, resp.status)
-        return resp, body['transfer']
+        return service_client.ResponseBody(resp, body['transfer'])
 
     def get_volume_transfer(self, transfer_id):
         """Returns the details of a volume transfer."""
@@ -241,7 +243,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['transfer']
+        return service_client.ResponseBody(resp, body['transfer'])
 
     def list_volume_transfers(self, params=None):
         """List all the volume transfers created."""
@@ -251,7 +253,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['transfers']
+        return service_client.ResponseBodyList(resp, body['transfers'])
 
     def delete_volume_transfer(self, transfer_id):
         """Delete a volume transfer."""
@@ -268,7 +270,7 @@
         resp, body = self.post(url, post_body)
         body = json.loads(body)
         self.expected_success(202, resp.status)
-        return resp, body['transfer']
+        return service_client.ResponseBody(resp, body['transfer'])
 
     def update_volume_readonly(self, volume_id, readonly):
         """Update the Specified Volume readonly."""
@@ -279,14 +281,14 @@
         url = 'volumes/%s/action' % (volume_id)
         resp, body = self.post(url, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def force_delete_volume(self, volume_id):
         """Force Delete Volume."""
         post_body = json.dumps({'os-force_delete': {}})
         resp, body = self.post('volumes/%s/action' % volume_id, post_body)
         self.expected_success(202, resp.status)
-        return resp, body
+        return service_client.ResponseBody(resp, body)
 
     def create_volume_metadata(self, volume_id, metadata):
         """Create metadata for the volume."""
@@ -295,7 +297,7 @@
         resp, body = self.post(url, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['metadata']
+        return service_client.ResponseBody(resp, body['metadata'])
 
     def get_volume_metadata(self, volume_id):
         """Get metadata of the volume."""
@@ -303,7 +305,7 @@
         resp, body = self.get(url)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['metadata']
+        return service_client.ResponseBody(resp, body['metadata'])
 
     def update_volume_metadata(self, volume_id, metadata):
         """Update metadata for the volume."""
@@ -312,7 +314,7 @@
         resp, body = self.put(url, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['metadata']
+        return service_client.ResponseBody(resp, body['metadata'])
 
     def update_volume_metadata_item(self, volume_id, id, meta_item):
         """Update metadata item for the volume."""
@@ -321,7 +323,7 @@
         resp, body = self.put(url, put_body)
         body = json.loads(body)
         self.expected_success(200, resp.status)
-        return resp, body['meta']
+        return service_client.ResponseBody(resp, body['meta'])
 
     def delete_volume_metadata_item(self, volume_id, id):
         """Delete metadata item for the volume."""
diff --git a/tempest/tests/cmd/test_verify_tempest_config.py b/tempest/tests/cmd/test_verify_tempest_config.py
index a8adc7e..1abe29a 100644
--- a/tempest/tests/cmd/test_verify_tempest_config.py
+++ b/tempest/tests/cmd/test_verify_tempest_config.py
@@ -243,9 +243,9 @@
 
     def test_verify_extensions_cinder(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.volumes_extension_client.list_extensions = fake_list_extensions
         self.useFixture(mockpatch.PatchObject(
@@ -265,9 +265,9 @@
 
     def test_verify_extensions_cinder_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.volumes_extension_client.list_extensions = fake_list_extensions
         self.useFixture(mockpatch.PatchObject(
