Commit 8ad7e161 authored by Sean M. Collins's avatar Sean M. Collins

[OpenStack-Heat] Fix regex used to get object-store URL

"publicURL" is used for endpoints in the Identity v2 API, while in the Identity v3 API it has been changed to just "public" Fixes #40102
parent d9467519
...@@ -186,7 +186,13 @@ function run-heat-script() { ...@@ -186,7 +186,13 @@ function run-heat-script() {
# Automatically detect swift url if it wasn't specified # Automatically detect swift url if it wasn't specified
if [[ -z $SWIFT_SERVER_URL ]]; then if [[ -z $SWIFT_SERVER_URL ]]; then
SWIFT_SERVER_URL=$(openstack catalog show object-store --format value | egrep -o "publicURL: (.+)$" | cut -d" " -f2) local rgx=""
if [ "$OS_IDENTITY_API_VERSION" = "3" ]; then
rgx="public: (.+)$"
else
rgx="publicURL: (.+)$"
fi
SWIFT_SERVER_URL=$(openstack catalog show object-store --format value | egrep -o "$rgx" | cut -d" " -f2)
fi fi
local swift_repo_url="${SWIFT_SERVER_URL}/kubernetes" local swift_repo_url="${SWIFT_SERVER_URL}/kubernetes"
......
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