Update and rename MantenerFIFO to MantenerFIFO.md
[vsorcdistro/.git] / scripts / resetflows.sh
1 #!/bin/bash
2 : '
3 Written by: Felix G. Tejada
4
5 This is for clean all flows and set a default one on any switch.
6 '
7 dpid=$1
8 curl -X DELETE http://localhost:8080/stats/flowentry/clear/$dpid
9 curl -X POST -d '{
10     "dpid": "'"$dpid"'",
11     "cookie": 0,
12     "cookie_mask": 0,
13     "table_id": 0,
14     "idle_timeout": 0,
15     "hard_timeout": 0,
16     "priority": 0,
17     "flags": 0,
18     "match":{},
19     "actions":[
20         {
21             "type":"OUTPUT",
22             "port": "CONTROLLER"
23         }
24     ]
25  }' http://localhost:8080/stats/flowentry/add
26 echo "Flows was reseted"