1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

ifupdown2: ifreload: enable dry run (--no-act) and other dry run fixes

Ticket: CM-10965
Reviewed By: julien
Testing Done: Tested dry-run option

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-05-12 22:11:15 -07:00
parent 95d9805c82
commit cbdde74e16
2 changed files with 7 additions and 2 deletions

View File

@@ -143,7 +143,8 @@ def run_reload(args):
ifupdown_handle = ifupdownMain(config=configmap_g,
interfacesfile=interfacesfilename,
withdepends=args.withdepends,
perfmode=args.perfmode)
perfmode=args.perfmode,
dryrun=args.noact)
ifupdown_handle.reload(['pre-up', 'up', 'post-up'],
['pre-down', 'down', 'post-down'],
auto=args.all, allow=args.CLASS, ifacenames=None,
@@ -354,7 +355,8 @@ def update_ifreload_argparser(argparser):
argparser.add_argument('iflist', metavar='IFACE',
nargs='*', help=argparse.SUPPRESS)
argparser.add_argument('-n', '--no-act', dest='noact',
action='store_true', help=argparse.SUPPRESS)
action='store_true', help='print out what would happen,' +
'but don\'t do it')
argparser.add_argument('-v', '--verbose', dest='verbose',
action='store_true', help='verbose')
argparser.add_argument('-d', '--debug', dest='debug',