From: "longtao.pang" Subject: [OSSTEST Nested PATCH v8 3/7] Edit some APIs in TestSupport.pm for nested test Date: Mon, 13 Apr 2015 17:19:46 -0400 Message-ID: <1428959990-24199-4-git-send-email-longtaox.pang@intel.com> References: <1428959990-24199-1-git-send-email-longtaox.pang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1428959990-24199-1-git-send-email-longtaox.pang@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: wei.liu2@citrix.com, longtaox.pang@intel.com, Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com, robert.hu@intel.com List-Id: xen-devel@lists.xenproject.org 1. Designate vif model by make-flight. 2. In L2 installation context, its host (L1) IP address is not queried from DNS, but after running "ts-nested-setup + host + nested", L1 IP is stored in runvar. Signed-off-by: longtao.pang --- Changes in v8: Remove the unnecessary symbol of ';' in 'TestSupport.pm'. --- Osstest/TestSupport.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 1bde67d..4cdacfc 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -818,6 +818,10 @@ sub selecthost ($) { logm("Host $name is in HostGroup $ho->{Properties}{HostGroup}"); } + if ( $r{"${name}_ip"} ) { + $setprop->("IpAddr", $r{"${name}_ip"}); + } + # Next, we use the config file's general properites as defaults foreach my $k (keys %c) { next unless $k =~ m/^HostProp_([A-Z].*)$/; @@ -1548,11 +1552,13 @@ sub prepareguest_part_xencfg ($$$$$) { my $oncrash= $xopts->{OnCrash} || 'preserve'; my $vcpus= guest_var($gho, 'vcpus', $xopts->{DefVcpus} || 2); my $xoptcfg= $xopts->{ExtraConfig}; + my $vif= guest_var($gho, 'vifmodel',''); + my $vifmodel= $vif ? "model=$vif" : ''; $xoptcfg='' unless defined $xoptcfg; my $xencfg= <{Ether}' ] +vif = [ 'type=ioemu,${vifmodel},mac=$gho->{Ether}' ] # on_poweroff = '$onpoweroff' on_reboot = '$onreboot' -- 1.7.10.4