diff options
author | rabi <ramishra@redhat.com> | 2017-02-18 11:44:59 +0530 |
---|---|---|
committer | rabi <ramishra@redhat.com> | 2017-02-18 13:00:12 +0530 |
commit | b1c819f7d9faac2b702bfc505ac706fd436484a4 (patch) | |
tree | 327c4db4304c455ed2bedd2a3c56b04c7df613c4 /heatclient | |
parent | 07ea7d95b8c54dc9960f93c0cb278f614cf14989 (diff) | |
download | python-heatclient-b1c819f7d9faac2b702bfc505ac706fd436484a4.tar.gz |
Use endpoint_type with session client
if endpoint_type is provided, map it to interface for
SessionClient as this endpoint_type is ignored.
Change-Id: If5bd96578e5bc4389b9eee6e53c598f6ffaf0d8d
Closes-Buf: #1665858
Diffstat (limited to 'heatclient')
-rw-r--r-- | heatclient/common/http.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/heatclient/common/http.py b/heatclient/common/http.py index dc405f4..68d2908 100644 --- a/heatclient/common/http.py +++ b/heatclient/common/http.py @@ -349,9 +349,13 @@ def _construct_http_client(endpoint=None, username=None, password=None, if session: if 'endpoint_override' not in kwargs and endpoint: kwargs['endpoint_override'] = endpoint - elif 'service_type' not in kwargs: + + if 'service_type' not in kwargs: kwargs['service_type'] = 'orchestration' + if 'interface' not in kwargs and endpoint_type: + kwargs['interface'] = endpoint_type + return SessionClient(session, auth=auth, **kwargs) else: return HTTPClient(endpoint=endpoint, username=username, |