acrn-config: assign VM IDs for dynamic scenario and launch setting

When dynamically creating or adding or deleting VMs, acrn config app
will assign VM IDs for the VMs with the orders of prelaunched VMs and SOS
VM and postlaunched VMs to be consistent with the VM order of vm_configs
in vm configuration. When dynamically creating launch scripts, acrn
config app will let users to specify the VM ID before launch setting.

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
This commit is contained in:
Shuang Zheng
2020-04-21 18:43:34 +08:00
committed by wenlingz
parent 44ec68dc49
commit f7594f0a93
6 changed files with 185 additions and 46 deletions

View File

@@ -84,7 +84,7 @@ class XmlConfig:
:return: None.
:raises: ValueError, OSError, SyntaxError.
"""
if self._xml_path is None:
if self._xml_path is None or xml is None:
return
try:
self._curr_xml = xml