@@ -60,4 +60,9 @@ sub consolecmd ($$) {
return "virsh console $gn";
}
+sub shutdown_wait ($$) {
+ my ($self,$gn) = @_;
+ die "libvirt shutdown wait not implemented yet."
+}
+
1;
@@ -37,6 +37,7 @@ sub new {
sub destroy { return Osstest::Toolstack::xl::destroy(@_); }
sub create { return Osstest::Toolstack::xl::create(@_); }
sub consolecmd { return Osstest::Toolstack::xl::consolecmd(@_); }
+sub shutdown_wait { return Osstest::Toolstack::xl::consolecmd(@_); }
sub migrate_check ($) {
my ($self) = @_;
@@ -56,4 +56,10 @@ sub consolecmd ($$) {
return $self->{_Command}." console $gho->{Name}";
}
+sub shutdown_wait ($$) {
+ my ($self,$gn) = @_;
+ my $ho = $self->{Host};
+ target_cmd_root($ho,"$self->{_Command} shutdown -w $gn", 200);
+}
+
1;
@@ -26,10 +26,7 @@ our ($ho,$gho) = ts_get_host_guest(@ARGV);
sub stop () {
guest_checkrunning($ho, $gho) or die "$gho->{Name} not running";
- target_cmd_root($ho,
- toolstack($ho)->{Command}
- ." shutdown -w "
- .$gho->{Name}, 200);
+ toolstack($ho)->shutdown_wait($gho->{Name});
guest_checkrunning($ho, $gho) and die $gho->{Name};
}
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- Osstest/Toolstack/libvirt.pm | 5 +++++ Osstest/Toolstack/xend.pm | 1 + Osstest/Toolstack/xl.pm | 6 ++++++ ts-guest-stop | 5 +---- 4 files changed, 13 insertions(+), 4 deletions(-)