Add support for the firmware update feature in redfish driver
This patch introduces parameters related to the firmware update, which was added to Ironic during Victoria cycle[1]. [1] f0e0ef634e55f46eda4942e9665d35c70d305365 Change-Id: If95ff0d0422142c3ed74eba4110969479a51139d
This commit is contained in:
parent
02d0fea829
commit
4de9654579
@ -57,32 +57,46 @@
|
||||
# permission representation of file access permissions.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*firmware_update_status_interval*]
|
||||
# (optional) Number of seconds to wait between checking for completed
|
||||
# firmware update tasks.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*firmware_update_fail_interval*]
|
||||
# (optional) Number of seconds to wait between checking for failed firmware
|
||||
# update tasks.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class ironic::drivers::redfish (
|
||||
$package_ensure = 'present',
|
||||
$connection_attempts = $::os_service_default,
|
||||
$connection_retry_interval = $::os_service_default,
|
||||
$connection_cache_size = $::os_service_default,
|
||||
$auth_type = $::os_service_default,
|
||||
$use_swift = $::os_service_default,
|
||||
$swift_container = $::os_service_default,
|
||||
$swift_object_expiry_timeout = $::os_service_default,
|
||||
$kernel_append_params = $::os_service_default,
|
||||
$file_permission = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
$connection_attempts = $::os_service_default,
|
||||
$connection_retry_interval = $::os_service_default,
|
||||
$connection_cache_size = $::os_service_default,
|
||||
$auth_type = $::os_service_default,
|
||||
$use_swift = $::os_service_default,
|
||||
$swift_container = $::os_service_default,
|
||||
$swift_object_expiry_timeout = $::os_service_default,
|
||||
$kernel_append_params = $::os_service_default,
|
||||
$file_permission = $::os_service_default,
|
||||
$firmware_update_status_interval = $::os_service_default,
|
||||
$firmware_update_fail_interval = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ironic::deps
|
||||
include ironic::params
|
||||
|
||||
ironic_config {
|
||||
'redfish/connection_attempts': value => $connection_attempts;
|
||||
'redfish/connection_retry_interval': value => $connection_retry_interval;
|
||||
'redfish/connection_cache_size': value => $connection_cache_size;
|
||||
'redfish/auth_type': value => $auth_type;
|
||||
'redfish/use_swift': value => $use_swift;
|
||||
'redfish/swift_container': value => $swift_container;
|
||||
'redfish/swift_object_expiry_timeout': value => $swift_object_expiry_timeout;
|
||||
'redfish/kernel_append_params': value => $kernel_append_params;
|
||||
'redfish/file_permission': value => $file_permission;
|
||||
'redfish/connection_attempts': value => $connection_attempts;
|
||||
'redfish/connection_retry_interval': value => $connection_retry_interval;
|
||||
'redfish/connection_cache_size': value => $connection_cache_size;
|
||||
'redfish/auth_type': value => $auth_type;
|
||||
'redfish/use_swift': value => $use_swift;
|
||||
'redfish/swift_container': value => $swift_container;
|
||||
'redfish/swift_object_expiry_timeout': value => $swift_object_expiry_timeout;
|
||||
'redfish/kernel_append_params': value => $kernel_append_params;
|
||||
'redfish/file_permission': value => $file_permission;
|
||||
'redfish/firmware_update_status_interval': value => $firmware_update_status_interval;
|
||||
'redfish/firmware_update_fail_interval': value => $firmware_update_fail_interval;
|
||||
}
|
||||
|
||||
ensure_packages('python-sushy',
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``ironic::driver::redfish`` class now supports the following two
|
||||
parameters to set the polling intervals for the firmware update feature in
|
||||
redfish driver.
|
||||
|
||||
- ``firmware_update_status_interval``
|
||||
- ``firmware_update_fail_interval``
|
@ -36,6 +36,8 @@ describe 'ironic::drivers::redfish' do
|
||||
is_expected.to contain_ironic_config('redfish/swift_object_expiry_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('redfish/kernel_append_params').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('redfish/file_permission').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('redfish/firmware_update_status_interval').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('redfish/firmware_update_fail_interval').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
it 'installs sushy package' do
|
||||
@ -49,15 +51,17 @@ describe 'ironic::drivers::redfish' do
|
||||
context 'when overriding parameters' do
|
||||
before do
|
||||
params.merge!(
|
||||
:connection_attempts => 10,
|
||||
:connection_retry_interval => 1,
|
||||
:connection_cache_size => 100,
|
||||
:auth_type => 'auto',
|
||||
:use_swift => true,
|
||||
:swift_container => 'ironic_redfish_container',
|
||||
:swift_object_expiry_timeout => 900,
|
||||
:kernel_append_params => 'nofb nomodeset vga=normal',
|
||||
:file_permission => '0o644'
|
||||
:connection_attempts => 10,
|
||||
:connection_retry_interval => 1,
|
||||
:connection_cache_size => 100,
|
||||
:auth_type => 'auto',
|
||||
:use_swift => true,
|
||||
:swift_container => 'ironic_redfish_container',
|
||||
:swift_object_expiry_timeout => 900,
|
||||
:kernel_append_params => 'nofb nomodeset vga=normal',
|
||||
:file_permission => '0o644',
|
||||
:firmware_update_status_interval => 60,
|
||||
:firmware_update_fail_interval => 60,
|
||||
)
|
||||
end
|
||||
|
||||
@ -71,6 +75,8 @@ describe 'ironic::drivers::redfish' do
|
||||
is_expected.to contain_ironic_config('redfish/swift_object_expiry_timeout').with_value(900)
|
||||
is_expected.to contain_ironic_config('redfish/kernel_append_params').with_value('nofb nomodeset vga=normal')
|
||||
is_expected.to contain_ironic_config('redfish/file_permission').with_value('0o644')
|
||||
is_expected.to contain_ironic_config('redfish/firmware_update_status_interval').with_value(60)
|
||||
is_expected.to contain_ironic_config('redfish/firmware_update_fail_interval').with_value(60)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user