]> git.puffer.fish Git - mirror/pve-network.git/commit
ipam: netbox: fix adding vms without a name set in the options
authorStefan Hanreich <s.hanreich@proxmox.com>
Tue, 8 Apr 2025 13:25:17 +0000 (15:25 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 8 Apr 2025 13:33:54 +0000 (15:33 +0200)
commit3ede261b255263ba79a63446305ba0a0f408592c
tree85078c4939e16e8274f7ffbceca6708e508c6498
parent1fd6496b5e462272b61a17207f6f25c5097b63a2
ipam: netbox: fix adding vms without a name set in the options

The hostname provided to the methods in the IPAM plugins is empty for
VMs that do not have a name set. We always included the dns_name key
in the request, even if it was undefined, which leads Netbox to return
a 400 Bad Request error. With this patch we omit the dns_name
parameter if it isn't set, so the call succeeds.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Link: https://lore.proxmox.com/20250408132517.225240-1-s.hanreich@proxmox.com
src/PVE/Network/SDN/Ipams/NetboxPlugin.pm