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

[Xen-devel] [OSSTEST PATCH 12/17] toolstack: Provide guest_create_paused



Only for xl (and xm) for now.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 Osstest/TestSupport.pm  |  9 ++++++++-
 Osstest/Toolstack/xl.pm | 14 +++++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index c843902..2e0e892 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -119,7 +119,7 @@ BEGIN {
                      guest_check_remus_ok guest_editconfig
                       guest_prepare_disk guest_unprepare_disk
                       host_involves_pcipassthrough host_get_pcipassthrough_devs
-                      toolstack guest_create
+                      toolstack guest_create guest_create_paused
 
                       await_webspace_fetch_byleaf create_webfile
                       file_link_contents get_timeout
@@ -1702,6 +1702,13 @@ sub guest_create ($) {
     toolstack($ho,$gho)->create($gho);
 }
 
+sub guest_create_paused ($) {
+    my ($gho) = @_;
+    my $ho = $gho->{Host};
+    guest_prepare_disk($gho);
+    toolstack($ho,$gho)->create_paused($gho);
+}
+
 sub guest_prepare_disk ($) {
     my ($gho) = @_;
 
diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm
index e179217..d3e3b0c 100644
--- a/Osstest/Toolstack/xl.pm
+++ b/Osstest/Toolstack/xl.pm
@@ -40,10 +40,22 @@ sub destroy ($$) {
     target_cmd_root($self->{Host}, $self->{_Command}." destroy $gn", 40);
 }
 
+sub _create ($$$) {
+    my ($self,$gho,$options) = @_;
+    my $cfg = $gho->{CfgPath};
+    target_cmd_root($self->{Host},
+                   $self->{_VerboseCommand}." create $options $cfg", 100);
+}
+
 sub create ($$) {
     my ($self,$gho) = @_;
+    return $self->_create($gho,'');
+}
+
+sub create_paused ($$) {
+    my ($self,$gho) = @_;
+    return $self->_create($gho,'-p');
     my $cfg = $gho->{CfgPath};
-    target_cmd_root($self->{Host}, $self->{_VerboseCommand}." create $cfg", 
100);
 }
 
 sub consolecmd ($$) {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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