Skip to content

Commit

Permalink
Add UNDERCLOD_NETWORK_NAME to all profiles
Browse files Browse the repository at this point in the history
Closes: canonical#166
Signed-off-by: Nicolas Bock <[email protected]>
  • Loading branch information
nicolasbock committed Dec 21, 2023
1 parent e5758c0 commit 16930d7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions openstack/profiles/common
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ function create_default_flavors {
}

function is_ksv3 () {
api_ver="`juju config keystone preferred-api-version`"
rel="`juju config keystone openstack-origin| sed -r 's/.+-(.+)/\1/g'`"
rel="`echo -e "$rel\nqueens"| sort| head -n 1`"
series=`juju status keystone --format=json| jq .machines[].series| tr -d '"'`
api_ver="$(juju config keystone preferred-api-version)"
rel="$(juju config keystone openstack-origin| sed -r 's/.+-(.+)/\1/g')"
rel="$(echo -e "$rel\nqueens"| sort| head -n 1)"
series=$(juju status keystone --format=json| jq .machines[].series| tr -d '"')
if [ "$api_ver" = "3" ] || [[ "${rel%%/*}" > "pike" ]] || \
{ [[ "$series" > "artful" ]] && [[ "$series" < "trusty" ]]; }; then
return 0
Expand Down
4 changes: 2 additions & 2 deletions openstack/profiles/prodstack6
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
[[ -z "$FIP_RANGE" ]] && export FIP_RANGE="10.142.35.200:10.142.35.254"
[[ -z "$CIDR_PRIV" ]] && export CIDR_PRIV="192.168.21.0/24"

export UNDERCLOUD_NETWORK_NAME="$(sed -rn "s/.+OS_PROJECT_NAME=(.+)_project/net_\1/p" ~/novarc)"
export UNDERCLOUD_NETWORK_NAME="$(sed -E --quiet "s/.+OS_PROJECT_NAME=(.+)_project/net_\1/p" ~/novarc)"

./profiles/default $@
./profiles/default "$@"
4 changes: 3 additions & 1 deletion openstack/profiles/serverstack
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
[[ -z "$NAMESERVER" ]] && export NAMESERVER="10.245.160.2"
[[ -z "$SWIFT_IP" ]] && export SWIFT_IP="10.245.161.162"

./profiles/default $@
export UNDERCLOUD_NETWORK_NAME="$(sed -E --quiet "s/.+OS_PROJECT_NAME=(.+)_project/net_\1/p" ~/novarc)"

./profiles/default "$@"
4 changes: 3 additions & 1 deletion openstack/profiles/stsstack
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
[[ -z "$NAMESERVER" ]] && export NAMESERVER="10.230.64.2"
[[ -z "$SWIFT_IP" ]] && export SWIFT_IP="10.230.19.58"

./profiles/default $@
export UNDERCLOUD_NETWORK_NAME="$(sed -E --quiet "s/.+OS_PROJECT_NAME=(.+)_project/net_\1/p" ~/novarc)"

./profiles/default "$@"

0 comments on commit 16930d7

Please sign in to comment.