summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Dunsmore <jasondunsmore@gmail.com>2017-01-05 10:54:47 -0600
committerJason Dunsmore <jasondunsmore@gmail.com>2017-01-06 14:29:43 -0600
commit2cd3db111151ac327d3434f1c2f1a055b6714e23 (patch)
tree6738b4d6c3c79edde6056ced4de762879798f748
parentde271ae7574289ce162208b655e219e59f33ce60 (diff)
downloadpython-heatclient-2cd3db111151ac327d3434f1c2f1a055b6714e23.tar.gz
Make sure the --heat-url option is respected, part 2
If the endpoint is passed in, make sure keystone uses it instead of looking up the endpoint in the auth plugin. Original fix: 9e28993ee6fb814f014bc73a5611681ca3bb2c65 Closes-Bug: #1654344 Change-Id: I4b42ab9d87c790eef1953f995260b6b232a63445
-rw-r--r--heatclient/shell.py3
-rw-r--r--heatclient/tests/unit/test_shell.py9
2 files changed, 8 insertions, 4 deletions
diff --git a/heatclient/shell.py b/heatclient/shell.py
index 558fb8a..5774aac 100644
--- a/heatclient/shell.py
+++ b/heatclient/shell.py
@@ -544,7 +544,8 @@ class HeatShell(object):
'region_name': args.os_region_name,
'username': args.os_username,
'password': args.os_password,
- 'include_pass': args.include_password
+ 'include_pass': args.include_password,
+ 'endpoint_override': args.heat_url,
}
client = heat_client.Client(api_version, **kwargs)
diff --git a/heatclient/tests/unit/test_shell.py b/heatclient/tests/unit/test_shell.py
index 383ee2c..efa124e 100644
--- a/heatclient/tests/unit/test_shell.py
+++ b/heatclient/tests/unit/test_shell.py
@@ -618,7 +618,8 @@ class ShellTestEndpointType(TestCase):
'region_name': '',
'username': 'username',
'password': 'password',
- 'include_pass': False
+ 'include_pass': False,
+ 'endpoint_override': mox.IgnoreArg(),
}
http._construct_http_client(**kwargs)
heatclient.v1.shell.do_stack_list(mox.IgnoreArg(), mox.IgnoreArg())
@@ -637,7 +638,8 @@ class ShellTestEndpointType(TestCase):
'region_name': '',
'username': 'username',
'password': 'password',
- 'include_pass': False
+ 'include_pass': False,
+ 'endpoint_override': mox.IgnoreArg(),
}
http._construct_http_client(**kwargs)
heatclient.v1.shell.do_stack_list(mox.IgnoreArg(), mox.IgnoreArg())
@@ -658,7 +660,8 @@ class ShellTestEndpointType(TestCase):
'region_name': '',
'username': 'username',
'password': 'password',
- 'include_pass': False
+ 'include_pass': False,
+ 'endpoint_override': mox.IgnoreArg(),
}
http._construct_http_client(**kwargs)
heatclient.v1.shell.do_stack_list(mox.IgnoreArg(), mox.IgnoreArg())