def parse_partition_info(parted_output):
    lines = parted_output.split('\n')
    generic_params = lines[1].rstrip(';').split(':')
    generic = {
        'dev': generic_params[0],
        'size': utils.parse_unit(generic_params[1], 'MiB'),
        'logical_block': int(generic_params[3]),
        'physical_block': int(generic_params[4]),
        'table': generic_params[5],
        'model': generic_params[6]
    }
    parts = []
    for line in lines[2:]:
        line = line.strip().rstrip(';')
        if not line:
            continue
        part_params = line.split(':')
        part = {
            'disk_dev': generic['dev'],
            'name': (generic['dev'], int(part_params[0])) % "%s%s",
            'num': int(part_params[0]),
            'begin': utils.parse_unit(part_params[1], 'MiB'),
            'end': utils.parse_unit(part_params[2], 'MiB'),
            'size': utils.parse_unit(part_params[3], 'MiB'),
            'fstype': part_params[4] or None,
            'type': None,
            'flags': []
        }
        if part['fstype'] != 'free':
            part['type'] = part_params[5] or None
            part['flags'] = [f for f in part_params[6].split(', ') if f]

        parts.append(part)

    return {'generic': generic, 'parts': parts}
dataset/ETHPy150Open openstack/bareon/bareon/utils/partition.py/parse_partition_info/swapped operands of `%`