use flat-net-1 addresses for baremetal machine gre tunnels
diff --git a/xos/configurations/cord/dataplane/generate-bm.sh b/xos/configurations/cord/dataplane/generate-bm.sh
old mode 100755
new mode 100644
index 1a3ec78..51504d1
--- a/xos/configurations/cord/dataplane/generate-bm.sh
+++ b/xos/configurations/cord/dataplane/generate-bm.sh
@@ -9,9 +9,12 @@
NODES=`sudo bash -c "source /root/setup/admin-openrc.sh ; nova hypervisor-list" |grep cloudlab|awk '{print $4}'`
I=1
for NODE in $NODES; do
- IP=`getent hosts $NODE | awk '{ print $1 }'`
- echo switch_volt$I ansible_ssh_host=$( get_ip mysite_volt flat-lan-1-net) grename=gre-bm-$I bm_addr=$IP
- echo bm$I ansible_ssh_host=$IP grename=gre-bm-$I volt_addr=$( get_ip mysite_volt lan_network) ansible_ssh_private_key_file=/root/.ssh/id_rsa
+ BM_SSH_IP=`getent hosts $NODE | awk '{ print $1 }'`
+ IFS=. read BM_NAME BM_REMAINDER <<< $NODE
+ BM_IP=`grep -i $BM_NAME /root/setup/data-hosts.flat-lan-1 | awk '{print $1}'`
+
+ echo switch_volt$I ansible_ssh_host=$( get_ip mysite_volt flat-lan-1-net) grename=gre-bm-$I bm_addr=$BM_IP
+ echo bm$I ansible_ssh_host=$BM_SSH_IP grename=gre-bm-$I volt_addr=$( get_ip mysite_volt flat-lan-1-net) ansible_ssh_private_key_file=/root/.ssh/id_rsa
I=$(( I+1 ))
done