[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST v2 07/18] TestSupport: guest_create takes a $ho.



And looks up the toolstack from it.

This is now consistent with guest_destroy.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 Osstest/TestSupport.pm         | 5 +++--
 ts-debian-hvm-install          | 7 ++-----
 ts-redhat-install              | 7 ++-----
 ts-rumpuserxen-demo-xenstorels | 2 +-
 4 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 3f63273..616f7ed 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1330,8 +1330,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);
diff --git a/ts-rumpuserxen-demo-xenstorels b/ts-rumpuserxen-demo-xenstorels
index 6698848..69a2186 100755
--- a/ts-rumpuserxen-demo-xenstorels
+++ b/ts-rumpuserxen-demo-xenstorels
@@ -40,7 +40,7 @@ sub arrangepreserve () {
 }
 
 sub start () {
-    guest_create($gho,toolstack($ho));
+    guest_create($ho, $gho);
 
     $domid = guest_find_domid($ho, $gho);
 }
-- 
2.1.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.