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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user