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

Fix use of args.CLASS with ifreload (reload does not support CLASS yet).

Ticket: CM-3176
Reviewed By: trivial
Testing Done: Tested ifreload with the testcase in the bug

This broke when i recently fixed --allow-classes support for ifup/ifdown
This commit is contained in:
Roopa Prabhu
2014-07-07 11:30:52 -07:00
parent 0bb5110d65
commit 89aa6573d6

View File

@ -338,13 +338,18 @@ def validate_args(op, args):
# return True
if op == 'query' and args.syntaxhelp:
return True
if not args.iflist and not args.all and not args.CLASS:
if op == 'reload':
if not args.all:
print '\'-a\' option is required'
return False
elif (not args.iflist and
not args.all and not args.CLASS):
print '\'-a\' option or interface list are required'
return False
if args.iflist and args.all:
print '\'-a\' option and interface list are mutually exclusive'
return False
if args.CLASS and (args.all or args.iflist):
if op != 'reload' and args.CLASS and (args.all or args.iflist):
print ('\'--allow\' option is mutually exclusive ' +
'with interface list and \'-a\'')
return False