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

Fix handling of interfaces with --allow CLASS

Ticket: CM-3105
Reviewed By:
Testing Done: precommit and some interface class tests

- the patch mostly involves code reorg
This commit is contained in:
Roopa Prabhu
2014-06-25 15:23:04 -07:00
parent ba7b1d6084
commit 5ee3e1a854
3 changed files with 105 additions and 56 deletions

View File

@@ -338,12 +338,16 @@ def validate_args(op, args):
# return True
if op == 'query' and args.syntaxhelp:
return True
if not args.iflist and not args.all:
if 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):
print ('\'--allow\' option is mutually exclusive ' +
'with interface list and \'-a\'')
return False
return True
def read_config():