diff --git a/manifests/volume/cinder.pp b/manifests/volume/cinder.pp index bc5d5116..afecf84d 100644 --- a/manifests/volume/cinder.pp +++ b/manifests/volume/cinder.pp @@ -59,48 +59,6 @@ # availability zones. # Defaults to $::os_service_default # -# === DEPRECATED PARAMETERS -# -# [*cinder_catalog_info*] -# (optional) Info to match when looking for cinder in the service -# catalog. Format is : separated values of the form: -# :: -# Defaults to undef -# -# [*cinder_ca_certificates_file*] -# (optional) Location of ca certificates file to use for cinder -# client requests. -# Defaults to undef -# -# [*cinder_http_retries*] -# (optional) Number of cinderclient retries on failed http calls. -# Defaults to undef -# -# [*cinder_api_insecure*] -# (optional) Allow to perform insecure SSL requests to cinder -# Defaults to undef -# -# [*cinder_cross_az_attach*] -# (optional) Allow attach between instance and volume in different -# availability zones. -# Defaults to undef -# -# [*cinder_admin_username*] -# (optional) Cinder admin username. -# Defaults to undef -# -# [*cinder_admin_password*] -# (optional) Cinder admin password. -# Defaults to $::os_service_default -# -# [*cinder_admin_tenant_name*] -# (optional) Cinder admin tenant name -# Defaults to undef -# -# [*cinder_admin_auth_url*] -# (optional) Identity service url -# Defaults to undef -# class manila::volume::cinder ( $insecure = $::os_service_default, $auth_url = $::os_service_default, @@ -115,78 +73,23 @@ class manila::volume::cinder ( $password = $::os_service_default, $http_retries = $::os_service_default, $cross_az_attach = $::os_service_default, - # DEPRECATED PARAMETERS - $cinder_catalog_info = undef, - $cinder_ca_certificates_file = undef, - $cinder_http_retries = undef, - $cinder_api_insecure = undef, - $cinder_cross_az_attach = undef, - $cinder_admin_username = undef, - $cinder_admin_password = undef, - $cinder_admin_tenant_name = undef, - $cinder_admin_auth_url = undef, ) { include manila::deps - if $cinder_catalog_info { - warning('The cinder_catalog_info parameter is deprecated, has no effect and will be removed in a future release.') - } - - if $cinder_api_insecure { - warning('The cinder_api_insecure parameter is deprecated, use insecure instead.') - } - - if $cinder_ca_certificates_file { - warning('The cinder_ca_certificates_file parameter is deprecated, use cafile instead.') - } - - if $cinder_admin_username { - warning('The cinder_admin_username parameter is deprecated, use username instead.') - } - - if $cinder_admin_password { - warning('The cinder_admin_password parameter is deprecated, use password instead.') - } - - if $cinder_admin_tenant_name { - warning('The cinder_admin_tenant_name parameter is deprecated, use project_name instead.') - } - - if $cinder_admin_auth_url { - warning('The cinder_admin_auth_url parameter is deprecated, use auth_url instead.') - } - - if $cinder_http_retries { - warning('The cinder_http_retries parameter is deprecated, use http_retries instead') - } - - if $cinder_cross_az_attach { - warning('The cinder_cross_az_attach parameter is deprecated, use cross_az_attach instead') - } - - $insecure_real = pick($cinder_api_insecure, $insecure) - $cafile_real = pick($cinder_ca_certificates_file, $cafile) - $username_real = pick($cinder_admin_username, $username) - $password_real = pick_default($cinder_admin_password, $password) - $project_name_real = pick($cinder_admin_tenant_name, $project_name) - $auth_url_real = pick($cinder_admin_auth_url, $auth_url) - $http_retries_real = pick($cinder_http_retries, $http_retries) - $cross_az_attach_real = pick($cinder_cross_az_attach, $cross_az_attach) - manila_config { - 'cinder/insecure': value => $insecure_real; - 'cinder/auth_url': value => $auth_url_real; + 'cinder/insecure': value => $insecure; + 'cinder/auth_url': value => $auth_url; 'cinder/auth_type': value => $auth_type; - 'cinder/cafile': value => $cafile_real; + 'cinder/cafile': value => $cafile; 'cinder/region_name': value => $region_name; 'cinder/endpoint_type': value => $endpoint_type; - 'cinder/username': value => $username_real; + 'cinder/username': value => $username; 'cinder/user_domain_name': value => $user_domain_name; - 'cinder/password': value => $password_real, secret => true; - 'cinder/project_name': value => $project_name_real; + 'cinder/password': value => $password, secret => true; + 'cinder/project_name': value => $project_name; 'cinder/project_domain_name': value => $project_domain_name; - 'cinder/http_retries': value => $http_retries_real; - 'cinder/cross_az_attach': value => $cross_az_attach_real; + 'cinder/http_retries': value => $http_retries; + 'cinder/cross_az_attach': value => $cross_az_attach; } } diff --git a/releasenotes/notes/remove-deprecated-cinder-params-c5dfd5ece0c1079c.yaml b/releasenotes/notes/remove-deprecated-cinder-params-c5dfd5ece0c1079c.yaml new file mode 100644 index 00000000..9572d926 --- /dev/null +++ b/releasenotes/notes/remove-deprecated-cinder-params-c5dfd5ece0c1079c.yaml @@ -0,0 +1,14 @@ +--- +upgrade: + - | + The following parameters of the ``manila::volume::cinder`` class have been + removed. + + - ``cinder_catalog_info`` + - ``cinder_ca_certificates_file`` + - ``cinder_http_retries`` + - ``cinder_cross_az_attach`` + - ``cinder_admin_username`` + - ``cinder_admin_password`` + - ``cinder_admin_tenant_name`` + - ``cinder_admin_auth_url`` diff --git a/spec/classes/manila_volume_cinder_spec.rb b/spec/classes/manila_volume_cinder_spec.rb index fd2f0517..e674ac9e 100644 --- a/spec/classes/manila_volume_cinder_spec.rb +++ b/spec/classes/manila_volume_cinder_spec.rb @@ -52,32 +52,6 @@ describe 'manila::volume::cinder' do is_expected.to contain_manila_config('cinder/cross_az_attach').with_value('true') end end - - context 'with deprecated parameters' do - let :params do - { - :cinder_api_insecure => true, - :cinder_ca_certificates_file => '/foo/ssl/certs/ca.crt', - :auth_type => 'password', - :cinder_admin_tenant_name => 'service2', - :cinder_admin_username => 'cinderv2', - :cinder_admin_password => '321321', - :cinder_http_retries => 3, - :cinder_cross_az_attach => true, - } - end - - it 'configures manila volume cinder with deprecated parameters' do - is_expected.to contain_manila_config('cinder/auth_type').with_value('password') - is_expected.to contain_manila_config('cinder/insecure').with_value(true) - is_expected.to contain_manila_config('cinder/cafile').with_value('/foo/ssl/certs/ca.crt') - is_expected.to contain_manila_config('cinder/project_name').with_value('service2') - is_expected.to contain_manila_config('cinder/username').with_value('cinderv2') - is_expected.to contain_manila_config('cinder/password').with_value('321321') - is_expected.to contain_manila_config('cinder/http_retries').with_value(3) - is_expected.to contain_manila_config('cinder/cross_az_attach').with_value('true') - end - end end on_supported_os({