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

[Xen-devel] [PATCH OSSTEST 01/12] toolstack: save / restore check



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest/Toolstack/libvirt.pm | 9 +++++++++
 Osstest/Toolstack/xend.pm    | 3 +++
 Osstest/Toolstack/xl.pm      | 9 +++++++++
 3 files changed, 21 insertions(+)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index 8bd7f4f..acb801c 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -69,6 +69,15 @@ sub migrate_check ($) {
     die "Migration check is not yet supported on libvirt.";
 }
 
+sub saverestore_check ($) {
+    my ($self) = @_;
+    my $ho = $self->{Host};
+    my $help = target_cmd_output_root($ho, "virsh help");
+    my $rc = ($help =~ m/^\s*save/m) ? 0 : 1;
+    logm("rc=$rc");
+    return $rc;
+}
+
 sub migrate ($) {
     my ($self,$gho,$dst,$timeout) = @_;
     die "Migration is not yet supported on libvirt.";
diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm
index 1d5d059..ad98e65 100644
--- a/Osstest/Toolstack/xend.pm
+++ b/Osstest/Toolstack/xend.pm
@@ -37,4 +37,7 @@ sub new {
 # xend always supported migration
 sub migrate_check ($) { return 0; }
 
+# xend always supported save / restore
+sub saverestore_check ($) { return 0; }
+
 1;
diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm
index 71aefd5..b124273 100644
--- a/Osstest/Toolstack/xl.pm
+++ b/Osstest/Toolstack/xl.pm
@@ -67,6 +67,15 @@ sub migrate_check ($) {
     return $rc;
 }
 
+sub saverestore_check ($) {
+    my ($self) = @_;
+    my $ho = $self->{Host};
+    my $help = target_cmd_output_root($ho, $self->{_Command}." help");
+    my $rc = ($help =~ m/^\s*save/m) ? 0 : 1;
+    logm("rc=$rc");
+    return $rc;
+}
+
 sub migrate ($$$$) {
     my ($self,$gho,$dho,$timeout) = @_;
     my $sho = $self->{Host};
-- 
1.9.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®.