Drop time_to_live parameter

time_to_live was deprecated in liberty, let's drop it so we don't have
the warning anymore.

Change-Id: If36dc4ec2435aa8229b4efa6123fff9bdf668b37
This commit is contained in:
Emilien Macchi 2015-12-23 23:38:23 +01:00
parent ee93d53421
commit 782eeda90b
3 changed files with 9 additions and 27 deletions

View File

@ -82,10 +82,8 @@ node default {
class { '::ceilometer::alarm::evaluator':
}
# Purge 1 month old meters
class { '::ceilometer::expirer':
time_to_live => '2592000'
}
# Purge old meters
class { '::ceilometer::expirer': }
# Install notification agent
class { '::ceilometer::agent::notification':

View File

@ -40,32 +40,20 @@
# [*weekday*]
# (optional) Defaults to '*'.
#
# [*time_to_live*]
# (optional) DEPRECATED. Number of seconds that samples are kept in the database.
# Should be a valid integer
# Defaults to '-1' to disable TTL and keep forever the datas.
class ceilometer::expirer (
$enable_cron = True,
$minute = 1,
$hour = 0,
$monthday = '*',
$month = '*',
$weekday = '*',
# Deprecated parameters
$time_to_live = '-1',
$enable_cron = True,
$minute = 1,
$hour = 0,
$monthday = '*',
$month = '*',
$weekday = '*',
) {
include ::ceilometer::params
Package<| title == 'ceilometer-common' |> -> Class['ceilometer::expirer']
warning('Parameter "time_to_live" is deprecated and will be removed in next release. Use metering_time_to_live in "ceilometer" class instead.')
ceilometer_config {
'database/time_to_live': value => $time_to_live;
}
if $enable_cron {
cron { 'ceilometer-expirer':
command => $ceilometer::params::expirer_command,

View File

@ -27,7 +27,7 @@ describe 'ceilometer::expirer' do
end
let :params do
{ :time_to_live => '-1' }
{}
end
shared_examples_for 'ceilometer-expirer' do
@ -62,10 +62,6 @@ describe 'ceilometer::expirer' do
it { is_expected.to_not contain_cron('ceilometer-expirer') }
end
it 'configures database section in ceilometer.conf' do
is_expected.to contain_ceilometer_config('database/time_to_live').with_value( params[:time_to_live] )
end
end
context 'on Debian platforms' do