From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST Nested PATCH v8 3/7] Edit some APIs in TestSupport.pm for nested test Date: Wed, 22 Apr 2015 10:48:59 +0100 Message-ID: <1429696139.6604.8.camel@citrix.com> References: <1428959990-24199-1-git-send-email-longtaox.pang@intel.com> <1428959990-24199-4-git-send-email-longtaox.pang@intel.com> <1429611542.4743.22.camel@citrix.com> <21814.17314.479011.970684@mariner.uk.xensource.com> <1429620780.4743.67.camel@citrix.com> <21814.20580.723370.301076@mariner.uk.xensource.com> <1429623708.4743.97.camel@citrix.com> <21814.24305.129814.960644@mariner.uk.xensource.com> <1429627421.4743.119.camel@citrix.com> <86C3224E41A7434B904EC364302132D80E49861C@SHSMSX101.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <86C3224E41A7434B904EC364302132D80E49861C@SHSMSX101.ccr.corp.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: "Pang, LongtaoX" Cc: "wei.liu2@citrix.com" , "Hu, Robert" , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2015-04-22 at 08:25 +0000, Pang, LongtaoX wrote: > > > > -----Original Message----- > > From: Ian Campbell [mailto:ian.campbell@citrix.com] > > Sent: Tuesday, April 21, 2015 10:44 PM > > To: Ian Jackson > > Cc: Pang, LongtaoX; xen-devel@lists.xen.org; wei.liu2@citrix.com; Hu, Robert > > Subject: Re: [OSSTEST Nested PATCH v8 3/7] Edit some APIs in TestSupport.pm for > > nested test > > > > On Tue, 2015-04-21 at 15:30 +0100, Ian Jackson wrote: > > > Ian Campbell writes ("Re: [OSSTEST Nested PATCH v8 3/7] Edit some APIs in > > TestSupport.pm for nested test"): > > > > On Tue, 2015-04-21 at 14:28 +0100, Ian Jackson wrote: > > > > > I'm only objecting to the involvement of the host property machinery. > > > > > > > > I'm afraid I'm not 100% sure I understand, but do you just mean that > > > > longtao should assign to $ho->{Ip} directly within selecthost instead of > > > > using $setprop to set the IpAddr hostprop and therefore indirectly > > > > ->{Ip}? > > > > > > Yes. > > > > > > > IOW the existing code in selecthost which looks up the IpAddr host prop > > > > into $ho->{IpStatic} and then into $ho->{Ip} should prefer the runvar to > > > > the host db if it is set? > > > > > > Yes. > > > > Good. Longtao, do you understand what is needed here? > > > I think I get it, use ${ident} rather than ${name} and assign L1's IP to $ho->{Ip} directly. > The code will be like: > if ( $r{"${ident}_ip"} ) { > $ho->{Ip}= $r{"${ident}_ip"}; > } It will, I think, need to be integrated with the existing assignment to $ho->{Ip} in select host, so something like: if ( $r{"${ident}_ip"} ) { $ho->{Ip}= $r{"${ident}_ip"}; } else { $ho->{Ip}= $ho->{IpStatic}; } or perhaps: $ho->{Ip} = $r{"${ident}_ip"} ? $r{"${ident}_ip"} : $ho->{IpStatic}; Ian.