diff options
| author | Alexandre Derumier <aderumier@odiso.com> | 2020-10-05 17:08:39 +0200 |
|---|---|---|
| committer | Thomas Lamprecht <t.lamprecht@proxmox.com> | 2020-10-06 17:30:04 +0200 |
| commit | 58a7773adc0b1e48536b9f5cf4d79c9a0ef710c3 (patch) | |
| tree | c9b9b565b5cb30ac5900151a0b28f304ea07a47d /PVE/API2/Network/SDN/Vnets.pm | |
| parent | c33dd81818c4b04119b0dc43cbbf8548c58df047 (diff) | |
vnets: add subnets
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Diffstat (limited to 'PVE/API2/Network/SDN/Vnets.pm')
| -rw-r--r-- | PVE/API2/Network/SDN/Vnets.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/PVE/API2/Network/SDN/Vnets.pm b/PVE/API2/Network/SDN/Vnets.pm index c5860c8..23bc8bb 100644 --- a/PVE/API2/Network/SDN/Vnets.pm +++ b/PVE/API2/Network/SDN/Vnets.pm @@ -11,6 +11,7 @@ use PVE::Network::SDN::Zones; use PVE::Network::SDN::Zones::Plugin; use PVE::Network::SDN::Vnets; use PVE::Network::SDN::VnetPlugin; +use PVE::Network::SDN::Subnets; use Storable qw(dclone); use PVE::JSONSchema qw(get_standard_option); @@ -132,7 +133,9 @@ __PACKAGE__->register_method ({ my $plugin = PVE::Network::SDN::Zones::Plugin->lookup($plugin_config->{type}); $plugin->verify_tag($opts->{tag}); - PVE::Network::SDN::VnetPlugin->on_update_hook($id, $cfg); + my $subnet_cfg = PVE::Network::SDN::Subnets::config(); + + PVE::Network::SDN::VnetPlugin->on_update_hook($id, $cfg, $subnet_cfg); PVE::Network::SDN::Vnets::write_config($cfg); PVE::Network::SDN::increase_version(); @@ -173,7 +176,9 @@ __PACKAGE__->register_method ({ my $plugin = PVE::Network::SDN::Zones::Plugin->lookup($plugin_config->{type}); $plugin->verify_tag($opts->{tag}); - PVE::Network::SDN::VnetPlugin->on_update_hook($id, $cfg); + my $subnet_cfg = PVE::Network::SDN::Subnets::config(); + + PVE::Network::SDN::VnetPlugin->on_update_hook($id, $cfg, $subnet_cfg); PVE::Network::SDN::Vnets::write_config($cfg); PVE::Network::SDN::increase_version(); |
