0

Hi guys,

I'm trying to listen to socket disconnection with openflow.discovery component. But I have this error:

ubuntu@sdnhubvm:~/pox[09:35] (betta)$ ./pox.py openflow.discovery openflow.topology forwarding.tutorial_stateless_lb_copy
POX 0.1.0 (betta) / Copyright 2011-2013 James McCauley, et al.
Traceback (most recent call last):
  File "/home/ubuntu/pox/pox/boot.py", line 459, in boot
    if _do_launch(argv):
  File "/home/ubuntu/pox/pox/boot.py", line 199, in _do_launch
    f(**params)
  File "/home/ubuntu/pox/pox/forwarding/tutorial_stateless_lb_copy.py", line 104, in launch
    core.openflow_discovery.addListenerByName("openflow_ConnectionDown", Discovery._handle_openflow_ConnectionDown)
  File "/home/ubuntu/pox/pox/lib/revent/revent.py", line 378, in addListenerByName
    return self.addListener(*args,**kw)
  File "/home/ubuntu/pox/pox/lib/revent/revent.py", line 423, in addListener
    % (eventType, type(self)))
RuntimeError: Event openflow_ConnectionDown not defined on object of type <class 'pox.openflow.discovery.Discovery'>

Here is a part of my code:

from pox.openflow.discovery import Discovery

def launch ():
    # To intercept packets before the learning switch
    core.openflow.addListenerByName("PacketIn", _handle_PacketIn, priority=2)
    core.openflow_discovery.addListenerByName("openflow_ConnectionDown", Discovery._handle_openflow_ConnectionDown)
    log.info("Stateless LB running.")

However in the file "pox/openflow/discovery.py" the function handle_openflow_ConnectionDown is defined.

    def _handle_openflow_ConnectionDown (self, event):
    # Delete all links on this switch
    self._delete_links([link for link in self.adjacency
                        if link.dpid1 == event.dpid
                        or link.dpid2 == event.dpid])

Anyone here knows what's happening ?

Thanks in advance.


joooohny
  • 1
  • 1

0 Answers0