From 668f7dcda706a749bcc41ba65cd6d45119439b7c Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Fri, 3 Feb 2017 11:59:42 +0100 Subject: [PATCH] setup_openstack.sh: fix test for non-empty $default_subnets Signed-off-by: Jan Fajerski --- teuthology/openstack/setup-openstack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- 2.39.5