modified to use admin network gateway for onos. 05/15405/1
authorNarinder Gupta <narinder.gupta@canonical.com>
Sat, 11 Jun 2016 13:19:47 +0000 (08:19 -0500)
committerNarinder Gupta <narinder.gupta@canonical.com>
Sat, 11 Jun 2016 13:34:26 +0000 (08:34 -0500)
Change-Id: I3fd9e36673adcc7ccd4e6b8ea520da92cc8f6ba8
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
ci/02-maasdeploy.sh
ci/deploy.py
ci/openstack.sh

index e3bc99f..7214719 100755 (executable)
@@ -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
 }
 
index 65e1924..e3d3cdd 100644 (file)
@@ -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'
index 75bf115..ed32f99 100755 (executable)
@@ -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
 }