modfied to cleanup copying of yaml files from .juju/
[joid.git] / ci / openstack.sh
index 08f1548..a76785b 100755 (executable)
@@ -128,12 +128,14 @@ create_openrc
 echo "...... deploy public api proxy ......"
 
 if [ "$opnfvlab" == "orangepod1" ] && [ "$opnfvsdn" == "nosdn" ]; then # only for first test phase
-    PUB_API_NET=$(grep floating-ip-range ./labconfig.yaml |cut -d/ -f2)
-    PUB_API_IP=$(grep public-api-ip ./labconfig.yaml |cut -d: -f2)
-    juju run --unit nodes/0 "sudo ip a a ${PUB_API_IP}/${PUB_API_NET} dev br-ex" || true
-    juju run --unit nodes/0 "sudo ip l set dev br-ex up" || true
-    python genPublicAPIProxyBundle.py -l labconfig.yaml >> bundles.yaml
-    juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $opnfvdistro-"$openstack" || true
+    if [ -e ./labconfig.yaml ]; then
+        PUB_API_NET=$(grep floating-ip-range ./labconfig.yaml |cut -d/ -f2)
+        PUB_API_IP=$(grep public-api-ip ./labconfig.yaml |cut -d: -f2)
+        juju run --unit nodes/0 "sudo ip a a ${PUB_API_IP}/${PUB_API_NET} dev br-ex" || true
+        juju run --unit nodes/0 "sudo ip l set dev br-ex up" || true
+        python genPublicAPIProxyBundle.py -l labconfig.yaml >> bundles.yaml
+        juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $opnfvdistro-"$openstack" || true
+    fi
 fi
 
 echo "...... deploy end public api proxy ......"