diff --git a/netbox_agent/inventory.py b/netbox_agent/inventory.py index 164ecf0..8e55a4c 100644 --- a/netbox_agent/inventory.py +++ b/netbox_agent/inventory.py @@ -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 \ diff --git a/netbox_agent/raid/hp.py b/netbox_agent/raid/hp.py index c8e0df8..81f2ab9 100644 --- a/netbox_agent/raid/hp.py +++ b/netbox_agent/raid/hp.py @@ -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]