]> git.proxmox.com Git - pve-network.git/commitdiff
dhcp: regenerate config for DHCP plugins on applying configuration
authorStefan Hanreich <s.hanreich@proxmox.com>
Fri, 17 Nov 2023 11:39:51 +0000 (12:39 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 18 Nov 2023 14:59:50 +0000 (15:59 +0100)
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
src/PVE/Network/SDN.pm

index 057034fbc1a811af7b2103d1faecf71b01444a7e..c306527236c23aabffca9796b91a2cd5f1fe63d8 100644 (file)
@@ -12,6 +12,7 @@ use PVE::Network::SDN::Vnets;
 use PVE::Network::SDN::Zones;
 use PVE::Network::SDN::Controllers;
 use PVE::Network::SDN::Subnets;
+use PVE::Network::SDN::Dhcp;
 
 use PVE::Tools qw(extract_param dir_glob_regex run_command);
 use PVE::Cluster qw(cfs_read_file cfs_write_file cfs_lock_file);
@@ -155,7 +156,7 @@ sub commit_config {
     my $controllers = { ids => $controllers_cfg->{ids} };
     my $subnets = { ids => $subnets_cfg->{ids} };
 
-     $cfg = { version => $version, vnets => $vnets, zones => $zones, controllers => $controllers, subnets => $subnets };
+    $cfg = { version => $version, vnets => $vnets, zones => $zones, controllers => $controllers, subnets => $subnets };
 
     cfs_write_file($running_cfg, $cfg);
 }
@@ -231,6 +232,12 @@ sub generate_controller_config {
     PVE::Network::SDN::Controllers::reload_controller() if $reload;
 }
 
+sub generate_dhcp_config {
+    my ($reload) = @_;
+
+    PVE::Network::SDN::Dhcp::regenerate_config($reload);
+}
+
 sub encode_value {
     my ($type, $key, $value) = @_;