diff --git a/manila_tempest_tests/common/waiters.py b/manila_tempest_tests/common/waiters.py
index e5ac0e1..5d8d344 100644
--- a/manila_tempest_tests/common/waiters.py
+++ b/manila_tempest_tests/common/waiters.py
@@ -33,7 +33,7 @@
 
 
 def _get_name_of_raise_method(resource_name):
-    if resource_name == 'snapshot_access_rule':
+    if resource_name == 'snapshot_access':
         return 'AccessRuleBuildErrorException'
     if resource_name == 'share_replica':
         return 'ShareInstanceBuildErrorException'
@@ -56,24 +56,30 @@
         'share_instance': 'get_share_instance',
         'snapshot_instance': 'get_snapshot_instance',
         'access_rule': 'list_access_rules',
-        'snapshot_access_rule': 'get_snapshot_access_rule',
+        'snapshot_access': 'list_snapshot_access_rules',
         'share_group': 'get_share_group',
         'share_group_snapshot': 'get_share_group_snapshot',
         'share_replica': 'get_share_replica',
     }
 
+    action_name = get_resource_action[resource_name]
+    # This code snippet is intended to set the dictionary key of the returned
+    # response for share access rule and for snapshot access rule.
+    if 'access' in resource_name:
+        rn = '_'.join(action_name.split('_')[1:-1]) + '_list'
+    else:
+        rn = resource_name
+
     # Since API v2 requests require an additional parameter for micro-versions,
     # it's necessary to pass the required parameters according to the version.
-    resource_action = getattr(client, get_resource_action[resource_name])
+    resource_action = getattr(client, action_name)
     method_args = [resource_id]
     method_kwargs = {}
     if isinstance(client, shares_client.SharesV2Client):
         method_kwargs.update({'version': version})
-        if resource_name == 'snapshot_access_rule':
-            method_args.insert(1, rule_id)
-    body = resource_action(*method_args, **method_kwargs)
+    body = resource_action(*method_args, **method_kwargs)[rn]
 
-    if resource_name == 'access_rule':
+    if 'access' in resource_name:
         status_attr = 'state'
         body = _get_access_rule(body, rule_id)
 
@@ -83,9 +89,9 @@
     exp_status = status if isinstance(status, list) else [status]
     while resource_status not in exp_status:
         time.sleep(client.build_interval)
-        body = resource_action(*method_args, **method_kwargs)
+        body = resource_action(*method_args, **method_kwargs)[rn]
 
-        if resource_name == 'access_rule':
+        if 'access' in resource_name:
             status_attr = 'state'
             body = _get_access_rule(body, rule_id)
 
@@ -111,12 +117,12 @@
     statuses = ((status_to_wait,)
                 if not isinstance(status_to_wait, (tuple, list, set))
                 else status_to_wait)
-    share = client.get_share(share_id, version=version)
+    share = client.get_share(share_id, version=version)['share']
     migration_timeout = CONF.share.migration_timeout
     start = int(time.time())
     while share['task_state'] not in statuses:
         time.sleep(client.build_interval)
-        share = client.get_share(share_id, version=version)
+        share = client.get_share(share_id, version=version)['share']
         if share['task_state'] in statuses:
             break
         elif share['task_state'] == 'migration_error':
@@ -165,7 +171,7 @@
 
     while not message:
         time.sleep(client.build_interval)
-        for msg in client.list_messages():
+        for msg in client.list_messages()['messages']:
             if msg['resource_id'] == resource_id:
                 return msg
 
diff --git a/manila_tempest_tests/services/share/json/shares_client.py b/manila_tempest_tests/services/share/json/shares_client.py
index 0370f15..770bbb9 100644
--- a/manila_tempest_tests/services/share/json/shares_client.py
+++ b/manila_tempest_tests/services/share/json/shares_client.py
@@ -76,12 +76,13 @@
         body = json.dumps(post_body)
         resp, body = self.post("shares", body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share(self, share_id):
         resp, body = self.delete("shares/%s" % share_id)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def manage_share(self, service_host, protocol, export_path,
                      share_type_id, name=None, description=None):
@@ -98,13 +99,14 @@
         body = json.dumps(post_body)
         resp, body = self.post("os-share-manage", body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def unmanage_share(self, share_id):
         resp, body = self.post(
             "os-share-unmanage/%s/unmanage" % share_id, None)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def list_shares(self, detailed=False, params=None):
         """Get list of shares w/o filters."""
@@ -112,7 +114,8 @@
         uri += '?%s' % urlparse.urlencode(params) if params else ''
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_shares_with_detail(self, params=None):
         """Get detailed list of shares w/o filters."""
@@ -121,7 +124,8 @@
     def get_share(self, share_id):
         resp, body = self.get("shares/%s" % share_id)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def create_access_rule(self, share_id, access_type="ip",
                            access_to="0.0.0.0", access_level=None):
@@ -135,13 +139,15 @@
         body = json.dumps(post_body)
         resp, body = self.post("shares/%s/action" % share_id, body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_access_rules(self, share_id):
         body = {"os-access_list": None}
         resp, body = self.post("shares/%s/action" % share_id, json.dumps(body))
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_access_rule(self, share_id, rule_id):
         post_body = {
@@ -152,7 +158,7 @@
         body = json.dumps(post_body)
         resp, body = self.post("shares/%s/action" % share_id, body)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def extend_share(self, share_id, new_size):
         post_body = {
@@ -163,7 +169,7 @@
         body = json.dumps(post_body)
         resp, body = self.post("shares/%s/action" % share_id, body)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def shrink_share(self, share_id, new_size):
         post_body = {
@@ -174,7 +180,7 @@
         body = json.dumps(post_body)
         resp, body = self.post("shares/%s/action" % share_id, body)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def create_snapshot(self, share_id, name=None, description=None,
                         force=False):
@@ -194,12 +200,14 @@
         body = json.dumps(post_body)
         resp, body = self.post("snapshots", body)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_snapshot(self, snapshot_id):
         resp, body = self.get("snapshots/%s" % snapshot_id)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_snapshots(self, detailed=False, params=None):
         """Get list of share snapshots w/o filters."""
@@ -207,7 +215,8 @@
         uri += '?%s' % urlparse.urlencode(params) if params else ''
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_snapshots_with_detail(self, params=None):
         """Get detailed list of share snapshots w/o filters."""
@@ -216,12 +225,13 @@
     def delete_snapshot(self, snap_id):
         resp, body = self.delete("snapshots/%s" % snap_id)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def default_quotas(self, tenant_id):
         resp, body = self.get("os-quota-sets/%s/defaults" % tenant_id)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def show_quotas(self, tenant_id, user_id=None):
         uri = "os-quota-sets/%s" % tenant_id
@@ -229,7 +239,8 @@
             uri += "?user_id=%s" % user_id
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def reset_quotas(self, tenant_id, user_id=None):
         uri = "os-quota-sets/%s" % tenant_id
@@ -237,7 +248,7 @@
             uri += "?user_id=%s" % user_id
         resp, body = self.delete(uri)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def update_quotas(self, tenant_id, user_id=None, shares=None,
                       snapshots=None, gigabytes=None, snapshot_gigabytes=None,
@@ -263,12 +274,14 @@
 
         resp, body = self.put(uri, put_body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_limits(self):
         resp, body = self.get("limits")
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def is_resource_deleted(self, *args, **kwargs):
         """Verifies whether provided resource deleted or not.
@@ -281,7 +294,7 @@
             if "rule_id" in kwargs:
                 rule_id = kwargs.get("rule_id")
                 share_id = kwargs.get("share_id")
-                rules = self.list_access_rules(share_id)
+                rules = self.list_access_rules(share_id)['access_list']
                 for rule in rules:
                     if rule["id"] == rule_id:
                         return False
@@ -334,9 +347,10 @@
             time.sleep(self.build_interval)
 
     def list_extensions(self):
-        resp, extensions = self.get("extensions")
+        resp, body = self.get("extensions")
         self.expected_success(200, resp.status)
-        return self._parse_resp(extensions)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share(self, share_id, name=None, desc=None, is_public=None):
         body = {"share": {}}
@@ -349,7 +363,8 @@
         body = json.dumps(body)
         resp, body = self.put("shares/%s" % share_id, body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def rename_snapshot(self, snapshot_id, name, desc=None):
         body = {"snapshot": {"display_name": name}}
@@ -358,7 +373,8 @@
         body = json.dumps(body)
         resp, body = self.put("snapshots/%s" % snapshot_id, body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def reset_state(self, s_id, status="error", s_type="shares"):
         """Resets the state of a share or a snapshot.
@@ -370,7 +386,7 @@
         body = json.dumps(body)
         resp, body = self.post("%s/%s/action" % (s_type, s_id), body)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def force_delete(self, s_id, s_type="shares"):
         """Force delete share or snapshot.
@@ -381,7 +397,7 @@
         body = json.dumps(body)
         resp, body = self.post("%s/%s/action" % (s_type, s_id), body)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -392,7 +408,8 @@
             uri += '?%s' % urlparse.urlencode(params)
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -403,11 +420,12 @@
         post_body = {"metadata": metadata}
         body = json.dumps(post_body)
         if method == "post":
-            resp, metadata = self.post(uri, body)
+            resp, body = self.post(uri, body)
         if method == "put":
-            resp, metadata = self.put(uri, body)
+            resp, body = self.put(uri, body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(metadata)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def set_metadata(self, share_id, metadata=None):
         return self._update_metadata(share_id, metadata)
@@ -418,12 +436,13 @@
     def delete_metadata(self, share_id, key):
         resp, body = self.delete("shares/%s/metadata/%s" % (share_id, key))
         self.expected_success(200, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def get_metadata(self, share_id):
         resp, body = self.get("shares/%s/metadata" % share_id)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_metadata_item(self, share_id, key):
         resp, body = self.get("shares/%s/metadata/%s" % (share_id, key))
@@ -440,7 +459,8 @@
         body = json.dumps({"security_service": post_body})
         resp, body = self.post("security-services", body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_security_service(self, ss_id, **kwargs):
         # ss_id - id of security-service entity
@@ -450,12 +470,14 @@
         body = json.dumps({"security_service": kwargs})
         resp, body = self.put("security-services/%s" % ss_id, body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_security_service(self, ss_id):
         resp, body = self.get("security-services/%s" % ss_id)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_security_services(self, detailed=False, params=None):
         uri = "security-services"
@@ -465,12 +487,13 @@
             uri += "?%s" % urlparse.urlencode(params)
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_security_service(self, ss_id):
         resp, body = self.delete("security-services/%s" % ss_id)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -480,7 +503,8 @@
         body = json.dumps({"share_network": kwargs})
         resp, body = self.post("share-networks", body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share_network(self, sn_id, **kwargs):
         # kwargs: name, description
@@ -488,17 +512,20 @@
         body = json.dumps({"share_network": kwargs})
         resp, body = self.put("share-networks/%s" % sn_id, body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_network(self, sn_id):
         resp, body = self.get("share-networks/%s" % sn_id)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_networks(self):
         resp, body = self.get("share-networks")
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_networks_with_detail(self, params=None):
         """List the details of all shares."""
@@ -507,12 +534,13 @@
             uri += "?%s" % urlparse.urlencode(params)
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share_network(self, sn_id):
         resp, body = self.delete("share-networks/%s" % sn_id)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -529,21 +557,21 @@
         body = json.dumps(data)
         resp, body = self.post("share-networks/%s/action" % sn_id, body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def add_sec_service_to_share_network(self, sn_id, ss_id):
-        body = self._map_security_service_and_share_network(sn_id, ss_id)
-        return body
+        return self._map_security_service_and_share_network(sn_id, ss_id)
 
     def remove_sec_service_from_share_network(self, sn_id, ss_id):
-        body = self._map_security_service_and_share_network(
+        return self._map_security_service_and_share_network(
             sn_id, ss_id, "remove")
-        return body
 
     def list_sec_services_for_share_network(self, sn_id):
         resp, body = self.get("security-services?share_network_id=%s" % sn_id)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -553,7 +581,8 @@
             uri += '?%s' % urlparse.urlencode(params)
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def create_share_type(self, name, is_public=True, **kwargs):
         post_body = {
@@ -564,22 +593,25 @@
         post_body = json.dumps({'share_type': post_body})
         resp, body = self.post('types', post_body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share_type(self, share_type_id):
         resp, body = self.delete("types/%s" % share_type_id)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_type(self, share_type_id):
         resp, body = self.get("types/%s" % share_type_id)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_default_share_type(self):
         resp, body = self.get("types/default")
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def add_access_to_share_type(self, share_type_id, project_id):
         uri = 'types/%s/action' % share_type_id
@@ -587,7 +619,7 @@
         post_body = json.dumps({'addProjectAccess': post_body})
         resp, body = self.post(uri, post_body)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def remove_access_from_share_type(self, share_type_id, project_id):
         uri = 'types/%s/action' % share_type_id
@@ -595,14 +627,15 @@
         post_body = json.dumps({'removeProjectAccess': post_body})
         resp, body = self.post(uri, post_body)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def list_access_to_share_type(self, share_type_id):
         uri = 'types/%s/os-share-type-access' % share_type_id
         resp, body = self.get(uri)
         # [{"share_type_id": "%st_id%", "project_id": "%project_id%"}, ]
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -611,13 +644,15 @@
         post_body = json.dumps({'extra_specs': extra_specs})
         resp, body = self.post(url, post_body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_type_extra_spec(self, share_type_id, extra_spec_name):
         uri = "types/%s/extra_specs/%s" % (share_type_id, extra_spec_name)
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_type_extra_specs(self, share_type_id, params=None):
         uri = "types/%s/extra_specs" % share_type_id
@@ -625,7 +660,8 @@
             uri += '?%s' % urlparse.urlencode(params)
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share_type_extra_spec(self, share_type_id, spec_name,
                                      spec_value):
@@ -634,7 +670,8 @@
         post_body = json.dumps(extra_spec)
         resp, body = self.put(uri, post_body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share_type_extra_specs(self, share_type_id, extra_specs):
         uri = "types/%s/extra_specs" % share_type_id
@@ -642,13 +679,14 @@
         post_body = json.dumps(extra_specs)
         resp, body = self.post(uri, post_body)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share_type_extra_spec(self, share_type_id, extra_spec_name):
         uri = "types/%s/extra_specs/%s" % (share_type_id, extra_spec_name)
         resp, body = self.delete(uri)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -659,28 +697,31 @@
             uri += "?%s" % urlparse.urlencode(search_opts)
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share_server(self, share_server_id):
         """Delete share server by its ID."""
         uri = "share-servers/%s" % share_server_id
         resp, body = self.delete(uri)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def show_share_server(self, share_server_id):
         """Get share server info."""
         uri = "share-servers/%s" % share_server_id
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def show_share_server_details(self, share_server_id):
         """Get share server details only."""
         uri = "share-servers/%s/details" % share_server_id
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -693,7 +734,8 @@
             uri += "?%s" % urlparse.urlencode(search_opts)
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return json.loads(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -702,4 +744,5 @@
         uri = 'os-availability-zone'
         resp, body = self.get(uri)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
diff --git a/manila_tempest_tests/services/share/v2/json/shares_client.py b/manila_tempest_tests/services/share/v2/json/shares_client.py
index 61f053f..194f1da 100644
--- a/manila_tempest_tests/services/share/v2/json/shares_client.py
+++ b/manila_tempest_tests/services/share/v2/json/shares_client.py
@@ -19,6 +19,7 @@
 
 from six.moves.urllib import parse
 from tempest import config
+from tempest.lib.common import rest_client
 from tempest.lib.common.utils import data_utils
 
 from manila_tempest_tests.common import constants
@@ -137,7 +138,7 @@
                                headers=headers, extra_headers=True,
                                version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def force_delete(self, s_id, s_type="shares", headers=None,
                      version=LATEST_MICROVERSION, action_name=None):
@@ -156,7 +157,7 @@
                                headers=headers, extra_headers=True,
                                version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     @staticmethod
     def _get_base_url(endpoint):
@@ -278,7 +279,8 @@
         resp, body = self.post("shares", body, headers=headers,
                                extra_headers=experimental, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_shares(self, detailed=False, params=None,
                     version=LATEST_MICROVERSION, experimental=False):
@@ -289,7 +291,8 @@
         resp, body = self.get(uri, headers=headers, extra_headers=experimental,
                               version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_shares_with_detail(self, params=None,
                                 version=LATEST_MICROVERSION,
@@ -304,7 +307,8 @@
         resp, body = self.get("shares/%s" % share_id, headers=headers,
                               extra_headers=experimental, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_export_location(
             self, share_id, export_location_uuid, version=LATEST_MICROVERSION):
@@ -313,7 +317,8 @@
                 "share_id": share_id, "el_uuid": export_location_uuid},
             version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_export_locations(
             self, share_id, version=LATEST_MICROVERSION):
@@ -321,7 +326,8 @@
             "shares/%(share_id)s/export_locations" % {"share_id": share_id},
             version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share(self, share_id, params=None,
                      version=LATEST_MICROVERSION):
@@ -329,7 +335,7 @@
         uri += '?%s' % (parse.urlencode(params) if params else '')
         resp, body = self.delete(uri, version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -337,7 +343,8 @@
         resp, body = self.get("shares/%s/instances" % share_id,
                               version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_instances(self, version=LATEST_MICROVERSION,
                              params=None):
@@ -345,13 +352,15 @@
         uri += '?%s' % parse.urlencode(params) if params else ''
         resp, body = self.get(uri, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_instance(self, instance_id, version=LATEST_MICROVERSION):
         resp, body = self.get("share_instances/%s" % instance_id,
                               version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_instance_export_location(
             self, instance_id, export_location_uuid,
@@ -361,7 +370,8 @@
                 "instance_id": instance_id, "el_uuid": export_location_uuid},
             version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_instance_export_locations(
             self, instance_id, version=LATEST_MICROVERSION):
@@ -369,7 +379,8 @@
             "share_instances/%s/export_locations" % instance_id,
             version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -389,7 +400,7 @@
         resp, body = self.post(
             "shares/%s/action" % share_id, body, version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def shrink_share(self, share_id, new_size, version=LATEST_MICROVERSION,
                      action_name=None):
@@ -407,7 +418,7 @@
         resp, body = self.post(
             "shares/%s/action" % share_id, body, version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -436,7 +447,8 @@
         body = json.dumps(post_body)
         resp, body = self.post(url, body, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def unmanage_share(self, share_id, version=LATEST_MICROVERSION, url=None,
                        action_name=None, body=None):
@@ -458,7 +470,7 @@
             body,
             version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -480,12 +492,14 @@
         body = json.dumps(post_body)
         resp, body = self.post("snapshots", body, version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_snapshot(self, snapshot_id, version=LATEST_MICROVERSION):
         resp, body = self.get("snapshots/%s" % snapshot_id, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_snapshots(self, detailed=False, params=None,
                        version=LATEST_MICROVERSION):
@@ -494,7 +508,8 @@
         uri += '?%s' % parse.urlencode(params) if params else ''
         resp, body = self.get(uri, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_snapshots_for_share(self, share_id, detailed=False,
                                  version=LATEST_MICROVERSION):
@@ -503,7 +518,8 @@
                if detailed else 'snapshots?share_id=%s' % share_id)
         resp, body = self.get(uri, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_snapshots_with_detail(self, params=None,
                                    version=LATEST_MICROVERSION):
@@ -514,7 +530,7 @@
     def delete_snapshot(self, snap_id, version=LATEST_MICROVERSION):
         resp, body = self.delete("snapshots/%s" % snap_id, version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def manage_snapshot(self, share_id, provider_location,
                         name=None, description=None,
@@ -537,7 +553,8 @@
         body = json.dumps(post_body)
         resp, body = self.post(url, body, version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def unmanage_snapshot(self, snapshot_id, version=LATEST_MICROVERSION,
                           body=None):
@@ -552,13 +569,13 @@
             body,
             version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def snapshot_reset_state(self, snapshot_id,
                              status=constants.STATUS_AVAILABLE,
                              version=LATEST_MICROVERSION):
-        self.reset_state(snapshot_id, status=status, s_type='snapshots',
-                         version=version)
+        return self.reset_state(
+            snapshot_id, status=status, s_type='snapshots', version=version)
 
 ###############
 
@@ -568,7 +585,7 @@
         body = json.dumps({'revert': {'snapshot_id': snapshot_id}})
         resp, body = self.post(url, body, version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -578,14 +595,16 @@
         post_body = json.dumps({'extra_specs': extra_specs})
         resp, body = self.post(url, post_body, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_type_extra_spec(self, share_type_id, extra_spec_name,
                                   version=LATEST_MICROVERSION):
         uri = "types/%s/extra_specs/%s" % (share_type_id, extra_spec_name)
         resp, body = self.get(uri, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_type_extra_specs(self, share_type_id, params=None,
                                    version=LATEST_MICROVERSION):
@@ -594,7 +613,8 @@
             uri += '?%s' % parse.urlencode(params)
         resp, body = self.get(uri, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share_type_extra_spec(self, share_type_id, spec_name,
                                      spec_value, version=LATEST_MICROVERSION):
@@ -603,7 +623,8 @@
         post_body = json.dumps(extra_spec)
         resp, body = self.put(uri, post_body, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share_type_extra_specs(self, share_type_id, extra_specs,
                                       version=LATEST_MICROVERSION):
@@ -612,14 +633,15 @@
         post_body = json.dumps(extra_specs)
         resp, body = self.post(uri, post_body, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share_type_extra_spec(self, share_type_id, extra_spec_name,
                                      version=LATEST_MICROVERSION):
         uri = "types/%s/extra_specs/%s" % (share_type_id, extra_spec_name)
         resp, body = self.delete(uri, version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -628,7 +650,8 @@
         uri = "share-servers/%s" % share_server_id
         resp, body = self.get(uri, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -636,7 +659,8 @@
         resp, body = self.get("snapshot-instances/%s" % instance_id,
                               version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_snapshot_instances(self, detail=False, snapshot_id=None,
                                 version=LATEST_MICROVERSION):
@@ -646,7 +670,8 @@
             uri += '?snapshot_id=%s' % snapshot_id
         resp, body = self.get(uri, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def reset_snapshot_instance_status(self, instance_id,
                                        status=constants.STATUS_AVAILABLE,
@@ -661,7 +686,7 @@
         body = json.dumps(post_body)
         resp, body = self.post(uri, body, extra_headers=True, version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_snapshot_instance_export_location(
             self, instance_id, export_location_uuid,
@@ -673,7 +698,8 @@
                 "el_uuid": export_location_uuid},
             version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_snapshot_instance_export_locations(
             self, instance_id, version=LATEST_MICROVERSION):
@@ -681,7 +707,8 @@
             "snapshot-instances/%s/export-locations" % instance_id,
             version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -708,7 +735,8 @@
             "shares/%s/action" % share_id, body, version=version,
             extra_headers=True)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_access_rules(self, share_id, version=LATEST_MICROVERSION,
                           metadata=None, action_name=None):
@@ -724,7 +752,8 @@
             return self.list_access_rules_with_new_API(
                 share_id, metadata=metadata, version=version,
                 action_name=action_name)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_access_rules_with_new_API(self, share_id, metadata=None,
                                        version=LATEST_MICROVERSION,
@@ -740,7 +769,8 @@
         url = 'share-access-rules?share_id=%s' % share_id + query_string
         resp, body = self.get(url, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_access_rule(self, share_id, rule_id,
                            version=LATEST_MICROVERSION, action_name=None):
@@ -753,13 +783,14 @@
         resp, body = self.post(
             "shares/%s/action" % share_id, body, version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def get_access_rule(self, access_id, version=LATEST_MICROVERSION):
         resp, body = self.get("share-access-rules/%s" % access_id,
                               version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_access_metadata(self, access_id, metadata,
                                version=LATEST_MICROVERSION):
@@ -767,14 +798,15 @@
         body = {"metadata": metadata}
         resp, body = self.put(url, json.dumps(body), version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_access_metadata(self, access_id, key,
                                version=LATEST_MICROVERSION):
         url = "share-access-rules/%s/metadata/%s" % (access_id, key)
         resp, body = self.delete(url, version=version)
         self.expected_success(200, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -788,7 +820,8 @@
                 url = 'os-availability-zone'
         resp, body = self.get(url, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -804,7 +837,8 @@
             url += '?%s' % parse.urlencode(params)
         resp, body = self.get(url, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -817,7 +851,8 @@
             uri += '?%s' % parse.urlencode(params)
         resp, body = self.get(uri, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def create_share_type(self, name, is_public=True,
                           version=LATEST_MICROVERSION, **kwargs):
@@ -835,7 +870,8 @@
         post_body = json.dumps({'share_type': post_body})
         resp, body = self.post('types', post_body, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share_type(self, share_type_id, name=None,
                           is_public=None, description=None,
@@ -851,17 +887,19 @@
         resp, body = self.put("types/%s" % share_type_id, post_body,
                               version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share_type(self, share_type_id, version=LATEST_MICROVERSION):
         resp, body = self.delete("types/%s" % share_type_id, version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_type(self, share_type_id, version=LATEST_MICROVERSION):
         resp, body = self.get("types/%s" % share_type_id, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_access_to_share_type(self, share_type_id,
                                   version=LATEST_MICROVERSION,
@@ -876,7 +914,8 @@
         resp, body = self.get(url, version=version)
         # [{"share_type_id": "%st_id%", "project_id": "%project_id%"}, ]
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -903,7 +942,8 @@
         url += '/%s' % tenant_id
         resp, body = self.get("%s/defaults" % url, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def show_quotas(self, tenant_id, user_id=None, share_type=None, url=None,
                     version=LATEST_MICROVERSION):
@@ -913,7 +953,8 @@
         url += self._get_quotas_url_arguments_as_str(user_id, share_type)
         resp, body = self.get(url, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def reset_quotas(self, tenant_id, user_id=None, share_type=None, url=None,
                      version=LATEST_MICROVERSION):
@@ -923,7 +964,7 @@
         url += self._get_quotas_url_arguments_as_str(user_id, share_type)
         resp, body = self.delete(url, version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def detail_quotas(self, tenant_id, user_id=None, share_type=None, url=None,
                       version=LATEST_MICROVERSION):
@@ -933,7 +974,8 @@
         url += self._get_quotas_url_arguments_as_str(user_id, share_type)
         resp, body = self.get(url, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_quotas(self, tenant_id, user_id=None, shares=None,
                       snapshots=None, gigabytes=None, snapshot_gigabytes=None,
@@ -972,7 +1014,8 @@
 
         resp, body = self.put(url, put_body, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -1008,7 +1051,8 @@
                                extra_headers=extra_headers, version=version)
 
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share_group(self, share_group_id, version=LATEST_MICROVERSION):
         """Delete a share group."""
@@ -1018,7 +1062,7 @@
         resp, body = self.delete(uri, headers=headers,
                                  extra_headers=extra_headers, version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_groups(self, detailed=False, params=None,
                           version=LATEST_MICROVERSION):
@@ -1030,7 +1074,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_group(self, share_group_id, version=LATEST_MICROVERSION):
         """Get share group info."""
@@ -1040,7 +1085,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share_group(self, share_group_id, name=None, description=None,
                            version=LATEST_MICROVERSION, **kwargs):
@@ -1061,21 +1107,24 @@
                               extra_headers=extra_headers, version=version)
 
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def share_group_reset_state(self, share_group_id, status='error',
                                 version=LATEST_MICROVERSION):
         headers, _junk = utils.get_extra_headers(
             version, constants.SHARE_GROUPS_GRADUATION_VERSION)
-        self.reset_state(share_group_id, status=status, s_type='groups',
-                         headers=headers, version=version)
+        return self.reset_state(
+            share_group_id, status=status, s_type='groups', headers=headers,
+            version=version)
 
     def share_group_force_delete(self, share_group_id,
                                  version=LATEST_MICROVERSION):
         headers, _junk = utils.get_extra_headers(
             version, constants.SHARE_GROUPS_GRADUATION_VERSION)
-        self.force_delete(share_group_id, s_type='share-groups',
-                          headers=headers, version=version)
+        return self.force_delete(
+            share_group_id, s_type='share-groups', headers=headers,
+            version=version)
 
 ###############
 
@@ -1103,7 +1152,8 @@
         resp, body = self.post(uri, body, headers=headers,
                                extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_group_types(self, detailed=False, params=None,
                                version=LATEST_MICROVERSION):
@@ -1115,7 +1165,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_group_type(self, share_group_type_id,
                              version=LATEST_MICROVERSION):
@@ -1126,7 +1177,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_default_share_group_type(self, version=LATEST_MICROVERSION):
         """Get default share group type info."""
@@ -1136,7 +1188,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share_group_type(self, share_group_type_id,
                                 version=LATEST_MICROVERSION):
@@ -1147,7 +1200,7 @@
         resp, body = self.delete(uri, headers=headers,
                                  extra_headers=extra_headers, version=version)
         self.expected_success(204, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def add_access_to_share_group_type(self, share_group_type_id, project_id,
                                        version=LATEST_MICROVERSION):
@@ -1159,7 +1212,7 @@
         resp, body = self.post(uri, post_body, headers=headers,
                                extra_headers=extra_headers, version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def remove_access_from_share_group_type(self, share_group_type_id,
                                             project_id,
@@ -1172,7 +1225,7 @@
         resp, body = self.post(uri, post_body, headers=headers,
                                extra_headers=extra_headers, version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_access_to_share_group_type(self, share_group_type_id,
                                         version=LATEST_MICROVERSION):
@@ -1182,7 +1235,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -1196,7 +1250,8 @@
         resp, body = self.post(url, post_body, headers=headers,
                                extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_group_type_spec(self, share_group_type_id, group_spec_key,
                                   version=LATEST_MICROVERSION):
@@ -1207,7 +1262,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_group_type_specs(self, share_group_type_id, params=None,
                                     version=LATEST_MICROVERSION):
@@ -1219,7 +1275,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share_group_type_spec(self, share_group_type_id, group_spec_key,
                                      group_spec_value,
@@ -1233,7 +1290,8 @@
         resp, body = self.put(uri, post_body, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share_group_type_specs(self, share_group_type_id,
                                       group_specs_dict,
@@ -1250,7 +1308,7 @@
         resp, body = self.delete(uri, headers=headers,
                                  extra_headers=extra_headers, version=version)
         self.expected_success(204, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -1270,7 +1328,8 @@
         resp, body = self.post(uri, body, headers=headers,
                                extra_headers=extra_headers, version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share_group_snapshot(self, share_group_snapshot_id,
                                     version=LATEST_MICROVERSION):
@@ -1281,7 +1340,7 @@
         resp, body = self.delete(uri, headers=headers,
                                  extra_headers=extra_headers, version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_group_snapshots(self, detailed=False, params=None,
                                    version=LATEST_MICROVERSION):
@@ -1293,7 +1352,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_group_snapshot(self, share_group_snapshot_id,
                                  version=LATEST_MICROVERSION):
@@ -1304,7 +1364,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_share_group_snapshot(self, share_group_snapshot_id, name=None,
                                     description=None,
@@ -1322,22 +1383,23 @@
         resp, body = self.put(uri, body, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def share_group_snapshot_reset_state(self, share_group_snapshot_id,
                                          status='error',
                                          version=LATEST_MICROVERSION):
         headers, _junk = utils.get_extra_headers(
             version, constants.SHARE_GROUPS_GRADUATION_VERSION)
-        self.reset_state(
-            share_group_snapshot_id, status=status,
-            headers=headers, s_type='group-snapshots', version=version)
+        return self.reset_state(
+            share_group_snapshot_id, status=status, headers=headers,
+            s_type='group-snapshots', version=version)
 
     def share_group_snapshot_force_delete(self, share_group_snapshot_id,
                                           version=LATEST_MICROVERSION):
         headers, _junk = utils.get_extra_headers(
             version, constants.SHARE_GROUPS_GRADUATION_VERSION)
-        self.force_delete(
+        return self.force_delete(
             share_group_snapshot_id, s_type='share-group-snapshots',
             headers=headers, version=version)
 
@@ -1362,7 +1424,8 @@
         resp, body = self.post('share-servers/manage', body,
                                extra_headers=True, version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def unmanage_share_server(self, share_server_id,
                               version=LATEST_MICROVERSION):
@@ -1370,13 +1433,14 @@
         resp, body = self.post('share-servers/%s/action' % share_server_id,
                                body, extra_headers=True, version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def share_server_reset_state(self, share_server_id,
                                  status=constants.SERVER_STATE_ACTIVE,
                                  version=LATEST_MICROVERSION):
-        self.reset_state(share_server_id, status=status,
-                         s_type='share-servers', version=version)
+        return self.reset_state(
+            share_server_id, status=status, s_type='share-servers',
+            version=version)
 
 ###############
 
@@ -1401,9 +1465,10 @@
         }
 
         body = json.dumps(body)
-        return self.post('shares/%s/action' % share_id, body,
-                         headers=EXPERIMENTAL, extra_headers=True,
-                         version=version)
+        resp, body = self.post('shares/%s/action' % share_id, body,
+                               headers=EXPERIMENTAL, extra_headers=True,
+                               version=version)
+        return rest_client.ResponseBody(resp, body)
 
     def migration_complete(self, share_id, version=LATEST_MICROVERSION,
                            action_name='migration_complete'):
@@ -1411,9 +1476,10 @@
             action_name: None,
         }
         body = json.dumps(post_body)
-        return self.post('shares/%s/action' % share_id, body,
-                         headers=EXPERIMENTAL, extra_headers=True,
-                         version=version)
+        resp, body = self.post('shares/%s/action' % share_id, body,
+                               headers=EXPERIMENTAL, extra_headers=True,
+                               version=version)
+        return rest_client.ResponseBody(resp, body)
 
     def migration_cancel(self, share_id, version=LATEST_MICROVERSION,
                          action_name='migration_cancel'):
@@ -1421,9 +1487,10 @@
             action_name: None,
         }
         body = json.dumps(post_body)
-        return self.post('shares/%s/action' % share_id, body,
-                         headers=EXPERIMENTAL, extra_headers=True,
-                         version=version)
+        resp, body = self.post('shares/%s/action' % share_id, body,
+                               headers=EXPERIMENTAL, extra_headers=True,
+                               version=version)
+        return rest_client.ResponseBody(resp, body)
 
     def migration_get_progress(self, share_id, version=LATEST_MICROVERSION,
                                action_name='migration_get_progress'):
@@ -1431,10 +1498,11 @@
             action_name: None,
         }
         body = json.dumps(post_body)
-        result = self.post('shares/%s/action' % share_id, body,
-                           headers=EXPERIMENTAL, extra_headers=True,
-                           version=version)
-        return json.loads(result[1])
+        resp, body = self.post('shares/%s/action' % share_id, body,
+                               headers=EXPERIMENTAL, extra_headers=True,
+                               version=version)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def reset_task_state(
             self, share_id, task_state, version=LATEST_MICROVERSION,
@@ -1445,9 +1513,10 @@
             }
         }
         body = json.dumps(post_body)
-        return self.post('shares/%s/action' % share_id, body,
-                         headers=EXPERIMENTAL, extra_headers=True,
-                         version=version)
+        resp, body = self.post('shares/%s/action' % share_id, body,
+                               headers=EXPERIMENTAL, extra_headers=True,
+                               version=version)
+        return rest_client.ResponseBody(resp, body)
 
 ################
 
@@ -1467,7 +1536,8 @@
                                extra_headers=extra_headers,
                                version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_replica(self, replica_id, version=LATEST_MICROVERSION):
         """Get the details of share_replica."""
@@ -1478,7 +1548,8 @@
                               extra_headers=extra_headers,
                               version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_replicas(self, share_id=None, version=LATEST_MICROVERSION):
         """Get list of replicas."""
@@ -1489,7 +1560,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_replicas_summary(self, share_id=None,
                                     version=LATEST_MICROVERSION):
@@ -1501,7 +1573,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_share_replica(self, replica_id, version=LATEST_MICROVERSION):
         """Delete share_replica."""
@@ -1513,7 +1586,7 @@
                                  extra_headers=extra_headers,
                                  version=version)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def promote_share_replica(self, replica_id, expected_status=202,
                               version=LATEST_MICROVERSION):
@@ -1530,7 +1603,11 @@
                                extra_headers=extra_headers,
                                version=version)
         self.expected_success(expected_status, resp.status)
-        return self._parse_resp(body)
+        try:
+            body = json.loads(body)
+        except json.decoder.JSONDecodeError:
+            pass
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_replica_export_locations(self, replica_id,
                                             expected_status=200,
@@ -1541,7 +1618,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(expected_status, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_share_replica_export_location(self, replica_id,
                                           export_location_id,
@@ -1554,7 +1632,8 @@
         resp, body = self.get(uri, headers=headers,
                               extra_headers=extra_headers, version=version)
         self.expected_success(expected_status, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def reset_share_replica_status(self, replica_id,
                                    status=constants.STATUS_AVAILABLE,
@@ -1574,7 +1653,7 @@
                                extra_headers=extra_headers,
                                version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def reset_share_replica_state(self, replica_id,
                                   state=constants.REPLICATION_STATE_ACTIVE,
@@ -1594,7 +1673,7 @@
                                extra_headers=extra_headers,
                                version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def resync_share_replica(self, replica_id, expected_result=202,
                              version=LATEST_MICROVERSION):
@@ -1611,7 +1690,7 @@
                                extra_headers=extra_headers,
                                version=version)
         self.expected_success(expected_result, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def force_delete_share_replica(self, replica_id,
                                    version=LATEST_MICROVERSION):
@@ -1628,7 +1707,7 @@
                                extra_headers=extra_headers,
                                version=version)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_networks(self, detailed=False, params=None,
                             version=LATEST_MICROVERSION):
@@ -1637,7 +1716,8 @@
         uri += '?%s' % parse.urlencode(params) if params else ''
         resp, body = self.get(uri, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_share_networks_with_detail(self, params=None,
                                         version=LATEST_MICROVERSION):
@@ -1649,7 +1729,8 @@
         resp, body = self.get("share-networks/%s" % share_network_id,
                               version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ################
 
@@ -1664,15 +1745,25 @@
         resp, body = self.post("snapshots/%s/action" % snapshot_id,
                                json.dumps(body), version=LATEST_MICROVERSION)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
+
+    def list_snapshot_access_rules(self, snapshot_id,
+                                   version=LATEST_MICROVERSION):
+        resp, body = self.get("snapshots/%s/access-list" % snapshot_id,
+                              version=version)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_snapshot_access_rule(self, snapshot_id, rule_id,
                                  version=LATEST_MICROVERSION):
         resp, body = self.get("snapshots/%s/access-list" % snapshot_id,
                               version=version)
-        body = self._parse_resp(body)
-        found_rules = [r for r in body if r['id'] == rule_id]
-
+        body = json.loads(body)
+        body = rest_client.ResponseBody(resp, body)
+        found_rules = [
+            r for r in body['snapshot_access_list'] if r['id'] == rule_id
+        ]
         return found_rules[0] if len(found_rules) > 0 else None
 
     def delete_snapshot_access_rule(self, snapshot_id, rule_id):
@@ -1684,7 +1775,7 @@
         resp, body = self.post("snapshots/%s/action" % snapshot_id,
                                json.dumps(body), version=LATEST_MICROVERSION)
         self.expected_success(202, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_snapshot_export_location(self, snapshot_id, export_location_uuid,
                                      version=LATEST_MICROVERSION):
@@ -1693,14 +1784,16 @@
                 "snapshot_id": snapshot_id, "el_uuid": export_location_uuid},
             version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_snapshot_export_locations(
             self, snapshot_id, version=LATEST_MICROVERSION):
         resp, body = self.get(
             "snapshots/%s/export-locations" % snapshot_id, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -1709,7 +1802,8 @@
         url = 'messages/%s' % message_id
         resp, body = self.get(url, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_messages(self, params=None, version=LATEST_MICROVERSION):
         """List all messages."""
@@ -1717,14 +1811,15 @@
         url += '?%s' % parse.urlencode(params) if params else ''
         resp, body = self.get(url, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_message(self, message_id, version=LATEST_MICROVERSION):
         """Delete a single message."""
         url = 'messages/%s' % message_id
         resp, body = self.delete(url, version=version)
         self.expected_success(204, resp.status)
-        return self._parse_resp(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -1742,7 +1837,8 @@
         body = json.dumps({"security_service": post_body})
         resp, body = self.post("security-services", body, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def update_security_service(self, ss_id, version=LATEST_MICROVERSION,
                                 **kwargs):
@@ -1759,12 +1855,14 @@
         resp, body = self.put("security-services/%s" % ss_id, body,
                               version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_security_service(self, ss_id, version=LATEST_MICROVERSION):
         resp, body = self.get("security-services/%s" % ss_id, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def list_security_services(self, detailed=False, params=None,
                                version=LATEST_MICROVERSION):
@@ -1775,7 +1873,8 @@
             uri += "?%s" % parse.urlencode(params)
         resp, body = self.get(uri, version=version)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -1794,7 +1893,8 @@
         url = '/share-networks/%s/subnets' % share_network_id
         resp, body = self.post(url, body, version=LATEST_MICROVERSION)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def get_subnet(self, share_network_subnet_id, share_network_id):
         url = ('share-networks/%(network)s/subnets/%(subnet)s' % {
@@ -1803,7 +1903,8 @@
         )
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
-        return self._parse_resp(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def delete_subnet(self, share_network_id, share_network_subnet_id):
         url = ('share-networks/%(network)s/subnets/%(subnet)s' % {
@@ -1812,7 +1913,7 @@
         )
         resp, body = self.delete(url)
         self.expected_success(202, resp.status)
-        return body
+        return rest_client.ResponseBody(resp, body)
 
 ###############
 
@@ -1836,7 +1937,8 @@
                                version=version)
         self.expected_success(200, resp.status)
 
-        return json.loads(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def share_server_migration_start(self, share_server_id, host,
                                      writable=False, new_share_network_id=None,
@@ -1859,7 +1961,7 @@
                                version=version)
         self.expected_success(202, resp.status)
 
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def share_server_migration_complete(self, share_server_id,
                                         version=LATEST_MICROVERSION):
@@ -1873,7 +1975,8 @@
                                version=version)
         self.expected_success(200, resp.status)
 
-        return body
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
 
     def share_server_migration_cancel(self, share_server_id,
                                       version=LATEST_MICROVERSION):
@@ -1887,7 +1990,7 @@
                                version=version)
         self.expected_success(202, resp.status)
 
-        return body
+        return rest_client.ResponseBody(resp, body)
 
     def share_server_migration_get_progress(self, share_server_id,
                                             version=LATEST_MICROVERSION):
@@ -1899,6 +2002,7 @@
         resp, body = self.post('share-servers/%s/action' % share_server_id,
                                body, headers=EXPERIMENTAL, extra_headers=True,
                                version=version)
-        self.expected_sucess(200, resp.status)
+        self.expected_success(200, resp.status)
 
-        return json.loads(body)
+        body = json.loads(body)
+        return rest_client.ResponseBody(resp, body)
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:
