Add region support to credentials
This fixes the credentials classes to properly accept region as a property to manage. This allows OS_REGION_NAME to be set properly if the child class passes it in. Change-Id: I3345dac8bebd68f93290c1d45aa9a4d80bf3fb34 Partial-Bug: #1517220
This commit is contained in:
parent
c6644f3162
commit
f705fd6f4d
@ -6,7 +6,8 @@ class Puppet::Provider::Openstack::Credentials
|
||||
KEYS = [
|
||||
:auth_url, :password, :project_name, :username,
|
||||
:token, :url,
|
||||
:identity_api_version
|
||||
:identity_api_version,
|
||||
:region_name
|
||||
]
|
||||
|
||||
KEYS.each { |var| attr_accessor var }
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- Add support for multiple regions in base provider code used by other puppet
|
||||
modules.
|
@ -114,6 +114,7 @@ describe Puppet::Provider::Openstack::Credentials do
|
||||
creds.token = 'token'
|
||||
creds.url = 'url'
|
||||
creds.identity_api_version = 'identity_api_version'
|
||||
creds.region_name = 'Region1'
|
||||
expect(creds.to_env).to eq({
|
||||
'OS_USERNAME' => 'username',
|
||||
'OS_PASSWORD' => 'password',
|
||||
@ -121,7 +122,8 @@ describe Puppet::Provider::Openstack::Credentials do
|
||||
'OS_AUTH_URL' => 'auth_url',
|
||||
'OS_TOKEN' => 'token',
|
||||
'OS_URL' => 'url',
|
||||
'OS_IDENTITY_API_VERSION' => 'identity_api_version'
|
||||
'OS_IDENTITY_API_VERSION' => 'identity_api_version',
|
||||
'OS_REGION_NAME' => 'Region1',
|
||||
})
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user