Move sfc to use Get VM IPs 89/65589/7
authorSam Hague <shague@redhat.com>
Wed, 15 Nov 2017 23:41:57 +0000 (18:41 -0500)
committerJamo Luhrsen <jluhrsen@redhat.com>
Thu, 16 Nov 2017 21:27:51 +0000 (21:27 +0000)
Change-Id: I0bcbfbea01c94f7cd9ca23a9b0e56e500fecd8e5
Signed-off-by: Sam Hague <shague@redhat.com>
csit/suites/openstack/extensions/sfc.robot

index f6c6c4a61d5aff414dd0bb3e26333d1b0d972f57..56687cffffbc90f390804a4b5efdc8ae3908489b 100644 (file)
@@ -52,23 +52,8 @@ Create Vm Instances
     Create Vm Instance With Port    dest_vm_port    dest_vm    sg=${SECURITY_GROUP}
 
 Check Vm Instances Have Ip Address
-    [Documentation]    Test case to verify that all created VMs are ready and have received their ip addresses.
-    ...    We are polling first and longest on the last VM created assuming that if it's received it's 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    @{VM_INSTANCES}
-    \    Poll VM Is ACTIVE    ${vm}
-    ${status}    ${message}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    60s    15s    Collect VM IP Addresses
-    ...    true    @{VM_INSTANCES}
-    ${NET1_VM_IPS}    ${NET1_DHCP_IP}    Collect VM IP Addresses    false    @{VM_INSTANCES}
-    ${VM_INSTANCES}=    Collections.Combine Lists    ${VM_INSTANCES}
-    ${VM_IPS}=    Collections.Combine Lists    ${NET1_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_VM_IPS}
+    @{VM_IPS}    ${NET1_DHCP_IP} =    Get VM IPs    @{VM_INSTANCES}
+    Set Suite Variable    @{NET1_VM_IPS}
     Should Not Contain    ${NET1_VM_IPS}    None
     Should Not Contain    ${NET1_DHCP_IP}    None
     [Teardown]    Run Keywords    Show Debugs    @{VM_INSTANCES}