summaryrefslogtreecommitdiff
path: root/PVE/API2/Network/SDN/Vnets.pm
diff options
context:
space:
mode:
Diffstat (limited to 'PVE/API2/Network/SDN/Vnets.pm')
-rw-r--r--PVE/API2/Network/SDN/Vnets.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/PVE/API2/Network/SDN/Vnets.pm b/PVE/API2/Network/SDN/Vnets.pm
index a9561f1..8f70bab 100644
--- a/PVE/API2/Network/SDN/Vnets.pm
+++ b/PVE/API2/Network/SDN/Vnets.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::VnetPlugin;
@@ -116,7 +117,7 @@ __PACKAGE__->register_method ({
PVE::Cluster::check_cfs_quorum();
mkdir("/etc/pve/sdn");
- PVE::Network::SDN::Vnets::lock_sdn_vnets_config(
+ PVE::Network::SDN::lock_sdn_config(
sub {
my $cfg = PVE::Network::SDN::Vnets::config();
@@ -132,6 +133,9 @@ __PACKAGE__->register_method ({
PVE::Network::SDN::Vnets::write_config($cfg);
+ PVE::Network::SDN::increase_version();
+
+
}, "create sdn vnet object failed");
return undef;
@@ -154,7 +158,7 @@ __PACKAGE__->register_method ({
my $id = extract_param($param, 'vnet');
my $digest = extract_param($param, 'digest');
- PVE::Network::SDN::Vnets::lock_sdn_vnets_config(
+ PVE::Network::SDN::lock_sdn_config(
sub {
my $cfg = PVE::Network::SDN::Vnets::config();
@@ -168,6 +172,8 @@ __PACKAGE__->register_method ({
PVE::Network::SDN::Vnets::write_config($cfg);
+ PVE::Network::SDN::increase_version();
+
}, "update sdn vnet object failed");
return undef;
@@ -196,7 +202,7 @@ __PACKAGE__->register_method ({
my $id = extract_param($param, 'vnet');
- PVE::Network::SDN::Vnets::lock_sdn_vnets_config(
+ PVE::Network::SDN::lock_sdn_config(
sub {
my $cfg = PVE::Network::SDN::Vnets::config();
@@ -210,6 +216,8 @@ __PACKAGE__->register_method ({
delete $cfg->{ids}->{$id};
PVE::Network::SDN::Vnets::write_config($cfg);
+ PVE::Network::SDN::increase_version();
+
}, "delete sdn vnet object failed");