def parse_clearpart(rule):
    parser = argparse.ArgumentParser()
    rules = shlex.split(rule)
    rules.pop(0)
    parser.add_argument('--all', dest='all', action='store_true')
    parser.add_argument('--drives', dest='drives', action='store')
    parser.add_argument('--init_label', dest='init_label', action='store_true')
    parser.add_argument('--linux', dest='linux', action='store_true')
    parser.add_argument('--none', dest='none', action='store_true')
    parser.add_argument('--initlabel', dest='init_label', action='store_true')
    parser.add_argument('--list', dest='list', action='store')

    args = clean_args(vars(parser.parse_args(rules)))
    parser = None
    return args
Parse the clearpart line
dataset/ETHPy150Open saltstack/salt/salt/utils/kickstart.py/parse_clearpart