Permalink
Browse files

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
  • Loading branch information...
1 parent 1d8abb9 commit a16c8210244a553d10250080294c7d4c65734375 Kiall Mac Innes committed Jan 12, 2014
Showing with 20 additions and 0 deletions.
  1. +4 −0 exercises/aggregates.sh
  2. +4 −0 exercises/bundle.sh
  3. +4 −0 exercises/euca.sh
  4. +4 −0 exercises/floating_ips.sh
  5. +4 −0 exercises/sec_groups.sh
View
@@ -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
View
@@ -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
View
@@ -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
@@ -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
View
@@ -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

0 comments on commit a16c821

Please sign in to comment.