I'm trying to get the requested FlowStat information in Simple_monitor_13 (Ryu SDN Controller), but when run with a simple mininet topology and "pingall", the application keeps reporting Keyerrors coming from very basic Match Fields like Ipv4_src, eth_type. Did I misunderstand how this event works? And how can this request be fulfilled?
for stat in sorted([flow for flow in body if (flow.priority == 1)], key=lambda flow:
(flow.match['in_port'], flow.match['eth_dst'],flow.match['ipv4_src'],flow.match['ipv4_dst'],flow.match['ip_proto'])):
flow_stat['table_id']= stat.table_id
flow_stat['priority'] = stat.priority
flow_stat['in_port'] = stat.match['in_port']
flow_stat['ip_proto'] = stat.match['ip_proto']
flow_stat['ipv4_src'] = stat.match['ipv4_src']
flow_stat['ipv4_dst'] = stat.match['ipv4_dst']
File "c:\users\acer\appdata\local\programs\python\python38-32\lib\site-packages\ryu\base\app_manager.py", line 290, in _event_loop
handler(ev)
File "E:\SDN_ML_Anaconda\ryu\ryu\app\simple_monitor_13_fetch.py", line 91, in _flow_stats_reply_handler
for stat in sorted([flow for flow in body if (flow.priority == 1)], key=lambda flow:
File "E:\SDN_ML_Anaconda\ryu\ryu\app\simple_monitor_13_fetch.py", line 92, in <lambda>
(flow.match['in_port'], flow.match['eth_dst'],flow.match['ipv4_src'],flow.match['ipv4_dst'],flow.match['ip_proto'])):
File "c:\users\acer\appdata\local\programs\python\python38-32\lib\site-packages\ryu\ofproto\ofproto_v1_3_parser.py", line 904, in __getitem__
return dict(self._fields2)[key]
KeyError: 'ipv4_src'