[pve-devel] [PATCH pve-manager 2/2] api2: network reload : generate local sdn config
Alexandre Derumier
aderumier at odiso.com
Fri Jun 21 15:54:59 CEST 2019
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/API2/Network.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index 00337fe2..974054a6 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -12,6 +12,7 @@ use PVE::RESTHandler;
use PVE::RPCEnvironment;
use PVE::JSONSchema qw(get_standard_option);
use PVE::AccessControl;
+use PVE::Network::SDN;
use IO::File;
use base qw(PVE::RESTHandler);
@@ -547,6 +548,9 @@ __PACKAGE__->register_method({
rename($new_config_file, $current_config_file) if -e $new_config_file;
+ my $rawconfig = PVE::Network::SDN::generate_etc_network_config();
+ PVE::Network::SDN::write_etc_network_config($rawconfig);
+
my $cmd = ['ifreload', '-a'];
my $err = sub {
--
2.20.1
More information about the pve-devel
mailing list