From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 10/20] standalone: Introduce "HostGroups" for use in OSSTEST_CONFIG Date: Wed, 29 Oct 2014 16:34:14 +0000 Message-ID: <1414600454.29580.15.camel@citrix.com> References: <1414579268.29975.13.camel@citrix.com> <1414579302-6692-10-git-send-email-ian.campbell@citrix.com> <21585.5160.869636.705987@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21585.5160.869636.705987@mariner.uk.xensource.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: Ian Jackson Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-10-29 at 16:22 +0000, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 10/20] standalone: Introduce "HostGroups" for use in OSSTEST_CONFIG"): > > This saves repeating identical HostProp and HostFlags for sets of identical > > machines. e.g. > > Thanks. > > > - # First, we use the config file's general properites as defaults > > + # First, set the prop group if any. > > + foreach my $k (keys %c) { > > + next unless $k =~ m/^HostGroup_([-a-z0-9]+)$/; > > + next unless $1 eq $name; > > Am I being dim or could this loop be replaced with a single lookup of > $c{"HostGroup_${name}"} ? Uh, no, I think it was me who was being dim. > Apart from that this looks fine to me. Thanks. Ian.