diff options
Diffstat (limited to 'PVE/API2/Network')
| -rw-r--r-- | PVE/API2/Network/SDN.pm | 15 | ||||
| -rw-r--r-- | PVE/API2/Network/SDN/Controllers.pm | 22 | ||||
| -rw-r--r-- | PVE/API2/Network/SDN/Vnets.pm | 22 | ||||
| -rw-r--r-- | PVE/API2/Network/SDN/Zones.pm | 22 |
4 files changed, 0 insertions, 81 deletions
diff --git a/PVE/API2/Network/SDN.pm b/PVE/API2/Network/SDN.pm index 65c8d52..4af2b6f 100644 --- a/PVE/API2/Network/SDN.pm +++ b/PVE/API2/Network/SDN.pm @@ -97,21 +97,6 @@ __PACKAGE__->register_method ({ my $rpcenv = PVE::RPCEnvironment::get(); my $authuser = $rpcenv->get_user(); - if (-e "/etc/pve/sdn/controllers.cfg.new") { - rename("/etc/pve/sdn/controllers.cfg.new", "/etc/pve/sdn/controllers.cfg") - || die "applying sdn/controllers.cfg changes failed - $!\n"; - } - - if (-e "/etc/pve/sdn/zones.cfg.new") { - rename("/etc/pve/sdn/zones.cfg.new", "/etc/pve/sdn/zones.cfg") - || die "applying sdn/zones.cfg changes failed - $!\n"; - } - - if (-e "/etc/pve/sdn/vnets.cfg.new") { - rename("/etc/pve/sdn/vnets.cfg.new", "/etc/pve/sdn/vnets.cfg") - || die "applying sdn/vnets.cfg changes failed - $!\n"; - } - my $code = sub { $rpcenv->{type} = 'priv'; # to start tasks in background PVE::Cluster::check_cfs_quorum(); diff --git a/PVE/API2/Network/SDN/Controllers.pm b/PVE/API2/Network/SDN/Controllers.pm index e16619c..50491eb 100644 --- a/PVE/API2/Network/SDN/Controllers.pm +++ b/PVE/API2/Network/SDN/Controllers.pm @@ -157,28 +157,6 @@ __PACKAGE__->register_method ({ }}); __PACKAGE__->register_method ({ - name => 'revert_configuration', - protected => 1, - path => '', - method => 'DELETE', - description => "Revert sdn controller changes.", - permissions => { - check => ['perm', '/sdn/controllers', ['SDN.Allocate']], - }, - parameters => { - additionalProperties => 0, - }, - returns => { type => 'null' }, - code => sub { - my ($param) = @_; - - die "no sdn controllers changes to revert" if !-e "/etc/pve/sdn/controllers.cfg.new"; - unlink "/etc/pve/sdn/controllers.cfg.new"; - - return undef; - }}); - -__PACKAGE__->register_method ({ name => 'update', protected => 1, path => '{controller}', diff --git a/PVE/API2/Network/SDN/Vnets.pm b/PVE/API2/Network/SDN/Vnets.pm index cef631c..a9561f1 100644 --- a/PVE/API2/Network/SDN/Vnets.pm +++ b/PVE/API2/Network/SDN/Vnets.pm @@ -138,28 +138,6 @@ __PACKAGE__->register_method ({ }}); __PACKAGE__->register_method ({ - name => 'revert_configuration', - protected => 1, - path => '', - method => 'DELETE', - description => "Revert sdn vnet changes.", - permissions => { - check => ['perm', '/sdn/vnets', ['SDN.Allocate']], - }, - parameters => { - additionalProperties => 0, - }, - returns => { type => 'null' }, - code => sub { - my ($param) = @_; - - die "no sdn vnets changes to revert" if !-e "/etc/pve/sdn/vnets.cfg.new"; - unlink "/etc/pve/sdn/vnets.cfg.new"; - - return undef; - }}); - -__PACKAGE__->register_method ({ name => 'update', protected => 1, path => '{vnet}', diff --git a/PVE/API2/Network/SDN/Zones.pm b/PVE/API2/Network/SDN/Zones.pm index 293880a..9ea2189 100644 --- a/PVE/API2/Network/SDN/Zones.pm +++ b/PVE/API2/Network/SDN/Zones.pm @@ -165,28 +165,6 @@ __PACKAGE__->register_method ({ }}); __PACKAGE__->register_method ({ - name => 'revert_configuration', - protected => 1, - path => '', - method => 'DELETE', - description => "Revert sdn zone changes.", - permissions => { - check => ['perm', '/sdn/zones', ['SDN.Allocate']], - }, - parameters => { - additionalProperties => 0, - }, - returns => { type => 'null' }, - code => sub { - my ($param) = @_; - - die "no sdn zones changes to revert" if !-e "/etc/pve/sdn/zones.cfg.new"; - unlink "/etc/pve/sdn/zones.cfg.new"; - - return undef; - }}); - -__PACKAGE__->register_method ({ name => 'update', protected => 1, path => '{zone}', |
