summaryrefslogtreecommitdiff
path: root/heatclient
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-12-19 03:34:09 +0000
committerGerrit Code Review <review@openstack.org>2018-12-19 03:34:09 +0000
commit9084feb6409420796ae0b4001742a2b0c6df5e7f (patch)
treeda1edf0fef93938da9da3662eb51bf5533a04a04 /heatclient
parent787747596105509afbe59c3eb1122ca9470e65bf (diff)
parentae21e6b70db8fbe9d2bfa90d1c3bd31135080381 (diff)
downloadpython-heatclient-9084feb6409420796ae0b4001742a2b0c6df5e7f.tar.gz
Merge "Set X-Region-Name in header when using SessionClient"
Diffstat (limited to 'heatclient')
-rw-r--r--heatclient/common/http.py4
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,