Support more parameters of Redfish driver
This patch introduces some new parameters to ironic::drivers::redfish class, so that users can set more parameters for Redfish driver by puppet-ironic. Change-Id: Ib6cf8a0121c2883574dbb4699d6d74092386c59e
This commit is contained in:
parent
ae62e3be12
commit
cc7c275366
@ -28,18 +28,61 @@
|
||||
# Should be a positive integer value.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*connection_cache_size*]
|
||||
# (optional) Maximum Redfish client connection cache size.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*auth_type*]
|
||||
# (optional) Redfish HTTP client authentication method.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*use_swift*]
|
||||
# (optional) Upload genrated ISO images for virtual media boot to Swift.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*swift_container*]
|
||||
# (optional) The swift container to store Redfish driver data.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*swift_object_expiry_timeout*]
|
||||
# (optional) Amount of time in seconds for Swift objects to auto-expire.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*kernel_append_params*]
|
||||
# (optional) Addiitonal kernel parameters to pass down to the instance kernel
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*file_permission*]
|
||||
# (optional) File permission for swift-less image hosting with the octal
|
||||
# permission representation of file access permissions.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class ironic::drivers::redfish (
|
||||
$package_ensure = 'present',
|
||||
$connection_attempts = $::os_service_default,
|
||||
$connection_retry_interval = $::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,
|
||||
) {
|
||||
|
||||
include ironic::deps
|
||||
include ironic::params
|
||||
|
||||
ironic_config {
|
||||
'redfish/connection_attempts': value => $connection_attempts;
|
||||
'redfish/connection_retry_interval': value => $connection_retry_interval;
|
||||
'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;
|
||||
}
|
||||
|
||||
ensure_packages('python-sushy',
|
||||
|
13
releasenotes/notes/redfish-more-opts-83066e74ed03dacc.yaml
Normal file
13
releasenotes/notes/redfish-more-opts-83066e74ed03dacc.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Now the ``ironic::drivers::redfish`` class supports the following parameters
|
||||
to provide capabilities to set more parameters of Redfish driver.
|
||||
|
||||
- ``connection_cache_size``
|
||||
- ``auth_type``
|
||||
- ``use_swift``
|
||||
- ``swift_container``
|
||||
- ``swift_object_expiry_timeout``
|
||||
- ``kernel_append_params``
|
||||
- ``file_permission``
|
@ -29,6 +29,13 @@ describe 'ironic::drivers::redfish' do
|
||||
it 'configures ironic.conf' do
|
||||
is_expected.to contain_ironic_config('redfish/connection_attempts').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('redfish/connection_retry_interval').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('redfish/connection_cache_size').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('redfish/auth_type').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('redfish/use_swift').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('redfish/swift_container').with_value('<SERVICE DEFAULT>')
|
||||
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>')
|
||||
end
|
||||
|
||||
it 'installs sushy package' do
|
||||
@ -41,12 +48,29 @@ describe 'ironic::drivers::redfish' do
|
||||
|
||||
context 'when overriding parameters' do
|
||||
before do
|
||||
params.merge!(:connection_attempts => 10,
|
||||
:connection_retry_interval => 1)
|
||||
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'
|
||||
)
|
||||
end
|
||||
|
||||
it 'should replace default parameter with new value' do
|
||||
is_expected.to contain_ironic_config('redfish/connection_attempts').with_value(10)
|
||||
is_expected.to contain_ironic_config('redfish/connection_retry_interval').with_value(1)
|
||||
is_expected.to contain_ironic_config('redfish/connection_cache_size').with_value(100)
|
||||
is_expected.to contain_ironic_config('redfish/auth_type').with_value('auto')
|
||||
is_expected.to contain_ironic_config('redfish/use_swift').with_value(true)
|
||||
is_expected.to contain_ironic_config('redfish/swift_container').with_value('ironic_redfish_container')
|
||||
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')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user