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

[Xen-devel] [PATCH v3 17/19] 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>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 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 28c5cb1..f5f099a 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 8e77a05..ed9071b 100644
--- a/Osstest/Toolstack/xend.pm
+++ b/Osstest/Toolstack/xend.pm
@@ -29,7 +29,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 b730783..7938649 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,$timeout) = @_;
     my $ho = $self->{Host};
     my $gn = $gho->{Name};
-    target_cmd_root($ho,"$self->{Command} shutdown -w $gn", $timeout);
+    target_cmd_root($ho,"$self->{_Command} shutdown -w $gn", $timeout);
 }
 
 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;
@@ -73,7 +73,7 @@ sub migrate ($$$$) {
     my $dst = $dho->{Name};
     my $gn = $gho->{Name};
     target_cmd_root($sho,
-                   $self->{Command}." migrate $gn $dst",
+                   $self->{_Command}." migrate $gn $dst",
                    $timeout);
 }
 
@@ -81,7 +81,7 @@ sub save ($$$$) {
     my ($self,$gho,$f,$timeout) = @_;
     my $ho = $self->{Host};
     my $gn = $gho->{Name};
-    target_cmd_root($ho,$self->{Command}." save $gn $f", $timeout);
+    target_cmd_root($ho,$self->{_Command}." save $gn $f", $timeout);
 }
 
 sub restore ($$$$) {
@@ -90,7 +90,7 @@ sub restore ($$$$) {
     my $gn = $gho->{Name};
     my $cfg = $self->{RestoreNeedsConfig} ? $gho->{CfgPath} : '';
     target_cmd_root($ho,
-                   $self->{Command}
+                   $self->{_Command}
                    ." restore "
                    .$cfg
                    ." $f", $timeout);
-- 
2.1.4


_______________________________________________
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®.