From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST Nested PATCH v8 5/7] Add new script to customize nested test configuration Date: Thu, 23 Apr 2015 14:05:01 +0100 Message-ID: <1429794301.12403.53.camel@citrix.com> References: <1428959990-24199-1-git-send-email-longtaox.pang@intel.com> <1428959990-24199-6-git-send-email-longtaox.pang@intel.com> <1429612822.4743.38.camel@citrix.com> <86C3224E41A7434B904EC364302132D80E49862D@SHSMSX101.ccr.corp.intel.com> <1429696614.6604.15.camel@citrix.com> <1429781903.31307.42.camel@localhost> <1429788628.12403.39.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1429788628.12403.39.camel@citrix.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: robert.hu@intel.com Cc: "Ian.Jackson@eu.citrix.com" , "Pang, LongtaoX" , "wei.liu2@citrix.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2015-04-23 at 12:30 +0100, Ian Campbell wrote: > This is the same problem I mentioned above arising from $l1 doing double > duty as both host and guest. There are places in osstest which are > pretty fluid about this (if the object has the approrpaite props you can > use it as either), but it can be a bit confusing for the poor programmer > or reader... > > Perhaps having a > our $l1ho = make_nested_host($l0ho, $l1guest); > construct, which does copies $l1guest and propagates some properties as > above and then using $l1guest + $l1host in the appropriate places only > would help keep things straight? I had a thought here: would it be at all useful to add some light syntax to the idents to help represent the nested scenario in sg-run-jobs and to make select* behave more naturally in these cases? e.g. "l0host:l1guest" as a host ident would, when given to selecthost, return a $ho relating to the nested l1 hypervisor running in the guest with ident l1guest on the physical host with ident l0host. Certain properties of the l0host (such as dhcp-watch-method) would automatically be applied to that host. Along those lines ts_get_host_guest would handle ("l0host:l1guest", "l2guest") by returning a host object for the l1 hypervisor running in l1guest on l0host and a guest object for the l2guest. This falls out basically for free given ts_get_host_guest just calls selecthost. I considered whether a similar syntax for a guest ident, i.e. "l1host:l2guest" would be useful, but given that selectguest already takes the host (in this case that would be l1host) as an argument I couldn't see the need. > (Best to wait for Ian's feedback on this before doing anything, he may > not like it) This is still true of course... Ian.