[Arguments] @{vms}
[Documentation] Get the instance IP addresses and nameserver address for the list of given vms.
... First poll for the vm instance to be in the active state, then poll for the vm ip address and nameserver.
- ... Get VM IP returns three values: [0] the vm IP, [1] the DHCP IP and [2] the vm console log.
+ ... Get VM IPs returns two things: [0] a list of the ips for the vms passed to this keyword (may contain values
+ ... of None) and [1] the dhcp ip address found in the last vm checked.
+ ... TODO: there is a potential issue for a caller that passes in VMs belonging to different networks that
+ ... may have different dhcp server addresses. Not sure what TODO about that, but noting it here for reference.
@{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
\ Run Keyword If "${status}" == "PASS" BuiltIn.Log ${ips_and_console_log[2]}
\ BuiltIn.Run Keyword If "${status}" == "PASS" Collections.Append To List ${vm_ips} ${ips_and_console_log[0]}
\ BuiltIn.Run Keyword If "${status}" == "FAIL" Collections.Append To List ${vm_ips} None
- \ ${rc} ${vm_console_output}= BuiltIn.Run Keyword If ${status} == "FAIL" Run And Return Rc And Output openstack console log show ${vm}
+ \ ${rc} ${vm_console_output}= BuiltIn.Run Keyword If "${status}" == "FAIL" Run And Return Rc And Output openstack console log show ${vm}
\ BuiltIn.Run Keyword If "${status}" == "FAIL" BuiltIn.Log ${vm_console_output}
[Return] @{vm_ips} ${ips_and_console_log[1]}
Run Keyword If ${rcode} Write Commands Until Expected Prompt route -n ${OS_SYSTEM_PROMPT}
Run Keyword If ${rcode} Write Commands Until Expected Prompt route -A inet6 ${OS_SYSTEM_PROMPT}
Run Keyword If ${rcode} Write Commands Until Expected Prompt arp -an ${OS_SYSTEM_PROMPT}
- Run Keyword If ${rcode} Write Commands Until Expected Prompt ip -6 neigh ${OS_SYSTEM_PROMPT}
+ Run Keyword If ${rcode} Write Commands Until Expected Prompt ip -f inet6 neigh show ${OS_SYSTEM_PROMPT}
: FOR ${dest_ip} IN @{dest_ips}
\ Log ${dest_ip}
\ ${string_empty}= Run Keyword And Return Status Should Be Empty ${dest_ip}