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-cinderclient.

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] :

For example:

from cinderclient import client

cinder = client.Client('2', 'demo', 'admin', 'demo', '')
vols = cinder.volumes.list()

# Get request id from vols resource object



Blueprint information

Sean McGinnis
Abhishek Kekane
Needs approval
Ankit Agrawal
Series goal:
Accepted for mitaka
Milestone target:
Started by
Abhishek Kekane
Completed by
Abhishek Kekane

Related branches



We are planning to break changes in smaller patches as below:

patch 1: containing common changes in cinderclient/ and cinderclient/openstack/common/apiclient changes for adding wrapper classes around response

patch 2: changes in volume, volume_snapshot, volume_types and volume_types_access

patch 3: changes in volume_backups, volume_backups_restore, volume_encryption_types and volume_transfers

patch 4: changes in qos_specs, consistencygroup, cgsnapshots, services, quotas, quota_classes

Gerrit topic:,topic:bp/return-request-id-to-caller,n,z

Addressed by:
    Add Wrapper classes for list, dict, tuple

Addressed by:
    Return wrapper classes with request_ids attribute

Addressed by:
    Add request_ids attribute to resource objects

Addressed by:
    Add request_ids attribute to resource objects

Addressed by:
    Add request_ids attribute to resource objects

Addressed by:
    Add release notes for return-request-id-to-caller

Addressed by:
    Provide consistency for Wrapper classes


Work Items

Work items:
Add a wrapper class around response: DONE
Modify v2 api to return request-id: DONE
Unit test cases: DONE

This blueprint contains Public information 
Everyone can see this information.