Commit 5437afa4 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Source the variant file in the verify script

If the variant file has defined mandatory input variables like IMG_ID
the verification script should not fail to find them.

This fixes #35
parent 09d40120
......@@ -265,7 +265,10 @@ ganeti_os_main() {
fi
get_api20_arguments
source_variant
}
source_variant() {
if [ -n "$OS_VARIANT" ]; then
if [ ! -d "$VARIANTS_DIR" ]; then
log_error "OS Variants directory $VARIANTS_DIR doesn't exist"
......
......@@ -31,6 +31,8 @@ check_required() {
eval $param=\"\$OSP_$param\"
done
source_variant
for var in $required_params; do
if [ -z "${!var}" ]; then
log_error "Missing OS API Parameter: ${var}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment