Skip to content

Commit

Permalink
Merge "Deprecate signing_dir option"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Jan 3, 2017
2 parents 30f9d47 + 3ca4344 commit ed27255
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
18 changes: 12 additions & 6 deletions manifests/keystone/authtoken.pp
Expand Up @@ -175,16 +175,18 @@
# 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
# (in seconds). Set to -1 to disable caching completely. Integer value
# Defaults to $::os_service_default.
#
# DEPRECATED PARAMETERS
#
# [*signing_dir*]
# (Optional) Directory used to cache files related to PKI tokens.
# Defaults to undef
#
class nova::keystone::authtoken(
$username = 'nova',
$password = $::os_service_default,
Expand Down Expand Up @@ -219,14 +221,19 @@
$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,
# DEPRECATED PARAMETERS
$signing_dir = undef,
) {

if is_service_default($password) {
fail('Please set password for nova service user')
}

if $signing_dir {
warning('signing_dir parameter is deprecated, has no effect and will be removed in the P release.')
}

keystone::resource::authtoken { 'nova_config':
username => $username,
password => $password,
Expand Down Expand Up @@ -261,7 +268,6 @@
memcached_servers => $memcached_servers,
region_name => $region_name,
revocation_cache_time => $revocation_cache_time,
signing_dir => $signing_dir,
token_cache_time => $token_cache_time,
}
}
@@ -0,0 +1,4 @@
---
deprecations:
- signing_dir option is now deprecated for removal, the
parameter has no effect.
3 changes: 0 additions & 3 deletions spec/classes/nova_keystone_authtoken_spec.rb
Expand Up @@ -44,7 +44,6 @@
is_expected.to contain_nova_config('keystone_authtoken/memcached_servers').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('keystone_authtoken/region_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('keystone_authtoken/revocation_cache_time').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('keystone_authtoken/signing_dir').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('keystone_authtoken/token_cache_time').with_value('<SERVICE DEFAULT>')
end
end
Expand Down Expand Up @@ -87,7 +86,6 @@
['memcached01:11211','memcached02:11211'],
:region_name => 'region2',
:revocation_cache_time => '11',
:signing_dir => '/var/cache',
:token_cache_time => '301',
})
end
Expand Down Expand Up @@ -126,7 +124,6 @@
is_expected.to contain_nova_config('keystone_authtoken/memcached_servers').with_value('memcached01:11211,memcached02:11211')
is_expected.to contain_nova_config('keystone_authtoken/region_name').with_value(params[:region_name])
is_expected.to contain_nova_config('keystone_authtoken/revocation_cache_time').with_value(params[:revocation_cache_time])
is_expected.to contain_nova_config('keystone_authtoken/signing_dir').with_value(params[:signing_dir])
is_expected.to contain_nova_config('keystone_authtoken/token_cache_time').with_value(params[:token_cache_time])
end
end
Expand Down

0 comments on commit ed27255

Please sign in to comment.