import sys
import uuid
-try:
- import netns
-except ImportError:
- pass
-
class NetNSWrapper(object):
def __init__(self, loglevel = logging.INFO, enable_dump = False):
super(NetNSWrapper, self).__init__()
def create(self, clazzname, *args):
""" This method should be used to construct netns objects """
+ import netns
if clazzname not in ['open'] and not hasattr(netns, clazzname):
msg = "Type %s not supported" % (clazzname)
self.debuger.dump_shutdown()
########
+ ### FLUSH PIPES
sys.stdout.flush()
sys.stderr.flush()
+ ### RELEASE OBJECTS
+ del self._objects
+
### DEBUG
self.logger.debug("SHUTDOWN")
########