enableiflist=`grep "interface-enable" deployconfig.yaml | cut -d ' ' -f 4 `
datanet=`grep "dataNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
stornet=`grep "storageNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
+ pubnet=`grep "publicNetwork" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //'`
# split EXTERNAL_NETWORK=first ip;last ip; gateway;network
i=$[$i+1]
done
fi
+ if [ "$pubnet" != "''" ]; then
+ EXTNET=(${enableiflist//,/ })
+ i="0"
+ while [ ! -z "${EXTNET[i]}" ];
+ do
+ echo enableautomode ${EXTNET[i]} AUTO $pubnet || true
+ i=$[$i+1]
+ done
+ fi
fi
}
}
opnfvlabcfg['opnfv']={'ext-port':'','floating-ip-range':'','dataNetwork':'','ceph-disk':'/srv/',\
- 'storageNetwork':'','interface-enable':""}
+ 'storageNetwork':'','interface-enable':'','publicNetwork':''}
opnfvcfg['demo-maas']['maas']['apt_sources'].append("ppa:maas/stable")
opnfvcfg['demo-maas']['maas']['apt_sources'].append("ppa:juju/stable")
brgway = getFromDict(labcfg, ["opnfv","spaces",c,"gateway"])
tmpcidr = brcidr[:-4]
opnfvlabcfg["opnfv"]["admNetwork"]=tmpcidr+"2"
+ opnfvlabcfg["opnfv"]["admNetworkgway"]=brgway
nodegroup={"device": "eth"+str(y), "ip": tmpcidr+"5","subnet_mask": "255.255.255.0", \
"broadcast_ip": tmpcidr+"255", "router_ip": brgway,\
y=y+1
if brtype == "public":
opnfvcfg["demo-maas"]["juju-bootstrap"]["interfaces"].append("bridge="+brname+",model=virtio")
+ opnfvlabcfg["opnfv"]["pubicNetwork"]=brcidr
if brtype == "external":
ipaddress = getFromDict(labcfg, ["opnfv","spaces",c,"ipaddress"])
ethbrAdm = (ethbrAdm+'\n'
EXTNET_GW=${EXTNET[2]}
EXTNET_NET=${EXTNET[3]}
EXTNET_PORT=`grep "ext-port" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //' | tr ',' ' '`
+ ADMNET_GW=`grep "admNetworkgway" deployconfig.yaml | cut -d ' ' -f 4 | sed -e 's/ //' | tr ',' ' '`
fi
for node in $computer_list; do
echo "node name is ${node}"
juju ssh $node "sudo ifconfig $EXTNET_PORT up"
- juju ssh $node "sudo route del default gw $EXTNET_GW"
+ juju ssh $node "sudo route del default gw $ADMNET_GW"
done
}