diff --git a/manila_tempest_tests/tests/api/admin/test_admin_actions.py b/manila_tempest_tests/tests/api/admin/test_admin_actions.py
index 2c99610..e958ac9 100644
--- a/manila_tempest_tests/tests/api/admin/test_admin_actions.py
+++ b/manila_tempest_tests/tests/api/admin/test_admin_actions.py
@@ -66,7 +66,7 @@
     @ddt.data("error", "available", "error_deleting", "deleting", "creating")
     def test_reset_share_instance_state(self, status):
         sh_instance = self.shares_v2_client.get_instances_of_share(
-            self.share["id"])[0]
+            self.share["id"])['share_instances'][0]
         share_instance_id = sh_instance["id"]
         self.shares_v2_client.reset_state(
             share_instance_id, s_type="share_instances", status=status)
@@ -100,7 +100,7 @@
         self.shares_v2_client.reset_state(share["id"], status=self.bad_status)
 
         # Check that status was changed
-        check_status = self.shares_v2_client.get_share(share["id"])
+        check_status = self.shares_v2_client.get_share(share["id"])['share']
         self.assertEqual(self.bad_status, check_status["status"])
 
         # Share with status 'error_deleting' should be deleted
@@ -112,7 +112,8 @@
     def test_force_delete_share_instance(self):
         share = self.create_share(share_type_id=self.share_type_id,
                                   cleanup_in_class=False)
-        instances = self.shares_v2_client.get_instances_of_share(share["id"])
+        instances = self.shares_v2_client.get_instances_of_share(
+            share["id"])['share_instances']
         # Check that instance was created
         self.assertEqual(1, len(instances))
 
@@ -123,7 +124,8 @@
             instance["id"], s_type="share_instances", status=self.bad_status)
 
         # Check that status was changed
-        check_status = self.shares_v2_client.get_share_instance(instance["id"])
+        check_status = self.shares_v2_client.get_share_instance(
+            instance["id"])['share_instance']
         self.assertEqual(self.bad_status, check_status["status"])
 
         # Share with status 'error_deleting' should be deleted
@@ -148,7 +150,7 @@
             sn["id"], s_type="snapshots", status=self.bad_status)
 
         # Check that status was changed
-        check_status = self.shares_v2_client.get_snapshot(sn["id"])
+        check_status = self.shares_v2_client.get_snapshot(sn["id"])['snapshot']
         self.assertEqual(self.bad_status, check_status["status"])
 
         # Snapshot with status 'error_deleting' should be deleted
@@ -172,7 +174,8 @@
         # This check will ensure that when a share creation request is handled,
         # if the driver has the "driver handles share servers" option enabled,
         # that a share server will be created, otherwise, not.
-        share_get = self.admin_shares_v2_client.get_share(self.share['id'])
+        share_get = self.admin_shares_v2_client.get_share(
+            self.share['id'])['share']
         share_server = share_get['share_server_id']
         if CONF.share.multitenancy_enabled:
             self.assertNotEmpty(share_server)
diff --git a/manila_tempest_tests/tests/api/admin/test_admin_actions_negative.py b/manila_tempest_tests/tests/api/admin/test_admin_actions_negative.py
index 0e44b50..4e72e33 100644
--- a/manila_tempest_tests/tests/api/admin/test_admin_actions_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_admin_actions_negative.py
@@ -43,7 +43,8 @@
         cls.share = cls.create_share(share_type_id=cls.share_type_id,
                                      client=cls.admin_client)
         cls.sh_instance = (
-            cls.admin_client.get_instances_of_share(cls.share["id"])[0]
+            cls.admin_client.get_instances_of_share(
+                cls.share["id"])['share_instances'][0]
         )
         if CONF.share.run_snapshot_tests:
             cls.snapshot = cls.create_snapshot_wait_for_active(
diff --git a/manila_tempest_tests/tests/api/admin/test_export_locations.py b/manila_tempest_tests/tests/api/admin/test_export_locations.py
index d43dc14..7d09f69 100644
--- a/manila_tempest_tests/tests/api/admin/test_export_locations.py
+++ b/manila_tempest_tests/tests/api/admin/test_export_locations.py
@@ -47,9 +47,9 @@
         # create share
         cls.share = cls.create_share(share_type_id=cls.share_type_id,
                                      client=cls.admin_client)
-        cls.share = cls.admin_client.get_share(cls.share['id'])
+        cls.share = cls.admin_client.get_share(cls.share['id'])['share']
         cls.share_instances = cls.admin_client.get_instances_of_share(
-            cls.share['id'])
+            cls.share['id'])['share_instances']
 
     def _verify_export_location_structure(
             self, export_locations, role='admin', version=LATEST_MICROVERSION,
@@ -115,7 +115,7 @@
     @utils.skip_if_microversion_not_supported('2.13')
     def test_list_share_export_locations(self):
         export_locations = self.admin_client.list_share_export_locations(
-            self.share['id'], version='2.13')
+            self.share['id'], version='2.13')['export_locations']
 
         self._verify_export_location_structure(export_locations,
                                                version='2.13')
@@ -125,7 +125,7 @@
     @utils.skip_if_microversion_not_supported('2.14')
     def test_list_share_export_locations_with_preferred_flag(self):
         export_locations = self.admin_client.list_share_export_locations(
-            self.share['id'], version='2.14')
+            self.share['id'], version='2.14')['export_locations']
 
         self._verify_export_location_structure(export_locations,
                                                version='2.14')
@@ -134,18 +134,18 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_get_share_export_location(self):
         export_locations = self.admin_client.list_share_export_locations(
-            self.share['id'])
+            self.share['id'])['export_locations']
 
         for export_location in export_locations:
             el = self.admin_client.get_share_export_location(
-                self.share['id'], export_location['id'])
+                self.share['id'], export_location['id'])['export_location']
             self._verify_export_location_structure(el, format='detail')
 
     @decorators.idempotent_id('397969c6-7fc8-4bf8-86c7-300b96857c54')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_list_share_export_locations_by_member(self):
         export_locations = self.member_client.list_share_export_locations(
-            self.share['id'])
+            self.share['id'])['export_locations']
 
         self._verify_export_location_structure(export_locations, role='member')
 
@@ -153,13 +153,13 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_get_share_export_location_by_member(self):
         export_locations = self.admin_client.list_share_export_locations(
-            self.share['id'])
+            self.share['id'])['export_locations']
 
         for export_location in export_locations:
             if export_location['is_admin_only']:
                 continue
             el = self.member_client.get_share_export_location(
-                self.share['id'], export_location['id'])
+                self.share['id'], export_location['id'])['export_location']
             self._verify_export_location_structure(el, role='member',
                                                    format='detail')
 
@@ -170,7 +170,7 @@
         for share_instance in self.share_instances:
             export_locations = (
                 self.admin_client.list_share_instance_export_locations(
-                    share_instance['id'], version='2.13'))
+                    share_instance['id'], version='2.13'))['export_locations']
             self._verify_export_location_structure(export_locations,
                                                    version='2.13')
 
@@ -181,7 +181,7 @@
         for share_instance in self.share_instances:
             export_locations = (
                 self.admin_client.list_share_instance_export_locations(
-                    share_instance['id'], version='2.14'))
+                    share_instance['id'], version='2.14'))['export_locations']
             self._verify_export_location_structure(export_locations,
                                                    version='2.14')
 
@@ -191,22 +191,22 @@
         for share_instance in self.share_instances:
             export_locations = (
                 self.admin_client.list_share_instance_export_locations(
-                    share_instance['id']))
+                    share_instance['id'])['export_locations'])
             for el in export_locations:
                 el = self.admin_client.get_share_instance_export_location(
-                    share_instance['id'], el['id'])
+                    share_instance['id'], el['id'])['export_location']
                 self._verify_export_location_structure(el, format='detail')
 
     @decorators.idempotent_id('581acd8d-b89d-4684-8310-b910b46acc7a')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_share_contains_all_export_locations_of_all_share_instances(self):
         share_export_locations = self.admin_client.list_share_export_locations(
-            self.share['id'])
+            self.share['id'])['export_locations']
         share_instances_export_locations = []
         for share_instance in self.share_instances:
             share_instance_export_locations = (
                 self.admin_client.list_share_instance_export_locations(
-                    share_instance['id']))
+                    share_instance['id'])['export_locations'])
             share_instances_export_locations.extend(
                 share_instance_export_locations)
 
diff --git a/manila_tempest_tests/tests/api/admin/test_export_locations_negative.py b/manila_tempest_tests/tests/api/admin/test_export_locations_negative.py
index ef039ad..2821d99 100644
--- a/manila_tempest_tests/tests/api/admin/test_export_locations_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_export_locations_negative.py
@@ -46,9 +46,9 @@
         # create share
         cls.share = cls.create_share(client=cls.admin_client,
                                      share_type_id=cls.share_type_id)
-        cls.share = cls.admin_client.get_share(cls.share['id'])
+        cls.share = cls.admin_client.get_share(cls.share['id'])['share']
         cls.share_instances = cls.admin_client.get_instances_of_share(
-            cls.share['id'])
+            cls.share['id'])['share_instances']
 
     @decorators.idempotent_id('8eac1355-f272-4913-8a49-1a8a9cb086bd')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
@@ -86,7 +86,7 @@
         for share_instance in self.share_instances:
             export_locations = (
                 self.admin_client.list_share_instance_export_locations(
-                    share_instance['id']))
+                    share_instance['id'])['export_locations'])
             for el in export_locations:
                 self.assertRaises(lib_exc.Forbidden,
                                   (self.admin_member_client.
@@ -105,7 +105,7 @@
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
     def test_get_share_export_location_by_different_project_user(self):
         export_locations = self.admin_client.list_share_export_locations(
-            self.share['id'])
+            self.share['id'])['export_locations']
 
         for export_location in export_locations:
             self.assertRaises(
diff --git a/manila_tempest_tests/tests/api/admin/test_migration.py b/manila_tempest_tests/tests/api/admin/test_migration.py
index aaec577..cf23a99 100644
--- a/manila_tempest_tests/tests/api/admin/test_migration.py
+++ b/manila_tempest_tests/tests/api/admin/test_migration.py
@@ -108,7 +108,7 @@
             self.assertIsNotNone(dest_pool.get('name'))
 
         old_exports = self.shares_v2_client.list_share_export_locations(
-            share['id'])
+            share['id'])['export_locations']
         self.assertNotEmpty(old_exports)
         old_exports = [x['path'] for x in old_exports
                        if x['is_admin_only'] is False]
@@ -130,7 +130,7 @@
             status_attr='access_rules_status')
 
         dest_pool = dest_pool['name']
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         return share, dest_pool
 
@@ -144,7 +144,7 @@
                     else status_to_wait)
 
         new_exports = self.shares_v2_client.list_share_export_locations(
-            share['id'], version=version)
+            share['id'], version=version)['export_locations']
         self.assertNotEmpty(new_exports)
         new_exports = [x['path'] for x in new_exports if
                        x['is_admin_only'] is False]
@@ -160,7 +160,8 @@
         if complete:
             self.assertEqual(dest_pool, share['host'])
 
-            rules = self.shares_v2_client.list_access_rules(share['id'])
+            rules = self.shares_v2_client.list_access_rules(
+                share['id'])['access_list']
             expected_rules = [{
                 'state': constants.RULE_STATE_ACTIVE,
                 'access_to': '50.50.50.50',
@@ -205,7 +206,7 @@
     def _create_secondary_share_network(self, old_share_network_id):
 
         old_share_network = self.shares_v2_client.get_share_network(
-            old_share_network_id)
+            old_share_network_id)['share_network']
         share_net_info = (
             utils.share_network_get_default_subnet(old_share_network)
             if utils.share_network_subnets_are_supported()
@@ -223,7 +224,7 @@
         share = self.create_share(self.protocol,
                                   size=new_size,
                                   share_type_id=self.share_type_id)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         share, dest_pool = self._setup_migration(share)
 
@@ -242,14 +243,14 @@
             self.shares_v2_client.extend_share(share['id'], new_size)
             waiters.wait_for_resource_status(
                 self.shares_v2_client, share['id'], constants.STATUS_AVAILABLE)
-            share = self.shares_v2_client.get_share(share["id"])
+            share = self.shares_v2_client.get_share(share["id"])['share']
             self.assertEqual(new_size, int(share["size"]))
         else:
             new_size = CONF.share.share_size
             self.shares_v2_client.shrink_share(share['id'], new_size)
             waiters.wait_for_resource_status(
                 self.shares_v2_client, share['id'], constants.STATUS_AVAILABLE)
-            share = self.shares_v2_client.get_share(share["id"])
+            share = self.shares_v2_client.get_share(share["id"])['share']
             self.assertEqual(new_size, int(share["size"]))
 
         self._cleanup_share(share)
@@ -273,7 +274,7 @@
 
     def _validate_snapshot(self, share, snapshot1, snapshot2):
         snapshot_list = self.shares_v2_client.list_snapshots_for_share(
-            share['id'])
+            share['id'])['snapshots']
         msg = "Share %s has no snapshot." % share['id']
         # Verify that snapshot list is not empty
         self.assertNotEmpty(snapshot_list, msg)
@@ -308,7 +309,7 @@
 
         share = self.create_share(
             self.protocol, share_type_id=share_type_id)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         if snapshot_capable:
             self.assertEqual(False, share['snapshot_support'])
@@ -379,7 +380,7 @@
 
         share = self.create_share(self.protocol,
                                   share_type_id=self.share_type_id)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         share, dest_pool = self._setup_migration(share)
         task_state = (constants.TASK_STATE_DATA_COPYING_COMPLETED
                       if force_host_assisted
@@ -422,7 +423,7 @@
     def test_migration_cancel_share_with_snapshot(self):
         share = self.create_share(self.protocol,
                                   share_type_id=self.share_type_id)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         share, dest_pool = self._setup_migration(share)
         snapshot1 = self.create_snapshot_wait_for_active(share['id'])
@@ -467,7 +468,7 @@
         share = self.create_share(self.protocol,
                                   share_type_id=self.share_type_id,
                                   cleanup_in_class=False)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         share, dest_pool = self._setup_migration(share, opposite=True)
 
         old_share_network_id = share['share_network_id']
@@ -521,7 +522,7 @@
 
         share = self.create_share(self.protocol,
                                   share_type_id=self.share_type_id)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         share, dest_pool = self._setup_migration(share)
 
         old_share_network_id = share['share_network_id']
@@ -609,7 +610,7 @@
         share = self.create_share(self.protocol,
                                   share_type_id=ss_type['id'],
                                   cleanup_in_class=False)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         share, dest_pool = self._setup_migration(share)
         snapshot1 = self.create_snapshot_wait_for_active(
diff --git a/manila_tempest_tests/tests/api/admin/test_migration_negative.py b/manila_tempest_tests/tests/api/admin/test_migration_negative.py
index 124096a..ec9867a 100644
--- a/manila_tempest_tests/tests/api/admin/test_migration_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_migration_negative.py
@@ -68,7 +68,7 @@
         cls.share = cls.create_share(cls.protocol,
                                      size=CONF.share.share_size + 1,
                                      share_type_id=cls.share_type_id)
-        cls.share = cls.shares_client.get_share(cls.share['id'])
+        cls.share = cls.shares_client.get_share(cls.share['id'])['share']
 
         dest_pool = utils.choose_matching_backend(
             cls.share, pools, cls.share_type)
diff --git a/manila_tempest_tests/tests/api/admin/test_multi_backend.py b/manila_tempest_tests/tests/api/admin/test_multi_backend.py
index 3c7e3aa..4f4ef0a 100644
--- a/manila_tempest_tests/tests/api/admin/test_multi_backend.py
+++ b/manila_tempest_tests/tests/api/admin/test_multi_backend.py
@@ -86,7 +86,7 @@
     def test_share_backend_name_reporting(self):
         # Share's 'host' should be like "hostname@backend_name"
         for share in self.shares:
-            get = self.shares_client.get_share(share['id'])
+            get = self.shares_client.get_share(share['id'])['share']
             self.assertEqual(2, len(get["host"].split("@")))
 
     @decorators.idempotent_id('691fbcef-6d8d-4ad9-b493-501bbb3dcf3c')
@@ -95,7 +95,7 @@
         # Share type should be the same as provided with share creation
         for share, share_type in zip(self.shares, self.sts):
             share_details = self.shares_v2_client.get_share(
-                share['id'], version="2.5")
+                share['id'], version="2.5")['share']
             self.assertEqual(share_type["name"], share_details["share_type"])
 
     @decorators.idempotent_id('f25e0cb0-d656-4f16-a761-ec23992cd9e7')
@@ -104,7 +104,7 @@
         # Share type should be the same as provided with share creation
         for share, share_type in zip(self.shares, self.sts):
             share_details = self.shares_v2_client.get_share(
-                share['id'], version="2.6")
+                share['id'], version="2.6")['share']
             self.assertEqual(share_type["id"], share_details["share_type"])
             self.assertEqual(
                 share_type["name"], share_details["share_type_name"])
@@ -116,6 +116,6 @@
         if CONF.share.backend_names[0] == CONF.share.backend_names[1]:
             raise self.skipException("Share backends "
                                      "configured with same name. Skipping.")
-        get1 = self.shares_client.get_share(self.shares[0]['id'])
-        get2 = self.shares_client.get_share(self.shares[1]['id'])
+        get1 = self.shares_client.get_share(self.shares[0]['id'])['share']
+        get2 = self.shares_client.get_share(self.shares[1]['id'])['share']
         self.assertNotEqual(get1["host"], get2["host"])
diff --git a/manila_tempest_tests/tests/api/admin/test_quotas.py b/manila_tempest_tests/tests/api/admin/test_quotas.py
index 76b8f0e..7ef3a96 100644
--- a/manila_tempest_tests/tests/api/admin/test_quotas.py
+++ b/manila_tempest_tests/tests/api/admin/test_quotas.py
@@ -50,7 +50,7 @@
     @decorators.idempotent_id('f62c48e3-9736-4f0c-9f9b-f139f393ac0a')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_default_quotas(self):
-        quotas = self.client.default_quotas(self.tenant_id)
+        quotas = self.client.default_quotas(self.tenant_id)['quota_set']
         self.assertGreater(int(quotas["gigabytes"]), -2)
         self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
         self.assertGreater(int(quotas["shares"]), -2)
@@ -66,7 +66,7 @@
     @decorators.idempotent_id('1ff57cfa-cd8d-495f-86eb-9fead307428e')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_show_quotas(self):
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
         self.assertGreater(int(quotas["gigabytes"]), -2)
         self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
         self.assertGreater(int(quotas["shares"]), -2)
@@ -83,7 +83,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_show_quotas_for_user(self):
         quotas = self.client.show_quotas(
-            self.tenant_id, self.user_id)
+            self.tenant_id, self.user_id)['quota_set']
         self.assertGreater(int(quotas["gigabytes"]), -2)
         self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
         self.assertGreater(int(quotas["shares"]), -2)
@@ -101,7 +101,7 @@
     @utils.skip_if_microversion_not_supported(PRE_SHARE_GROUPS_MICROVERSION)
     def test_show_sg_quotas_using_too_old_microversion(self):
         quotas = self.client.show_quotas(
-            self.tenant_id, version=PRE_SHARE_GROUPS_MICROVERSION)
+            self.tenant_id, version=PRE_SHARE_GROUPS_MICROVERSION)['quota_set']
 
         for key in ('share_groups', 'share_group_snapshots'):
             self.assertNotIn(key, quotas)
@@ -112,7 +112,7 @@
     def test_show_sg_quotas_for_user_using_too_old_microversion(self):
         quotas = self.client.show_quotas(
             self.tenant_id, self.user_id,
-            version=PRE_SHARE_GROUPS_MICROVERSION)
+            version=PRE_SHARE_GROUPS_MICROVERSION)['quota_set']
 
         for key in ('share_groups', 'share_group_snapshots'):
             self.assertNotIn(key, quotas)
@@ -124,7 +124,7 @@
     def test_show_replica_quotas_for_user_using_too_old_microversion(self):
         quotas = self.client.show_quotas(
             self.tenant_id, self.user_id,
-            version=PRE_SHARE_REPLICA_QUOTAS_MICROVERSION)
+            version=PRE_SHARE_REPLICA_QUOTAS_MICROVERSION)['quota_set']
 
         for key in ('share_replicas', 'replica_gigabytes'):
             self.assertNotIn(key, quotas)
@@ -159,11 +159,11 @@
             keys.append('replica_gigabytes')
 
         # Get current project quotas
-        p_quotas = self.client.show_quotas(self.tenant_id)
+        p_quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # Get current share type quotas
         st_quotas = self.client.show_quotas(
-            self.tenant_id, share_type=share_type[share_type_key])
+            self.tenant_id, share_type=share_type[share_type_key])['quota_set']
 
         # Share type quotas have values equal to project's
         for key in keys:
@@ -214,7 +214,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_update_tenant_quota_shares(self):
         # get current quotas
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
         new_quota = int(quotas["shares"]) + 2
 
         # set new quota for shares
@@ -233,7 +233,7 @@
     @utils.skip_if_microversion_not_supported(SHARE_GROUPS_MICROVERSION)
     def test_update_tenant_quota_share_groups(self, quota_key):
         # Get current quotas
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
         new_quota = int(quotas[quota_key]) + 2
 
         # Set new quota
@@ -245,7 +245,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_update_user_quota_shares(self):
         # get current quotas
-        quotas = self.client.show_quotas(self.tenant_id, self.user_id)
+        quotas = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
         new_quota = int(quotas["shares"]) - 1
 
         # set new quota for shares
@@ -266,7 +267,8 @@
     @utils.skip_if_microversion_not_supported(SHARE_GROUPS_MICROVERSION)
     def test_update_user_quota_share_groups(self, quota_key):
         # Get current quotas
-        quotas = self.client.show_quotas(self.tenant_id, self.user_id)
+        quotas = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
         new_quota = int(quotas[quota_key]) - 1
 
         # Set new quota
@@ -292,7 +294,7 @@
         # Update the kwargs with user_id in case the user_id need to be
         # specified in the request
         kwargs.update({'user_id': self.user_id}) if use_user_id else None
-        quotas = self.client.show_quotas(self.tenant_id, **kwargs)
+        quotas = self.client.show_quotas(self.tenant_id, **kwargs)['quota_set']
         new_quota = int(quotas[quota_key]) - 1
 
         # Add the updated quota into the kwargs
@@ -319,7 +321,7 @@
 
         # Get current quotas
         quotas = self.client.show_quotas(
-            self.tenant_id, share_type=share_type[share_type_key])
+            self.tenant_id, share_type=share_type[share_type_key])['quota_set']
         quota_keys = ['shares', 'gigabytes', 'snapshots', 'snapshot_gigabytes']
 
         if replica_quotas_supported:
@@ -341,7 +343,7 @@
             self.assertEqual(new_quota, int(updated[q]))
 
         current_quotas = self.client.show_quotas(
-            self.tenant_id, share_type=share_type[share_type_key])
+            self.tenant_id, share_type=share_type[share_type_key])['quota_set']
 
         for q in quota_keys:
             self.assertEqual(int(quotas[q]) - 1, current_quotas[q])
@@ -350,7 +352,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_update_tenant_quota_snapshots(self):
         # get current quotas
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
         new_quota = int(quotas["snapshots"]) + 2
 
         # set new quota for snapshots
@@ -362,7 +364,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_update_user_quota_snapshots(self):
         # get current quotas
-        quotas = self.client.show_quotas(self.tenant_id, self.user_id)
+        quotas = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
         new_quota = int(quotas["snapshots"]) - 1
 
         # set new quota for snapshots
@@ -376,7 +379,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_update_tenant_quota_gigabytes(self):
         # get current quotas
-        custom = self.client.show_quotas(self.tenant_id)
+        custom = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # make quotas for update
         gigabytes = int(custom["gigabytes"]) + 2
@@ -390,7 +393,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_update_tenant_quota_snapshot_gigabytes(self):
         # get current quotas
-        custom = self.client.show_quotas(self.tenant_id)
+        custom = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # make quotas for update
         snapshot_gigabytes = int(custom["snapshot_gigabytes"]) + 2
@@ -406,7 +409,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_update_user_quota_gigabytes(self):
         # get current quotas
-        custom = self.client.show_quotas(self.tenant_id, self.user_id)
+        custom = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
 
         # make quotas for update
         gigabytes = int(custom["gigabytes"]) - 1
@@ -422,7 +426,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_update_user_quota_snapshot_gigabytes(self):
         # get current quotas
-        custom = self.client.show_quotas(self.tenant_id, self.user_id)
+        custom = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
 
         # make quotas for update
         snapshot_gigabytes = int(custom["snapshot_gigabytes"]) - 1
@@ -439,7 +444,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_update_tenant_quota_share_networks(self):
         # get current quotas
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
         new_quota = int(quotas["share_networks"]) + 2
 
         # set new quota for share-networks
@@ -452,7 +457,7 @@
     def test_update_user_quota_share_networks(self):
         # get current quotas
         quotas = self.client.show_quotas(
-            self.tenant_id, self.user_id)
+            self.tenant_id, self.user_id)['quota_set']
         new_quota = int(quotas["share_networks"]) - 1
 
         # set new quota for share-networks
@@ -466,10 +471,10 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_reset_tenant_quotas(self):
         # Get default_quotas
-        default = self.client.default_quotas(self.tenant_id)
+        default = self.client.default_quotas(self.tenant_id)['quota_set']
 
         # Get current quotas
-        custom = self.client.show_quotas(self.tenant_id)
+        custom = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # Make quotas for update
         data = {
@@ -514,7 +519,7 @@
         self.client.reset_quotas(self.tenant_id)
 
         # Verify quotas
-        reseted = self.client.show_quotas(self.tenant_id)
+        reseted = self.client.show_quotas(self.tenant_id)['quota_set']
         self.assertEqual(int(default["shares"]), int(reseted["shares"]))
         self.assertEqual(int(default["snapshots"]), int(reseted["snapshots"]))
         self.assertEqual(int(default["gigabytes"]), int(reseted["gigabytes"]))
@@ -559,7 +564,8 @@
         quota_keys = ['shares', 'snapshots', 'gigabytes', 'snapshot_gigabytes']
 
         # get default_quotas
-        default_quotas = self.client.default_quotas(self.tenant_id)
+        default_quotas = self.client.default_quotas(
+            self.tenant_id)['quota_set']
 
         kwargs = {}
 
@@ -602,9 +608,9 @@
             self.tenant_id, share_type=share_type[share_type_key])
 
         # verify quotas
-        current_p_quota = self.client.show_quotas(self.tenant_id)
+        current_p_quota = self.client.show_quotas(self.tenant_id)['quota_set']
         current_st_quota = self.client.show_quotas(
-            self.tenant_id, share_type=share_type[share_type_key])
+            self.tenant_id, share_type=share_type[share_type_key])['quota_set']
         for key in quota_keys:
             self.assertEqual(updated_p_quota[key], current_p_quota[key])
 
@@ -617,7 +623,7 @@
     def test_unlimited_quota_for_shares(self):
         self.update_quotas(self.tenant_id, shares=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('shares'))
 
@@ -626,7 +632,8 @@
     def test_unlimited_user_quota_for_shares(self):
         self.update_quotas(self.tenant_id, user_id=self.user_id, shares=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id, self.user_id)
+        quotas = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('shares'))
 
@@ -635,7 +642,7 @@
     def test_unlimited_quota_for_snapshots(self):
         self.update_quotas(self.tenant_id, snapshots=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('snapshots'))
 
@@ -644,7 +651,8 @@
     def test_unlimited_user_quota_for_snapshots(self):
         self.update_quotas(self.tenant_id, user_id=self.user_id, snapshots=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id, self.user_id)
+        quotas = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('snapshots'))
 
@@ -653,7 +661,7 @@
     def test_unlimited_quota_for_gigabytes(self):
         self.update_quotas(self.tenant_id, gigabytes=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('gigabytes'))
 
@@ -662,7 +670,7 @@
     def test_unlimited_quota_for_snapshot_gigabytes(self):
         self.update_quotas(self.tenant_id, snapshot_gigabytes=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('snapshot_gigabytes'))
 
@@ -671,7 +679,8 @@
     def test_unlimited_user_quota_for_gigabytes(self):
         self.update_quotas(self.tenant_id, user_id=self.user_id, gigabytes=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id, self.user_id)
+        quotas = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('gigabytes'))
 
@@ -682,7 +691,8 @@
                            user_id=self.user_id,
                            snapshot_gigabytes=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id, self.user_id)
+        quotas = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('snapshot_gigabytes'))
 
@@ -691,7 +701,7 @@
     def test_unlimited_quota_for_share_networks(self):
         self.update_quotas(self.tenant_id, share_networks=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('share_networks'))
 
@@ -702,7 +712,8 @@
                            user_id=self.user_id,
                            share_networks=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id, self.user_id)
+        quotas = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('share_networks'))
 
@@ -714,7 +725,7 @@
     def test_unlimited_quota_for_share_groups(self):
         self.update_quotas(self.tenant_id, share_groups=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('share_groups'))
 
@@ -728,7 +739,8 @@
                            user_id=self.user_id,
                            share_group_snapshots=-1)
 
-        quotas = self.client.show_quotas(self.tenant_id, self.user_id)
+        quotas = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
 
         self.assertEqual(-1, quotas.get('share_group_snapshots'))
 
@@ -741,7 +753,7 @@
         kwargs = {quota_key: -1}
         self.update_quotas(self.tenant_id, **kwargs)
 
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         self.assertEqual(-1, quotas.get(quota_key))
 
@@ -754,7 +766,8 @@
         kwargs = {quota_key: -1}
         self.update_quotas(self.tenant_id, user_id=self.user_id, **kwargs)
 
-        quotas = self.client.show_quotas(self.tenant_id, self.user_id)
+        quotas = self.client.show_quotas(
+            self.tenant_id, self.user_id)['quota_set']
 
         self.assertEqual(-1, quotas.get(quota_key))
 
@@ -858,7 +871,7 @@
                 (4, 4, 2, 1, {'share_type': st_1['id']}),
                 (4, 3, 2, 1, {'share_type': st_2['name']})):
             quotas = self.client.detail_quotas(
-                tenant_id=self.tenant_id, **kwargs)
+                tenant_id=self.tenant_id, **kwargs)['quota_set']
             self.assertEqual(0, quotas['gigabytes']['reserved'])
             self.assertEqual(g_l, quotas['gigabytes']['limit'])
             self.assertEqual(g_use, quotas['gigabytes']['in_use'])
@@ -873,7 +886,7 @@
         for kwargs in ({}, {'share_type': st_1['name']},
                        {'user_id': self.user_id}, {'share_type': st_2['id']}):
             quotas = self.client.detail_quotas(
-                tenant_id=self.tenant_id, **kwargs)
+                tenant_id=self.tenant_id, **kwargs)['quota_set']
             for key in ('shares', 'gigabytes'):
                 self.assertEqual(0, quotas[key]['reserved'])
                 self.assertEqual(0, quotas[key]['in_use'])
@@ -893,9 +906,10 @@
 
     def _check_usages(self, sg_in_use, sgs_in_use):
         """Helper method for 'test_share_group_quotas_usages' test."""
-        p_quotas = self.client.detail_quotas(tenant_id=self.tenant_id)
+        p_quotas = self.client.detail_quotas(
+            tenant_id=self.tenant_id)['quota_set']
         u_quotas = self.client.detail_quotas(
-            tenant_id=self.tenant_id, user_id=self.user_id)
+            tenant_id=self.tenant_id, user_id=self.user_id)['quota_set']
         self._check_sg_usages(p_quotas, sg_in_use, 3)
         self._check_sg_usages(u_quotas, sg_in_use, 2)
         self._check_sgs_usages(p_quotas, sgs_in_use)
diff --git a/manila_tempest_tests/tests/api/admin/test_quotas_negative.py b/manila_tempest_tests/tests/api/admin/test_quotas_negative.py
index 83635b6..7dd12e1 100644
--- a/manila_tempest_tests/tests/api/admin/test_quotas_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_quotas_negative.py
@@ -124,7 +124,7 @@
     @decorators.idempotent_id('75d39eda-a2b5-4271-a61d-9e2c86370b3e')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_create_share_with_size_bigger_than_quota(self):
-        quotas = self.client.show_quotas(self.tenant_id)
+        quotas = self.client.show_quotas(self.tenant_id)['quota_set']
         overquota = int(quotas['gigabytes']) + 2
 
         # try schedule share with size, bigger than gigabytes quota
@@ -152,7 +152,7 @@
     def test_try_set_user_quota_shares_bigger_than_tenant_quota(self):
 
         # get current quotas for tenant
-        tenant_quotas = self.client.show_quotas(self.tenant_id)
+        tenant_quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # try set user quota for shares bigger than tenant quota
         bigger_value = int(tenant_quotas["shares"]) + 2
@@ -168,7 +168,7 @@
     def test_try_set_user_quota_snaps_bigger_than_tenant_quota(self):
 
         # get current quotas for tenant
-        tenant_quotas = self.client.show_quotas(self.tenant_id)
+        tenant_quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # try set user quota for snapshots bigger than tenant quota
         bigger_value = int(tenant_quotas["snapshots"]) + 2
@@ -184,7 +184,7 @@
     def test_try_set_user_quota_gigabytes_bigger_than_tenant_quota(self):
 
         # get current quotas for tenant
-        tenant_quotas = self.client.show_quotas(self.tenant_id)
+        tenant_quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # try set user quota for gigabytes bigger than tenant quota
         bigger_value = int(tenant_quotas["gigabytes"]) + 2
@@ -199,7 +199,7 @@
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_try_set_user_quota_snap_gigabytes_bigger_than_tenant_quota(self):
         # get current quotas for tenant
-        tenant_quotas = self.client.show_quotas(self.tenant_id)
+        tenant_quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # try set user quota for snapshot gigabytes bigger than tenant quota
         bigger_value = int(tenant_quotas["snapshot_gigabytes"]) + 2
@@ -215,7 +215,7 @@
     def test_try_set_user_quota_share_networks_bigger_than_tenant_quota(self):
 
         # get current quotas for tenant
-        tenant_quotas = self.client.show_quotas(self.tenant_id)
+        tenant_quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # try set user quota for share_networks bigger than tenant quota
         bigger_value = int(tenant_quotas["share_networks"]) + 2
@@ -233,7 +233,7 @@
         SHARE_REPLICA_QUOTAS_MICROVERSION)
     def test_try_set_user_quota_replicas_bigger_than_tenant_quota(self, key):
         # get current quotas for tenant
-        tenant_quotas = self.client.show_quotas(self.tenant_id)
+        tenant_quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # try set user quota for snapshots bigger than tenant quota
         bigger_value = int(tenant_quotas[key]) + 2
@@ -290,7 +290,8 @@
 
         kwargs = {"share_type": "fake_nonexistent_share_type"}
         if op == 'update':
-            tenant_quotas = self.client.show_quotas(self.tenant_id)
+            tenant_quotas = self.client.show_quotas(
+                self.tenant_id)['quota_set']
             kwargs['shares'] = tenant_quotas['shares']
 
         self.assertRaises(lib_exc.NotFound,
@@ -304,7 +305,7 @@
     @utils.skip_if_microversion_not_supported("2.39")
     def test_try_update_share_type_quota_for_share_networks(self, key):
         share_type = self.create_share_type()
-        tenant_quotas = self.client.show_quotas(self.tenant_id)
+        tenant_quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         # Try to set 'share_networks' quota for share type
         self.assertRaises(lib_exc.BadRequest,
@@ -319,7 +320,7 @@
     @utils.skip_if_microversion_not_supported(SHARE_GROUPS_MICROVERSION)
     def test_try_update_share_type_quota_for_share_groups(self, quota_name):
         share_type = self.create_share_type()
-        tenant_quotas = self.client.show_quotas(self.tenant_id)
+        tenant_quotas = self.client.show_quotas(self.tenant_id)['quota_set']
 
         self.assertRaises(lib_exc.BadRequest,
                           self.update_quotas,
@@ -334,7 +335,7 @@
     @utils.skip_if_microversion_not_supported(SHARE_GROUPS_MICROVERSION)
     def test_share_group_quotas_using_too_old_microversion(self, quota_key):
         tenant_quotas = self.client.show_quotas(
-            self.tenant_id, version=SHARE_GROUPS_MICROVERSION)
+            self.tenant_id, version=SHARE_GROUPS_MICROVERSION)['quota_set']
         kwargs = {
             "version": PRE_SHARE_GROUPS_MICROVERSION,
             quota_key: tenant_quotas[quota_key],
@@ -352,7 +353,8 @@
         SHARE_REPLICA_QUOTAS_MICROVERSION)
     def test_share_replica_quotas_using_too_old_microversion(self, quota_key):
         tenant_quotas = self.client.show_quotas(
-            self.tenant_id, version=SHARE_REPLICA_QUOTAS_MICROVERSION)
+            self.tenant_id,
+            version=SHARE_REPLICA_QUOTAS_MICROVERSION)['quota_set']
         kwargs = {
             "version": PRE_SHARE_REPLICA_QUOTAS_MICROVERSION,
             quota_key: tenant_quotas[quota_key],
@@ -371,7 +373,8 @@
         share_type = self.create_share_type()
         kwargs = {"version": "2.38", "share_type": share_type["name"]}
         if op == 'update':
-            tenant_quotas = self.client.show_quotas(self.tenant_id)
+            tenant_quotas = self.client.show_quotas(
+                self.tenant_id)['quota_set']
             kwargs['shares'] = tenant_quotas['shares']
 
         self.assertRaises(lib_exc.BadRequest,
@@ -387,7 +390,8 @@
         share_type = self.create_share_type()
         kwargs = {"share_type": share_type["name"], "user_id": self.user_id}
         if op == 'update':
-            tenant_quotas = self.client.show_quotas(self.tenant_id)
+            tenant_quotas = self.client.show_quotas(
+                self.tenant_id)['quota_set']
             kwargs['shares'] = tenant_quotas['shares']
 
         self.assertRaises(lib_exc.BadRequest,
@@ -456,7 +460,8 @@
         self.update_quotas(self.tenant_id, client=self.admin_client, **kwargs)
 
         # Get the updated quotas and add a cleanup
-        updated_quota = self.admin_client.show_quotas(self.tenant_id)
+        updated_quota = self.admin_client.show_quotas(
+            self.tenant_id)['quota_set']
 
         # Make sure that the new value was properly set
         self.assertEqual(new_limit, updated_quota[quota_key])
diff --git a/manila_tempest_tests/tests/api/admin/test_replication.py b/manila_tempest_tests/tests/api/admin/test_replication.py
index 6c37849..b5b340c 100644
--- a/manila_tempest_tests/tests/api/admin/test_replication.py
+++ b/manila_tempest_tests/tests/api/admin/test_replication.py
@@ -61,7 +61,7 @@
         cls.sn_id = None
         if cls.multitenancy_enabled:
             cls.share_network = cls.shares_v2_client.get_share_network(
-                cls.shares_v2_client.share_network_id)
+                cls.shares_v2_client.share_network_id)['share_network']
             cls.sn_id = cls.share_network['id']
 
         cls.zones = cls.get_availability_zones_matching_share_type(
@@ -75,7 +75,7 @@
                                      share_network_id=cls.sn_id,
                                      client=cls.admin_client)
         cls.replica = cls.admin_client.list_share_replicas(
-            share_id=cls.share['id'])[0]
+            share_id=cls.share['id'])['share_replicas'][0]
 
     @staticmethod
     def _filter_share_replica_list(replica_list, r_state):
@@ -101,7 +101,7 @@
             share_type_id=self.share_type_id, client=self.admin_client,
             availability_zone=self.share_zone, share_network_id=self.sn_id)
         original_replica = self.admin_client.list_share_replicas(
-            share_id=share['id'], version=version)[0]
+            share_id=share['id'], version=version)['share_replicas'][0]
 
         # NOTE(Yogi1): Cleanup needs to be disabled for replica that is
         # being promoted since it will become the 'primary'/'active' replica.
@@ -116,7 +116,7 @@
 
         # List replicas
         replica_list = self.admin_client.list_share_replicas(
-            share_id=share['id'], version=version)
+            share_id=share['id'], version=version)['share_replicas']
 
         # Check if there is only 1 'active' replica before promotion.
         active_replicas = self._filter_share_replica_list(
@@ -141,7 +141,7 @@
 
         # Check if there is still only 1 'active' replica after promotion.
         replica_list = self.admin_client.list_share_replicas(
-            share_id=self.share["id"], version=version)
+            share_id=self.share["id"], version=version)['share_replicas']
         new_active_replicas = self._filter_share_replica_list(
             replica_list, constants.REPLICATION_STATE_ACTIVE)
         self.assertEqual(1, len(new_active_replicas))
diff --git a/manila_tempest_tests/tests/api/admin/test_replication_actions.py b/manila_tempest_tests/tests/api/admin/test_replication_actions.py
index 6bc2e27..ba8d63b 100644
--- a/manila_tempest_tests/tests/api/admin/test_replication_actions.py
+++ b/manila_tempest_tests/tests/api/admin/test_replication_actions.py
@@ -64,7 +64,7 @@
         cls.sn_id = None
         if cls.multitenancy_enabled:
             cls.share_network = cls.shares_v2_client.get_share_network(
-                cls.shares_v2_client.share_network_id)
+                cls.shares_v2_client.share_network_id)['share_network']
             cls.sn_id = cls.share_network['id']
 
         cls.zones = cls.get_availability_zones_matching_share_type(
@@ -79,7 +79,7 @@
                                      share_network_id=cls.sn_id,
                                      client=cls.admin_client)
         cls.replica = cls.admin_client.list_share_replicas(
-            share_id=cls.share['id'])[0]
+            share_id=cls.share['id'])['share_replicas'][0]
 
     @decorators.idempotent_id('b39f319e-2515-42c0-85c4-21c2fb2123bf')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
@@ -91,7 +91,7 @@
         self.admin_client.extend_share(self.share["id"], new_size)
         waiters.wait_for_resource_status(
             self.admin_client, self.share["id"], "available")
-        share = self.admin_client.get_share(self.share["id"])
+        share = self.admin_client.get_share(self.share["id"])['share']
         self.assertEqual(new_size, int(share["size"]))
 
     @decorators.idempotent_id('743bfb8e-a314-4e8e-92b5-079bd3eae72d')
@@ -99,12 +99,12 @@
     @testtools.skipUnless(CONF.share.run_shrink_tests,
                           'Shrink share tests are disabled.')
     def test_shrink_replicated_share(self):
-        share = self.admin_client.get_share(self.share["id"])
+        share = self.admin_client.get_share(self.share["id"])['share']
         new_size = self.share["size"] - 1
         self.admin_client.shrink_share(self.share["id"], new_size)
         waiters.wait_for_resource_status(
             self.admin_client, share["id"], "available")
-        shrink_share = self.admin_client.get_share(self.share["id"])
+        shrink_share = self.admin_client.get_share(self.share["id"])['share']
         self.assertEqual(new_size, int(shrink_share["size"]))
 
     @decorators.idempotent_id('84150cd6-2777-4806-8aa3-51359f16816e')
@@ -120,9 +120,9 @@
                                   share_network_id=self.sn_id,
                                   cleanup_in_class=True,
                                   client=self.admin_client)
-        share = self.admin_client.get_share(share["id"])
+        share = self.admin_client.get_share(share["id"])['share']
         export_locations = self.admin_client.list_share_export_locations(
-            share["id"])
+            share["id"])['export_locations']
         export_path = export_locations[0]['path']
 
         self.admin_client.unmanage_share(share['id'])
@@ -131,7 +131,7 @@
         # Manage the previously unmanaged share
         managed_share = self.admin_client.manage_share(
             share['host'], share['share_proto'],
-            export_path, self.share_type_id)
+            export_path, self.share_type_id)['share']
         waiters.wait_for_resource_status(
             self.admin_client, managed_share['id'], 'available')
 
diff --git a/manila_tempest_tests/tests/api/admin/test_security_services.py b/manila_tempest_tests/tests/api/admin/test_security_services.py
index bb3c103..17b7e88 100644
--- a/manila_tempest_tests/tests/api/admin/test_security_services.py
+++ b/manila_tempest_tests/tests/api/admin/test_security_services.py
@@ -51,7 +51,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_list_security_services_all_tenants(self):
         listed = self.shares_client.list_security_services(
-            params={'all_tenants': 1})
+            params={'all_tenants': 1})['security_services']
         self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
         self.assertTrue(any(self.ss_kerberos['id'] == ss['id']
                             for ss in listed))
@@ -63,5 +63,5 @@
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_list_security_services_invalid_filters(self):
         listed = self.shares_client.list_security_services(
-            params={'fake_opt': 'some_value'})
+            params={'fake_opt': 'some_value'})['security_services']
         self.assertEqual(0, len(listed))
diff --git a/manila_tempest_tests/tests/api/admin/test_services.py b/manila_tempest_tests/tests/api/admin/test_services.py
index 7e70dc2..b67f62c 100644
--- a/manila_tempest_tests/tests/api/admin/test_services.py
+++ b/manila_tempest_tests/tests/api/admin/test_services.py
@@ -25,13 +25,13 @@
 
     def setUp(self):
         super(ServicesAdminTest, self).setUp()
-        self.services = self.shares_client.list_services()
+        self.services = self.shares_client.list_services()['services']
 
     @decorators.idempotent_id('74cd12ab-a1f5-40fb-9110-d9035b4b20c5')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     @ddt.data('shares_client', 'shares_v2_client')
     def test_list_services(self, client_name):
-        services = getattr(self, client_name).list_services()
+        services = getattr(self, client_name).list_services()['services']
         self.assertNotEqual(0, len(services))
 
         for service in services:
@@ -43,7 +43,7 @@
     def test_get_services_by_host_name(self, client_name):
         host = self.services[0]["host"]
         params = {"host": host}
-        services = getattr(self, client_name).list_services(params)
+        services = getattr(self, client_name).list_services(params)['services']
         self.assertNotEqual(0, len(services))
         for service in services:
             self.assertEqual(host, service["host"])
@@ -54,7 +54,7 @@
     def test_get_services_by_binary_name(self, client_name):
         binary = self.services[0]["binary"]
         params = {"binary": binary, }
-        services = getattr(self, client_name).list_services(params)
+        services = getattr(self, client_name).list_services(params)['services']
         self.assertNotEqual(0, len(services))
         for service in services:
             self.assertEqual(binary, service["binary"])
@@ -65,7 +65,7 @@
     def test_get_services_by_availability_zone(self, client_name):
         zone = self.services[0]["zone"]
         params = {"zone": zone, }
-        services = getattr(self, client_name).list_services(params)
+        services = getattr(self, client_name).list_services(params)['services']
         self.assertNotEqual(0, len(services))
         for service in services:
             self.assertEqual(zone, service["zone"])
@@ -76,7 +76,7 @@
     def test_get_services_by_status(self, client_name):
         status = self.services[0]["status"]
         params = {"status": status, }
-        services = getattr(self, client_name).list_services(params)
+        services = getattr(self, client_name).list_services(params)['services']
         self.assertNotEqual(0, len(services))
         for service in services:
             self.assertEqual(status, service["status"])
@@ -87,7 +87,7 @@
     def test_get_services_by_state(self, client_name):
         state = self.services[0]["state"]
         params = {"state": state, }
-        services = getattr(self, client_name).list_services(params)
+        services = getattr(self, client_name).list_services(params)['services']
         self.assertNotEqual(0, len(services))
         for service in services:
             self.assertEqual(state, service["state"])
@@ -103,7 +103,7 @@
             "status": self.services[0]["status"],
             "state": self.services[0]["state"],
         }
-        services = getattr(self, client_name).list_services(params)
+        services = getattr(self, client_name).list_services(params)['services']
         self.assertNotEqual(0, len(services))
         for service in services:
             self.assertEqual(params["host"], service["host"])
diff --git a/manila_tempest_tests/tests/api/admin/test_services_negative.py b/manila_tempest_tests/tests/api/admin/test_services_negative.py
index e13618d..4dcd36c 100644
--- a/manila_tempest_tests/tests/api/admin/test_services_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_services_negative.py
@@ -41,9 +41,9 @@
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_get_service_by_invalid_params(self):
         # All services are expected if send the request with invalid parameter
-        services = self.admin_client.list_services()
+        services = self.admin_client.list_services()['services']
         params = {'fake_param': 'fake_param_value'}
-        services_fake = self.admin_client.list_services(params)
+        services_fake = self.admin_client.list_services(params)['services']
         self.assertEqual(len(services), len(services_fake))
 
         # "update_at" field could be updated before second request,
@@ -62,35 +62,35 @@
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_get_service_by_invalid_host(self):
         params = {'host': 'fake_host'}
-        services_fake = self.admin_client.list_services(params)
+        services_fake = self.admin_client.list_services(params)['services']
         self.assertEqual(0, len(services_fake))
 
     @decorators.idempotent_id('766461b0-e89a-4113-8229-24c4d11d585a')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_get_service_by_invalid_binary(self):
         params = {'binary': 'fake_binary'}
-        services_fake = self.admin_client.list_services(params)
+        services_fake = self.admin_client.list_services(params)['services']
         self.assertEqual(0, len(services_fake))
 
     @decorators.idempotent_id('ac570fde-690d-4448-9cce-ce35e0a14b88')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_get_service_by_invalid_zone(self):
         params = {'zone': 'fake_zone'}
-        services_fake = self.admin_client.list_services(params)
+        services_fake = self.admin_client.list_services(params)['services']
         self.assertEqual(0, len(services_fake))
 
     @decorators.idempotent_id('da0fef1d-c4d3-4c33-a836-5f836e85df69')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_get_service_by_invalid_status(self):
         params = {'status': 'fake_status'}
-        services_fake = self.admin_client.list_services(params)
+        services_fake = self.admin_client.list_services(params)['services']
         self.assertEqual(0, len(services_fake))
 
     @decorators.idempotent_id('41936575-3a96-455b-8069-7f6563abf0e2')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_get_service_by_invalid_state(self):
         params = {'state': 'fake_state'}
-        services_fake = self.admin_client.list_services(params)
+        services_fake = self.admin_client.list_services(params)['services']
         self.assertEqual(0, len(services_fake))
 
     @decorators.idempotent_id('3c72227b-7fa1-4294-bdf4-413ec4c324e5')
diff --git a/manila_tempest_tests/tests/api/admin/test_share_group_types.py b/manila_tempest_tests/tests/api/admin/test_share_group_types.py
index 20c892e..1bc522a 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_group_types.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_group_types.py
@@ -80,7 +80,7 @@
 
         # Read share group type
         sg_type_r = self.shares_v2_client.get_share_group_type(
-            sg_type_c['id'], version=version)
+            sg_type_c['id'], version=version)['share_group_type']
         keys = set(sg_type_r.keys())
         self.assertTrue(
             constants.SHARE_GROUP_TYPE_REQUIRED_KEYS.issubset(keys),
@@ -166,7 +166,8 @@
 
         self.shares_v2_client.update_share_group_type_spec(
             sg_type['id'], 'key1', 'value3', version=version)
-        sg_type = self.shares_v2_client.get_share_group_type(sg_type['id'])
+        sg_type = self.shares_v2_client.get_share_group_type(
+            sg_type['id'])['share_group_type']
 
         self.assertIn('key1', sg_type['group_specs'])
         self.assertIn('key2', sg_type['group_specs'])
@@ -192,7 +193,8 @@
 
         self.shares_v2_client.update_share_group_type_specs(
             sg_type['id'], group_specs)
-        sg_type = self.shares_v2_client.get_share_group_type(sg_type['id'])
+        sg_type = self.shares_v2_client.get_share_group_type(
+            sg_type['id'])['share_group_type']
 
         for k, v in group_specs.items():
             self.assertIn(k, sg_type['group_specs'])
@@ -224,7 +226,7 @@
         self.shares_v2_client.delete_share_group_type_spec(
             sg_type['id'], key_to_delete, version=version)
         sg_type = self.shares_v2_client.get_share_group_type(
-            sg_type['id'], version=version)
+            sg_type['id'], version=version)['share_group_type']
 
         self.assertDictMatch(group_specs, sg_type['group_specs'])
 
@@ -253,12 +255,12 @@
 
         # It should not be listed without access
         sgt_list = self.shares_v2_client.list_share_group_types(
-            version=version)
+            version=version)['share_group_types']
         self.assertFalse(any(sgt_id == sgt["id"] for sgt in sgt_list))
 
         # List projects that have access for share group type - none expected
         access = self.shares_v2_client.list_access_to_share_group_type(
-            sgt_id, version=version)
+            sgt_id, version=version)['share_group_type_access']
         self.assertEmpty(access)
 
         # Add project access to share group type
@@ -267,12 +269,12 @@
 
         # Now it should be listed
         sgt_list = self.shares_v2_client.list_share_group_types(
-            version=version)
+            version=version)['share_group_types']
         self.assertTrue(any(sgt_id == sgt["id"] for sgt in sgt_list))
 
         # List projects that have access for share group type - one expected
         access = self.shares_v2_client.list_access_to_share_group_type(
-            sgt_id, version=version)
+            sgt_id, version=version)['share_group_type_access']
         expected = [{'share_group_type_id': sgt_id, 'project_id': project_id}]
         self.assertEqual(expected, access)
 
@@ -282,12 +284,12 @@
 
         # It should not be listed without access
         sgt_list = self.shares_v2_client.list_share_group_types(
-            version=version)
+            version=version)['share_group_types']
         self.assertFalse(any(sgt_id == sgt["id"] for sgt in sgt_list))
 
         # List projects that have access for share group type - none expected
         access = self.shares_v2_client.list_access_to_share_group_type(
-            sgt_id, version=version)
+            sgt_id, version=version)['share_group_type_access']
         self.assertEmpty(access)
 
     @decorators.idempotent_id('b8b20a96-cecc-4677-8a77-aae3b93e5b96')
@@ -312,7 +314,7 @@
 
         # List share group type
         sg_type_list = self.shares_v2_client.list_share_group_types(
-            version=version)
+            version=version)['share_group_types']
         for sg_type_get in sg_type_list:
             if utils.is_microversion_ge(version, '2.46'):
                 self.assertIn('is_default', sg_type_get)
@@ -323,7 +325,7 @@
         # Show share group type
         sg_type_id = sg_type_c['id']
         sg_type_show = self.shares_v2_client.get_share_group_type(
-            sg_type_id, version=version)
+            sg_type_id, version=version)['share_group_type']
         if utils.is_microversion_ge(version, '2.46'):
             self.assertIn('is_default', sg_type_show)
             self.assertIs(False, sg_type_show['is_default'])
diff --git a/manila_tempest_tests/tests/api/admin/test_share_groups.py b/manila_tempest_tests/tests/api/admin/test_share_groups.py
index 778e771..b4f0e92 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_groups.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_groups.py
@@ -191,7 +191,8 @@
 
         # Get latest share group information
         orig_sg = self.shares_v2_client.get_share_group(
-            orig_sg['id'], version=constants.MIN_SHARE_GROUP_MICROVERSION)
+            orig_sg['id'],
+            version=constants.MIN_SHARE_GROUP_MICROVERSION)['share_group']
 
         # Assert share server information
         self.assertIsNotNone(orig_sg['share_network_id'])
diff --git a/manila_tempest_tests/tests/api/admin/test_share_instances.py b/manila_tempest_tests/tests/api/admin/test_share_instances.py
index 47c6c84..38c3f49 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_instances.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_instances.py
@@ -39,7 +39,7 @@
         """Test that we get only the 1 share instance back for the share."""
         share_instances = self.shares_v2_client.get_instances_of_share(
             self.share['id'], version='2.3'
-        )
+        )['share_instances']
 
         self.assertEqual(1, len(share_instances),
                          'Too many share instances found; expected 1, '
@@ -58,7 +58,7 @@
         """Test that we list the share instance back."""
         share_instances = self.shares_v2_client.list_share_instances(
             version='2.3'
-        )
+        )['share_instances']
 
         share_ids = [si['share_id'] for si in share_instances]
 
@@ -74,10 +74,10 @@
 
         share_instances = self.shares_v2_client.get_instances_of_share(
             self.share['id'], version=version,
-        )
+        )['share_instances']
 
         si = self.shares_v2_client.get_share_instance(
-            share_instances[0]['id'], version=version)
+            share_instances[0]['id'], version=version)['share_instance']
 
         expected_keys = [
             'host', 'share_id', 'id', 'share_network_id', 'status',
@@ -110,17 +110,17 @@
             self, export_location_type):
         share_instances_except = (
             self.shares_v2_client.get_instances_of_share(
-                self.share['id']))
+                self.share['id']))['share_instances']
         export_locations = (
             self.shares_v2_client.list_share_instance_export_locations(
-                share_instances_except[0]['id']))
+                share_instances_except[0]['id']))['export_locations']
 
         filters = {
             'export_location_' + export_location_type:
                 export_locations[0][export_location_type],
         }
         share_instances = self.shares_v2_client.list_share_instances(
-            params=filters)
+            params=filters)['share_instances']
 
         self.assertEqual(1, len(share_instances))
         self.assertEqual(share_instances_except[0]['id'],
diff --git a/manila_tempest_tests/tests/api/admin/test_share_instances_negative.py b/manila_tempest_tests/tests/api/admin/test_share_instances_negative.py
index 24e9858..cc8d956 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_instances_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_instances_negative.py
@@ -43,7 +43,7 @@
             'export_location_' + export_location_type: 'fake',
         }
         share_instances = self.shares_v2_client.list_share_instances(
-            params=filters, version="2.34")
+            params=filters, version="2.34")['share_instances']
 
         self.assertGreater(len(share_instances), 0)
 
@@ -57,6 +57,6 @@
             'export_location_' + export_location_type: 'fake_not_exist',
         }
         share_instances = self.shares_v2_client.list_share_instances(
-            params=filters)
+            params=filters)['share_instances']
 
         self.assertEqual(0, len(share_instances))
diff --git a/manila_tempest_tests/tests/api/admin/test_share_manage.py b/manila_tempest_tests/tests/api/admin/test_share_manage.py
index 85f0f7a..2069ea0 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_manage.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_manage.py
@@ -79,7 +79,8 @@
             # After 'unmanage' operation, share instance should be deleted.
             # Assert not related to 'manage' test, but placed here for
             # resource optimization.
-            share_instance_list = self.shares_v2_client.list_share_instances()
+            share_instance_list = self.shares_v2_client.list_share_instances(
+                )['share_instances']
             share_ids = [si['share_id'] for si in share_instance_list]
             self.assertNotIn(share['id'], share_ids)
 
@@ -100,7 +101,8 @@
         }
         if CONF.share.multitenancy_enabled:
             manage_params['share_server_id'] = share['share_server_id']
-        managed_share = self.shares_v2_client.manage_share(**manage_params)
+        managed_share = self.shares_v2_client.manage_share(
+            **manage_params)['share']
 
         # Add managed share to cleanup queue
         self.method_resources.insert(
diff --git a/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py b/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py
index 39b9557..1624c63 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_manage_negative.py
@@ -66,7 +66,7 @@
                                state=constants.STATUS_AVAILABLE):
         # Manage the share and wait for the expected state.
         # Return the managed share object.
-        managed_share = self.shares_v2_client.manage_share(**params)
+        managed_share = self.shares_v2_client.manage_share(**params)['share']
         waiters.wait_for_resource_status(
             self.shares_v2_client, managed_share['id'], state)
 
@@ -82,7 +82,8 @@
             valid_params['share_server_id'] = share['share_server_id']
 
         if utils.is_microversion_ge(CONF.share.max_api_microversion, "2.9"):
-            el = self.shares_v2_client.list_share_export_locations(share["id"])
+            el = self.shares_v2_client.list_share_export_locations(
+                share["id"])['export_locations']
             valid_params['export_path'] = el[0]['path']
 
         if invalid_params:
@@ -168,7 +169,7 @@
             # and leave it in manage_error state
             invalid_share = self.shares_v2_client.manage_share(
                 **invalid_params
-            )
+            )['share']
             waiters.wait_for_resource_status(
                 self.shares_v2_client, invalid_share['id'],
                 constants.STATUS_MANAGE_ERROR)
@@ -200,7 +201,8 @@
         managed_share = self._manage_share_and_wait(manage_params)
 
         # update managed share's reference
-        managed_share = self.shares_v2_client.get_share(managed_share['id'])
+        managed_share = self.shares_v2_client.get_share(
+            managed_share['id'])['share']
         manage_params = self._get_manage_params_from_share(managed_share)
 
         # the second attempt to manage the same share should fail
@@ -262,7 +264,8 @@
         invalid_params.update(
             {'export_path': data_utils.rand_name(name='invalid-share-export')}
         )
-        invalid_share = self.shares_v2_client.manage_share(**invalid_params)
+        invalid_share = self.shares_v2_client.manage_share(
+            **invalid_params)['share']
 
         waiters.wait_for_resource_status(
             self.shares_v2_client, invalid_share['id'],
@@ -299,7 +302,7 @@
         share = self._create_share_for_manage()
 
         snap = self.create_snapshot_wait_for_active(share["id"])
-        snap = self.shares_v2_client.get_snapshot(snap['id'])
+        snap = self.shares_v2_client.get_snapshot(snap['id'])['snapshot']
 
         self.assertRaises(
             lib_exc.Forbidden,
diff --git a/manila_tempest_tests/tests/api/admin/test_share_networks.py b/manila_tempest_tests/tests/api/admin/test_share_networks.py
index 4bb71a2..82d8a8a 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_networks.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_networks.py
@@ -65,13 +65,13 @@
 
         cls.ss_kerberos = cls.alt_shares_v2_client.create_security_service(
             ss_type='kerberos',
-            **cls.data_sn_with_ldap_ss)
+            **cls.data_sn_with_ldap_ss)['security_service']
 
         cls.sn_with_kerberos_ss = (
             cls.alt_shares_v2_client.create_share_network(
                 cleanup_in_class=True,
                 add_security_services=False,
-                **cls.data_sn_with_kerberos_ss)
+                **cls.data_sn_with_kerberos_ss)['share_network']
         )
 
         cls.alt_shares_v2_client.add_sec_service_to_share_network(
@@ -82,7 +82,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_list_share_networks_all_tenants(self):
         listed = self.admin_shares_v2_client.list_share_networks_with_detail(
-            {'all_tenants': 1})
+            {'all_tenants': 1})['share_networks']
         self.assertTrue(any(self.sn_with_ldap_ss['id'] == sn['id']
                             for sn in listed))
         self.assertTrue(any(self.sn_with_kerberos_ss['id'] == sn['id']
@@ -92,7 +92,9 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_list_share_networks_filter_by_project_id(self):
         listed = self.admin_shares_v2_client.list_share_networks_with_detail(
-            {'project_id': self.sn_with_kerberos_ss['project_id']})
+            {
+                'project_id': self.sn_with_kerberos_ss['project_id']
+            })['share_networks']
         self.assertTrue(any(self.sn_with_kerberos_ss['id'] == sn['id']
                             for sn in listed))
         self.assertTrue(all(self.sn_with_kerberos_ss['project_id'] ==
diff --git a/manila_tempest_tests/tests/api/admin/test_share_servers.py b/manila_tempest_tests/tests/api/admin/test_share_servers.py
index 18ece03..fd553ff 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_servers.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_servers.py
@@ -51,7 +51,7 @@
         cls.share = cls.create_share(
             share_type_id=cls.share_type_id)
         cls.share_network = cls.shares_v2_client.get_share_network(
-            cls.shares_v2_client.share_network_id)
+            cls.shares_v2_client.share_network_id)['share_network']
 
         if not cls.share_network["name"]:
             sn_id = cls.share_network["id"]
@@ -74,7 +74,7 @@
     @decorators.idempotent_id('3f821248-2c05-4323-a95f-a0216a537b0a')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_list_share_servers_without_filters(self):
-        servers = self.shares_v2_client.list_share_servers()
+        servers = self.shares_v2_client.list_share_servers()['share_servers']
         self.assertGreater(len(servers), 0)
         keys = [
             "id",
@@ -106,7 +106,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_list_share_servers_with_host_filter(self):
         # Get list of share servers and remember 'host' name
-        servers = self.shares_v2_client.list_share_servers()
+        servers = self.shares_v2_client.list_share_servers()['share_servers']
         # Remember name of server that was used by this test suite
         # to be sure it will be still existing.
         for server in servers:
@@ -123,7 +123,8 @@
                                                         six.text_type(servers))
             raise lib_exc.NotFound(message=msg)
         search_opts = {"host": host}
-        servers = self.shares_v2_client.list_share_servers(search_opts)
+        servers = self.shares_v2_client.list_share_servers(
+            search_opts)['share_servers']
         self.assertGreater(len(servers), 0)
         for server in servers:
             self.assertEqual(server["host"], host)
@@ -132,7 +133,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_list_share_servers_with_status_filter(self):
         search_opts = {"status": "active"}
-        servers = self.shares_v2_client.list_share_servers(search_opts)
+        servers = self.shares_v2_client.list_share_servers(
+            search_opts)['share_servers']
 
         # At least 1 share server should exist always - the one created
         # for this class.
@@ -144,7 +146,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_list_share_servers_with_project_id_filter(self):
         search_opts = {"project_id": self.share_network["project_id"]}
-        servers = self.shares_v2_client.list_share_servers(search_opts)
+        servers = self.shares_v2_client.list_share_servers(
+            search_opts)['share_servers']
         # Should exist, at least, one share server, used by this test suite.
         self.assertGreater(len(servers), 0)
         for server in servers:
@@ -155,7 +158,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_list_share_servers_with_share_network_name_filter(self):
         search_opts = {"share_network": self.share_network["name"]}
-        servers = self.shares_v2_client.list_share_servers(search_opts)
+        servers = self.shares_v2_client.list_share_servers(
+            search_opts)['share_servers']
         # Should exist, at least, one share server, used by this test suite.
         self.assertGreater(len(servers), 0)
         for server in servers:
@@ -166,7 +170,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_list_share_servers_with_share_network_id_filter(self):
         search_opts = {"share_network": self.share_network["id"]}
-        servers = self.shares_v2_client.list_share_servers(search_opts)
+        servers = self.shares_v2_client.list_share_servers(
+            search_opts)['share_servers']
         # Should exist, at least, one share server, used by this test suite.
         self.assertGreater(len(servers), 0)
         for server in servers:
@@ -176,9 +181,9 @@
     @decorators.idempotent_id('e1af24f4-bf63-467d-a857-3a402fa9b65b')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_show_share_server(self):
-        share = self.shares_v2_client.get_share(self.share["id"])
+        share = self.shares_v2_client.get_share(self.share["id"])['share']
         server = self.shares_v2_client.show_share_server(
-            share["share_server_id"])
+            share["share_server_id"])['share_server']
         keys = [
             "id",
             "host",
@@ -215,9 +220,9 @@
     @decorators.idempotent_id('782d8f5f-2c02-44dd-8d43-e06b651a71be')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_show_share_server_details(self):
-        share = self.shares_v2_client.get_share(self.share['id'])
+        share = self.shares_v2_client.get_share(self.share['id'])['share']
         details = self.shares_v2_client.show_share_server_details(
-            share['share_server_id'])
+            share['share_server_id'])['details']
 
         # If details are present they and their values should be only strings
         for k, v in details.items():
@@ -246,7 +251,7 @@
 
         # List share servers, filtered by share_network_id
         servers = self.shares_v2_client.list_share_servers(
-            {"share_network": new_sn["id"]})
+            {"share_network": new_sn["id"]})['share_servers']
 
         # There can be more than one share server for share network when retry
         # was used and share was created successfully not from first time.
@@ -258,7 +263,7 @@
 
             # List shares by share server id
             shares = self.shares_v2_client.list_shares_with_detail(
-                {"share_server_id": serv["id"]})
+                {"share_server_id": serv["id"]})['shares']
             for s in shares:
                 self.assertEqual(new_sn["id"], s["share_network_id"])
 
@@ -273,7 +278,7 @@
 
             # List shares by share server id, we expect empty list
             empty = self.shares_v2_client.list_shares_with_detail(
-                {"share_server_id": serv["id"]})
+                {"share_server_id": serv["id"]})['shares']
             self.assertEqual(0, len(empty))
 
             if delete_share_network:
@@ -308,12 +313,12 @@
             share_type_id=self.share_type_id,
             share_network_id=new_sn['id']
         )
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         # obtain share server
         share_server = self.shares_v2_client.show_share_server(
             share['share_server_id']
-        )
+        )['share_server']
 
         for state in (constants.SERVER_STATE_ACTIVE,
                       constants.SERVER_STATE_CREATING,
diff --git a/manila_tempest_tests/tests/api/admin/test_share_servers_manage.py b/manila_tempest_tests/tests/api/admin/test_share_servers_manage.py
index 2ff1b11..126dee1 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_servers_manage.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_servers_manage.py
@@ -70,7 +70,7 @@
         # will be created
         original_share_network = self.shares_v2_client.get_share_network(
             self.shares_v2_client.share_network_id
-        )
+        )['share_network']
         share_net_info = (
             utils.share_network_get_default_subnet(original_share_network)
             if utils.share_network_subnets_are_supported()
@@ -90,7 +90,7 @@
                 neutron_net_id=share_network['neutron_net_id'],
                 neutron_subnet_id=share_network['neutron_subnet_id'],
                 availability_zone=az
-            )
+            )['share_network_subnet']
             params = {'share_network_subnet_id': az_subnet['id']}
 
         # create share
@@ -98,12 +98,13 @@
             share_type_id=self.share_type['id'],
             share_network_id=share_network['id'], availability_zone=az
         )
-        share = self.shares_v2_client.get_share(share['id'])
-        el = self.shares_v2_client.list_share_export_locations(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
+        el = self.shares_v2_client.list_share_export_locations(
+            share['id'])['export_locations']
         share['export_locations'] = el
         share_server = self.shares_v2_client.show_share_server(
             share['share_server_id']
-        )
+        )['share_server']
 
         keys = [
             "id",
@@ -136,7 +137,7 @@
         # an unmanaged share will never be auto-deleted.
         share_server = self.shares_v2_client.show_share_server(
             share_server['id']
-        )
+        )['share_server']
         self.assertIs(False, share_server['is_auto_deletable'])
 
         # unmanage share server and manage it again
@@ -153,7 +154,7 @@
         # check managed share server
         managed_share_server = self.shares_v2_client.show_share_server(
             managed_share_server['id']
-        )
+        )['share_server']
 
         # all expected keys are present in the managed share server
         for key in keys:
diff --git a/manila_tempest_tests/tests/api/admin/test_share_servers_manage_negative.py b/manila_tempest_tests/tests/api/admin/test_share_servers_manage_negative.py
index 104f765..1e9073d 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_servers_manage_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_servers_manage_negative.py
@@ -59,7 +59,7 @@
             cleanup_in_class=True,
             extra_specs=cls.extra_specs)
         cls.original_share_network = cls.shares_v2_client.get_share_network(
-            cls.shares_v2_client.share_network_id)
+            cls.shares_v2_client.share_network_id)['share_network']
         cls.share_net_info = (
             utils.share_network_get_default_subnet(cls.original_share_network)
             if utils.share_network_subnets_are_supported() else
@@ -75,7 +75,7 @@
             share_type_id=self.share_type['id'],
             share_network_id=share_network['id']
         )
-        return self.shares_v2_client.get_share(share['id'])
+        return self.shares_v2_client.get_share(share['id'])['share']
 
     @ddt.data(
         ('host', 'invalid_host'),
@@ -98,11 +98,12 @@
 
         # create share
         share = self._create_share_with_new_share_network()
-        el = self.shares_v2_client.list_share_export_locations(share['id'])
+        el = self.shares_v2_client.list_share_export_locations(
+            share['id'])['export_locations']
         share['export_locations'] = el
         share_server = self.shares_v2_client.show_share_server(
             share['share_server_id']
-        )
+        )['share_server']
 
         self._unmanage_share_and_wait(share)
         self._unmanage_share_server_and_wait(share_server)
@@ -225,7 +226,7 @@
         # create share
         share = self.create_share(
             share_type_id=self.share_type['id'])
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         # try to change it to wrong state
         self.assertRaises(
@@ -245,7 +246,7 @@
         # create share
         share = self.create_share(
             share_type_id=self.share_type['id'])
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         # try to unmanage
         self.assertRaises(
@@ -265,11 +266,12 @@
     def test_manage_share_server_invalid_identifier(self):
         # create share
         share = self._create_share_with_new_share_network()
-        el = self.shares_v2_client.list_share_export_locations(share['id'])
+        el = self.shares_v2_client.list_share_export_locations(
+            share['id'])['export_locations']
         share['export_locations'] = el
         share_server = self.shares_v2_client.show_share_server(
             share['share_server_id']
-        )
+        )['share_server']
 
         self._unmanage_share_and_wait(share)
         self._unmanage_share_server_and_wait(share_server)
@@ -286,14 +288,15 @@
 
         # unmanage the share server in manage_error
         search_opts = {'identifier': 'invalid_id'}
-        invalid_servers = self.shares_v2_client.list_share_servers(search_opts)
+        invalid_servers = self.shares_v2_client.list_share_servers(
+            search_opts)['share_servers']
         self._unmanage_share_server_and_wait(invalid_servers[0])
 
         # manage in the correct way
         managed_share_server = self._manage_share_server(share_server)
         managed_share_server = self.shares_v2_client.show_share_server(
             managed_share_server['id']
-        )
+        )['share_server']
         managed_share = self._manage_share(
             share,
             name="managed share that had ID %s" % share['id'],
@@ -314,10 +317,10 @@
         # create share
         share = self.create_share(
             share_type_id=self.share_type['id'])
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         share_server = self.shares_v2_client.show_share_server(
-            share['share_server_id'])
+            share['share_server_id'])['share_server']
 
         # try with more data around the identifier
         invalid_params = share_server.copy()
diff --git a/manila_tempest_tests/tests/api/admin/test_share_servers_migration.py b/manila_tempest_tests/tests/api/admin/test_share_servers_migration.py
index 7387e55..81b447f 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_servers_migration.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_servers_migration.py
@@ -69,7 +69,7 @@
     def _setup_migration(self, share):
         """Initial share server migration setup."""
 
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         server_id = share['share_server_id']
 
         # (andrer) Verify if have at least one backend compatible with
@@ -85,7 +85,7 @@
 
         # (andrer) Check the share export locations.
         old_exports = self.shares_v2_client.list_share_export_locations(
-            share['id'])
+            share['id'])['export_locations']
         self.assertNotEmpty(old_exports)
         old_exports = [x['path'] for x in old_exports
                        if x['is_admin_only'] is False]
@@ -104,7 +104,7 @@
             self.shares_v2_client, share['id'], constants.RULE_STATE_ACTIVE,
             status_attr='access_rules_status')
 
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         return share, server_id, dest_host, snapshot
 
@@ -115,11 +115,12 @@
                     if not isinstance(expected_status, (tuple, list, set))
                     else expected_status)
 
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         self.assertIn(share['status'], statuses)
 
         if snapshot_id:
-            snapshot = self.shares_v2_client.get_snapshot(snapshot_id)
+            snapshot = self.shares_v2_client.get_snapshot(
+                snapshot_id)['snapshot']
             self.assertIn(snapshot['status'], statuses)
 
     def _validate_share_server_migration_complete(
@@ -129,14 +130,14 @@
 
         # Check the export locations
         new_exports = self.shares_v2_client.list_share_export_locations(
-            share['id'], version=version)
+            share['id'], version=version)['export_locations']
         self.assertNotEmpty(new_exports)
         new_exports = [x['path'] for x in new_exports if
                        x['is_admin_only'] is False]
         self.assertNotEmpty(new_exports)
 
         # Check the share host, share_network, share_server and status.
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         self.assertEqual(share['host'].split('#')[0], dest_host)
         self.assertEqual(share_network_id, share['share_network_id'])
         self.assertEqual(dest_server_id, share['share_server_id'])
@@ -150,12 +151,14 @@
             )
 
         # Check the share server destination status.
-        dest_server = self.shares_v2_client.show_share_server(dest_server_id)
+        dest_server = self.shares_v2_client.show_share_server(
+            dest_server_id)['share_server']
         self.assertIn(dest_server['task_state'],
                       constants.TASK_STATE_MIGRATION_SUCCESS)
 
         # Check if the access rules are in the share.
-        rules = self.shares_v2_client.list_access_rules(share['id'])
+        rules = self.shares_v2_client.list_access_rules(
+            share['id'])['access_list']
         if self.protocol == 'cifs':
             expected_rules = [{
                 'state': constants.RULE_STATE_ACTIVE,
@@ -227,7 +230,7 @@
         params = {'source_share_server_id': src_server_id,
                   'status': constants.STATUS_SERVER_MIGRATING_TO}
         dest_server = self.admin_shares_v2_client.list_share_servers(
-            search_opts=params)
+            search_opts=params)['share_servers']
         dest_server_id = dest_server[0]['id'] if dest_server else None
 
         return dest_server_id
@@ -269,7 +272,7 @@
                                   share_type_id=self.share_type['id'],
                                   share_network_id=share_network_id,
                                   cleanup_in_class=False)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         # Initial migration setup.
         share, src_server_id, dest_host, snapshot_id = self._setup_migration(
@@ -292,7 +295,8 @@
         dest_server_id = self._get_share_server_destination_for_migration(
             src_server_id)
 
-        dest_server = self.shares_v2_client.show_share_server(dest_server_id)
+        dest_server = self.shares_v2_client.show_share_server(
+            dest_server_id)['share_server']
         self.assertEqual(dest_host, dest_server['host'])
         self.assertEqual(share_network_id, dest_server['share_network_id'])
 
@@ -324,7 +328,7 @@
         dest_share_network_id = share_network_id
         if new_share_network:
             src_share_network = self.shares_v2_client.get_share_network(
-                share_network_id)
+                share_network_id)['share_network']
             share_net_info = (
                 utils.share_network_get_default_subnet(src_share_network))
             dest_share_network_id = self.create_share_network(
@@ -336,7 +340,7 @@
                                   share_type_id=self.share_type['id'],
                                   share_network_id=share_network_id,
                                   cleanup_in_class=False)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         # Initial migration setup.
         share, src_server_id, dest_host, snapshot_id = self._setup_migration(
@@ -360,7 +364,8 @@
         dest_server_id = self._get_share_server_destination_for_migration(
             src_server_id)
 
-        dest_server = self.shares_v2_client.show_share_server(dest_server_id)
+        dest_server = self.shares_v2_client.show_share_server(
+            dest_server_id)['share_server']
         self.assertEqual(dest_host, dest_server['host'])
         self.assertEqual(dest_share_network_id,
                          dest_server['share_network_id'])
@@ -380,7 +385,8 @@
 
         # Check if the source server went to inactive status if it exists.
         try:
-            src_server = self.shares_v2_client.show_share_server(src_server_id)
+            src_server = self.shares_v2_client.show_share_server(
+                src_server_id)['share_server']
         except exceptions.NotFound:
             src_server = None
 
@@ -389,7 +395,7 @@
                 src_server['status'], constants.SERVER_STATE_INACTIVE)
 
         # Validate the share server migration complete.
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         self._validate_share_server_migration_complete(
             share, dest_host, dest_server_id, snapshot_id=snapshot_id,
             share_network_id=dest_share_network_id)
@@ -402,7 +408,7 @@
         share = self.create_share(share_protocol=self.protocol,
                                   share_type_id=self.share_type['id'],
                                   cleanup_in_class=False)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         # Find a backend compatible or not for the share server
         # check compatibility operation.
         if compatible:
diff --git a/manila_tempest_tests/tests/api/admin/test_share_servers_migration_negative.py b/manila_tempest_tests/tests/api/admin/test_share_servers_migration_negative.py
index 3fb3942..c850f66 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_servers_migration_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_servers_migration_negative.py
@@ -46,7 +46,7 @@
         share = cls.create_share(share_protocol=cls.protocol,
                                  share_type_id=share_type['id'],
                                  cleanup_in_class=cleanup_in_class)
-        share = cls.shares_v2_client.get_share(share['id'])
+        share = cls.shares_v2_client.get_share(share['id'])['share']
         share_server_id = share['share_server_id']
         dest_host, compatible = (
             cls._choose_compatible_backend_for_share_server(share_server_id))
@@ -115,7 +115,7 @@
         share = self.create_share(
             share_protocol=self.protocol,
             share_type_id=self.share_type['id'])
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         share_server_id = share['share_server_id']
         self.assertRaises(lib_exc.NotFound,
                           self.shares_v2_client.share_server_migration_start,
@@ -129,7 +129,7 @@
         share = self.create_share(
             share_protocol=self.protocol,
             share_type_id=self.share_type['id'])
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         share_server_id = share['share_server_id']
         self.assertRaises(lib_exc.NotFound,
                           self.shares_v2_client.share_server_migration_check,
@@ -143,7 +143,7 @@
         share = self.create_share(
             share_protocol=self.protocol,
             share_type_id=self.share_type['id'])
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         share_server_id = share['share_server_id']
         dest_host, _ = self._choose_compatible_backend_for_share_server(
             share_server_id)
@@ -160,7 +160,7 @@
         share = self.create_share(
             share_protocol=self.protocol,
             share_type_id=self.share_type['id'])
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         share_server_id = share['share_server_id']
         dest_host, _ = self._choose_compatible_backend_for_share_server(
             share_server_id)
@@ -180,7 +180,7 @@
         cls.share = cls.create_share(
             share_protocol=cls.protocol,
             share_type_id=cls.share_type['id'])
-        cls.share = cls.shares_v2_client.get_share(cls.share['id'])
+        cls.share = cls.shares_v2_client.get_share(cls.share['id'])['share']
         cls.share_server_id = cls.share['share_server_id']
         cls.dest_host, _ = cls._choose_compatible_backend_for_share_server(
             cls.share_server_id)
@@ -361,7 +361,7 @@
         share = self.create_share(share_type_id=share_type['share_type']['id'],
                                   share_protocol=self.protocol,
                                   cleanup_in_class=False)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         share_server_id = share['share_server_id']
         dest_host, _ = self._choose_compatible_backend_for_share_server(
             share_server_id)
diff --git a/manila_tempest_tests/tests/api/admin/test_share_servers_negative.py b/manila_tempest_tests/tests/api/admin/test_share_servers_negative.py
index 8f2110d..b0e0a39 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_servers_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_servers_negative.py
@@ -67,35 +67,40 @@
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_list_share_servers_with_wrong_filter_key(self):
         search_opts = {'fake_filter_key': 'ACTIVE'}
-        servers = self.admin_client.list_share_servers(search_opts)
+        servers = self.admin_client.list_share_servers(
+            search_opts)['share_servers']
         self.assertEqual(0, len(servers))
 
     @decorators.idempotent_id('dcf169c9-1238-40cb-8a5c-ca6aca9d4d6b')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_list_share_servers_with_wrong_filter_value(self):
         search_opts = {'host': 123}
-        servers = self.admin_client.list_share_servers(search_opts)
+        servers = self.admin_client.list_share_servers(
+            search_opts)['share_servers']
         self.assertEqual(0, len(servers))
 
     @decorators.idempotent_id('3e5d6007-5214-4fa2-bd33-dfd3bead67bf')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_list_share_servers_with_fake_status(self):
         search_opts = {"status": data_utils.rand_name("fake_status")}
-        servers = self.admin_client.list_share_servers(search_opts)
+        servers = self.admin_client.list_share_servers(
+            search_opts)['share_servers']
         self.assertEqual(0, len(servers))
 
     @decorators.idempotent_id('e893b32a-124f-4e5c-a425-58c8a4eac4a5')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_list_share_servers_with_fake_host(self):
         search_opts = {"host": data_utils.rand_name("fake_host")}
-        servers = self.admin_client.list_share_servers(search_opts)
+        servers = self.admin_client.list_share_servers(
+            search_opts)['share_servers']
         self.assertEqual(0, len(servers))
 
     @decorators.idempotent_id('2f1162a8-bb52-4e2a-abc0-68d16f769e4f')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     def test_list_share_servers_with_fake_project(self):
         search_opts = {"project_id": data_utils.rand_name("fake_project_id")}
-        servers = self.admin_client.list_share_servers(search_opts)
+        servers = self.admin_client.list_share_servers(
+            search_opts)['share_servers']
         self.assertEqual(0, len(servers))
 
     @decorators.idempotent_id('ca23f385-56b2-4c02-9797-d88c3b7fb981')
@@ -104,7 +109,8 @@
         search_opts = {
             "share_network": data_utils.rand_name("fake_share_network"),
         }
-        servers = self.admin_client.list_share_servers(search_opts)
+        servers = self.admin_client.list_share_servers(
+            search_opts)['share_servers']
         self.assertEqual(0, len(servers))
 
     @decorators.idempotent_id('0acb9107-18b2-4e9d-8432-37fd0d4c79b3')
diff --git a/manila_tempest_tests/tests/api/admin/test_share_snapshot_instances.py b/manila_tempest_tests/tests/api/admin/test_share_snapshot_instances.py
index d3ef354..94e769c 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_snapshot_instances.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_snapshot_instances.py
@@ -46,7 +46,8 @@
         # create share
         cls.share = cls.create_share(share_type_id=cls.share_type_id)
         snap = cls.create_snapshot_wait_for_active(cls.share["id"])
-        cls.snapshot = cls.shares_v2_client.get_snapshot(snap['id'])
+        cls.snapshot = cls.shares_v2_client.get_snapshot(
+            snap['id'])['snapshot']
 
     @ddt.data(True, False)
     @decorators.idempotent_id('bcb29129-9713-4481-8e74-97682c62f218')
@@ -54,7 +55,8 @@
     def test_list_snapshot_instances_by_snapshot(self, detail):
         """Test that we get only the 1 snapshot instance from snapshot."""
         snapshot_instances = self.shares_v2_client.list_snapshot_instances(
-            detail=detail, snapshot_id=self.snapshot['id'])
+            detail=detail,
+            snapshot_id=self.snapshot['id'])['snapshot_instances']
 
         expected_keys = ['id', 'snapshot_id', 'status']
 
@@ -86,7 +88,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_list_snapshot_instances(self):
         """Test that we get at least the snapshot instance."""
-        snapshot_instances = self.shares_v2_client.list_snapshot_instances()
+        snapshot_instances = self.shares_v2_client.list_snapshot_instances(
+            )['snapshot_instances']
 
         snapshot_ids = [si['snapshot_id'] for si in snapshot_instances]
 
@@ -98,9 +101,9 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_get_snapshot_instance(self):
         instances = self.shares_v2_client.list_snapshot_instances(
-            snapshot_id=self.snapshot['id'])
+            snapshot_id=self.snapshot['id'])['snapshot_instances']
         instance_detail = self.shares_v2_client.get_snapshot_instance(
-            instance_id=instances[0]['id'])
+            instance_id=instances[0]['id'])['snapshot_instance']
 
         expected_keys = (
             'id', 'created_at', 'updated_at', 'progress', 'provider_location',
@@ -123,7 +126,7 @@
         snapshot = self.create_snapshot_wait_for_active(self.share["id"])
 
         snapshot_instances = self.shares_v2_client.list_snapshot_instances(
-            snapshot_id=snapshot['id'])
+            snapshot_id=snapshot['id'])['snapshot_instances']
 
         sii = snapshot_instances[0]['id']
 
diff --git a/manila_tempest_tests/tests/api/admin/test_share_snapshot_instances_negative.py b/manila_tempest_tests/tests/api/admin/test_share_snapshot_instances_negative.py
index 1971423..0e9bc3a 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_snapshot_instances_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_snapshot_instances_negative.py
@@ -61,7 +61,7 @@
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
     def test_get_snapshot_instance_by_non_admin(self):
         instances = self.admin_client.list_snapshot_instances(
-            snapshot_id=self.snapshot['id'])
+            snapshot_id=self.snapshot['id'])['snapshot_instances']
         self.assertRaises(
             lib_exc.Forbidden,
             self.member_client.get_snapshot_instance,
@@ -71,7 +71,7 @@
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
     def test_reset_snapshot_instance_status_by_non_admin(self):
         instances = self.admin_client.list_snapshot_instances(
-            snapshot_id=self.snapshot['id'])
+            snapshot_id=self.snapshot['id'])['snapshot_instances']
         self.assertRaises(
             lib_exc.Forbidden,
             self.member_client.reset_snapshot_instance_status,
diff --git a/manila_tempest_tests/tests/api/admin/test_share_types.py b/manila_tempest_tests/tests/api/admin/test_share_types.py
index aff8e30..3d46c9e 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_types.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_types.py
@@ -246,12 +246,14 @@
             self.shares_client, share["id"], "available")
 
         # Verify share info
-        get = self.shares_v2_client.get_share(share["id"], version="2.5")
+        get = self.shares_v2_client.get_share(
+            share["id"], version="2.5")['share']
         self.assertEqual(share_name, get["name"])
         self.assertEqual(share["id"], get["id"])
         self.assertEqual(shr_type_name, get["share_type"])
 
-        get = self.shares_v2_client.get_share(share["id"], version="2.6")
+        get = self.shares_v2_client.get_share(
+            share["id"], version="2.6")['share']
         self.assertEqual(st_create["id"], get["share_type"])
         self.assertEqual(shr_type_name, get["share_type_name"])
 
@@ -274,7 +276,8 @@
         self.assertFalse(any(st_id in st["id"] for st in sts))
 
         # List projects that have access for share type - none expected
-        access = self.shares_v2_client.list_access_to_share_type(st_id)
+        access = self.shares_v2_client.list_access_to_share_type(
+            st_id)['share_type_access']
         self.assertEmpty(access)
 
         # Add project access to share type
@@ -287,7 +290,8 @@
         self.assertTrue(any(st_id in st["id"] for st in sts))
 
         # List projects that have access for share type - one expected
-        access = self.shares_v2_client.list_access_to_share_type(st_id)
+        access = self.shares_v2_client.list_access_to_share_type(
+            st_id)['share_type_access']
         expected = [{'share_type_id': st_id, 'project_id': project_id}, ]
         self.assertEqual(expected, access)
 
@@ -301,7 +305,8 @@
         self.assertFalse(any(st_id in st["id"] for st in sts))
 
         # List projects that have access for share type - none expected
-        access = self.shares_v2_client.list_access_to_share_type(st_id)
+        access = self.shares_v2_client.list_access_to_share_type(
+            st_id)['share_type_access']
         self.assertEmpty(access)
 
     @decorators.idempotent_id('90dca5c5-f28e-4f16-90ed-78f5d725664e')
diff --git a/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py b/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py
index ff6232e..f0ccc90 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_types_extra_specs.py
@@ -59,7 +59,8 @@
     @decorators.idempotent_id('508ceb85-5456-4db9-b33f-00620d7baea1')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_get_all_share_type_extra_specs(self):
-        es_get_all = self.shares_client.get_share_type_extra_specs(self.st_id)
+        es_get_all = self.shares_client.get_share_type_extra_specs(
+            self.st_id)['extra_specs']
 
         self.assertEqual(self.expected_extra_specs, es_get_all)
 
@@ -93,7 +94,8 @@
             self.st_id, "key1", self.custom_extra_specs["key1"])
         self.assertEqual({"key1": self.custom_extra_specs["key1"]}, update_one)
 
-        get = self.shares_client.get_share_type_extra_specs(self.st_id)
+        get = self.shares_client.get_share_type_extra_specs(
+            self.st_id)['extra_specs']
         expected_extra_specs = self.custom_extra_specs
         expected_extra_specs.update(self.required_extra_specs)
         self.assertEqual(self.custom_extra_specs, get)
@@ -105,10 +107,11 @@
 
         # Update extra specs of share type
         update_all = self.shares_client.update_share_type_extra_specs(
-            self.st_id, self.custom_extra_specs)
+            self.st_id, self.custom_extra_specs)['extra_specs']
         self.assertEqual(self.custom_extra_specs, update_all)
 
-        get = self.shares_client.get_share_type_extra_specs(self.st_id)
+        get = self.shares_client.get_share_type_extra_specs(
+            self.st_id)['extra_specs']
         expected_extra_specs = self.custom_extra_specs
         expected_extra_specs.update(self.required_extra_specs)
         self.assertEqual(self.custom_extra_specs, get)
@@ -120,7 +123,8 @@
         self.shares_client.delete_share_type_extra_spec(self.st_id, "key1")
 
         # Get metadata
-        get = self.shares_client.get_share_type_extra_specs(self.st_id)
+        get = self.shares_client.get_share_type_extra_specs(
+            self.st_id)['extra_specs']
 
         self.assertNotIn('key1', get)
 
@@ -137,7 +141,7 @@
 
         # Get extra specs
         share_type_extra_specs = self.shares_client.get_share_type_extra_specs(
-            self.st_id)
+            self.st_id)['extra_specs']
 
         self.assertIn('snapshot_support', share_type_extra_specs)
         self.assertEqual('True', share_type_extra_specs['snapshot_support'])
@@ -148,6 +152,6 @@
 
         # Get extra specs
         share_type_extra_specs = self.shares_client.get_share_type_extra_specs(
-            self.st_id)
+            self.st_id)['extra_specs']
 
         self.assertNotIn('snapshot_support', share_type_extra_specs)
diff --git a/manila_tempest_tests/tests/api/admin/test_share_types_negative.py b/manila_tempest_tests/tests/api/admin/test_share_types_negative.py
index cf90cca..89d6396 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_types_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_types_negative.py
@@ -143,7 +143,7 @@
 
         # List projects that have access for share type - none expected
         access = self.admin_shares_v2_client.list_access_to_share_type(
-            share_type['id'])
+            share_type['id'])['share_type_access']
         self.assertEmpty(access)
 
         # Although the share type should not be found on alt project,
@@ -153,6 +153,7 @@
                           share_type_id=share_type['name'])
 
         # The share should not be listed
-        share_list = self.alt_shares_v2_client.list_shares(detailed=True)
+        share_list = self.alt_shares_v2_client.list_shares(
+            detailed=True)['shares']
         self.assertFalse(
             any(share_type['id'] in s['share_type'] for s in share_list))
diff --git a/manila_tempest_tests/tests/api/admin/test_shares_actions.py b/manila_tempest_tests/tests/api/admin/test_shares_actions.py
index 6e4f2f8..29c7e04 100644
--- a/manila_tempest_tests/tests/api/admin/test_shares_actions.py
+++ b/manila_tempest_tests/tests/api/admin/test_shares_actions.py
@@ -91,7 +91,7 @@
     def test_get_share(self):
 
         # get share
-        share = self.shares_client.get_share(self.shares[0]['id'])
+        share = self.shares_client.get_share(self.shares[0]['id'])['share']
 
         # verify keys
         expected_keys = ["status", "description", "links", "availability_zone",
@@ -119,7 +119,7 @@
     def test_list_shares(self):
 
         # list shares
-        shares = self.shares_client.list_shares()
+        shares = self.shares_client.list_shares()['shares']
 
         # verify keys
         keys = ["name", "id", "links"]
@@ -136,7 +136,7 @@
     def test_list_shares_with_detail(self):
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail()
+        shares = self.shares_client.list_shares_with_detail()['shares']
 
         # verify keys
         keys = [
@@ -158,7 +158,8 @@
         filters = {'metadata': self.metadata}
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -179,7 +180,8 @@
         share_type_list = self.shares_client.list_share_types()["share_types"]
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -199,7 +201,8 @@
                     "nonexistent share type '%(st)s'." % {
                         "s_id": share["id"], "st": share["share_type"]}
                 )
-            extra_specs = self.shares_client.get_share_type_extra_specs(st_id)
+            extra_specs = self.shares_client.get_share_type_extra_specs(
+                st_id)['extra_specs']
             self.assertDictContainsSubset(filters["extra_specs"], extra_specs)
 
     @decorators.idempotent_id('76fbe8ba-f1d3-4446-b9b8-55617762a2c7')
@@ -208,7 +211,8 @@
         filters = {'share_type_id': self.share_type_id}
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -236,11 +240,13 @@
     @decorators.idempotent_id('04afc330-78ee-494f-a660-7670c877a440')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_list_shares_with_detail_filter_by_host(self):
-        base_share = self.shares_client.get_share(self.shares[0]['id'])
+        base_share = self.shares_client.get_share(
+            self.shares[0]['id'])['share']
         filters = {'host': base_share['host']}
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -255,7 +261,7 @@
     def test_list_shares_or_with_detail_filter_by_export_location(
             self, export_location_type, enable_detail):
         export_locations = self.shares_v2_client.list_share_export_locations(
-            self.shares[0]['id'])
+            self.shares[0]['id'])['export_locations']
         if not isinstance(export_locations, (list, tuple, set)):
             export_locations = (export_locations, )
 
@@ -266,9 +272,10 @@
         # list shares
         if enable_detail:
             shares = self.shares_v2_client.list_shares_with_detail(
-                params=filters)
+                params=filters)['shares']
         else:
-            shares = self.shares_v2_client.list_shares(params=filters)
+            shares = self.shares_v2_client.list_shares(
+                params=filters)['shares']
 
         # verify response
         self.assertEqual(1, len(shares))
@@ -279,11 +286,13 @@
     @testtools.skipIf(
         not CONF.share.multitenancy_enabled, "Only for multitenancy.")
     def test_list_shares_with_detail_filter_by_share_network_id(self):
-        base_share = self.shares_client.get_share(self.shares[0]['id'])
+        base_share = self.shares_client.get_share(
+            self.shares[0]['id'])['share']
         filters = {'share_network_id': base_share['share_network_id']}
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -300,7 +309,8 @@
         filters = {'snapshot_id': self.snap['id']}
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -314,7 +324,8 @@
         filters = {'sort_key': 'created_at', 'sort_dir': 'asc'}
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -326,7 +337,7 @@
     def test_list_shares_with_detail_filter_by_existed_name(self):
         # list shares by name, at least one share is expected
         params = {"name": self.share_name}
-        shares = self.shares_client.list_shares_with_detail(params)
+        shares = self.shares_client.list_shares_with_detail(params)['shares']
         self.assertEqual(self.share_name, shares[0]["name"])
 
     @decorators.idempotent_id('d0dae9e5-a826-48e4-b7b7-24b08ad5a7cb')
@@ -334,7 +345,7 @@
     def test_list_shares_with_detail_filter_by_fake_name(self):
         # list shares by fake name, no shares are expected
         params = {"name": data_utils.rand_name("fake-nonexistent-name")}
-        shares = self.shares_client.list_shares_with_detail(params)
+        shares = self.shares_client.list_shares_with_detail(params)['shares']
         self.assertEqual(0, len(shares))
 
     @decorators.idempotent_id('8eac9b63-666f-4c52-8c5f-58b1fdf201e2')
@@ -342,7 +353,7 @@
     def test_list_shares_with_detail_filter_by_active_status(self):
         # list shares by active status, at least one share is expected
         params = {"status": "available"}
-        shares = self.shares_client.list_shares_with_detail(params)
+        shares = self.shares_client.list_shares_with_detail(params)['shares']
         self.assertGreater(len(shares), 0)
         for share in shares:
             self.assertEqual(params["status"], share["status"])
@@ -352,7 +363,7 @@
     def test_list_shares_with_detail_filter_by_fake_status(self):
         # list shares by fake status, no shares are expected
         params = {"status": 'fake'}
-        shares = self.shares_client.list_shares_with_detail(params)
+        shares = self.shares_client.list_shares_with_detail(params)['shares']
         self.assertEqual(0, len(shares))
 
     @decorators.idempotent_id('d24a438e-4622-48ac-993e-a30d04746745')
@@ -362,7 +373,7 @@
     def test_get_snapshot(self):
 
         # get snapshot
-        get = self.shares_client.get_snapshot(self.snap["id"])
+        get = self.shares_client.get_snapshot(self.snap["id"])['snapshot']
 
         # verify keys
         expected_keys = ["status", "links", "share_id", "name",
@@ -393,7 +404,7 @@
     def test_list_snapshots(self):
 
         # list share snapshots
-        snaps = self.shares_client.list_snapshots()
+        snaps = self.shares_client.list_snapshots()['snapshots']
 
         # verify keys
         keys = ["id", "name", "links"]
@@ -411,7 +422,7 @@
     def test_list_snapshots_with_detail(self):
 
         # list share snapshots
-        snaps = self.shares_client.list_snapshots_with_detail()
+        snaps = self.shares_client.list_snapshots_with_detail()['snapshots']
 
         # verify keys
         keys = ["status", "links", "share_id", "name",
diff --git a/manila_tempest_tests/tests/api/admin/test_snapshot_export_locations.py b/manila_tempest_tests/tests/api/admin/test_snapshot_export_locations.py
index eccbbf8..fca92c7 100644
--- a/manila_tempest_tests/tests/api/admin/test_snapshot_export_locations.py
+++ b/manila_tempest_tests/tests/api/admin/test_snapshot_export_locations.py
@@ -60,9 +60,10 @@
                                      client=cls.admin_client)
         cls.snapshot = cls.create_snapshot_wait_for_active(
             cls.share['id'], client=cls.admin_client)
-        cls.snapshot = cls.admin_client.get_snapshot(cls.snapshot['id'])
+        cls.snapshot = cls.admin_client.get_snapshot(
+            cls.snapshot['id'])['snapshot']
         cls.snapshot_instances = cls.admin_client.list_snapshot_instances(
-            snapshot_id=cls.snapshot['id'])
+            snapshot_id=cls.snapshot['id'])['snapshot_instances']
 
     def _verify_export_location_structure(
             self, export_locations, role='admin', detail=False):
@@ -105,7 +106,7 @@
     def test_list_snapshot_export_location(self):
         export_locations = (
             self.admin_client.list_snapshot_export_locations(
-                self.snapshot['id']))
+                self.snapshot['id']))['share_snapshot_export_locations']
 
         for el in export_locations:
             self._verify_export_location_structure(el)
@@ -115,11 +116,12 @@
     def test_get_snapshot_export_location(self):
         export_locations = (
             self.admin_client.list_snapshot_export_locations(
-                self.snapshot['id']))
+                self.snapshot['id']))['share_snapshot_export_locations']
 
         for export_location in export_locations:
             el = self.admin_client.get_snapshot_export_location(
-                self.snapshot['id'], export_location['id'])
+                self.snapshot['id'],
+                export_location['id'])['share_snapshot_export_location']
             self._verify_export_location_structure(el, detail=True)
 
     @decorators.idempotent_id('03be6418-5ba3-4919-a798-89d7e5ffb925')
@@ -128,10 +130,14 @@
         for snapshot_instance in self.snapshot_instances:
             export_locations = (
                 self.admin_client.list_snapshot_instance_export_locations(
-                    snapshot_instance['id']))
+                    snapshot_instance['id'])['share_snapshot_export_locations']
+            )
             for el in export_locations:
-                el = self.admin_client.get_snapshot_instance_export_location(
-                    snapshot_instance['id'], el['id'])
+                el = (
+                    self.admin_client.get_snapshot_instance_export_location(
+                        snapshot_instance['id'],
+                        el['id'])['share_snapshot_export_location']
+                )
                 self._verify_export_location_structure(el, detail=True)
 
     @decorators.idempotent_id('cdf444ea-95a3-4f7b-ae48-6b027a6b9529')
@@ -140,12 +146,13 @@
             self):
         snapshot_export_locations = (
             self.admin_client.list_snapshot_export_locations(
-                self.snapshot['id']))
+                self.snapshot['id']))['share_snapshot_export_locations']
         snapshot_instances_export_locations = []
         for snapshot_instance in self.snapshot_instances:
             snapshot_instance_export_locations = (
                 self.admin_client.list_snapshot_instance_export_locations(
-                    snapshot_instance['id']))
+                    snapshot_instance['id'])['share_snapshot_export_locations']
+            )
             snapshot_instances_export_locations.extend(
                 snapshot_instance_export_locations)
 
diff --git a/manila_tempest_tests/tests/api/admin/test_snapshot_export_locations_negative.py b/manila_tempest_tests/tests/api/admin/test_snapshot_export_locations_negative.py
index aa4b1d5..620d0e3 100644
--- a/manila_tempest_tests/tests/api/admin/test_snapshot_export_locations_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_snapshot_export_locations_negative.py
@@ -57,9 +57,10 @@
                                      client=cls.admin_client)
         cls.snapshot = cls.create_snapshot_wait_for_active(
             cls.share['id'], client=cls.admin_client)
-        cls.snapshot = cls.admin_client.get_snapshot(cls.snapshot['id'])
+        cls.snapshot = cls.admin_client.get_snapshot(
+            cls.snapshot['id'])['snapshot']
         cls.snapshot_instances = cls.admin_client.list_snapshot_instances(
-            snapshot_id=cls.snapshot['id'])
+            snapshot_id=cls.snapshot['id'])['snapshot_instances']
 
     @decorators.idempotent_id('53f0f184-7398-4e7a-ac21-fa432570db7f')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
@@ -85,7 +86,7 @@
     def test_get_snapshot_export_location_by_different_project_user(self):
         export_locations = (
             self.admin_client.list_snapshot_export_locations(
-                self.snapshot['id']))
+                self.snapshot['id'])['share_snapshot_export_locations'])
 
         for export_location in export_locations:
             if export_location['is_admin_only']:
@@ -113,7 +114,8 @@
         for snapshot_instance in self.snapshot_instances:
             export_locations = (
                 self.admin_client.list_snapshot_instance_export_locations(
-                    snapshot_instance['id']))
+                    snapshot_instance['id'])['share_snapshot_export_locations']
+            )
             for el in export_locations:
                 self.assertRaises(
                     lib_exc.Forbidden,
diff --git a/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py b/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py
index f273872..7e2f9f1 100644
--- a/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py
+++ b/manila_tempest_tests/tests/api/admin/test_snapshot_manage.py
@@ -71,7 +71,7 @@
                                      share_protocol=cls.protocol)
 
         # Get updated data
-        cls.share = cls.shares_v2_client.get_share(cls.share['id'])
+        cls.share = cls.shares_v2_client.get_share(cls.share['id'])['share']
 
     def _test_manage(self, snapshot, version=CONF.share.max_api_microversion):
         name = ("Name for 'managed' snapshot that had ID %s" %
@@ -92,7 +92,7 @@
             # - size: Hitachi HNAS Driver
             driver_options={'size': snapshot['size']},
             version=version,
-        )
+        )['snapshot']
 
         # Add managed snapshot to cleanup queue
         self.method_resources.insert(
@@ -119,7 +119,8 @@
         self.assertEqual(set(expected_keys), set(actual_keys))
 
         # Verify data of managed snapshot
-        get_snapshot = self.shares_v2_client.get_snapshot(snapshot['id'])
+        get_snapshot = self.shares_v2_client.get_snapshot(
+            snapshot['id'])['snapshot']
         self.assertEqual(name, get_snapshot['name'])
         self.assertEqual(description, get_snapshot['description'])
         self.assertEqual(snapshot['share_id'], get_snapshot['share_id'])
@@ -152,7 +153,8 @@
         # Create snapshot
         snapshot = self.create_snapshot_wait_for_active(
             self.share['id'], snap_name, snap_desc)
-        snapshot = self.shares_v2_client.get_snapshot(snapshot['id'])
+        snapshot = self.shares_v2_client.get_snapshot(
+            snapshot['id'])['snapshot']
         # Unmanage snapshot
         self.shares_v2_client.unmanage_snapshot(snapshot['id'],
                                                 version=version)
diff --git a/manila_tempest_tests/tests/api/admin/test_snapshot_manage_negative.py b/manila_tempest_tests/tests/api/admin/test_snapshot_manage_negative.py
index d385569..f2fb48f 100644
--- a/manila_tempest_tests/tests/api/admin/test_snapshot_manage_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_snapshot_manage_negative.py
@@ -84,7 +84,8 @@
 
         # Create snapshot
         snap = self.create_snapshot_wait_for_active(self.share['id'])
-        snap = self.shares_v2_client.get_snapshot(snap['id'])
+        snap = self.shares_v2_client.get_snapshot(
+            snap['id'])['snapshot']
         self.assertEqual(self.share['id'], snap['share_id'])
         self.assertIsNotNone(snap['provider_location'])
 
@@ -106,7 +107,8 @@
 
         # Create snapshot
         snap = self.create_snapshot_wait_for_active(self.share['id'])
-        snap = self.shares_v2_client.get_snapshot(snap['id'])
+        snap = self.shares_v2_client.get_snapshot(
+            snap['id'])['snapshot']
 
         # Unmanage snapshot
         self.shares_v2_client.unmanage_snapshot(snap['id'])
@@ -120,7 +122,7 @@
             self.share['id'],
             'invalid_provider_location',
             driver_options={}
-        )
+        )['snapshot']
         waiters.wait_for_resource_status(
             self.shares_v2_client, invalid_snap['id'],
             constants.STATUS_MANAGE_ERROR, resource_name='snapshot'
@@ -131,7 +133,7 @@
         managed_snap = self.shares_v2_client.manage_snapshot(
             self.share['id'],
             snap['provider_location']
-        )
+        )['snapshot']
         waiters.wait_for_resource_status(
             self.shares_v2_client, managed_snap['id'],
             constants.STATUS_AVAILABLE, resource_name='snapshot'
diff --git a/manila_tempest_tests/tests/api/admin/test_user_messages.py b/manila_tempest_tests/tests/api/admin/test_user_messages.py
index 1aeb5a5..d24a060 100644
--- a/manila_tempest_tests/tests/api/admin/test_user_messages.py
+++ b/manila_tempest_tests/tests/api/admin/test_user_messages.py
@@ -54,7 +54,7 @@
     @decorators.attr(type=[base.TAG_POSITIVE, base.TAG_API])
     @decorators.idempotent_id('37127e11-7aa7-46b2-ab05-e3bf36d94fd8')
     def test_list_messages(self):
-        body = self.shares_v2_client.list_messages()
+        body = self.shares_v2_client.list_messages()['messages']
         self.assertIsInstance(body, list)
         self.assertTrue(self.message['id'], [x['id'] for x in body])
         message = body[0]
@@ -83,7 +83,7 @@
     def test_list_messages_filtered(self):
         self.create_user_message()
         params = {'resource_id': self.message['resource_id']}
-        body = self.shares_v2_client.list_messages(params=params)
+        body = self.shares_v2_client.list_messages(params=params)['messages']
         self.assertIsInstance(body, list)
         ids = [x['id'] for x in body]
         self.assertEqual([self.message['id']], ids)
@@ -94,7 +94,8 @@
         self.addCleanup(self.shares_v2_client.delete_message,
                         self.message['id'])
 
-        message = self.shares_v2_client.get_message(self.message['id'])
+        message = self.shares_v2_client.get_message(
+            self.message['id'])['message']
 
         self.assertEqual(set(MESSAGE_KEYS), set(message.keys()))
         self.assertTrue(uuidutils.is_uuid_like(message['id']))
@@ -133,7 +134,8 @@
         params1 = {'created_since': str(time_1)}
         # should return all user messages created by this test including
         # self.message
-        messages = self.shares_v2_client.list_messages(params=params1)
+        messages = self.shares_v2_client.list_messages(
+            params=params1)['messages']
         ids = [x['id'] for x in messages]
         self.assertGreaterEqual(len(ids), 2)
         self.assertIn(self.message['id'], ids)
@@ -147,7 +149,8 @@
                    'created_before': str(time_2)}
         # should not return new_message, but return a list that is equal to 1
         # and include self.message
-        messages = self.shares_v2_client.list_messages(params=params2)
+        messages = self.shares_v2_client.list_messages(
+            params=params2)['messages']
         self.assertIsInstance(messages, list)
         ids = [x['id'] for x in messages]
         self.assertGreaterEqual(len(ids), 1)
@@ -163,7 +166,8 @@
 
         params3 = {'created_before': str(time_2)}
         # should not include self.message
-        messages = self.shares_v2_client.list_messages(params=params3)
+        messages = self.shares_v2_client.list_messages(
+            params=params3)['messages']
         ids = [x['id'] for x in messages]
         self.assertGreaterEqual(len(ids), 1)
         self.assertNotIn(new_message['id'], ids)
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 06b4339..0e875c2 100755
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -361,7 +361,7 @@
         if share_group_id:
             kwargs['share_group_id'] = share_group_id
 
-        share = client.create_share(**kwargs)
+        share = client.create_share(**kwargs)['share']
         resource = {"type": "share", "id": share["id"], "client": client,
                     "share_group_id": share_group_id}
         cleanup_list = (cls.class_resources if cleanup_in_class else
@@ -499,7 +499,7 @@
         if kwargs.get('source_share_group_snapshot_id') is None:
             kwargs['share_network_id'] = (share_network_id or
                                           client.share_network_id or None)
-        share_group = client.create_share_group(**kwargs)
+        share_group = client.create_share_group(**kwargs)['share_group']
         resource = {
             "type": "share_group",
             "id": share_group["id"],
@@ -513,7 +513,7 @@
         if kwargs.get('source_share_group_snapshot_id'):
             new_share_group_shares = client.list_shares(
                 detailed=True,
-                params={'share_group_id': share_group['id']})
+                params={'share_group_id': share_group['id']})['shares']
 
             for share in new_share_group_shares:
                 resource = {"type": "share",
@@ -546,7 +546,7 @@
             share_types=share_types,
             is_public=is_public,
             group_specs=group_specs,
-            **kwargs)
+            **kwargs)['share_group_type']
         resource = {
             "type": "share_group_type",
             "id": share_group_type["id"],
@@ -566,7 +566,8 @@
             client = cls.shares_v2_client
         if description is None:
             description = "Tempest's snapshot"
-        snapshot = client.create_snapshot(share_id, name, description, force)
+        snapshot = client.create_snapshot(
+            share_id, name, description, force)['snapshot']
         resource = {
             "type": "snapshot",
             "id": snapshot["id"],
@@ -588,7 +589,8 @@
         if description is None:
             description = "Tempest's share group snapshot"
         sg_snapshot = client.create_share_group_snapshot(
-            share_group_id, name=name, description=description, **kwargs)
+            share_group_id, name=name, description=description,
+            **kwargs)['share_group_snapshot']
         resource = {
             "type": "share_group_snapshot",
             "id": sg_snapshot["id"],
@@ -614,7 +616,7 @@
             '|'.join(['^%s$' % backend for backend in backends])
             if backends else '.*'
         )
-        cls.services = client.list_services()
+        cls.services = client.list_services()['services']
         zones = [service['zone'] for service in cls.services if
                  service['binary'] == 'manila-share' and
                  service['state'] == 'up' and
@@ -659,7 +661,7 @@
         # Get the list of pools for the replication domain
         pools = self.admin_client.list_pools(detail=True)['pools']
         instance_host = self.admin_client.get_share(
-            self.shares[0]['id'])['host']
+            self.shares[0]['id'])['share']['host']
         host_pool = [p for p in pools if p['name'] == instance_host][0]
         rep_domain = host_pool['capabilities']['replication_domain']
         pools_in_rep_domain = [p for p in pools if p['capabilities'][
@@ -673,7 +675,8 @@
                              version=CONF.share.max_api_microversion):
         client = client or cls.shares_v2_client
         replica = client.create_share_replica(
-            share_id, availability_zone=availability_zone, version=version)
+            share_id, availability_zone=availability_zone,
+            version=version)['share_replica']
         resource = {
             "type": "share_replica",
             "id": replica["id"],
@@ -705,7 +708,8 @@
     def promote_share_replica(cls, replica_id, client=None,
                               version=CONF.share.max_api_microversion):
         client = client or cls.shares_v2_client
-        replica = client.promote_share_replica(replica_id, version=version)
+        replica = client.promote_share_replica(
+            replica_id, version=version)['share_replica']
         waiters.wait_for_resource_status(
             client, replica["id"], constants.REPLICATION_STATE_ACTIVE,
             resource_name='share_replica', status_attr="replica_state")
@@ -747,7 +751,7 @@
 
         if client is None:
             client = cls.shares_client
-        share_network = client.create_share_network(**kwargs)
+        share_network = client.create_share_network(**kwargs)['share_network']
         resource = {
             "type": "share_network",
             "id": share_network["id"],
@@ -772,7 +776,8 @@
                                     **kwargs):
         if client is None:
             client = cls.shares_v2_client
-        share_network_subnet = client.create_subnet(**kwargs)
+        share_network_subnet = client.create_subnet(
+            **kwargs)['share_network_subnet']
         resource = {
             "type": "share-network-subnet",
             "id": share_network_subnet["id"],
@@ -792,7 +797,8 @@
                                 cleanup_in_class=False, **kwargs):
         if client is None:
             client = cls.shares_client
-        security_service = client.create_security_service(ss_type, **kwargs)
+        security_service = client.create_security_service(
+            ss_type, **kwargs)['security_service']
         resource = {
             "type": "security_service",
             "id": security_service["id"],
@@ -820,7 +826,7 @@
         client = client or cls.shares_v2_client
         updated_quotas = client.update_quotas(project_id,
                                               user_id=user_id,
-                                              **kwargs)
+                                              **kwargs)['quota_set']
         resource = {
             "type": "quotas",
             "id": project_id,
@@ -835,7 +841,7 @@
     def clear_share_replicas(cls, share_id, client=None):
         client = client or cls.shares_v2_client
         share_replicas = client.list_share_replicas(
-            share_id=share_id)
+            share_id=share_id)['share_replicas']
 
         for replica in share_replicas:
             try:
@@ -1029,7 +1035,7 @@
 
         params = {'share_type_id': bogus_type['id'],
                   'share_network_id': self.shares_v2_client.share_network_id}
-        share = self.shares_v2_client.create_share(**params)
+        share = self.shares_v2_client.create_share(**params)['share']
         self.addCleanup(self.shares_v2_client.delete_share, share['id'])
         waiters.wait_for_resource_status(
             self.shares_v2_client, share['id'], "error")
@@ -1045,7 +1051,7 @@
         access_to = access_to or a_to
 
         rule = client.create_access_rule(share_id, access_type, access_to,
-                                         access_level)
+                                         access_level)['access']
         waiters.wait_for_resource_status(
             client, share_id, status, resource_name='access_rule',
             rule_id=rule['id'],
@@ -1112,10 +1118,11 @@
         }
 
         share = self.create_share(**creation_data)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         if utils.is_microversion_ge(CONF.share.max_api_microversion, "2.9"):
-            el = self.shares_v2_client.list_share_export_locations(share["id"])
+            el = self.shares_v2_client.list_share_export_locations(
+                share["id"])['export_locations']
             share["export_locations"] = el
 
         return share
@@ -1153,7 +1160,7 @@
             name=name,
             description=description,
             share_server_id=share_server_id
-        )
+        )['share']
         waiters.wait_for_resource_status(
             self.shares_v2_client, managed_share['id'],
             constants.STATUS_AVAILABLE
@@ -1175,7 +1182,7 @@
             params.get('share_network_id', share_server['share_network_id']),
             params.get('identifier', share_server['identifier']),
             share_network_subnet_id=subnet_id,
-        )
+        )['share_server']
         waiters.wait_for_resource_status(
             self.shares_v2_client, managed_share_server['id'],
             constants.SERVER_STATE_ACTIVE, resource_name='share_server'
@@ -1205,7 +1212,7 @@
 
         params = {'share_type_id': bogus_type['id'],
                   'share_network_id': self.shares_v2_client.share_network_id}
-        share = self.shares_v2_client.create_share(**params)
+        share = self.shares_v2_client.create_share(**params)['share']
         self.addCleanup(self.shares_v2_client.delete_share, share['id'])
         waiters.wait_for_resource_status(
             self.shares_v2_client, share['id'], "error")
diff --git a/manila_tempest_tests/tests/api/test_access_rules_metadata.py b/manila_tempest_tests/tests/api/test_access_rules_metadata.py
index 7d133cf..fa3c0a7 100644
--- a/manila_tempest_tests/tests/api/test_access_rules_metadata.py
+++ b/manila_tempest_tests/tests/api/test_access_rules_metadata.py
@@ -75,7 +75,8 @@
         cls.md1 = {"key1": "value1", "key2": "value2"}
         cls.access = cls.shares_v2_client.create_access_rule(
             cls.share["id"], cls.access_type,
-            cls.access_to[cls.access_type].pop(), 'rw', metadata=cls.md1)
+            cls.access_to[cls.access_type].pop(), 'rw',
+            metadata=cls.md1)['access']
 
     @decorators.idempotent_id('4c8e0236-2e7b-4337-be3c-17b51a738644')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
@@ -84,10 +85,12 @@
         # set metadata
         access = self.shares_v2_client.create_access_rule(
             self.share["id"], self.access_type,
-            self.access_to[self.access_type].pop(), 'rw', metadata=data)
+            self.access_to[self.access_type].pop(), 'rw',
+            metadata=data)['access']
 
         # read metadata
-        get_access = self.shares_v2_client.get_access_rule(access["id"])
+        get_access = self.shares_v2_client.get_access_rule(
+            access["id"])['access']
 
         # verify metadata
         self.assertEqual(data, get_access['metadata'])
@@ -97,7 +100,8 @@
             self.shares_v2_client.delete_access_metadata(access["id"], key)
 
         # verify deletion of metadata
-        access_without_md = self.shares_v2_client.get_access_rule(access["id"])
+        access_without_md = self.shares_v2_client.get_access_rule(
+            access["id"])['access']
         self.assertEqual({}, access_without_md['metadata'])
         self.shares_v2_client.delete_access_rule(self.share["id"],
                                                  access["id"])
@@ -113,7 +117,8 @@
         self.shares_v2_client.update_access_metadata(
             access_id=self.access['id'], metadata=md2)
         # get metadata
-        get_access = self.shares_v2_client.get_access_rule(self.access['id'])
+        get_access = self.shares_v2_client.get_access_rule(
+            self.access['id'])['access']
 
         # verify metadata
         self.md1.update(md2)
@@ -126,11 +131,13 @@
         # set metadata
         access = self.shares_v2_client.create_access_rule(
             self.share["id"], self.access_type,
-            self.access_to[self.access_type].pop(), 'rw', metadata=data)
+            self.access_to[self.access_type].pop(), 'rw',
+            metadata=data)['access']
 
         # list metadata with metadata filter
         list_access = self.shares_v2_client.list_access_rules(
-            share_id=self.share["id"], metadata={'metadata': data})
+            share_id=self.share["id"],
+            metadata={'metadata': data})['access_list']
 
         # verify metadata
         self.assertEqual(1, len(list_access))
diff --git a/manila_tempest_tests/tests/api/test_access_rules_metadata_negative.py b/manila_tempest_tests/tests/api/test_access_rules_metadata_negative.py
index 74b9119..c848ed3 100644
--- a/manila_tempest_tests/tests/api/test_access_rules_metadata_negative.py
+++ b/manila_tempest_tests/tests/api/test_access_rules_metadata_negative.py
@@ -66,7 +66,7 @@
         cls.share = cls.create_share(share_type_id=cls.share_type_id)
         cls.access = cls.shares_v2_client.create_access_rule(
             cls.share["id"], cls.access_type, cls.access_to,
-            'rw', metadata={u"key1": u"value1"})
+            'rw', metadata={u"key1": u"value1"})['access']
 
     @decorators.idempotent_id('d2d41db8-ae00-4641-a5ec-499cee1877f1')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
diff --git a/manila_tempest_tests/tests/api/test_availability_zones.py b/manila_tempest_tests/tests/api/test_availability_zones.py
index e344ab3..8aa813d 100644
--- a/manila_tempest_tests/tests/api/test_availability_zones.py
+++ b/manila_tempest_tests/tests/api/test_availability_zones.py
@@ -35,7 +35,8 @@
     def test_list_availability_zones_legacy_url_api_v1(self):
         # NOTE(vponomaryov): remove this test with removal of availability zone
         # extension url support.
-        azs = self.shares_client.list_availability_zones()
+        azs = self.shares_client.list_availability_zones(
+            )['availability_zones']
         self._list_availability_zones_assertions(azs)
 
     @decorators.idempotent_id('7054f2f4-bc77-4d60-82a6-2f23b93d281e')
@@ -45,12 +46,13 @@
         # NOTE(vponomaryov): remove this test with removal of availability zone
         # extension url support.
         azs = self.shares_v2_client.list_availability_zones(
-            url='os-availability-zone', version='2.6')
+            url='os-availability-zone', version='2.6')['availability_zones']
         self._list_availability_zones_assertions(azs)
 
     @decorators.idempotent_id('4caadb86-2988-4adb-b705-aece99235c1e')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     @utils.skip_if_microversion_not_supported("2.7")
     def test_list_availability_zones(self):
-        azs = self.shares_v2_client.list_availability_zones(version='2.7')
+        azs = self.shares_v2_client.list_availability_zones(
+            version='2.7')['availability_zones']
         self._list_availability_zones_assertions(azs)
diff --git a/manila_tempest_tests/tests/api/test_extensions.py b/manila_tempest_tests/tests/api/test_extensions.py
index bf866e3..efd89fb 100644
--- a/manila_tempest_tests/tests/api/test_extensions.py
+++ b/manila_tempest_tests/tests/api/test_extensions.py
@@ -26,7 +26,7 @@
     def test_extensions(self):
 
         # get extensions
-        extensions = self.shares_client.list_extensions()
+        extensions = self.shares_client.list_extensions()['extensions']
 
         # verify response
         keys = ["alias", "updated", "name", "description"]
diff --git a/manila_tempest_tests/tests/api/test_limits.py b/manila_tempest_tests/tests/api/test_limits.py
index c5d500f..ef3b794 100644
--- a/manila_tempest_tests/tests/api/test_limits.py
+++ b/manila_tempest_tests/tests/api/test_limits.py
@@ -26,7 +26,7 @@
     def test_limits_keys(self):
 
         # list limits
-        limits = self.shares_client.get_limits()
+        limits = self.shares_client.get_limits()['limits']
 
         # verify response
         keys = ["rate", "absolute"]
@@ -51,7 +51,7 @@
     def test_limits_values(self):
 
         # list limits
-        limits = self.shares_client.get_limits()
+        limits = self.shares_client.get_limits()['limits']
 
         # verify integer values for absolute limits
         abs_l = limits["absolute"]
diff --git a/manila_tempest_tests/tests/api/test_metadata.py b/manila_tempest_tests/tests/api/test_metadata.py
index 879a1c3..5ca4e83 100644
--- a/manila_tempest_tests/tests/api/test_metadata.py
+++ b/manila_tempest_tests/tests/api/test_metadata.py
@@ -43,7 +43,7 @@
                                   cleanup_in_class=False)
 
         # get metadata of share
-        metadata = self.shares_client.get_metadata(share["id"])
+        metadata = self.shares_client.get_metadata(share["id"])['metadata']
 
         # verify metadata
         self.assertEqual(md, metadata)
@@ -62,7 +62,7 @@
         self.shares_client.set_metadata(share["id"], md)
 
         # read metadata
-        get_md = self.shares_client.get_metadata(share["id"])
+        get_md = self.shares_client.get_metadata(share["id"])['metadata']
 
         # verify metadata
         self.assertEqual(md, get_md)
@@ -77,7 +77,7 @@
             self.shares_client.delete_metadata(share["id"], key)
 
         # verify deletion of metadata
-        get_metadata = self.shares_client.get_metadata(share["id"])
+        get_metadata = self.shares_client.get_metadata(share["id"])['metadata']
         self.assertEqual({}, get_metadata)
 
     @decorators.idempotent_id('c94851f4-2559-4712-9297-9912db1da7ff')
@@ -98,7 +98,7 @@
         self.shares_client.update_all_metadata(share["id"], md2)
 
         # get metadata
-        get_md = self.shares_client.get_metadata(share["id"])
+        get_md = self.shares_client.get_metadata(share["id"])['metadata']
 
         # verify metadata
         self.assertEqual(md2, get_md)
@@ -110,7 +110,8 @@
 
         self.shares_client.set_metadata(self.share["id"], data)
 
-        body_get = self.shares_client.get_metadata(self.share["id"])
+        body_get = self.shares_client.get_metadata(
+            self.share["id"])['metadata']
         self.assertEqual(data['k'], body_get.get('k'))
 
     @decorators.idempotent_id('34c5bd96-ced7-42ef-a114-570cc63cf81d')
@@ -121,7 +122,8 @@
 
         self.shares_client.set_metadata(self.share["id"], data)
 
-        body_get = self.shares_client.get_metadata(self.share["id"])
+        body_get = self.shares_client.get_metadata(
+            self.share["id"])['metadata']
         self.assertIn(max_key, body_get)
         self.assertEqual(data[max_key], body_get.get(max_key))
 
@@ -132,7 +134,8 @@
 
         self.shares_client.set_metadata(self.share["id"], data)
 
-        body_get = self.shares_client.get_metadata(self.share["id"])
+        body_get = self.shares_client.get_metadata(
+            self.share["id"])['metadata']
         self.assertEqual(data['key'], body_get['key'])
 
     @decorators.idempotent_id('759ec4ab-2537-44ad-852b-1af85c6ca933')
@@ -143,7 +146,8 @@
 
         self.shares_client.set_metadata(self.share["id"], data)
 
-        body_get = self.shares_client.get_metadata(self.share["id"])
+        body_get = self.shares_client.get_metadata(
+            self.share["id"])['metadata']
         self.assertEqual(data['key'], body_get['key'])
 
     @decorators.idempotent_id('c5ca19ba-3595-414a-8ff9-fbc88cd801ba')
@@ -153,7 +157,8 @@
 
         self.shares_client.update_all_metadata(self.share["id"], data)
 
-        body_get = self.shares_client.get_metadata(self.share["id"])
+        body_get = self.shares_client.get_metadata(
+            self.share["id"])['metadata']
         self.assertEqual(data, body_get)
 
     @decorators.idempotent_id('5eff5619-b7cd-42f1-85e0-47d3d47098dd')
@@ -164,7 +169,8 @@
 
         self.shares_client.update_all_metadata(self.share["id"], data)
 
-        body_get = self.shares_client.get_metadata(self.share["id"])
+        body_get = self.shares_client.get_metadata(
+            self.share["id"])['metadata']
         self.assertEqual(data, body_get)
 
     @decorators.idempotent_id('44a572f1-6b5c-49d0-8f2e-1583ec3428d8')
@@ -174,7 +180,8 @@
 
         self.shares_client.update_all_metadata(self.share["id"], data)
 
-        body_get = self.shares_client.get_metadata(self.share["id"])
+        body_get = self.shares_client.get_metadata(
+            self.share["id"])['metadata']
         self.assertEqual(data, body_get)
 
     @decorators.idempotent_id('694d95e1-ba8c-49fc-a888-6f9f0d51d77d')
@@ -185,5 +192,6 @@
 
         self.shares_client.update_all_metadata(self.share["id"], data)
 
-        body_get = self.shares_client.get_metadata(self.share["id"])
+        body_get = self.shares_client.get_metadata(
+            self.share["id"])['metadata']
         self.assertEqual(data, body_get)
diff --git a/manila_tempest_tests/tests/api/test_public_shares.py b/manila_tempest_tests/tests/api/test_public_shares.py
index 2a2f146..e132246 100644
--- a/manila_tempest_tests/tests/api/test_public_shares.py
+++ b/manila_tempest_tests/tests/api/test_public_shares.py
@@ -54,7 +54,8 @@
         )
 
         params = {'is_public': True}
-        shares = self.alt_shares_v2_client.list_shares_with_detail(params)
+        shares = self.alt_shares_v2_client.list_shares_with_detail(
+            params)['shares']
 
         keys = [
             'status', 'description', 'links', 'availability_zone',
@@ -84,7 +85,7 @@
                                   cleanup_in_class=False,
                                   version=LATEST_MICROVERSION)
 
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         self.assertEqual(share_name, share['name'])
         self.assertEqual('a share we will update', share['description'])
         self.assertFalse(share['is_public'])
@@ -94,13 +95,13 @@
         new_name = data_utils.rand_name('tempest-new-share-name')
         new_desc = 'share is now updated'
         updated = self.admin_shares_v2_client.update_share(
-            share['id'], name=new_name, desc=new_desc, is_public=True)
+            share['id'], name=new_name, desc=new_desc, is_public=True)['share']
         self.assertEqual(new_name, updated['name'])
         self.assertEqual(new_desc, updated['description'])
         self.assertTrue(updated['is_public'])
 
         # this share must now be publicly accessible
-        share = self.alt_shares_v2_client.get_share(share['id'])
+        share = self.alt_shares_v2_client.get_share(share['id'])['share']
         self.assertEqual(new_name, share['name'])
         self.assertEqual(new_desc, share['description'])
         self.assertTrue(share['is_public'])
diff --git a/manila_tempest_tests/tests/api/test_quotas.py b/manila_tempest_tests/tests/api/test_quotas.py
index 3921e38..eca9bfe 100644
--- a/manila_tempest_tests/tests/api/test_quotas.py
+++ b/manila_tempest_tests/tests/api/test_quotas.py
@@ -49,7 +49,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     @ddt.data('shares_client', 'shares_v2_client')
     def test_default_quotas(self, client_name):
-        quotas = getattr(self, client_name).default_quotas(self.tenant_id)
+        quotas = getattr(self, client_name).default_quotas(
+            self.tenant_id)['quota_set']
         uses_v2_client = client_name == 'shares_v2_client'
         self.assertGreater(int(quotas["gigabytes"]), -2)
         self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
@@ -64,7 +65,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     @ddt.data('shares_client', 'shares_v2_client')
     def test_show_quotas(self, client_name):
-        quotas = getattr(self, client_name).show_quotas(self.tenant_id)
+        quotas = getattr(self, client_name).show_quotas(
+            self.tenant_id)['quota_set']
         uses_v2_client = client_name == 'shares_v2_client'
         self.assertGreater(int(quotas["gigabytes"]), -2)
         self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
@@ -80,7 +82,7 @@
     @ddt.data('shares_client', 'shares_v2_client')
     def test_show_quotas_for_user(self, client_name):
         quotas = getattr(self, client_name).show_quotas(
-            self.tenant_id, self.user_id)
+            self.tenant_id, self.user_id)['quota_set']
         uses_v2_client = client_name == 'shares_v2_client'
         self.assertGreater(int(quotas["gigabytes"]), -2)
         self.assertGreater(int(quotas["snapshot_gigabytes"]), -2)
@@ -108,7 +110,7 @@
             keys.append('replica_gigabytes')
         if with_user:
             quota_args.update({"user_id": self.user_id})
-        quotas = self.shares_v2_client.detail_quotas(**quota_args)
+        quotas = self.shares_v2_client.detail_quotas(**quota_args)['quota_set']
         quota_keys = list(quotas.keys())
         for outer in keys:
             self.assertIn(outer, quota_keys)
diff --git a/manila_tempest_tests/tests/api/test_replication.py b/manila_tempest_tests/tests/api/test_replication.py
index fc1e18e..722f02f 100644
--- a/manila_tempest_tests/tests/api/test_replication.py
+++ b/manila_tempest_tests/tests/api/test_replication.py
@@ -77,7 +77,7 @@
         cls.sn_id = None
         if cls.multitenancy_enabled:
             cls.share_network = cls.shares_v2_client.get_share_network(
-                cls.shares_v2_client.share_network_id)
+                cls.shares_v2_client.share_network_id)['share_network']
             cls.creation_data['kwargs'].update({
                 'share_network_id': cls.share_network['id']})
             cls.sn_id = cls.share_network['id']
@@ -85,14 +85,15 @@
         # Data for creating shares in parallel
         data = [cls.creation_data, cls.creation_data]
         cls.shares = cls.create_shares(data)
-        cls.shares = [cls.shares_v2_client.get_share(s['id']) for s in
+        cls.shares = [cls.shares_v2_client.get_share(s['id'])['share'] for s in
                       cls.shares]
         cls.instance_id1 = cls._get_instance(cls.shares[0])
         cls.instance_id2 = cls._get_instance(cls.shares[1])
 
     @classmethod
     def _get_instance(cls, share):
-        share_instances = cls.admin_client.get_instances_of_share(share["id"])
+        share_instances = cls.admin_client.get_instances_of_share(
+            share["id"])['share_instances']
         return share_instances[0]["id"]
 
     def _verify_create_replica(self):
@@ -101,7 +102,7 @@
                                                   self.replica_zone,
                                                   cleanup_in_class=False)
         share_replicas = self.shares_v2_client.list_share_replicas(
-            share_id=self.shares[0]["id"])
+            share_id=self.shares[0]["id"])['share_replicas']
         # Ensure replica is created successfully.
         replica_ids = [replica["id"] for replica in share_replicas]
         self.assertIn(share_replica["id"], replica_ids)
@@ -110,7 +111,7 @@
     def _verify_active_replica_count(self, share_id):
         # List replicas
         replica_list = self.shares_v2_client.list_share_replicas(
-            share_id=share_id)
+            share_id=share_id)['share_replicas']
 
         # Check if there is only 1 'active' replica before promotion.
         active_replicas = self._filter_replica_list(
@@ -142,7 +143,7 @@
         self._verify_active_replica_count(share["id"])
         # Verify the replica_state for promoted replica
         promoted_replica = self.shares_v2_client.get_share_replica(
-            promoted_replica["id"])
+            promoted_replica["id"])['share_replica']
         self.assertEqual(constants.REPLICATION_STATE_ACTIVE,
                          promoted_replica["replica_state"])
 
@@ -192,7 +193,7 @@
         # Add access rule to the share
         access_type, access_to = self._get_access_rule_data_from_config()
         rule = self.shares_v2_client.create_access_rule(
-            self.shares[0]["id"], access_type, access_to, 'ro')
+            self.shares[0]["id"], access_type, access_to, 'ro')['access']
         waiters.wait_for_resource_status(
             self.shares_v2_client, self.shares[0]["id"],
             constants.RULE_STATE_ACTIVE, resource_name='access_rule',
@@ -251,7 +252,7 @@
         self.shares_v2_client.get_share_replica(share_replica2['id'])
 
         share_replicas = self.admin_client.list_share_replicas(
-            share_id=self.shares[0]["id"])
+            share_id=self.shares[0]["id"])['share_replicas']
         replica_host_set = {r['host'] for r in share_replicas}
 
         # Assert that replicas are created on different pools.
@@ -269,7 +270,7 @@
         self._check_skip_promotion_tests()
         share = self.create_shares([self.creation_data])[0]
         original_replica = self.shares_v2_client.list_share_replicas(
-            share["id"])[0]
+            share["id"])['share_replicas'][0]
         self._verify_in_sync_replica_promotion(share, original_replica)
 
     @decorators.idempotent_id('3af912f4-b5d7-4241-b2b3-bdf12ff398a4')
@@ -282,17 +283,18 @@
         # Add access rule
         access_type, access_to = self._get_access_rule_data_from_config()
         rule = self.shares_v2_client.create_access_rule(
-            share["id"], access_type, access_to, 'ro')
+            share["id"], access_type, access_to, 'ro')['access']
         waiters.wait_for_resource_status(
             self.shares_v2_client, share["id"], constants.RULE_STATE_ACTIVE,
             resource_name='access_rule', rule_id=rule["id"])
 
         original_replica = self.shares_v2_client.list_share_replicas(
-            share["id"])[0]
+            share["id"])['share_replicas'][0]
         self._verify_in_sync_replica_promotion(share, original_replica)
 
         # verify rule's values
-        rules_list = self.shares_v2_client.list_access_rules(share["id"])
+        rules_list = self.shares_v2_client.list_access_rules(
+            share["id"])['access_list']
         self.assertEqual(1, len(rules_list))
         self.assertEqual(access_type, rules_list[0]["access_type"])
         self.assertEqual(access_to, rules_list[0]["access_to"])
@@ -312,9 +314,10 @@
         share = self.create_share(
             share_type_id=self.share_type['id'], cleanup_in_class=False,
             availability_zone=self.share_zone, share_network_id=self.sn_id)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         replica = self.create_share_replica(share['id'], self.replica_zone)
-        replica = self.shares_v2_client.get_share_replica(replica['id'])
+        replica = self.shares_v2_client.get_share_replica(
+            replica['id'])['share_replica']
 
         self.assertEqual(self.share_zone, share['availability_zone'])
         self.assertEqual(self.replica_zone, replica['availability_zone'])
@@ -332,7 +335,7 @@
 
         # Discover the original replica
         initial_replicas = self.shares_v2_client.list_share_replicas(
-            share_id=share['id'])
+            share_id=share['id'])['share_replicas']
         self.assertEqual(1, len(initial_replicas),
                          '%s replicas initially created for share %s' %
                          (len(initial_replicas), share['id']))
@@ -367,7 +370,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_active_replication_state(self):
         # Verify the replica_state of first instance is set to active.
-        replica = self.shares_v2_client.get_share_replica(self.instance_id1)
+        replica = self.shares_v2_client.get_share_replica(
+            self.instance_id1)['share_replica']
         self.assertEqual(
             constants.REPLICATION_STATE_ACTIVE, replica['replica_state'])
 
@@ -417,7 +421,7 @@
 
         if cls.multitenancy_enabled:
             cls.share_network = cls.shares_v2_client.get_share_network(
-                cls.shares_v2_client.share_network_id)
+                cls.shares_v2_client.share_network_id)['share_network']
             cls.creation_data['kwargs'].update({
                 'share_network_id': cls.share_network['id']})
         cls.sn_id = (
@@ -425,7 +429,7 @@
         # Data for creating shares in parallel
         data = [cls.creation_data, cls.creation_data]
         cls.shares = cls.create_shares(data)
-        cls.shares = [cls.shares_v2_client.get_share(s['id']) for s in
+        cls.shares = [cls.shares_v2_client.get_share(s['id'])['share'] for s in
                       cls.shares]
         cls.instance_id1 = cls._get_instance(cls.shares[0])
         cls.instance_id2 = cls._get_instance(cls.shares[1])
@@ -440,7 +444,8 @@
 
     @classmethod
     def _get_instance(cls, share):
-        share_instances = cls.admin_client.get_instances_of_share(share["id"])
+        share_instances = cls.admin_client.get_instances_of_share(
+            share["id"])['share_instances']
         return share_instances[0]["id"]
 
     def _validate_replica_list(self, replica_list, detail=True):
@@ -461,7 +466,8 @@
     @decorators.idempotent_id('abe0e49d-0b94-4b81-a220-ab047712492d')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_show_share_replica(self):
-        replica = self.shares_v2_client.get_share_replica(self.replica1["id"])
+        replica = self.shares_v2_client.get_share_replica(
+            self.replica1["id"])['share_replica']
 
         actual_keys = sorted(list(replica.keys()))
         detail_keys = sorted(DETAIL_KEYS)
@@ -475,7 +481,7 @@
     def test_detail_list_share_replicas_for_share(self):
         # List replicas for share
         replica_list = self.shares_v2_client.list_share_replicas(
-            share_id=self.shares[0]["id"])
+            share_id=self.shares[0]["id"])['share_replicas']
         replica_ids_list = [rep['id'] for rep in replica_list]
         self.assertIn(self.replica1['id'], replica_ids_list,
                       'Replica %s was not returned in the list of replicas: %s'
@@ -487,7 +493,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_detail_list_share_replicas_for_all_shares(self):
         # List replicas for all available shares
-        replica_list = self.shares_v2_client.list_share_replicas()
+        replica_list = self.shares_v2_client.list_share_replicas(
+            )['share_replicas']
         replica_ids_list = [rep['id'] for rep in replica_list]
         for replica in [self.replica1, self.replica2]:
             self.assertIn(replica['id'], replica_ids_list,
@@ -500,7 +507,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
     def test_summary_list_share_replicas_for_all_shares(self):
         # List replicas
-        replica_list = self.shares_v2_client.list_share_replicas_summary()
+        replica_list = self.shares_v2_client.list_share_replicas_summary(
+            )['share_replicas']
 
         # Verify keys
         self._validate_replica_list(replica_list, detail=False)
diff --git a/manila_tempest_tests/tests/api/test_replication_export_locations.py b/manila_tempest_tests/tests/api/test_replication_export_locations.py
index 28921e5..2227290 100644
--- a/manila_tempest_tests/tests/api/test_replication_export_locations.py
+++ b/manila_tempest_tests/tests/api/test_replication_export_locations.py
@@ -59,7 +59,7 @@
         cls.sn_id = None
         if cls.multitenancy_enabled:
             cls.share_network = cls.shares_v2_client.get_share_network(
-                cls.shares_v2_client.share_network_id)
+                cls.shares_v2_client.share_network_id)['share_network']
             cls.sn_id = cls.share_network['id']
         cls.zones = cls.get_availability_zones_matching_share_type(
             cls.share_type)
@@ -77,20 +77,21 @@
         replica = self.create_share_replica(share['id'], self.replica_zone,
                                             cleanup=cleanup_replica)
         replicas = self.shares_v2_client.list_share_replicas(
-            share_id=share['id'])
+            share_id=share['id'])['share_replicas']
         primary_replica = [r for r in replicas if r['id'] != replica['id']][0]
 
         # Refresh share and replica
-        share = self.shares_v2_client.get_share(share['id'])
-        replica = self.shares_v2_client.get_share_replica(replica['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
+        replica = self.shares_v2_client.get_share_replica(
+            replica['id'])['share_replica']
 
         # Grab export locations of the share instances using admin API
         replica_exports = self._remove_admin_only_exports(
             self.admin_client.list_share_instance_export_locations(
-                replica['id']))
+                replica['id'])['export_locations'])
         primary_replica_exports = self._remove_admin_only_exports(
             self.admin_client.list_share_instance_export_locations(
-                primary_replica['id']))
+                primary_replica['id'])['export_locations'])
 
         return share, replica, primary_replica_exports, replica_exports
 
@@ -131,7 +132,7 @@
 
         # Share export locations list API
         share_exports = self.shares_v2_client.list_share_export_locations(
-            share['id'], version=version)
+            share['id'], version=version)['export_locations']
 
         self._validate_export_location_api_behavior(replica, replica_exports,
                                                     primary_replica_exports,
@@ -150,7 +151,7 @@
             self._create_share_and_replica_get_exports(cleanup_replica=False)
         )
         primary_replica = self.shares_v2_client.get_share_replica(
-            primary_replica_exports[0]['share_instance_id'])
+            primary_replica_exports[0]['share_instance_id'])['share_replica']
         waiters.wait_for_resource_status(
             self.shares_v2_client, replica['id'],
             constants.REPLICATION_STATE_IN_SYNC, resource_name='share_replica',
@@ -158,7 +159,7 @@
 
         # Share export locations list API
         share_exports = self.shares_v2_client.list_share_export_locations(
-            share['id'], version=version)
+            share['id'], version=version)['export_locations']
 
         # Validate API behavior
         self._validate_export_location_api_behavior(replica, replica_exports,
@@ -170,15 +171,15 @@
 
         # Refresh for verification
         current_secondary_replica = self.shares_v2_client.get_share_replica(
-            primary_replica['id'])
+            primary_replica['id'])['share_replica']
         current_primary_replica_exports = self._remove_admin_only_exports(
             self.admin_client.list_share_instance_export_locations(
-                replica['id'], version=version))
+                replica['id'], version=version)['export_locations'])
         current_secondary_replica_exports = self._remove_admin_only_exports(
             self.admin_client.list_share_instance_export_locations(
-                primary_replica['id'], version=version))
+                primary_replica['id'], version=version)['export_locations'])
         share_exports = self.shares_v2_client.list_share_export_locations(
-            share['id'], version=version)
+            share['id'], version=version)['export_locations']
 
         # Validate API behavior
         self._validate_export_location_api_behavior(
@@ -200,7 +201,7 @@
             self._create_share_and_replica_get_exports()
         )
         primary_replica = self.shares_v2_client.get_share_replica(
-            expected_primary_exports[0]['share_instance_id'])
+            expected_primary_exports[0]['share_instance_id'])['share_replica']
         expected_primary_export_paths = [e['path'] for e in
                                          expected_primary_exports]
         expected_replica_export_paths = [e['path'] for e in
@@ -209,7 +210,7 @@
         # For the primary replica
         actual_primary_exports = (
             self.shares_v2_client.list_share_replica_export_locations(
-                primary_replica['id'])
+                primary_replica['id'])['export_locations']
         )
 
         self.assertEqual(len(expected_primary_exports),
@@ -224,7 +225,7 @@
 
             export_location_details = (
                 self.shares_v2_client.get_share_replica_export_location(
-                    primary_replica['id'], export['id'])
+                    primary_replica['id'], export['id'])['export_location']
             )
             self.assertEqual(sorted(el_detail_keys),
                              sorted(export_location_details.keys()))
@@ -234,7 +235,7 @@
         # For the secondary replica
         actual_replica_exports = (
             self.shares_v2_client.list_share_replica_export_locations(
-                replica['id'])
+                replica['id'])['export_locations']
         )
 
         self.assertEqual(len(expected_replica_exports),
@@ -249,7 +250,7 @@
 
             export_location_details = (
                 self.shares_v2_client.get_share_replica_export_location(
-                    replica['id'], export['id'])
+                    replica['id'], export['id'])['export_location']
             )
             self.assertEqual(sorted(el_detail_keys),
                              sorted(export_location_details.keys()))
diff --git a/manila_tempest_tests/tests/api/test_replication_export_locations_negative.py b/manila_tempest_tests/tests/api/test_replication_export_locations_negative.py
index 113ace3..6e79f08 100644
--- a/manila_tempest_tests/tests/api/test_replication_export_locations_negative.py
+++ b/manila_tempest_tests/tests/api/test_replication_export_locations_negative.py
@@ -56,7 +56,7 @@
         cls.sn_id = None
         if cls.multitenancy_enabled:
             cls.share_network = cls.shares_v2_client.get_share_network(
-                cls.shares_v2_client.share_network_id)
+                cls.shares_v2_client.share_network_id)['share_network']
             cls.sn_id = cls.share_network['id']
         cls.zones = cls.get_availability_zones_matching_share_type(
             cls.share_type)
@@ -79,7 +79,7 @@
         replica_exports = (
             self.shares_v2_client.list_share_replica_export_locations(
                 replica['id'])
-        )
+        )['export_locations']
 
         for export in replica_exports:
             self.assertRaises(lib_exc.NotFound,
@@ -96,7 +96,8 @@
         share = self.create_share(share_type_id=share_type['id'],
                                   availability_zone=self.share_zone,
                                   share_network_id=self.sn_id)
-        share_instances = self.admin_client.get_instances_of_share(share['id'])
+        share_instances = self.admin_client.get_instances_of_share(
+            share['id'])['share_instances']
         for instance in share_instances:
             self.assertRaises(
                 lib_exc.NotFound,
diff --git a/manila_tempest_tests/tests/api/test_replication_negative.py b/manila_tempest_tests/tests/api/test_replication_negative.py
index 3b8f696..90c52c7 100644
--- a/manila_tempest_tests/tests/api/test_replication_negative.py
+++ b/manila_tempest_tests/tests/api/test_replication_negative.py
@@ -60,7 +60,7 @@
         cls.sn_id = None
         if cls.multitenancy_enabled:
             cls.share_network = cls.shares_v2_client.get_share_network(
-                cls.shares_v2_client.share_network_id)
+                cls.shares_v2_client.share_network_id)['share_network']
             cls.sn_id = cls.share_network['id']
         cls.zones = cls.get_availability_zones_matching_share_type(
             cls.share_type, client=cls.admin_client)
@@ -78,7 +78,7 @@
                                  share_network_id=sn_id)
         share_instances = cls.admin_client.get_instances_of_share(
             share["id"], version=_MIN_SUPPORTED_MICROVERSION
-        )
+        )['share_instances']
         instance_id = share_instances[0]["id"]
         return share, instance_id
 
@@ -214,7 +214,8 @@
         hosts = [p['name'] for p in pools]
         self.create_share_replica(self.share1["id"], self.replica_zone,
                                   cleanup_in_class=False)
-        share_host = self.admin_client.get_share(self.share1['id'])['host']
+        share_host = self.admin_client.get_share(
+            self.share1['id'])['share']['host']
 
         for host in hosts:
             if host != share_host:
@@ -251,7 +252,8 @@
         data['neutron_net_id'] = subnet['neutron_net_id']
         data['neutron_subnet_id'] = subnet['neutron_subnet_id']
         data['availability_zone'] = self.share_zone
-        share_net = self.shares_v2_client.create_share_network(**data)
+        share_net = self.shares_v2_client.create_share_network(
+            **data)['share_network']
         share, instance_id = self._create_share_get_instance(
             share_network_id=share_net['id'])
 
diff --git a/manila_tempest_tests/tests/api/test_replication_snapshots.py b/manila_tempest_tests/tests/api/test_replication_snapshots.py
index b4627b6..0df6437 100644
--- a/manila_tempest_tests/tests/api/test_replication_snapshots.py
+++ b/manila_tempest_tests/tests/api/test_replication_snapshots.py
@@ -68,7 +68,7 @@
         cls.sn_id = None
         if cls.multitenancy_enabled:
             cls.share_network = cls.shares_v2_client.get_share_network(
-                cls.shares_v2_client.share_network_id)
+                cls.shares_v2_client.share_network_id)['share_network']
             cls.sn_id = cls.share_network['id']
 
         cls.zones = cls.get_availability_zones_matching_share_type(
@@ -89,7 +89,7 @@
                                   availability_zone=self.share_zone,
                                   share_network_id=self.sn_id)
         original_replica = self.shares_v2_client.list_share_replicas(
-            share["id"])[0]
+            share["id"])['share_replicas'][0]
 
         share_replica = self.create_share_replica(share["id"],
                                                   self.replica_zone,
@@ -104,7 +104,8 @@
         self.promote_share_replica(share_replica['id'])
         self.delete_share_replica(original_replica['id'])
 
-        snapshot = self.shares_v2_client.get_snapshot(snapshot['id'])
+        snapshot = self.shares_v2_client.get_snapshot(
+            snapshot['id'])['snapshot']
         self.assertEqual(constants.STATUS_AVAILABLE, snapshot['status'])
 
         if CONF.share.capability_create_share_from_snapshot_support:
@@ -127,7 +128,7 @@
         snapshot = self.create_snapshot_wait_for_active(share["id"])
 
         original_replica = self.shares_v2_client.list_share_replicas(
-            share["id"])[0]
+            share["id"])['share_replicas'][0]
         share_replica = self.create_share_replica(share["id"],
                                                   self.replica_zone,
                                                   cleanup=False)
@@ -145,7 +146,8 @@
         self.promote_share_replica(share_replica['id'])
         self.delete_share_replica(original_replica['id'])
 
-        snapshot = self.shares_v2_client.get_snapshot(snapshot['id'])
+        snapshot = self.shares_v2_client.get_snapshot(
+            snapshot['id'])['snapshot']
         self.assertEqual(constants.STATUS_AVAILABLE, snapshot['status'])
 
         if CONF.share.capability_create_share_from_snapshot_support:
@@ -168,7 +170,7 @@
         snapshot1 = self.create_snapshot_wait_for_active(share["id"])
 
         original_replica = self.shares_v2_client.list_share_replicas(
-            share["id"])[0]
+            share["id"])['share_replicas'][0]
 
         share_replica = self.create_share_replica(share["id"],
                                                   self.replica_zone,
@@ -191,10 +193,12 @@
         # still being created successfully.
         self.delete_share_replica(original_replica['id'])
 
-        snapshot1 = self.shares_v2_client.get_snapshot(snapshot1['id'])
+        snapshot1 = self.shares_v2_client.get_snapshot(
+            snapshot1['id'])['snapshot']
         self.assertEqual(constants.STATUS_AVAILABLE, snapshot1['status'])
 
-        snapshot2 = self.shares_v2_client.get_snapshot(snapshot2['id'])
+        snapshot2 = self.shares_v2_client.get_snapshot(
+            snapshot2['id'])['snapshot']
         self.assertEqual(constants.STATUS_AVAILABLE, snapshot2['status'])
 
         if CONF.share.capability_create_share_from_snapshot_support:
@@ -244,7 +248,7 @@
                                        snapshot_id=orig_snapshot['id'],
                                        share_network_id=self.sn_id)
         original_replica = self.shares_v2_client.list_share_replicas(
-            snap_share["id"])[0]
+            snap_share["id"])['share_replicas'][0]
         share_replica = self.create_share_replica(snap_share["id"],
                                                   self.replica_zone,
                                                   cleanup=False)
diff --git a/manila_tempest_tests/tests/api/test_revert_to_snapshot.py b/manila_tempest_tests/tests/api/test_revert_to_snapshot.py
index 90f3220..7609e69 100644
--- a/manila_tempest_tests/tests/api/test_revert_to_snapshot.py
+++ b/manila_tempest_tests/tests/api/test_revert_to_snapshot.py
@@ -103,7 +103,7 @@
             cls.sn_id = None
             if cls.replication_multitenancy:
                 cls.share_network = cls.shares_v2_client.get_share_network(
-                    cls.shares_v2_client.share_network_id)
+                    cls.shares_v2_client.share_network_id)['share_network']
                 cls.sn_id = cls.share_network['id']
 
     @decorators.idempotent_id('196f2bc5-e13a-4730-ac51-61e339068a06')
diff --git a/manila_tempest_tests/tests/api/test_rules.py b/manila_tempest_tests/tests/api/test_rules.py
index 3c19537..30b1fc5 100644
--- a/manila_tempest_tests/tests/api/test_rules.py
+++ b/manila_tempest_tests/tests/api/test_rules.py
@@ -39,11 +39,11 @@
 
     if utils.is_microversion_eq(version, '1.0'):
         rule = self.shares_client.create_access_rule(
-            self.share["id"], self.access_type, self.access_to, 'ro')
+            self.share["id"], self.access_type, self.access_to, 'ro')['access']
     else:
         rule = self.shares_v2_client.create_access_rule(
             self.share["id"], self.access_type, self.access_to, 'ro',
-            version=version)
+            version=version)['access']
 
     self.assertEqual('ro', rule['access_level'])
     for key in ('deleted', 'deleted_at', 'instance_mappings'):
@@ -65,7 +65,8 @@
             status_attr='access_rules_status', version=version)
         # If the 'access_rules_status' transitions to 'active',
         # rule state must too
-        rules = self.shares_v2_client.list_access_rules(self.share['id'])
+        rules = self.shares_v2_client.list_access_rules(
+            self.share['id'])['access_list']
         rule = [r for r in rules if r['id'] == rule['id']][0]
         self.assertEqual("active", rule['state'])
 
@@ -122,11 +123,11 @@
         # create rule
         if utils.is_microversion_eq(version, '1.0'):
             rule = self.shares_client.create_access_rule(
-                self.share["id"], self.access_type, access_to)
+                self.share["id"], self.access_type, access_to)['access']
         else:
             rule = self.shares_v2_client.create_access_rule(
                 self.share["id"], self.access_type, access_to,
-                version=version)
+                version=version)['access']
 
         self.assertEqual('rw', rule['access_level'])
         for key in ('deleted', 'deleted_at', 'instance_mappings'):
@@ -177,11 +178,11 @@
         # create rule
         if utils.is_microversion_eq(version, '1.0'):
             rule = self.shares_client.create_access_rule(
-                self.share["id"], self.access_type, access_to)
+                self.share["id"], self.access_type, access_to)['access']
         else:
             rule = self.shares_v2_client.create_access_rule(
                 self.share["id"], self.access_type, access_to,
-                version=version)
+                version=version)['access']
 
         for key in ('deleted', 'deleted_at', 'instance_mappings'):
             self.assertNotIn(key, rule.keys())
@@ -280,11 +281,11 @@
         # create rule
         if utils.is_microversion_eq(version, '1.0'):
             rule = self.shares_client.create_access_rule(
-                self.share["id"], self.access_type, self.access_to)
+                self.share["id"], self.access_type, self.access_to)['access']
         else:
             rule = self.shares_v2_client.create_access_rule(
                 self.share["id"], self.access_type, self.access_to,
-                version=version)
+                version=version)['access']
 
         self.assertEqual('rw', rule['access_level'])
         for key in ('deleted', 'deleted_at', 'instance_mappings'):
@@ -384,11 +385,11 @@
         # create rule
         if utils.is_microversion_eq(version, '1.0'):
             rule = self.shares_client.create_access_rule(
-                self.share["id"], self.access_type, self.access_to)
+                self.share["id"], self.access_type, self.access_to)['access']
         else:
             rule = self.shares_v2_client.create_access_rule(
                 self.share["id"], self.access_type, self.access_to,
-                version=version)
+                version=version)['access']
 
         self.assertEqual('rw', rule['access_level'])
         for key in ('deleted', 'deleted_at', 'instance_mappings'):
@@ -434,11 +435,11 @@
     def test_create_delete_cert_ro_access_rule(self, version):
         if utils.is_microversion_eq(version, '1.0'):
             rule = self.shares_client.create_access_rule(
-                self.share["id"], 'cert', 'client2.com', 'ro')
+                self.share["id"], 'cert', 'client2.com', 'ro')['access']
         else:
             rule = self.shares_v2_client.create_access_rule(
                 self.share["id"], 'cert', 'client2.com', 'ro',
-                version=version)
+                version=version)['access']
 
         self.assertEqual('ro', rule['access_level'])
         for key in ('deleted', 'deleted_at', 'instance_mappings'):
@@ -513,7 +514,7 @@
     def test_create_delete_cephx_rule(self, version, access_to, access_level):
         rule = self.shares_v2_client.create_access_rule(
             self.share["id"], self.access_type, access_to, version=version,
-            access_level=access_level)
+            access_level=access_level)['access']
 
         self.assertEqual(access_level, rule['access_level'])
         for key in ('deleted', 'deleted_at', 'instance_mappings'):
@@ -532,7 +533,7 @@
     def test_different_users_in_same_tenant_can_use_same_cephx_id(self):
         # Grant access to the share
         access1 = self.shares_v2_client.create_access_rule(
-            self.share['id'], self.access_type, self.access_to, 'rw')
+            self.share['id'], self.access_type, self.access_to, 'rw')['access']
         waiters.wait_for_resource_status(
             self.shares_v2_client, self.share["id"], "active",
             resource_name='access_rule', rule_id=access1["id"])
@@ -550,7 +551,7 @@
         # Grant access to the second share using the same cephx ID that was
         # used in access1
         access2 = user_client.shares_v2_client.create_access_rule(
-            share2['id'], self.access_type, self.access_to, 'rw')
+            share2['id'], self.access_type, self.access_to, 'rw')['access']
         waiters.wait_for_resource_status(
             user_client.shares_v2_client, share2['id'], "active",
             resource_name='access_rule', rule_id=access2['id'])
@@ -608,11 +609,11 @@
         # create rule
         if utils.is_microversion_eq(version, '1.0'):
             rule = self.shares_client.create_access_rule(
-                self.share["id"], self.access_type, self.access_to)
+                self.share["id"], self.access_type, self.access_to)['access']
         else:
             rule = self.shares_v2_client.create_access_rule(
                 self.share["id"], self.access_type, self.access_to,
-                metadata=metadata, version=version)
+                metadata=metadata, version=version)['access']
 
         # verify added rule keys since 2.33 when create rule
         if utils.is_microversion_ge(version, '2.33'):
@@ -643,10 +644,11 @@
 
         # list rules
         if utils.is_microversion_eq(version, '1.0'):
-            rules = self.shares_client.list_access_rules(self.share["id"])
+            rules = self.shares_client.list_access_rules(
+                self.share["id"])['access_list']
         else:
-            rules = self.shares_v2_client.list_access_rules(self.share["id"],
-                                                            version=version)
+            rules = self.shares_v2_client.list_access_rules(
+                self.share["id"], version=version)['access_list']
 
         # verify keys
         keys = ("id", "access_type", "access_to", "access_level")
@@ -703,11 +705,11 @@
         # create rule
         if utils.is_microversion_eq(version, '1.0'):
             rule = self.shares_client.create_access_rule(
-                share["id"], self.access_type, self.access_to)
+                share["id"], self.access_type, self.access_to)['access']
         else:
             rule = self.shares_v2_client.create_access_rule(
                 share["id"], self.access_type, self.access_to,
-                version=version)
+                version=version)['access']
 
         # rules must start out in 'new' until 2.28 & 'queued_to_apply' after
         if utils.is_microversion_le(version, "2.27"):
diff --git a/manila_tempest_tests/tests/api/test_rules_negative.py b/manila_tempest_tests/tests/api/test_rules_negative.py
index f9dade0..5225651 100644
--- a/manila_tempest_tests/tests/api/test_rules_negative.py
+++ b/manila_tempest_tests/tests/api/test_rules_negative.py
@@ -102,10 +102,11 @@
         # create rule
         if utils.is_microversion_eq(version, '1.0'):
             rule = self.shares_client.create_access_rule(
-                self.share["id"], access_type, access_to)
+                self.share["id"], access_type, access_to)['access']
         else:
             rule = self.shares_v2_client.create_access_rule(
-                self.share["id"], access_type, access_to, version=version)
+                self.share["id"], access_type, access_to,
+                version=version)['access']
 
         if utils.is_microversion_eq(version, '1.0'):
             waiters.wait_for_resource_status(
@@ -157,7 +158,7 @@
             raise self.skipException(reason)
 
         rule = self.shares_v2_client.create_access_rule(
-            self.share["id"], "ip", access_to)
+            self.share["id"], "ip", access_to)['access']
         self.addCleanup(self.shares_v2_client.delete_access_rule,
                         self.share["id"], rule['id'])
         waiters.wait_for_resource_status(
@@ -449,7 +450,7 @@
                           raise_rule_in_error_state=False)
 
         share_alt_updated = self.alt_shares_v2_client.get_share(
-            share2['id'])
+            share2['id'])['share']
         self.assertEqual('error', share_alt_updated['access_rules_status'])
 
     @decorators.idempotent_id('1a9f46f0-d4e1-40ac-8726-aedd0320d583')
@@ -473,7 +474,7 @@
 
         # Share's "access_rules_status" must be in "error" status
         share_alt_updated = self.alt_shares_v2_client.get_share(
-            share_alt['id'])
+            share_alt['id'])['share']
         self.assertEqual('error', share_alt_updated['access_rules_status'])
 
         # Add second access rule to different client by "alt" user.
diff --git a/manila_tempest_tests/tests/api/test_security_services.py b/manila_tempest_tests/tests/api/test_security_services.py
index 282f036..5bfbc2e 100644
--- a/manila_tempest_tests/tests/api/test_security_services.py
+++ b/manila_tempest_tests/tests/api/test_security_services.py
@@ -35,7 +35,8 @@
     @decorators.idempotent_id('f6f5657c-a93c-49ed-86e3-b351a92734d5')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_list_security_services(self):
-        listed = self.shares_client.list_security_services()
+        listed = self.shares_client.list_security_services(
+            )['security_services']
         self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
         self.assertTrue(any(self.ss_kerberos['id'] == ss['id']
                             for ss in listed))
@@ -52,9 +53,10 @@
         with_ou = True if utils.is_microversion_ge(version, '2.44') else False
         if utils.is_microversion_ge(version, '2.0'):
             listed = self.shares_v2_client.list_security_services(
-                detailed=True, version=version)
+                detailed=True, version=version)['security_services']
         else:
-            listed = self.shares_client.list_security_services(detailed=True)
+            listed = self.shares_client.list_security_services(
+                detailed=True)['security_services']
 
         self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
         self.assertTrue(any(self.ss_kerberos['id'] == ss['id']
@@ -77,7 +79,7 @@
         not CONF.share.multitenancy_enabled, "Only for multitenancy.")
     def test_list_security_services_filter_by_share_network(self):
         sn = self.shares_client.get_share_network(
-            self.shares_client.share_network_id)
+            self.shares_client.share_network_id)['share_network']
         fresh_sn = []
         for i in range(2):
             sn = self.create_share_network(
@@ -92,7 +94,9 @@
             fresh_sn[1]["id"], self.ss_kerberos["id"])
 
         listed = self.shares_client.list_security_services(
-            params={'share_network_id': fresh_sn[0]['id']})
+            params={
+                'share_network_id': fresh_sn[0]['id']
+            })['security_services']
         self.assertEqual(1, len(listed))
         self.assertEqual(self.ss_ldap['id'], listed[0]['id'])
 
@@ -112,7 +116,7 @@
         }
         listed = self.shares_client.list_security_services(
             detailed=True,
-            params=search_opts)
+            params=search_opts)['security_services']
         self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
         for ss in listed:
             self.assertTrue(all(ss[key] == value for key, value
@@ -179,10 +183,11 @@
             ss = self.create_security_service(
                 client=self.shares_v2_client, version=version, **data)
             get = self.shares_v2_client.get_security_service(
-                ss["id"], version=version)
+                ss["id"], version=version)['security_service']
         else:
             ss = self.create_security_service(**data)
-            get = self.shares_client.get_security_service(ss["id"])
+            get = self.shares_client.get_security_service(
+                ss["id"])['security_service']
 
         self.assertDictContainsSubset(data, ss)
         self.assertEqual(with_ou, 'ou' in ss)
@@ -198,9 +203,10 @@
 
         upd_data = self.generate_security_service_data()
         updated = self.shares_client.update_security_service(
-            ss["id"], **upd_data)
+            ss["id"], **upd_data)['security_service']
 
-        get = self.shares_client.get_security_service(ss["id"])
+        get = self.shares_client.get_security_service(
+            ss["id"])['security_service']
         self.assertDictContainsSubset(upd_data, updated)
         self.assertDictContainsSubset(upd_data, get)
 
@@ -208,9 +214,10 @@
             # update again with ou
             upd_data_ou = self.generate_security_service_data(set_ou=True)
             updated_ou = self.shares_v2_client.update_security_service(
-                ss["id"], **upd_data_ou)
+                ss["id"], **upd_data_ou)['security_service']
 
-            get_ou = self.shares_v2_client.get_security_service(ss["id"])
+            get_ou = self.shares_v2_client.get_security_service(
+                ss["id"])['security_service']
             self.assertDictContainsSubset(upd_data_ou, updated_ou)
             self.assertDictContainsSubset(upd_data_ou, get_ou)
 
@@ -223,7 +230,7 @@
         ss = self.create_security_service(**ss_data)
 
         sn = self.shares_client.get_share_network(
-            self.shares_client.share_network_id)
+            self.shares_client.share_network_id)['share_network']
         fresh_sn = self.create_share_network(
             add_security_services=False,
             neutron_net_id=sn["neutron_net_id"],
@@ -252,14 +259,14 @@
             "description": "new_description",
         }
         updated = self.shares_client.update_security_service(
-            ss["id"], **update_data)
+            ss["id"], **update_data)['security_service']
         self.assertDictContainsSubset(update_data, updated)
 
     @decorators.idempotent_id('8d9af272-df89-470d-9ff8-92ba774c9fff')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_list_security_services_filter_by_invalid_opt(self):
         listed = self.shares_client.list_security_services(
-            params={'fake_opt': 'some_value'})
+            params={'fake_opt': 'some_value'})['security_services']
         self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
         self.assertTrue(any(self.ss_kerberos['id'] == ss['id']
                             for ss in listed))
@@ -268,7 +275,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_try_list_security_services_all_tenants(self):
         listed = self.shares_client.list_security_services(
-            params={'all_tenants': 1})
+            params={'all_tenants': 1})['security_services']
         self.assertTrue(any(self.ss_ldap['id'] == ss['id'] for ss in listed))
         self.assertTrue(any(self.ss_kerberos['id'] == ss['id']
                             for ss in listed))
diff --git a/manila_tempest_tests/tests/api/test_security_services_mapping.py b/manila_tempest_tests/tests/api/test_security_services_mapping.py
index db0a8b7..2e7531d 100644
--- a/manila_tempest_tests/tests/api/test_security_services_mapping.py
+++ b/manila_tempest_tests/tests/api/test_security_services_mapping.py
@@ -51,7 +51,8 @@
     def test_map_ss_to_sn_and_list(self):
 
         # List security services for share network
-        ls = self.cl.list_sec_services_for_share_network(self.sn["id"])
+        ls = self.cl.list_sec_services_for_share_network(
+            self.sn["id"])['security_services']
         self.assertEqual(1, len(ls))
         for key in ["status", "id", "name"]:
             self.assertIn(self.ss[key], ls[0][key])
diff --git a/manila_tempest_tests/tests/api/test_security_services_mapping_negative.py b/manila_tempest_tests/tests/api/test_security_services_mapping_negative.py
index fd8dc6f..9aaf20b 100644
--- a/manila_tempest_tests/tests/api/test_security_services_mapping_negative.py
+++ b/manila_tempest_tests/tests/api/test_security_services_mapping_negative.py
@@ -114,7 +114,7 @@
         not CONF.share.multitenancy_enabled, "Only for multitenancy.")
     def test_delete_ss_from_sn_used_by_share_server(self):
         sn = self.shares_client.get_share_network(
-            self.shares_client.share_network_id)
+            self.shares_client.share_network_id)['share_network']
         fresh_sn = self.create_share_network(
             add_security_services=False,
             neutron_net_id=sn["neutron_net_id"],
diff --git a/manila_tempest_tests/tests/api/test_security_services_negative.py b/manila_tempest_tests/tests/api/test_security_services_negative.py
index e091ffc..3895fa9 100644
--- a/manila_tempest_tests/tests/api/test_security_services_negative.py
+++ b/manila_tempest_tests/tests/api/test_security_services_negative.py
@@ -98,7 +98,7 @@
         ss = self.create_security_service(**ss_data)
 
         sn = self.shares_client.get_share_network(
-            self.shares_client.share_network_id)
+            self.shares_client.share_network_id)['share_network']
         fresh_sn = self.create_share_network(
             add_security_services=False,
             neutron_net_id=sn["neutron_net_id"],
diff --git a/manila_tempest_tests/tests/api/test_share_group_actions.py b/manila_tempest_tests/tests/api/test_share_group_actions.py
index 7f16773..680b565 100644
--- a/manila_tempest_tests/tests/api/test_share_group_actions.py
+++ b/manila_tempest_tests/tests/api/test_share_group_actions.py
@@ -122,7 +122,7 @@
 
         # Get share group
         share_group = self.shares_v2_client.get_share_group(
-            self.share_group['id'], version=version)
+            self.share_group['id'], version=version)['share_group']
 
         # Verify keys
         actual_keys = set(share_group.keys())
@@ -145,7 +145,7 @@
         # Get share
         share = self.shares_v2_client.get_share(
             self.shares[0]['id'],
-            version=constants.MIN_SHARE_GROUP_MICROVERSION)
+            version=constants.MIN_SHARE_GROUP_MICROVERSION)['share']
 
         # Verify keys
         expected_keys = {
@@ -177,7 +177,7 @@
 
         # List share groups
         share_groups = self.shares_v2_client.list_share_groups(
-            version=version)
+            version=version)['share_groups']
 
         # Verify keys
         self.assertGreater(len(share_groups), 0)
@@ -211,7 +211,7 @@
             params = {'name~': 'tempest', 'description~': 'tempest'}
         # List share groups
         share_groups = self.shares_v2_client.list_share_groups(
-            detailed=True, params=params, version=version)
+            detailed=True, params=params, version=version)['share_groups']
 
         # Verify keys
         for sg in share_groups:
@@ -242,7 +242,7 @@
             detailed=True,
             params={'share_group_id': self.share_group['id']},
             version=constants.MIN_SHARE_GROUP_MICROVERSION,
-        )
+        )['shares']
 
         share_ids = [share['id'] for share in shares]
 
@@ -274,7 +274,7 @@
         sg_snapshot = self.shares_v2_client.get_share_group_snapshot(
             self.sg_snapshot['id'],
             version=version,
-        )
+        )['share_group_snapshot']
 
         # Verify keys
         actual_keys = set(sg_snapshot.keys())
@@ -301,7 +301,7 @@
         sg_snapshot = self.shares_v2_client.get_share_group_snapshot(
             self.sg_snapshot['id'],
             version=constants.MIN_SHARE_GROUP_MICROVERSION,
-        )
+        )['share_group_snapshot']
         sg_snapshot_members = sg_snapshot['members']
         member_share_ids = [m['share_id'] for m in sg_snapshot_members]
         self.assertEqual(
@@ -338,7 +338,7 @@
         sg_snapshot = self.shares_v2_client.get_share_group_snapshot(
             self.sg_snapshot['id'],
             version=version,
-        )
+        )['share_group_snapshot']
         snapshot_members = sg_snapshot['members']
 
         new_share_group = self.create_share_group(
@@ -351,7 +351,7 @@
         new_share_group = self.shares_v2_client.get_share_group(
             new_share_group['id'],
             version=version,
-        )
+        )['share_group']
 
         # Verify that share_network information matches source share group
         self.assertEqual(
@@ -362,7 +362,7 @@
             params={'share_group_id': new_share_group['id']},
             detailed=True,
             version=version,
-        )
+        )['shares']
 
         # Verify each new share is available
         for share in new_shares:
@@ -444,7 +444,7 @@
         share_group = self.shares_v2_client.get_share_group(
             self.share_group['id'],
             version=version
-        )
+        )['share_group']
         self.assertEqual(self.share_group_name, share_group["name"])
         self.assertEqual(self.share_group_desc, share_group["description"])
 
@@ -456,7 +456,7 @@
             name=new_name,
             description=new_desc,
             version=version,
-        )
+        )['share_group']
         self.assertEqual(new_name, updated["name"])
         self.assertEqual(new_desc, updated["description"])
 
@@ -464,7 +464,7 @@
         share_group = self.shares_v2_client.get_share_group(
             self.share_group['id'],
             version=version,
-        )
+        )['share_group']
         self.assertEqual(new_name, share_group["name"])
         self.assertEqual(new_desc, share_group["description"])
 
@@ -502,13 +502,13 @@
             name=value2,
             description=value2,
             version=version,
-        )
+        )['share_group']
         self.assertEqual(value2, updated["name"])
         self.assertEqual(value2, updated["description"])
 
         # Get share group
         share_group = self.shares_v2_client.get_share_group(
-            share_group['id'], version=version)
+            share_group['id'], version=version)['share_group']
         self.assertEqual(value2, share_group["name"])
         self.assertEqual(value2, share_group["description"])
 
diff --git a/manila_tempest_tests/tests/api/test_share_groups.py b/manila_tempest_tests/tests/api/test_share_groups.py
index 20fc045..3b56161 100644
--- a/manila_tempest_tests/tests/api/test_share_groups.py
+++ b/manila_tempest_tests/tests/api/test_share_groups.py
@@ -176,7 +176,7 @@
 
         new_shares = self.shares_v2_client.list_shares(
             params={'share_group_id': new_share_group['id']},
-            version=constants.MIN_SHARE_GROUP_MICROVERSION)
+            version=constants.MIN_SHARE_GROUP_MICROVERSION)['shares']
 
         self.assertEmpty(
             new_shares, 'Expected 0 new shares, got %s' % len(new_shares))
@@ -232,7 +232,7 @@
 
         # Get latest share group info
         share_group = self.shares_v2_client.get_share_group(
-            share_group['id'], '2.34')
+            share_group['id'], '2.34')['share_group']
 
         self.assertIn('availability_zone', share_group)
         if where_specify_az in ('sg', 'sg_and_share'):
@@ -258,7 +258,7 @@
         share = self.create_share(**s_kwargs)
 
         # Get latest share info
-        share = self.shares_v2_client.get_share(share['id'], '2.34')
+        share = self.shares_v2_client.get_share(share['id'], '2.34')['share']
 
         # Verify that share always has the same AZ as share group does
         self.assertEqual(
diff --git a/manila_tempest_tests/tests/api/test_share_groups_negative.py b/manila_tempest_tests/tests/api/test_share_groups_negative.py
index 2125eb7..68fb18f 100644
--- a/manila_tempest_tests/tests/api/test_share_groups_negative.py
+++ b/manila_tempest_tests/tests/api/test_share_groups_negative.py
@@ -245,7 +245,7 @@
         # Verify share group is not put into error state from conflict
         sg = self.shares_v2_client.get_share_group(
             self.share_group['id'],
-            version=constants.MIN_SHARE_GROUP_MICROVERSION)
+            version=constants.MIN_SHARE_GROUP_MICROVERSION)['share_group']
         self.assertEqual('available', sg['status'])
 
     @decorators.idempotent_id('edd329b8-7188-481f-9445-8f6d913538fa')
@@ -255,7 +255,7 @@
             detailed=True,
             params={'share_group_id': 'foobar'},
             version=constants.MIN_SHARE_GROUP_MICROVERSION,
-        )
+        )['shares']
         self.assertEqual(0, len(shares), 'Incorrect number of shares returned')
 
     @decorators.idempotent_id('5dc10968-cbff-46d9-a1aa-bafccc7a1905')
@@ -265,7 +265,7 @@
             detailed=True,
             params={'share_group_id': self.share['id']},
             version=constants.MIN_SHARE_GROUP_MICROVERSION,
-        )
+        )['shares']
         self.assertEqual(0, len(shares), 'Incorrect number of shares returned')
 
     @decorators.idempotent_id('f805f683-fe05-4534-9f40-a74be42ff82b')
@@ -283,7 +283,7 @@
             detailed=True,
             params={'share_group_id': share_group['id']},
             version=constants.MIN_SHARE_GROUP_MICROVERSION,
-        )
+        )['shares']
         self.assertEqual(0, len(shares), 'Incorrect number of shares returned')
 
     @decorators.idempotent_id('8fc20c22-082f-4851-bcc3-d2f3af57f027')
@@ -303,14 +303,15 @@
     @decorators.idempotent_id('64527564-9cd6-42db-8897-910f4fc1a151')
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
     def test_create_sg_and_share_with_different_azs(self):
-        azs = self.shares_v2_client.list_availability_zones()
+        azs = self.shares_v2_client.list_availability_zones(
+            )['availability_zones']
 
         if len(azs) < 2:
             raise self.skipException(
                 'Test requires presence of at least 2 availability zones.')
         else:
             share_group = self.shares_v2_client.get_share_group(
-                self.share_group['id'], '2.34')
+                self.share_group['id'], '2.34')['share_group']
             different_az = [
                 az['name']
                 for az in azs
diff --git a/manila_tempest_tests/tests/api/test_share_network_subnets.py b/manila_tempest_tests/tests/api/test_share_network_subnets.py
index 2f178b9..0f651c9 100644
--- a/manila_tempest_tests/tests/api/test_share_network_subnets.py
+++ b/manila_tempest_tests/tests/api/test_share_network_subnets.py
@@ -49,13 +49,15 @@
     @decorators.idempotent_id('3e1e4da7-049f-404e-8673-142695a9a785')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_create_delete_subnet(self):
-        share_network = self.shares_v2_client.create_share_network()
+        share_network = self.shares_v2_client.create_share_network(
+            )['share_network']
         share_network = self.shares_v2_client.get_share_network(
             share_network['id']
-        )
+        )['share_network']
         default_subnet = share_network['share_network_subnets'][0]
 
-        az = self.shares_v2_client.list_availability_zones()[0]
+        az = self.shares_v2_client.list_availability_zones(
+            )['availability_zones'][0]
         az_name = az['name']
 
         # Generate subnet data
@@ -88,7 +90,8 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_show_share_network_subnet(self):
         share_network = self.create_share_network()
-        az = self.shares_v2_client.list_availability_zones()[0]
+        az = self.shares_v2_client.list_availability_zones(
+            )['availability_zones'][0]
         az_name = az['name']
 
         # Generate subnet data
@@ -100,8 +103,8 @@
         created = self.create_share_network_subnet(**data)
 
         # Shows the share network subnet
-        shown = self.shares_v2_client.get_subnet(created['id'],
-                                                 share_network['id'])
+        shown = self.shares_v2_client.get_subnet(
+            created['id'], share_network['id'])['share_network_subnet']
 
         # Asserts
         self.assertDictContainsSubset(data, shown)
@@ -127,7 +130,7 @@
 
         original_share_network = self.shares_v2_client.get_share_network(
             self.shares_v2_client.share_network_id
-        )
+        )['share_network']
         share_net_info = (
             utils.share_network_get_default_subnet(original_share_network))
         share_network = self.create_share_network(
@@ -136,7 +139,7 @@
         )
         share_network = self.shares_v2_client.get_share_network(
             share_network['id']
-        )
+        )['share_network']
         default_subnet = share_network['share_network_subnets'][0]
         availability_zone = compatible_azs[0]
 
@@ -160,10 +163,10 @@
         # case of Dummy driver).
         self.assertIn(share['status'], ('creating', 'available'))
 
-        share = self.admin_shares_v2_client.get_share(share['id'])
+        share = self.admin_shares_v2_client.get_share(share['id'])['share']
         share_server = self.admin_shares_v2_client.show_share_server(
             share['share_server_id']
-        )
+        )['share_server']
 
         # Default subnet was created during share network creation
         self.assertIsNone(default_subnet['availability_zone'])
@@ -197,7 +200,7 @@
 
         original_share_network = self.shares_v2_client.get_share_network(
             self.shares_v2_client.share_network_id
-        )
+        )['share_network']
         share_net_info = (
             utils.share_network_get_default_subnet(original_share_network))
         share_network = self.create_share_network(
@@ -206,7 +209,7 @@
         )
         share_network = self.shares_v2_client.get_share_network(
             share_network['id']
-        )
+        )['share_network']
         default_subnet = share_network['share_network_subnets'][0]
         # Save one availability zone to remain associated with default subnet
         destination_az = compatible_azs.pop()
@@ -236,10 +239,10 @@
         # creation is really fast as in case of Dummy driver).
         self.assertIn(share['status'], ('creating', 'available'))
 
-        share = self.admin_shares_v2_client.get_share(share['id'])
+        share = self.admin_shares_v2_client.get_share(share['id'])['share']
         share_server = self.admin_shares_v2_client.show_share_server(
             share['share_server_id']
-        )
+        )['share_server']
         # If no availability zone was provided during share creation, it is
         # expected that the Scheduler selects one of the compatible backends to
         # place the share. The destination availability zone may or may not
diff --git a/manila_tempest_tests/tests/api/test_share_network_subnets_negative.py b/manila_tempest_tests/tests/api/test_share_network_subnets_negative.py
index 1dc0d60..4af34f2 100644
--- a/manila_tempest_tests/tests/api/test_share_network_subnets_negative.py
+++ b/manila_tempest_tests/tests/api/test_share_network_subnets_negative.py
@@ -42,10 +42,13 @@
         super(ShareNetworkSubnetsNegativeTest, cls).resource_setup()
         # Create a new share network which will be used in the tests
         cls.share_network = cls.shares_v2_client.create_share_network(
-            cleanup_in_class=True)
+            cleanup_in_class=True)['share_network']
         cls.share_network_id = cls.share_network['id']
         cls.share_type = cls.create_share_type()
-        cls.az = cls.shares_v2_client.list_availability_zones()[0]
+        cls.az = (
+            cls.shares_v2_client.list_availability_zones()
+            ['availability_zones'][0]
+        )
         cls.az_name = cls.az['name']
 
     @decorators.idempotent_id('d20b6105-22d1-4fc0-8468-45dd019240c0')
@@ -70,7 +73,8 @@
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
     @ddt.data(True, False)
     def test_add_share_network_subnet_in_same_az_exists(self, is_default):
-        share_network = self.shares_v2_client.create_share_network()
+        share_network = self.shares_v2_client.create_share_network(
+            )['share_network']
         data = {}
 
         if not is_default:
@@ -118,7 +122,8 @@
         # Generate subnet data
         data = self.generate_subnet_data()
         data['share_network_id'] = self.share_network_id
-        az = self.shares_v2_client.list_availability_zones()[0]
+        az = self.shares_v2_client.list_availability_zones(
+            )['availability_zones'][0]
         data['availability_zone'] = az['name']
 
         subnet = self.create_share_network_subnet(**data)
@@ -131,7 +136,7 @@
                                             subnet['id'])
         share_network = self.shares_v2_client.get_share_network(
             self.share_network_id
-        )
+        )['share_network']
 
         self.assertIsNotNone(share_network)
         self.assertRaises(lib_exc.NotFound,
@@ -153,7 +158,7 @@
 
         share_network = self.shares_v2_client.get_share_network(
             self.shares_v2_client.share_network_id
-        )
+        )['share_network']
         share_network_id = share_network['id']
         subnet = utils.share_network_get_default_subnet(share_network)
 
@@ -171,13 +176,14 @@
                 'availability_zone': az}
 
         # Create a share into the share network
-        share = self.shares_v2_client.create_share(**args)
+        share = self.shares_v2_client.create_share(**args)['share']
         waiters.wait_for_resource_status(
             self.shares_v2_client, share['id'], constants.STATUS_AVAILABLE)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
 
         # Gets the export locations to be used in the future
-        el = self.shares_v2_client.list_share_export_locations(share['id'])
+        el = self.shares_v2_client.list_share_export_locations(
+            share['id'])['export_locations']
         share['export_locations'] = el
 
         # Unmanages the share to make the share server become is_auto
@@ -200,7 +206,7 @@
             name='share_to_be_deleted',
             description='share managed to be deleted',
             share_server_id=share['share_server_id']
-        )
+        )['share']
 
         # Do some necessary cleanup
         waiters.wait_for_resource_status(
@@ -228,7 +234,7 @@
 
         original_share_network = self.shares_v2_client.get_share_network(
             self.shares_v2_client.share_network_id
-        )
+        )['share_network']
         share_net_info = (
             utils.share_network_get_default_subnet(original_share_network))
         share_network = self.create_share_network(
@@ -237,7 +243,7 @@
         )
         share_network = self.shares_v2_client.get_share_network(
             share_network['id']
-        )
+        )['share_network']
         share_network_id = share_network['id']
         default_subnet = share_network['share_network_subnets'][0]
 
@@ -255,13 +261,13 @@
                 'availability_zone': az}
 
         # Create a share into the share network
-        share = self.shares_v2_client.create_share(**args)
+        share = self.shares_v2_client.create_share(**args)['share']
         waiters.wait_for_resource_status(
             self.shares_v2_client, share['id'], constants.STATUS_AVAILABLE)
-        share = self.admin_shares_v2_client.get_share(share['id'])
+        share = self.admin_shares_v2_client.get_share(share['id'])['share']
         share_server = self.admin_shares_v2_client.show_share_server(
             share['share_server_id']
-        )
+        )['share_server']
         # Match share server subnet
         self.assertEqual(subnet['id'],
                          share_server['share_network_subnet_id'])
diff --git a/manila_tempest_tests/tests/api/test_share_networks.py b/manila_tempest_tests/tests/api/test_share_networks.py
index 0d2648a..bd45ed1 100644
--- a/manila_tempest_tests/tests/api/test_share_networks.py
+++ b/manila_tempest_tests/tests/api/test_share_networks.py
@@ -30,7 +30,7 @@
     @tc.attr("gate", "smoke", )
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_list_share_networks(self):
-        listed = self.shares_client.list_share_networks()
+        listed = self.shares_client.list_share_networks()['share_networks']
         any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
 
         # verify keys
@@ -41,7 +41,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_try_list_share_networks_all_tenants(self):
         listed = self.shares_client.list_share_networks_with_detail(
-            params={'all_tenants': 1})
+            params={'all_tenants': 1})['share_networks']
         any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
 
         # verify keys
@@ -52,7 +52,7 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_try_list_share_networks_project_id(self):
         listed = self.shares_client.list_share_networks_with_detail(
-            params={'project_id': 'some_project'})
+            params={'project_id': 'some_project'})['share_networks']
         any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
 
         # verify keys
@@ -62,7 +62,8 @@
     @decorators.idempotent_id('285c7a91-1703-42a5-86c8-2463edde60e2')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_list_share_networks_with_detail(self):
-        listed = self.shares_v2_client.list_share_networks_with_detail()
+        listed = self.shares_v2_client.list_share_networks_with_detail(
+            )['share_networks']
         any(self.sn_with_ldap_ss["id"] in sn["id"] for sn in listed)
 
         # verify keys
@@ -100,12 +101,12 @@
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_list_share_networks_filter_by_ss(self):
         listed = self.shares_client.list_share_networks_with_detail(
-            {'security_service_id': self.ss_ldap['id']})
+            {'security_service_id': self.ss_ldap['id']})['share_networks']
         self.assertTrue(any(self.sn_with_ldap_ss['id'] == sn['id']
                             for sn in listed))
         for sn in listed:
             ss_list = self.shares_client.list_sec_services_for_share_network(
-                sn['id'])
+                sn['id'])['security_services']
             self.assertTrue(any(ss['id'] == self.ss_ldap['id']
                                 for ss in ss_list))
 
@@ -119,7 +120,7 @@
         }
 
         listed = self.shares_v2_client.list_share_networks_with_detail(
-            {'name~': 'ldap_ss', 'description~': 'fa'})
+            {'name~': 'ldap_ss', 'description~': 'fa'})['share_networks']
         self.assertTrue(any(self.sn_with_ldap_ss['id'] == sn['id']
                             for sn in listed))
         for sn in listed:
@@ -142,7 +143,7 @@
         }
 
         listed = self.shares_client.list_share_networks_with_detail(
-            valid_filter_opts)
+            valid_filter_opts)['share_networks']
         self.assertTrue(any(self.sn_with_ldap_ss['id'] == sn['id']
                             for sn in listed))
         created_before = valid_filter_opts.pop('created_before')
@@ -221,7 +222,8 @@
         data = self.generate_share_network_data()
 
         # create share network
-        created = self.shares_client.create_share_network(**data)
+        created = self.shares_client.create_share_network(
+            **data)['share_network']
         self.assertDictContainsSubset(data, created)
 
         # Delete share_network
@@ -230,7 +232,8 @@
     @decorators.idempotent_id('55990ec2-37f0-483f-9c67-76fd6f377cc1')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API)
     def test_get_share_network(self):
-        get = self.shares_client.get_share_network(self.sn_with_ldap_ss["id"])
+        get = self.shares_client.get_share_network(
+            self.sn_with_ldap_ss["id"])['share_network']
         self.assertEqual('2002-02-02T00:00:00.000000', get['created_at'])
         data = self.data_sn_with_ldap_ss.copy()
         del data['created_at']
@@ -242,7 +245,7 @@
         update_data = self.generate_share_network_data()
         updated = self.shares_client.update_share_network(
             self.sn_with_ldap_ss["id"],
-            **update_data)
+            **update_data)['share_network']
         self.assertDictContainsSubset(update_data, updated)
 
     @decorators.idempotent_id('198a5c08-3aaf-4623-9720-95d33ebe3376')
@@ -257,7 +260,8 @@
             "description": "new_description",
         }
         updated = self.shares_client.update_share_network(
-            self.shares_client.share_network_id, **update_dict)
+            self.shares_client.share_network_id,
+            **update_dict)['share_network']
         self.assertDictContainsSubset(update_dict, updated)
 
     @decorators.idempotent_id('7595a844-a28e-476c-89f1-4d3193ce9d5b')
@@ -267,14 +271,14 @@
         data = self.generate_share_network_data()
 
         # create share network
-        sn1 = self.shares_client.create_share_network(**data)
+        sn1 = self.shares_client.create_share_network(**data)['share_network']
         self.assertDictContainsSubset(data, sn1)
 
         # Delete first share network
         self.shares_client.delete_share_network(sn1["id"])
 
         # create second share network with same data
-        sn2 = self.shares_client.create_share_network(**data)
+        sn2 = self.shares_client.create_share_network(**data)['share_network']
         self.assertDictContainsSubset(data, sn2)
 
         # Delete second share network
@@ -308,7 +312,7 @@
         self.create_share(share_type_id=self.share_type_id,
                           cleanup_in_class=False)
         share_net_details = self.shares_v2_client.get_share_network(
-            self.shares_v2_client.share_network_id)
+            self.shares_v2_client.share_network_id)['share_network']
         share_net_info = (
             utils.share_network_get_default_subnet(share_net_details)
             if utils.share_network_subnets_are_supported()
@@ -332,7 +336,7 @@
         self.create_share(share_type_id=self.share_type_id,
                           cleanup_in_class=False)
         share_net_details = self.shares_v2_client.get_share_network(
-            self.shares_v2_client.share_network_id)
+            self.shares_v2_client.share_network_id)['share_network']
         share_net_info = (
             utils.share_network_get_default_subnet(share_net_details)
             if utils.share_network_subnets_are_supported()
diff --git a/manila_tempest_tests/tests/api/test_share_networks_negative.py b/manila_tempest_tests/tests/api/test_share_networks_negative.py
index 16497bb..17e0c12 100644
--- a/manila_tempest_tests/tests/api/test_share_networks_negative.py
+++ b/manila_tempest_tests/tests/api/test_share_networks_negative.py
@@ -126,7 +126,7 @@
     def test_try_delete_share_network_with_existing_shares(self):
         # Get valid network data for successful share creation
         share_network = self.shares_client.get_share_network(
-            self.shares_client.share_network_id)
+            self.shares_client.share_network_id)['share_network']
         new_sn = self.create_share_network(
             neutron_net_id=share_network['neutron_net_id'],
             neutron_subnet_id=share_network['neutron_subnet_id'],
@@ -152,7 +152,7 @@
         }
         share_networks = (
             self.shares_v2_client.list_share_networks_with_detail(
-                params=filters))
+                params=filters)['share_networks'])
 
         self.assertEqual(0, len(share_networks))
 
@@ -161,7 +161,8 @@
     @tc.attr(base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND)
     def test_delete_share_network_contains_more_than_one_subnet(self):
         share_network = self.create_share_network()
-        az = self.shares_v2_client.list_availability_zones()[0]
+        az = self.shares_v2_client.list_availability_zones(
+            )['availability_zones'][0]
         az_name = az['name']
 
         # Generate subnet data
@@ -181,7 +182,7 @@
 
         self.shares_v2_client.delete_subnet(share_network['id'], subnet['id'])
         share_network = self.shares_v2_client.get_share_network(
-            share_network['id'])
+            share_network['id'])['share_network']
         default_subnet = share_network['share_network_subnets'][0]
         self.assertIsNone(default_subnet['availability_zone'])
 
diff --git a/manila_tempest_tests/tests/api/test_share_type_availability_zones.py b/manila_tempest_tests/tests/api/test_share_type_availability_zones.py
index fead3ab..7da527f 100644
--- a/manila_tempest_tests/tests/api/test_share_type_availability_zones.py
+++ b/manila_tempest_tests/tests/api/test_share_type_availability_zones.py
@@ -108,7 +108,7 @@
             self.share_type_id, self.az_spec, self.invalid_azs_spec)
         share = self.create_share(share_type_id=self.share_type_id,
                                   cleanup_in_class=False, version='2.47')
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         # Test default scheduler behavior: the share type capabilities should
         # have ensured the share landed in an AZ that is supported
         # regardless of the 'availability_zones' extra-spec
@@ -126,7 +126,7 @@
             'availability_zone': self.valid_azs[0] if specify_az else None,
         }
         share = self.create_share(**kwargs)
-        share = self.shares_v2_client.get_share(share['id'])
+        share = self.shares_v2_client.get_share(share['id'])['share']
         if specify_az:
             self.assertEqual(self.valid_azs[0], share['availability_zone'])
         else:
@@ -146,7 +146,8 @@
         }
         # Create share group
         share_group = self.create_share_group(**kwargs)
-        share_group = self.shares_v2_client.get_share_group(share_group['id'])
+        share_group = self.shares_v2_client.get_share_group(
+            share_group['id'])['share_group']
         if specify_az:
             self.assertEqual(self.valid_azs[0],
                              share_group['availability_zone'])
diff --git a/manila_tempest_tests/tests/api/test_shares.py b/manila_tempest_tests/tests/api/test_shares.py
index 7a26731..3ff87b2 100644
--- a/manila_tempest_tests/tests/api/test_shares.py
+++ b/manila_tempest_tests/tests/api/test_shares.py
@@ -72,12 +72,14 @@
         self.assertIn(share['status'], ('creating', 'available'))
 
         # Get share using v 2.1 - we expect key 'snapshot_support' to be absent
-        share_get = self.shares_v2_client.get_share(share['id'], version='2.1')
+        share_get = self.shares_v2_client.get_share(
+            share['id'], version='2.1')['share']
         detailed_elements.add('export_location')
         self.assertTrue(detailed_elements.issubset(share_get.keys()), msg)
 
         # Get share using v 2.2 - we expect key 'snapshot_support' to exist
-        share_get = self.shares_v2_client.get_share(share['id'], version='2.2')
+        share_get = self.shares_v2_client.get_share(
+            share['id'], version='2.2')['share']
         detailed_elements.add('snapshot_support')
         self.assertTrue(detailed_elements.issubset(share_get.keys()), msg)
 
@@ -85,7 +87,7 @@
             # Get share using v 2.9 - key 'export_location' is expected
             # to be absent
             share_get = self.shares_v2_client.get_share(
-                share['id'], version='2.9')
+                share['id'], version='2.9')['share']
             detailed_elements.remove('export_location')
             self.assertTrue(detailed_elements.issubset(share_get.keys()), msg)
 
@@ -197,7 +199,7 @@
         self.assertIn(s2['status'], ('creating', 'available'))
 
         # verify share, created from snapshot
-        get = self.shares_client.get_share(s2["id"])
+        get = self.shares_client.get_share(s2["id"])['share']
         msg = ("Expected snapshot_id %s as "
                "source of share %s" % (snap["id"], get["snapshot_id"]))
         self.assertEqual(get["snapshot_id"], snap["id"], msg)
@@ -227,7 +229,7 @@
                                   cleanup_in_class=False)
 
         # get parent share
-        parent = self.shares_client.get_share(share["id"])
+        parent = self.shares_client.get_share(share["id"])['share']
 
         # create snapshot
         snap = self.create_snapshot_wait_for_active(share["id"],
@@ -245,7 +247,7 @@
         self.assertIn(child['status'], ('creating', 'available'))
 
         # verify share, created from snapshot
-        get = self.shares_client.get_share(child["id"])
+        get = self.shares_client.get_share(child["id"])['share']
         keys = {
             "share": share["id"],
             "actual_sn": get["share_network_id"],
diff --git a/manila_tempest_tests/tests/api/test_shares_actions.py b/manila_tempest_tests/tests/api/test_shares_actions.py
index 873a08c..4cdc70d 100644
--- a/manila_tempest_tests/tests/api/test_shares_actions.py
+++ b/manila_tempest_tests/tests/api/test_shares_actions.py
@@ -93,7 +93,7 @@
 
         # get share
         share = self.shares_v2_client.get_share(
-            self.shares[0]['id'], version=six.text_type(version))
+            self.shares[0]['id'], version=six.text_type(version))['share']
 
         # verify keys
         expected_keys = [
@@ -195,7 +195,7 @@
     def test_list_shares(self):
 
         # list shares
-        shares = self.shares_v2_client.list_shares()
+        shares = self.shares_v2_client.list_shares()['shares']
 
         # verify keys
         keys = ["name", "id", "links"]
@@ -211,7 +211,7 @@
 
         # list shares
         shares = self.shares_v2_client.list_shares_with_detail(
-            version=six.text_type(version))
+            version=six.text_type(version))['shares']
 
         # verify keys
         keys = [
@@ -305,7 +305,8 @@
         filters = {'metadata': self.metadata}
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -320,11 +321,13 @@
     @testtools.skipIf(
         not CONF.share.multitenancy_enabled, "Only for multitenancy.")
     def test_list_shares_with_detail_filter_by_share_network_id(self):
-        base_share = self.shares_client.get_share(self.shares[0]['id'])
+        base_share = self.shares_client.get_share(
+            self.shares[0]['id'])['share']
         filters = {'share_network_id': base_share['share_network_id']}
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -343,7 +346,8 @@
         filters = {'snapshot_id': self.snap['id']}
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -357,7 +361,8 @@
         filters = {'sort_key': 'created_at', 'sort_dir': 'asc'}
 
         # list shares
-        shares = self.shares_client.list_shares_with_detail(params=filters)
+        shares = self.shares_client.list_shares_with_detail(
+            params=filters)['shares']
 
         # verify response
         self.assertGreater(len(shares), 0)
@@ -369,7 +374,8 @@
     def test_list_shares_with_detail_filter_by_existed_name(self):
         # list shares by name, at least one share is expected
         params = {"name": self.share_name}
-        shares = self.shares_client.list_shares_with_detail(params)
+        shares = self.shares_client.list_shares_with_detail(
+            params)['shares']
         self.assertEqual(self.share_name, shares[0]["name"])
 
     @decorators.idempotent_id('f446e8cb-5bef-45ac-8b87-f4136f44ca69')
@@ -378,7 +384,8 @@
     def test_list_shares_with_detail_filter_by_existed_description(self):
         # list shares by description, at least one share is expected
         params = {"description": self.share_desc}
-        shares = self.shares_v2_client.list_shares_with_detail(params)
+        shares = self.shares_v2_client.list_shares_with_detail(
+            params)['shares']
         self.assertEqual(self.share_name, shares[0]["name"])
 
     @decorators.idempotent_id('1276b97b-cf46-4953-973f-f995985a1ce4')
@@ -387,7 +394,8 @@
     def test_list_shares_with_detail_filter_by_inexact_name(self):
         # list shares by name, at least one share is expected
         params = {"name~": 'tempest-share'}
-        shares = self.shares_v2_client.list_shares_with_detail(params)
+        shares = self.shares_v2_client.list_shares_with_detail(
+            params)['shares']
         for share in shares:
             self.assertIn('tempest-share', share["name"])
 
@@ -396,7 +404,7 @@
     def test_list_shares_with_detail_filter_by_fake_name(self):
         # list shares by fake name, no shares are expected
         params = {"name": data_utils.rand_name("fake-nonexistent-name")}
-        shares = self.shares_client.list_shares_with_detail(params)
+        shares = self.shares_client.list_shares_with_detail(params)['shares']
         self.assertEqual(0, len(shares))
 
     @decorators.idempotent_id('708e3e2e-8761-4d16-b18d-a834ee7ca69e')
@@ -404,7 +412,7 @@
     def test_list_shares_with_detail_filter_by_active_status(self):
         # list shares by active status, at least one share is expected
         params = {"status": "available"}
-        shares = self.shares_client.list_shares_with_detail(params)
+        shares = self.shares_client.list_shares_with_detail(params)['shares']
         self.assertGreater(len(shares), 0)
         for share in shares:
             self.assertEqual(params["status"], share["status"])
@@ -414,7 +422,7 @@
     def test_list_shares_with_detail_filter_by_fake_status(self):
         # list shares by fake status, no shares are expected
         params = {"status": 'fake'}
-        shares = self.shares_client.list_shares_with_detail(params)
+        shares = self.shares_client.list_shares_with_detail(params)['shares']
         self.assertEqual(0, len(shares))
 
     @decorators.idempotent_id('7609b7bb-613e-474d-a9b3-e41584842503')
@@ -422,11 +430,11 @@
     def test_list_shares_with_detail_filter_by_all_tenants(self):
         # non-admin user can get shares only from his project
         params = {"all_tenants": 1}
-        shares = self.shares_client.list_shares_with_detail(params)
+        shares = self.shares_client.list_shares_with_detail(params)['shares']
         self.assertGreater(len(shares), 0)
 
         # get share with detailed info, we need its 'project_id'
-        share = self.shares_client.get_share(self.shares[0]["id"])
+        share = self.shares_client.get_share(self.shares[0]["id"])['share']
         project_id = share["project_id"]
         for share in shares:
             self.assertEqual(project_id, share["project_id"])
@@ -449,11 +457,12 @@
 
         # get snapshot
         if version is None:
-            snapshot = self.shares_client.get_snapshot(self.snap["id"])
+            snapshot = self.shares_client.get_snapshot(
+                self.snap["id"])['snapshot']
         else:
             utils.check_skip_if_microversion_not_supported(version)
             snapshot = self.shares_v2_client.get_snapshot(
-                self.snap["id"], version=version)
+                self.snap["id"], version=version)['snapshot']
 
         # verify keys
         expected_keys = ["status", "links", "share_id", "name",
@@ -504,7 +513,7 @@
     def test_list_snapshots(self):
 
         # list share snapshots
-        snaps = self.shares_client.list_snapshots()
+        snaps = self.shares_client.list_snapshots()['snapshots']
 
         # verify keys
         keys = ["id", "name", "links"]
@@ -526,11 +535,12 @@
             params = {'name~': 'tempest', 'description~': 'tempest'}
         # list share snapshots
         if version is None:
-            snaps = self.shares_client.list_snapshots_with_detail()
+            snaps = self.shares_client.list_snapshots_with_detail(
+                )['snapshots']
         else:
             utils.check_skip_if_microversion_not_supported(version)
             snaps = self.shares_v2_client.list_snapshots_with_detail(
-                version=version, params=params)
+                version=version, params=params)['snapshots']
 
         # verify keys
         expected_keys = ["status", "links", "share_id", "name",
@@ -561,7 +571,7 @@
 
             # list snapshots
             snaps = self.shares_client.list_snapshots_with_detail(
-                params=filters)
+                params=filters)['snapshots']
 
             # Our snapshot should not be listed
             self.assertEqual(0, len(snaps))
@@ -569,10 +579,10 @@
         # Only our one snapshot should be listed
         snaps = self.shares_client.list_snapshots_with_detail(
             params={'limit': '1', 'offset': '0',
-                    'share_id': self.shares[0]['id']})
+                    'share_id': self.shares[0]['id']})['snapshots']
 
-        self.assertEqual(1, len(snaps['snapshots']))
-        self.assertEqual(self.snap['id'], snaps['snapshots'][0]['id'])
+        self.assertEqual(1, len(snaps))
+        self.assertEqual(self.snap['id'], snaps[0]['id'])
 
     @decorators.idempotent_id('0a94e996-c4db-4fef-b486-4004ea65c11a')
     @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
@@ -583,7 +593,7 @@
 
         # list snapshots
         snaps = self.shares_client.list_snapshots_with_detail(
-            params=filters)
+            params=filters)['snapshots']
 
         # verify response
         self.assertGreater(len(snaps), 0)
@@ -601,7 +611,7 @@
 
         # list snapshots
         snaps = self.shares_client.list_snapshots_with_detail(
-            params=filters)
+            params=filters)['snapshots']
 
         # verify response
         self.assertGreater(len(snaps), 0)
@@ -617,7 +627,7 @@
 
         # list snapshots
         snaps = self.shares_client.list_snapshots_with_detail(
-            params=filters)
+            params=filters)['snapshots']
 
         # verify response
         self.assertGreater(len(snaps), 0)
@@ -640,7 +650,7 @@
             self.shares_client, share['id'], 'available')
 
         # check state and new size
-        share_get = self.shares_v2_client.get_share(share['id'])
+        share_get = self.shares_v2_client.get_share(share['id'])['share']
         msg = (
             "Share could not be extended. "
             "Expected %(expected)s, got %(actual)s." % {
@@ -668,7 +678,7 @@
             self.shares_client, share['id'], 'available')
 
         # check state and new size
-        share_get = self.shares_v2_client.get_share(share['id'])
+        share_get = self.shares_v2_client.get_share(share['id'])['share']
         msg = (
             "Share could not be shrunk. "
             "Expected %(expected)s, got %(actual)s." % {
@@ -713,7 +723,7 @@
     def test_update_share(self):
 
         # get share
-        share = self.shares_client.get_share(self.share['id'])
+        share = self.shares_client.get_share(self.share['id'])['share']
         self.assertEqual(self.share_name, share["name"])
         self.assertEqual(self.share_desc, share["description"])
         self.assertFalse(share["is_public"])
@@ -722,12 +732,12 @@
         new_name = data_utils.rand_name("tempest-new-name")
         new_desc = data_utils.rand_name("tempest-new-description")
         updated = self.shares_client.update_share(
-            share["id"], name=new_name, desc=new_desc)
+            share["id"], name=new_name, desc=new_desc)['share']
         self.assertEqual(new_name, updated["name"])
         self.assertEqual(new_desc, updated["description"])
 
         # get share
-        share = self.shares_client.get_share(self.share['id'])
+        share = self.shares_client.get_share(self.share['id'])['share']
         self.assertEqual(new_name, share["name"])
         self.assertEqual(new_desc, share["description"])
         self.assertFalse(share["is_public"])
@@ -739,7 +749,7 @@
     def test_rename_snapshot(self):
 
         # get snapshot
-        get = self.shares_client.get_snapshot(self.snap["id"])
+        get = self.shares_client.get_snapshot(self.snap["id"])['snapshot']
         self.assertEqual(self.snap_name, get["name"])
         self.assertEqual(self.snap_desc, get["description"])
 
@@ -747,11 +757,11 @@
         new_name = data_utils.rand_name("tempest-new-name-for-snapshot")
         new_desc = data_utils.rand_name("tempest-new-description-for-snapshot")
         renamed = self.shares_client.rename_snapshot(
-            self.snap["id"], new_name, new_desc)
+            self.snap["id"], new_name, new_desc)['snapshot']
         self.assertEqual(new_name, renamed["name"])
         self.assertEqual(new_desc, renamed["description"])
 
         # get snapshot
-        get = self.shares_client.get_snapshot(self.snap["id"])
+        get = self.shares_client.get_snapshot(self.snap["id"])['snapshot']
         self.assertEqual(new_name, get["name"])
         self.assertEqual(new_desc, get["description"])
diff --git a/manila_tempest_tests/tests/api/test_shares_actions_negative.py b/manila_tempest_tests/tests/api/test_shares_actions_negative.py
index bd87499..dfd92a8 100644
--- a/manila_tempest_tests/tests/api/test_shares_actions_negative.py
+++ b/manila_tempest_tests/tests/api/test_shares_actions_negative.py
@@ -65,7 +65,7 @@
         "Quota tests are disabled.")
     def test_share_extend_over_quota(self):
         tenant_quotas = self.shares_client.show_quotas(
-            self.shares_client.tenant_id)
+            self.shares_client.tenant_id)['quota_set']
         new_size = int(tenant_quotas["gigabytes"]) + 1
 
         # extend share with over quota and check result
@@ -183,7 +183,7 @@
             'export_location_' + export_location_type: 'fake',
         }
         shares = self.shares_v2_client.list_shares(
-            params=filters, version="2.34")
+            params=filters, version="2.34")['shares']
 
         self.assertGreater(len(shares), 0)
 
@@ -197,7 +197,7 @@
             'export_location_' + export_location_type: 'fake_not_exist',
         }
         shares = self.shares_v2_client.list_shares(
-            params=filters)
+            params=filters)['shares']
 
         self.assertEqual(0, len(shares))
 
@@ -213,7 +213,7 @@
             'description~': 'fake',
         }
         shares = self.shares_v2_client.list_shares(
-            params=filters, version="2.35")
+            params=filters, version="2.35")['shares']
 
         self.assertGreater(len(shares), 0)
 
@@ -225,7 +225,7 @@
             'name~': 'fake_not_exist',
             'description~': 'fake_not_exist',
         }
-        shares = self.shares_v2_client.list_shares(params=filters)
+        shares = self.shares_v2_client.list_shares(params=filters)['shares']
 
         self.assertEqual(0, len(shares))
 
@@ -235,7 +235,7 @@
         filters = {
             'name': "tempest-share",
         }
-        shares = self.shares_v2_client.list_shares(params=filters)
+        shares = self.shares_v2_client.list_shares(params=filters)['shares']
 
         self.assertEqual(0, len(shares))
 
@@ -246,7 +246,7 @@
         filters = {
             'description': "tempest-share",
         }
-        shares = self.shares_v2_client.list_shares(params=filters)
+        shares = self.shares_v2_client.list_shares(params=filters)['shares']
 
         self.assertEqual(0, len(shares))
 
@@ -258,7 +258,7 @@
             'description': "tempest-snapshot",
         }
         shares = self.shares_v2_client.list_snapshots_with_detail(
-            params=filters)
+            params=filters)['snapshots']
 
         self.assertEqual(0, len(shares))
 
@@ -269,7 +269,7 @@
             'name': "tempest-snapshot",
         }
         shares = self.shares_v2_client.list_snapshots_with_detail(
-            params=filters)
+            params=filters)['snapshots']
 
         self.assertEqual(0, len(shares))
 
diff --git a/manila_tempest_tests/tests/api/test_shares_from_snapshot_across_pools.py b/manila_tempest_tests/tests/api/test_shares_from_snapshot_across_pools.py
index d01fd73..27c7e37 100644
--- a/manila_tempest_tests/tests/api/test_shares_from_snapshot_across_pools.py
+++ b/manila_tempest_tests/tests/api/test_shares_from_snapshot_across_pools.py
@@ -104,7 +104,7 @@
 
         # Retrieving the share using admin client because the shares's host
         # field is necessary to do the assert
-        share_get_a = self.admin_client.get_share(share_a["id"])
+        share_get_a = self.admin_client.get_share(share_a["id"])['share']
 
         # Create snapshot from source share
         snap = self.create_snapshot_wait_for_active(share_get_a["id"])
@@ -121,7 +121,7 @@
 
         # Retrieving the share using admin client because the shares's host
         # field is necessary to do the assert
-        share_get_b = self.admin_client.get_share(share_b['id'])
+        share_get_b = self.admin_client.get_share(share_b['id'])['share']
 
         # Verify share created from snapshot
         msg = ("Expected snapshot_id %s as "
diff --git a/manila_tempest_tests/tests/api/test_shares_negative.py b/manila_tempest_tests/tests/api/test_shares_negative.py
index 8e4917f..43e30e3 100644
--- a/manila_tempest_tests/tests/api/test_shares_negative.py
+++ b/manila_tempest_tests/tests/api/test_shares_negative.py
@@ -117,9 +117,9 @@
                                   cleanup_in_class=False)
 
         # get parent's share network
-        parent_share = self.shares_client.get_share(share["id"])
+        parent_share = self.shares_client.get_share(share["id"])['share']
         parent_sn = self.shares_client.get_share_network(
-            parent_share["share_network_id"])
+            parent_share["share_network_id"])['share_network']
 
         # create new share-network - net duplicate of parent's share
         new_duplicated_sn = self.create_share_network(
diff --git a/manila_tempest_tests/tests/api/test_snapshot_rules.py b/manila_tempest_tests/tests/api/test_snapshot_rules.py
index e6b7271..541e861 100644
--- a/manila_tempest_tests/tests/api/test_snapshot_rules.py
+++ b/manila_tempest_tests/tests/api/test_snapshot_rules.py
@@ -50,14 +50,15 @@
     def _test_create_delete_access_rules(self, access_to):
         # create rule
         rule = self.shares_v2_client.create_snapshot_access_rule(
-            self.snapshot['id'], self.access_type, access_to)
+            self.snapshot['id'], self.access_type,
+            access_to)['snapshot_access']
 
         for key in ('deleted', 'deleted_at', 'instance_mappings'):
             self.assertNotIn(key, list(six.iterkeys(rule)))
 
         waiters.wait_for_resource_status(
             self.shares_v2_client, self.snapshot['id'], 'active',
-            resource_name='snapshot_access_rule', rule_id=rule['id'],
+            resource_name='snapshot_access', rule_id=rule['id'],
             status_attr='state')
 
         # delete rule and wait for deletion
diff --git a/manila_tempest_tests/tests/api/test_snapshot_rules_negative.py b/manila_tempest_tests/tests/api/test_snapshot_rules_negative.py
index 7db47f3..647911e 100644
--- a/manila_tempest_tests/tests/api/test_snapshot_rules_negative.py
+++ b/manila_tempest_tests/tests/api/test_snapshot_rules_negative.py
@@ -94,11 +94,11 @@
 
         # create rule
         rule = self.shares_v2_client.create_snapshot_access_rule(
-            self.snap['id'], access_type, access_to)
+            self.snap['id'], access_type, access_to)['snapshot_access']
 
         waiters.wait_for_resource_status(
             self.shares_v2_client, self.snap['id'], 'active',
-            resource_name='snapshot_access_rule', rule_id=rule['id'],
+            resource_name='snapshot_access', rule_id=rule['id'],
             status_attr='state')
 
         # try create duplicate of rule
diff --git a/manila_tempest_tests/tests/scenario/manager_share.py b/manila_tempest_tests/tests/scenario/manager_share.py
index 52dc7f0..2e40569 100644
--- a/manila_tempest_tests/tests/scenario/manager_share.py
+++ b/manila_tempest_tests/tests/scenario/manager_share.py
@@ -198,7 +198,7 @@
         # NOTE(u_glide): Workaround for bug #1465682
         remote_client = remote_client.ssh_client
 
-        self.share = self.shares_client.get_share(self.share['id'])
+        self.share = self.shares_client.get_share(self.share['id'])['share']
         return remote_client
 
     def validate_ping_to_export_location(self, export, remote_client,
@@ -411,7 +411,8 @@
                 self.__class__.__name__ + '-cephx-id')
             # Check if access is already granted to the client
             access_rules_matching_client = client.list_access_rules(
-                share['id'], metadata={'metadata': {'access_to': access_to}})
+                share['id'],
+                metadata={'metadata': {'access_to': access_to}})['access_list']
             access_rule = (access_rules_matching_client[0] if
                            access_rules_matching_client else None)
 
@@ -426,7 +427,7 @@
                 client.update_access_metadata(
                     metadata={"access_to": "{}".format(access_to)},
                     access_id=access_rule['id'])
-        get_access = client.get_access_rule(access_rule['id'])
+        get_access = client.get_access_rule(access_rule['id'])['access']
         # Set 'access_key' and 'access_to' attributes for being use in mount
         # operation.
         setattr(self, 'access_key', get_access['access_key'])
@@ -471,13 +472,13 @@
             locations = share['export_locations']
         else:
             exports = self.shares_v2_client.list_share_export_locations(
-                share['id'])
+                share['id'])['export_locations']
             locations = [x['path'] for x in exports]
         return locations
 
     def _get_snapshot_export_locations(self, snapshot):
-        exports = (self.shares_v2_client.
-                   list_snapshot_export_locations(snapshot['id']))
+        exports = (self.shares_v2_client.list_snapshot_export_locations(
+            snapshot['id'])['share_snapshot_export_locations'])
         locations = [x['path'] for x in exports]
 
         return locations
@@ -529,7 +530,7 @@
             'share_network_id': share_network_id,
             'share_type_id': share_type_id,
         }
-        share = self.shares_client.create_share(**kwargs)
+        share = self.shares_client.create_share(**kwargs)['share']
 
         if cleanup:
             self.addCleanup(client.wait_for_resource_deletion,
@@ -543,7 +544,7 @@
 
     def _create_snapshot(self, share_id, client=None, **kwargs):
         client = client or self.shares_v2_client
-        snapshot = client.create_snapshot(share_id, **kwargs)
+        snapshot = client.create_snapshot(share_id, **kwargs)['snapshot']
         self.addCleanup(
             client.wait_for_resource_deletion, snapshot_id=snapshot['id'])
         self.addCleanup(client.delete_snapshot, snapshot['id'])
@@ -559,7 +560,7 @@
         """
         client = client or self.shares_admin_client
         servers = client.list_share_servers(
-            search_opts={"share_network": sn_id})
+            search_opts={"share_network": sn_id})['share_servers']
         for server in servers:
             client.delete_share_server(server['id'])
         for server in servers:
@@ -573,7 +574,7 @@
         """
 
         client = client or self.shares_client
-        sn = client.create_share_network(**kwargs)
+        sn = client.create_share_network(**kwargs)['share_network']
 
         self.addCleanup(client.wait_for_resource_deletion,
                         sn_id=sn['id'])
@@ -596,7 +597,7 @@
         """
         client = client or self.shares_v2_client
         access = client.create_access_rule(share_id, access_type, access_to,
-                                           access_level)
+                                           access_level)['access']
 
         share_waiters.wait_for_resource_status(
             client, share_id, "active", status_attr='access_rules_status')
@@ -618,7 +619,7 @@
         """
         client = client or self.shares_v2_client
         access = client.create_snapshot_access_rule(
-            snapshot_id, access_type, access_to)
+            snapshot_id, access_type, access_to)['snapshot_access']
 
         if cleanup:
             self.addCleanup(client.delete_snapshot_access_rule,
@@ -626,7 +627,7 @@
 
         share_waiters.wait_for_resource_status(
             client, snapshot_id, 'active',
-            resource_name='snapshot_access_rule', rule_id=access['id'],
+            resource_name='snapshot_access', rule_id=access['id'],
             status_attr='state')
 
         return access
diff --git a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
index e9e9a14..e440cb3 100644
--- a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
+++ b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
@@ -167,7 +167,8 @@
         self.create_share()
         export_location = self.get_user_export_locations(self.share)[0]
         instance = self.wait_for_active_instance(instance["id"])
-        self.share = self.shares_admin_v2_client.get_share(self.share['id'])
+        self.share = self.shares_admin_v2_client.get_share(
+            self.share['id'])['share']
 
         default_type = self.shares_v2_client.list_share_types(
             default=True)['share_type']
diff --git a/manila_tempest_tests/tests/scenario/test_share_extend.py b/manila_tempest_tests/tests/scenario/test_share_extend.py
index 76cfd2a..4b74f78 100644
--- a/manila_tempest_tests/tests/scenario/test_share_extend.py
+++ b/manila_tempest_tests/tests/scenario/test_share_extend.py
@@ -98,7 +98,7 @@
                                            new_size=extended_share_size)
         waiters.wait_for_resource_status(
             self.shares_v2_client, share["id"], constants.STATUS_AVAILABLE)
-        share = self.shares_v2_client.get_share(share["id"])
+        share = self.shares_v2_client.get_share(share["id"])['share']
         self.assertEqual(extended_share_size, int(share["size"]))
 
         LOG.debug('Step 8 - writing more data, should succeed')
diff --git a/manila_tempest_tests/tests/scenario/test_share_manage_unmanage.py b/manila_tempest_tests/tests/scenario/test_share_manage_unmanage.py
index aa164ea..7f4833d 100644
--- a/manila_tempest_tests/tests/scenario/test_share_manage_unmanage.py
+++ b/manila_tempest_tests/tests/scenario/test_share_manage_unmanage.py
@@ -89,14 +89,14 @@
             locations = share['export_locations']
         else:
             exports = self.shares_v2_client.list_share_export_locations(
-                share['id'])
+                share['id'])['export_locations']
             locations = [x['path'] for x in exports]
 
         LOG.debug('Step 5 - mount')
         self.mount_share(locations[0], remote_client)
 
         # Update share info, needed later
-        share = self.shares_admin_v2_client.get_share(share['id'])
+        share = self.shares_admin_v2_client.get_share(share['id'])['share']
 
         LOG.debug('Step 6a - create file')
         remote_client.exec_command("sudo touch /mnt/t1")
@@ -131,7 +131,7 @@
             share['host'],
             share['share_proto'],
             locations[0],
-            share_type['id'])
+            share_type['id'])['share']
         waiters.wait_for_resource_status(
             self.shares_admin_v2_client, managed_share['id'], 'available')
 
@@ -142,7 +142,7 @@
             client=self.shares_admin_v2_client)
 
         exports = self.shares_admin_v2_client.list_share_export_locations(
-            managed_share['id'])
+            managed_share['id'])['export_locations']
         locations = [x['path'] for x in exports]
 
         LOG.debug('Step 12 - mount')
@@ -165,7 +165,7 @@
             share['host'],
             share['share_proto'],
             locations[0],
-            share_type['id'])
+            share_type['id'])['share']
         waiters.wait_for_resource_status(
             self.shares_admin_v2_client, remanaged_share['id'], 'manage_error')
 
diff --git a/manila_tempest_tests/tests/scenario/test_share_shrink.py b/manila_tempest_tests/tests/scenario/test_share_shrink.py
index 241dbb3..2b68d8a 100644
--- a/manila_tempest_tests/tests/scenario/test_share_shrink.py
+++ b/manila_tempest_tests/tests/scenario/test_share_shrink.py
@@ -91,11 +91,12 @@
             self.shares_v2_client, share['id'],
             ['shrinking_possible_data_loss_error', 'available'])
 
-        share = self.shares_v2_client.get_share(share["id"])
+        share = self.shares_v2_client.get_share(share["id"])['share']
 
         if share["status"] == constants.STATUS_AVAILABLE:
             params = {'resource_id': share['id']}
-            messages = self.shares_v2_client.list_messages(params=params)
+            messages = self.shares_v2_client.list_messages(
+                params=params)['messages']
             self.assertIn('009',
                           [message['action_id'] for message in messages])
             self.assertEqual(share_size, int(share["size"]))
@@ -113,7 +114,7 @@
         self.share_shrink_retry_until_success(share["id"],
                                               new_size=default_share_size)
 
-        share = self.shares_v2_client.get_share(share["id"])
+        share = self.shares_v2_client.get_share(share["id"])['share']
         self.assertEqual(default_share_size, int(share["size"]))
 
         LOG.debug('Step 11 - write more data than allocated, should fail')
@@ -130,7 +131,7 @@
         """Try share reset, followed by shrink, until timeout"""
 
         check_interval = CONF.share.build_interval * 2
-        share = self.shares_v2_client.get_share(share_id)
+        share = self.shares_v2_client.get_share(share_id)['share']
         share_current_size = share["size"]
         share_status = share[status_attr]
         start = int(time.time())
@@ -149,7 +150,7 @@
                         break
 
             time.sleep(check_interval)
-            share = self.shares_v2_client.get_share(share_id)
+            share = self.shares_v2_client.get_share(share_id)['share']
             share_status = share[status_attr]
             share_current_size = share["size"]
             if share_current_size == new_size:
