Exemplo n.º 1
0
def dump_block_dev(config):
    """This will get available block device
    :param config: file pointer that opened for writing board config information
    """
    cmd = 'blkid'
    desc = 'BLOCK_DEVICE_INFO'
    parser_lib.dump_execute(cmd, desc, config)
    print("", file=config)
Exemplo n.º 2
0
def generate_info(board_info):
    """Get the pci info
    :param board_info: this is the file which stores the hardware board information
    """
    with open(board_info, 'a+') as config:
        parser_lib.dump_execute(CMDS['PCI_DEVICE'], 'PCI_DEVICE', config)
        print("", file=config)
        parser_lib.dump_execute(CMDS['PCI_VID_PID'], 'PCI_VID_PID', config)
        print("", file=config)
Exemplo n.º 3
0
def generate_info(board_info):
    """Get bios and base board information
    :param board_info: this is the file which stores the hardware board information
    """
    with open(board_info, 'a+') as config:
        parser_lib.dump_execute(CMDS['BIOS_INFO'], 'BIOS_INFO', config)
        print("", file=config)
        parser_lib.dump_execute(CMDS['BASE_BOARD_INFO'], 'BASE_BOARD_INFO',
                                config)
        print("", file=config)