[KVM-AUTOTEST PATCH 16/17] KVM test: reorder kvm_utils.copy_files_from() path parameters

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

 



Reorder path parameters in copy_files_from().  Currently it uses the same order
as copy_files_to() (local_path, remote_path) which is counterintuitive IMO
(because copy_files_from() copies from a remote host to localhost).
Change it to remote_path, then local_path.  This is a very low-impact change
because the only use of kvm_utils.copy_files_*() is in kvm_vm.py.

VM.copy_files_*() remain unchanged.

Signed-off-by: Michael Goldish <mgoldish@xxxxxxxxxx>
---
 client/tests/kvm/kvm_utils.py |    8 ++++----
 client/tests/kvm/kvm_vm.py    |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
index cb79c59..646d4fa 100644
--- a/client/tests/kvm/kvm_utils.py
+++ b/client/tests/kvm/kvm_utils.py
@@ -808,16 +808,16 @@ def copy_files_to(address, client, username, password, port, local_path,
         c.close()
 
 
-def copy_files_from(address, client, username, password, port, local_path,
-                    remote_path, log_filename=None, timeout=600):
+def copy_files_from(address, client, username, password, port, remote_path,
+                    local_path, log_filename=None, timeout=600):
     """
     Copy files from a remote host (guest) using the selected client.
 
     @param client: Type of transfer client
     @param username: Username (if required)
     @param password: Password (if requried)
-    @param local_path: Path on the local machine where we are copying from
-    @param remote_path: Path on the remote machine where we are copying to
+    @param remote_path: Path on the remote machine where we are copying from
+    @param local_path: Path on the local machine where we are copying to
     @param address: Address of remote host(guest)
     @param log_filename: If specified, log all output to this file
     @param timeout: The time duration (in seconds) to wait for the transfer to
diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index d6ca782..4680577 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -1297,7 +1297,7 @@ class VM:
                         (self.name, address,
                         kvm_utils.generate_random_string(4)))
         kvm_utils.copy_files_from(address, client, username, password, port,
-                                  local_path, remote_path, log_filename,
+                                  remote_path, local_path, log_filename,
                                   timeout)
 
 
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux