Allow to configure evaluation interval
This change allows to change the period of alarm evaluation cycle. Change-Id: I0d6ffe6b2682dc94c4252727c0a42c53c22ccbd2
This commit is contained in:
parent
050a396c02
commit
131a8be8be
@ -17,16 +17,24 @@
|
||||
# (optional) The url to use for distributed group membership coordination.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*evaluation_interval*]
|
||||
# (optional) Period of evaluation cycle
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class aodh::evaluator (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$coordination_url = undef,
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$coordination_url = undef,
|
||||
$evaluation_interval = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::aodh::deps
|
||||
include ::aodh::params
|
||||
|
||||
aodh_config {
|
||||
'DEFAULT/evaluation_interval' : value => $evaluation_interval;
|
||||
}
|
||||
if $coordination_url {
|
||||
aodh_config {
|
||||
'coordination/backend_url' : value => $coordination_url;
|
||||
|
@ -29,6 +29,16 @@ describe 'aodh::evaluator' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with evaluation interval' do
|
||||
before do
|
||||
params.merge!({ :evaluation_interval => '10' })
|
||||
end
|
||||
it 'configures interval' do
|
||||
is_expected.to contain_aodh_config('DEFAULT/evaluation_interval').with_value('10')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
context 'when enabled' do
|
||||
it { is_expected.to contain_class('aodh::params') }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user