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
This commit is contained in:
Clayton O'Neill
2016-03-10 14:29:58 +00:00
parent cbd849bea5
commit 9d01be24b7

View File

@@ -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,