From 0d689871b4d8c060e1d48a9472449f3d670333bb Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 5 Sep 2014 02:00:36 -0500 Subject: Fix session timing Subclass keystoneclient.session.Session to add the timing hooks to record the elapsed time returned by requests.Response objects, including the redirection history. Redirects are included individually and not rolled into the total time for the original request. This works for all clients that use OSC's session. Closes-Bug: #1402577 Change-Id: I9360c90c151579b89a37edb8c11c17feb15b3cb9 --- openstackclient/common/clientmanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openstackclient/common/clientmanager.py') diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index 10f38c25..6d2a9d76 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -19,10 +19,10 @@ import logging import pkg_resources import sys -from keystoneclient import session import requests from openstackclient.api import auth +from openstackclient.common import session as osc_session from openstackclient.identity import client as identity_client @@ -157,7 +157,7 @@ class ClientManager(object): self.auth = auth_plugin.load_from_options(**self._auth_params) # needed by SAML authentication request_session = requests.session() - self.session = session.Session( + self.session = osc_session.TimingSession( auth=self.auth, session=request_session, verify=self._verify, -- cgit v1.2.1