diff --git a/lib/puppet/provider/ironic.rb b/lib/puppet/provider/ironic.rb index 443e0615..98cf49ff 100644 --- a/lib/puppet/provider/ironic.rb +++ b/lib/puppet/provider/ironic.rb @@ -29,7 +29,7 @@ class Puppet::Provider::Ironic < Puppet::Provider end def self.get_ironic_credentials - auth_keys = ['www_authenticate_uri', 'project_name', 'username', 'password'] + auth_keys = ['auth_url', 'project_name', 'username', 'password'] conf = ironic_conf if conf and conf['keystone_authtoken'] and auth_keys.all?{|k| !conf['keystone_authtoken'][k].nil?} @@ -67,7 +67,7 @@ correctly configured.") def self.auth_ironic(*args) q = ironic_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'], diff --git a/spec/unit/provider/ironic_spec.rb b/spec/unit/provider/ironic_spec.rb index 02211f7e..41e57010 100644 --- a/spec/unit/provider/ironic_spec.rb +++ b/spec/unit/provider/ironic_spec.rb @@ -11,12 +11,12 @@ describe Puppet::Provider::Ironic do let :credential_hash do { - 'project_name' => 'admin_tenant', - 'username' => 'admin', - 'password' => 'password', - 'www_authenticate_uri' => 'https://192.168.56.210:5000/', - 'project_domain_name' => 'admin_tenant_domain', - 'user_domain_name' => 'admin_domain', + 'project_name' => 'admin_tenant', + 'username' => 'admin', + 'password' => 'password', + 'auth_url' => 'https://192.168.56.210:5000/', + 'project_domain_name' => 'admin_tenant_domain', + 'user_domain_name' => 'admin_domain', } end @@ -60,7 +60,7 @@ describe Puppet::Provider::Ironic do it 'should set auth credentials in the environment' do authenv = { - :OS_AUTH_URL => credential_hash['www_authenticate_uri'], + :OS_AUTH_URL => credential_hash['auth_url'], :OS_USERNAME => credential_hash['username'], :OS_PROJECT_NAME => credential_hash['project_name'], :OS_PASSWORD => credential_hash['password'],