oem/azure: split on newlines instead of whitespace

Some of the regions have spaces in the name. This causes problems when
we build the XML list of regions.
This commit is contained in:
Alex Crawford 2016-06-11 09:27:36 -07:00
parent c6ff07a29f
commit adf4349203

View File

@ -25,6 +25,7 @@ if [ -z $subscription_id ]; then
subscription_id=$(getSubscriptionId) subscription_id=$(getSubscriptionId)
fi fi
IFS=$'\n'
requestBody="<ReplicationInput xmlns=\"http://schemas.microsoft.com/windowsazure\"> requestBody="<ReplicationInput xmlns=\"http://schemas.microsoft.com/windowsazure\">
<TargetLocations>" <TargetLocations>"
for region in $(getRegions); do for region in $(getRegions); do
@ -38,6 +39,7 @@ requestBody+="
<Version>${VERSION}</Version> <Version>${VERSION}</Version>
</ComputeImageAttributes> </ComputeImageAttributes>
</ReplicationInput>" </ReplicationInput>"
unset IFS
url="$(getManagementEndpoint)/${subscription_id}/services/images/${image_name}/replicate" url="$(getManagementEndpoint)/${subscription_id}/services/images/${image_name}/replicate"