[pve-devel] [PATCH pve-network 3/3] remove $interfaces arg from generate_network_config
Alexandre Derumier
aderumier at odiso.com
Fri Mar 29 00:23:52 CET 2019
and remove verification of existing vlan interface in VlanPlugin.
(we do all verifications later reusing INotify read/write interfaces)
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/Network/VlanPlugin.pm | 4 +---
PVE/Network/VxlanMulticastPlugin.pm | 2 +-
test/generateconfig.pl | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/PVE/Network/VlanPlugin.pm b/PVE/Network/VlanPlugin.pm
index cbeecf6..a349890 100644
--- a/PVE/Network/VlanPlugin.pm
+++ b/PVE/Network/VlanPlugin.pm
@@ -52,7 +52,7 @@ sub options {
# Plugin implementation
sub generate_network_config {
- my ($class, $plugin_config, $zoneid, $vnetid, $vnet, $interfaces, $uplinks) = @_;
+ my ($class, $plugin_config, $zoneid, $vnetid, $vnet, $uplinks) = @_;
my $tag = $vnet->{tag};
my $mtu = $vnet->{mtu};
@@ -74,8 +74,6 @@ sub generate_network_config {
my $iface = $uplinks->{$uplink};
$iface .= ".$tag";
- die "interface $iface already exist in main configuration" if ($interfaces->{iface}->{$iface});
-
my $config = "\n";
$config .= "auto $iface\n";
$config .= "iface $iface inet manual\n";
diff --git a/PVE/Network/VxlanMulticastPlugin.pm b/PVE/Network/VxlanMulticastPlugin.pm
index 1343849..87499d8 100644
--- a/PVE/Network/VxlanMulticastPlugin.pm
+++ b/PVE/Network/VxlanMulticastPlugin.pm
@@ -44,7 +44,7 @@ sub options {
# Plugin implementation
sub generate_network_config {
- my ($class, $plugin_config, $zoneid, $vnetid, $vnet, $interfaces, $uplinks) = @_;
+ my ($class, $plugin_config, $zoneid, $vnetid, $vnet, $uplinks) = @_;
my $tag = $vnet->{tag};
my $mtu = $vnet->{mtu};
diff --git a/test/generateconfig.pl b/test/generateconfig.pl
index 0f96584..3279838 100644
--- a/test/generateconfig.pl
+++ b/test/generateconfig.pl
@@ -51,7 +51,7 @@ sub generate_network_config {
my $plugin_config = $transport_cfg->{ids}->{$zone};
die "zone $zone don't exist" if !defined($plugin_config);
my $plugin = PVE::Network::Plugin->lookup($plugin_config->{type});
- $rawconfig .= $plugin->generate_network_config($plugin_config, $zone, $id, $vnet, $interfaces_config, $uplinks);
+ $rawconfig .= $plugin->generate_network_config($plugin_config, $zone, $id, $vnet, $uplinks);
}
return $rawconfig;
--
2.11.0
More information about the pve-devel
mailing list