예제 #1
0
파일: demo.py 프로젝트: esnet/enos
def workaround():
    # if this is the first time the demo is loaded, re-initialize the controller
    global firstTime

    if firstTime:
        cont = Controller.getInstance()
        cont.reinit()
        firstTime = False
        cleandemomodules()
예제 #2
0
def workaround():
    # if this is the first time the demo is loaded, re-initialize the controller
    global firstTime

    if firstTime:
        cont = Controller.getInstance()
        cont.reinit()
        firstTime = False
        cleandemomodules()
예제 #3
0
파일: client.py 프로젝트: modulexcite/enos
    def __init__(self, topology):
        """
        Note: topology might not be ready at this moment,
        so you are not allowed to access anything related to topology.builder here.
        However, you could do it later in method init(self).
        :param topology: TestbedTopology whose builder is not ready yet
        """
        self.__class__ = SimpleController
        SimpleController.__init__(self)
        self.__class__ = ODLClient

        self.odlController = Controller.getInstance()
        self.odlMdsalImpl = self.odlController.getOdlMdsalImpl()
        self.odlCorsaImpl = self.odlController.getOdlCorsaImpl()

        ODLClient.topology = topology
        self.debug = 0
        self.dropLLDP = True
        self.odlSwitchIndex = {} # [key=dpid]
        self.switchIndex = {} # [key=odlNode.getID()]