From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Meneghel Rodrigues Subject: [PATCH] virt.netperf: Use ssh_key lib rather than off limits server lib Date: Wed, 22 Aug 2012 14:24:25 -0300 Message-ID: <1345656265-11081-1-git-send-email-lmr@redhat.com> Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues , Amos Kong To: autotest-kernel@redhat.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:14324 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964824Ab2HVRYd (ORCPT ); Wed, 22 Aug 2012 13:24:33 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7MHOXQx000346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 22 Aug 2012 13:24:33 -0400 Sender: kvm-owner@vger.kernel.org List-ID: 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 Signed-off-by: Lucas Meneghel Rodrigues --- 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