From 1df5885368de620dde5c9b49dc7695df4224cde1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Barbeira?= Date: Tue, 28 Apr 2015 13:21:30 +0200 Subject: [PATCH] VLAN integration VLAN integration with openvSwitch. --- bin/xen-create-image | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/xen-create-image b/bin/xen-create-image index 28a9319..f3f7180 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -308,6 +308,9 @@ and EVMS EXAMPLE. Optionally, set a specific vif name for the new instance. + --vlan=1 OpenvSwitch related, optionally you can specify a vlan + where the virtual machine has connectivity. + Mandatory options: @@ -1456,6 +1459,10 @@ sub checkOption check => sub { is_uri($_[0]) }, message => "must be an URI including the protocol\n", }, + vlan => { + check => qr/^([1-9][0-9]{0,2}|10[01][0-9]|102[0-4])$/i, + message => "must be a number between 1 and 1024.\n", + }, ); # Define what argument each option accepts. @@ -1493,6 +1500,7 @@ sub checkOption ip => 'ipv4_or_auto', hash_method => 'hashMethod', apt_proxy => 'uri', + vlan => 'vlan', ); # If given option does not exists in optionsTypes, @@ -1603,6 +1611,7 @@ sub parseCommandLineArguments "nameserver=s", \&checkOption, "vifname=s", \&checkOption, "p2p=s", \&checkOption, + "vlan=s", \&checkOption, # Exclusive # @@ -2768,6 +2777,7 @@ EOF $CONFIG{ 'gateway' } && logprint("Gateway : $CONFIG{'gateway'}\n"); $CONFIG{ 'nameserver' } && logprint("Nameserver : $CONFIG{'nameserver'}\n"); $CONFIG{ 'p2p' } && logprint("Point to Point : $CONFIG{'p2p'}\n"); + $CONFIG{ 'vlan' } && logprint("VLAN : $CONFIG{'vlan'}\n"); print "\n"; }