Support customization of [ipmi] store_cred_in_env

Depends-on: https://review.opendev.org/917229
Change-Id: Ica6ef75948a3f1d60b3a564afed8f26447b13e8e
This commit is contained in:
Takashi Kajinami 2024-07-24 23:33:46 +09:00
parent f63900b549
commit fe9b82f80d
3 changed files with 15 additions and 0 deletions

View File

@ -51,6 +51,11 @@
# (optional) Enables debug outputs of IPMI commands
# Defaults to $facts['os_service_default']
#
# [*store_cred_in_env*]
# (optional) Store IPMI password in an environment variable instead of
# a file.
# 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.
@ -64,6 +69,7 @@ class ironic::drivers::ipmi (
$disable_boot_timeout = $facts['os_service_default'],
$additional_retryable_ipmi_errors = $facts['os_service_default'],
$debug = $facts['os_service_default'],
$store_cred_in_env = $facts['os_service_default'],
$cipher_suite_versions = $facts['os_service_default'],
) {
@ -78,6 +84,7 @@ class ironic::drivers::ipmi (
'ipmi/disable_boot_timeout': value => $disable_boot_timeout;
'ipmi/additional_retryable_ipmi_errors': value => $additional_retryable_ipmi_errors;
'ipmi/debug': value => $debug;
'ipmi/store_cred_in_env': value => $store_cred_in_env;
'ipmi/cipher_suite_versions': value => join(any2array($cipher_suite_versions), ',');
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``ironic::drivers::ipmi::store_cred_in_env`` parameter has been
added.

View File

@ -32,6 +32,7 @@ describe 'ironic::drivers::ipmi' do
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/store_cred_in_env').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('ipmi/cipher_suite_versions').with_value('<SERVICE DEFAULT>')
end
end
@ -46,6 +47,7 @@ describe 'ironic::drivers::ipmi' do
:disable_boot_timeout => true,
:additional_retryable_ipmi_errors => ['error1', 'error2'],
:debug => true,
:store_cred_in_env => false,
:cipher_suite_versions => ['1', '2'],
}
end
@ -58,6 +60,7 @@ describe 'ironic::drivers::ipmi' do
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/store_cred_in_env').with_value(false)
is_expected.to contain_ironic_config('ipmi/cipher_suite_versions').with_value('1,2')
end
end