diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2014-09-05 02:00:36 -0500 |
|---|---|---|
| committer | lin-hua-cheng <os.lcheng@gmail.com> | 2015-04-07 23:53:31 -0700 |
| commit | 0d689871b4d8c060e1d48a9472449f3d670333bb (patch) | |
| tree | cdef140b5a66875ddbd9ff0ea7a561b5e2ec2b3a /openstackclient/common/clientmanager.py | |
| parent | a9d1e3d2192aa965d15c89eb6a603faf2e95b7ec (diff) | |
| download | python-openstackclient-0d689871b4d8c060e1d48a9472449f3d670333bb.tar.gz | |
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
Diffstat (limited to 'openstackclient/common/clientmanager.py')
| -rw-r--r-- | openstackclient/common/clientmanager.py | 4 |
1 files changed, 2 insertions, 2 deletions
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, |
