From patchwork Wed Aug 22 17:24:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 1362831 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4CF27DF280 for ; Wed, 22 Aug 2012 17:24:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964944Ab2HVRYf (ORCPT ); Wed, 22 Aug 2012 13:24:35 -0400 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 Received: from freedom.redhat.com (vpn1-6-85.gru2.redhat.com [10.97.6.85]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7MHOQ2B002922; Wed, 22 Aug 2012 13:24:26 -0400 From: Lucas Meneghel Rodrigues To: autotest-kernel@redhat.com Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues , Amos Kong 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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")