]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
Osstest: Introduce config options for CentOS
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 7 Dec 2017 12:29:02 +0000 (12:29 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Mon, 18 Dec 2017 16:47:18 +0000 (16:47 +0000)
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Osstest.pm
Osstest/TestSupport.pm

index ceb62ca50bc40be5925997edb64a3db8c20d3c80..b9364295b918fe4688bdef27d6558b71f0b269aa 100644 (file)
@@ -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';
 
index c82ba965a5bd5adfc9d840243a791d5d4aac05ea..e47dfef41c3abc4584be8aaa4a0faab48b49d91e 100644 (file)
@@ -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;