config_tools: remove KATA and replace UUID with vmname to identify a vm

1. remove CONFIG_KATA_VM, CONFIG_MAX_KATA_VM_NUM and KATA_VM
related code.
2. remove KATA_VM in scenario xml files.
3. remove KATA vm type in UI.
4. remove UUID DB.
5. remove uuid in the launch script generation logic.
6. use vmname to identify a vm. (eg: <name>ACRN_SOS_VM</name>)
add the check logic to ensure vm name is a must-set item, not duplicated,
and the string length is [1-15] and the whitespace is not allowed.
7. enlarge the max VM num to 32.

Tracked-On: #6685
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
This commit is contained in:
Kunhui-Li
2021-10-20 15:34:53 +08:00
committed by wenlingz
parent b382448d69
commit 29b8da2a51
29 changed files with 84 additions and 366 deletions

View File

@@ -208,28 +208,6 @@ def is_config_file_match():
return (err_dic, match)
def get_vm_uuid_idx(vm_type, user_vmid):
i_cnt = 0
for vm_i,vm_t in common.VM_TYPES.items():
if vm_t == vm_type and vm_i <= user_vmid:
i_cnt += 1
if i_cnt > 0:
i_cnt -= 1
return i_cnt
def get_scenario_uuid(user_vmid, sos_vmid):
# {id_num:uuid} (id_num:0~max)
scenario_uuid = ''
vm_id = user_vmid + sos_vmid
i_cnt = get_vm_uuid_idx(common.VM_TYPES[vm_id], vm_id)
scenario_uuid = scenario_cfg_lib.VM_DB[common.VM_TYPES[vm_id]]['uuid'][i_cnt]
return scenario_uuid
def get_sos_vmid():
sos_id = ''
@@ -627,7 +605,7 @@ def set_shm_regions(launch_item_values, scenario_info):
for vm_id, vm_type in vm_types.items():
if vm_type in ['SERVICE_VM']:
sos_vm_id = vm_id
elif vm_type in ['POST_STD_VM', 'POST_RT_VM', 'KATA_VM']:
elif vm_type in ['POST_STD_VM', 'POST_RT_VM']:
user_vmid = vm_id - sos_vm_id
shm_region_key = 'user_vm:id={},shm_regions,shm_region'.format(user_vmid)
launch_item_values[shm_region_key] = ['']