]> git.puffer.fish Git - mirror/pve-network.git/commit
partial fix #5496: ipam: netbox: create / delete ip ranges for dhcp
authorStefan Hanreich <s.hanreich@proxmox.com>
Mon, 10 Mar 2025 08:51:02 +0000 (09:51 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 7 Apr 2025 15:43:51 +0000 (17:43 +0200)
commita52a40c78b82e0646c60a28fc9919336a2cb1290
tree94b91220a44e5074d0cc79a3b01e5d2507cb48ab
parentf36174e0722d82ea5473c17c3d901e30899fcb7b
partial fix #5496: ipam: netbox: create / delete ip ranges for dhcp

We use the IP ranges of netbox to represent the dhcp ranges. We were
already querying the IP ranges for a IP when starting a guest, but we
never created the IP ranges in the first place. Additionally implement
deleting the IP ranges when the subnet gets deleted.

These methods try 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-7-s.hanreich@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Network/SDN/Ipams/NetboxPlugin.pm