5
0
mirror of git://git.proxmox.com/git/pve-network.git synced 2025-01-09 01:18:06 +03:00

dhcp: regenerate config for DHCP plugins on applying configuration

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
This commit is contained in:
Stefan Hanreich 2023-11-17 12:39:51 +01:00 committed by Thomas Lamprecht
parent 4c89e704aa
commit 7bd6b643d5

View 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) = @_;