Merge pull request #557 from crawford/azure

oem/azure: fixes for new regions
This commit is contained in:
Alex Crawford 2016-06-11 09:51:21 -07:00 committed by GitHub
commit a71d3af739
2 changed files with 6 additions and 3 deletions

View File

@ -9,12 +9,13 @@ getManagementEndpoint() {
}
getStorageEndpointPrefix() {
azure account env show --environment=$(getAzureEnvironment) --json | \
jq '.storageEndpointSuffix' --raw-output
prefix=$(azure account env show --environment=$(getAzureEnvironment) --json | \
jq '.storageEndpointSuffix' --raw-output)
echo "${prefix##.}"
}
getBlobStorageEndpoint() {
echo "blob$(getStorageEndpointPrefix)"
echo "blob.$(getStorageEndpointPrefix)"
}
getSubscriptionId() {

View File

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