diff --git a/manifests/backend/swift.pp b/manifests/backend/swift.pp index d1b7406e..87842960 100644 --- a/manifests/backend/swift.pp +++ b/manifests/backend/swift.pp @@ -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; } } diff --git a/releasenotes/notes/glance-swift-v3-572d506977688377.yaml b/releasenotes/notes/glance-swift-v3-572d506977688377.yaml new file mode 100644 index 00000000..fc088d4d --- /dev/null +++ b/releasenotes/notes/glance-swift-v3-572d506977688377.yaml @@ -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. diff --git a/spec/classes/glance_backend_swift_spec.rb b/spec/classes/glance_backend_swift_spec.rb index e9ddd69f..3e84a480 100644 --- a/spec/classes/glance_backend_swift_spec.rb +++ b/spec/classes/glance_backend_swift_spec.rb @@ -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