From 8ac1385f3cab7e579a89f902fef2d8a676a61e14 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 2 Jun 2016 14:06:26 -0400 Subject: [PATCH] Correct firmware inventory issue on IBM M4 servers Older IMM systems have a slightly different structure. Tolerate by skipping the extended storage data when not available. Change-Id: Ifc5b9de0e87ceb648c3045b357af434b9e8288e5 --- pyghmi/ipmi/oem/lenovo/imm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 80b22ec1..4b31d2e4 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -157,6 +157,8 @@ def fetch_agentless_firmware(ipmicmd, certverify): storagedata, _monotonic_time()) if storagedata and 'items' in storagedata: for adp in storagedata['items']: + if 'storage.vpd.productName' not in adp: + continue adpname = adp['storage.vpd.productName'] if 'children' not in adp: adp['children'] = ()