blob: 169f879ac36bde6d47ba252f515feeabb1ef43c8 [file] [log] [blame]
Alexa0053b92022-10-14 16:38:28 -05001#!/bin/bash
2tenv=mos
3. $MY_PROJFOLDER/envs/${tenv}rc
4##
5echo "### Checking openstack resources"
6status=$(kubectl -n qa-space get pod | grep toolset | tr -s " " | cut -d' ' -f3)
7if [ ${status} != "Running" ]; then
8 echo "# 'toolset' container is not Running"
9 exit 1
10fi
11admin_uuid=$(kubectl exec toolset --stdin -n qa-space -- bash -c "openstack user show cvp.admin -c id -f value")
12if [ ! -z admin_uuid ]; then
13 echo "# Running check"
14 echo " "
15 kubectl exec toolset --stdin -n qa-space -- bash -c "cd /artifacts/cmp-check; bash /opt/cmp-check/cmp_check.sh -a"
16else
17 echo "# Consider creating resources using 'create-openstack-resources.sh'"
18 exit 1
19fi