[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC OSSTEST 8/9] Toolstack: Refactor consolecmd handling
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- Osstest/Toolstack/libvirt.pm | 5 +++++ Osstest/Toolstack/xend.pm | 2 ++ Osstest/Toolstack/xl.pm | 5 +++++ ts-logs-capture | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm index 2dffd09..886e41b 100644 --- a/Osstest/Toolstack/libvirt.pm +++ b/Osstest/Toolstack/libvirt.pm @@ -55,4 +55,9 @@ sub migrate_check ($) { die "libvirt migration not supported yet." } +sub consolecmd ($$) { + my ($self,$gn) = @_; + return "virsh console $gn"; +} + 1; diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm index 934f1a5..b77b4eb 100644 --- a/Osstest/Toolstack/xend.pm +++ b/Osstest/Toolstack/xend.pm @@ -33,8 +33,10 @@ sub new { }, $class; } +# Defer to xl driver for most things sub destroy { return Osstest::Toolstack::xl::destroy(@_); } sub create { return Osstest::Toolstack::xl::create(@_); } +sub consolecmd { return Osstest::Toolstack::xl::consolecmd(@_); } sub migrate_check ($) { my ($self) = @_; diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm index 1c97a9d..9f4f8d1 100644 --- a/Osstest/Toolstack/xl.pm +++ b/Osstest/Toolstack/xl.pm @@ -51,4 +51,9 @@ sub migrate_check ($) { return $rc; } +sub consolecmd ($$) { + my ($self,$gn) = @_; + return $self->{_Command}." console $gho->{Name}"; +} + 1; diff --git a/ts-logs-capture b/ts-logs-capture index 9df5485..5a3b4c4 100755 --- a/ts-logs-capture +++ b/ts-logs-capture @@ -192,7 +192,7 @@ sub fetch_logs_guest ($) { logm("cannot find domid: $@"); return; } - my $consolecmd= toolstack($ho)->{Command}." console $gho->{Name}"; + my $consolecmd= toolstack($ho)->consolecmd($gho->{Name}); try_cmd_output_save("sleep 1 | $consolecmd | cat", "guest-$gho->{Name}-console"); -- 1.9.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |