diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2012-02-10 11:43:21 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2012-02-10 16:45:14 +0900 |
commit | 2c018c6b999fa6a3bab9849ce0c835cc8f9d1228 (patch) | |
tree | 15b17c3d2682c6ec4983d04845239e8ef5b40702 | |
parent | c597ecf1b75cd2ad6ba5def615eeb09a66dedbb1 (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.py | 6 |
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, |