Add options to set swift auth domains
We need options to be able to set the user and project domain when using keystone v3 credentials for the swift backend. Without these options keystone v3 swift will fail. Change-Id: Id384b0eca750e0946b42cb8ccb60a7f9ed64d21a
This commit is contained in:
parent
a7b78a33e1
commit
006c32a38f
manifests/backend
releasenotes/notes
spec/classes
@ -14,6 +14,12 @@
|
||||
# [*swift_store_auth_address*]
|
||||
# Optional. Default: 'http://127.0.0.1:5000/v2.0/'
|
||||
#
|
||||
# [*swift_store_auth_project_domain_id*]
|
||||
# Optional. Useful when keystone auth is version 3. Default: default
|
||||
#
|
||||
# [*swift_store_auth_user_domain_id*]
|
||||
# Optional. Useful when keystone auth is version 3. Default: default
|
||||
#
|
||||
# [*swift_store_container*]
|
||||
# Optional. Default: 'glance'
|
||||
#
|
||||
@ -52,6 +58,8 @@ class glance::backend::swift(
|
||||
$swift_store_auth_address = 'http://127.0.0.1:5000/v2.0/',
|
||||
$swift_store_container = 'glance',
|
||||
$swift_store_auth_version = '2',
|
||||
$swift_store_auth_project_domain_id = 'default',
|
||||
$swift_store_auth_user_domain_id = 'default',
|
||||
$swift_store_large_object_size = '5120',
|
||||
$swift_store_create_container_on_put = false,
|
||||
$swift_store_endpoint_type = 'internalURL',
|
||||
@ -103,6 +111,8 @@ class glance::backend::swift(
|
||||
"${default_swift_reference}/key": value => $swift_store_key;
|
||||
"${default_swift_reference}/auth_address": value => $swift_store_auth_address;
|
||||
"${default_swift_reference}/auth_version": value => $swift_store_auth_version;
|
||||
"${default_swift_reference}/user_domain_id": value => $swift_store_auth_user_domain_id;
|
||||
"${default_swift_reference}/project_domain_id": value => $swift_store_auth_project_domain_id;
|
||||
}
|
||||
|
||||
}
|
||||
|
11
releasenotes/notes/glance-swift-v3-572d506977688377.yaml
Normal file
11
releasenotes/notes/glance-swift-v3-572d506977688377.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
upgrade:
|
||||
- Glance users who wish to configure the Swift backend
|
||||
can make use of swift_store_auth_project_domain_id and
|
||||
swift_store_auth_user_domain_id to configure the required
|
||||
keystone domain settings.
|
||||
fixes:
|
||||
- Previously glance swift authentication would work only
|
||||
with keystone auth <= 2. This fix allows you to properly
|
||||
configured the (required) keystone domains for keystone
|
||||
v3 authentication.
|
@ -28,6 +28,8 @@ describe 'glance::backend::swift' do
|
||||
is_expected.to contain_glance_swift_config('ref1/user').with_value('user')
|
||||
is_expected.to contain_glance_swift_config('ref1/auth_version').with_value('2')
|
||||
is_expected.to contain_glance_swift_config('ref1/auth_address').with_value('http://127.0.0.1:5000/v2.0/')
|
||||
is_expected.to contain_glance_swift_config('ref1/user_domain_id').with_value('default')
|
||||
is_expected.to contain_glance_swift_config('ref1/project_domain_id').with_value('default')
|
||||
end
|
||||
|
||||
it 'not configures glance-glare.conf' do
|
||||
@ -48,6 +50,8 @@ describe 'glance::backend::swift' do
|
||||
:swift_store_user => 'user2',
|
||||
:swift_store_key => 'key2',
|
||||
:swift_store_auth_version => '1',
|
||||
:swift_store_auth_project_domain_id => 'proj_domain',
|
||||
:swift_store_auth_user_domain_id => 'user_domain',
|
||||
:swift_store_large_object_size => '100',
|
||||
:swift_store_auth_address => '127.0.0.2:8080/v1.0/',
|
||||
:swift_store_container => 'swift',
|
||||
@ -70,6 +74,8 @@ describe 'glance::backend::swift' do
|
||||
is_expected.to contain_glance_swift_config('swift_creds/user').with_value('user2')
|
||||
is_expected.to contain_glance_swift_config('swift_creds/auth_version').with_value('1')
|
||||
is_expected.to contain_glance_swift_config('swift_creds/auth_address').with_value('127.0.0.2:8080/v1.0/')
|
||||
is_expected.to contain_glance_swift_config('swift_creds/user_domain_id').with_value('user_domain')
|
||||
is_expected.to contain_glance_swift_config('swift_creds/project_domain_id').with_value('proj_domain')
|
||||
end
|
||||
|
||||
it 'configures glance-glare.conf' do
|
||||
|
Loading…
x
Reference in New Issue
Block a user