From 89cf1e7f6b5d406632da090a33c75b1b32571a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aija=20Jaunt=C4=93va?= Date: Fri, 5 Nov 2021 05:08:36 -0400 Subject: [PATCH] Update idrac-redfish export configuration step Add to ignore destructive settings during export. User can still put those back during import manually. Depends-On: https://review.opendev.org/c/x/sushy-oem-idrac/+/816815 Change-Id: I7d4c08082cadec399227ee4546e7353ff6bd2ae8 --- doc/source/admin/drivers/idrac.rst | 6 ++++++ driver-requirements.txt | 2 +- ironic/drivers/modules/drac/management.py | 3 ++- ironic/tests/unit/drivers/modules/drac/test_management.py | 2 ++ ...ac-redfish-management-export-conf-9fb17273c4d9a050.yaml | 7 +++++++ 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/update-idrac-redfish-management-export-conf-9fb17273c4d9a050.yaml diff --git a/doc/source/admin/drivers/idrac.rst b/doc/source/admin/drivers/idrac.rst index f987b96a40..494d151a75 100644 --- a/doc/source/admin/drivers/idrac.rst +++ b/doc/source/admin/drivers/idrac.rst @@ -396,6 +396,12 @@ section uses the iDRAC Server Configuration Profile (SCP) and can be edited as necessary if it complies with the SCP. For more information about SCP and its capabilities, see SCP_Reference_Guide_. +.. NOTE:: + iDRAC BMC connection settings are not exported to avoid overwriting these in + another system when using unmodified exported configuration mold in import + step. If need to replicate iDRAC BMC connection settings, then add these + settings manually to configuration mold for import step. + To replicate the system configuration to that of a similar system, perform the following steps: diff --git a/driver-requirements.txt b/driver-requirements.txt index ffcb3e2ab2..5239fe73cc 100644 --- a/driver-requirements.txt +++ b/driver-requirements.txt @@ -17,4 +17,4 @@ ansible>=2.7 python-ibmcclient>=0.2.2,<0.3.0 # Dell EMC iDRAC sushy OEM extension -sushy-oem-idrac>=3.0.1,<4.0.0 +sushy-oem-idrac>=4.0.0,<5.0.0 diff --git a/ironic/drivers/modules/drac/management.py b/ironic/drivers/modules/drac/management.py index f18f5e29e6..a4278731fb 100644 --- a/ironic/drivers/modules/drac/management.py +++ b/ironic/drivers/modules/drac/management.py @@ -396,7 +396,8 @@ class DracRedfishManagement(redfish_management.RedfishManagement): configuration = drac_utils.execute_oem_manager_method( task, 'export system configuration', - lambda m: m.export_system_configuration()) + lambda m: m.export_system_configuration( + include_destructive_fields=False)) if configuration and configuration.status_code == 200: configuration = {"oem": {"interface": "idrac-redfish", diff --git a/ironic/tests/unit/drivers/modules/drac/test_management.py b/ironic/tests/unit/drivers/modules/drac/test_management.py index 3807753ef4..ba6857504a 100644 --- a/ironic/tests/unit/drivers/modules/drac/test_management.py +++ b/ironic/tests/unit/drivers/modules/drac/test_management.py @@ -890,6 +890,8 @@ class DracRedfishManagementTestCase(test_utils.BaseDracTest): mock_get_system.return_value.managers = [fake_manager1, fake_manager2] self.management.export_configuration(task, 'edge') + fake_manager_oem2.export_system_configuration.assert_called_once_with( + include_destructive_fields=False) mock_save_configuration.assert_called_once_with( task, 'edge', diff --git a/releasenotes/notes/update-idrac-redfish-management-export-conf-9fb17273c4d9a050.yaml b/releasenotes/notes/update-idrac-redfish-management-export-conf-9fb17273c4d9a050.yaml new file mode 100644 index 0000000000..a8753e2a74 --- /dev/null +++ b/releasenotes/notes/update-idrac-redfish-management-export-conf-9fb17273c4d9a050.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + Updates ``idrac-redfish`` management interface export configuration step + to not export iDRAC BMC connection settings to avoid overwriting those + in another system when using unmodified configuration mold in import step. + For import step it is still possible to add these settings back manually.