commit | 2ae3128b25ab1a592639b5101b161313facaf61d | [log] [tgz] |
---|---|---|
author | Masayoshi Kobayashi <masayoshi@onlab.us> | Fri Mar 15 02:31:09 2013 +0000 |
committer | Masayoshi Kobayashi <masayoshi@onlab.us> | Fri Mar 15 02:31:09 2013 +0000 |
tree | 7ee21deca941ee95b604bbf3a025c53320088547 | |
parent | ce2497160bf2c80653271b6d44cc21283160e5f0 [diff] |
add delflow.sh
diff --git a/delflow.sh b/delflow.sh new file mode 100755 index 0000000..f9ec506 --- /dev/null +++ b/delflow.sh
@@ -0,0 +1,17 @@ +#! /bin/bash +controller="" +switches=`ifconfig -a | grep sw |grep -v eth | awk '{print $1}'` + +function host2ip (){ + ip=`grep $1 /etc/hosts |grep -v "ip6"| awk '{print $1}'` + echo $ip +} + +url="" +for c in $controller; do + url="$url tcp:`host2ip $c`:6633" +done +echo $url +for s in $switches; do + sudo ovs-ofctl del-flows $s +done