[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH OSSTEST v2 16/18] Toolstack: Remove Command field for all toolstacks.



Nothing in generic code uses this now, so remove.

xl+xend retain as _Command for internal use only.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 Osstest/Toolstack/libvirt.pm |  1 -
 Osstest/Toolstack/xend.pm    |  2 +-
 Osstest/Toolstack/xl.pm      | 18 +++++++++---------
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index c18f467..e50238d 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -29,7 +29,6 @@ sub new {
                   NewDaemons => [qw(libvirtd)],
                   Dom0MemFixed => 1,
                   CfgPathVar => 'cfgpath',
-                  Command => 'virsh',
                   ExtraPackages => [qw(libnl1 libavahi-client3)],
     }, $class;
 }
diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm
index 6a5f9e6..97c6da6 100644
--- a/Osstest/Toolstack/xend.pm
+++ b/Osstest/Toolstack/xend.pm
@@ -27,7 +27,7 @@ sub new {
                   Host => $ho,
                   NewDaemons => [qw(xend)],
                   OldDaemonInitd => 'xend',
-                  Command => 'xm',
+                  _Command => 'xm',
                   CfgPathVar => 'cfgpath',
                   Dom0MemFixed => 1,
     }, $class;
diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm
index adda0c7..5480f8f 100644
--- a/Osstest/Toolstack/xl.pm
+++ b/Osstest/Toolstack/xl.pm
@@ -28,7 +28,7 @@ sub new {
                   Host => $ho,
                   NewDaemons => [],
                   Dom0MemFixed => 1,
-                  Command => 'xl',
+                  _Command => 'xl',
                   CfgPathVar => 'cfgpath',
                   RestoreNeedsConfig => 1,
     }, $class;
@@ -37,31 +37,31 @@ sub new {
 sub destroy ($$) {
     my ($self,$gho) = @_;
     my $gn = $gho->{Name};
-    target_cmd_root($self->{Host}, $self->{Command}." destroy $gn", 40);
+    target_cmd_root($self->{Host}, $self->{_Command}." destroy $gn", 40);
 }
 
 sub create ($$) {
     my ($self,$cfg) = @_;
-    target_cmd_root($self->{Host}, $self->{Command}." create $cfg", 100);
+    target_cmd_root($self->{Host}, $self->{_Command}." create $cfg", 100);
 }
 
 sub consolecmd ($$) {
     my ($self,$gho) = @_;
     my $gn = $gho->{Name};
-    return $self->{Command}." console $gn";
+    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);
+    target_cmd_root($ho,"$self->{_Command} shutdown -w $gn", 200);
 }
 
 sub migrate_check ($) {
     my ($self) = @_;
     my $ho = $self->{Host};
-    my $help = target_cmd_output_root($ho, $self->{Command}." help");
+    my $help = target_cmd_output_root($ho, $self->{_Command}." help");
     my $rc = ($help =~ m/^\s*migrate/m) ? 0 : 1;
     logm("rc=$rc");
     return $rc;
@@ -72,7 +72,7 @@ sub migrate ($$$$) {
     my $ho = $self->{Host};
     my $gn = $gho->{Name};
     target_cmd_root($ho,
-                   $self->{Command}." migrate $gn $dst",
+                   $self->{_Command}." migrate $gn $dst",
                    $to);
 }
 
@@ -80,7 +80,7 @@ sub save ($$$$) {
     my ($self,$gho,$f,$to) = @_;
     my $ho = $self->{Host};
     my $gn = $gho->{Name};
-    target_cmd_root($ho,$self->{Command}." save $gn $f", $to);
+    target_cmd_root($ho,$self->{_Command}." save $gn $f", $to);
 }
 
 sub restore ($$$$$) {
@@ -88,7 +88,7 @@ sub restore ($$$$$) {
     my $ho = $self->{Host};
     my $gn = $gho->{Name};
     target_cmd_root($ho,
-                   $self->{Command}
+                   $self->{_Command}
                    ." restore "
                    .($self->{RestoreNeedsConfig} ? $cfg : '')
                    ." $f", $to);
-- 
2.1.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.