fix Verify VMs Received DHCP Lease func - if dhcp ip is empty change to 86/52886/3
authormor.zvi <mor.zvi@hpe.com>
Mon, 6 Mar 2017 14:17:58 +0000 (16:17 +0200)
committerJamo Luhrsen <jluhrsen@redhat.com>
Tue, 7 Mar 2017 21:35:46 +0000 (21:35 +0000)
None

Change-Id: Ic0720bff4ebb9607e9a95a11fc4eeec9acb4158a
Signed-off-by: mor.zvi <mor.zvi@hpe.com>
csit/libraries/OpenStackOperations.robot

index bc8741ebba8583b157d7e1a37fffb0d3dfab5441..2ab7d7db4185e68c963a1a3e02af82c43a77b334 100644 (file)
@@ -269,6 +269,8 @@ Verify VMs Received DHCP Lease
     \    ${dhcp_ip_line}=    Write Commands Until Prompt    nova console-log ${vm} | grep "^nameserver"    30s
     \    Log    ${dhcp_ip_line}
     \    @{dhcp_ip}    Get Regexp Matches    ${dhcp_ip_line}    [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
+    \    ${dhcp_ip_length}    Get Length    ${dhcp_ip}
+    \    Run Keyword If    ${dhcp_ip_length}<=0    Append To List    ${dhcp_ip}    None
     \    Log    ${dhcp_ip}
     ${dhcp_length}    Get Length    ${dhcp_ip}
     Return From Keyword If    ${dhcp_length}==0    ${ip_list}    ${EMPTY}