Thomas Vachuska | 871262f | 2015-09-09 17:14:01 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # ----------------------------------------------------------------------------- |
| 3 | # Sets controllers on all OVS bridges on the mininet machine. |
| 4 | # ----------------------------------------------------------------------------- |
| 5 | |
| 6 | controllers="" |
| 7 | |
| 8 | for node in $ONOS_INSTANCES; do |
Charles Chan | 45624b8 | 2015-08-24 00:29:20 +0800 | [diff] [blame] | 9 | controllers="$controllers tcp:$node:${OF_PORT:-6653}" |
Thomas Vachuska | 871262f | 2015-09-09 17:14:01 -0700 | [diff] [blame] | 10 | done |
| 11 | |
| 12 | ssh ${ONOS_USER:-sdn}@$OCN " |
| 13 | sudo ovs-vsctl list-br | while read br; do |
| 14 | echo \$br: $controllers |
| 15 | sudo ovs-vsctl set-controller \$br $controllers |
| 16 | done |
| 17 | " |