Merge branch 'master' into fix/various

This commit is contained in:
Cyril Levis 2022-11-10 15:51:32 +01:00 committed by GitHub
commit bce02a5e7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -309,14 +309,13 @@ class Inventory():
description = disk.get('description')
size = disk.get('size')
product = disk.get('product')
if logicalname in raid_devices or disk_type is None or product is None:
if logicalname in raid_devices or disk_type is None or product is None or description is None:
return True
non_raid_disks = [
'MR9361-8i',
]
if logicalname in raid_devices or \
disk_type is None or \
product in non_raid_disks or \
'virtual' in product.lower() or \
'logical' in product.lower() or \

View file

@ -63,6 +63,8 @@ def _parse_pd_output(lines):
line = line.strip()
if not line or line.startswith('Note:'):
continue
if 'cache' in line or 'reboot' in line:
continue
# Parses the Array the drives are in
if line.startswith('Array'):
current_array = line.split(None, 1)[1]