Merge "ipmi: Support more options"
This commit is contained in:
commit
a00bc96d1f
manifests/drivers
releasenotes/notes
spec/classes
@ -42,29 +42,43 @@
|
||||
# timeout for booting.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*additional_retryable_ipmi_errors*]
|
||||
# (optional) Additional errors ipmitool may encounter, specific to
|
||||
# the environment it is run in.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*debug*]
|
||||
# (optional) Enables debug outputs of IPMI commands
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*cipher_suite_versions*]
|
||||
# (optional) List of possible cipher suites versions that can be supported
|
||||
# by the hardware in case the field `cipher_suite` is not set for the node.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
class ironic::drivers::ipmi (
|
||||
$command_retry_timeout = $facts['os_service_default'],
|
||||
$min_command_interval = $facts['os_service_default'],
|
||||
$use_ipmitool_retries = $facts['os_service_default'],
|
||||
$kill_on_timeout = $facts['os_service_default'],
|
||||
$disable_boot_timeout = $facts['os_service_default'],
|
||||
$debug = $facts['os_service_default'],
|
||||
$command_retry_timeout = $facts['os_service_default'],
|
||||
$min_command_interval = $facts['os_service_default'],
|
||||
$use_ipmitool_retries = $facts['os_service_default'],
|
||||
$kill_on_timeout = $facts['os_service_default'],
|
||||
$disable_boot_timeout = $facts['os_service_default'],
|
||||
$additional_retryable_ipmi_errors = $facts['os_service_default'],
|
||||
$debug = $facts['os_service_default'],
|
||||
$cipher_suite_versions = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include ironic::deps
|
||||
|
||||
# Configure ironic.conf
|
||||
ironic_config {
|
||||
'ipmi/command_retry_timeout': value => $command_retry_timeout;
|
||||
'ipmi/min_command_interval': value => $min_command_interval;
|
||||
'ipmi/use_ipmitool_retries': value => $use_ipmitool_retries;
|
||||
'ipmi/kill_on_timeout': value => $kill_on_timeout;
|
||||
'ipmi/disable_boot_timeout': value => $disable_boot_timeout;
|
||||
'ipmi/debug': value => $debug;
|
||||
'ipmi/command_retry_timeout': value => $command_retry_timeout;
|
||||
'ipmi/min_command_interval': value => $min_command_interval;
|
||||
'ipmi/use_ipmitool_retries': value => $use_ipmitool_retries;
|
||||
'ipmi/kill_on_timeout': value => $kill_on_timeout;
|
||||
'ipmi/disable_boot_timeout': value => $disable_boot_timeout;
|
||||
'ipmi/additional_retryable_ipmi_errors': value => $additional_retryable_ipmi_errors;
|
||||
'ipmi/debug': value => $debug;
|
||||
'ipmi/cipher_suite_versions': value => join(any2array($cipher_suite_versions), ',');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``ironic::drivers::ipmi`` class now supports the following two new
|
||||
parameters.
|
||||
|
||||
- ``additional_retryable_ipmi_errors``
|
||||
- ``cipher_suite_versions``
|
@ -30,19 +30,23 @@ describe 'ironic::drivers::ipmi' do
|
||||
is_expected.to contain_ironic_config('ipmi/use_ipmitool_retries').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('ipmi/kill_on_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('ipmi/disable_boot_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('ipmi/additional_retryable_ipmi_errors').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('ipmi/debug').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('ipmi/cipher_suite_versions').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when overriding parameters' do
|
||||
let :params do
|
||||
{
|
||||
:command_retry_timeout => 50,
|
||||
:min_command_interval => 5,
|
||||
:use_ipmitool_retries => false,
|
||||
:kill_on_timeout => true,
|
||||
:disable_boot_timeout => true,
|
||||
:debug => true,
|
||||
:command_retry_timeout => 50,
|
||||
:min_command_interval => 5,
|
||||
:use_ipmitool_retries => false,
|
||||
:kill_on_timeout => true,
|
||||
:disable_boot_timeout => true,
|
||||
:additional_retryable_ipmi_errors => ['error1', 'error2'],
|
||||
:debug => true,
|
||||
:cipher_suite_versions => ['1', '2'],
|
||||
}
|
||||
end
|
||||
|
||||
@ -52,7 +56,9 @@ describe 'ironic::drivers::ipmi' do
|
||||
is_expected.to contain_ironic_config('ipmi/use_ipmitool_retries').with_value(false)
|
||||
is_expected.to contain_ironic_config('ipmi/kill_on_timeout').with_value(true)
|
||||
is_expected.to contain_ironic_config('ipmi/disable_boot_timeout').with_value(true)
|
||||
is_expected.to contain_ironic_config('ipmi/additional_retryable_ipmi_errors').with_value(['error1', 'error2'])
|
||||
is_expected.to contain_ironic_config('ipmi/debug').with_value(true)
|
||||
is_expected.to contain_ironic_config('ipmi/cipher_suite_versions').with_value('1,2')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user