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:
parent
83d73c2143
commit
c126a2ae56
@ -30,6 +30,8 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
PLUGIN_MODULES = []
|
PLUGIN_MODULES = []
|
||||||
|
|
||||||
|
USER_AGENT = 'python-openstackclient'
|
||||||
|
|
||||||
|
|
||||||
class ClientCache(object):
|
class ClientCache(object):
|
||||||
"""Descriptor class for caching created client handles."""
|
"""Descriptor class for caching created client handles."""
|
||||||
@ -163,6 +165,7 @@ class ClientManager(object):
|
|||||||
auth=self.auth,
|
auth=self.auth,
|
||||||
session=request_session,
|
session=request_session,
|
||||||
verify=self._verify,
|
verify=self._verify,
|
||||||
|
user_agent=USER_AGENT,
|
||||||
)
|
)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user