2
0
mirror of https://opendev.org/x/pyghmi synced 2025-08-25 20:40:19 +00:00

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
This commit is contained in:
Jarrod Johnson
2016-06-02 14:06:26 -04:00
parent ab08846805
commit 8ac1385f3c

View File

@@ -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'] = ()