Masayoshi Kobayashi | 7f02a80 | 2013-04-03 21:40:13 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | basename=$ONOS_CLUSTER_BASENAME |
| 3 | |
| 4 | fdef="flowdef_8node_42.txt" |
| 5 | echo "all links up" |
| 6 | dsh -w ${basename}1 "cd ONOS/scripts; ./all-linkup.sh" |
| 7 | echo "clean up flow" |
| 8 | dsh -w ${basename}1 "cd ONOS/web; ./delete_flow.py 1 100" |
| 9 | dsh -w ${basename}1 "cd ONOS/web; ./clear_flow.py 1 100" |
| 10 | sleep 1 |
| 11 | dsh -w ${basename}1 "cd ONOS/web; ./get_flow.py all" |
| 12 | dsh "cd ONOS/scripts; ./delflow.sh" |
| 13 | echo "checkup status" |
| 14 | ./check_status.py |
| 15 | read -p "hit anykey> " |
| 16 | |
| 17 | echo "install pre-set flows" |
| 18 | dsh -w ${basename}1 "cd ONOS/web; ./add_flow.py -m onos -f $fdef" |
| 19 | sleep 3 |
| 20 | echo "check" |
| 21 | dsh -w ${basename}1 "cd ONOS/web; ./pingall.py $fdef" |
| 22 | |
| 23 | ports=`dsh -w ${basename}1 "cd ONOS/scripts; ./listports.sh" | awk '{print $2}' |grep -v tap` |
| 24 | |
| 25 | for p in $ports; do |
| 26 | echo "port $p down" |
| 27 | read -p "hit anykey> " |
| 28 | dsh -w ${basename}1 "sudo ifconfig $p down" |
| 29 | echo "wait 3 sec" |
| 30 | sleep 3 |
| 31 | dsh -w ${basename}1 "cd ONOS/web; ./pingall.py $fdef" |
| 32 | echo "port $p up" |
| 33 | dsh -w ${basename}1 "sudo ifconfig $p up" |
| 34 | echo "wait 3 sec" |
| 35 | sleep 3 |
| 36 | dsh -w ${basename}1 "cd ONOS/web; ./pingall.py $fdef" |
| 37 | done |