Skip to content

Commit c126a2a

Browse files
author
Roxana Gherle
committed
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
1 parent 83d73c2 commit c126a2a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎openstackclient/common/clientmanager.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
PLUGIN_MODULES = []
3232

33+
USER_AGENT = 'python-openstackclient'
34+
3335

3436
class ClientCache(object):
3537
"""Descriptor class for caching created client handles."""
@@ -163,6 +165,7 @@ def setup_auth(self):
163165
auth=self.auth,
164166
session=request_session,
165167
verify=self._verify,
168+
user_agent=USER_AGENT,
166169
)
167170

168171
return

0 commit comments

Comments
 (0)