2
0
mirror of https://opendev.org/x/pyghmi synced 2026-06-16 08:30:52 +00:00

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
This commit is contained in:
Jarrod Johnson
2025-04-10 08:44:14 -04:00
parent c7aa9ebce6
commit 056bd21394
+3 -1
View File
@@ -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