Configure disable_non_metric_meters for notification agent
Change-Id: I17ca231e1f7760cdea347b5466a9fbbe84aa9585
This commit is contained in:
parent
e412a06980
commit
2659b510a4
@ -39,17 +39,22 @@
|
||||
# (optional) Save event details.
|
||||
# Defaults to false
|
||||
#
|
||||
# [*disable_non_metric_meters*]
|
||||
# (optional) Disable or enable the collection of non-metric meters.
|
||||
# Default to $::os_service_default
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (optional) ensure state for package.
|
||||
# Defaults to 'present'
|
||||
#
|
||||
|
||||
class ceilometer::agent::notification (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$ack_on_event_error = true,
|
||||
$store_events = false,
|
||||
$package_ensure = 'present',
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$ack_on_event_error = true,
|
||||
$store_events = false,
|
||||
$disable_non_metric_meters = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
) {
|
||||
|
||||
include ::ceilometer::params
|
||||
@ -84,8 +89,9 @@ class ceilometer::agent::notification (
|
||||
}
|
||||
|
||||
ceilometer_config {
|
||||
'notification/ack_on_event_error': value => $ack_on_event_error;
|
||||
'notification/store_events' : value => $store_events;
|
||||
'notification/ack_on_event_error' : value => $ack_on_event_error;
|
||||
'notification/store_events' : value => $store_events;
|
||||
'notification/disable_non_metric_meters': value => $disable_non_metric_meters;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -47,6 +47,16 @@ describe 'ceilometer::agent::notification' do
|
||||
it 'configures notifications parameters in ceilometer.conf' do
|
||||
is_expected.to contain_ceilometer_config('notification/ack_on_event_error').with_value( params[:ack_on_event_error] )
|
||||
is_expected.to contain_ceilometer_config('notification/store_events').with_value( params[:store_events] )
|
||||
is_expected.to contain_ceilometer_config('notification/disable_non_metric_meters').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
context 'with disabled non-metric meters' do
|
||||
before do
|
||||
params.merge!({ :disable_non_metric_meters => true })
|
||||
end
|
||||
it 'disables non-metric meters' do
|
||||
is_expected.to contain_ceilometer_config('notification/disable_non_metric_meters').with_value(params[:disable_non_metric_meters])
|
||||
end
|
||||
end
|
||||
|
||||
[{:enabled => true}, {:enabled => false}].each do |param_hash|
|
||||
|
Loading…
x
Reference in New Issue
Block a user