aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/test/bin/onos-set-controllers
blob: 27cc16c80df26d4165a6c970de547cf9b6001867 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# -----------------------------------------------------------------------------
# Sets controllers on all OVS bridges on the mininet machine.
# -----------------------------------------------------------------------------

controllers=""

for node in $ONOS_INSTANCES; do
    controllers="$controllers tcp:$node:${OF_PORT:-6653}"
done

ssh ${ONOS_USER:-sdn}@$OCN "
    sudo ovs-vsctl list-br | while read br; do
        echo \$br: $controllers
        sudo ovs-vsctl set-controller \$br $controllers
    done
"