mirror of
https://github.com/bb-Ricardo/netbox-sync.git
synced 2026-01-27 11:30:22 -06:00
skip dummy interfaces without ip addresses #181
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user