blob: 1dff2915faae398868b20eaf593cc1a9692e4fde [file] [log] [blame]
Masayoshi Kobayashi57572b12013-03-13 22:27:50 +00001#! /bin/bash
2controller=""
Masayoshi Kobayashib738b212013-04-03 02:26:51 +00003#switches=`ifconfig -a | grep sw |grep -v eth | awk '{print $1}'`
4switches=`sudo ovs-vsctl list-br`
Masayoshi Kobayashi57572b12013-03-13 22:27:50 +00005
6function host2ip (){
7 ip=`grep $1 /etc/hosts |grep -v "ip6"| awk '{print $1}'`
8 echo $ip
9}
10
11url=""
12for c in $controller; do
13 url="$url tcp:`host2ip $c`:6633"
14done
15echo $url
16for s in $switches; do
Masayoshi Kobayashi8afa8822013-04-02 22:20:33 +000017 echo -n "$s : "
Masayoshi Kobayashi57572b12013-03-13 22:27:50 +000018 sudo ovs-ofctl show $s |grep dpid
19done