Fix Issue #243 and Issue #244:
- add_flow.py ignores src/dst mac address matching (#243)
- add_flow.py ignores matchSrcIPv4Net and matchDstIPv4Net (#244)
The root cause for both issues was incorrect Python identation
of a return statement: it was in the wrong level, hence the
arguments parsing was incorrect.
The issue was introduced in the last change to add_flow.py:
commit 08eb7325e726b621dd35be113e365eaefdbd81b9
diff --git a/web/add_flow.py b/web/add_flow.py
index 28819c9..9b5ab42 100755
--- a/web/add_flow.py
+++ b/web/add_flow.py
@@ -276,18 +276,18 @@
log_error(usage_msg)
exit(1)
- return {
- 'my_flow_id' : my_flow_id,
- 'my_installer_id' : my_installer_id,
- 'my_src_dpid' : my_src_dpid,
- 'my_src_port' : my_src_port,
- 'my_dst_dpid' : my_dst_dpid,
- 'my_dst_port' : my_dst_port,
- 'match' : match,
- 'matchInPortEnabled' : matchInPortEnabled,
- 'actions' : actions,
- 'actionOutputEnabled' : actionOutputEnabled
- }
+ return {
+ 'my_flow_id' : my_flow_id,
+ 'my_installer_id' : my_installer_id,
+ 'my_src_dpid' : my_src_dpid,
+ 'my_src_port' : my_src_port,
+ 'my_dst_dpid' : my_dst_dpid,
+ 'my_dst_port' : my_dst_port,
+ 'match' : match,
+ 'matchInPortEnabled' : matchInPortEnabled,
+ 'actions' : actions,
+ 'actionOutputEnabled' : actionOutputEnabled
+ }
def compute_data_path(parsed_args):