From 67e3d66d476ef36aee1d3ad3cd9f0b795478d1bc Mon Sep 17 00:00:00 2001 From: Sergey Reshetnyak Date: Thu, 9 Apr 2015 11:32:12 +0300 Subject: [PATCH] Provide user-agent in saharaclient Change-Id: Iebd6d9fd1845a8c388cf2f809bdf902550881648 --- saharaclient/api/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/saharaclient/api/client.py b/saharaclient/api/client.py index 9552e2a0..3fe468b4 100644 --- a/saharaclient/api/client.py +++ b/saharaclient/api/client.py @@ -36,6 +36,9 @@ from saharaclient.api import node_group_templates from saharaclient.api import plugins +USER_AGENT = 'python-saharaclient' + + class HTTPClient(adapter.Adapter): def request(self, *args, **kwargs): @@ -78,6 +81,7 @@ class Client(object): service_type, endpoint_type) + kwargs['user_agent'] = USER_AGENT kwargs.setdefault('interface', endpoint_type) kwargs.setdefault('endpoint_override', sahara_url)