2
0
mirror of https://opendev.org/x/pyghmi synced 2026-05-12 17:34:19 +00:00

Add etag to set_system_configuration

Some implementations require an etag here as well.

Change-Id: I821305d63fad52c78c27872f129bbafb601a90f3
This commit is contained in:
Jarrod Johnson
2019-09-10 14:28:24 -04:00
parent b5dc8a8b9d
commit b14b0487a8
+3 -1
View File
@@ -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):