From aaaa38c198734b9aee4b3d32491c2473c1fc943b Mon Sep 17 00:00:00 2001 From: "Matthew J. Black" Date: Wed, 11 Jan 2017 18:33:57 -0500 Subject: [PATCH] Allow python-memcache install from authtoken class The python-memcache package is required if using memcached. By default the package is not installed and the define has it set to false. This change allows managing the python-memcache package install from the authtoken class. Change-Id: Id0d980618cd3816172e491b20058d540d6d1ed41 --- manifests/keystone/authtoken.pp | 6 ++++++ .../authtoken_manage_memcache_package-55f01f617aaa8db0.yaml | 3 +++ spec/classes/zaqar_keystone_authtoken_spec.rb | 5 +++++ 3 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/authtoken_manage_memcache_package-55f01f617aaa8db0.yaml diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index 9773274..8566061 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -164,6 +164,10 @@ # caching. If left undefined, tokens will instead be cached in-process. # Defaults to $::os_service_default. # +# [*manage_memcache_package*] +# (Optional) Whether to install the python-memcache package. +# Defaults to false. +# # [*region_name*] # (Optional) The region in which the identity server can be found. # Defaults to $::os_service_default. @@ -219,6 +223,7 @@ class zaqar::keystone::authtoken( $memcache_security_strategy = $::os_service_default, $memcache_use_advanced_pool = $::os_service_default, $memcached_servers = $::os_service_default, + $manage_memcache_package = false, $region_name = $::os_service_default, $revocation_cache_time = $::os_service_default, $token_cache_time = $::os_service_default, @@ -268,6 +273,7 @@ class zaqar::keystone::authtoken( memcache_use_advanced_pool => $memcache_use_advanced_pool, memcache_pool_unused_timeout => $memcache_pool_unused_timeout, memcached_servers => $memcached_servers, + manage_memcache_package => $manage_memcache_package, region_name => $region_name, revocation_cache_time => $revocation_cache_time, token_cache_time => $token_cache_time, diff --git a/releasenotes/notes/authtoken_manage_memcache_package-55f01f617aaa8db0.yaml b/releasenotes/notes/authtoken_manage_memcache_package-55f01f617aaa8db0.yaml new file mode 100644 index 0000000..09c6d5a --- /dev/null +++ b/releasenotes/notes/authtoken_manage_memcache_package-55f01f617aaa8db0.yaml @@ -0,0 +1,3 @@ +--- +features: + - Passes parameter to keystone authtoken define to manage python-memcache package install. diff --git a/spec/classes/zaqar_keystone_authtoken_spec.rb b/spec/classes/zaqar_keystone_authtoken_spec.rb index eaf83a7..1234ddf 100644 --- a/spec/classes/zaqar_keystone_authtoken_spec.rb +++ b/spec/classes/zaqar_keystone_authtoken_spec.rb @@ -82,6 +82,7 @@ describe 'zaqar::keystone::authtoken' do :memcache_security_strategy => 'ENCRYPT', :memcache_use_advanced_pool => true, :memcached_servers => ['memcached01:11211','memcached02:11211'], + :manage_memcache_package => true, :region_name => 'region2', :revocation_cache_time => '11', :token_cache_time => '301', @@ -124,6 +125,10 @@ describe 'zaqar::keystone::authtoken' do is_expected.to contain_zaqar_config('keystone_authtoken/revocation_cache_time').with_value(params[:revocation_cache_time]) is_expected.to contain_zaqar_config('keystone_authtoken/token_cache_time').with_value(params[:token_cache_time]) end + + it 'installs python memcache package' do + is_expected.to contain_package('python-memcache') + end end end