diff mbox

[Xen-devel,RFC,OSSTEST,5/9] TestSupport: guest_create takes a $ho.

Message ID 1403018809-25509-5-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell June 17, 2014, 3:26 p.m. UTC
Add looks up the toolstack from it.

This is now consistent with guest_destroy.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 Osstest/TestSupport.pm | 5 +++--
 ts-debian-hvm-install  | 7 ++-----
 ts-redhat-install      | 7 ++-----
 3 files changed, 7 insertions(+), 12 deletions(-)
diff mbox

Patch

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 11a036f..1444629 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1278,8 +1278,9 @@  sub guest_destroy ($$) {
 }
 
 sub guest_create ($$) {
-    my ($gho,$toolstack) = @_;
-    target_cmd_root($gho->{Host}, "$toolstack create $gho->{CfgPath}", 100);
+    my ($ho,$gho) = @_;
+    my $ts= toolstack($ho);
+    target_cmd_root($ho, $ts->{Command}." create $gho->{CfgPath}", 100);
 }
 
 
diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index 0148eef..f274630 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -41,9 +41,6 @@  our $disk_mb= 10000;
 our $guesthost= "$gn.guest.osstest";
 our $gho;
 
-our $toolstack= toolstack($ho)->{Command};
-
-
 sub preseed () {
 
     my $preseed_file = preseed_base('wheezy','',());
@@ -183,7 +180,7 @@  logm("Host has $host_freemem_mb MB free memory, setting guest memory size to $ra
 
 if (!$stage) {
     prep();
-    guest_create($gho,$toolstack);
+    guest_create($ho,$gho);
 } else {
     $gho= selectguest($gn,$gho);
 }
@@ -193,6 +190,6 @@  if ($stage<2) {
 }
 
 guest_editconfig_nocd($gho,$emptyiso);
-guest_create($gho,$toolstack);
+guest_create($ho,$gho);
 guest_await_dhcp_tcp($gho,300);
 guest_check_up($gho);
diff --git a/ts-redhat-install b/ts-redhat-install
index a0b1fab..0b4ee17 100755
--- a/ts-redhat-install
+++ b/ts-redhat-install
@@ -37,9 +37,6 @@  our $disk_mb= 50000;
 our $guesthost= "$gn.guest.osstest";
 our $gho;
 
-our $xl= toolstack($ho)->{Command};
-
-
 sub kickstart () {
     my $cryptpw= '$6$anjRJmBbJcrNJGWN$rqvGUhu8ITjvErdIA5C//w2R6b/6wAjHbaF7XF8u3lZg1XI3StthPIE6UII08scOFwASMOepCGpgtsYeCpjqb.';
     my $authkeys= authorized_keys();
@@ -152,7 +149,7 @@  sub prep () {
 
 if (!$stage) {
     prep();
-    guest_create($gho,$xl);
+    guest_create($ho,$gho);
 } else {
     $gho= selectguest($gn,$gho);
 }
@@ -162,6 +159,6 @@  if ($stage<2) {
 }
 
 guest_editconfig_nocd($gho,$emptyiso);
-guest_create($gho,$xl);
+guest_create($ho,$gho);
 guest_await_dhcp_tcp($gho,300);
 guest_check_up($gho);