[pve-devel] [pve-network 3/5] ipam: phpipam: fix subnet create
Alexandre Derumier
aderumier at odiso.com
Thu Jan 4 17:11:37 CET 2024
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
index 7b3168d..f3f22b5 100644
--- a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
+++ b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm
@@ -51,7 +51,8 @@ sub add_subnet {
my $headers = ['Content-Type' => 'application/json; charset=UTF-8', 'Token' => $token];
#search subnet
- my $internalid = get_prefix_id($url, $cidr, $headers);
+ my $internalid;
+ eval { $internalid = get_prefix_id($url, $cidr, $headers) };
#create subnet
if (!$internalid) {
--
2.39.2
More information about the pve-devel
mailing list