From f20e47c9e8746e01b187e3ce1e3ecbe33e101144 Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Fri, 4 Jan 2019 22:07:10 +0100 Subject: [PATCH] Undercloud: support bios interface for ilo, irmc, redfish Generate BIOS interface defaults for ironic configuration. Change-Id: I19d4ae45c4e08d4e02bae194e49f63ed0a1d3d8e Story: 2001791 Task: 28731 --- tripleoclient/tests/v1/undercloud/test_config.py | 4 ++++ tripleoclient/v1/undercloud_config.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/tripleoclient/tests/v1/undercloud/test_config.py b/tripleoclient/tests/v1/undercloud/test_config.py index 583738ef0..87bba7498 100644 --- a/tripleoclient/tests/v1/undercloud/test_config.py +++ b/tripleoclient/tests/v1/undercloud/test_config.py @@ -49,6 +49,7 @@ class TestProcessDriversAndHardwareTypes(base.TestCase): self.assertEqual({ 'IronicEnabledHardwareTypes': ['idrac', 'ilo', 'ipmi', 'redfish'], 'IronicEnabledBootInterfaces': ['ilo-pxe', 'ipxe', 'pxe'], + 'IronicEnabledBiosInterfaces': ['ilo', 'no-bios', 'redfish'], 'IronicEnabledManagementInterfaces': ['fake', 'idrac', 'ilo', 'ipmitool', 'noop', 'redfish'], @@ -68,6 +69,7 @@ class TestProcessDriversAndHardwareTypes(base.TestCase): # ipmi added because it's the default discovery driver 'IronicEnabledHardwareTypes': ['ipmi', 'redfish'], 'IronicEnabledBootInterfaces': ['ipxe', 'pxe'], + 'IronicEnabledBiosInterfaces': ['no-bios', 'redfish'], 'IronicEnabledManagementInterfaces': ['fake', 'ipmitool', 'noop', 'redfish'], 'IronicEnabledPowerInterfaces': ['fake', 'ipmitool', 'redfish'], @@ -95,6 +97,8 @@ class TestProcessDriversAndHardwareTypes(base.TestCase): 'xclarity'], 'IronicEnabledBootInterfaces': ['ilo-pxe', 'ipxe', 'irmc-pxe', 'pxe'], + 'IronicEnabledBiosInterfaces': ['ilo', 'irmc', + 'no-bios', 'redfish'], 'IronicEnabledManagementInterfaces': ['cimc', 'fake', 'idrac', 'ilo', 'ipmitool', 'irmc', 'noop', 'redfish', diff --git a/tripleoclient/v1/undercloud_config.py b/tripleoclient/v1/undercloud_config.py index 15d105bfc..3d82df4fc 100644 --- a/tripleoclient/v1/undercloud_config.py +++ b/tripleoclient/v1/undercloud_config.py @@ -155,6 +155,11 @@ def _process_drivers_and_hardware_types(conf, env): if hw_type in enabled_hardware_types: mgmt_interfaces.add(iface) + bios_interfaces = {'no-bios'} + for hw_type in ['ilo', 'irmc', 'redfish']: + if hw_type in enabled_hardware_types: + bios_interfaces.add(hw_type) + # Two hardware types use non-default boot interfaces. boot_interfaces = {'ipxe', 'pxe'} for hw_type in ('ilo', 'irmc'): @@ -180,6 +185,7 @@ def _process_drivers_and_hardware_types(conf, env): env['IronicEnabledHardwareTypes'] = sorted(enabled_hardware_types) + env['IronicEnabledBiosInterfaces'] = sorted(bios_interfaces) env['IronicEnabledBootInterfaces'] = sorted(boot_interfaces) env['IronicEnabledManagementInterfaces'] = sorted(mgmt_interfaces) env['IronicEnabledPowerInterfaces'] = sorted(power_interfaces)