Ejemplo n.º 1
0
    def start(self):
        launch_pox(self._config, self)
        time.sleep(1)

        from flex.pox.managers import ConcernManager
        self.concern_manager = ConcernManager()
        from flex.pox.managers import ProcesserManager
        self.processer_manager = ProcesserManager()
Ejemplo n.º 2
0
class PoxApp(Module):

    def __init__(self, self_controller, pox_config):
        self._myself = self_controller
        self._config = pox_config

    def start(self):
        launch_pox(self._config, self)
        time.sleep(1)

        from flex.pox.managers import ConcernManager
        self.concern_manager = ConcernManager()
        from flex.pox.managers import ProcesserManager
        self.processer_manager = ProcesserManager()

    def register(self, concern_type, switch = None):
        self.concern_manager.add(concern_type, switch)

    def process(self, api_content):
        self.processer_manager.process(api_content)

    def terminate(self):
        terminate_pox()