Expose an option to enable/disable cleaning
This patch exposes option [conductor]automated_clean. Currently TripleO is using its deprecated analog "clean_nodes" to disable node cleaning (which breaks TripleO workflow). Change-Id: I4e6b7f1b13be735319d20c01786b078f9678b0a7
This commit is contained in:
parent
b94bbf24af
commit
7dc6e9f9e3
|
@ -38,11 +38,16 @@
|
|||
# state (False).
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*automated_clean*]
|
||||
# (optional) Whether to enable automated cleaning on nodes.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class ironic::conductor (
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
$max_time_interval = '120',
|
||||
$force_power_state_during_sync = true,
|
||||
$automated_clean = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::ironic::params
|
||||
|
@ -53,6 +58,7 @@ class ironic::conductor (
|
|||
ironic_config {
|
||||
'conductor/max_time_interval': value => $max_time_interval;
|
||||
'conductor/force_power_state_during_sync': value => $force_power_state_during_sync;
|
||||
'conductor/automated_clean': value => $automated_clean;
|
||||
}
|
||||
|
||||
# Install package
|
||||
|
|
|
@ -61,18 +61,21 @@ describe 'ironic::conductor' do
|
|||
it 'configures ironic.conf' do
|
||||
is_expected.to contain_ironic_config('conductor/max_time_interval').with_value(p[:max_time_interval])
|
||||
is_expected.to contain_ironic_config('conductor/force_power_state_during_sync').with_value(p[:force_power_state_during_sync])
|
||||
is_expected.to contain_ironic_config('conductor/automated_clean').with(:value => '<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
context 'when overriding parameters' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:max_time_interval => '50',
|
||||
:force_power_state_during_sync => false
|
||||
:force_power_state_during_sync => false,
|
||||
:automated_clean => false
|
||||
)
|
||||
end
|
||||
it 'should replace default parameter with new value' do
|
||||
is_expected.to contain_ironic_config('conductor/max_time_interval').with_value(p[:max_time_interval])
|
||||
is_expected.to contain_ironic_config('conductor/force_power_state_during_sync').with_value(p[:force_power_state_during_sync])
|
||||
is_expected.to contain_ironic_config('conductor/automated_clean').with_value(p[:automated_clean])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue