From e074eb1470a9a93860f06ae56e89b4752fab6343 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 17 Apr 2025 15:56:21 -0400 Subject: [PATCH] Prefer pkg_version Use the pkg_version where available, it seems to match more. Change-Id: Ib419539adff86334454bca838a970691604fc104 --- pyghmi/ipmi/oem/lenovo/imm.py | 4 +++- pyghmi/redfish/oem/lenovo/xcc.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 5acf6261..39f6fb91 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -617,7 +617,9 @@ class IMMClient(object): skipkeys.add(fwi['key']) if fwi.get('fw_status', 0) == 2: bdata = {} - if 'fw_version_pend' in fwi: + if 'fw_pkg_version' in fwi and fwi['fw_pkg_version']: + bdata['version'] = fwi['fw_pkg_version'] + elif 'fw_version_pend' in fwi: bdata['version'] = fwi['fw_version_pend'] yield '{0} Pending Update'.format(aname), bdata for fwi in fwu.get('items', []): diff --git a/pyghmi/redfish/oem/lenovo/xcc.py b/pyghmi/redfish/oem/lenovo/xcc.py index 73304c18..03f04d83 100644 --- a/pyghmi/redfish/oem/lenovo/xcc.py +++ b/pyghmi/redfish/oem/lenovo/xcc.py @@ -660,7 +660,9 @@ class OEMHandler(generic.OEMHandler): skipkeys.add(fwi['key']) if fwi.get('fw_status', 0) == 2: bdata = {} - if 'fw_version_pend' in fwi: + if 'fw_pkg_version' in fwi and fwi['fw_pkg_version']: + bdata['version'] = fwi['fw_pkg_version'] + elif 'fw_version_pend' in fwi: bdata['version'] = fwi['fw_version_pend'] yield '{0} Pending Update'.format(aname), bdata for fwi in fdata.get('items', []):