Skip Nova exercises if Nova is not enabled

This allows for ./exercises.sh to complete sucessfully when nova is not
enabled / installed.

Change-Id: If969e14f5106c15007146e8fad1da27d131828c8
This commit is contained in:
Kiall Mac Innes 2014-01-12 19:35:43 +00:00
parent 1d8abb95b9
commit a16c821024
5 changed files with 20 additions and 0 deletions

View File

@ -43,6 +43,10 @@ source $TOP_DIR/exerciserc
# Test as the admin user # Test as the admin user
. $TOP_DIR/openrc admin admin . $TOP_DIR/openrc admin admin
# If nova api is not enabled we exit with exitcode 55 so that
# the exercise is skipped
is_service_enabled n-api || exit 55
# Cells does not support aggregates. # Cells does not support aggregates.
is_service_enabled n-cell && exit 55 is_service_enabled n-cell && exit 55

View File

@ -39,6 +39,10 @@ rm -f $TOP_DIR/cacert.pem
rm -f $TOP_DIR/cert.pem rm -f $TOP_DIR/cert.pem
rm -f $TOP_DIR/pk.pem rm -f $TOP_DIR/pk.pem
# If nova api is not enabled we exit with exitcode 55 so that
# the exercise is skipped
is_service_enabled n-api || exit 55
# Get Certificates # Get Certificates
nova x509-get-root-cert $TOP_DIR/cacert.pem nova x509-get-root-cert $TOP_DIR/cacert.pem
nova x509-create-cert $TOP_DIR/pk.pem $TOP_DIR/cert.pem nova x509-create-cert $TOP_DIR/pk.pem $TOP_DIR/cert.pem

View File

@ -41,6 +41,10 @@ fi
# Import exercise configuration # Import exercise configuration
source $TOP_DIR/exerciserc source $TOP_DIR/exerciserc
# If nova api is not enabled we exit with exitcode 55 so that
# the exercise is skipped
is_service_enabled n-api || exit 55
# Skip if the hypervisor is Docker # Skip if the hypervisor is Docker
[[ "$VIRT_DRIVER" == "docker" ]] && exit 55 [[ "$VIRT_DRIVER" == "docker" ]] && exit 55

View File

@ -38,6 +38,10 @@ fi
# Import exercise configuration # Import exercise configuration
source $TOP_DIR/exerciserc source $TOP_DIR/exerciserc
# If nova api is not enabled we exit with exitcode 55 so that
# the exercise is skipped
is_service_enabled n-api || exit 55
# Skip if the hypervisor is Docker # Skip if the hypervisor is Docker
[[ "$VIRT_DRIVER" == "docker" ]] && exit 55 [[ "$VIRT_DRIVER" == "docker" ]] && exit 55

View File

@ -33,6 +33,10 @@ source $TOP_DIR/openrc
# Import exercise configuration # Import exercise configuration
source $TOP_DIR/exerciserc source $TOP_DIR/exerciserc
# If nova api is not enabled we exit with exitcode 55 so that
# the exercise is skipped
is_service_enabled n-api || exit 55
# Skip if the hypervisor is Docker # Skip if the hypervisor is Docker
[[ "$VIRT_DRIVER" == "docker" ]] && exit 55 [[ "$VIRT_DRIVER" == "docker" ]] && exit 55