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