Merge "Deprecate support for unused drac options"
This commit is contained in:
@@ -27,46 +27,62 @@
|
||||
# configuration.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*config_job_max_retries*]
|
||||
# (optional) Maximum number of retries for the configuration job to
|
||||
# complete successfully
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*query_import_config_job_status_interval*]
|
||||
# (optional) Number of seconds to wait between checking for completed
|
||||
# import configuration task.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*bios_factory_reset_timeout*]
|
||||
# (optional) Maximum time (in seconds) to wait for factory reset of BIOS
|
||||
# settings to complete.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# [*raid_job_timeout*]
|
||||
# (optional) Maximum time (in seconds) to wait for RAID job to complete.
|
||||
# Defaults to $facts['os_service_default']
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*config_job_max_retries*]
|
||||
# (optional) Maximum number of retries for the configuration job to
|
||||
# complete successfully
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*bios_factory_reset_timeout*]
|
||||
# (optional) Maximum time (in seconds) to wait for factory reset of BIOS
|
||||
# settings to complete.
|
||||
# Defaults to undef
|
||||
#
|
||||
class ironic::drivers::drac (
|
||||
Stdlib::Ensure::Package $package_ensure = 'present',
|
||||
$query_raid_config_job_status_interval = $facts['os_service_default'],
|
||||
$boot_device_job_status_timeout = $facts['os_service_default'],
|
||||
$config_job_max_retries = $facts['os_service_default'],
|
||||
$query_import_config_job_status_interval = $facts['os_service_default'],
|
||||
$bios_factory_reset_timeout = $facts['os_service_default'],
|
||||
$raid_job_timeout = $facts['os_service_default'],
|
||||
# DEPRECATED PARAMETERS
|
||||
$config_job_max_retries = undef,
|
||||
$bios_factory_reset_timeout = undef,
|
||||
) {
|
||||
include ironic::deps
|
||||
include ironic::params
|
||||
|
||||
[
|
||||
'config_job_max_retries',
|
||||
'bios_factory_reset_timeout',
|
||||
].each |String $deprecated_param| {
|
||||
if getvar($deprecated_param) != undef {
|
||||
warning("The ${deprecated_param} parameter is deprecated and has no effect.")
|
||||
}
|
||||
}
|
||||
|
||||
ironic_config {
|
||||
'drac/query_raid_config_job_status_interval': value => $query_raid_config_job_status_interval;
|
||||
'drac/boot_device_job_status_timeout': value => $boot_device_job_status_timeout;
|
||||
'drac/config_job_max_retries': value => $config_job_max_retries;
|
||||
'drac/query_import_config_job_status_interval': value => $query_import_config_job_status_interval;
|
||||
'drac/bios_factory_reset_timeout': value => $bios_factory_reset_timeout;
|
||||
'drac/raid_job_timeout': value => $raid_job_timeout;
|
||||
}
|
||||
|
||||
# TODO(tkajinam): Remove this after 2026.1
|
||||
ironic_config {
|
||||
'drac/config_job_max_retries': ensure => absent;
|
||||
'drac/bios_factory_reset_timeout': ensure => absent;
|
||||
}
|
||||
|
||||
package { 'python-sushy-oem-idrac':
|
||||
ensure => $package_ensure,
|
||||
name => $ironic::params::sushy_oem_idrac_package_name,
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The following parameters of the ``ironic::drivers::drac`` class have been
|
||||
deprecated and have no effect now.
|
||||
|
||||
- ``config_job_max_retries``
|
||||
- ``bios_factory_reset_timeout``
|
||||
@@ -22,9 +22,7 @@ describe 'ironic::drivers::drac' do
|
||||
it 'configures drac options' do
|
||||
is_expected.to contain_ironic_config('drac/query_raid_config_job_status_interval').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('drac/boot_device_job_status_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('drac/config_job_max_retries').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('drac/query_import_config_job_status_interval').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('drac/bios_factory_reset_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('drac/raid_job_timeout').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
@@ -42,9 +40,7 @@ describe 'ironic::drivers::drac' do
|
||||
{
|
||||
:query_raid_config_job_status_interval => 120,
|
||||
:boot_device_job_status_timeout => 30,
|
||||
:config_job_max_retries => 240,
|
||||
:query_import_config_job_status_interval => 0,
|
||||
:bios_factory_reset_timeout => 600,
|
||||
:raid_job_timeout => 300,
|
||||
}
|
||||
end
|
||||
@@ -52,9 +48,7 @@ describe 'ironic::drivers::drac' do
|
||||
it 'configures drac options' do
|
||||
is_expected.to contain_ironic_config('drac/query_raid_config_job_status_interval').with_value(120)
|
||||
is_expected.to contain_ironic_config('drac/boot_device_job_status_timeout').with_value(30)
|
||||
is_expected.to contain_ironic_config('drac/config_job_max_retries').with_value(240)
|
||||
is_expected.to contain_ironic_config('drac/query_import_config_job_status_interval').with_value(0)
|
||||
is_expected.to contain_ironic_config('drac/bios_factory_reset_timeout').with_value(600)
|
||||
is_expected.to contain_ironic_config('drac/raid_job_timeout').with_value(300)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user