From 0cedc6857337cd307c10705418f91b45ff5a5296 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 19 Mar 2025 17:59:54 -0400 Subject: [PATCH] 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 --- pyghmi/redfish/oem/generic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyghmi/redfish/oem/generic.py b/pyghmi/redfish/oem/generic.py index 8cb3cc92..46d67ba4 100644 --- a/pyghmi/redfish/oem/generic.py +++ b/pyghmi/redfish/oem/generic.py @@ -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=()):