]> git.proxmox.com Git - pve-network.git/commitdiff
fixup IPAMs
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Oct 2020 16:15:30 +0000 (18:15 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Oct 2020 16:15:30 +0000 (18:15 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Network/SDN/Ipams/PVEPlugin.pm

index e10986165c769bfb71f66d5968bb1e919bb4e0b1..3b616954999f546de325376e99bf1cfcd042d724 100644 (file)
@@ -56,7 +56,7 @@ sub del_subnet {
 
        my $db = read_db();
        my $ips = $db->{subnets}->{$cidr}->{ips};
-       die "can't delete subnet, not empty" if keys %{$ips} > 0;
+       die "cannot delete subnet '$cidr', not empty\n" if keys %{$ips} > 0;
        delete $db->{subnets}->{$cidr};
        write_db($db);
     });
@@ -74,7 +74,7 @@ sub add_ip {
        my $db = read_db();
        my $s = $db->{subnets}->{$cidr};
 
-       die "ip already exist" if defined($s->{ips}->{$ip});
+       die "IP '$ip' already exist\n" if defined($s->{ips}->{$ip});
 
        #verify that ip is valid for this subnet
        $s->{ips}->{$ip} = 1;