From d9f0d8dcf07da114ee3814974dc4a176cbfdeee0 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 24 Oct 2019 10:16:41 +0800 Subject: [PATCH] acrn-config: fix the wrong 'key' type returned to webUI Fix the wrong 'key' type of error list returned to webUI for parsing. Tracked-On: #3913 Signed-off-by: Wei Liu Acked-by: Victor Sun --- misc/acrn-config/library/launch_cfg_lib.py | 10 +++++----- misc/acrn-config/library/scenario_cfg_lib.py | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/misc/acrn-config/library/launch_cfg_lib.py b/misc/acrn-config/library/launch_cfg_lib.py index 1a3dfde88..7a067c839 100644 --- a/misc/acrn-config/library/launch_cfg_lib.py +++ b/misc/acrn-config/library/launch_cfg_lib.py @@ -425,7 +425,7 @@ def pt_devs_check(bdf_list, vpid_list, item): if is_bdf_format(bdf_str): continue else: - key = "uos,id={},passthrough_devices,{}".format(i_cnt, item) + key = "uos:id={},passthrough_devices,{}".format(i_cnt, item) ERR_LIST[key] = "Unkonw the BDF format of {} device".format(item) i_cnt += 1 @@ -435,7 +435,7 @@ def pt_devs_check(bdf_list, vpid_list, item): if is_vpid_format(vpid_str): continue else: - key = "uos,id={},passthrough_devices,{}".format(i_cnt, item) + key = "uos:id={},passthrough_devices,{}".format(i_cnt, item) ERR_LIST[key] = "Unkonw the Vendor:Product ID format of {} device".format(item) i_cnt += 1 @@ -448,7 +448,7 @@ def empty_err(i_cnt, item): :param item: the item of tag from config xml :return: None """ - key = "uos,id={},{}".format(i_cnt, item) + key = "uos:id={},{}".format(i_cnt, item) ERR_LIST[key] = "The parameter should not be empty" @@ -473,7 +473,7 @@ def args_aval_check(arg_list, item, avl_list): continue if arg_str not in avl_list: - key = "uos,id={},{}".format(i_cnt, item) + key = "uos:id={},{}".format(i_cnt, item) ERR_LIST[key] = "The {} is invalidate".format(item) i_cnt += 1 @@ -532,7 +532,7 @@ def mem_size_check(arg_list, item): mem_size_set = int(arg_str.strip()) if mem_size_set > total_mem_mb: - key = "uos,id={},{}".format(i_cnt, item) + key = "uos:id={},{}".format(i_cnt, item) ERR_LIST[key] = "{}MB should be less than total memory {}MB".format(item) i_cnt += 1 diff --git a/misc/acrn-config/library/scenario_cfg_lib.py b/misc/acrn-config/library/scenario_cfg_lib.py index 03a16ae1b..392ec8b41 100644 --- a/misc/acrn-config/library/scenario_cfg_lib.py +++ b/misc/acrn-config/library/scenario_cfg_lib.py @@ -202,7 +202,7 @@ def check_board_private_info(): (err_dic, private_info) = get_board_private_info(SCENARIO_INFO_FILE) if not private_info['rootfs'] and err_dic: - ERR_LIST['vm,id=0,boot_private,rootfs'] = "The board have to chose one rootfs partition" + ERR_LIST['vm:id=0,boot_private,rootfs'] = "The board have to chose one rootfs partition" ERR_LIST.update(err_dic) @@ -718,14 +718,14 @@ def avl_vuart_ui_select(scenario_info): vm_type = get_order_type_by_vmid(vm_i) if vm_type == "SOS_VM": - key = "vm={},vuart=0,base".format(vm_i) + key = "vm={}:vuart=0,base".format(vm_i) tmp_vuart[key] = ['SOS_COM1_BASE', 'INVALID_COM_BASE'] - key = "vm={},vuart=1,base".format(vm_i) + key = "vm={}:vuart=1,base".format(vm_i) tmp_vuart[key] = ['SOS_COM2_BASE', 'INVALID_COM_BASE'] else: - key = "vm={},vuart=0,base".format(vm_i) + key = "vm={}:vuart=0,base".format(vm_i) tmp_vuart[key] = ['INVALID_COM_BASE', 'COM1_BASE'] - key = "vm={},vuart=1,base".format(vm_i) + key = "vm={}:vuart=1,base".format(vm_i) tmp_vuart[key] = ['INVALID_COM_BASE', 'COM2_BASE'] #print(tmp_vuart)