[[sas2ircu-status] Show disks on all arrays instead of only the last (Closes: #87)

This commit is contained in:
Adam Cecile 2021-08-17 09:48:18 +02:00
parent b2a057b5b9
commit c5fc95451d
1 changed files with 3 additions and 3 deletions

View File

@ -146,8 +146,8 @@ if not nagiosmode:
print("-- Arrays informations --")
print("-- ID | Type | Size | Status")
for ctrl in ctrls:
for array in getArrayList(ctrl[0]):
arraymap[ctrl[0]] = array
arraymap[ctrl[0]]=getArrayList(ctrl[0])
for array in arraymap[ctrl[0]]:
if not array[3] in ["Okay (OKY)", "Inactive, Okay (OKY)"]:
bad = True
nagiosbadarray = nagiosbadarray + 1
@ -164,7 +164,7 @@ if not nagiosmode:
for ctrl in ctrls:
for disk in getDiskList(ctrl[0]):
# Compare disk enc/slot to array's ones
for array in [arraymap.get(ctrl[0])]:
for array in arraymap.get(ctrl[0]):
for arraydisk in array[4]:
if arraydisk == disk[4]:
if not disk[1] == "Optimal (OPT)":