mirror of
https://opendev.org/x/pyghmi
synced 2025-02-20 12:30:48 +00:00
Fallback BootSourceOverrideMode for older systems
Older redfish implementations did not support this request attribute. Try with the attribute and if it fails, just don't try injecting the attribute. Change-Id: I80b2e725822f0de9a6dd12df17b5c7347b094431
This commit is contained in:
parent
33db8cdfeb
commit
775efe6f57
@ -477,6 +477,11 @@ class Command(object):
|
||||
if uefiboot is not None:
|
||||
uefiboot = 'UEFI' if uefiboot else 'Legacy'
|
||||
payload['BootSourceOverrideMode'] = uefiboot
|
||||
try:
|
||||
self._do_web_request(self.sysurl, payload, method='PATCH')
|
||||
return {'bootdev': reqbootdev}
|
||||
except Exception:
|
||||
del payload['BootSourceOverrideMode']
|
||||
self._do_web_request(self.sysurl, payload, method='PATCH')
|
||||
return {'bootdev': reqbootdev}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user