Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 1 | #! /bin/bash |
2 | |||||
3 | # put IP address of node running ONOS VTN App here | ||||
4 | DESIRED_CONTROLLER="tcp:130.127.133.24:6653" | ||||
5 | |||||
6 | while [[ 1 ]]; do | ||||
7 | CONTROLLER=`ovs-vsctl get-controller br-int` | ||||
8 | if [[ "$CONTROLLER" == "tcp:172.17.0.2:6653" ]]; then | ||||
9 | ovs-vsctl set-controller br-int $DESIRED_CONTROLLER | ||||
10 | echo "changed controller from $CONTROLLER to $DESIRED_CONTROLLER" | ||||
11 | fi | ||||
12 | sleep 10s | ||||
13 | done |