Use endpoint as endpoint_override

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
This commit is contained in:
rabi 2016-11-21 16:30:08 +05:30
parent 57f9c0490b
commit 725dbf764f
1 changed files with 2 additions and 0 deletions

View File

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