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
diff --git a/exercises/sec_groups.sh b/exercises/sec_groups.sh
index eb32cc7..d71a1e0 100755
--- a/exercises/sec_groups.sh
+++ b/exercises/sec_groups.sh
@@ -33,6 +33,10 @@
# 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