mirror of
https://github.com/bb-Ricardo/netbox-sync.git
synced 2026-01-21 00:10:25 -06:00
adds device/vm tenant to IP address if undefined
This commit is contained in:
@@ -422,6 +422,10 @@ class SourceBase:
|
||||
"assigned_object_id": interface_object,
|
||||
}
|
||||
|
||||
# grab tenant from device/vm if prefix didn't provide a tenant
|
||||
if possible_ip_tenant is None:
|
||||
possible_ip_tenant = grab(device_object, "data.tenant")
|
||||
|
||||
if not isinstance(this_ip_object, NBIPAddress):
|
||||
log.debug(f"No existing {NBIPAddress.name} object found. Creating a new one.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user