modifify clear-all script test to destroy models 89/7589/1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 31 May 2019 13:41:31 +0000 (13:41 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 31 May 2019 13:41:53 +0000 (13:41 +0000)
Change-Id: I0ebd41352df29c221f3b1c5dbd26299a8b4959f2
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_nbi/tests/clear-all.sh

index 4bcd7f0..75599e5 100755 (executable)
@@ -104,6 +104,12 @@ fi
 
 if [ -n "$OSMNBI_CLEAN_VCA" ]
 then
 
 if [ -n "$OSMNBI_CLEAN_VCA" ]
 then
-    juju destroy-model -y default
-    juju add-model default
+    for juju_model in `juju models | grep lxd | grep -v controller | grep -v default | awk '{print$1}'`
+    do
+       echo
+       echo juju destroy-model  $juju_model
+       juju destroy-model -y $juju_model
+    done
+    # juju destroy-model -y default
+    # juju add-model default
 fi
 fi