diff --git a/exercises/aggregates.sh b/exercises/aggregates.sh index 1b1ac06678..d223301f35 100755 --- a/exercises/aggregates.sh +++ b/exercises/aggregates.sh @@ -43,6 +43,10 @@ source $TOP_DIR/exerciserc # Test as the admin user . $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. is_service_enabled n-cell && exit 55 diff --git a/exercises/bundle.sh b/exercises/bundle.sh index b83678ab1f..5470960b91 100755 --- a/exercises/bundle.sh +++ b/exercises/bundle.sh @@ -39,6 +39,10 @@ rm -f $TOP_DIR/cacert.pem rm -f $TOP_DIR/cert.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 nova x509-get-root-cert $TOP_DIR/cacert.pem nova x509-create-cert $TOP_DIR/pk.pem $TOP_DIR/cert.pem diff --git a/exercises/euca.sh b/exercises/euca.sh index ed521e4f7f..51b2644458 100755 --- a/exercises/euca.sh +++ b/exercises/euca.sh @@ -41,6 +41,10 @@ fi # Import exercise configuration 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 [[ "$VIRT_DRIVER" == "docker" ]] && exit 55 diff --git a/exercises/floating_ips.sh b/exercises/floating_ips.sh index 7055278f35..4ca90a5c35 100755 --- a/exercises/floating_ips.sh +++ b/exercises/floating_ips.sh @@ -38,6 +38,10 @@ fi # Import exercise configuration 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 [[ "$VIRT_DRIVER" == "docker" ]] && exit 55 diff --git a/exercises/sec_groups.sh b/exercises/sec_groups.sh index eb32cc7aa7..d71a1e0755 100755 --- a/exercises/sec_groups.sh +++ b/exercises/sec_groups.sh @@ -33,6 +33,10 @@ source $TOP_DIR/openrc # Import exercise configuration 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 [[ "$VIRT_DRIVER" == "docker" ]] && exit 55