From 949cf8ea9b597fafe1d617aa0287f00527483bf5 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 26 Feb 2025 15:54:39 -0500 Subject: [PATCH] Catch more core firmware oddities in the firmware version fixup for XCC3 Change-Id: I4846444da464e3fdfc7352eb17bb8fe8ee632b63 --- pyghmi/redfish/oem/lenovo/xcc3.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyghmi/redfish/oem/lenovo/xcc3.py b/pyghmi/redfish/oem/lenovo/xcc3.py index 6529c7cf..77e7b07e 100644 --- a/pyghmi/redfish/oem/lenovo/xcc3.py +++ b/pyghmi/redfish/oem/lenovo/xcc3.py @@ -432,9 +432,11 @@ class OEMHandler(generic.OEMHandler): swid = redres.get('SoftwareId', '') buildid = '' version = redres.get('Version', None) - if swid.startswith('FPGA-') or swid.startswith('UEFI-') or swid.startswith('BMC-'): - buildid = swid.split('-')[1] + version.split('-')[0] - version = '-'.join(version.split('-')[1:]) + for prefix in ['FPGA-', 'UEFI-', 'BMC-', 'LXPM-', 'DRVWN-', 'DRVLN-', 'LXUM']: + if swid.startswith(prefix): + buildid = swid.split('-')[1] + version.split('-')[0] + version = '-'.join(version.split('-')[1:]) + break if version: redres['Version'] = version cres = fishclient._extract_fwinfo(res)