diff options
author | Ravi Jethani <ravishekar.jethani@nttdata.com> | 2016-04-22 13:54:49 +0000 |
---|---|---|
committer | Abhishek Kekane <abhishek.kekane@nttdata.com> | 2017-01-20 14:50:42 +0530 |
commit | 610177a779b95f931356c1e90b05a5bffd2616b3 (patch) | |
tree | d0404ab930701c9e8743244d6c00d80b482b8707 /releasenotes/notes/return-request-id-to-caller-47f4c0a684b1d88e.yaml | |
parent | 54e6faadf216b61d2d2f1b2ad6f4dd925f053117 (diff) | |
download | python-glanceclient-610177a779b95f931356c1e90b05a5bffd2616b3.tar.gz |
Add request id to returned objects
Adding two classes RequestIdProxy and GeneratorProxy derived from
wrapt.ObjectProxy to wrap objects returned from the API.
GeneratorProxy class is used to wrap generator objects returned
by cases like images.list() etc. whereas RequestIdProxy class is
used to wrap non-generator object cases like images.create() etc.
In all cases the returned object will have the same behavior as
the wrapped(original) object. However now the returned objects
will have an extra property 'request_ids' which is a list of
exactly one request id.
For generator cases the request_ids property will be an empty list
until the underlying generator is invoked at-least once.
Co-Authored-By: Abhishek Kekane <abhishek.kekane@nttdata.com>
Closes-Bug: #1525259
Blueprint: return-request-id-to-caller
Change-Id: If8c0e0843270ff718a37ca2697afeb8da22aa3b1
Diffstat (limited to 'releasenotes/notes/return-request-id-to-caller-47f4c0a684b1d88e.yaml')
-rw-r--r-- | releasenotes/notes/return-request-id-to-caller-47f4c0a684b1d88e.yaml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/releasenotes/notes/return-request-id-to-caller-47f4c0a684b1d88e.yaml b/releasenotes/notes/return-request-id-to-caller-47f4c0a684b1d88e.yaml new file mode 100644 index 0000000..25fe2e6 --- /dev/null +++ b/releasenotes/notes/return-request-id-to-caller-47f4c0a684b1d88e.yaml @@ -0,0 +1,10 @@ +--- +features: + - Added support to return "x-openstack-request-id" header in request_ids attribute + for better tracing. + + | For ex. + | >>> from glanceclient import Client + | >>> glance = Client('2', endpoint='OS_IMAGE_ENDPOINT', token='OS_AUTH_TOKEN') + | >>> res = glance.images.get('<image_id>') + | >>> res.request_ids |