[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 3/6] TestSupport: Provide controller_ipaddr
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- Osstest/TestSupport.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index ce9ffaa..8f8013e 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -92,7 +92,7 @@ BEGIN { git_massage_url sshopts authorized_keys - cfg_tftp_di_version + cfg_tftp_di_version controller_ipaddr remote_perl_script_open remote_perl_script_done host_reboot target_reboot target_reboot_hard target_choose_vg target_umount_lv target_await_down @@ -2401,6 +2401,15 @@ sub cfg_tftp_di_version ($) { return $c{"TftpDiVersion_$suite"} // $c{TftpDiVersion}; } +sub controller_ipaddr () { + my $addr = $c{ControllerIpAddress}; + return $addr if defined $addr; + $?=$!=0; my $hn = `hostname -f` // die "$? $!"; + chomp $hn; + my $ip = gethostbyname($hn) // die "$hn ?"; + return inet_ntoa($ip); +} + #---------- webspace for installer ---------- sub await_webspace_fetch_byleaf ($$$$$) { -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |