Update and rename MantenerFIFO to MantenerFIFO.md
[vsorcdistro/.git] / scripts / removeflows.sh
1 #!/bin/bash
2 : '
3 Written by: Felix G. Tejada
4
5 This script is applied to a linear 3 topo, just for show the example
6 '
7 echo "Cleaning all flows entry switch dpid 1 and 2"
8 curl -X DELETE http://localhost:8080/stats/flowentry/clear/1
9 curl -X DELETE http://localhost:8080/stats/flowentry/clear/2
10 curl -X DELETE http://localhost:8080/stats/flowentry/clear/3
11 echo "adding default flows entry to all switches"
12
13 curl -X POST -d '{
14     "dpid": 1,
15     "cookie": 0,
16     "cookie_mask": 0,
17     "table_id": 0,
18     "idle_timeout": 0,
19     "hard_timeout": 0,
20     "priority": 0,
21     "flags": 0,
22     "match":{},
23     "actions":[
24         {
25             "type":"OUTPUT",
26             "port": "CONTROLLER"
27         }
28     ]
29  }' http://localhost:8080/stats/flowentry/add
30
31
32 curl -X POST -d '{
33     "dpid": 2,
34     "cookie": 0,
35     "cookie_mask": 0,
36     "table_id": 0,
37     "idle_timeout": 0,
38     "hard_timeout": 0,
39     "priority": 0,
40     "flags": 0,
41     "match":{},
42     "actions":[
43         {
44             "type":"OUTPUT",
45             "port": "CONTROLLER"
46         }
47     ]
48  }' http://localhost:8080/stats/flowentry/add
49
50 curl -X POST -d '{
51     "dpid": 3,
52     "cookie": 0,
53     "cookie_mask": 0,
54     "table_id": 0,
55     "idle_timeout": 0,
56     "hard_timeout": 0,
57     "priority": 0,
58     "flags": 0,
59     "match":{},
60     "actions":[
61         {
62             "type":"OUTPUT",
63             "port": "CONTROLLER"
64         }
65     ]
66  }' http://localhost:8080/stats/flowentry/add
67