Skip to content

Commit 0445c5f

Browse files
szhen11wenlingz
authored andcommitted
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>
1 parent a12b746 commit 0445c5f

File tree

7 files changed

+1032
-344
lines changed

7 files changed

+1032
-344
lines changed

misc/acrn-config/config_app/controller.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,20 @@ def clone_curr_elem(self, elem, *args):
221221
dest_node = self._get_dest_node(*args)
222222
dest_node.append(elem)
223223

224+
def insert_curr_elem(self, index, elem, *args):
225+
"""
226+
insert elements for current path.
227+
:param index: the location for the element to insert.
228+
:param elem: the element to insert.
229+
:param args: the path of the element.
230+
:return: None.
231+
"""
232+
if self._curr_xml_tree is None:
233+
return
234+
235+
dest_node = self._get_dest_node(*args)
236+
dest_node.insert(index, elem)
237+
224238
def delete_curr_key(self, *args):
225239
"""
226240
delete the element by its path.

0 commit comments

Comments
 (0)