Make ${OS_NODE_CNT} a suite variable 66/77866/1
authorJamo Luhrsen <jluhrsen@redhat.com>
Fri, 16 Nov 2018 06:10:41 +0000 (22:10 -0800)
committerJamo Luhrsen <jluhrsen@redhat.com>
Fri, 16 Nov 2018 06:10:41 +0000 (22:10 -0800)
Without making it a suite variable, it seems the changed
value is only local to that keyword, and outside of that
keyword it will remain the value as assigned in the
above *** Variables *** section, which is ${1}

example of the value getting changed to 3:
https://logs.opendaylight.org/sandbox/vex-yul-odl-jenkins-2/jamo-netvirt-csit-1node-0cmb-1ctl-2cmp-apex-queens-gate-snat-conntrack-oxygen/42/robot-plugin/log_full.html.gz#s1-k1-k1-k4-k2-k4

two keywords later in that same job, you can see
it's incorrectly back to 1:
https://logs.opendaylight.org/sandbox/vex-yul-odl-jenkins-2/jamo-netvirt-csit-1node-0cmb-1ctl-2cmp-apex-queens-gate-snat-conntrack-oxygen/42/robot-plugin/log_full.html.gz#s1-k1-k1-k4-k2-k6-k2

Change-Id: I6e8cc9eb73acc8efef8a61342546d2de1205e4bb
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/libraries/DevstackUtils.robot

index 044050dd504db4689b8286f9975dc617db0f2a9c..3f5ef5debb01158c257a92985bdf6fe08ce23fe6 100644 (file)
@@ -104,5 +104,6 @@ Get DevStack Nodes Data
     ...    ELSE IF    "${OPENSTACK_TOPO}" == "1cmb-0ctl-1cmp"    DevstackUtils.Set Node Data For Control And Compute Node Setup
     ...    ELSE IF    "${OPENSTACK_TOPO}" == "0cmb-1ctl-2cmp"    DevstackUtils.Set Node Data For Control And Two Compute Node Setup
     ${OS_NODE_CNT} =    BuiltIn.Get Length    ${OS_ALL_IPS}
+    BuiltIn.Set Suite Variable    ${OS_NODE_CNT}
     DevstackUtils.Get DevStack Hostnames
     DevstackUtils.Log Devstack Nodes Data