From 414baadea24626aa6074fb5b58c300bac14f5829 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 14 Aug 2019 16:13:07 -0400 Subject: [PATCH] Use etag on setting boot device Some implementations require etag matching for setting boot device. Change-Id: Ie8b86c1687b923f885186226185026f160b154f1 --- pyghmi/redfish/command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyghmi/redfish/command.py b/pyghmi/redfish/command.py index 082037dc..041f8453 100644 --- a/pyghmi/redfish/command.py +++ b/pyghmi/redfish/command.py @@ -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