From: Anthony PERARD Date: Thu, 7 Dec 2017 12:29:02 +0000 (+0000) Subject: Osstest: Introduce config options for CentOS X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=20a403918e964d172e61497e25046fcb717bec5d;p=people%2Faperard%2Fosstest.git Osstest: Introduce config options for CentOS Signed-off-by: Anthony PERARD --- diff --git a/Osstest.pm b/Osstest.pm index ceb62ca5..b9364295 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -89,6 +89,8 @@ our %c = qw( DebianSuite jessie DebianMirrorSubpath debian + CentosRelease 7 + TestHostKeypairPath id_rsa_osstest HostProp_GenEtherPrefixBase 5e:36:0e:f5 @@ -229,6 +231,9 @@ sub readglobalconfig () { $c{TftpDiBase} ||= "$c{TftpPlayDir}debian-installer"; $c{TftpDiVersion} ||= $c{ "TftpDiVersion_$c{DebianSuite}" } // 'current'; + $c{TftpCentosInstallerBase} ||= "$c{TftpPlayDir}centos-installer"; + $c{TftpCentosInstallerVersion} ||= $c{ "TftpCentosInstallerVersion_$c{CentosRelease}" } // 'current'; + $c{TftpGrubBase} ||= "$c{TftpPlayDir}grub"; $c{TftpGrubVersion} ||= 'current'; diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index c82ba965..e47dfef4 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -95,6 +95,7 @@ BEGIN { sshopts authorized_keys known_hosts cfg_tftp_di_version controller_ipaddr + cfg_tftp_centos_installer_version remote_perl_script_open remote_perl_script_done host_reboot target_reboot target_reboot_hard target_choose_vg target_umount_lv target_await_down @@ -1000,6 +1001,11 @@ sub selecthost ($) { $ho->{DiVersion} = target_var($ho, "di_version") // cfg_tftp_di_version($ho->{Suite}); $ho->{OS} = target_var($ho, "os") // "debian"; + + $ho->{CentosRelease} = target_var($ho, "centos_release") + // $c{CentosRelease}; + $ho->{CentosInstallerVersion} = target_var($ho, "centos_installer_version") + // cfg_tftp_centos_installer_version($ho->{CentosRelease}); } #----- handle hosts which are themselves guests (nested) ----- @@ -1121,6 +1127,7 @@ sub selecthost ($) { $ho->{Tftp}{$_} = $c{"Tftp${_}_${tftpscope}"} || $c{"Tftp${_}"} foreach qw(Path TmpDir PxeDir NetbootGroup PxeTemplates PxeTemplatesReal DiBase GrubBase + CentosInstallerBase NetGrubDir NetGrubTemplates NetGrubTemplatesReal PxeGroup); $ho->{TftpNetbootGroup} //= $ho->{TftpPxeGroup}; # compatibility @@ -2529,6 +2536,13 @@ sub cfg_tftp_di_version ($) { return $c{"TftpDiVersion_$suite"} // $c{TftpDiVersion}; } +sub cfg_tftp_centos_installer_version ($) { + my ($releasever) = @_; + $releasever //= 'x def releasever'; # will not find $c{...} + return $c{"TftpCentosInstallerVersion_$releasever"} + // $c{TftpCentosInstallerVersion}; +} + sub controller_ipaddr () { my $addr = $c{ControllerIpAddress}; return $addr if defined $addr;