[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST v2 10/18] Toolstack: Refactor shutdown support
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- Osstest/Toolstack/libvirt.pm | 6 ++++++ Osstest/Toolstack/xend.pm | 1 + Osstest/Toolstack/xl.pm | 7 +++++++ ts-guest-stop | 5 +---- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm index 54d2a6d..d039c06 100644 --- a/Osstest/Toolstack/libvirt.pm +++ b/Osstest/Toolstack/libvirt.pm @@ -57,4 +57,10 @@ sub consolecmd ($$) { return "virsh console $gn"; } +sub shutdown_wait ($$) { + my ($self,$gho) = @_; + my $gn = $gho->{Name}; + die "libvirt shutdown wait not implemented yet." +} + 1; diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm index 896d949..d0e1113 100644 --- a/Osstest/Toolstack/xend.pm +++ b/Osstest/Toolstack/xend.pm @@ -37,5 +37,6 @@ 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::shutdown_wait; } 1; diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm index 4997775..ce2456b 100644 --- a/Osstest/Toolstack/xl.pm +++ b/Osstest/Toolstack/xl.pm @@ -51,4 +51,11 @@ sub consolecmd ($$) { return $self->{Command}." console $gn"; } +sub shutdown_wait ($$) { + my ($self,$gho) = @_; + my $ho = $self->{Host}; + my $gn = $gho->{Name}; + target_cmd_root($ho,"$self->{Command} shutdown -w $gn", 200); +} + 1; diff --git a/ts-guest-stop b/ts-guest-stop index 0e3a863..5a10755 100755 --- a/ts-guest-stop +++ b/ts-guest-stop @@ -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); guest_checkrunning($ho, $gho) and die $gho->{Name}; } -- 2.1.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |