mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
This is a major update coming all at once from master-next branch master-next branch was started with --orphan option which is basically a new branch without history. The major changes are: - repackaging - cleanup the directory tree - rewritte setup.py to allow install from deb file or pypi (pip install) - add a Makefile to make things (like building a deb) easier - review all debian files Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
59 lines
960 B
Python
59 lines
960 B
Python
#!/usr/bin/python
|
|
#
|
|
# Copyright 2014-2017 Cumulus Networks, Inc. All rights reserved.
|
|
# Authors:
|
|
# Roopa Prabhu, roopa@cumulusnetworks.com
|
|
# Julien Fortin, julien@cumulusnetworks.com
|
|
#
|
|
# ifupdown --
|
|
# exceptions
|
|
#
|
|
|
|
try:
|
|
from ifupdown2.ifupdown.log import log
|
|
except:
|
|
from ifupdown.log import log
|
|
|
|
|
|
class Error(Exception):
|
|
"""Base class for exceptions in ifupdown"""
|
|
|
|
def log_error(self):
|
|
log.error(self.message)
|
|
|
|
def log_warning(self):
|
|
log.warning(self.message)
|
|
|
|
def log_info(self):
|
|
log.info(self.message)
|
|
|
|
def log_debug(self):
|
|
log.debug(self.message)
|
|
|
|
|
|
class ArgvParseError(Error):
|
|
"""
|
|
Exception coming from argv parsing
|
|
"""
|
|
pass
|
|
|
|
|
|
class ifaceNotFoundError(Error):
|
|
pass
|
|
|
|
|
|
class invalidValueError(Error):
|
|
pass
|
|
|
|
|
|
class errorReadingStateError(Error):
|
|
pass
|
|
|
|
|
|
class moduleNotSupported(Error):
|
|
pass
|
|
|
|
|
|
class ReservedVlanException(Error):
|
|
pass
|