Cleanup DHCP IP collection, don't mix with VM IPs 67/53867/2
authorAlon Kochba <alonko@hpe.com>
Sun, 26 Mar 2017 17:33:24 +0000 (20:33 +0300)
committerJamo Luhrsen <jluhrsen@redhat.com>
Tue, 28 Mar 2017 16:36:15 +0000 (16:36 +0000)
Currently in the L2 and external suite we mix the DHCP IP
with the VM IPs, including wasting time on pinging to it.

This corrects the behavior to be the same as the L3 suite
across all suites, without mixing the DHCP IP into the VM IPs.

Change-Id: I3c5727453f5ac3abb072a7b2ed77f7543b7f1247
Signed-off-by: Alon Kochba <alonko@hpe.com>
csit/suites/openstack/clustering/01_l2_tests.robot
csit/suites/openstack/connectivity/01_l2_tests.robot
csit/suites/openstack/connectivity/03_external_network_tests.robot

index 2e536f8e3f0edf7f148d877a48c7bd39dc08b18d..f31c9bc832add034d27799db0837c9e964793291 100644 (file)
@@ -114,20 +114,20 @@ Check Vm Instances Have Ip Address
     ...    true    @{NET_1_VM_INSTANCES}
     ${status}    ${message}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    60s    5s    Collect VM IP Addresses
     ...    true    @{NET_2_VM_INSTANCES}
-    ${NET2_VM_IPS}    ${NET2_DHCP_IP}    Collect VM IP Addresses    false    @{NET_2_VM_INSTANCES}
     ${NET1_VM_IPS}    ${NET1_DHCP_IP}    Collect VM IP Addresses    false    @{NET_1_VM_INSTANCES}
+    ${NET2_VM_IPS}    ${NET2_DHCP_IP}    Collect VM IP Addresses    false    @{NET_2_VM_INSTANCES}
     ${VM_INSTANCES}=    Collections.Combine Lists    ${NET_1_VM_INSTANCES}    ${NET_2_VM_INSTANCES}
     ${VM_IPS}=    Collections.Combine Lists    ${NET1_VM_IPS}    ${NET2_VM_IPS}
     ${LOOP_COUNT}    Get Length    ${VM_INSTANCES}
     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
     \    ${status}    ${message}    Run Keyword And Ignore Error    Should Not Contain    @{VM_IPS}[${index}]    None
     \    Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    nova console-log @{VM_INSTANCES}[${index}]    30s
-    Append To List    ${NET1_VM_IPS}    @{NET1_DHCP_IP}[0]
     Set Suite Variable    ${NET1_VM_IPS}
-    Append To List    ${NET2_VM_IPS}    @{NET2_DHCP_IP}[0]
     Set Suite Variable    ${NET2_VM_IPS}
     Should Not Contain    ${NET1_VM_IPS}    None
     Should Not Contain    ${NET2_VM_IPS}    None
+    Should Not Contain    ${NET1_DHCP_IP}    None
+    Should Not Contain    ${NET2_DHCP_IP}    None
     [Teardown]    Run Keywords    Show Debugs    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
     ...    AND    Get Test Teardown Debugs
 
index f0f63f0d99ee2807071ef4b8756f94447567be55..ebb68d95f00441e2b1022b7892ddf7848f36ccbb 100644 (file)
@@ -68,20 +68,20 @@ Check Vm Instances Have Ip Address
     ...    true    @{NET_1_VM_INSTANCES}
     ${status}    ${message}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    60s    5s    Collect VM IP Addresses
     ...    true    @{NET_2_VM_INSTANCES}
-    ${NET2_VM_IPS}    ${NET2_DHCP_IP}    Collect VM IP Addresses    false    @{NET_2_VM_INSTANCES}
     ${NET1_VM_IPS}    ${NET1_DHCP_IP}    Collect VM IP Addresses    false    @{NET_1_VM_INSTANCES}
+    ${NET2_VM_IPS}    ${NET2_DHCP_IP}    Collect VM IP Addresses    false    @{NET_2_VM_INSTANCES}
     ${VM_INSTANCES}=    Collections.Combine Lists    ${NET_1_VM_INSTANCES}    ${NET_2_VM_INSTANCES}
     ${VM_IPS}=    Collections.Combine Lists    ${NET1_VM_IPS}    ${NET2_VM_IPS}
     ${LOOP_COUNT}    Get Length    ${VM_INSTANCES}
     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
     \    ${status}    ${message}    Run Keyword And Ignore Error    Should Not Contain    @{VM_IPS}[${index}]    None
     \    Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    nova console-log @{VM_INSTANCES}[${index}]    30s
-    Append To List    ${NET1_VM_IPS}    @{NET1_DHCP_IP}[0]
     Set Suite Variable    ${NET1_VM_IPS}
-    Append To List    ${NET2_VM_IPS}    @{NET2_DHCP_IP}[0]
     Set Suite Variable    ${NET2_VM_IPS}
     Should Not Contain    ${NET1_VM_IPS}    None
     Should Not Contain    ${NET2_VM_IPS}    None
+    Should Not Contain    ${NET1_DHCP_IP}    None
+    Should Not Contain    ${NET2_DHCP_IP}    None
     [Teardown]    Run Keywords    Show Debugs    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
     ...    AND    Get Test Teardown Debugs
 
index 51f536f35ddda5eb98c3a8acc1142b9a4c18c452..f84ceb686ccff2f50217ff8685a4c81b1304778d 100644 (file)
@@ -64,12 +64,12 @@ Check Vm Instances Have Ip Address
     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
     \    ${status}    ${message}    Run Keyword And Ignore Error    Should Not Contain    @{VM_IPS}[${index}]    None
     \    Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    nova console-log @{VM_INSTANCES}[${index}]    30s
-    Append To List    ${FLOATING_VM_IPS}    @{FLOATING_DHCP_IP}[0]
     Set Suite Variable    ${FLOATING_VM_IPS}
-    Append To List    ${SNAT_VM_IPS}    @{SNAT_DHCP_IP}[0]
     Set Suite Variable    ${SNAT_VM_IPS}
     Should Not Contain    ${FLOATING_VM_IPS}    None
     Should Not Contain    ${SNAT_VM_IPS}    None
+    Should Not Contain    @{FLOATING_DHCP_IP}[0]    None
+    Should Not Contain    @{SNAT_DHCP_IP}[0]    None
     [Teardown]    Run Keywords    Show Debugs    ${VM_INSTANCES_FLOATING}    ${VM_INSTANCES_SNAT}
     ...    AND    Get Test Teardown Debugs