summaryrefslogtreecommitdiff
path: root/openstackclient/common/clientmanager.py
diff options
context:
space:
mode:
authorRoxana Gherle <roxana.gherle@hp.com>2015-05-11 16:48:21 -0700
committerRoxana Gherle <roxana.gherle@hp.com>2015-05-11 17:00:39 -0700
commitc126a2ae5665de05dbdd26eb5d6ed16a08d78781 (patch)
tree725e250ed10c09df2364422933adaac3cdeb9e2f /openstackclient/common/clientmanager.py
parent83d73c2143b9afc40020d438284daa191ca1fe05 (diff)
downloadpython-openstackclient-c126a2ae5665de05dbdd26eb5d6ed16a08d78781.tar.gz
Send the correct user-agent to Keystone
When we execute an Openstack CLI command, keystone should log in Keystone access log that the user-agent that made the request was 'python-openstackclient' instead of the default 'python-keystoneclient'. Therefore, when we create the authentication session we need to send the explicit user-agent. Closes-Bug: #1453995 Change-Id: I75087fd4bb1ff1e6f2a911bc70bf8008268276bb
Diffstat (limited to 'openstackclient/common/clientmanager.py')
-rw-r--r--openstackclient/common/clientmanager.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py
index ca5ece0d..85e367c4 100644
--- a/openstackclient/common/clientmanager.py
+++ b/openstackclient/common/clientmanager.py
@@ -30,6 +30,8 @@ LOG = logging.getLogger(__name__)
PLUGIN_MODULES = []
+USER_AGENT = 'python-openstackclient'
+
class ClientCache(object):
"""Descriptor class for caching created client handles."""
@@ -163,6 +165,7 @@ class ClientManager(object):
auth=self.auth,
session=request_session,
verify=self._verify,
+ user_agent=USER_AGENT,
)
return