From d9cc2ea309e1ebd80402b6be79b6cde821cdc45f Mon Sep 17 00:00:00 2001 From: Narinder Gupta Date: Sat, 11 Jun 2016 08:19:47 -0500 Subject: [PATCH] modified to use admin network gateway for onos. Change-Id: I3fd9e36673adcc7ccd4e6b8ea520da92cc8f6ba8 Signed-off-by: Narinder Gupta --- ci/02-maasdeploy.sh | 10 ++++++++++ ci/deploy.py | 4 +++- ci/openstack.sh | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh index e3bc99ff..7214719d 100755 --- a/ci/02-maasdeploy.sh +++ b/ci/02-maasdeploy.sh @@ -251,6 +251,7 @@ enable_if(){ 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 @@ -272,6 +273,15 @@ enable_if(){ 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 } diff --git a/ci/deploy.py b/ci/deploy.py index 65e19246..e3d3cddd 100644 --- a/ci/deploy.py +++ b/ci/deploy.py @@ -54,7 +54,7 @@ opnfvcfg['demo-maas']={'juju-bootstrap':{'memory': 4096,'name': "bootstrap",\ } 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") @@ -88,6 +88,7 @@ while c < len(labcfg["opnfv"]["spaces"]): 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,\ @@ -132,6 +133,7 @@ while c < len(labcfg["opnfv"]["spaces"]): 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' diff --git a/ci/openstack.sh b/ci/openstack.sh index 75bf1156..ed32f997 100755 --- a/ci/openstack.sh +++ b/ci/openstack.sh @@ -19,6 +19,7 @@ if [ -f ./deployconfig.yaml ];then 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 @@ -28,7 +29,7 @@ launch_eth() { 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 } -- 2.16.6