]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
setup_openstack.sh: fix test for non-empty $default_subnets
authorJan Fajerski <jfajerski@suse.com>
Fri, 3 Feb 2017 10:59:42 +0000 (11:59 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Mon, 14 Oct 2019 14:47:01 +0000 (16:47 +0200)
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
teuthology/openstack/setup-openstack.sh

index f26d27da44ceaa7a6fa4e0932b9884e37d35ce9e..d18fab90ce05e9d3a04c120fa8e9e36d39447146 100755 (executable)
@@ -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"