Small fixes and improvements: in cleanup, cmp_check, offline scripts
* cmp_check: use the specific vm prefix name
* cleanup.py: check whether Obj Store is present, check if volume
backup service is enabled
* init-workspace: choose the first ext net
* update-openstack-resources: remove the typo line
Related-PROD: PROD-37187
Change-Id: I6053d8e715f7f64425f7952c868e9c0a253fe677
(cherry picked from commit bbe0f445085adfbc73709402e6af2bf5bac46c78)
diff --git a/scripts/cmp_check.sh b/scripts/cmp_check.sh
index 58e841f..4aa5598 100644
--- a/scripts/cmp_check.sh
+++ b/scripts/cmp_check.sh
@@ -5,6 +5,7 @@
fill_mode=false
zone=nova
use_fqdn=false
+vm_name_prefix=cvp_test_vm_
tmp_out=$(mktemp)
trap "rm -f ${tmp_out}" EXIT
@@ -153,7 +154,7 @@
function clean_cmp() {
# #### Cleaning mode
if [ $cleaning = true ]; then
- vmname=vm_${1}
+ vmname=${vm_name_prefix}${1}
vmid=( $(getid ${vmname}) )
if [ ${#vmid[@]} -ne 0 ]; then
[ ! "$silent" = true ] && echo "# ${1}: cleaning ${#vmid[@]} VMs"
@@ -267,7 +268,7 @@
for node in ${cmp_nodes[@]}; do
echo "# ${node}: checking"
cname=$(echo ${node} | cut -d'.' -f1)
- check_cmp_node ${node} vm_${cname}
+ check_cmp_node ${node} ${vm_name_prefix}${cname}
echo "# ${node}: done"
done
errors
@@ -283,7 +284,7 @@
counter=1
while [[ $counter -lt ${vmcount}+1 ]]; do
cname=$(echo ${node} | cut -d'.' -f1)
- vmname_c=vm_${cname}_$(printf "%02d" ${counter})
+ vmname_c=${vm_name_prefix}${cname}_$(printf "%02d" ${counter})
[ ! "$silent" = true ] && echo "# ${node}: creating ${vmname_c}"
vm_create ${node} ${vmname_c}
cmp_stats ${node}