Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Abdullah Soliman

Pages: [1]
1
Hi all,

In my topology, I need to send some Packets from the edge switch into a controller through some switches. So, to know whose the first switch in the track and the host connected port, I use the simple _switch_13 code  with some modifications as follows:

I added

from ryu.topology.switches import Switch
from ryu.topology.api import get_switch, get_link


and I added into the def _packet_in_handler(self, ev):

B = get_switch(self, None)       
obj = Switch(B)
A = obj.to_dict()


and I get the next error :

Traceback (most recent call last):
  File "/home/mininet/ryu/ryu/base/app_manager.py", line 290, in _event_loop
    handler(ev)
  File "/home/mininet/ryu/ryu/app/C2.py", line 85, in _packet_in_handler
    A = obj.to_dict()
  File "/home/mininet/ryu/ryu/topology/switches.py", line 124, in to_dict
    d = {'dpid': dpid_to_str(self.dp.id),
AttributeError: 'list' object has no attribute 'id'

any solution ?


Pages: [1]