This allows for ./exercises.sh to complete sucessfully when nova is not
enabled / installed.
Change-Id: If969e14f5106c15007146e8fad1da27d131828c8
| ... | ... |
@@ -43,6 +43,10 @@ source $TOP_DIR/exerciserc |
| 43 | 43 |
# Test as the admin user |
| 44 | 44 |
. $TOP_DIR/openrc admin admin |
| 45 | 45 |
|
| 46 |
+# If nova api is not enabled we exit with exitcode 55 so that |
|
| 47 |
+# the exercise is skipped |
|
| 48 |
+is_service_enabled n-api || exit 55 |
|
| 49 |
+ |
|
| 46 | 50 |
# Cells does not support aggregates. |
| 47 | 51 |
is_service_enabled n-cell && exit 55 |
| 48 | 52 |
|
| ... | ... |
@@ -39,6 +39,10 @@ rm -f $TOP_DIR/cacert.pem |
| 39 | 39 |
rm -f $TOP_DIR/cert.pem |
| 40 | 40 |
rm -f $TOP_DIR/pk.pem |
| 41 | 41 |
|
| 42 |
+# If nova api is not enabled we exit with exitcode 55 so that |
|
| 43 |
+# the exercise is skipped |
|
| 44 |
+is_service_enabled n-api || exit 55 |
|
| 45 |
+ |
|
| 42 | 46 |
# Get Certificates |
| 43 | 47 |
nova x509-get-root-cert $TOP_DIR/cacert.pem |
| 44 | 48 |
nova x509-create-cert $TOP_DIR/pk.pem $TOP_DIR/cert.pem |
| ... | ... |
@@ -41,6 +41,10 @@ fi |
| 41 | 41 |
# Import exercise configuration |
| 42 | 42 |
source $TOP_DIR/exerciserc |
| 43 | 43 |
|
| 44 |
+# If nova api is not enabled we exit with exitcode 55 so that |
|
| 45 |
+# the exercise is skipped |
|
| 46 |
+is_service_enabled n-api || exit 55 |
|
| 47 |
+ |
|
| 44 | 48 |
# Skip if the hypervisor is Docker |
| 45 | 49 |
[[ "$VIRT_DRIVER" == "docker" ]] && exit 55 |
| 46 | 50 |
|
| ... | ... |
@@ -38,6 +38,10 @@ fi |
| 38 | 38 |
# Import exercise configuration |
| 39 | 39 |
source $TOP_DIR/exerciserc |
| 40 | 40 |
|
| 41 |
+# If nova api is not enabled we exit with exitcode 55 so that |
|
| 42 |
+# the exercise is skipped |
|
| 43 |
+is_service_enabled n-api || exit 55 |
|
| 44 |
+ |
|
| 41 | 45 |
# Skip if the hypervisor is Docker |
| 42 | 46 |
[[ "$VIRT_DRIVER" == "docker" ]] && exit 55 |
| 43 | 47 |
|
| ... | ... |
@@ -33,6 +33,10 @@ source $TOP_DIR/openrc |
| 33 | 33 |
# Import exercise configuration |
| 34 | 34 |
source $TOP_DIR/exerciserc |
| 35 | 35 |
|
| 36 |
+# If nova api is not enabled we exit with exitcode 55 so that |
|
| 37 |
+# the exercise is skipped |
|
| 38 |
+is_service_enabled n-api || exit 55 |
|
| 39 |
+ |
|
| 36 | 40 |
# Skip if the hypervisor is Docker |
| 37 | 41 |
[[ "$VIRT_DRIVER" == "docker" ]] && exit 55 |
| 38 | 42 |
|