[PATCH] virt.netperf: Use ssh_key lib rather than off limits server lib

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

 



When running the kvm autotest tests on a given host through
the autotest server, it's important to remember that only
the autotest client is copied to machines, making anything
that is not on the autotest.client namespace *off-limits*.

So, replace usage of SSHHost server class (here used only
to get ssh key setup) to use the ssh_key module, recently
split out due to a similar mistake made by test authors.

CC: Amos Kong <akong@xxxxxxxxxx>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx>
---
 client/virt/tests/netperf.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/client/virt/tests/netperf.py b/client/virt/tests/netperf.py
index c054c10..e137d45 100644
--- a/client/virt/tests/netperf.py
+++ b/client/virt/tests/netperf.py
@@ -1,6 +1,6 @@
 import logging, os, commands, threading, re, glob
-from autotest.server.hosts.ssh_host import SSHHost
 from autotest.client import utils
+from autotest.client.shared import ssh_key
 from autotest.client.virt import utils_test, utils_misc, remote
 
 
@@ -60,7 +60,8 @@ def run_netperf(test, params, env):
 
     def env_setup(ip):
         logging.debug("Setup env for %s" % ip)
-        SSHHost(ip, user=username, port=shell_port, password=password)
+        ssh_key.setup_ssh_key(hostname=ip, user=username, port=shell_port,
+                              password=password)
         ssh_cmd(ip, "service iptables stop")
         ssh_cmd(ip, "echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore")
 
-- 
1.7.11.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