blob: 34950c5bb100e563cf432ba1316484c764bb777e [file] [log] [blame]
Masayoshi Kobayashi1ef9ec02013-04-12 18:03:12 +00001#! /bin/bash
Masayoshi Kobayashi0135ec82013-12-18 22:57:46 +00002source ~/env_cluster
Masayoshi Kobayashi1ef9ec02013-04-12 18:03:12 +00003basename=$ONOS_CLUSTER_BASENAME
4DIR=${HOME}/ONOS
Masayoshi Kobayashibc477de2013-04-12 18:09:37 +00005tstart=`date +"%s"`
Masayoshi Kobayashi1ef9ec02013-04-12 18:03:12 +00006echo "All Link Up"
7$DIR/scripts/all-linkup.sh
8echo "Delete Flows"
Masayoshi Kobayashi0135ec82013-12-18 22:57:46 +00009$DIR/web/delete_flow.py 1 300
10$DIR/web/clear_flow.py 1 300
Masayoshi Kobayashi1ef9ec02013-04-12 18:03:12 +000011echo "Adding Flows"
12$DIR/web/add_flow.py -m onos -f $DIR/web/flowdef_demo_start.txt
Masayoshi Kobayashi0135ec82013-12-18 22:57:46 +000013ssh -i ~/.ssh/onlabkey.pem ${basename}5 'cd ONOS;./start-onos.sh stop'
14ssh -i ~/.ssh/onlabkey.pem ${basename}6 'cd ONOS;./start-onos.sh stop'
15ssh -i ~/.ssh/onlabkey.pem ${basename}7 'cd ONOS;./start-onos.sh stop'
16ssh -i ~/.ssh/onlabkey.pem ${basename}8 'cd ONOS;./start-onos.sh stop'
17for i in 1 2 3 4 ; do
18 ssh -i ~/.ssh/onlabkey.pem ${basename}$i 'cd ONOS;./start-onos.sh startifdown'
Masayoshi Kobayashi1ef9ec02013-04-12 18:03:12 +000019done
20sleep 2
21for 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'
23done
Masayoshi Kobayashibc477de2013-04-12 18:09:37 +000024tend=`date +"%s"`
25(( delta = tend - tstart ))
Masayoshi Kobayashi1ef9ec02013-04-12 18:03:12 +000026echo "Demo Reset Done: took $delta sec"