mirror of
https://opendev.org/openstack/python-heatclient.git
synced 2026-01-17 07:10:29 +00:00
Merge "Set X-Region-Name in header when using SessionClient"
This commit is contained in:
commit
9084feb640
1 changed files with 4 additions and 0 deletions
|
|
@ -358,6 +358,10 @@ def _construct_http_client(endpoint=None, username=None, password=None,
|
|||
if 'interface' not in kwargs and endpoint_type:
|
||||
kwargs['interface'] = endpoint_type
|
||||
|
||||
if 'region_name' in kwargs:
|
||||
kwargs['additional_headers'] = {
|
||||
'X-Region-Name': kwargs['region_name']}
|
||||
|
||||
return SessionClient(session, auth=auth, **kwargs)
|
||||
else:
|
||||
return HTTPClient(endpoint=endpoint, username=username,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue