From e87d8e334b733cd3c9f510bcedee4ea15948bfdd Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 11 Apr 2025 15:33:23 -0400 Subject: [PATCH] Add pending FPGA version information for XCC3 When an FPGA is waiting, use OEM API call to get the additional data. Change-Id: I942694f109ebab7e51c3b33c885de16696b1ef8c --- pyghmi/redfish/oem/lenovo/xcc3.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyghmi/redfish/oem/lenovo/xcc3.py b/pyghmi/redfish/oem/lenovo/xcc3.py index de85ed85..9be59eda 100644 --- a/pyghmi/redfish/oem/lenovo/xcc3.py +++ b/pyghmi/redfish/oem/lenovo/xcc3.py @@ -430,6 +430,13 @@ class OEMHandler(generic.OEMHandler): progress({'phase': 'complete'}) def get_firmware_inventory(self, components, fishclient): + sfs = fishclient._do_web_request('/api/providers/system_firmware_status') + pendingscm = sfs.get('fpga_scm_pending_build', None) + pendinghpm = sfs.get('fpga_hpm_pending_build', None) + if pendingscm == '*': + pendingscm = None + if pendinghpm == '*': + pendinghpm = None fwlist = fishclient._do_web_request(fishclient._fwinventory + '?$expand=.') fwlist = copy.deepcopy(fwlist.get('Members', [])) self._fwnamemap = {} @@ -462,6 +469,14 @@ class OEMHandler(generic.OEMHandler): if buildid: cres[1]['build'] = buildid yield cres + if cres[0] == 'SCM-FPGA' and pendingscm: + yield 'SCM-FPGA Pending', { + 'Name': 'SCM-FPGA Pending', + 'build': pendingscm} + elif cres[0] == 'HPM-FPGA' and pendinghpm: + yield 'HPM-FPGA Pending', { + 'Name': 'HPM-FPGA Pending', + 'build': pendinghpm} raise pygexc.BypassGenericBehavior()