Skip cinder resource phase if not using Cinder

Run the cinder resource phases only if the cinder-api is enabled.

Only register cinder for upgrade tests if cinder-api is enabled.

Co-Authored-By: John L. Villalovos <john.l.villalovos@intel.com>
Change-Id: I54133bde8452b7c70c173b205eab39dfdb1c6ca8
This commit is contained in:
vsaienko 2016-05-16 23:20:22 +03:00 committed by John L. Villalovos
parent ae1837e18d
commit 7b7c91de8b
2 changed files with 9 additions and 2 deletions

View File

@ -48,6 +48,11 @@ export OS_IMAGE_API_VERSION=1
# BUG openstack client doesn't work with cinder v2
export OS_VOLUME_API_VERSION=1
if ! is_service_enabled c-api; then
echo "Cinder is not enabled. Skipping resource phase $1 for cinder."
exit 0
fi
function _cinder_set_user {
OS_TENANT_NAME=$CINDER_PROJECT
OS_PROJECT_NAME=$CINDER_PROJECT

View File

@ -1,2 +1,4 @@
register_project_for_upgrade cinder
register_db_to_save cinder
if is_service_enabled c-api; then
register_project_for_upgrade cinder
register_db_to_save cinder
fi