From b14b0487a806205ae478019a5ce037b9d7c73519 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 10 Sep 2019 14:28:24 -0400 Subject: [PATCH] Add etag to set_system_configuration Some implementations require an etag here as well. Change-Id: I821305d63fad52c78c27872f129bbafb601a90f3 --- pyghmi/redfish/command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyghmi/redfish/command.py b/pyghmi/redfish/command.py index 6c94045d..9aa18aa1 100644 --- a/pyghmi/redfish/command.py +++ b/pyghmi/redfish/command.py @@ -957,6 +957,7 @@ class Command(object): rawsettings = self._do_web_request(self._biosurl, cache=False) rawsettings = rawsettings.get('Attributes', {}) pendingsettings = self._do_web_request(self._setbiosurl) + etag = pendingsettings.get('@odata.etag', None) pendingsettings = pendingsettings.get('Attributes', {}) dephandler = AttrDependencyHandler(self.attrdeps, rawsettings, pendingsettings) for change in list(changeset): @@ -1007,7 +1008,8 @@ class Command(object): if regentry.get('Type', None) == 'Integer': changeset[change] = int(changeset[change]) redfishsettings = {'Attributes': changeset} - self._do_web_request(self._setbiosurl, redfishsettings, 'PATCH') + self._do_web_request(self._setbiosurl, redfishsettings, 'PATCH', + etag=etag) def set_net_configuration(self, ipv4_address=None, ipv4_configuration=None, ipv4_gateway=None):