From 8b2e9108afd6930f260f9200e93e41d4970d364c Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 8 Feb 2020 19:22:31 +0900 Subject: [PATCH] Deprecate nova::auth_strategy ... because the corresponding parameter, api/auth_strategy was deperecated in nova[1]. [1] 18de63deaab792a490e987663d96b6025309b862 Change-Id: Id4515e4f7c78398b99eb45a426fb5ce37d09b931 --- manifests/init.pp | 16 ++++++++++------ ...deprecate_auth_strategy-87bf439647037fbd.yaml | 5 +++++ spec/classes/nova_init_spec.rb | 6 ++---- 3 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 releasenotes/notes/deprecate_auth_strategy-87bf439647037fbd.yaml diff --git a/manifests/init.pp b/manifests/init.pp index aaa369e0a..d1ebb347d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -211,10 +211,6 @@ # IP address. # Defaults to $::os_service_default. # -# [*auth_strategy*] -# (optional) The strategy to use for auth: noauth or keystone. -# Defaults to 'keystone' -# # [*service_down_time*] # (optional) Maximum time since last check-in for up service. # Defaults to 60 @@ -419,6 +415,10 @@ # exceptions in the API service # Defaults to undef # +# [*auth_strategy*] +# (optional) The strategy to use for auth: noauth or keystone. +# Defaults to undef +# class nova( $ensure_package = 'present', $database_connection = undef, @@ -469,7 +469,6 @@ class nova( $amqp_username = $::os_service_default, $amqp_password = $::os_service_default, $host = $::os_service_default, - $auth_strategy = 'keystone', $service_down_time = 60, $state_path = '/var/lib/nova', $lock_path = $::nova::params::lock_path, @@ -512,6 +511,7 @@ class nova( $notify_api_faults = undef, $image_service = undef, $notify_on_api_faults = undef, + $auth_strategy = undef, ) inherits nova::params { include nova::deps @@ -625,12 +625,16 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") nova_config { 'glance/api_servers': value => $glance_api_servers } } + if $auth_strategy { + warning('The auth_strategy parameter is deprecated, and will be removed in a future release.') + nova_config { 'api/auth_strategy': value => $auth_strategy } + } + nova_config { 'DEFAULT/ssl_only': value => $ssl_only; 'DEFAULT/cert': value => $cert; 'DEFAULT/key': value => $key; 'DEFAULT/my_ip': value => $my_ip; - 'api/auth_strategy': value => $auth_strategy; 'DEFAULT/host': value => $host; 'DEFAULT/cpu_allocation_ratio': value => $cpu_allocation_ratio; 'DEFAULT/ram_allocation_ratio': value => $ram_allocation_ratio; diff --git a/releasenotes/notes/deprecate_auth_strategy-87bf439647037fbd.yaml b/releasenotes/notes/deprecate_auth_strategy-87bf439647037fbd.yaml new file mode 100644 index 000000000..206ba8cc1 --- /dev/null +++ b/releasenotes/notes/deprecate_auth_strategy-87bf439647037fbd.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + nova::auth_strategy was deprecated because the corresponding parameter + is not was deprecated. diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index 66f7b17b5..cc59ec4a3 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -31,9 +31,8 @@ describe 'nova' do is_expected.to contain_nova_config('glance/api_servers').with_value('http://localhost:9292') end - it 'configures auth_strategy' do - is_expected.to contain_nova_config('api/auth_strategy').with_value('keystone') - is_expected.to_not contain_nova_config('DEFAULT/use_deprecated_auth').with_value(false) + it 'does not configure auth_strategy' do + is_expected.not_to contain_nova_config('api/auth_strategy') end it 'configures rabbit' do @@ -130,7 +129,6 @@ describe 'nova' do it 'configures auth_strategy' do is_expected.to contain_nova_config('api/auth_strategy').with_value('foo') - is_expected.to_not contain_nova_config('DEFAULT/use_deprecated_auth').with_value(true) end it 'configures rabbit' do