From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E1685594B for ; Mon, 30 Nov 2015 06:29:49 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 29 Nov 2015 21:29:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,363,1444719600"; d="scan'208";a="860939023" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 29 Nov 2015 21:29:48 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id tAU5TkAr006462; Mon, 30 Nov 2015 13:29:46 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id tAU5TiQ4006050; Mon, 30 Nov 2015 13:29:46 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id tAU5TiUW006046; Mon, 30 Nov 2015 13:29:44 +0800 From: Yong Liu To: dts@dpdk.org Date: Mon, 30 Nov 2015 13:29:43 +0800 Message-Id: <1448861383-6014-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] framework virt_dut: virtual machine session inherit from crb instance X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 05:29:50 -0000 Signed-off-by: Marvin Liu diff --git a/framework/virt_dut.py b/framework/virt_dut.py index 844d193..8d0c5d9 100644 --- a/framework/virt_dut.py +++ b/framework/virt_dut.py @@ -36,11 +36,9 @@ import dts import settings from config import PortConf from settings import NICS, LOG_NAME_SEP, get_netdev -from ssh_connection import SSHConnection from project_dpdk import DPDKdut from dut import Dut from net_device import NetDevice -from logger import getLogger class VirtDut(DPDKdut): @@ -58,20 +56,12 @@ class VirtDut(DPDKdut): self.vm_name = vm_name self.hyper = hyper self.cpu_topo = cpu_topo - super(Dut, self).__init__(crb, serializer) - self.vm_ip = self.get_ip_address() + + self.vm_ip = crb['IP'] self.NAME = 'virtdut' + LOG_NAME_SEP + '%s' % self.vm_ip + super(Dut, self).__init__(crb, serializer, self.NAME) # load port config from suite cfg self.suite = suite - self.logger = getLogger(self.NAME) - self.session = SSHConnection(self.vm_ip, self.NAME, - self.get_password()) - self.session.init_log(self.logger) - - # if redirect ssh port, there's only one session enabled - self.alt_session = SSHConnection(self.vm_ip, self.NAME + '_alt', - self.get_password()) - self.alt_session.init_log(self.logger) self.number_of_cores = 0 self.tester = None -- 1.9.3