diff --git a/releasenotes/notes/add-ironic-inspect-interface-90b6ff6cfc052eb4.yaml b/releasenotes/notes/add-ironic-inspect-interface-90b6ff6cfc052eb4.yaml new file mode 100644 index 000000000..bae67a9d9 --- /dev/null +++ b/releasenotes/notes/add-ironic-inspect-interface-90b6ff6cfc052eb4.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Automatically enables ironic inspection interfaces for enabled ironic + hardware types supporting out-of-band inspection. diff --git a/tripleoclient/tests/v1/undercloud/test_config.py b/tripleoclient/tests/v1/undercloud/test_config.py index 94d19d78b..0747ec708 100644 --- a/tripleoclient/tests/v1/undercloud/test_config.py +++ b/tripleoclient/tests/v1/undercloud/test_config.py @@ -50,6 +50,8 @@ class TestProcessDriversAndHardwareTypes(base.TestCase): 'IronicEnabledHardwareTypes': ['idrac', 'ilo', 'ipmi', 'redfish'], 'IronicEnabledBootInterfaces': ['ilo-pxe', 'ipxe', 'pxe'], 'IronicEnabledBiosInterfaces': ['ilo', 'no-bios', 'redfish'], + 'IronicEnabledInspectInterfaces': ['idrac', 'ilo', 'inspector', + 'no-inspect', 'redfish'], 'IronicEnabledManagementInterfaces': ['fake', 'idrac', 'ilo', 'ipmitool', 'noop', 'redfish'], @@ -70,6 +72,8 @@ class TestProcessDriversAndHardwareTypes(base.TestCase): 'IronicEnabledHardwareTypes': ['ipmi', 'redfish'], 'IronicEnabledBootInterfaces': ['ipxe', 'pxe'], 'IronicEnabledBiosInterfaces': ['no-bios', 'redfish'], + 'IronicEnabledInspectInterfaces': ['inspector', 'no-inspect', + 'redfish'], 'IronicEnabledManagementInterfaces': ['fake', 'ipmitool', 'noop', 'redfish'], 'IronicEnabledPowerInterfaces': ['fake', 'ipmitool', 'redfish'], @@ -99,6 +103,9 @@ class TestProcessDriversAndHardwareTypes(base.TestCase): 'pxe'], 'IronicEnabledBiosInterfaces': ['ilo', 'irmc', 'no-bios', 'redfish'], + 'IronicEnabledInspectInterfaces': ['idrac', 'ilo', 'inspector', + 'irmc', 'no-inspect', + '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 32b50c01e..0f052108b 100644 --- a/tripleoclient/v1/undercloud_config.py +++ b/tripleoclient/v1/undercloud_config.py @@ -166,6 +166,11 @@ def _process_drivers_and_hardware_types(conf, env): if hw_type in enabled_hardware_types: boot_interfaces.add('%s-pxe' % hw_type) + inspect_interfaces = {'inspector', 'no-inspect'} + for hw_type in ('redfish', 'idrac', 'ilo', 'irmc'): + if hw_type in enabled_hardware_types: + inspect_interfaces.add(hw_type) + raid_interfaces = {'no-raid'} if 'idrac' in enabled_hardware_types: raid_interfaces.add('idrac') @@ -187,6 +192,7 @@ def _process_drivers_and_hardware_types(conf, env): env['IronicEnabledBiosInterfaces'] = sorted(bios_interfaces) env['IronicEnabledBootInterfaces'] = sorted(boot_interfaces) + env['IronicEnabledInspectInterfaces'] = sorted(inspect_interfaces) env['IronicEnabledManagementInterfaces'] = sorted(mgmt_interfaces) env['IronicEnabledPowerInterfaces'] = sorted(power_interfaces) env['IronicEnabledRaidInterfaces'] = sorted(raid_interfaces)