Merge "cache: Follow renaming of hashclient parameters"
This commit is contained in:
@@ -235,12 +235,12 @@
|
|||||||
# the HashClient's internal mechanisms.
|
# the HashClient's internal mechanisms.
|
||||||
# Default to $facts['os_service_default']
|
# Default to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*hashclient_retry_delay*]
|
# [*hashclient_retry_timeout*]
|
||||||
# (Optional) Time in seconds that should pass between
|
# (Optional) Time in seconds that should pass between
|
||||||
# retry attempts in the HashClient's internal mechanisms.
|
# retry attempts in the HashClient's internal mechanisms.
|
||||||
# Default to $facts['os_service_default']
|
# Default to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*dead_timeout*]
|
# [*hashclient_dead_timeout*]
|
||||||
# (Optional) Time in seconds before attempting to add a node
|
# (Optional) Time in seconds before attempting to add a node
|
||||||
# back in the pool in the HashClient's internal mechanisms.
|
# back in the pool in the HashClient's internal mechanisms.
|
||||||
# Default to $facts['os_service_default']
|
# Default to $facts['os_service_default']
|
||||||
@@ -253,6 +253,18 @@
|
|||||||
# (Optional) ensure state for package.
|
# (Optional) ensure state for package.
|
||||||
# Defaults to 'present'
|
# Defaults to 'present'
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*hashclient_retry_delay*]
|
||||||
|
# (Optional) Time in seconds that should pass between
|
||||||
|
# retry attempts in the HashClient's internal mechanisms.
|
||||||
|
# Default to undef
|
||||||
|
#
|
||||||
|
# [*dead_timeout*]
|
||||||
|
# (Optional) Time in seconds before attempting to add a node
|
||||||
|
# back in the pool in the HashClient's internal mechanisms.
|
||||||
|
# Default to undef
|
||||||
|
#
|
||||||
define oslo::cache (
|
define oslo::cache (
|
||||||
$config_prefix = $facts['os_service_default'],
|
$config_prefix = $facts['os_service_default'],
|
||||||
$expiration_time = $facts['os_service_default'],
|
$expiration_time = $facts['os_service_default'],
|
||||||
@@ -291,13 +303,32 @@ define oslo::cache (
|
|||||||
$retry_attempts = $facts['os_service_default'],
|
$retry_attempts = $facts['os_service_default'],
|
||||||
$retry_delay = $facts['os_service_default'],
|
$retry_delay = $facts['os_service_default'],
|
||||||
$hashclient_retry_attempts = $facts['os_service_default'],
|
$hashclient_retry_attempts = $facts['os_service_default'],
|
||||||
$hashclient_retry_delay = $facts['os_service_default'],
|
$hashclient_retry_timeout = $facts['os_service_default'],
|
||||||
$dead_timeout = $facts['os_service_default'],
|
$hashclient_dead_timeout = $facts['os_service_default'],
|
||||||
Boolean $manage_backend_package = true,
|
Boolean $manage_backend_package = true,
|
||||||
Stdlib::Ensure::Package $package_ensure = present,
|
Stdlib::Ensure::Package $package_ensure = present,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$hashclient_retry_delay = undef,
|
||||||
|
$dead_timeout = undef,
|
||||||
) {
|
) {
|
||||||
include oslo::params
|
include oslo::params
|
||||||
|
|
||||||
|
if $hashclient_retry_delay != undef {
|
||||||
|
warning("The hashclient_retry_delay parameter is deprecated. \
|
||||||
|
Use the hashclient_retry_timeout parameter instead.")
|
||||||
|
$hashclient_retry_delay_real = $hashclient_retry_delay
|
||||||
|
} else {
|
||||||
|
$hashclient_retry_delay_real = $facts['os_service_default']
|
||||||
|
}
|
||||||
|
|
||||||
|
if $dead_timeout != undef {
|
||||||
|
warning("The dead_timeout parameter is deprecated. \
|
||||||
|
Use the hashclient_dead_timeout`` parameter instead.")
|
||||||
|
$dead_timeout_real = $dead_timeout
|
||||||
|
} else {
|
||||||
|
$dead_timeout_real = $facts['os_service_default']
|
||||||
|
}
|
||||||
|
|
||||||
if is_service_default($memcache_servers) {
|
if is_service_default($memcache_servers) {
|
||||||
$memcache_servers_real = $memcache_servers
|
$memcache_servers_real = $memcache_servers
|
||||||
} else {
|
} else {
|
||||||
@@ -400,8 +431,10 @@ define oslo::cache (
|
|||||||
'cache/retry_attempts' => { value => $retry_attempts },
|
'cache/retry_attempts' => { value => $retry_attempts },
|
||||||
'cache/retry_delay' => { value => $retry_delay },
|
'cache/retry_delay' => { value => $retry_delay },
|
||||||
'cache/hashclient_retry_attempts' => { value => $hashclient_retry_attempts },
|
'cache/hashclient_retry_attempts' => { value => $hashclient_retry_attempts },
|
||||||
'cache/hashclient_retry_delay' => { value => $hashclient_retry_delay },
|
'cache/hashclient_retry_timeout' => { value => $hashclient_retry_timeout },
|
||||||
'cache/dead_timeout' => { value => $dead_timeout },
|
'cache/hashclient_dead_timeout' => { value => $hashclient_dead_timeout },
|
||||||
|
'cache/hashclient_retry_delay' => { value => $hashclient_retry_delay_real },
|
||||||
|
'cache/dead_timeout' => { value => $dead_timeout_real },
|
||||||
}
|
}
|
||||||
create_resources($name, $cache_options)
|
create_resources($name, $cache_options)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The ``oslo::cache::hashclient_retry_delay`` parameter was deprecated in
|
||||||
|
favor of the new ``hashclient_retry_timeout`` parameter.
|
||||||
|
|
||||||
|
- |
|
||||||
|
The ``oslo::cache::dead_timeout`` parameter was deprecated in favor of
|
||||||
|
the new ``hashclient_dead_timeout`` parameter.
|
||||||
@@ -45,6 +45,8 @@ describe 'oslo::cache' do
|
|||||||
is_expected.to contain_keystone_config('cache/retry_attempts').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('cache/retry_attempts').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_keystone_config('cache/retry_delay').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('cache/retry_delay').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_keystone_config('cache/hashclient_retry_attempts').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('cache/hashclient_retry_attempts').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_keystone_config('cache/hashclient_retry_timeout').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_keystone_config('cache/hashclient_dead_timeout').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_keystone_config('cache/hashclient_retry_delay').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('cache/hashclient_retry_delay').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_keystone_config('cache/dead_timeout').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('cache/dead_timeout').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
@@ -90,8 +92,10 @@ describe 'oslo::cache' do
|
|||||||
:retry_attempts => 2,
|
:retry_attempts => 2,
|
||||||
:retry_delay => 0,
|
:retry_delay => 0,
|
||||||
:hashclient_retry_attempts => 2,
|
:hashclient_retry_attempts => 2,
|
||||||
:hashclient_retry_delay => 1,
|
:hashclient_retry_timeout => 1,
|
||||||
:dead_timeout => 60,
|
:hashclient_dead_timeout => 60,
|
||||||
|
:hashclient_retry_delay => 3,
|
||||||
|
:dead_timeout => 61,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -133,8 +137,10 @@ describe 'oslo::cache' do
|
|||||||
is_expected.to contain_keystone_config('cache/retry_attempts').with_value('2')
|
is_expected.to contain_keystone_config('cache/retry_attempts').with_value('2')
|
||||||
is_expected.to contain_keystone_config('cache/retry_delay').with_value('0')
|
is_expected.to contain_keystone_config('cache/retry_delay').with_value('0')
|
||||||
is_expected.to contain_keystone_config('cache/hashclient_retry_attempts').with_value('2')
|
is_expected.to contain_keystone_config('cache/hashclient_retry_attempts').with_value('2')
|
||||||
is_expected.to contain_keystone_config('cache/hashclient_retry_delay').with_value('1')
|
is_expected.to contain_keystone_config('cache/hashclient_retry_timeout').with_value('1')
|
||||||
is_expected.to contain_keystone_config('cache/dead_timeout').with_value('60')
|
is_expected.to contain_keystone_config('cache/hashclient_dead_timeout').with_value('60')
|
||||||
|
is_expected.to contain_keystone_config('cache/hashclient_retry_delay').with_value('3')
|
||||||
|
is_expected.to contain_keystone_config('cache/dead_timeout').with_value('61')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user