提交 f2263af7 编写于 作者: L Lucas Meneghel Rodrigues

qemu.tests: Update old utils_test.get_vm with env.get_vm

This was probably overlooked when making the transition
to the new environment class. With this, we can simply
remove the old API.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 f921fbf4
......@@ -120,7 +120,7 @@ def run_multi_vms_nics(test, params, env):
host_ip = params.get("srchost", host_ip)
flood_minutes = float(params["flood_minutes"])
for vm_name in vms:
vm = utils_test.get_living_vm(env, vm_name)
vm = env.get_vm(vm_name)
vm_list.append(vm)
session_list.append(vm.wait_for_login(timeout=timeout))
......
......@@ -29,7 +29,7 @@ def run_nic_hotplug(test, params, env):
:param params: Dictionary with the test parameters.
:param env: Dictionary with test environment.
"""
vm = utils_test.get_living_vm(env, params["main_vm"])
vm = env.get_vm(params["main_vm"])
login_timeout = int(params.get("login_timeout", 360))
pci_model = params.get("pci_model", "rtl8139")
run_dhclient = params.get("run_dhclient", "no")
......
......@@ -23,7 +23,7 @@ def run_set_link(test, params, env):
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
"""
vm = utils_test.get_living_vm(env, params["main_vm"])
vm = env.get_vm(params["main_vm"])
timeout = float(params.get("login_timeout", 360))
# Waiting for guest boot up.
session = vm.wait_for_login(timeout=timeout)
......
......@@ -164,7 +164,7 @@ def run_netperf(test, params, env):
# client session 1 for control, session 2 for data communication
for i in range(2):
if client in params.get("vms"):
vm_client = utils_test.get_living_vm(env, client)
vm_client = env.get_vm(client)
tmp = vm_client.wait_for_login(timeout=login_timeout)
client_ip = vm_client.get_address()
elif client != "localhost":
......
......@@ -54,7 +54,7 @@ def run_trans_hugepage(test, params, env):
os.makedirs(debugfs_path)
utils.run("mount -t debugfs none %s" % debugfs_path)
vm = utils_test.get_living_vm(env, params.get("main_vm"))
vm = env.get_vm(params.get("main_vm"))
session = utils_test.wait_for_login(vm, timeout=login_timeout)
funcatexit.register(env, params.get("type"), cleanup, debugfs_path,
......
......@@ -129,7 +129,7 @@ def run_trans_hugepage_defrag(test, params, env):
change_feature_status("off", "khugepaged/defrag", test_config)
change_feature_status("off", "defrag", test_config)
vm = utils_test.get_living_vm(env, params.get("main_vm"))
vm = env.get_vm(params.get("main_vm"))
session = utils_test.wait_for_login(vm, timeout=login_timeout)
fragment_host_memory(mem_path)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册