Allow enabling debug output of IPMI commands
This change introduces a new parameter, ironic::drivers::ipmi::debug, so that operators can enabled debug outputs of IPMI commands executed in ironic. Change-Id: Ie8993c14649b56e5af530ed2e94e38bc02bb7d55
This commit is contained in:
parent
9322ac289e
commit
b79368ec09
|
@ -29,9 +29,14 @@
|
||||||
# Should be an interger value
|
# Should be an interger value
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*debug*]
|
||||||
|
# (optional) Enables debug outputs of IPMI commands
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
class ironic::drivers::ipmi (
|
class ironic::drivers::ipmi (
|
||||||
$command_retry_timeout = $::os_service_default,
|
$command_retry_timeout = $::os_service_default,
|
||||||
$min_command_interval = $::os_service_default,
|
$min_command_interval = $::os_service_default,
|
||||||
|
$debug = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ironic::deps
|
include ironic::deps
|
||||||
|
@ -40,6 +45,7 @@ class ironic::drivers::ipmi (
|
||||||
ironic_config {
|
ironic_config {
|
||||||
'ipmi/command_retry_timeout': value => $command_retry_timeout;
|
'ipmi/command_retry_timeout': value => $command_retry_timeout;
|
||||||
'ipmi/min_command_interval': value => $min_command_interval;
|
'ipmi/min_command_interval': value => $min_command_interval;
|
||||||
|
'ipmi/debug': value => $debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``ironic::drivers::ipmi::debug`` parameter has been added to enable
|
||||||
|
debug outputs of IPMI commands.
|
|
@ -38,16 +38,21 @@ describe 'ironic::drivers::ipmi' do
|
||||||
it 'configures ironic.conf' do
|
it 'configures ironic.conf' do
|
||||||
is_expected.to contain_ironic_config('ipmi/command_retry_timeout').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('ipmi/command_retry_timeout').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ironic_config('ipmi/min_command_interval').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ironic_config('ipmi/min_command_interval').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_ironic_config('ipmi/debug').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when overriding parameters' do
|
context 'when overriding parameters' do
|
||||||
before do
|
before do
|
||||||
params.merge!(:command_retry_timeout => '50')
|
params.merge!(
|
||||||
params.merge!(:min_command_interval => '5')
|
:command_retry_timeout => '50',
|
||||||
|
:min_command_interval => '5',
|
||||||
|
:debug => true,
|
||||||
|
)
|
||||||
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('ipmi/command_retry_timeout').with_value('50')
|
is_expected.to contain_ironic_config('ipmi/command_retry_timeout').with_value('50')
|
||||||
is_expected.to contain_ironic_config('ipmi/min_command_interval').with_value('5')
|
is_expected.to contain_ironic_config('ipmi/min_command_interval').with_value('5')
|
||||||
|
is_expected.to contain_ironic_config('ipmi/debug').with_value(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue