def METHOD_NAME():
    parser = argparse.ArgumentParser(description='The default output is a list of partition information.')
    parser.add_argument('-i', '--index', type=int,
        help='Set the index partition as boot partition. After reboot, GRUB will boot from that partion.')
    parser.add_argument("-v", "--verbose", action="store_true",
        help="increase output verbosity")
    args = parser.parse_args()
    if args.verbose:
        logger.setLevel(logging.INFO)
    ## Find ONIE partition and get the block device containing ONIE
    out = runcmd(["sudo", "blkid"])
    if not out: return -1
    for line in out.splitlines():
        m = re.match(r'/dev/(\w+)\d+: LABEL="ONIE-BOOT"', line)
        if not m: continue
        blkdev0 = m.group(1)
        blkdev = '/dev/' + blkdev0
        logger.info('blkdev={0}'.format(blkdev))
        break
    else:
        logger.error('Cannot find block device containing ONIE')
        return -1
    cur = get_boot_partition(blkdev)
    if cur is None:
        logger.error('Failed to get boot partition')
        return -1
    print('Current rootfs partition is: {0}'.format(cur))
    ## Handle the command line
    if args.index is None:
        print_partitions(blkdev0)
        return 0
    if args.index <= 0:
        logger.error('Index should be larger than 0')
        return -1
    logger.info("cur={0}".format(cur))
    if cur == args.index:
        logger.info('No action needed, the partition is already the boot partition')
        return 0
    suc = set_boot_partition(blkdev, args.index)
    if not suc:
        logger.error('Failed to set boot partition')
        return -1
    return 0