mirror of
https://opendev.org/x/pyghmi
synced 2026-06-15 08:10:46 +00:00
Fix bootsourceoverridemode
There were mistakes in specifying it, putting it at the wrong level. Also, for implementation fussy about etag, it failed for that too. For most implementations, this didn't matter as the default behavior matched the expectations, but some implementations struggled. Change-Id: Ieb7082efb4027d5deee08338c107b01caacd5b19
This commit is contained in:
@@ -746,13 +746,13 @@ class OEMHandler(object):
|
||||
}}
|
||||
if uefiboot is not None:
|
||||
uefiboot = 'UEFI' if uefiboot else 'Legacy'
|
||||
payload['BootSourceOverrideMode'] = uefiboot
|
||||
payload['Boot']['BootSourceOverrideMode'] = uefiboot
|
||||
try:
|
||||
fishclient._do_web_request(self.sysurl, payload,
|
||||
method='PATCH')
|
||||
fishclient._do_web_request(fishclient.sysurl, payload,
|
||||
method='PATCH', etag='*')
|
||||
return {'bootdev': reqbootdev}
|
||||
except Exception:
|
||||
del payload['BootSourceOverrideMode']
|
||||
del payload['Boot']['BootSourceOverrideMode']
|
||||
#thetag = fishclient.sysinfo.get('@odata.etag', None)
|
||||
fishclient._do_web_request(fishclient.sysurl, payload, method='PATCH',
|
||||
etag='*') # thetag)
|
||||
|
||||
Reference in New Issue
Block a user