Merge "add ipxe_timeout parameter to ironic::drivers::pxe"
This commit is contained in:
commit
e76ff289fe
|
@ -77,6 +77,10 @@
|
|||
# (optional) Template file for PXE configuration for UEFI boot loader.
|
||||
# Defaults to '$pybasedir/drivers/modules/elilo_efi_pxe_config.template'.
|
||||
#
|
||||
# [*ipxe_timeout*]
|
||||
# (optional) ipxe timeout in second.
|
||||
# Should be an valid integer
|
||||
# Defaults to '0' for unlimited.
|
||||
|
||||
class ironic::drivers::pxe (
|
||||
$deploy_kernel = undef,
|
||||
|
@ -91,6 +95,7 @@ class ironic::drivers::pxe (
|
|||
$instance_master_path = '/var/lib/ironic/master_images',
|
||||
$uefi_pxe_bootfile_name = 'elilo.efi',
|
||||
$uefi_pxe_config_template = '$pybasedir/drivers/modules/elilo_efi_pxe_config.template',
|
||||
$ipxe_timeout = '0',
|
||||
) {
|
||||
|
||||
# Configure ironic.conf
|
||||
|
@ -105,6 +110,7 @@ class ironic::drivers::pxe (
|
|||
'pxe/instance_master_path': value => $instance_master_path;
|
||||
'pxe/uefi_pxe_bootfile_name': value => $uefi_pxe_bootfile_name;
|
||||
'pxe/uefi_pxe_config_template': value => $uefi_pxe_config_template;
|
||||
'pxe/ipxe_timeout': value => $ipxe_timeout;
|
||||
}
|
||||
|
||||
if $deploy_kernel {
|
||||
|
|
|
@ -32,7 +32,9 @@ describe 'ironic::drivers::pxe' do
|
|||
:tftp_master_path => '/tftpboot/master_images',
|
||||
:instance_master_path => '/var/lib/ironic/master_images',
|
||||
:uefi_pxe_bootfile_name => 'elilo.efi',
|
||||
:uefi_pxe_config_template => '$pybasedir/drivers/modules/elilo_efi_pxe_config.template' }
|
||||
:uefi_pxe_config_template => '$pybasedir/drivers/modules/elilo_efi_pxe_config.template',
|
||||
:ipxe_timeout => 0
|
||||
}
|
||||
end
|
||||
|
||||
let :params do
|
||||
|
@ -71,7 +73,8 @@ describe 'ironic::drivers::pxe' do
|
|||
:tftp_master_path => '/mnt/master_images',
|
||||
:instance_master_path => '/mnt/ironic/master_images',
|
||||
:uefi_pxe_bootfile_name => 'bootx64.efi',
|
||||
:uefi_pxe_config_template => 'foo-uefi'
|
||||
:uefi_pxe_config_template => 'foo-uefi',
|
||||
:ipxe_timeout => '60'
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -88,6 +91,7 @@ describe 'ironic::drivers::pxe' do
|
|||
is_expected.to contain_ironic_config('pxe/instance_master_path').with_value(p[:instance_master_path])
|
||||
is_expected.to contain_ironic_config('pxe/uefi_pxe_bootfile_name').with_value(p[:uefi_pxe_bootfile_name])
|
||||
is_expected.to contain_ironic_config('pxe/uefi_pxe_config_template').with_value(p[:uefi_pxe_config_template])
|
||||
is_expected.to contain_ironic_config('pxe/ipxe_timeout').with_value(p[:ipxe_timeout])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue