commit | 8df0244de22e8c297669919ced06fb69e946d1dd | [log] [tgz] |
---|---|---|
author | Pavlin Radoslavov <pavlin@onlab.us> | Wed Apr 03 21:41:05 2013 +0000 |
committer | Pavlin Radoslavov <pavlin@onlab.us> | Wed Apr 03 21:41:05 2013 +0000 |
tree | e45df94f7d2467803edcac595c2d8b006add2d08 | |
parent | 55c294404142e4765e752c1483c882d916600469 [diff] [blame] |
added listports script
diff --git a/scripts/listports.sh b/scripts/listports.sh new file mode 100755 index 0000000..792ea37 --- /dev/null +++ b/scripts/listports.sh
@@ -0,0 +1,13 @@ +#! /bin/bash + +controller=`hostname` +switches=`sudo ovs-vsctl list-br` + +function host2ip (){ + ip=`grep $1 /etc/hosts |grep -v "ip6"| awk '{print $1}'` + echo $ip +} + +for s in $switches; do + sudo ovs-vsctl --pretty list-ports $s +done