[pve-devel] [PATCH v2 pve-network 3/6] ipam: phpipam: fix subnet create
Alexandre Derumier
aderumier at odiso.com
Tue Feb 13 09:48:55 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