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
This commit is contained in:
Roxana Gherle 2015-05-11 16:48:21 -07:00
parent 83d73c2143
commit c126a2ae56

View File

@ -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