Cperf: Fix all-in-one compute robot args 81/60981/1
authorTim Rozet <trozet@redhat.com>
Wed, 15 Aug 2018 21:08:49 +0000 (17:08 -0400)
committerTim Rozet <trozet@redhat.com>
Wed, 15 Aug 2018 21:08:49 +0000 (17:08 -0400)
CSIT requires that OS_COMPUTE_1_IP and OS_COMPUTE_2_IP are still passed
with empty values.

Change-Id: I694f237bdae1f2a4804d79ff6cde13b99eba7ddc
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/cperf/cperf-robot-netvirt-csit.sh

index f01bf04..0895ab6 100755 (executable)
@@ -49,11 +49,16 @@ for idx in `seq 1 $NUM_CONTROL_NODES`; do
                       -v HA_PROXY_${idx}_IP:${SDN_CONTROLLER_IP}"
 done
 
-idx=1
-for idx in `seq 1 $NUM_COMPUTE_NODES`; do
-  COMPUTE_IP=$(python ${REL_PATH}/parse-node-yaml.py get_value -k address --node-type compute --node-number ${idx} --file $NODE_FILE_PATH)
-  EXTRA_ROBOT_ARGS+=" -v OS_COMPUTE_${idx}_IP:${COMPUTE_IP}"
-done
+# In all-in-one these Compute IPs still need to be passed to robot
+if [ "$NUM_COMPUTE_NODES" -eq 0 ]; then
+  EXTRA_ROBOT_ARGS+=" -v OS_COMPUTE_1_IP:'' -v OS_COMPUTE_2_IP:''"
+else
+  idx=1
+  for idx in `seq 1 $NUM_COMPUTE_NODES`; do
+    COMPUTE_IP=$(python ${REL_PATH}/parse-node-yaml.py get_value -k address --node-type compute --node-number ${idx} --file $NODE_FILE_PATH)
+    EXTRA_ROBOT_ARGS+=" -v OS_COMPUTE_${idx}_IP:${COMPUTE_IP}"
+  done
+fi
 
 CONTROLLER_1_IP=$(python ${REL_PATH}/parse-node-yaml.py get_value -k address --node-number 1 --file $NODE_FILE_PATH)