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: I9b2e85842fb9a6ec75158bc612b47a4b64f169f9
This commit is contained in:
Matthias Bastian 2018-08-03 11:52:06 +02:00
parent 23d4b816a7
commit 9c96f348b4
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ class Puppet::Provider::Gnocchi < Puppet::Provider
end
def self.get_gnocchi_credentials
auth_keys = ['www_authenticate_uri', 'project_name', 'username', 'password']
auth_keys = ['auth_url', 'project_name', 'username', 'password']
conf = gnocchi_conf
if conf and conf['keystone_authtoken'] and
auth_keys.all?{|k| !conf['keystone_authtoken'][k].nil?}
@ -64,7 +64,7 @@ correctly configured.")
def self.auth_gnocchi(*args)
q = gnocchi_credentials
authenv = {
:OS_AUTH_URL => q['www_authenticate_uri'],
:OS_AUTH_URL => q['auth_url'],
:OS_USERNAME => q['username'],
:OS_TENANT_NAME => q['project_name'],
:OS_PASSWORD => q['password'],