Merge "Make providers use auth_url for authentication"
This commit is contained in:
commit
f17ce9bd7e
@ -52,7 +52,7 @@ class Puppet::Provider::Cinder < Puppet::Provider::Openstack
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.get_cinder_credentials
|
def self.get_cinder_credentials
|
||||||
auth_keys = ['www_authenticate_uri', 'project_name', 'username',
|
auth_keys = ['auth_url', 'project_name', 'username',
|
||||||
'password']
|
'password']
|
||||||
conf = cinder_conf
|
conf = cinder_conf
|
||||||
if conf and conf['keystone_authtoken'] and
|
if conf and conf['keystone_authtoken'] and
|
||||||
@ -82,7 +82,7 @@ class Puppet::Provider::Cinder < Puppet::Provider::Openstack
|
|||||||
|
|
||||||
def self.get_auth_endpoint
|
def self.get_auth_endpoint
|
||||||
q = cinder_credentials
|
q = cinder_credentials
|
||||||
"#{q['www_authenticate_uri']}"
|
"#{q['auth_url']}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.auth_endpoint
|
def self.auth_endpoint
|
||||||
|
@ -24,19 +24,19 @@ describe Puppet::Provider::Cinder do
|
|||||||
|
|
||||||
it 'should read conf file with all sections' do
|
it 'should read conf file with all sections' do
|
||||||
creds_hash = {
|
creds_hash = {
|
||||||
'www_authenticate_uri' => 'https://192.168.56.210:5000/v2.0/',
|
'auth_url' => 'https://192.168.56.210:5000/v2.0/',
|
||||||
'project_name' => 'admin_tenant',
|
'project_name' => 'admin_tenant',
|
||||||
'username' => 'admin',
|
'username' => 'admin',
|
||||||
'password' => 'password',
|
'password' => 'password',
|
||||||
'project_domain_name' => 'Default',
|
'project_domain_name' => 'Default',
|
||||||
'user_domain_name' => 'Default',
|
'user_domain_name' => 'Default',
|
||||||
}
|
}
|
||||||
mock = {
|
mock = {
|
||||||
'keystone_authtoken' => {
|
'keystone_authtoken' => {
|
||||||
'www_authenticate_uri' => 'https://192.168.56.210:5000/v2.0/',
|
'auth_url' => 'https://192.168.56.210:5000/v2.0/',
|
||||||
'project_name' => 'admin_tenant',
|
'project_name' => 'admin_tenant',
|
||||||
'username' => 'admin',
|
'username' => 'admin',
|
||||||
'password' => 'password',
|
'password' => 'password',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Puppet::Util::IniConfig::File.expects(:new).returns(mock)
|
Puppet::Util::IniConfig::File.expects(:new).returns(mock)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user