Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

Commit a71d3af

Browse files
authored
Merge pull request #557 from crawford/azure
oem/azure: fixes for new regions
2 parents 93fc3ca + adf4349 commit a71d3af

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

oem/azure/common.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ getManagementEndpoint() {
99
}
1010

1111
getStorageEndpointPrefix() {
12-
azure account env show --environment=$(getAzureEnvironment) --json | \
13-
jq '.storageEndpointSuffix' --raw-output
12+
prefix=$(azure account env show --environment=$(getAzureEnvironment) --json | \
13+
jq '.storageEndpointSuffix' --raw-output)
14+
echo "${prefix##.}"
1415
}
1516

1617
getBlobStorageEndpoint() {
17-
echo "blob$(getStorageEndpointPrefix)"
18+
echo "blob.$(getStorageEndpointPrefix)"
1819
}
1920

2021
getSubscriptionId() {

oem/azure/replicate-image.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ if [ -z $subscription_id ]; then
2525
subscription_id=$(getSubscriptionId)
2626
fi
2727

28+
IFS=$'\n'
2829
requestBody="<ReplicationInput xmlns=\"http://schemas.microsoft.com/windowsazure\">
2930
<TargetLocations>"
3031
for region in $(getRegions); do
@@ -38,6 +39,7 @@ requestBody+="
3839
<Version>${VERSION}</Version>
3940
</ComputeImageAttributes>
4041
</ReplicationInput>"
42+
unset IFS
4143

4244
url="$(getManagementEndpoint)/${subscription_id}/services/images/${image_name}/replicate"
4345

0 commit comments

Comments
 (0)