2
0
mirror of https://opendev.org/x/pyghmi synced 2026-01-10 18:22:32 +00:00

Add pending FPGA version information for XCC3

When an FPGA is waiting, use OEM API call
to get the additional data.

Change-Id: I942694f109ebab7e51c3b33c885de16696b1ef8c
This commit is contained in:
Jarrod Johnson
2025-04-11 15:33:23 -04:00
parent 0a4201829a
commit e87d8e334b

View File

@@ -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()