Remove explicit global_request_id from keystoneauth subclass

We've embedded global_request_id into keystoneauth1 now, so the
special handling for the subclass is not needed.

Change-Id: Id45afb9130197887518a8732e046f61396308d58
This commit is contained in:
Sean Dague
2017-06-13 12:13:43 -04:00
parent c1b03efe0f
commit 57c50f0bd1
2 changed files with 1 additions and 6 deletions

View File

@@ -126,12 +126,10 @@ def _log_request_id(logger, resp, service_name):
class SessionClient(adapter.LegacyJsonAdapter):
global_request_id = None
def __init__(self, *args, **kwargs):
self.api_version = kwargs.pop('api_version', None)
self.api_version = self.api_version or api_versions.APIVersion()
self.global_request_id = kwargs.pop('global_request_id', None)
self.retries = kwargs.pop('retries', 0)
self._logger = logging.getLogger(__name__)
super(SessionClient, self).__init__(*args, **kwargs)
@@ -141,9 +139,6 @@ class SessionClient(adapter.LegacyJsonAdapter):
api_versions.update_headers(kwargs["headers"], self.api_version)
kwargs.setdefault('authenticated', False)
if self.global_request_id:
kwargs['headers'].setdefault(REQ_ID_HEADER, self.global_request_id)
# Note(tpatil): The standard call raises errors from
# keystoneauth, here we need to raise the cinderclient errors.
raise_exc = kwargs.pop('raise_exc', True)

View File

@@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
PrettyTable<0.8,>=0.7.1 # BSD
keystoneauth1>=2.20.0 # Apache-2.0
keystoneauth1>=2.21.0 # Apache-2.0
simplejson>=2.2.0 # MIT
Babel!=2.4.0,>=2.3.4 # BSD
six>=1.9.0 # MIT