]> git.puffer.fish Git - matthieu/pve-network.git/commit
ipam: netbox: implement deleting subnets
authorStefan Hanreich <s.hanreich@proxmox.com>
Mon, 10 Mar 2025 08:50:57 +0000 (09:50 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 7 Apr 2025 15:43:33 +0000 (17:43 +0200)
commit449e08a8fb15d2ba21936250af0c228abec8d22c
tree103ec1a9a838fe7d9a220ceaf9804c3bc6950c6f
parentf5a439d194109da893d0376c2833e9dd23f2de46
ipam: netbox: implement deleting subnets

Deleting a subnet did not delete any created entities in Netbox.
Implement deletion of a subnet by deleting all entities that are
created in Netbox upon creation of a subnet.

We are checking for any leftover IP assignments before deleting the
prefix, so we do not accidentally delete any manually created IP
assignments.

This method tries to check for any possible errors before editing the
entities. There is still a small window where external changes can
occur that lead to errors. We are touching multiple entities here, so
in case of errors users have to fix their Netbox instance manually.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
Link: https://lore.proxmox.com/20250310085103.30549-2-s.hanreich@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Network/SDN/Ipams/NetboxPlugin.pm