summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2012-02-10 11:43:21 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-02-10 16:45:14 +0900
commit2c018c6b999fa6a3bab9849ce0c835cc8f9d1228 (patch)
tree15b17c3d2682c6ec4983d04845239e8ef5b40702
parentc597ecf1b75cd2ad6ba5def615eeb09a66dedbb1 (diff)
controller/datapath: add a helper function to delete flow entries
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/controller/controller.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py
index 79754e8b..9f6ef714 100644
--- a/ryu/controller/controller.py
+++ b/ryu/controller/controller.py
@@ -190,6 +190,12 @@ class Datapath(object):
priority, buffer_id, out_port, flags, actions)
self.send_msg(flow_mod)
+ def send_flow_del(self, match, cookie, out_port=None):
+ self.send_flow_mod(match=match, cookie=cookie,
+ command=self.ofproto.OFPFC_DELETE,
+ idle_timeout=0, hard_timeout=0, priority=0,
+ out_port=out_port)
+
def send_delete_all_flows(self):
match = self.ofproto_parser.OFPMatch(self.ofproto.OFPFW_ALL,
0, 0, 0, 0, 0,