2
0
mirror of https://opendev.org/x/pyghmi synced 2026-04-12 04:51:28 +00:00

Report ready for more redfish update

Some services do not contain a Health attribute,
try to make do with the ServiceEnabled field.

Change-Id: I85f526dd0a2ebde56059980ca582a2c09de5e42b
This commit is contained in:
Jarrod Johnson
2025-03-19 17:59:54 -04:00
parent b8e6a1f8ae
commit 0cedc68573

View File

@@ -1049,9 +1049,11 @@ class OEMHandler(object):
def get_update_status(self):
upd = self._do_web_request('/redfish/v1/UpdateService')
health = upd.get('Status', {}).get('Health', 'bad')
health = upd.get('Status', {}).get('Health', 'Unknown')
if health == 'OK':
return 'ready'
if health == 'Unknown' and upd.get('ServiceEnabled'):
return 'ready'
return 'unavailable'
def update_firmware(self, filename, data=None, progress=None, bank=None, otherfields=()):