From 4bd4b6bb9473550526f172075624c3a7a110ab45 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 3 Nov 2022 16:48:04 +0100 Subject: [PATCH] fix: disk is also virtual if `product` is None Example on QEMU/KVM: ```json {'logicalname': '/dev/vda', 'product': None, 'serial': None, 'version': None, 'size': 10737418240, 'description': 'Virtual I/O device', 'type': 'Virtual I/O device'} ``` --- netbox_agent/inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_agent/inventory.py b/netbox_agent/inventory.py index e19608a..164ecf0 100644 --- a/netbox_agent/inventory.py +++ b/netbox_agent/inventory.py @@ -309,7 +309,7 @@ class Inventory(): description = disk.get('description') size = disk.get('size') product = disk.get('product') - if logicalname in raid_devices or disk_type is None: + if logicalname in raid_devices or disk_type is None or product is None: return True non_raid_disks = [ 'MR9361-8i',