diff options
author | Clayton O'Neill <clayton.oneill@twcable.com> | 2016-03-10 14:29:58 +0000 |
---|---|---|
committer | Clayton O'Neill <clayton.oneill@twcable.com> | 2016-03-11 19:48:13 +0000 |
commit | 9d01be24b7ee0f4468b44b218fbbfaa390e0b291 (patch) | |
tree | 52abdc2d0985a9c44d70341808f74e1739c53113 /heatclient/osc/plugin.py | |
parent | cbd849bea53b8619420e437aefb72e49a7c5f6bb (diff) | |
download | python-heatclient-9d01be24b7ee0f4468b44b218fbbfaa390e0b291.tar.gz |
OSC plugin should be region/interface aware
This fixes the OSC plugin so that if region is specified or if the
interface is specified (public, internal, admin) then those will be
passed into the heat_client when instantiated. Without this the
client will pick the endpoint for the first region returned instead of
the one specified.
Closes-Bug: #1556263
Change-Id: I9c15719e7711c93e7fd076d38d66011bb20f988d
Diffstat (limited to 'heatclient/osc/plugin.py')
-rw-r--r-- | heatclient/osc/plugin.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/heatclient/osc/plugin.py b/heatclient/osc/plugin.py index dd980ef..7939c79 100644 --- a/heatclient/osc/plugin.py +++ b/heatclient/osc/plugin.py @@ -33,8 +33,14 @@ def make_client(instance): API_VERSIONS) LOG.debug('Instantiating orchestration client: %s', heat_client) + endpoint = instance.get_endpoint_for_service_type( + API_NAME, + region_name=instance._region_name, + interface=instance._interface, + ) + client = heat_client( - endpoint=instance.get_endpoint_for_service_type('orchestration'), + endpoint=endpoint, session=instance.session, auth_url=instance._auth_url, username=instance._username, |