modfied to fix it for onos.
[joid.git] / ci / 02-maasdeploy.sh
index e3bc99f..62e57da 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
 
@@ -268,7 +269,16 @@ enable_if(){
           i="0"
           while [ ! -z "${EXTNET[i]}" ];
           do
-              echo enableautomode ${EXTNET[i]} AUTO $stornet || true
+              enableautomode ${EXTNET[i]} AUTO $stornet || true
+              i=$[$i+1]
+          done
+      fi
+      if [ "$pubnet" != "''" ]; then
+          EXTNET=(${enableiflist//,/ })
+          i="0"
+          while [ ! -z "${EXTNET[i]}" ];
+          do
+              enableautomode ${EXTNET[i]} AUTO $pubnet || true
               i=$[$i+1]
           done
       fi