Offline procedure preparations, p3
Related-PROD: PROD-36856
Change-Id: Id27983047f5a71cc459df4a50ac9429f999e47cf
diff --git a/k8s/workspace/run-openstack-spt.sh b/k8s/workspace/run-openstack-spt.sh
new file mode 100644
index 0000000..156fd1d
--- /dev/null
+++ b/k8s/workspace/run-openstack-spt.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+tenv=mos
+. $MY_PROJFOLDER/envs/${tenv}rc
+##
+echo "### Checking openstack resources"
+status=$(kubectl -n qa-space get pod | grep toolset | tr -s " " | cut -d' ' -f3)
+if [ ${status} != "Running" ]; then
+ echo "# 'toolset' container is not Running"
+ exit 1
+fi
+admin_uuid=$(kubectl exec toolset --stdin -n qa-space -- bash -c "openstack user show cvp.admin -c id -f value")
+if [ ! -z ${TEMPEST_CUSTOM_PUBLIC_NET+x} ]; then
+ echo "# Copying global_config.yaml"
+ kubectl cp $MY_PROJFOLDER/yamls/global_config.yaml qa-space/toolset:/opt/mos-spt/global_config.yaml
+ echo " "
+ echo "# Running spt checks"
+ echo " "
+ kubectl exec toolset --stdin --tty -n qa-space -- bash -c "cd /opt/mos-spt; . .venv/bin/activate; pytest -rs -o log_cli=true --tb=short tests/test_vm2vm.py"
+else
+ echo "# Public network not set: TEMPEST_CUSTOM_PUBLIC_NET=${TEMPEST_CUSTOM_PUBLIC_NET}"
+ exit 1
+fi