Merge "Make [statsd] flush_delay optional"

This commit is contained in:
Zuul 2022-01-07 23:51:58 +00:00 committed by Gerrit Code Review
commit feafe4c64a
3 changed files with 20 additions and 4 deletions

View File

@ -6,7 +6,8 @@
# (required) Resource UUID to use to identify statsd in Gnocchi.
#
# [*flush_delay*]
# (required) Delay between flushes.
# (optional) Delay between flushes.
# Defaults to $::os_service_default
#
# [*enabled*]
# (optional) Should the service be enabled.
@ -26,7 +27,7 @@
#
class gnocchi::statsd (
$resource_id,
$flush_delay,
$flush_delay = $::os_service_default,
$archive_policy_name = undef,
$manage_service = true,
$enabled = true,

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The ``gnocchi::statsd::flush_delay`` is now optional and defaults to
``$::os_service_default`` which effectively use the default value defined
in Gnocchi itself.

View File

@ -7,7 +7,6 @@ describe 'gnocchi::statsd' do
:manage_service => true,
:resource_id => '07f26121-5777-48ba-8a0b-d70468133dd9',
:archive_policy_name => 'high',
:flush_delay => '200',
}
end
@ -27,7 +26,7 @@ describe 'gnocchi::statsd' do
it 'configures gnocchi statsd' do
is_expected.to contain_gnocchi_config('statsd/resource_id').with_value('07f26121-5777-48ba-8a0b-d70468133dd9')
is_expected.to contain_gnocchi_config('statsd/archive_policy_name').with_value('high')
is_expected.to contain_gnocchi_config('statsd/flush_delay').with_value('200')
is_expected.to contain_gnocchi_config('statsd/flush_delay').with_value('<SERVICE DEFAULT>')
end
[{:enabled => true}, {:enabled => false}].each do |param_hash|
@ -67,6 +66,16 @@ describe 'gnocchi::statsd' do
)
end
end
context 'with flush_delay' do
before do
params.merge!({ :flush_delay => 10 })
end
it 'configures the parameter' do
is_expected.to contain_gnocchi_config('statsd/flush_delay').with_value(10)
end
end
end
on_supported_os({