Pass correct parameters to '_get_connection' method

While getting the openstacksdk connection object, the
'project_domain_name' from conf file is passed to both
'user_domain_id' and 'project_domain_id' parameters.

The keystoneauth 'get_auth_plugin_conf_options('password')' [1]
also generates both 'user_domain_id' and 'project_domain_id' in
api section so no need to pass 'project_domain_name' to them we
can pass their respective values directly.

This patch fixes this by passing 'user_domain_id' and
'project_domain_id' to their respective parameters from api section
of conf file.

[1] https://github.com/openstack/masakari-monitors/blob/master/masakarimonitors/conf/api.py#L42

Closes-Bug: #1686896
Change-Id: I5b55db2eb0c1c1aa9a3d0123112d25c78eb38ea3
This commit is contained in:
dineshbhor 2017-04-25 14:36:11 +05:30
parent 421976606c
commit 9350d457ef

View File

@ -80,8 +80,8 @@ class SendNotification(object):
project_name=CONF.api.project_name,
username=CONF.api.username,
password=CONF.api.password,
project_domain_id=CONF.api.project_domain_name,
user_domain_id=CONF.api.project_domain_name)
project_domain_id=CONF.api.project_domain_id,
user_domain_id=CONF.api.user_domain_id)
# Send a notification.
retry_count = 0