From 782eeda90bbf54756130c2db9412321a0ac39d5c Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 23 Dec 2015 23:38:23 +0100 Subject: [PATCH] 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 --- examples/site.pp | 6 ++---- manifests/expirer.pp | 24 ++++++------------------ spec/classes/ceilometer_expirer_spec.rb | 6 +----- 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/examples/site.pp b/examples/site.pp index e95812e2..d9b51586 100644 --- a/examples/site.pp +++ b/examples/site.pp @@ -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': diff --git a/manifests/expirer.pp b/manifests/expirer.pp index edd518ec..51680774 100644 --- a/manifests/expirer.pp +++ b/manifests/expirer.pp @@ -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, diff --git a/spec/classes/ceilometer_expirer_spec.rb b/spec/classes/ceilometer_expirer_spec.rb index 28f5525d..765e613f 100644 --- a/spec/classes/ceilometer_expirer_spec.rb +++ b/spec/classes/ceilometer_expirer_spec.rb @@ -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