[pve-devel] [PATCH pve-network] API2: Vnets: fix update

Alexandre Derumier aderumier at odiso.com
Mon Jan 20 12:01:22 CET 2020


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/API2/Network/SDN/Vnets.pm | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/PVE/API2/Network/SDN/Vnets.pm b/PVE/API2/Network/SDN/Vnets.pm
index 80fc3c6..cef631c 100644
--- a/PVE/API2/Network/SDN/Vnets.pm
+++ b/PVE/API2/Network/SDN/Vnets.pm
@@ -183,12 +183,8 @@ __PACKAGE__->register_method ({
 
 	    PVE::SectionConfig::assert_if_modified($cfg, $digest);
 
-	    my $scfg = PVE::Network::SDN::Vnets::sdn_vnets_config($cfg, $id);
 	    my $opts = PVE::Network::SDN::VnetPlugin->check_config($id, $param, 0, 1);
-
-	    foreach my $k (%$opts) {
-		$scfg->{$k} = $opts->{$k};
-	    }
+	    $cfg->{ids}->{$id} = $opts;
 
 	    PVE::Network::SDN::VnetPlugin->on_update_hook($id, $cfg);
 
-- 
2.20.1




More information about the pve-devel mailing list