summaryrefslogtreecommitdiff
path: root/heatclient/common
diff options
context:
space:
mode:
authorrabi <ramishra@redhat.com>2016-11-21 16:30:08 +0530
committerrabi <ramishra@redhat.com>2016-11-21 16:46:33 +0530
commit725dbf764fa876977a5ca19a2a1e082a25494eb8 (patch)
tree9aa6c8dd5b56b92996937ada1c8d86a1230480e8 /heatclient/common
parent57f9c0490bf6a8af92ab0f7f15547a6e9af035bb (diff)
downloadpython-heatclient-725dbf764fa876977a5ca19a2a1e082a25494eb8.tar.gz
Use endpoint as endpoint_override1.6.1
Number of projects like rally pass endpoint rather than endpoint_override when using session with heatclient. Use endpoint as endpoint_override when not specified. Make it backward compatible. Change-Id: Iff977424a15ac2ce3ffdf8d7c98d5e72d25c1e91 Closes-Bug: #1643507
Diffstat (limited to 'heatclient/common')
-rw-r--r--heatclient/common/http.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/heatclient/common/http.py b/heatclient/common/http.py
index 0a31496..a9c981c 100644
--- a/heatclient/common/http.py
+++ b/heatclient/common/http.py
@@ -347,6 +347,8 @@ def _construct_http_client(endpoint=None, username=None, password=None,
auth = kwargs.pop('auth', None)
if session:
+ if 'endpoint_override' not in kwargs and endpoint:
+ kwargs['endpoint_override'] = endpoint
return SessionClient(session, auth=auth, **kwargs)
else:
return HTTPClient(endpoint=endpoint, username=username,