Use default service_type with session

At present when using session with heatclient, you've to
specify the service_type. Use the only service_type
'orchestration', if not specified.

Change-Id: I994698784e5b30471f6d863034fa21aa8963fd9f
Partial-Bug: #1646539
This commit is contained in:
rabi 2016-12-02 08:37:22 +05:30
parent 2f4feffd73
commit ebb92f1acc

View File

@ -349,6 +349,9 @@ 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:
kwargs['service_type'] = 'orchestration'
return SessionClient(session, auth=auth, **kwargs)
else:
return HTTPClient(endpoint=endpoint, username=username,