Add swift_store_auth_version to swift backend.
Updates the glance swift backend to support configuring the swift_store_auth_version setting. The default value for this is '2' (which matches the glance config file defaults). As part of this change I am also updating the default value for swift_store_auth_address to use 127.0.0.1:5000/v2.0/ (keystone). This makes sense because the previous value would have required us to set swift_store_auth_version by default to 1. Change-Id: I865712914dd0506b2722ab8da3e1c56d7d9f433a
This commit is contained in:
parent
d3eab8dfff
commit
5dbcb47c50
@ -14,8 +14,9 @@
|
||||
class glance::backend::swift(
|
||||
$swift_store_user,
|
||||
$swift_store_key,
|
||||
$swift_store_auth_address = '127.0.0.1:8080/v1.0/',
|
||||
$swift_store_auth_address = '127.0.0.1:5000/v2.0/',
|
||||
$swift_store_container = 'glance',
|
||||
$swift_store_auth_version = '2',
|
||||
$swift_store_create_container_on_put = 'False'
|
||||
) {
|
||||
|
||||
@ -25,6 +26,7 @@ class glance::backend::swift(
|
||||
'DEFAULT/swift_store_key': value => $swift_store_key;
|
||||
'DEFAULT/swift_store_auth_address': value => $swift_store_auth_address;
|
||||
'DEFAULT/swift_store_container': value => $swift_store_container;
|
||||
'DEFAULT/swift_store_auth_version': value => $swift_store_auth_version;
|
||||
'DEFAULT/swift_store_create_container_on_put':
|
||||
value => $swift_store_create_container_on_put;
|
||||
}
|
||||
|
@ -21,7 +21,8 @@ describe 'glance::backend::swift' do
|
||||
it { should contain_glance_api_config('DEFAULT/default_store').with_value('swift') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_key').with_value('key') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_user').with_value('user') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_auth_address').with_value('127.0.0.1:8080/v1.0/') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_auth_version').with_value('2') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_auth_address').with_value('127.0.0.1:5000/v2.0/') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_container').with_value('glance') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_create_container_on_put').with_value('False') }
|
||||
|
||||
@ -30,6 +31,7 @@ describe 'glance::backend::swift' do
|
||||
{
|
||||
:swift_store_user => 'user',
|
||||
:swift_store_key => 'key',
|
||||
:swift_store_auth_version => '1',
|
||||
:swift_store_auth_address => '127.0.0.2:8080/v1.0/',
|
||||
:swift_store_container => 'swift',
|
||||
:swift_store_create_container_on_put => 'True'
|
||||
@ -37,6 +39,7 @@ describe 'glance::backend::swift' do
|
||||
end
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_container').with_value('swift') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_create_container_on_put').with_value('True') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_auth_version').with_value('1') }
|
||||
it { should contain_glance_api_config('DEFAULT/swift_store_auth_address').with_value('127.0.0.2:8080/v1.0/') }
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user