Rename pxe_append_params
... to follow the renaming in ironic during the Xena cycle[1]. [1] 2a73f5a84e06b370d0b04997cc0787497e111642 Change-Id: I0026b3f47cb3e0caefa0f299ee5e7e4bf9a4e890
This commit is contained in:
parent
4b790c23b0
commit
541157fe29
@ -19,7 +19,7 @@
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*pxe_append_params*]
|
||||
# [*kernel_append_params*]
|
||||
# (optional) Additional append parameters for baremetal PXE boot.
|
||||
# Should be valid pxe parameters
|
||||
# Defaults to $::os_service_default.
|
||||
@ -117,8 +117,13 @@
|
||||
# release.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*pxe_append_params*]
|
||||
# (optional) Additional append parameters for baremetal PXE boot.
|
||||
# Should be valid pxe parameters
|
||||
# Defaults to undef.
|
||||
#
|
||||
class ironic::drivers::pxe (
|
||||
$pxe_append_params = $::os_service_default,
|
||||
$kernel_append_params = $::os_service_default,
|
||||
$pxe_bootfile_name = $::os_service_default,
|
||||
$pxe_config_template = $::os_service_default,
|
||||
$ipxe_bootfile_name = $::os_service_default,
|
||||
@ -138,6 +143,7 @@ class ironic::drivers::pxe (
|
||||
# DEPRECATED PARAMETERS
|
||||
$ipxe_enabled = undef,
|
||||
$ip_version = undef,
|
||||
$pxe_append_params = undef,
|
||||
) {
|
||||
|
||||
include ironic::deps
|
||||
@ -154,9 +160,18 @@ class ironic::drivers::pxe (
|
||||
}
|
||||
$ip_version_real = pick($ip_version, $::os_service_default)
|
||||
|
||||
if $pxe_append_params != undef {
|
||||
warning('The ironic::drivers::pxe::pxe_append_params parameter is deprecated. \
|
||||
Use the kernel_append_params parameter instead')
|
||||
}
|
||||
$kernel_append_params_real = pick($pxe_append_params, kernel_append_params)
|
||||
ironic_config {
|
||||
'pxe/pxe_append_params': ensure => absent
|
||||
}
|
||||
|
||||
# Configure ironic.conf
|
||||
ironic_config {
|
||||
'pxe/pxe_append_params': value => $pxe_append_params;
|
||||
'pxe/kernel_append_params': value => $kernel_append_params;
|
||||
'pxe/pxe_bootfile_name': value => $pxe_bootfile_name;
|
||||
'pxe/pxe_config_template': value => $pxe_config_template;
|
||||
'pxe/ipxe_bootfile_name': value => $ipxe_bootfile_name;
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``ironic::drivers::pxe::pxe_append_params`` parameter has been
|
||||
deprecated in favor of the new ``kernel_append_params`` parameter.
|
@ -37,7 +37,7 @@ describe 'ironic::drivers::pxe' do
|
||||
end
|
||||
|
||||
it 'configures ironic.conf' do
|
||||
is_expected.to contain_ironic_config('pxe/pxe_append_params').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('pxe/kernel_append_params').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('pxe/pxe_bootfile_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('pxe/pxe_config_template').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('pxe/ipxe_bootfile_name').with_value('<SERVICE DEFAULT>')
|
||||
@ -69,7 +69,7 @@ describe 'ironic::drivers::pxe' do
|
||||
context 'when overriding parameters' do
|
||||
before do
|
||||
params.merge!(
|
||||
:pxe_append_params => 'foo',
|
||||
:kernel_append_params => 'foo',
|
||||
:pxe_config_template => 'bar',
|
||||
:tftp_server => '192.168.0.1',
|
||||
:tftp_root => '/mnt/ftp',
|
||||
@ -88,7 +88,7 @@ describe 'ironic::drivers::pxe' do
|
||||
end
|
||||
|
||||
it 'should replace default parameter with new value' do
|
||||
is_expected.to contain_ironic_config('pxe/pxe_append_params').with_value(p[:pxe_append_params])
|
||||
is_expected.to contain_ironic_config('pxe/kernel_append_params').with_value(p[:kernel_append_params])
|
||||
is_expected.to contain_ironic_config('pxe/pxe_config_template').with_value(p[:pxe_config_template])
|
||||
is_expected.to contain_ironic_config('pxe/tftp_server').with_value(p[:tftp_server])
|
||||
is_expected.to contain_ironic_config('pxe/tftp_root').with_value(p[:tftp_root])
|
||||
|
Loading…
x
Reference in New Issue
Block a user