Add support for [statsd] creator
Change-Id: I719ff8386c7ea73cbaeae4d7db8cc6ed82b8cf79
This commit is contained in:
parent
4bd702bc91
commit
bdde282558
@ -17,6 +17,14 @@
|
||||
# (optional) Delay between flushes.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*archive_policy_name*]
|
||||
# (optional) Archive policy name to use when creating metrics.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*creator*]
|
||||
# (required) Creator value to use to identify statsd in Gnocchi.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*enabled*]
|
||||
# (optional) Should the service be enabled.
|
||||
# Defaults to true
|
||||
@ -29,16 +37,13 @@
|
||||
# (optional) Whether the service should be managed by Puppet.
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*archive_policy_name*]
|
||||
# (optional) Archive policy name to use when creating metrics.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class gnocchi::statsd (
|
||||
$resource_id,
|
||||
$host = $::os_service_default,
|
||||
$port = $::os_service_default,
|
||||
$flush_delay = $::os_service_default,
|
||||
$archive_policy_name = $::os_service_default,
|
||||
$creator = $::os_service_default,
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
@ -73,8 +78,9 @@ class gnocchi::statsd (
|
||||
'statsd/resource_id' : value => $resource_id;
|
||||
'statsd/host' : value => $host;
|
||||
'statsd/port' : value => $port;
|
||||
'statsd/archive_policy_name' : value => $archive_policy_name;
|
||||
'statsd/flush_delay' : value => $flush_delay;
|
||||
'statsd/archive_policy_name' : value => $archive_policy_name;
|
||||
'statsd/creator' : value => $creator;
|
||||
}
|
||||
|
||||
}
|
||||
|
4
releasenotes/notes/statsd-creator-4dd4b95ac66cef5a.yaml
Normal file
4
releasenotes/notes/statsd-creator-4dd4b95ac66cef5a.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``gnocchi::statsd::creator`` parameter has been added.
|
@ -28,6 +28,7 @@ describe 'gnocchi::statsd' do
|
||||
is_expected.to contain_gnocchi_config('statsd/port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_gnocchi_config('statsd/flush_delay').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_gnocchi_config('statsd/archive_policy_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_gnocchi_config('statsd/creator').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
[{:enabled => true}, {:enabled => false}].each do |param_hash|
|
||||
@ -94,6 +95,16 @@ describe 'gnocchi::statsd' do
|
||||
is_expected.to contain_gnocchi_config('statsd/archive_policy_name').with_value('high')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with creator' do
|
||||
before do
|
||||
params.merge!({ :creator => 'creator' })
|
||||
end
|
||||
|
||||
it 'configures the parameter' do
|
||||
is_expected.to contain_gnocchi_config('statsd/creator').with_value('creator')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
Loading…
Reference in New Issue
Block a user