]> git.proxmox.com Git - pve-network.git/blobdiff - PVE/Network/SDN/SubnetPlugin.pm
controllers: evpn : use frr restart if reload fail
[pve-network.git] / PVE / Network / SDN / SubnetPlugin.pm
index 68efeb66654c5b1bd3d74f4fde7d6036825f3907..15b370fb91ce80e9cab368aad42c75dbf314eea7 100644 (file)
@@ -129,10 +129,7 @@ sub on_update_hook {
 
 
     if ($ipam) {
-       my $ipam_cfg = PVE::Network::SDN::Ipams::config();
-       my $plugin_config = $ipam_cfg->{ids}->{$ipam};
-       my $plugin = PVE::Network::SDN::Ipams::Plugin->lookup($plugin_config->{type});
-       $plugin->add_subnet($plugin_config, $subnetid, $subnet);
+       PVE::Network::SDN::Subnets::add_subnet($zone, $subnetid, $subnet);
 
        #don't register gateway for pointopoint
        return if $pointopoint;
@@ -146,7 +143,7 @@ sub on_update_hook {
        }
         if(!$old_gateway || $gateway && $gateway ne $old_gateway) {
            my $hostname = "$vnetid-gw";
-           my $description = "$vnetid gw";
+           my $description = "gateway";
            PVE::Network::SDN::Subnets::add_ip($zone, $subnetid, $subnet, $gateway, $hostname, $mac, $description, 1);
        }