Provide user-agent in saharaclient

Change-Id: Iebd6d9fd1845a8c388cf2f809bdf902550881648
This commit is contained in:
Sergey Reshetnyak
2015-04-09 11:32:12 +03:00
parent 69ba7f0956
commit 67e3d66d47

View File

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