df57e0ec3b
Adapter.__init__ takes a global_request_id which causes the X-Openstack-Request-Id header to be set on each request. This is fine if the Adapter is used for only one "request" (in the sense of e.g. "a server create" -- see [1]), but is too broad if the Adapter is reused for multiple requests. For example, Nova's SchedulerReportClient (used to communicate with Placement) creates a single instance of Adapter for the life of the process [2][3][4]. Openstack SDK's Proxy objects [5] endure for the life of a Connection. So what is needed is a way to manage the X-Openstack-Request-Id header on a per-request basis. This commit adds a global_request_id kwarg to keystoneauth1.session.Session.request, which is the funnel point for all requests coming through Adapter as well as Session itself. (All the methods feeding into that one already accept and pass through arbitrary **kwargs.) If present, the value in the X-Openstack-Request-Id header is set accordingly. Note that this will *override* Adapter.global_request_id, which is exactly what we want, as described above. [1] http://specs.openstack.org/openstack/oslo-specs/specs/pike/global-req-id.html [2] |
||
---|---|---|
.. | ||
access | ||
exceptions | ||
extras | ||
fixture | ||
hacking | ||
identity | ||
loading | ||
tests | ||
__init__.py | ||
_fair_semaphore.py | ||
_utils.py | ||
adapter.py | ||
discover.py | ||
noauth.py | ||
plugin.py | ||
service_token.py | ||
session.py | ||
token_endpoint.py |