From 056bd21394b8d59523e019a839ae210647487f39 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 10 Apr 2025 08:44:14 -0400 Subject: [PATCH] Make a copy of changeset before fixup If a retry occurs, the post-fixup changeset may fail the validity checks, which are based on displayname rather than name. Make the underlying function make a dedicated copy before modification. Change-Id: I9ead92a90dc102788f7e55945148405dda3d9397 --- pyghmi/redfish/oem/generic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyghmi/redfish/oem/generic.py b/pyghmi/redfish/oem/generic.py index 59f376c0..21f4d718 100644 --- a/pyghmi/redfish/oem/generic.py +++ b/pyghmi/redfish/oem/generic.py @@ -13,6 +13,7 @@ # limitations under the License. import base64 +import copy from fnmatch import fnmatch import json import os @@ -573,13 +574,14 @@ class OEMHandler(object): pendingsettings, self.attrdeps, reginfo, fishclient._setbiosurl) - def _set_redfish_settings(self, changeset, fishclient, currsettings, + def _set_redfish_settings(self, inchangeset, fishclient, currsettings, rawsettings, pendingsettings, attrdeps, reginfo, seturl): etag = pendingsettings.get('@odata.etag', None) pendingsettings = pendingsettings.get('Attributes', {}) dephandler = AttrDependencyHandler(attrdeps, rawsettings, pendingsettings) + changeset = copy.deepcopy(inchangeset) for change in list(changeset): if change not in currsettings: found = False