summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Liu <yong.liu@intel.com>2015-07-17 14:17:53 +0800
committerMarvin Liu <yong.liu@intel.com>2015-07-17 14:25:37 +0800
commit150a46b76ef6e963c453da5402174b8dd7a1b13c (patch)
treeea7c07315a83187a4b5fffaf322b561f581978ad
parent298a0123da902dd90bdcd856e71f4b4083dd36d1 (diff)
downloaddts-150a46b76ef6e963c453da5402174b8dd7a1b13c.zip
dts-150a46b76ef6e963c453da5402174b8dd7a1b13c.tar.gz
dts-150a46b76ef6e963c453da5402174b8dd7a1b13c.tar.xz
fix bug that virt_dut close function not have attribute
Signed-off-by: Marvin Liu <yong.liu@intel.com>
-rw-r--r--framework/virt_base.py4
-rw-r--r--framework/virt_dut.py2
-rw-r--r--framework/virt_scene.py2
3 files changed, 4 insertions, 4 deletions
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: