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:
@@ -38,11 +38,16 @@
|
|||||||
# state (False).
|
# state (False).
|
||||||
# Defaults to true.
|
# Defaults to true.
|
||||||
#
|
#
|
||||||
|
# [*automated_clean*]
|
||||||
|
# (optional) Whether to enable automated cleaning on nodes.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
class ironic::conductor (
|
class ironic::conductor (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$max_time_interval = '120',
|
$max_time_interval = '120',
|
||||||
$force_power_state_during_sync = true,
|
$force_power_state_during_sync = true,
|
||||||
|
$automated_clean = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::ironic::params
|
include ::ironic::params
|
||||||
@@ -53,6 +58,7 @@ class ironic::conductor (
|
|||||||
ironic_config {
|
ironic_config {
|
||||||
'conductor/max_time_interval': value => $max_time_interval;
|
'conductor/max_time_interval': value => $max_time_interval;
|
||||||
'conductor/force_power_state_during_sync': value => $force_power_state_during_sync;
|
'conductor/force_power_state_during_sync': value => $force_power_state_during_sync;
|
||||||
|
'conductor/automated_clean': value => $automated_clean;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install package
|
# Install package
|
||||||
|
|||||||
@@ -61,18 +61,21 @@ describe 'ironic::conductor' do
|
|||||||
it 'configures ironic.conf' 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/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/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
|
end
|
||||||
|
|
||||||
context 'when overriding parameters' do
|
context 'when overriding parameters' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!(
|
params.merge!(
|
||||||
:max_time_interval => '50',
|
:max_time_interval => '50',
|
||||||
:force_power_state_during_sync => false
|
:force_power_state_during_sync => false,
|
||||||
|
:automated_clean => false
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
it 'should replace default parameter with new value' do
|
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/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/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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user