From 1e4648dee11611dd74acb46bfba58fe845d3448a Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Tue, 3 Jan 2017 09:25:10 +0800 Subject: [PATCH] Deprecate signing_dir option The signing_dir is deprecated for removel because of PKI token format is no longer supported. Update warning message and release note. Change-Id: I7fe328c60983dbcb7e9fd7382cc0329a2719c444 Closes-Bug: #1652700 --- manifests/resource/authtoken.pp | 18 ++++++++++++------ ...signing_dir_parameter-3123a377ef197813.yaml | 4 ++++ .../keystone_resource_authtoken_spec.rb | 3 --- 3 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/deprecate_signing_dir_parameter-3123a377ef197813.yaml diff --git a/manifests/resource/authtoken.pp b/manifests/resource/authtoken.pp index 82185fdfb..101ae7548 100644 --- a/manifests/resource/authtoken.pp +++ b/manifests/resource/authtoken.pp @@ -206,10 +206,6 @@ # reduce performance. Only valid for PKI tokens. Integer value # Defaults to $::os_service_default. # -# [*signing_dir*] -# (Optional) Directory used to cache files related to PKI tokens. -# Defaults to $::os_service_default. -# # [*token_cache_time*] # (Optional) In order to prevent excessive effort spent validating tokens, # the middleware caches previously-seen tokens for a configurable duration @@ -220,6 +216,12 @@ # (Optional) Whether to install the python-memcache package. # Defaults to false. # +# DEPRECATED PARAMETERS +# +# [*signing_dir*] +# (Optional) Directory used to cache files related to PKI tokens. +# Defaults to undef +# define keystone::resource::authtoken( $username, $password, @@ -254,9 +256,10 @@ define keystone::resource::authtoken( $memcached_servers = $::os_service_default, $region_name = $::os_service_default, $revocation_cache_time = $::os_service_default, - $signing_dir = $::os_service_default, $token_cache_time = $::os_service_default, $manage_memcache_package = false, + # DEPRECATED PARAMETERS + $signing_dir = undef, ) { include ::keystone::deps @@ -298,6 +301,10 @@ define keystone::resource::authtoken( $memcached_servers_real = $::os_service_default } + if $signing_dir { + warning('signing_dir parameter is deprecated, has no effect and will be removed in the Pike release.') + } + $keystonemiddleware_options = { 'keystone_authtoken/auth_section' => {'value' => $auth_section}, 'keystone_authtoken/auth_uri' => {'value' => $auth_uri}, @@ -325,7 +332,6 @@ define keystone::resource::authtoken( 'keystone_authtoken/memcached_servers' => {'value' => $memcached_servers_real}, 'keystone_authtoken/region_name' => {'value' => $region_name}, 'keystone_authtoken/revocation_cache_time' => {'value' => $revocation_cache_time}, - 'keystone_authtoken/signing_dir' => {'value' => $signing_dir}, 'keystone_authtoken/token_cache_time' => {'value' => $token_cache_time}, 'keystone_authtoken/auth_url' => {'value' => $auth_url}, 'keystone_authtoken/username' => {'value' => $username}, diff --git a/releasenotes/notes/deprecate_signing_dir_parameter-3123a377ef197813.yaml b/releasenotes/notes/deprecate_signing_dir_parameter-3123a377ef197813.yaml new file mode 100644 index 000000000..9c3ade956 --- /dev/null +++ b/releasenotes/notes/deprecate_signing_dir_parameter-3123a377ef197813.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - signing_dir option is now deprecated for removal, the + parameter has no effect. diff --git a/spec/defines/keystone_resource_authtoken_spec.rb b/spec/defines/keystone_resource_authtoken_spec.rb index cedcb5e23..ad7f722bb 100644 --- a/spec/defines/keystone_resource_authtoken_spec.rb +++ b/spec/defines/keystone_resource_authtoken_spec.rb @@ -47,7 +47,6 @@ describe 'keystone::resource::authtoken' do is_expected.to contain_keystone_config('keystone_authtoken/memcached_servers').with_value('') is_expected.to contain_keystone_config('keystone_authtoken/region_name').with_value('') is_expected.to contain_keystone_config('keystone_authtoken/revocation_cache_time').with_value('') - is_expected.to contain_keystone_config('keystone_authtoken/signing_dir').with_value('') is_expected.to contain_keystone_config('keystone_authtoken/token_cache_time').with_value('') end end @@ -79,7 +78,6 @@ describe 'keystone::resource::authtoken' do :keyfile => 'somekey.key', :region_name => 'MyRegion', :revocation_cache_time => '50', - :signing_dir => '/tmp/', :token_cache_time => '20', }) end @@ -113,7 +111,6 @@ describe 'keystone::resource::authtoken' do is_expected.to contain_keystone_config('keystone_authtoken/memcached_servers').with_value('') is_expected.to contain_keystone_config('keystone_authtoken/region_name').with_value(params[:region_name]) is_expected.to contain_keystone_config('keystone_authtoken/revocation_cache_time').with_value(params[:revocation_cache_time]) - is_expected.to contain_keystone_config('keystone_authtoken/signing_dir').with_value(params[:signing_dir]) is_expected.to contain_keystone_config('keystone_authtoken/token_cache_time').with_value(params[:token_cache_time]) end end