我正在尝试处理 POX 中的主机事件。所以我创建了一个类
class DynaRouteStateHandler(object):
def __init__ (self):
def startup():
core.openflow_discovery.addListeners(self)
core.host_tracker.addListeners(self)
core.call_when_ready(startup, ('openflow','openflow_discovery','host_tracker'))
def _handle_HostEvent (self, event):
print "CALLED"
但是我看不到调用的消息。另外,当我尝试在 mininet 中 pingall 时,我收到很多这样的消息
INFO:host_tracker:Learned 3 2 5a:89:55:b5:5a:5f moved to 1 2
WARNING:host_tracker:Possible duplicate: 3 2 5a:89:55:b5:5a:5f at time 1425142891, now (1 2), time 1425142892
INFO:host_tracker:Learned 2 1 76:4e:52:91:1b:2b moved to 3 1
WARNING:host_tracker:Possible duplicate: 2 1 76:4e:52:91:1b:2b at time 1425142891, now (3 1), time 1425142892
知道为什么它会发出如此奇怪的警告吗?另外为什么不调用handle_HostEvent 函数?