Esempio n. 1
0
def parse_boot_info():

    err_dic = {}
    vm_types = []

    (err_dic, scenario_name) = common.get_scenario_name()
    if err_dic:
        return (err_dic, sos_cmdlines, sos_rootfs, vuart0_dic, vuart1_dic,
                vm_types)

    if scenario_name != "logical_partition":
        sos_cmdlines = common.get_sub_leaf_tag(common.SCENARIO_INFO_FILE,
                                               "board_private", "bootargs")
        sos_rootfs = common.get_sub_leaf_tag(common.SCENARIO_INFO_FILE,
                                             "board_private", "rootfs")
        (err_dic, vuart0_dic,
         vuart1_dic) = board_cfg_lib.get_board_private_vuart(
             "board_private", "console")
    else:
        sos_cmdlines = common.get_sub_leaf_tag(common.SCENARIO_INFO_FILE,
                                               "os_config", "bootargs")

        sos_rootfs = common.get_sub_leaf_tag(common.SCENARIO_INFO_FILE,
                                             "os_config", "rootfs")
        (err_dic, vuart0_dic,
         vuart1_dic) = board_cfg_lib.get_board_private_vuart(
             "os_config", "console")

    for i in range(common.VM_COUNT):
        vm_type = board_cfg_lib.get_order_type_by_vmid(i)
        vm_types.append(vm_type)

    return (err_dic, sos_cmdlines, sos_rootfs, vuart0_dic, vuart1_dic,
            vm_types)
Esempio n. 2
0
def parse_boot_info():

    err_dic = {}

    if 'SOS_VM' in common.VM_TYPES.values():
        sos_cmdlines = list(common.get_leaf_tag_map(common.SCENARIO_INFO_FILE, "board_private", "bootargs").values())
        sos_rootfs = list(common.get_leaf_tag_map(common.SCENARIO_INFO_FILE, "board_private", "rootfs").values())
        (err_dic, vuart0_dic, vuart1_dic) = board_cfg_lib.get_board_private_vuart("board_private", "console")
    else:
        sos_cmdlines = list(common.get_leaf_tag_map(common.SCENARIO_INFO_FILE, "os_config", "bootargs").values())

        sos_rootfs = list(common.get_leaf_tag_map(common.SCENARIO_INFO_FILE, "os_config", "rootfs").values())
        (err_dic, vuart0_dic, vuart1_dic) = board_cfg_lib.get_board_private_vuart("os_config", "console")

    return (err_dic, sos_cmdlines, sos_rootfs, vuart0_dic, vuart1_dic)