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: I9106b9a5693e1d566a93b57888e675f2f7cb386c
This commit is contained in:
@ -277,6 +277,11 @@
|
||||
# Enable dbsync
|
||||
# Defaults to true
|
||||
#
|
||||
# [*purge_config*]
|
||||
# (optional) Whether to set only the specified config options
|
||||
# in the ironic config.
|
||||
# Defaults to false.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*rabbit_user*]
|
||||
@ -349,6 +354,7 @@ class ironic (
|
||||
$glance_num_retries = '0',
|
||||
$glance_api_insecure = false,
|
||||
$sync_db = true,
|
||||
$purge_config = false,
|
||||
# DEPRECATED PARAMETERS
|
||||
$rabbit_user = undef,
|
||||
$verbose = undef,
|
||||
@ -399,6 +405,10 @@ class ironic (
|
||||
)
|
||||
}
|
||||
|
||||
resources { 'ironic_config':
|
||||
purge => $purge_config,
|
||||
}
|
||||
|
||||
if is_array($glance_api_servers) {
|
||||
ironic_config {
|
||||
'glance/glance_api_servers': value => join($glance_api_servers, ',');
|
||||
|
@ -32,7 +32,8 @@ describe 'ironic' do
|
||||
:database_reconnect_interval => 10,
|
||||
:database_retry_interval => 10,
|
||||
:glance_num_retries => 0,
|
||||
:glance_api_insecure => false
|
||||
:glance_api_insecure => false,
|
||||
:purge_config => false,
|
||||
}
|
||||
end
|
||||
|
||||
@ -98,6 +99,12 @@ describe 'ironic' do
|
||||
)
|
||||
end
|
||||
|
||||
it 'passes purge to resource' do
|
||||
is_expected.to contain_resources('ironic_config').with({
|
||||
:purge => false
|
||||
})
|
||||
end
|
||||
|
||||
it 'configures enabled_drivers' do
|
||||
is_expected.to contain_ironic_config('DEFAULT/enabled_drivers').with_value( params[:enabled_drivers] )
|
||||
end
|
||||
|
Reference in New Issue
Block a user