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
This commit is contained in:
parent
07ea7d95b8
commit
b1c819f7d9
|
@ -349,9 +349,13 @@ def _construct_http_client(endpoint=None, username=None, password=None,
|
||||||
if session:
|
if session:
|
||||||
if 'endpoint_override' not in kwargs and endpoint:
|
if 'endpoint_override' not in kwargs and endpoint:
|
||||||
kwargs['endpoint_override'] = endpoint
|
kwargs['endpoint_override'] = endpoint
|
||||||
elif 'service_type' not in kwargs:
|
|
||||||
|
if 'service_type' not in kwargs:
|
||||||
kwargs['service_type'] = 'orchestration'
|
kwargs['service_type'] = 'orchestration'
|
||||||
|
|
||||||
|
if 'interface' not in kwargs and endpoint_type:
|
||||||
|
kwargs['interface'] = endpoint_type
|
||||||
|
|
||||||
return SessionClient(session, auth=auth, **kwargs)
|
return SessionClient(session, auth=auth, **kwargs)
|
||||||
else:
|
else:
|
||||||
return HTTPClient(endpoint=endpoint, username=username,
|
return HTTPClient(endpoint=endpoint, username=username,
|
||||||
|
|
Loading…
Reference in New Issue