From 6e4ed5160750ae925393bc4d34b80a4040807961 Mon Sep 17 00:00:00 2001 From: Sam Hague Date: Sun, 4 Feb 2018 10:42:52 -0500 Subject: [PATCH] Use mapfile for array Change-Id: Id62d1c8d0967ffc07bd6361aabb28789a9750c6d Signed-off-by: Sam Hague --- jjb/integration/integration-get-slave-addresses.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jjb/integration/integration-get-slave-addresses.sh b/jjb/integration/integration-get-slave-addresses.sh index 4356f5721..816dcf80a 100644 --- a/jjb/integration/integration-get-slave-addresses.sh +++ b/jjb/integration/integration-get-slave-addresses.sh @@ -12,9 +12,7 @@ OPENSTACK_CONTROLLERS=() OPENSTACK_VENV="/tmp/v/openstack" # shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091 source $OPENSTACK_VENV/bin/activate -# shellcheck disable=SC2207 -ADDR=($(openstack stack show -f json -c outputs "$STACK_NAME" | \ - jq -r '.outputs[] | select(.output_key | match("^vm_[0-9]+_ips$")) | .output_value | .[]')) +mapfile -t ADDR <<< "$(openstack stack show -f json -c outputs "$STACK_NAME" | jq -r '.outputs[] | select(.output_key | match("^vm_[0-9]+_ips$")) | .output_value | .[]')" # The next two blocks of code will parse the list of vm IP's hostnames to determine which type of node # the vm is: odl, devstack controller or compute, ha_proxy or tools. For the odl node's the hsotname will contain -- 2.36.6