diff mbox

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

Message ID 1345656265-11081-1-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues Aug. 22, 2012, 5:24 p.m. UTC
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@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 client/virt/tests/netperf.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

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")