From: Ian Jackson Subject: Re: [PATCH OSSTEST RFC] Osstest/Debian.pm: Use Fqdn hostprop when collecting host keys Date: Fri, 1 May 2015 15:05:15 +0100 Message-ID: <21827.34843.408428.309278@mariner.uk.xensource.com> References: <1430487758-21972-1-git-send-email-ian.campbell@citrix.com> <21827.34001.74893.628888@mariner.uk.xensource.com> <1430488789.15640.39.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1430488789.15640.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: Ian Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [PATCH OSSTEST RFC] Osstest/Debian.pm: Use Fqdn hostprop when collecting host keys"): > That code is: > > my $defaultfqdn = $name; > $defaultfqdn .= ".$c{TestHostDomain}" unless $defaultfqdn =~ m/\./; > $ho->{Fqdn} = get_host_property($ho,'fqdn',$defaultfqdn); > > Perhaps for now I should write: > > my $defaultfqdn = $node; > $defaultfqdn .= ".$c{TestHostDomain}" unless $defaultfqdn =~ m/\./; > > my %props; > $mhostdb->get_properties($node, \%props); > > my $longname= $props{Fqdn} ? $props{Fqdn} : $defaultfqdn; > > ? Sure. Except you probably mean my $longname= $props{Fqdn} // $defaultfqdn; > Mainly becuase here in preseed_create we lack a $ho object I think. Indeed. Ian.