do not unassign IP if there's no existing netbox interface
This commit is contained in:
parent
34619da5ab
commit
4ee9325c7e
1 changed files with 13 additions and 12 deletions
|
|
@ -359,6 +359,7 @@ class Network(object):
|
||||||
nic.delete()
|
nic.delete()
|
||||||
|
|
||||||
# delete IP on netbox that are not known on this server
|
# delete IP on netbox that are not known on this server
|
||||||
|
if len(nb_nics):
|
||||||
netbox_ips = nb.ipam.ip_addresses.filter(
|
netbox_ips = nb.ipam.ip_addresses.filter(
|
||||||
interface_id=[x.id for x in nb_nics],
|
interface_id=[x.id for x in nb_nics],
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue