(subparsers)
return p
Parser for rp command
Parser for rp command
Parser for rp command
def subparser(subparsers):
    """Parser for rp command"""
    p = subparsers.add_parser('reverse-path',
                              aliases=['rp'],
                              description="Set reverse path filters",
                              help='Set reverse path filters',
                              formatter_class=ArgumentDefaultsHelpFormatter)
    p.add_argument('-i',
                   '--interface',
                   required=True,
                   help='Network interface')
    p.add_argument('-y',
                   '--yes',
                   default=False,
                   action='store_true',
                   help="Default to answering Yes to configuration prompts")
    p.add_argument("--dry-run",
                   action='store_true',
                   default=False,
                   help="Print all commands but do not execute them")
    p.set_defaults(func=run)
    return p
def subparser ( subparsers ) : p = subparsers . add_parser ( 'reverse-path' , aliases = [ 'rp' ] , description = "Set reverse path filters" , help = 'Set reverse path filters' , formatter_class = ArgumentDefaultsHelpFormatter ) p . add_argument ( '-i' , '--interface' , required = True , help = 'Network interface' ) p . add_argument ( '-y' , '--yes' , default = False , action = 'store_true' , help = "Default to answering Yes to configuration prompts" ) p . add_argument ( "--dry-run" , action = 'store_true' , default = False , help = "Print all commands but do not execute them" ) p . set_defaults ( func = run ) return p