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:
parent
ee93d53421
commit
782eeda90b
@ -82,10 +82,8 @@ node default {
|
|||||||
class { '::ceilometer::alarm::evaluator':
|
class { '::ceilometer::alarm::evaluator':
|
||||||
}
|
}
|
||||||
|
|
||||||
# Purge 1 month old meters
|
# Purge old meters
|
||||||
class { '::ceilometer::expirer':
|
class { '::ceilometer::expirer': }
|
||||||
time_to_live => '2592000'
|
|
||||||
}
|
|
||||||
|
|
||||||
# Install notification agent
|
# Install notification agent
|
||||||
class { '::ceilometer::agent::notification':
|
class { '::ceilometer::agent::notification':
|
||||||
|
@ -40,32 +40,20 @@
|
|||||||
# [*weekday*]
|
# [*weekday*]
|
||||||
# (optional) Defaults to '*'.
|
# (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 (
|
class ceilometer::expirer (
|
||||||
$enable_cron = True,
|
$enable_cron = True,
|
||||||
$minute = 1,
|
$minute = 1,
|
||||||
$hour = 0,
|
$hour = 0,
|
||||||
$monthday = '*',
|
$monthday = '*',
|
||||||
$month = '*',
|
$month = '*',
|
||||||
$weekday = '*',
|
$weekday = '*',
|
||||||
# Deprecated parameters
|
|
||||||
$time_to_live = '-1',
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::ceilometer::params
|
include ::ceilometer::params
|
||||||
|
|
||||||
Package<| title == 'ceilometer-common' |> -> Class['ceilometer::expirer']
|
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 {
|
if $enable_cron {
|
||||||
cron { 'ceilometer-expirer':
|
cron { 'ceilometer-expirer':
|
||||||
command => $ceilometer::params::expirer_command,
|
command => $ceilometer::params::expirer_command,
|
||||||
|
@ -27,7 +27,7 @@ describe 'ceilometer::expirer' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{ :time_to_live => '-1' }
|
{}
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples_for 'ceilometer-expirer' do
|
shared_examples_for 'ceilometer-expirer' do
|
||||||
@ -62,10 +62,6 @@ describe 'ceilometer::expirer' do
|
|||||||
it { is_expected.to_not contain_cron('ceilometer-expirer') }
|
it { is_expected.to_not contain_cron('ceilometer-expirer') }
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
context 'on Debian platforms' do
|
context 'on Debian platforms' do
|
||||||
|
Loading…
Reference in New Issue
Block a user