From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id F35595A9A for ; Fri, 17 Jul 2015 08:17:59 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 16 Jul 2015 23:17:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,493,1432623600"; d="scan'208";a="730568972" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 16 Jul 2015 23:17:58 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6H6Hua4017138; Fri, 17 Jul 2015 14:17:56 +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 t6H6Hsom028409; Fri, 17 Jul 2015 14:17:56 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t6H6HsNO028405; Fri, 17 Jul 2015 14:17:54 +0800 From: Yong Liu To: dts@dpdk.org Date: Fri, 17 Jul 2015 14:17:53 +0800 Message-Id: <1437113873-28373-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] fix bug that virt_dut close function not have attribute 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: Fri, 17 Jul 2015 06:18:00 -0000 From: Marvin Liu Signed-off-by: Marvin Liu diff --git a/framework/virt_base.py b/framework/virt_base.py index 20ce67d..d0dfa1c 100644 --- a/framework/virt_base.py +++ b/framework/virt_base.py @@ -273,7 +273,7 @@ class VirtBase(object): return True elif type(vm_except) is exception.VirtDutInitException: # need close session - vm_except.vm_dut.close_sessions() + vm_except.vm_dut.close() # need stop vm self.stop() return True @@ -354,7 +354,7 @@ class VirtBase(object): """ Stop the VM. """ - self.vm_dut.close_sessions() + self.vm_dut.close() self._stop_vm() self.virt_pool.free_all_resource(self.vm_name) diff --git a/framework/virt_dut.py b/framework/virt_dut.py index 123c42b..9404be6 100644 --- a/framework/virt_dut.py +++ b/framework/virt_dut.py @@ -83,7 +83,7 @@ class VirtDut(DPDKdut): def init_log(self): self.logger.config_suite(self.host_dut.test_classname, 'virtdut') - def close_sessions(self): + def close(self): if self.session: self.session.close() if self.alt_session: diff --git a/framework/virt_scene.py b/framework/virt_scene.py index cf4a416..b201541 100644 --- a/framework/virt_scene.py +++ b/framework/virt_scene.py @@ -472,7 +472,7 @@ class VirtScene(object): for vm_obj in vm_info.keys(): if 'session' in vm_obj: vm_info[vm_obj].kill_all() - vm_info[vm_obj].close_sessions() + vm_info[vm_obj].close() vm_info[vm_obj].logger.logger_exit() for vm_obj in vm_info.keys(): if 'session' not in vm_obj: -- 1.9.3