This patch implements REST API for accessing state. This module helps
your debugging and retrieving various statistics. It also supports
flow entry pusher to allow users to manually insert flows into switch.
- get all switch DPIDs connected to the controller
$ curl http://<controller_ip>:8080/stats/switches
- get the desc stats
$ curl http://<controller_ip>:8080/stats/desc/<dpid>
- get flows stats
$ curl http://<controller_ip>:8080/stats/flow/<dpid>
- get ports stats
$ curl http://<controller_ip>:8080/stats/port/<dpid>
- add a flow entry
$ curl -d '{"dpid": "1", "cookie":"0", "priority":"32768", \
"actions":[{"port":2, "type":"OUTPUT"}], "match":{"in_port":1}}' \
http://<controller_ip>:8080/stats/flowentry
- delete all flows of the switch
$ curl -X DELETE \
http://<controller_ip>:8080/stats/flowentry/clear/<dpid>
Signed-off-by: OHMURA Kei <ohmura.kei@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>