def __init__(self, subparser):
    'setup the parser'
    self.rest = None
    plan_parser = subparser.add_parser('plan', help='Manage backup plans', add_help=False, allow_abbrev=False)
    action_group = plan_parser.add_mutually_exclusive_group(required=True)
    action_group.add_argument('--list', action='store_true', help='List all available backup plans')
    action_group.add_argument('--get', action='store_true', help='Get a plan by name')
    action_group.add_argument('--remove', action='store_true', help='Remove a plan by name')
    action_group.add_argument('--add', action='store_true', help='Add a new plan')
    action_group.add_argument('-h', '--help', action=CBHelpAction, klass=self, help='Prints the short or long help message')
    options = plan_parser.add_argument_group('Plan options')
    options.add_argument('--name', metavar='<name>', help='Plan name')
    options.add_argument('--description', metavar='<description>', help='Optional description')
    options.add_argument('--services', metavar='<services>', help='A comma separated list of services to backup')
    options.add_argument('--task', metavar='<tasks>', nargs='+', help='JSON task definition')
setup the parser
def __init__(self, subparser):
    
    self.rest = None
    plan_parser = subparser.add_parser('plan', help='Manage backup plans', add_help=False, allow_abbrev=False)
    action_group = plan_parser.add_mutually_exclusive_group(required=True)
    action_group.add_argument('--list', action='store_true', help='List all available backup plans')
    action_group.add_argument('--get', action='store_true', help='Get a plan by name')
    action_group.add_argument('--remove', action='store_true', help='Remove a plan by name')
    action_group.add_argument('--add', action='store_true', help='Add a new plan')
    action_group.add_argument('-h', '--help', action=CBHelpAction, klass=self, help='Prints the short or long help message')
    options = plan_parser.add_argument_group('Plan options')
    options.add_argument('--name', metavar='<name>', help='Plan name')
    options.add_argument('--description', metavar='<description>', help='Optional description')
    options.add_argument('--services', metavar='<services>', help='A comma separated list of services to backup')
    options.add_argument('--task', metavar='<tasks>', nargs='+', help='JSON task definition')