From: Jan Fajerski Date: Fri, 3 Feb 2017 10:59:42 +0000 (+0100) Subject: setup_openstack.sh: fix test for non-empty $default_subnets X-Git-Tag: 1.1.0~211^2~65 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=668f7dcda706a749bcc41ba65cd6d45119439b7c;p=teuthology.git setup_openstack.sh: fix test for non-empty $default_subnets Signed-off-by: Jan Fajerski --- diff --git a/teuthology/openstack/setup-openstack.sh b/teuthology/openstack/setup-openstack.sh index f26d27da44..d18fab90ce 100755 --- a/teuthology/openstack/setup-openstack.sh +++ b/teuthology/openstack/setup-openstack.sh @@ -617,7 +617,7 @@ function main() { # assume the first available IPv4 subnet is going to be used to assign IP to the instance # local default_subnets=$(neutron subnet-list -f json -c cidr -c ip_version | jq '.[] | select(.ip_version == 4) | .cidr') - if test -z "$default_subnets" ; then + if test -n "$default_subnets" ; then for subnet in $default_subnets ; do eval subnet=$subnet # get rid of surrounding "" subnets="$subnets $subnet"