mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
warn on template rendering errors and continue + --syntax-check option to ifup +
minor parser cleanups Ticket: CM-2488 Reviewed By: Testing Done: Tested ifupdown sanity and also the interfaces file in CM-2488
This commit is contained in:
@ -570,7 +570,7 @@ class ifupdownMain(ifupdownBase):
|
||||
self.logger.warning('error saving state (%s)' %str(e))
|
||||
|
||||
def up(self, ops, auto=False, allow_classes=None, ifacenames=None,
|
||||
excludepats=None, printdependency=None):
|
||||
excludepats=None, printdependency=None, syntaxcheck=False):
|
||||
""" up an interface """
|
||||
|
||||
if auto:
|
||||
@ -582,6 +582,10 @@ class ifupdownMain(ifupdownBase):
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
# If only syntax check was requested, return here
|
||||
if syntaxcheck:
|
||||
return
|
||||
|
||||
if ifacenames:
|
||||
# If iface list is given by the caller, always check if iface
|
||||
# is present
|
||||
|
Reference in New Issue
Block a user