From 08c50705dbd23a9829505d70d9909805f021b943 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Wed, 31 Oct 2018 15:12:56 +0800 Subject: [PATCH] Add manage_backend_package parameter Adds the manage_backend_package parameter that is sent to the oslo::cache class that determines if we should install the backend python library for caching. The default value is not changed and defaults to true same as the oslo::cache class does. Change-Id: I44a475711f18b3175ab6e54fa1a83bcd6718a139 Closes-Bug: #1800774 --- manifests/cache.pp | 6 ++++++ .../notes/manage-backend-param-a8455322276f2200.yaml | 7 +++++++ spec/classes/heat_cache_spec.rb | 3 +++ 3 files changed, 16 insertions(+) create mode 100644 releasenotes/notes/manage-backend-param-a8455322276f2200.yaml diff --git a/manifests/cache.pp b/manifests/cache.pp index 139adc0c..45e7e884 100644 --- a/manifests/cache.pp +++ b/manifests/cache.pp @@ -81,6 +81,10 @@ # client connection. (integer value) # Defaults to $::os_service_default # +# [*manage_backend_package*] +# (Optional) (Optional) Whether to install the backend package for the cache. +# Defaults to true +# class heat::cache ( $config_prefix = $::os_service_default, $expiration_time = $::os_service_default, @@ -95,6 +99,7 @@ class heat::cache ( $memcache_pool_maxsize = $::os_service_default, $memcache_pool_unused_timeout = $::os_service_default, $memcache_pool_connection_get_timeout = $::os_service_default, + $manage_backend_package = true, ) { include ::heat::deps @@ -113,5 +118,6 @@ class heat::cache ( memcache_pool_maxsize => $memcache_pool_maxsize, memcache_pool_unused_timeout => $memcache_pool_unused_timeout, memcache_pool_connection_get_timeout => $memcache_pool_connection_get_timeout, + manage_backend_package => $manage_backend_package, } } diff --git a/releasenotes/notes/manage-backend-param-a8455322276f2200.yaml b/releasenotes/notes/manage-backend-param-a8455322276f2200.yaml new file mode 100644 index 00000000..8b6c0170 --- /dev/null +++ b/releasenotes/notes/manage-backend-param-a8455322276f2200.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + Added new parameter heat::cache::manage_backend_package that is sent to the + oslo::cache class which determines if the backend cache python library + should be installed or not. Defaults to true same as oslo::cache default + value. diff --git a/spec/classes/heat_cache_spec.rb b/spec/classes/heat_cache_spec.rb index 19fda1bb..baa732d9 100644 --- a/spec/classes/heat_cache_spec.rb +++ b/spec/classes/heat_cache_spec.rb @@ -23,6 +23,7 @@ describe 'heat::cache' do is_expected.to contain_heat_config('cache/memcache_pool_maxsize').with_value('') is_expected.to contain_heat_config('cache/memcache_pool_unused_timeout').with_value('') is_expected.to contain_heat_config('cache/memcache_pool_connection_get_timeout').with_value('') + is_expected.to contain_oslo__cache('heat_config').with_manage_backend_package(true) end end @@ -41,6 +42,7 @@ describe 'heat::cache' do :memcache_pool_maxsize => '10', :memcache_pool_unused_timeout => '120', :memcache_pool_connection_get_timeout => '360', + :manage_backend_package => false, } end @@ -58,6 +60,7 @@ describe 'heat::cache' do is_expected.to contain_heat_config('cache/memcache_pool_maxsize').with_value('10') is_expected.to contain_heat_config('cache/memcache_pool_unused_timeout').with_value('120') is_expected.to contain_heat_config('cache/memcache_pool_connection_get_timeout').with_value('360') + is_expected.to contain_oslo__cache('heat_config').with_manage_backend_package(false) end end end