Commit 78e9f209 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Make image properties optional

Image properties should be an optional argument. In any other case
snf-image does not retail backward compatibility.
parent 3709b5f4
......@@ -53,8 +53,6 @@ if [ -n "$SNF_IMAGE_PROPERTIES" ]; then
echo "$SNF_IMAGE_PROPERTIES" |
"@scriptsdir@/decode-properties.py" "$properties"
source "$properties"
else
log_error "SNF_IMAGE_PROPERTIES variable is missing"
fi
# Image mount point...
......
......@@ -117,17 +117,15 @@ get_api20_arguments() {
log_error "Missing OS API Parameter: OSP_IMG_PASSWD"
exit 1
fi
if [ -z "$OSP_IMG_PROPERTIES" ]; then
log_error "Missing OS API Parameter: OSP_IMG_PROPERTIES"
exit 1
fi
IMG_ID=$OSP_IMG_ID
IMG_FORMAT=$OSP_IMG_FORMAT
IMG_PASSWD=$OSP_IMG_PASSWD
IMG_PROPERTIES=$OSP_IMG_PROPERTIES
if [ -n "$OSP_IMG_PROPERTIES" ]
IMG_PROPERTIES="$OSP_IMG_PROPERTIES"
fi
if [ -n "$OSP_IMG_PERSONALITY" ]; then
IMG_PERSONALITY=$OSP_IMG_PERSONALITY
IMG_PERSONALITY="$OSP_IMG_PERSONALITY"
fi
}
......
......@@ -93,7 +93,9 @@ snf_export_DEV=/dev/vda
snf_export_TYPE="$IMG_FORMAT"
snf_export_PASSWORD="$IMG_PASSWD"
snf_export_HOSTNAME="$instance"
snf_export_PROPERTIES="$IMG_PROPERTIES"
if [ -n "$IMG_PROPERTIES" ]
snf_export_PROPERTIES="$IMG_PROPERTIES"
fi
if [ -n "$IMG_PERSONALITY" ]; then
snf_export_PERSONALITY="$IMG_PERSONALITY"
fi
......
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