Return request Id to caller

Registered by takahara.kengo

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

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 masakariclient import client
>>> masakari_client = client.Client("1", username=$MASAKARI_USERNAME, password=$MASAKARI_PASSWORD, project_name=$MASAKARI_PROJECT_NAME, auth_url=$OS_AUTH_URL)
>>> res = masakari_client.con.ha.create_segment(name="test_segment", description="Test Segment.", recovery_method="auto", service_type="testType")
>>> res.request_ids
['req-61dc7836-89e9-43df-9d2b-727b044cfd25']
>>>

Blueprint information

Status:
Not started
Approver:
SamP
Priority:
Undefined
Drafter:
takahara.kengo
Direction:
Needs approval
Assignee:
takahara.kengo
Definition:
Approved
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.