acrn-config: remove the same parameters and functions from launch_cfg_lib

Launch config should relay on library/common.py and launch_cfg_lib,
then remove the duplicate parameters and functions.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
This commit is contained in:
Wei Liu
2020-03-23 17:14:04 +08:00
committed by wenlingz
parent 7d827c4d35
commit 0c9628f605
4 changed files with 47 additions and 239 deletions

View File

@@ -4,6 +4,7 @@
#
import launch_cfg_lib
import common
import pt
@@ -29,7 +30,7 @@ def tap_uos_net(names, virt_io, vmid, config):
uos_type = names['uos_types'][vmid]
board_name = names['board_name']
vm_name = launch_cfg_lib.undline_name(uos_type).lower()
vm_name = common.undline_name(uos_type).lower()
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
i = 0
@@ -276,7 +277,7 @@ def launch_begin(names, virt_io, vmid, config):
board_name = names['board_name']
uos_type = names['uos_types'][vmid]
launch_uos = launch_cfg_lib.undline_name(uos_type).lower()
launch_uos = common.undline_name(uos_type).lower()
tap_network(virt_io, vmid, config)
run_container(board_name, uos_type, config)
print("function launch_{}()".format(launch_uos), file=config)
@@ -299,7 +300,7 @@ def uos_launch(names, args, virt_io, vmid, config):
gvt_args = args['gvt_args'][vmid]
uos_type = names['uos_types'][vmid]
launch_uos = launch_cfg_lib.undline_name(uos_type).lower()
launch_uos = common.undline_name(uos_type).lower()
board_name = names['board_name']
if 'nuc' in board_name:
board_name = 'nuc'