From 190d0fdc748a57a78b979dd598e22066c2c23108 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 6 Aug 2018 14:02:24 +0200 Subject: [PATCH] undercloud: support noop management interface for snmp and ipmi We're replacing the usage of the "fake" interface for snmp with the new "noop" one. It will also be enabled for ipmi. Change-Id: I05cca0eee30134d99a45d2dc44a8d370e7004eac Story: #2003203 --- .../tests/v1/undercloud/test_undercloud_config.py | 8 +++++--- tripleoclient/v1/undercloud_config.py | 13 ++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tripleoclient/tests/v1/undercloud/test_undercloud_config.py b/tripleoclient/tests/v1/undercloud/test_undercloud_config.py index a6966aad3..1430dc548 100644 --- a/tripleoclient/tests/v1/undercloud/test_undercloud_config.py +++ b/tripleoclient/tests/v1/undercloud/test_undercloud_config.py @@ -46,7 +46,8 @@ class TestProcessDriversAndHardwareTypes(base.TestCase): 'IronicEnabledHardwareTypes': ['idrac', 'ilo', 'ipmi', 'redfish'], 'IronicEnabledBootInterfaces': ['ilo-pxe', 'pxe'], 'IronicEnabledManagementInterfaces': ['fake', 'idrac', 'ilo', - 'ipmitool', 'redfish'], + 'ipmitool', 'noop', + 'redfish'], 'IronicEnabledPowerInterfaces': ['fake', 'idrac', 'ilo', 'ipmitool', 'redfish'], 'IronicEnabledRaidInterfaces': ['idrac', 'no-raid'], @@ -64,7 +65,7 @@ class TestProcessDriversAndHardwareTypes(base.TestCase): 'IronicEnabledHardwareTypes': ['ipmi', 'redfish'], 'IronicEnabledBootInterfaces': ['pxe'], 'IronicEnabledManagementInterfaces': ['fake', 'ipmitool', - 'redfish'], + 'noop', 'redfish'], 'IronicEnabledPowerInterfaces': ['fake', 'ipmitool', 'redfish'], 'IronicEnabledRaidInterfaces': ['no-raid'], 'IronicEnabledVendorInterfaces': ['ipmitool', 'no-vendor'], @@ -91,7 +92,8 @@ class TestProcessDriversAndHardwareTypes(base.TestCase): 'IronicEnabledBootInterfaces': ['ilo-pxe', 'irmc-pxe', 'pxe'], 'IronicEnabledManagementInterfaces': ['cimc', 'fake', 'idrac', 'ilo', 'ipmitool', 'irmc', - 'redfish', 'staging-ovirt', + 'noop', 'redfish', + 'staging-ovirt', 'ucsm', 'xclarity'], 'IronicEnabledPowerInterfaces': ['cimc', 'fake', 'idrac', 'ilo', 'ipmitool', 'irmc', diff --git a/tripleoclient/v1/undercloud_config.py b/tripleoclient/v1/undercloud_config.py index 45e072daa..c713aa995 100644 --- a/tripleoclient/v1/undercloud_config.py +++ b/tripleoclient/v1/undercloud_config.py @@ -168,18 +168,21 @@ def _process_drivers_and_hardware_types(conf, env): if hw_type in enabled_hardware_types: vendor_interfaces.add(iface) + power_interfaces = mgmt_interfaces.copy() + # The snmp hardware type uses noop management and snmp power; noop + # management is also used by ipmi and staging hardware types. + mgmt_interfaces.add('noop') + if 'snmp' in enabled_hardware_types: + power_interfaces.add('snmp') + env['IronicEnabledHardwareTypes'] = sorted(enabled_hardware_types) env['IronicEnabledBootInterfaces'] = sorted(boot_interfaces) env['IronicEnabledManagementInterfaces'] = sorted(mgmt_interfaces) + env['IronicEnabledPowerInterfaces'] = sorted(power_interfaces) env['IronicEnabledRaidInterfaces'] = sorted(raid_interfaces) env['IronicEnabledVendorInterfaces'] = sorted(vendor_interfaces) - # The snmp hardware type uses fake management and snmp power - if 'snmp' in enabled_hardware_types: - mgmt_interfaces.add('snmp') - env['IronicEnabledPowerInterfaces'] = sorted(mgmt_interfaces) - def _process_ipa_args(conf, env): """Populate the environment with IPA kernal args ."""