|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 12/19] Toolstack: Refactor migration support check.
Not implemented for libvirt (the check itself that is, the hook is
present).
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
Osstest/Toolstack/libvirt.pm | 5 +++++
Osstest/Toolstack/xend.pm | 3 +++
Osstest/Toolstack/xl.pm | 9 +++++++++
ts-migrate-support-check | 10 +---------
4 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index 7f4180e..b74c8cb 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -63,4 +63,9 @@ sub shutdown_wait ($$$) {
die "libvirt shutdown wait not implemented yet."
}
+sub migrate_check ($) {
+ my ($self) = @_;
+ die "Migration check is not yet supported on libvirt.";
+}
+
1;
diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm
index 720bcc8..8e77a05 100644
--- a/Osstest/Toolstack/xend.pm
+++ b/Osstest/Toolstack/xend.pm
@@ -35,4 +35,7 @@ sub new {
}, $class;
}
+# xend always supported migration
+sub migrate_check ($) { return 0; }
+
1;
diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm
index f0c15fb..dcf3b08 100644
--- a/Osstest/Toolstack/xl.pm
+++ b/Osstest/Toolstack/xl.pm
@@ -58,4 +58,13 @@ sub shutdown_wait ($$$) {
target_cmd_root($ho,"$self->{Command} shutdown -w $gn", $timeout);
}
+sub migrate_check ($) {
+ my ($self) = @_;
+ my $ho = $self->{Host};
+ my $help = target_cmd_output_root($ho, $self->{Command}." help");
+ my $rc = ($help =~ m/^\s*migrate/m) ? 0 : 1;
+ logm("rc=$rc");
+ return $rc;
+}
+
1;
diff --git a/ts-migrate-support-check b/ts-migrate-support-check
index c70b77a..cd41f68 100755
--- a/ts-migrate-support-check
+++ b/ts-migrate-support-check
@@ -24,12 +24,4 @@ tsreadconfig();
our $ho = selecthost($ARGV[0]);
-# all xend/xm platforms support migration
-exit(0) if toolstack($ho)->{Command} eq "xm";
-
-my $help = target_cmd_output_root($ho, toolstack($ho)->{Command}." help");
-
-my $rc = ($help =~ m/^\s*migrate/m) ? 0 : 1;
-
-logm("rc=$rc");
-exit($rc);
+exit(toolstack($ho)->migrate_check());
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |