diff --git a/manifests/resource/authtoken.pp b/manifests/resource/authtoken.pp index 7eda6e70c..30b703b49 100644 --- a/manifests/resource/authtoken.pp +++ b/manifests/resource/authtoken.pp @@ -199,13 +199,6 @@ # (Optional) The region in which the identity server can be found. # Defaults to $::os_service_default. # -# [*revocation_cache_time*] -# (Optional) Determines the frequency at which the list of revoked tokens is -# retrieved from the Identity service (in seconds). A high number of -# revocation events combined with a low cache duration may significantly -# reduce performance. Only valid for PKI tokens. Integer value -# 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 @@ -216,6 +209,15 @@ # (Optional) Whether to install the python-memcache package. # Defaults to false. # +# DEPRECATED PARAMETERS +# +# [*revocation_cache_time*] +# (Optional) Determines the frequency at which the list of revoked tokens is +# retrieved from the Identity service (in seconds). A high number of +# revocation events combined with a low cache duration may significantly +# reduce performance. Only valid for PKI tokens. Integer value +# Defaults to undef +# define keystone::resource::authtoken( $username, $password, @@ -249,9 +251,10 @@ define keystone::resource::authtoken( $memcache_use_advanced_pool = $::os_service_default, $memcached_servers = $::os_service_default, $region_name = $::os_service_default, - $revocation_cache_time = $::os_service_default, $token_cache_time = $::os_service_default, $manage_memcache_package = false, + # DEPRECATED PARAMETERS + $revocation_cache_time = undef, ) { include ::keystone::deps @@ -280,6 +283,10 @@ define keystone::resource::authtoken( validate_bool($delay_auth_decision) } + if $revocation_cache_time { + warning('revocation_cache_time parameter is deprecated, has no effect and will be removed in the future.') + } + if !is_service_default($memcached_servers) and !empty($memcached_servers){ $memcached_servers_real = join(any2array($memcached_servers), ',') if $manage_memcache_package { @@ -319,7 +326,6 @@ define keystone::resource::authtoken( 'keystone_authtoken/memcache_use_advanced_pool' => {'value' => $memcache_use_advanced_pool}, '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/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_revocation_cache_time_parameter-2a565b96bcbf98a2.yaml b/releasenotes/notes/deprecate_revocation_cache_time_parameter-2a565b96bcbf98a2.yaml new file mode 100644 index 000000000..438a91369 --- /dev/null +++ b/releasenotes/notes/deprecate_revocation_cache_time_parameter-2a565b96bcbf98a2.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - revocation_cache_time 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 ad7f722bb..bbd5b19dd 100644 --- a/spec/defines/keystone_resource_authtoken_spec.rb +++ b/spec/defines/keystone_resource_authtoken_spec.rb @@ -46,7 +46,6 @@ describe 'keystone::resource::authtoken' do is_expected.to contain_keystone_config('keystone_authtoken/memcache_use_advanced_pool').with_value('') 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/token_cache_time').with_value('') end end @@ -77,7 +76,6 @@ describe 'keystone::resource::authtoken' do :include_service_catalog => false, :keyfile => 'somekey.key', :region_name => 'MyRegion', - :revocation_cache_time => '50', :token_cache_time => '20', }) end @@ -110,7 +108,6 @@ describe 'keystone::resource::authtoken' do is_expected.to contain_keystone_config('keystone_authtoken/memcache_use_advanced_pool').with_value('') 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/token_cache_time').with_value(params[:token_cache_time]) end end