Masayoshi Kobayashi | 1ef9ec0 | 2013-04-12 18:03:12 +0000 | [diff] [blame] | 1 | #! /bin/bash |
Masayoshi Kobayashi | 0135ec8 | 2013-12-18 22:57:46 +0000 | [diff] [blame] | 2 | source ~/env_cluster |
Masayoshi Kobayashi | 1ef9ec0 | 2013-04-12 18:03:12 +0000 | [diff] [blame] | 3 | basename=$ONOS_CLUSTER_BASENAME |
| 4 | DIR=${HOME}/ONOS |
Masayoshi Kobayashi | bc477de | 2013-04-12 18:09:37 +0000 | [diff] [blame] | 5 | tstart=`date +"%s"` |
Masayoshi Kobayashi | 1ef9ec0 | 2013-04-12 18:03:12 +0000 | [diff] [blame] | 6 | echo "All Link Up" |
| 7 | $DIR/scripts/all-linkup.sh |
| 8 | echo "Delete Flows" |
Masayoshi Kobayashi | 0135ec8 | 2013-12-18 22:57:46 +0000 | [diff] [blame] | 9 | $DIR/web/delete_flow.py 1 300 |
| 10 | $DIR/web/clear_flow.py 1 300 |
Masayoshi Kobayashi | 1ef9ec0 | 2013-04-12 18:03:12 +0000 | [diff] [blame] | 11 | echo "Adding Flows" |
| 12 | $DIR/web/add_flow.py -m onos -f $DIR/web/flowdef_demo_start.txt |
Masayoshi Kobayashi | 0135ec8 | 2013-12-18 22:57:46 +0000 | [diff] [blame] | 13 | ssh -i ~/.ssh/onlabkey.pem ${basename}5 'cd ONOS;./start-onos.sh stop' |
| 14 | ssh -i ~/.ssh/onlabkey.pem ${basename}6 'cd ONOS;./start-onos.sh stop' |
| 15 | ssh -i ~/.ssh/onlabkey.pem ${basename}7 'cd ONOS;./start-onos.sh stop' |
| 16 | ssh -i ~/.ssh/onlabkey.pem ${basename}8 'cd ONOS;./start-onos.sh stop' |
| 17 | for i in 1 2 3 4 ; do |
| 18 | ssh -i ~/.ssh/onlabkey.pem ${basename}$i 'cd ONOS;./start-onos.sh startifdown' |
Masayoshi Kobayashi | 1ef9ec0 | 2013-04-12 18:03:12 +0000 | [diff] [blame] | 19 | done |
| 20 | sleep 2 |
| 21 | for i in 1 2 3 4 5 6 7 8; do |
| 22 | ssh -i ~/.ssh/onlabkey.pem ${basename}$i 'cd ONOS/scripts; ./ctrl-local.sh' |
| 23 | done |
Masayoshi Kobayashi | bc477de | 2013-04-12 18:09:37 +0000 | [diff] [blame] | 24 | tend=`date +"%s"` |
| 25 | (( delta = tend - tstart )) |
Masayoshi Kobayashi | 1ef9ec0 | 2013-04-12 18:03:12 +0000 | [diff] [blame] | 26 | echo "Demo Reset Done: took $delta sec" |