Make providers use auth_url for authentication

When reading credentials from the configuration's keystone_authtoken
section www_authenticate_uri was used as URL for Keystone.
As www_authenticate_uri is a public endpoint that is not necessarily
reachable for the Puppet agent, this change uses the more appropriate
auth_url as Keystone URL.

Change-Id: I231f578db145956ab61a514106a5e714a055a1cb
This commit is contained in:
Matthias Bastian 2018-08-03 14:11:31 +02:00
parent 0cb77e69ca
commit 926dd39833
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ class Puppet::Provider::Trove < Puppet::Provider
end
def self.get_trove_credentials
auth_keys = ['www_authenticate_uri', 'project_name', 'username', 'password',
auth_keys = ['auth_url', 'project_name', 'username', 'password',
'project_domain_name', 'user_domain_name']
conf = trove_conf
if conf and conf['keystone_authtoken'] and
@ -54,7 +54,7 @@ correctly configured.")
def self.auth_trove(*args)
q = trove_credentials
authenv = {
:OS_AUTH_URL => q['www_authenticate_uri'],
:OS_AUTH_URL => q['auth_url'],
:OS_USERNAME => q['username'],
:OS_PROJECT_NAME => q['project_name'],
:OS_PASSWORD => q['password'],