def info(dev):
    utils.udevadm_settle()
    parted_output = utils.execute('parted', '-s', dev, '-m',
                                  'unit', 'MiB',
                                  'print free',
                                  check_exit_code=[0])[0]
    LOG.debug('Parted info output: \n%s' % parted_output)

    result = parse_partition_info(parted_output)

    file_output = utils.execute('file', '-sk', dev,
                                check_exit_code=[0])[0]
    LOG.debug('File info output: \n%s' % file_output)

    result['generic']['has_bootloader'] = 'boot sector' in file_output
    for part in result['parts']:
        blkid_output = utils.execute('blkid -s UUID -o value',
                                     part['name'],
                                     check_exit_code=False)[0].strip()
        LOG.debug('Blkid output: \n%s' % blkid_output)
        part['uuid'] = blkid_output

    LOG.debug('Info result: %s' % result)
    return result
dataset/ETHPy150Open openstack/bareon/bareon/utils/partition.py/info/original