1
0
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:
roopa
2014-03-28 06:03:14 -07:00
parent 08179c9d2e
commit 9dce35612d
4 changed files with 81 additions and 57 deletions

View File

@ -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