blob: 110eeffa184c5d273c62dafa1f187b1adea1aab6 [file] [log] [blame]
Miniuser50a51122013-03-14 18:10:41 -07001#! /bin/bash
2controller="10.128.4.12 10.128.4.13 10.128.4.14 10.128.4.15 10.128.4.16"
3switches=`ifconfig -a | grep "^s" |grep -v eth | awk '{print $1}'`
4
5function host2ip (){
6 ip=`grep $1 /etc/hosts |grep -v "ip6"| awk '{print $1}'`
7 echo $ip
8}
9
10url=""
11for c in $controller; do
12 url="$url tcp:$c:6633"
13done
14echo $url
15for s in $switches; do
16 echo "set switch $s controller $url"
17 sudo ovs-vsctl set-controller $s $url
18done