diff --git a/manifests/backend/cinder.pp b/manifests/backend/cinder.pp index a8fe7e54..d20ac9c9 100644 --- a/manifests/backend/cinder.pp +++ b/manifests/backend/cinder.pp @@ -52,6 +52,18 @@ # Should be a valid boolean value # Defaults to $::os_service_default. # +# [*cinder_store_project_name*] +# (optional) Project name where the image volume is stored in cinder. +# Defaults to $::os_service_default. +# +# [*cinder_store_user_name*] +# (optional) User name to authenticate against cinder. +# Defaults to $::os_service_default. +# +# [*cinder_store_password*] +# (optional) A valid password for the user specified by `cinder_store_user_name' +# Defaults to $::os_service_default. +# # [*multi_store*] # (optional) Boolean describing if multiple backends will be configured # Defaults to false @@ -63,6 +75,9 @@ class glance::backend::cinder( $cinder_catalog_info = $::os_service_default, $cinder_endpoint_template = $::os_service_default, $cinder_http_retries = $::os_service_default, + $cinder_store_project_name = $::os_service_default, + $cinder_store_user_name = $::os_service_default, + $cinder_store_password = $::os_service_default, $multi_store = false, ) { @@ -78,6 +93,9 @@ class glance::backend::cinder( 'glance_store/cinder_http_retries': value => $cinder_http_retries; 'glance_store/cinder_endpoint_template': value => $cinder_endpoint_template; 'glance_store/cinder_ca_certificates_file': value => $cinder_ca_certificates_file; + 'glance_store/cinder_store_project_name': value => $cinder_store_project_name; + 'glance_store/cinder_store_user_name': value => $cinder_store_user_name; + 'glance_store/cinder_store_password': value => $cinder_store_password; } if !$multi_store { @@ -90,6 +108,9 @@ class glance::backend::cinder( 'glance_store/cinder_http_retries': value => $cinder_http_retries; 'glance_store/cinder_endpoint_template': value => $cinder_endpoint_template; 'glance_store/cinder_ca_certificates_file': value => $cinder_ca_certificates_file; + 'glance_store/cinder_store_project_name': value => $cinder_store_project_name; + 'glance_store/cinder_store_user_name': value => $cinder_store_user_name; + 'glance_store/cinder_store_password': value => $cinder_store_password; } } diff --git a/releasenotes/notes/add-missing-cinder-store-settings-f7aef33ec122a39a.yaml b/releasenotes/notes/add-missing-cinder-store-settings-f7aef33ec122a39a.yaml new file mode 100644 index 00000000..df164b3b --- /dev/null +++ b/releasenotes/notes/add-missing-cinder-store-settings-f7aef33ec122a39a.yaml @@ -0,0 +1,11 @@ +--- +features: + - | + Add new parameter 'cinder_store_project_name', for project + name where the image volume is stored in cinder. + + Add new parameter 'cinder_store_user_name', for user name + to authenticate against cinder. + + Add new parameter 'cinder_store_password', for valid password + for the user specified by 'cinder_store_user_name' diff --git a/spec/classes/glance_backend_cinder_spec.rb b/spec/classes/glance_backend_cinder_spec.rb index 1519cdc1..2b908386 100644 --- a/spec/classes/glance_backend_cinder_spec.rb +++ b/spec/classes/glance_backend_cinder_spec.rb @@ -38,6 +38,9 @@ describe 'glance::backend::cinder' do is_expected.to contain_glance_api_config('glance_store/cinder_http_retries').with_value('') is_expected.to contain_glance_api_config('glance_store/cinder_ca_certificates_file').with_value('') is_expected.to contain_glance_api_config('glance_store/cinder_endpoint_template').with_value('') + is_expected.to contain_glance_api_config('glance_store/cinder_store_project_name').with_value('') + is_expected.to contain_glance_api_config('glance_store/cinder_store_user_name').with_value('') + is_expected.to contain_glance_api_config('glance_store/cinder_store_password').with_value('') end it 'configures glance-cache.conf' do is_expected.to contain_glance_cache_config('glance_store/cinder_api_insecure').with_value('') @@ -45,6 +48,9 @@ describe 'glance::backend::cinder' do is_expected.to contain_glance_cache_config('glance_store/cinder_http_retries').with_value('') is_expected.to contain_glance_cache_config('glance_store/cinder_ca_certificates_file').with_value('') is_expected.to contain_glance_cache_config('glance_store/cinder_endpoint_template').with_value('') + is_expected.to contain_glance_cache_config('glance_store/cinder_store_project_name').with_value('') + is_expected.to contain_glance_cache_config('glance_store/cinder_store_user_name').with_value('') + is_expected.to contain_glance_cache_config('glance_store/cinder_store_password').with_value('') end end @@ -56,6 +62,9 @@ describe 'glance::backend::cinder' do :cinder_catalog_info => 'volume:cinder:internalURL', :cinder_endpoint_template => 'http://srv-foo:8776/v1/%(project_id)s', :cinder_http_retries => '10', + :cinder_store_project_name => 'services', + :cinder_store_user_name => 'glance', + :cinder_store_password => 'glance', } end it 'configures glance-api.conf' do @@ -64,6 +73,9 @@ describe 'glance::backend::cinder' do is_expected.to contain_glance_api_config('glance_store/cinder_catalog_info').with_value('volume:cinder:internalURL') is_expected.to contain_glance_api_config('glance_store/cinder_endpoint_template').with_value('http://srv-foo:8776/v1/%(project_id)s') is_expected.to contain_glance_api_config('glance_store/cinder_http_retries').with_value('10') + is_expected.to contain_glance_api_config('glance_store/cinder_store_project_name').with_value('services') + is_expected.to contain_glance_api_config('glance_store/cinder_store_user_name').with_value('glance') + is_expected.to contain_glance_api_config('glance_store/cinder_store_password').with_value('glance') end it 'configures glance-cache.conf' do is_expected.to contain_glance_cache_config('glance_store/cinder_api_insecure').with_value(true) @@ -71,6 +83,9 @@ describe 'glance::backend::cinder' do is_expected.to contain_glance_cache_config('glance_store/cinder_catalog_info').with_value('volume:cinder:internalURL') is_expected.to contain_glance_cache_config('glance_store/cinder_endpoint_template').with_value('http://srv-foo:8776/v1/%(project_id)s') is_expected.to contain_glance_cache_config('glance_store/cinder_http_retries').with_value('10') + is_expected.to contain_glance_cache_config('glance_store/cinder_store_project_name').with_value('services') + is_expected.to contain_glance_cache_config('glance_store/cinder_store_user_name').with_value('glance') + is_expected.to contain_glance_cache_config('glance_store/cinder_store_password').with_value('glance') end end end