Added -r option for update-openstack-resources.sh script
Also made a tiny fix in the cleanup script.
Related-PROD: PROD-37187
Change-Id: I91ba3e56640f0898e6fb50ebb8257d8fd88d84ed
diff --git a/cleanup.py b/cleanup.py
index 403e549..55a2f90 100644
--- a/cleanup.py
+++ b/cleanup.py
@@ -594,7 +594,6 @@
cleanup_volume_group_types()
cleanup_volume_types()
cleanup_images()
- cleanup_sec_groups()
cleanup_keypairs()
cleanup_users()
cleanup_roles()
@@ -602,6 +601,7 @@
cleanup_regions()
cleanup_routers()
cleanup_networks()
+ cleanup_sec_groups()
if object_store_present:
cleanup_containers()
cleanup_floating_ips()
diff --git a/k8s/workspace/update-openstack-resources.sh b/k8s/workspace/update-openstack-resources.sh
index 3b405c1..e467f91 100644
--- a/k8s/workspace/update-openstack-resources.sh
+++ b/k8s/workspace/update-openstack-resources.sh
@@ -7,6 +7,27 @@
# mosrc
. $MY_PROJFOLDER/envs/mosrc
+# local vars
+raw_disk_format=false
+
+function show_help {
+ printf "QA verification: Resources creation script\n\t-h, -?\t\tShow this help\n"
+ printf "\t-r\t\tTo create the images in RAW disk format instead of the QCOW2\n"
+}
+
+OPTIND=1 # Reset in case getopts has been used previously in the shell.
+while getopts "rh?" opt; do
+ case "$opt" in
+ h|\?)
+ show_help
+ exit 0
+ ;;
+ r) raw_disk_format=true
+ printf "# Creating the images in RAW disk format instead of the QCOW2\n"
+ ;;
+ esac
+done
+
##
echo "### Checking openstack resources"
status=$(kubectl -n qa-space get pod | grep toolset | tr -s " " | cut -d' ' -f3)
@@ -22,7 +43,11 @@
echo "# Creating openstack resources"
echo " "
kubectl exec toolset --stdin -n qa-space -- bash -c "mkdir /artifacts/cmp-check"
- kubectl exec toolset --tty --stdin -n qa-space -- bash -c "cd /artifacts/cmp-check; export CUSTOM_PUBLIC_NET_NAME="${TEMPEST_CUSTOM_PUBLIC_NET:-}"; bash /opt/cmp-check/prepare.sh -w \$(pwd)"
+ if [ "$raw_disk_format" = true ]; then
+ kubectl exec toolset --tty --stdin -n qa-space -- bash -c "cd /artifacts/cmp-check; export CUSTOM_PUBLIC_NET_NAME="${TEMPEST_CUSTOM_PUBLIC_NET:-}"; bash /opt/cmp-check/prepare.sh -r -w \$(pwd)"
+ else
+ kubectl exec toolset --tty --stdin -n qa-space -- bash -c "cd /artifacts/cmp-check; export CUSTOM_PUBLIC_NET_NAME="${TEMPEST_CUSTOM_PUBLIC_NET:-}"; bash /opt/cmp-check/prepare.sh -w \$(pwd)"
+ fi
fi
#