summaryrefslogtreecommitdiff
path: root/PVE/API2/Network/SDN/Zones.pm
diff options
context:
space:
mode:
Diffstat (limited to 'PVE/API2/Network/SDN/Zones.pm')
-rw-r--r--PVE/API2/Network/SDN/Zones.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/PVE/API2/Network/SDN/Zones.pm b/PVE/API2/Network/SDN/Zones.pm
index 9ea2189..3201b10 100644
--- a/PVE/API2/Network/SDN/Zones.pm
+++ b/PVE/API2/Network/SDN/Zones.pm
@@ -6,6 +6,7 @@ use warnings;
use PVE::SafeSyslog;
use PVE::Tools qw(extract_param);
use PVE::Cluster qw(cfs_read_file cfs_write_file);
+use PVE::Network::SDN;
use PVE::Network::SDN::Vnets;
use PVE::Network::SDN::Zones;
use PVE::Network::SDN::Zones::Plugin;
@@ -143,7 +144,7 @@ __PACKAGE__->register_method ({
PVE::Cluster::check_cfs_quorum();
mkdir("/etc/pve/sdn");
- PVE::Network::SDN::Zones::lock_sdn_zones_config(
+ PVE::Network::SDN::lock_sdn_config(
sub {
my $zone_cfg = PVE::Network::SDN::Zones::config();
@@ -159,6 +160,8 @@ __PACKAGE__->register_method ({
PVE::Network::SDN::Zones::write_config($zone_cfg);
+ PVE::Network::SDN::increase_version();
+
}, "create sdn zone object failed");
return undef;
@@ -181,7 +184,7 @@ __PACKAGE__->register_method ({
my $id = extract_param($param, 'zone');
my $digest = extract_param($param, 'digest');
- PVE::Network::SDN::Zones::lock_sdn_zones_config(
+ PVE::Network::SDN::lock_sdn_config(
sub {
my $zone_cfg = PVE::Network::SDN::Zones::config();
@@ -202,6 +205,8 @@ __PACKAGE__->register_method ({
PVE::Network::SDN::Zones::write_config($zone_cfg);
+ PVE::Network::SDN::increase_version();
+
}, "update sdn zone object failed");
return undef;
@@ -230,7 +235,7 @@ __PACKAGE__->register_method ({
my $id = extract_param($param, 'zone');
- PVE::Network::SDN::Zones::lock_sdn_zones_config(
+ PVE::Network::SDN::lock_sdn_config(
sub {
my $cfg = PVE::Network::SDN::Zones::config();
@@ -246,6 +251,8 @@ __PACKAGE__->register_method ({
delete $cfg->{ids}->{$id};
PVE::Network::SDN::Zones::write_config($cfg);
+ PVE::Network::SDN::increase_version();
+
}, "delete sdn zone object failed");