Signed-off-by: Yuichi Ito <[email protected]>
---
 ryu/tests/switch/tester.py |   23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py
index 68d0ec8..135b036 100644
--- a/ryu/tests/switch/tester.py
+++ b/ryu/tests/switch/tester.py
@@ -1048,23 +1048,20 @@ class OpenFlowSw(object):
         self.dp.send_msg(msg)
         return msg.xid
 
-    def add_flow(self, flow_mod=None, in_port=None, out_port=None):
+    def add_flow(self, in_port=None, out_port=None):
         """ Add flow. """
         ofp = self.dp.ofproto
         parser = self.dp.ofproto_parser
 
-        if flow_mod:
-            mod = flow_mod
-        else:
-            match = parser.OFPMatch(in_port=in_port)
-            max_len = (0 if out_port != ofp.OFPP_CONTROLLER
-                       else ofp.OFPCML_MAX)
-            actions = [parser.OFPActionOutput(out_port, max_len)]
-            inst = [parser.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS,
-                                                 actions)]
-            mod = parser.OFPFlowMod(self.dp, cookie=0,
-                                    command=ofp.OFPFC_ADD,
-                                    match=match, instructions=inst)
+        match = parser.OFPMatch(in_port=in_port)
+        max_len = (0 if out_port != ofp.OFPP_CONTROLLER
+                   else ofp.OFPCML_MAX)
+        actions = [parser.OFPActionOutput(out_port, max_len)]
+        inst = [parser.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS,
+                                             actions)]
+        mod = parser.OFPFlowMod(self.dp, cookie=0,
+                                command=ofp.OFPFC_ADD,
+                                match=match, instructions=inst)
         return self._send_msg(mod)
 
     def send_barrier_request(self):
-- 
1.7.10.4


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to