skip dummy interfaces without ip addresses #181

This commit is contained in:
ricardo.bartels@telekom.de
2022-06-27 16:44:34 +02:00
parent 9cfa9b192e
commit caa70a1aab
2 changed files with 5 additions and 1 deletions

View File

@@ -2414,6 +2414,10 @@ class VMWareHandler(SourceBase):
"enabled": grab(guest_nic, "connected", fallback=False),
}
if len(nic_ips.get(int_full_name, list())) == 0:
log.debug(f"Dummy network interface '{int_full_name}' has no IP addresses assigned. Skipping")
continue
nic_data[int_full_name] = vm_nic_data
# add VM to inventory

View File

@@ -285,7 +285,7 @@ permitted_subnets = 172.16.0.0/12, 10.0.0.0/8, 192.168.0.0/16, fd00::/8
#set_source_name_as_cluster_group = False
# activating this option will also include "dummy/virtual" interfaces which are only visible inside the VM
# and are exposed through VM guest tools.
# and are exposed through VM guest tools. Dummy interfaces without an IP address will be skipped.
#sync_vm_dummy_interfaces = False
# disables syncing of any VLANs visible in vCenter to NetBox