# (Optional) Timeout seconds for HTTP requests.
# Defaults to 600.
#
-# [*event_time_to_live*]
-# (Optional) Number of seconds that events are kept in the database for
-# (<= 0 means forever)
-# Defaults to -1.
-#
-# [*metering_time_to_live*]
-# (Optional) Number of seconds that samples are kept in the database for
-# (<= 0 means forever)
-# Defaults to -1.
-#
# [*telemetry_secret*]
# (Required) Secret key for signing messages.
#
# IP address.
# Defaults to $::os_service_default.
#
+# ### DEPRECATED PARAMETERS
+#
+# [*event_time_to_live*]
+# (Optional) Number of seconds that events are kept in the database for
+# (<= 0 means forever)
+# Defaults to undef.
+#
+# [*metering_time_to_live*]
+# (Optional) Number of seconds that samples are kept in the database for
+# (<= 0 means forever)
+# Defaults to undef.
+#
class ceilometer(
$http_timeout = '600',
- $event_time_to_live = '-1',
- $metering_time_to_live = '-1',
$telemetry_secret = false,
$notification_topics = ['notifications'],
$notification_driver = $::os_service_default,
$snmpd_readonly_user_password = $::os_service_default,
$purge_config = false,
$host = $::os_service_default,
+ ## DEPRECATED PARAMETERS
+ $event_time_to_live = undef,
+ $metering_time_to_live = undef,
) {
+ if $metering_time_to_live {
+ warning('The metering_time_to_live parameter is deprecated, ignored and will be
+ removed in the futrure.')
+ }
+ if $event_time_to_live {
+ warning('The event_time_to_live parameter is deprecated, ignored and will be
+ removed in the futrure.')
+ }
+
include ::ceilometer::deps
include ::ceilometer::logging
include ::ceilometer::params
'DEFAULT/http_timeout' : value => $http_timeout;
'DEFAULT/host' : value => $host;
'publisher/telemetry_secret' : value => $telemetry_secret, secret => true;
- 'database/event_time_to_live' : value => $event_time_to_live;
- 'database/metering_time_to_live' : value => $metering_time_to_live;
'hardware/readonly_user_name' : value => $snmpd_readonly_username;
'hardware/readonly_user_password' : value => $snmpd_readonly_user_password;
}
let :params do
{
:http_timeout => '600',
- :event_time_to_live => '604800',
- :metering_time_to_live => '604800',
:telemetry_secret => 'metering-s3cr3t',
:package_ensure => 'present',
:debug => 'False',
shared_examples_for 'ceilometer' do
- it 'configures time to live for events and meters' do
- is_expected.to contain_ceilometer_config('database/event_time_to_live').with_value( params[:event_time_to_live] )
- is_expected.to contain_ceilometer_config('database/metering_time_to_live').with_value( params[:metering_time_to_live] )
- end
-
it 'configures timeout for HTTP requests' do
is_expected.to contain_ceilometer_config('DEFAULT/http_timeout').with_value(params[:http_timeout])
end