mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 15:45:05 +00:00
config-tools: refine append_node and add get_node
Refine the "append_node" which can add new node with an attribute and return the appended node. The method "get_node" finds the xpath value and return it if there is an unique node exists, otherwise it returns None. It is used to get an xpath element node or can determine the xpath existence. The "get_text" is replaced with "get_node". The only get_text in hv_ram.py is modified accordingly. Tracked-On: #5980 Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -24,7 +24,7 @@ def fn(board_etree, scenario_etree, allocation_etree):
|
||||
post_launched_vm_num += 1
|
||||
hv_ram_size = common.HV_BASE_RAM_SIZE + common.POST_LAUNCHED_VM_RAM_SIZE * post_launched_vm_num
|
||||
|
||||
ivshmem_enabled = common.get_text("//IVSHMEM_ENABLED", scenario_etree)
|
||||
ivshmem_enabled = common.get_node("//IVSHMEM_ENABLED/text()", scenario_etree)
|
||||
total_shm_size = 0
|
||||
if ivshmem_enabled == 'y':
|
||||
raw_shmem_regions = scenario_etree.xpath("//IVSHMEM_REGION/text()")
|
||||
|
||||
Reference in New Issue
Block a user