Browse Source

Merge "Make [statsd] flush_delay optional"

changes/79/825979/1
Zuul 4 months ago committed by Gerrit Code Review
parent
commit
feafe4c64a
  1. 5
      manifests/statsd.pp
  2. 6
      releasenotes/notes/statsd-flush_delay-optional-e1aa6d8aac600191.yaml
  3. 13
      spec/classes/gnocchi_statsd_spec.rb

5
manifests/statsd.pp

@ -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,

6
releasenotes/notes/statsd-flush_delay-optional-e1aa6d8aac600191.yaml

@ -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.

13
spec/classes/gnocchi_statsd_spec.rb

@ -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({

Loading…
Cancel
Save