Fix for None base_url for Monasca client

The fix done for bug 1713050 could not be backported to Pike due to
the differences in monascaclient version.  This commit makes a fix
by including the auth_url, project_name, and project_domain_id in
the Client setup parameters.

Reference I154c0360946043f6dbb12ef756aa01d674f6de8f for more context.

Change-Id: I9f9e6a0f393c7748d4e8a9ed1a6ec9b537d0b7fd
Closes-Bug: #1713050
This commit is contained in:
Joseph Davis 2018-10-23 16:13:05 -07:00
parent 7524e615b2
commit e329e24cfe
1 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,7 @@
from monascaclient import client
from monascaclient import exc as monasca_exc
from heat.common import endpoint_utils
from heat.common import exception as heat_exc
from heat.engine.clients import client_plugin
from heat.engine import constraints
@ -37,6 +38,9 @@ class MonascaClientPlugin(client_plugin.ClientPlugin):
self.VERSION,
token=self.context.keystone_session.get_token(),
endpoint=endpoint,
auth_url=endpoint_utils.get_auth_uri(),
project_name=self.context.project_name,
project_domain_id=self.context.project_domain,
cacert=self._get_client_option(CLIENT_NAME, 'ca_file'),
cert_file=self._get_client_option(CLIENT_NAME, 'cert_file'),
key_file=self._get_client_option(CLIENT_NAME, 'key_file'),