Add purge_config option
Add the option in order to facilitate management. User can ensure that only the options they hoped are configured. Change-Id: I149224f4035888e6bd2aca16c36af7ab9055a3a1
This commit is contained in:
parent
2eadab0167
commit
0b9bee9ffd
|
@ -216,6 +216,11 @@
|
|||
# (Optional) Password for message broker authentication
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*purge_config*]
|
||||
# (optional) Whether to set only the specified config options
|
||||
# in the ceilometer config.
|
||||
# Defaults to false.
|
||||
#
|
||||
# === DEPRECATED PARAMETERS:
|
||||
# [*metering_secret*]
|
||||
# (optional) Secret key for signing messages.
|
||||
|
@ -276,6 +281,7 @@ class ceilometer(
|
|||
$amqp_sasl_config_name = $::os_service_default,
|
||||
$amqp_username = $::os_service_default,
|
||||
$amqp_password = $::os_service_default,
|
||||
$purge_config = false,
|
||||
# DEPRECATED PARAMETERS
|
||||
$alarm_history_time_to_live = undef,
|
||||
$metering_secret = undef,
|
||||
|
@ -324,6 +330,10 @@ class ceilometer(
|
|||
tag => ['openstack', 'ceilometer-package'],
|
||||
}
|
||||
|
||||
resources { 'ceilometer_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
|
||||
# we keep "ceilometer.openstack.common.rpc.impl_kombu" for backward compatibility
|
||||
if $rpc_backend in [$::os_service_default, 'ceilometer.openstack.common.rpc.impl_kombu', 'rabbit'] {
|
||||
oslo::messaging::rabbit {'ceilometer_config':
|
||||
|
|
|
@ -12,6 +12,7 @@ describe 'ceilometer' do
|
|||
:debug => 'False',
|
||||
:log_dir => '/var/log/ceilometer',
|
||||
:use_stderr => 'True',
|
||||
:purge_config => false,
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -105,6 +106,12 @@ describe 'ceilometer' do
|
|||
)
|
||||
end
|
||||
|
||||
it 'passes purge to resource' do
|
||||
is_expected.to contain_resources('ceilometer_config').with({
|
||||
:purge => false
|
||||
})
|
||||
end
|
||||
|
||||
it 'configures required telemetry_secret' do
|
||||
is_expected.to contain_ceilometer_config('publisher/telemetry_secret').with_value('metering-s3cr3t')
|
||||
is_expected.to contain_ceilometer_config('publisher/telemetry_secret').with_value( params[:telemetry_secret] ).with_secret(true)
|
||||
|
|
Loading…
Reference in New Issue