Skip to content

Commit 16c3b85

Browse files
Fix for #17
1 parent f95c837 commit 16c3b85

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

input_module_intersight.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,12 @@ def write_splunk(index, source, sourcetype, data):
495495
data['Cluster'] = pop(['ClassId', 'link'], data['Cluster'])
496496
data['PhysicalServer'] = pop(
497497
['ClassId', 'link'], data['PhysicalServer'])
498-
for i in range(0, len(data['Drives'])):
499-
data['Drives'][i] = pop(
500-
['Ancestors', 'LocatorLed', 'Node', 'Owners', 'Parent', 'PermissionResources'], data['Drives'][i])
498+
if data['Drives'] == None:
499+
helper.log_warning(f"{s} | Hyperflex host {data['Moid']} has no list of drives")
500+
else:
501+
for i in range(0, len(data['Drives'])):
502+
data['Drives'][i] = pop(
503+
['Ancestors', 'LocatorLed', 'Node', 'Owners', 'Parent', 'PermissionResources'], data['Drives'][i])
501504
write_splunk(index, account_name,
502505
'cisco:intersight:hyperflexNodes', data)
503506

0 commit comments

Comments
 (0)