Alex | a0053b9 | 2022-10-14 16:38:28 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | tenv=mos |
| 3 | . $MY_PROJFOLDER/envs/${tenv}rc |
| 4 | ## |
| 5 | echo "### Checking openstack resources" |
| 6 | status=$(kubectl -n qa-space get pod | grep toolset | tr -s " " | cut -d' ' -f3) |
| 7 | if [ ${status} != "Running" ]; then |
| 8 | echo "# 'toolset' container is not Running" |
| 9 | exit 1 |
| 10 | fi |
| 11 | admin_uuid=$(kubectl exec toolset --stdin -n qa-space -- bash -c "openstack user show cvp.admin -c id -f value") |
| 12 | if [ ! -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" |
| 16 | else |
| 17 | echo "# Consider creating resources using 'create-openstack-resources.sh'" |
| 18 | exit 1 |
| 19 | fi |