# Path: ravel/log.py
# LEVELS = { "debug" : logging.DEBUG,
#            "info" : logging.INFO,
#            "warning" : logging.WARNING,
#            "error" : logging.ERROR,
#            "critical" : logging.CRITICAL
#        }
# DEFAULT_LEVEL = logging.ERROR
# MSG_FORMAT = "%(levelname)s:%(funcName)s: %(message)s"
# class Singleton(type):
# class RavelLogger(Logger, object):
#     def __init__(cls, name, bases, dict_):
#     def __call__(cls, *args, **kw):
#     def __init__(self):
#     def setLogLevel(self, levelname=None):


import os
import mininet.clean
from ravel.log import logger
"""
Clean up Ravel and Mininet.
"""


def clean():
    "Try to kill Pox controller and clean Mininet"
    logger.info("killing Pox controller instance")
    os.system("pkill -9 -f pox.py")


# Path: ravel/log.py
# LEVELS = { "debug" : logging.DEBUG,
#            "info" : logging.INFO,
#            "warning" : logging.WARNING,
#            "error" : logging.ERROR,
#            "critical" : logging.CRITICAL
#        }
# DEFAULT_LEVEL = logging.ERROR
# MSG_FORMAT = "%(levelname)s:%(funcName)s: %(message)s"
# class Singleton(type):
# class RavelLogger(Logger, object):
#     def __init__(cls, name, bases, dict_):
#     def __call__(cls, *args, **kw):
#     def __init__(self):
#     def setLogLevel(self, levelname=None):


# Path: ravel/clean.py
import os
import mininet.clean
from ravel.log import logger

"""
Clean up Ravel and Mininet.
"""


def clean():
    "Try to kill Pox controller and clean Mininet"
    logger.info("killing Pox controller instance")
    os.system("pkill -9 -f pox.py")


    logger.info("cleaning Mininet")