ofctl_rest is now enable to modify and delete with strict matching.
usage)
URI: /stats/flowentry/modify_strict
/stats/flowentry/delete_strict
method: POST
e.g. )
curl -X POST -d '{"dpid": 1,
"actions":[{"port":3, "type":"OUTPUT"}],
"match":{"in_port":2}}'
http://localhost:8080/stats/flowentry/modify_strict
curl -X POST -d '{"dpid": 1,
"match":{"in_port":2}}'
http://localhost:8080/stats/flowentry/delete_strict
Signed-off-by: TAKAHASHI Minoru <[email protected]>
---
ryu/app/ofctl_rest.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/ryu/app/ofctl_rest.py b/ryu/app/ofctl_rest.py
index 51c1eef..2f5716d 100644
--- a/ryu/app/ofctl_rest.py
+++ b/ryu/app/ofctl_rest.py
@@ -77,9 +77,15 @@ LOG = logging.getLogger('ryu.app.ofctl_rest')
# modify all matching flow entries
# POST /stats/flowentry/modify
#
+# modify flow entry strictly matching wildcards and priority
+# POST /stats/flowentry/modify_strict
+#
# delete all matching flow entries
# POST /stats/flowentry/delete
#
+# delete flow entry strictly matching wildcards and priority
+# POST /stats/flowentry/delete_strict
+#
# delete all flow entries of the switch
# DELETE /stats/flowentry/clear/<dpid>
#
@@ -277,8 +283,12 @@ class StatsController(ControllerBase):
cmd = dp.ofproto.OFPFC_ADD
elif cmd == 'modify':
cmd = dp.ofproto.OFPFC_MODIFY
+ elif cmd == 'modify_strict':
+ cmd = dp.ofproto.OFPFC_MODIFY_STRICT
elif cmd == 'delete':
cmd = dp.ofproto.OFPFC_DELETE
+ elif cmd == 'delete_strict':
+ cmd = dp.ofproto.OFPFC_DELETE_STRICT
else:
return Response(status=404)
--
1.7.10.4
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel