2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 04:07:48 +00:00

Use etag on setting boot device

Some implementations require etag matching for
setting boot device.

Change-Id: Ie8b86c1687b923f885186226185026f160b154f1
This commit is contained in:
Jarrod Johnson 2019-08-14 16:13:07 -04:00
parent 3c1196e3ae
commit 414baadea2

View File

@ -638,7 +638,8 @@ class Command(object):
return {'bootdev': reqbootdev}
except Exception:
del payload['BootSourceOverrideMode']
self._do_web_request(self.sysurl, payload, method='PATCH')
thetag = self.sysinfo.get('@odata.etag', None)
self._do_web_request(self.sysurl, payload, method='PATCH', etag=thetag)
return {'bootdev': reqbootdev}
@property