Change destination of snmp mibs files from
[apex.git] / ci / clean.sh
index 1e5e320..fba1f12 100755 (executable)
@@ -13,9 +13,9 @@
 #author: Tim Rozet (trozet@redhat.com)
 
 # Use default if no param passed
-CONFIG=${CONFIG:-'/var/opt/opnfv'}
-RESOURCES=${RESOURCES:-"$CONFIG/images"}
-LIB=${LIB:-"$CONFIG/lib"}
+BASE=${BASE:-'/var/opt/opnfv'}
+IMAGES=${IMAGES:-"$BASE/images"}
+LIB=${LIB:-"$BASE/lib"}
 reset=$(tput sgr0 || echo "")
 blue=$(tput setaf 4 || echo "")
 red=$(tput setaf 1 || echo "")
@@ -89,7 +89,7 @@ fi
 # Clean off instack/undercloud VM
 for vm in instack undercloud; do
   virsh destroy $vm 2> /dev/null | xargs echo -n
-  virsh undefine $vm 2> /dev/null | xargs echo -n
+  virsh undefine --nvram $vm 2> /dev/null | xargs echo -n
   /usr/bin/touch /var/lib/libvirt/images/${vm}.qcow2
   virsh vol-delete ${vm}.qcow2 --pool default 2> /dev/null | xargs echo -n
   rm -f /var/lib/libvirt/images/${vm}.qcow2 2> /dev/null
@@ -102,6 +102,7 @@ for i in $(seq 0 $vm_index); do
   /usr/bin/touch /var/lib/libvirt/images/baremetal${i}.qcow2
   virsh vol-delete baremetal${i}.qcow2 --pool default 2> /dev/null | xargs echo -n
   rm -f /var/lib/libvirt/images/baremetal${i}.qcow2 2> /dev/null
+  if [ -e /root/.vbmc/baremetal$i ]; then vbmc delete baremetal$i; fi
 done
 
 for network in ${OPNFV_NETWORK_TYPES}; do
@@ -119,7 +120,6 @@ done
 
 # clean pub keys from root's auth keys
 sed -i '/stack@undercloud.localdomain/d' /root/.ssh/authorized_keys
-sed -i '/virtual-power-key/d' /root/.ssh/authorized_keys
 
 
 # force storage cleanup