[pve-devel] [PATCH] renamme vlan option to tag

Derumier Alexandre aderumier at odiso.com
Wed Mar 21 13:58:04 CET 2012


Signed-off-by: Derumier Alexandre <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    8 ++++----
 pve-bridge        |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 0b62d5e..806763f 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -404,7 +404,7 @@ my $nic_model_list_txt = join(' ', sort @$nic_model_list);
 my $netdesc = {
     optional => 1,
     type => 'string', format => 'pve-qm-net',
-    typetext => "MODEL=XX:XX:XX:XX:XX:XX [,bridge=<dev>][,rate=<mbps>][,vlan=<vlanid>]",
+    typetext => "MODEL=XX:XX:XX:XX:XX:XX [,bridge=<dev>][,rate=<mbps>][,tag=<vlanid>]",
     description => <<EODESCR,
 Specify network devices.
 
@@ -1108,8 +1108,8 @@ sub parse_net {
 	    $res->{bridge} = $1;
 	} elsif ($kvp =~ m/^rate=(\d+(\.\d+)?)$/) {
 	    $res->{rate} = $1;
-        } elsif ($kvp =~ m/^vlan=(\d+)$/) {
-            $res->{vlan} = $1;
+        } elsif ($kvp =~ m/^tag=(\d+)$/) {
+            $res->{tag} = $1;
 	} else {
 	    return undef;
 	}
@@ -1128,7 +1128,7 @@ sub print_net {
     $res .= "=$net->{macaddr}" if $net->{macaddr};
     $res .= ",bridge=$net->{bridge}" if $net->{bridge};
     $res .= ",rate=$net->{rate}" if $net->{rate};
-    $res .= ",vlan=$net->{vlan}" if $net->{vlan};
+    $res .= ",vlan=$net->{tag}" if $net->{tag};
 
     return $res;
 }
diff --git a/pve-bridge b/pve-bridge
index faf50fa..73f2b34 100755
--- a/pve-bridge
+++ b/pve-bridge
@@ -63,9 +63,9 @@ if ($net->{rate}) {
 
 }
 
-if ($net->{vlan}) {
+if ($net->{tag}) {
 
-    my $vlan = $net->{vlan};
+    my $vlan = $net->{tag};
     my $bridgevlan = $bridge."v".$vlan;
 
     #check if we have an only one ethX or bondX interface in the bridge
-- 
1.7.2.5




More information about the pve-devel mailing list