def parse_upgrade(rule):
    parser = argparse.ArgumentParser()
    rules = shlex.split(rule)
    rules.pop(0)
    parser.add_argument('--root-device', dest='root-device', action='store')

    args = clean_args(vars(parser.parse_args(rules)))
    parser = None
    if args:
        return args
    return True
Parse the upgrade line
dataset/ETHPy150Open saltstack/salt/salt/utils/kickstart.py/parse_upgrade