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: Minoru TAKAHASHI <[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 bafbb02..89e8fbc 100644
--- a/ryu/app/ofctl_rest.py
+++ b/ryu/app/ofctl_rest.py
@@ -80,9 +80,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>
#
@@ -301,8 +307,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.9.1
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel