Merge "Adds the configuration of bios interfaces"
This commit is contained in:
commit
1c54716aa0
@ -14,6 +14,11 @@
|
|||||||
#
|
#
|
||||||
# === Parameters
|
# === Parameters
|
||||||
#
|
#
|
||||||
|
# [*default_bios_interface*]
|
||||||
|
# (optional) Default bios interface to be used for nodes that do not have
|
||||||
|
# bios_interface field set.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# [*default_boot_interface*]
|
# [*default_boot_interface*]
|
||||||
# (optional) Default boot interface to be used for nodes that do not have
|
# (optional) Default boot interface to be used for nodes that do not have
|
||||||
# boot_interface field set.
|
# boot_interface field set.
|
||||||
@ -69,6 +74,11 @@
|
|||||||
# vendor_interface field set.
|
# vendor_interface field set.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*enabled_bios_interfaces*]
|
||||||
|
# (optional) Specify the list of bios interfaces to load during
|
||||||
|
# service initialization.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# [*enabled_boot_interfaces*]
|
# [*enabled_boot_interfaces*]
|
||||||
# (optional) Specify the list of boot interfaces to load during
|
# (optional) Specify the list of boot interfaces to load during
|
||||||
# service initialization.
|
# service initialization.
|
||||||
@ -125,6 +135,7 @@
|
|||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
class ironic::drivers::interfaces (
|
class ironic::drivers::interfaces (
|
||||||
|
$default_bios_interface = $::os_service_default,
|
||||||
$default_boot_interface = $::os_service_default,
|
$default_boot_interface = $::os_service_default,
|
||||||
$default_console_interface = $::os_service_default,
|
$default_console_interface = $::os_service_default,
|
||||||
$default_deploy_interface = $::os_service_default,
|
$default_deploy_interface = $::os_service_default,
|
||||||
@ -136,6 +147,7 @@ class ironic::drivers::interfaces (
|
|||||||
$default_rescue_interface = $::os_service_default,
|
$default_rescue_interface = $::os_service_default,
|
||||||
$default_storage_interface = $::os_service_default,
|
$default_storage_interface = $::os_service_default,
|
||||||
$default_vendor_interface = $::os_service_default,
|
$default_vendor_interface = $::os_service_default,
|
||||||
|
$enabled_bios_interfaces = $::os_service_default,
|
||||||
$enabled_boot_interfaces = $::os_service_default,
|
$enabled_boot_interfaces = $::os_service_default,
|
||||||
$enabled_console_interfaces = $::os_service_default,
|
$enabled_console_interfaces = $::os_service_default,
|
||||||
$enabled_deploy_interfaces = $::os_service_default,
|
$enabled_deploy_interfaces = $::os_service_default,
|
||||||
@ -150,6 +162,8 @@ class ironic::drivers::interfaces (
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
$interfaces = {
|
$interfaces = {
|
||||||
|
'bios' => { 'enabled_list' => $enabled_bios_interfaces,
|
||||||
|
'default' => $default_bios_interface },
|
||||||
'boot' => { 'enabled_list' => $enabled_boot_interfaces,
|
'boot' => { 'enabled_list' => $enabled_boot_interfaces,
|
||||||
'default' => $default_boot_interface },
|
'default' => $default_boot_interface },
|
||||||
'console' => { 'enabled_list' => $enabled_console_interfaces,
|
'console' => { 'enabled_list' => $enabled_console_interfaces,
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- It enables the configuration of enabled bios
|
||||||
|
interfaces and default bios interface.
|
||||||
|
|
@ -20,8 +20,10 @@ describe 'ironic::drivers::interfaces' do
|
|||||||
shared_examples_for 'ironic hardware interfaces' do
|
shared_examples_for 'ironic hardware interfaces' do
|
||||||
|
|
||||||
context 'with default parameters' do
|
context 'with default parameters' do
|
||||||
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_bios_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_boot_interfaces').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_boot_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_console_interfaces').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_console_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_console_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_deploy_interfaces').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_deploy_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_inspect_interfaces').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_inspect_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_management_interfaces').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_management_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||||
@ -35,7 +37,9 @@ describe 'ironic::drivers::interfaces' do
|
|||||||
|
|
||||||
context 'when overriding parameters' do
|
context 'when overriding parameters' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :enabled_boot_interfaces => ['pxe'],
|
{
|
||||||
|
:enabled_bios_interfaces => ['no-bios'],
|
||||||
|
:enabled_boot_interfaces => ['pxe'],
|
||||||
:enabled_console_interfaces => ['socat', 'shellinabox'],
|
:enabled_console_interfaces => ['socat', 'shellinabox'],
|
||||||
:enabled_deploy_interfaces => ['iscsi'],
|
:enabled_deploy_interfaces => ['iscsi'],
|
||||||
:enabled_inspect_interfaces => ['inspector'],
|
:enabled_inspect_interfaces => ['inspector'],
|
||||||
@ -48,6 +52,7 @@ describe 'ironic::drivers::interfaces' do
|
|||||||
:enabled_vendor_interfaces => ['no-vendor'] }
|
:enabled_vendor_interfaces => ['no-vendor'] }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_bios_interfaces').with_value('no-bios') }
|
||||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_boot_interfaces').with_value('pxe') }
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_boot_interfaces').with_value('pxe') }
|
||||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_console_interfaces').with_value('socat,shellinabox') }
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_console_interfaces').with_value('socat,shellinabox') }
|
||||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_deploy_interfaces').with_value('iscsi') }
|
it { is_expected.to contain_ironic_config('DEFAULT/enabled_deploy_interfaces').with_value('iscsi') }
|
||||||
|
Loading…
Reference in New Issue
Block a user