Use openstack-client variables in openstack CLI calls

In the change https://review.openstack.org/#/c/364885/ was
introduced fix for murano multiregion setup in case of
network determination.
We've explored that this patch may have negative impact
for multiregion installation (like freezes of the installer).

In this patch important variables were changed to openstack CLI
style and completely should fix this problem.

Change-Id: I53533864fdf0f5cc78c2b62b67261974e031fa3e
Related-Bug: #1618999
This commit is contained in:
Victor Ryzhenkin 2016-09-12 18:50:25 +04:00
parent b2e16d8627
commit 1e6d619ead
1 changed files with 4 additions and 4 deletions

View File

@ -117,14 +117,14 @@ function configure_murano_networking {
# If it was set but the network is not exist then
# first available external network will be selected.
local ext_net=${MURANO_EXTERNAL_NETWORK:-'public'}
local ext_net_id=$(openstack --os-cloud devstack-admin
--os-region "$REGION_NAME" network list
local ext_net_id=$(openstack --os-cloud=devstack-admin \
--os-region-name="$REGION_NAME" network list \
--external | grep " $ext_net " | get_field 1)
# Try to select first available external network
if [[ -n "$ext_net_id" ]]; then
ext_net_id=$(openstack --os-cloud devstack-admin
--os-region "$REGION_NAME" network list
ext_net_id=$(openstack --os-cloud=devstack-admin \
--os-region-name="$REGION_NAME" network list \
--external -f csv -c ID | tail -n +2 | tail -n 1)
fi