diff options
author | Monty Taylor <mordred@inaugust.com> | 2017-04-13 09:17:08 -0500 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2017-04-18 08:03:23 -0500 |
commit | 92665dbcd823a28ae14a5ee5ba911513697d17be (patch) | |
tree | f1d272db99a912007d7d7321b9f0bdf0ed945a22 /novaclient/client.py | |
parent | 6182a019983bd040b9f9edaad5c45399944695ff (diff) | |
download | python-novaclient-92665dbcd823a28ae14a5ee5ba911513697d17be.tar.gz |
Add novaclient client_name and client_version to user-agent
keystoneauth supports setting additional info into the user-agent string
about what the client is. Set it so that novaclient shows up in server
logs as the client.
Change-Id: I084a16f5372ec7df598505e9f925a70d26d66f69
Diffstat (limited to 'novaclient/client.py')
-rw-r--r-- | novaclient/client.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/novaclient/client.py b/novaclient/client.py index 09ca5647..be2fad87 100644 --- a/novaclient/client.py +++ b/novaclient/client.py @@ -33,6 +33,7 @@ import pkg_resources osprofiler_profiler = importutils.try_import("osprofiler.profiler") osprofiler_web = importutils.try_import("osprofiler.web") +import novaclient from novaclient import api_versions from novaclient import exceptions from novaclient import extension as ext @@ -48,6 +49,9 @@ extensions_ignored_name = ["__init__"] class SessionClient(adapter.LegacyJsonAdapter): + client_name = 'python-novaclient' + client_version = novaclient.__version__ + def __init__(self, *args, **kwargs): self.times = [] self.timings = kwargs.pop('timings', False) |