]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
TestSupport: host_vg_name
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 12 Jun 2018 17:02:12 +0000 (18:02 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Thu, 12 Jul 2018 15:49:19 +0000 (16:49 +0100)
Osstest/TestSupport.pm
ts-host-install

index 970525c395b84ed58baefd191f11b750c862f38f..e9455ca24d08c9e567c42440c66e6a43d280730e 100644 (file)
@@ -144,6 +144,7 @@ BEGIN {
                       host_install_recipe_create
                       host_installer_path
                       host_installcmdline_core
+                      host_vg_name
                       );
     %EXPORT_TAGS = ( );
 
@@ -2967,4 +2968,15 @@ sub host_installcmdline_core ($) {
     }
 }
 
+sub host_vg_name ($) {
+    my ($ho) = @_;
+    if ($ho->{OS} eq "debian") {
+        return \&Osstest::Debian::di_vg_name;
+    } elsif (is_host_redhat_derived($ho)) {
+        return \&Osstest::RedHat::ks_vg_name;
+    } else {
+        die "Unknown OS $ho->{OS}";
+    }
+}
+
 1;
index a38dd96d4c40f037ff7776c77ca58a28b70c57dd..5c8b4206e3452b69fbb50a006a20bc2cf8a27b44 100755 (executable)
@@ -90,7 +90,7 @@ END
 
     await_tcp(get_timeout($ho,'reboot',$timeout{Sshd}), 14,$ho);
 
-    our $vgname = di_vg_name($ho);
+    our $vgname = host_vg_name($ho)->($ho);
 
     if ($ho->{Suite} =~ m/lenny/) {
         target_editfile_root($ho, '/boot/grub/menu.lst', sub {