oem/azure: normalize endpoint prefixes

Some regions lead with a '.' and others do not...
This commit is contained in:
Alex Crawford 2016-06-11 09:25:58 -07:00
parent 93fc3cad4b
commit c6ff07a29f

View File

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