Move l3 clustering to use Get VM IPs 88/65588/5
authorSam Hague <shague@redhat.com>
Wed, 15 Nov 2017 23:41:43 +0000 (18:41 -0500)
committerJamo Luhrsen <jluhrsen@redhat.com>
Thu, 16 Nov 2017 21:27:50 +0000 (21:27 +0000)
Change-Id: I870b455a916ac951580cb89b4ba37e0379b5e00f
Signed-off-by: Sam Hague <shague@redhat.com>
csit/suites/openstack/clustering/02_l3_tests.robot

index e76f8913ef901bb74e835e9bf8e6ec1fd5cb4733..a6e5deb38630c2982d86c72db92ed1c66859d2b0 100644 (file)
@@ -72,24 +72,10 @@ Check Vm Instances Have Ip Address
     ...    already the other instances should have theirs already or at least shortly thereafter.
     # first, ensure all VMs are in ACTIVE state.    if not, we can just fail the test case and not waste time polling
     # for dhcp addresses
-    : FOR    ${vm}    IN    @{NET_1_VM_INSTANCES}    @{NET_2_VM_INSTANCES}
-    \    Poll VM Is ACTIVE    ${vm}
-    ${status}    ${message}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    60s    5s    Collect VM IP Addresses
-    ...    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_L3_VM_IPS}    ${NET2_DHCP_IP}    Collect VM IP Addresses    false    @{NET_2_VM_INSTANCES}
-    ${NET1_L3_VM_IPS}    ${NET1_DHCP_IP}    Collect VM IP Addresses    false    @{NET_1_VM_INSTANCES}
-    ${VM_INSTANCES}=    Collections.Combine Lists    ${NET_1_VM_INSTANCES}    ${NET_2_VM_INSTANCES}
-    ${VM_IPS}=    Collections.Combine Lists    ${NET1_L3_VM_IPS}    ${NET2_L3_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    openstack console log show @{VM_INSTANCES}[${index}]    30s
-    Set Suite Variable    ${NET1_L3_VM_IPS}
-    Set Suite Variable    ${NET2_L3_VM_IPS}
-    Set Suite Variable    ${NET1_DHCP_IP}
-    Set Suite Variable    ${NET2_DHCP_IP}
+    @{NET1_L3_VM_IPS}    ${NET1_DHCP_IP} =    Get VM IPs    @{NET_1_VM_INSTANCES}
+    @{NET2_L3_VM_IPS}    ${NET2_DHCP_IP} =    Get VM IPs    @{NET_2_VM_INSTANCES}
+    Set Suite Variable    @{NET1_L3_VM_IPS}
+    Set Suite Variable    @{NET2_L3_VM_IPS}
     Should Not Contain    ${NET1_L3_VM_IPS}    None
     Should Not Contain    ${NET2_L3_VM_IPS}    None
     Should Not Contain    ${NET1_DHCP_IP}    None