deb-cinder/cinder/api/middleware
Chris Buccella 4c8f269dd1 Add x-openstack-request-id to cinder responses
x-openstack-request-id is the common header name for request ID going forward.
Currently, only glance and neutron return this header. Using the request_id
middleware is a convenient way to ensure this header is in the response. We will
also be using the middleware to generate the request ID.

The ID will be generated by the middleware and is inserted into the request
environment. The current code generates the request ID in the constructor of
RequestConext; with this change, the ID is generated beforehand and passed in to
the RequestContext constructor. Not much different here: a request ID is
generated and is available for use in the handling of the request.

On the response end, the middleware is again used, this time to attach the
x-openstack-request-id header, using the value of the generated request ID. The
current code attaches the x-compute-request-id header.

This change is a necessary step toward logging the mapping of request IDs across
OpenStack services.

UpgradeImpact: api-paste.ini is modified

Change-Id: I30c4e5efa77f9ebffb485d2ea6a6c3f78eb1573f
Implements: blueprint add-standard-req-id-header
2014-02-19 17:09:23 +00:00
..
__init__.py Empty files shouldn't contain copyright nor license 2013-12-26 22:45:17 -06:00
auth.py Add x-openstack-request-id to cinder responses 2014-02-19 17:09:23 +00:00
fault.py Remove vim header 2013-12-30 18:53:02 -06:00
sizelimit.py Remove vim header 2013-12-30 18:53:02 -06:00