Updates to the vm_tracker
New:
- Script to delete VMs
- Unified script to search for the VM virsh names
and prepare list with cmp node names
- Examples
Fixes
- 'analyze.py' is Python3 friendly now
Related-PROD: PROD-35666
Change-Id: Idd4262b15adb4d763ced80f02f565c2c01340ed5
diff --git a/scripts/vm_tracker/vm_del.sh b/scripts/vm_tracker/vm_del.sh
new file mode 100644
index 0000000..10ceb92
--- /dev/null
+++ b/scripts/vm_tracker/vm_del.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+function print_help {
+ echo "Missing parameters: del_vm.sh <cmp_node> <instance-XXXXXX>"
+ exit 1
+}
+if [[ -z ${1+x} ]]; then
+ print_help
+fi
+if [[ -z ${2+x} ]]; then
+ print_help
+fi
+
+echo "Destroy-n-undefine a VM..."
+salt ${1}\* cmd.run "virsh destroy ${2}; virsh undefine ${2}"