mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
acrn-config: dynamic configuration for scenario setting and launch setting
config app implements interfaces to dynamically:
create new scenario settings based on tempaltes;
create new launch settings based on templates;
add or delete VMs for scenario settings;
add or delete VMs for launch settings;
load default scenario or launch settings
Tracked-On: #4641
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com
Reviewed-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
This commit is contained in:
@@ -221,6 +221,20 @@ class XmlConfig:
|
||||
dest_node = self._get_dest_node(*args)
|
||||
dest_node.append(elem)
|
||||
|
||||
def insert_curr_elem(self, index, elem, *args):
|
||||
"""
|
||||
insert elements for current path.
|
||||
:param index: the location for the element to insert.
|
||||
:param elem: the element to insert.
|
||||
:param args: the path of the element.
|
||||
:return: None.
|
||||
"""
|
||||
if self._curr_xml_tree is None:
|
||||
return
|
||||
|
||||
dest_node = self._get_dest_node(*args)
|
||||
dest_node.insert(index, elem)
|
||||
|
||||
def delete_curr_key(self, *args):
|
||||
"""
|
||||
delete the element by its path.
|
||||
|
||||
Reference in New Issue
Block a user