Skip to content

Commit

Permalink
Merge "Alarm: record history support" into stable/havana
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Dec 9, 2013
2 parents 313cf8c + dd60a1f commit 5b46cd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manifests/alarm/evaluator.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
# define which service use for the evaluator
# [*partition_rpc_topic*]
# define which topic the alarm evaluator should access
# [*record_history*]
# Record alarm change events
#
class ceilometer::alarm::evaluator (
$enabled = true,
$evaluation_interval = 60,
$evaluation_service = 'ceilometer.alarm.service.SingletonAlarmService',
$partition_rpc_topic = 'alarm_partition_coordination',
$record_history = true,
) {

include ceilometer::params
Expand Down Expand Up @@ -52,5 +55,6 @@
'alarm/evaluation_interval' : value => $evaluation_interval;
'alarm/evaluation_service' : value => $evaluation_service;
'alarm/partition_rpc_topic' : value => $partition_rpc_topic;
'alarm/record_history' : value => $record_history;
}
}
4 changes: 4 additions & 0 deletions spec/classes/ceilometer_alarm_evaluator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{ :evaluation_interval => 60,
:evaluation_service => 'ceilometer.alarm.service.SingletonAlarmService',
:partition_rpc_topic => 'alarm_partition_coordination',
:record_history => true,
:enabled => true,
}
end
Expand Down Expand Up @@ -46,16 +47,19 @@
should contain_ceilometer_config('alarm/evaluation_interval').with_value( params[:evaluation_interval] )
should contain_ceilometer_config('alarm/evaluation_service').with_value( params[:evaluation_service] )
should contain_ceilometer_config('alarm/partition_rpc_topic').with_value (params[:partition_rpc_topic] )
should contain_ceilometer_config('alarm/record_history').with_value (params[:record_history] )
end

context 'when overriding parameters' do
before do
params.merge!(:evaluation_interval => 80,
:partition_rpc_topic => 'alarm_partition_coordination',
:record_history => false,
:evaluation_service => 'ceilometer.alarm.service.SingletonTestAlarmService')
end
it { should contain_ceilometer_config('alarm/evaluation_interval').with_value(params[:evaluation_interval]) }
it { should contain_ceilometer_config('alarm/evaluation_service').with_value(params[:evaluation_service]) }
it { should contain_ceilometer_config('alarm/record_history').with_value(params[:record_history]) }
it { should contain_ceilometer_config('alarm/partition_rpc_topic').with_value(params[:partition_rpc_topic]) }
end

Expand Down

0 comments on commit 5b46cd2

Please sign in to comment.