@@ -50,4 +50,9 @@ sub create ($$) {
target_cmd_root($ho, "virsh create --file $cfg.xml", 100);
}
+sub migrate_check ($) {
+ my ($self) = @_;
+ die "libvirt migration not supported yet."
+}
+
1;
@@ -36,4 +36,9 @@ sub new {
sub destroy { return Osstest::Toolstack::xl::destroy(@_); }
sub create { return Osstest::Toolstack::xl::create(@_); }
+sub migrate_check ($) {
+ my ($self) = @_;
+ return 0;
+}
+
1;
@@ -42,4 +42,13 @@ sub create ($$) {
target_cmd_root($self->{Host}, $self->{_Command}." create $cfg", 100);
}
+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;
@@ -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());
Not implemented for libvirt (the check that is) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- Osstest/Toolstack/libvirt.pm | 5 +++++ Osstest/Toolstack/xend.pm | 5 +++++ Osstest/Toolstack/xl.pm | 9 +++++++++ ts-migrate-support-check | 10 +--------- 4 files changed, 20 insertions(+), 9 deletions(-)