diff options
author | Zuul <zuul@review.openstack.org> | 2018-12-19 03:34:09 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-12-19 03:34:09 +0000 |
commit | 9084feb6409420796ae0b4001742a2b0c6df5e7f (patch) | |
tree | da1edf0fef93938da9da3662eb51bf5533a04a04 /heatclient | |
parent | 787747596105509afbe59c3eb1122ca9470e65bf (diff) | |
parent | ae21e6b70db8fbe9d2bfa90d1c3bd31135080381 (diff) | |
download | python-heatclient-9084feb6409420796ae0b4001742a2b0c6df5e7f.tar.gz |
Merge "Set X-Region-Name in header when using SessionClient"
Diffstat (limited to 'heatclient')
-rw-r--r-- | heatclient/common/http.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/heatclient/common/http.py b/heatclient/common/http.py index bb2f0c1..0894e19 100644 --- a/heatclient/common/http.py +++ b/heatclient/common/http.py @@ -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, |