|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST v2 09/18] Toolstack: Refactor consolecmd handling
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
Osstest/Toolstack/libvirt.pm | 6 ++++++
Osstest/Toolstack/xend.pm | 1 +
Osstest/Toolstack/xl.pm | 6 ++++++
ts-logs-capture | 2 +-
4 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index ea83995..54d2a6d 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -51,4 +51,10 @@ sub create ($$) {
target_cmd_root($ho, "virsh create --file $cfg.xml", 100);
}
+sub consolecmd ($$) {
+ my ($self,$gho) = @_;
+ my $gn = $gho->{Name};
+ return "virsh console $gn";
+}
+
1;
diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm
index c921c20..896d949 100644
--- a/Osstest/Toolstack/xend.pm
+++ b/Osstest/Toolstack/xend.pm
@@ -36,5 +36,6 @@ sub new {
# 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; }
1;
diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm
index 12417ca..4997775 100644
--- a/Osstest/Toolstack/xl.pm
+++ b/Osstest/Toolstack/xl.pm
@@ -45,4 +45,10 @@ sub create ($$) {
target_cmd_root($self->{Host}, $self->{Command}." create $cfg", 100);
}
+sub consolecmd ($$) {
+ my ($self,$gho) = @_;
+ my $gn = $gho->{Name};
+ return $self->{Command}." console $gn";
+}
+
1;
diff --git a/ts-logs-capture b/ts-logs-capture
index 841ad5a..dbca13a 100755
--- a/ts-logs-capture
+++ b/ts-logs-capture
@@ -195,7 +195,7 @@ sub fetch_logs_guest ($) {
logm("cannot find domid: $@");
return;
}
- my $consolecmd= toolstack($ho)->{Command}." console $gho->{Name}";
+ my $consolecmd= toolstack($ho)->consolecmd($gho);
try_cmd_output_save("sleep 1 | $consolecmd | cat",
"guest-$gho->{Name}-console");
--
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 |