diff --git a/openstack/shared_file_system/v2/_proxy.py b/openstack/shared_file_system/v2/_proxy.py index 157b1b7a5..4392c798f 100644 --- a/openstack/shared_file_system/v2/_proxy.py +++ b/openstack/shared_file_system/v2/_proxy.py @@ -816,10 +816,11 @@ class Proxy(proxy.Proxy): :param access_id: The id of the access rule to get :param share_id: The ID of the share - :rtype: ``None`` + :rtype: ``requests.models.Response`` HTTP response from internal + requests client """ res = self._get_resource(_share_access_rule.ShareAccessRule, access_id) - res.delete(self, share_id, ignore_missing=ignore_missing) + return res.delete(self, share_id, ignore_missing=ignore_missing) def share_group_snapshots(self, details=True, **query): """Lists all share group snapshots. diff --git a/openstack/shared_file_system/v2/share_access_rule.py b/openstack/shared_file_system/v2/share_access_rule.py index 75459806b..519c679b9 100644 --- a/openstack/shared_file_system/v2/share_access_rule.py +++ b/openstack/shared_file_system/v2/share_access_rule.py @@ -63,7 +63,7 @@ class ShareAccessRule(resource.Resource): if microversion is None: microversion = self._get_microversion(session, action=action) - session.post( + return session.post( url, json=body, headers=headers, microversion=microversion ) @@ -76,10 +76,12 @@ class ShareAccessRule(resource.Resource): ) def delete(self, session, share_id, ignore_missing=True): - body = {'deny_access': {'access_id': self.id}} - url = utils.urljoin('/shares', share_id, 'action') + body = {"deny_access": {"access_id": self.id}} + url = utils.urljoin("/shares", share_id, "action") + response = self._action(session, body, url) try: response = self._action(session, body, url) + self._translate_response(response) except exceptions.ResourceNotFound: if not ignore_missing: raise