Skip to content

Commit

Permalink
Merge pull request #181 from ashu-011/add_create_group_resource
Browse files Browse the repository at this point in the history
Add create group option in horizontest image
  • Loading branch information
openshift-merge-bot[bot] authored Jun 25, 2024
2 parents 68015b5 + 68ed549 commit b478187
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions container-images/tcib/base/os/horizontest/run_horizontest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ PROJECT_NAME=horizontest
USER_NAME=horizontest
PASSWORD=horizontest
FLAVOR_NAME=m1.tiny
GROUP_NAME=admins

# assert mandatory variables have been set
[[ -z ${ADMIN_USERNAME} ]] && echo "ADMIN_USERNAME not set" && exit 1
Expand Down Expand Up @@ -56,6 +57,11 @@ function create_custom_resources {
--public ${FLAVOR_NAME} \
--ram 512 --disk 1 --vcpus 1
fi

if ! openstack group show --os-cloud default ${GROUP_NAME}; then
openstack group create \
--os-cloud default ${GROUP_NAME}
fi
}

function delete_custom_resources {
Expand All @@ -78,6 +84,11 @@ function delete_custom_resources {
openstack flavor delete \
--os-cloud default ${FLAVOR_NAME}
fi

if openstack group show --os-cloud default ${GROUP_NAME}; then
openstack group delete \
--os-cloud default ${GROUP_NAME}
fi
}

pushd ${HORIZONTEST_DIR}
Expand Down

0 comments on commit b478187

Please sign in to comment.