diff options
author | openstack <neha.alhat@nttdata.com> | 2018-12-13 09:08:25 +0000 |
---|---|---|
committer | openstack <neha.alhat@nttdata.com> | 2019-01-16 05:51:12 +0000 |
commit | 27eac4993d8120e892ceaa564eddb86c79a4b7c4 (patch) | |
tree | da521de679dbe9913c57de5527681c910b14d887 /keystoneclient/base.py | |
parent | fee326e56a053592293ef724c7dd31dfa69acf5f (diff) | |
download | python-keystoneclient-27eac4993d8120e892ceaa564eddb86c79a4b7c4.tar.gz |
Add return-request-id-to-caller function(v3/contrib)
Added return-request-id-to-caller function to resources and resource
managers in the following files.
* keystoneclient/v3/projects.py
* keystoneclient/v3/registered_limits.py
* keystoneclient/v3/roles.py
* keystoneclient/v3/limits.py
* keystoneclient/v3/contrib/federation/saml.py
Also made changes in base.py for _put() method so that if
include_metadata is True, the response data should include request_id
instead of returning None as response.
Change-Id: Ifc0ec9a9d666cccfee3b08ac61596a3692307f23
Implements: blueprint return-request-id-to-caller
Diffstat (limited to 'keystoneclient/base.py')
-rw-r--r-- | keystoneclient/base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/keystoneclient/base.py b/keystoneclient/base.py index 839b8a1..f5e38eb 100644 --- a/keystoneclient/base.py +++ b/keystoneclient/base.py @@ -214,6 +214,10 @@ class Manager(object): else: return self._prepare_return_value( resp, self.resource_class(self, body)) + # In some cases (e.g. 'add_endpoint_to_project' from endpoint_filters + # resource), PUT request may not return a body so return None as + # response along with request_id if include_metadata is True. + return self._prepare_return_value(resp, body) def _patch(self, url, body=None, response_key=None, **kwargs): """Update an object with PATCH method. |