Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: client/tests/kvm/tests/physical_resources_check.py

Issue 6124004: Revert "Merge remote branch 'cros/upstream' into autotest-rebase" (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tests/kvm/tests/pci_hotplug.py ('k') | client/tests/kvm/tests/qemu_img.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/kvm/tests/physical_resources_check.py
diff --git a/client/tests/kvm/tests/physical_resources_check.py b/client/tests/kvm/tests/physical_resources_check.py
index 3234da7f38986007d50aeb8dabe4018d07b988d9..682c7b21568024f681e8441020134d57e83aa768 100644
--- a/client/tests/kvm/tests/physical_resources_check.py
+++ b/client/tests/kvm/tests/physical_resources_check.py
@@ -51,7 +51,7 @@ def run_physical_resources_check(test, params, env):
# Define a function for checking number of hard drivers & NICs
def check_num(devices, info_cmd, check_str):
f_fail = 0
- expected_num = params.objects(devices).__len__()
+ expected_num = kvm_utils.get_sub_dict_names(params, devices).__len__()
try:
o = vm.monitor.info(info_cmd)
except kvm_monitor.MonitorError, e:
@@ -78,9 +78,9 @@ def run_physical_resources_check(test, params, env):
# Define a function for checking hard drives & NICs' model
def chk_fmt_model(device, fmt_model, info_cmd, str):
f_fail = 0
- devices = params.objects(device)
+ devices = kvm_utils.get_sub_dict_names(params, device)
for chk_device in devices:
- expected = params.object_params(chk_device).get(fmt_model)
+ expected = kvm_utils.get_sub_dict(params, chk_device).get(fmt_model)
if not expected:
expected = "rtl8139"
try:
@@ -123,7 +123,7 @@ def run_physical_resources_check(test, params, env):
found_mac_addresses = re.findall("macaddr=(\S+)", o)
logging.debug("Found MAC adresses: %s" % found_mac_addresses)
- num_nics = len(params.objects("nics"))
+ num_nics = len(kvm_utils.get_sub_dict_names(params, "nics"))
for nic_index in range(num_nics):
mac = vm.get_mac_address(nic_index)
if not string.lower(mac) in found_mac_addresses:
@@ -135,7 +135,7 @@ def run_physical_resources_check(test, params, env):
def verify_device(expect, name, verify_cmd):
f_fail = 0
if verify_cmd:
- actual = session.cmd_output(verify_cmd)
+ actual = session.get_command_output(verify_cmd)
if not string.upper(expect) in actual:
f_fail += 1
logging.error("%s mismatch:")
« no previous file with comments | « client/tests/kvm/tests/pci_hotplug.py ('k') | client/tests/kvm/tests/qemu_img.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698