def __init__(self, name): """ Note that server may be a direct reference to the NomServer (for simulation), or a Pyro4 proxy (for emulation) pre: name is unique across the network """ EventMixin.__init__(self) # We are a "controller" entity in pox.topology. # (Actually injecting ourself into pox.topology is handled # by nom_server) topology.Controller.__init__(self, name) self.name = name self.log = core.getLogger(name) # Construct an empty topology # The "master" copy topology will soon be merged into this guy self.topology = topology.Topology("topo:%s" % self.name) # Register subclass' event handlers self.listenTo(self.topology, "topology") self._server_connection = None self._queued_commits = [] # For simulation. can't connect to NomServer until the Messenger is listening to new connections # TODO: for emulation, this should be removed / refactored -- # just assume that the NomServer machine is up core.messenger.addListener(messenger.MessengerListening, self._register_with_server)
def __init__(self, name): """ Note that server may be a direct reference to the NomServer (for simulation), or a Pyro4 proxy (for emulation) pre: name is unique across the network """ EventMixin.__init__(self) # We are a "controller" entity in pox.topology. # (Actually injecting ourself into pox.topology is handled # by nom_server) topology.Controller.__init__(self, name) self.name = name self.log = core.getLogger(name) # Construct an empty topology # The "master" copy topology will soon be merged into this guy self.topology = topology.Topology("topo:%s" % self.name) # Register subclass' event handlers self.listenTo(self.topology, "topology") self._server_connection = None self._queued_commits = [] # For simulation. can't connect to NomServer until the Messenger is listening to new connections # TODO: for emulation, this should be removed / refactored -- # just assume that the NomServer machine is up core.messenger.addListener(messenger.MessengerListening, self._register_with_server)
def __init__ (self): EventMixin.__init__(self) # The following tables should go to Topology later self.entryByMAC = {} self._timer = Timer(TIMEOUT_SEC['timerInterval'], self.__check_timeouts__, recurring=True) core.openflow.addListenerByName("PacketIn", self._handle_PacketIn, priority=10000) log.info("HostTracker ready")
def __init__(self): EventMixin.__init__(self) print "publisher init"
def __init__(self): EventMixin.__init__(self) core.pktinHandler.addListeners(self) # 监听pktinHandler
def __init__(self, connection, **kwargs): EventMixin.__init__(self) self.connection = connection for name, value in kwargs.items(): setattr(self, name, value)
def raiseEvent(self, event, dpid, stats, unit): """ @override """ log.debug("%s from %s: \n%s\n", event, dpidToStr(dpid), stats) EventMixin.raiseEvent(self, event, dpid, stats, unit)
def __init__(self, unit): EventMixin.__init__(self) core.listenToDependencies(self, self._wantComponents) self.unit = unit
def __init__(self): # 父类初始化 EventMixin.__init__(self) self.connections = set() # 不确定需不需要留下 core.openflow.addListeners(self)
def __init__(self): EventMixin.__init__(self) core.Phase1.addListeners(self) # 监听phase1 是否进入phase2的检测 core.openflow.addListeners(self) # 监听openflow的stats_信息
def __init__(self): EventMixin.__init__(self)