Return request Id to caller

Registered by Abhishek Kekane

Most of the OpenStack RESTful API returns X-Openstack-Request-Id in the API response header but this request id is not available to the caller from the python client. When you run command on the command prompt using client with --debug option, then it displays X-Openstack-Request-Id on the console but if you are using it in some third party applications and if some api fails or succeeds then there is no way to get X-Openstack-Request-Id from the returned value. If request id is made to the caller, then it would definitely help in getting quick support from infrastructure support team in case of any problems.

We are proposing to add 'request_ids' as attribute to the response objects returned from python-glanceclient.

For more details on how request_id will be returned to the caller, please refer to the approved blueprint [1] discussed with the cross-project team.

[1] : https://review.openstack.org/#/c/156508

For example:

from glanceclient import client

glance = client.Client('2', 'demo', 'admin', 'demo', 'http://21.12.4.342:5000/v2.0')
images = glance.images.list()

# Get request id from images resource object

images['request_ids']

'req-a9b74258-0b21-49c2-8ce8-673b420e20cc'

Blueprint information

Status:
Started
Approver:
Flavio Percoco
Priority:
Undefined
Drafter:
Abhishek Kekane
Direction:
Needs approval
Assignee:
Ravi Shekhar Jethani
Definition:
Approved
Series goal:
Accepted for mitaka
Implementation:
Slow progress
Milestone target:
None
Started by
Abhishek Kekane

Related branches

Sprints

Whiteboard

Cross-Project specs is approved, https://review.openstack.org/#/c/156508

Approved w/o glance-spec because it's coming from a cross-project spec -- flaper87 2015-10-08

lite-specs reference - https://bugs.launchpad.net/glance/+bug/1525259

Gerrit topic: https://review.openstack.org/#q,topic:bp/return-request-id-to-caller,n,z

Addressed by: https://review.openstack.org/261288
    Provide a list of request ids to the caller

Gerrit topic: https://review.openstack.org/#q,topic:bug/1525259,n,z

Addressed by: https://review.openstack.org/280531
    Add release notes for return-request-id-to-caller

Addressed by: https://review.openstack.org/316052
    WIP: Add request id to returned objects

Addressed by: https://review.openstack.org/352892
    Add request id to returned objects

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.