inspector: Ensure valid elements for kernel args
The following parameters only accept string values and a different type such as array can result in wrongly rendered template file. - ramdisk_collectors - ramdisk_filename - kernel_filename - ramdisk_kernel_args In additionl the following parameters can't accept empty strings. - ramdisk_collectors - ramdisk_filename - kernel_filename Change-Id: I0787d2c2b9eacb51ef02d1c1cb7cbda895755b19
This commit is contained in:
parent
2104bc4991
commit
7c2fb19c95
|
@ -134,7 +134,7 @@
|
|||
#
|
||||
# [*ramdisk_kernel_args*]
|
||||
# String with kernel arguments to send to the ramdisk on boot.
|
||||
# Defaults to undef
|
||||
# Defaults to ''
|
||||
#
|
||||
# [*ramdisk_filename*]
|
||||
# The filename of ramdisk which is used in pxelinux_cfg/ipxelinux_cfg templates
|
||||
|
@ -220,11 +220,11 @@ class ironic::inspector (
|
|||
$dnsmasq_dhcp_hostsdir = undef,
|
||||
$dnsmasq_log_facility = undef,
|
||||
Boolean $sync_db = true,
|
||||
$ramdisk_collectors = 'default',
|
||||
$ramdisk_filename = 'agent.ramdisk',
|
||||
$kernel_filename = 'agent.kernel',
|
||||
String[1] $ramdisk_collectors = 'default',
|
||||
String[1] $ramdisk_filename = 'agent.ramdisk',
|
||||
String[1] $kernel_filename = 'agent.kernel',
|
||||
$additional_processing_hooks = undef,
|
||||
$ramdisk_kernel_args = undef,
|
||||
String $ramdisk_kernel_args = '',
|
||||
$ipxe_timeout = $facts['os_service_default'],
|
||||
$http_port = '8088',
|
||||
$detect_boot_mode = $facts['os_service_default'],
|
||||
|
|
|
@ -271,7 +271,7 @@ describe 'ironic::inspector' do
|
|||
'content' => /ipxe/,
|
||||
)
|
||||
is_expected.to contain_file('/var/www/httpboot/inspector.ipxe').with_content(
|
||||
/kernel http:\/\/192.168.0.1:3816\/agent.kernel ipa-inspection-callback-url=http:\/\/192.168.0.1:5050\/v1\/continue ipa-inspection-collectors=default.* foo=bar || goto retry_boot/
|
||||
/kernel http:\/\/192.168.0.1:3816\/agent.kernel ipa-inspection-callback-url=http:\/\/192.168.0.1:5050\/v1\/continue ipa-inspection-collectors=default .* foo=bar || goto retry_boot/
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -297,7 +297,7 @@ describe 'ironic::inspector' do
|
|||
|
||||
it 'should contain file /var/www/httpboot/inspector.ipxe' do
|
||||
is_expected.to contain_file('/var/www/httpboot/inspector.ipxe').with_content(
|
||||
/kernel http:\/\/\[fd00::1\]:3816\/agent.kernel ipa-inspection-callback-url=http:\/\/\[fd00::1\]:5050\/v1\/continue ipa-inspection-collectors=default.* foo=bar || goto retry_boot/
|
||||
/kernel http:\/\/\[fd00::1\]:3816\/agent.kernel ipa-inspection-callback-url=http:\/\/\[fd00::1\]:5050\/v1\/continue ipa-inspection-collectors=default .* foo=bar || goto retry_boot/
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue