Move arp learning to use Get VM IPs 85/65585/8
authorSam Hague <shague@redhat.com>
Wed, 15 Nov 2017 23:34:31 +0000 (18:34 -0500)
committerJamo Luhrsen <jluhrsen@redhat.com>
Fri, 17 Nov 2017 16:33:32 +0000 (16:33 +0000)
Change-Id: I48ac351469f66875335763119081c503a12d2841
Signed-off-by: Sam Hague <shague@redhat.com>
csit/libraries/OpenStackOperations.robot
csit/suites/netvirt/Netvirt_Vpnservice/ARP_Learning.robot

index f0578ca3dbd3be36a3e3af911f1b1738e4b0190f..76b0f99738fe00063f7b128b88665df6c377a46a 100644 (file)
@@ -365,7 +365,7 @@ Get VM IPs
     @{vm_ips}    BuiltIn.Create List    @{EMPTY}
     : FOR    ${vm}    IN    @{vms}
     \    Poll VM Is ACTIVE    ${vm}
-    \    ${status}    ${ips_and_console_log}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    60s    15s
+    \    ${status}    ${ips_and_console_log}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    120s    15s
     \    ...    Get VM IP    true    ${vm}
     \    # If there is trouble with Get VM IP, the status will be FAIL and the return value will be a string of what went
     \    # wrong. We need to handle both the PASS and FAIL cases. In the FAIL case we know we wont have access to the
index 80d82b73a52a1ed83c6d60a805425109144a9c7b..37d893876ee8fa5297e9c7cc42b03dd9e5000fab 100644 (file)
@@ -24,24 +24,18 @@ ${CREATE_IMPORT_RT}    ["2200:2","2200:3"]
 *** Test Cases ***
 TC00 Verify Setup
     [Documentation]    Verify that VMs received ip and ping is happening between different VM
-    ${VM_INSTANCES} =    Create List    @{VM_INSTANCES_NET1}    @{VM_INSTANCES_NET2}    @{VM_INSTANCES_NET3}
-    : FOR    ${VM}    IN    @{VM_INSTANCES}
-    \    Poll VM Is ACTIVE    ${VM}
-    ${VM_IP_NET1}    ${DHCP_IP1}    Collect VM IP Addresses    false    @{VM_INSTANCES_NET1}
-    ${VM_IP_NET2}    ${DHCP_IP2}    Collect VM IP Addresses    false    @{VM_INSTANCES_NET2}
-    ${VM_IP_NET3}    ${DHCP_IP3}    Collect VM IP Addresses    false    @{VM_INSTANCES_NET3}
-    ${VM_INSTANCES}=    Collections.Combine Lists    ${VM_INSTANCES_NET1}    ${VM_INSTANCES_NET2}    ${VM_INSTANCES_NET3}
-    ${VM_IPS}=    Collections.Combine Lists    ${VM_IP_NET1}    ${VM_IP_NET2}    ${VM_IP_NET3}
-    ${LOOP_COUNT}    Get Length    ${VM_INSTANCES_NET1}
-    : 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    ${VM_IP_NET1}
-    Set Suite Variable    ${VM_IP_NET2}
-    Set Suite Variable    ${VM_IP_NET3}
+    @{VM_IP_NET1}    ${DHCP_IP1} =    Get VM IPs    @{VM_INSTANCES_NET1}
+    @{VM_IP_NET2}    ${DHCP_IP2} =    Get VM IPs    @{VM_INSTANCES_NET2}
+    @{VM_IP_NET3}    ${DHCP_IP3} =    Get VM IPs    @{VM_INSTANCES_NET3}
+    Set Suite Variable    @{VM_IP_NET1}
+    Set Suite Variable    @{VM_IP_NET2}
+    Set Suite Variable    @{VM_IP_NET3}
     Should Not Contain    ${VM_IP_NET1}    None
     Should Not Contain    ${VM_IP_NET2}    None
     Should Not Contain    ${VM_IP_NET3}    None
+    Should Not Contain    ${DHCP_IP1}    None
+    Should Not Contain    ${DHCP_IP2}    None
+    Should Not Contain    ${DHCP_IP3}    None
     ${vm_instances} =    Create List    @{VM_IP_NET1}    @{VM_IP_NET2}    @{VM_IP_NET3}
     Wait Until Keyword Succeeds    30s    10s    Check For Elements At URI    ${FIB_ENTRIES_URL}    ${vm_instances}
     Verify Ping On Same Networks