use different method for floating IP creation for Newton 28/49128/8
authorAlon Kochba <alonko@hpe.com>
Thu, 8 Dec 2016 07:38:32 +0000 (09:38 +0200)
committerJamo Luhrsen <jluhrsen@redhat.com>
Mon, 12 Dec 2016 16:39:07 +0000 (16:39 +0000)
Change-Id: Iaca2775db7cfc176f015adde9ecc7baef7d17893
Signed-off-by: Alon Kochba <alonko@hpe.com>
Signed-off-by: Sam Hague <shague@redhat.com>
csit/libraries/OpenStackOperations.robot

index f87d40d6a62e27155e46e0f700ee5870b355488f..c5f329577a5e653814e7fae0b4def7c20dc2bad2 100644 (file)
@@ -118,11 +118,13 @@ Create And Associate Floating IPs
     Switch Connection    ${devstack_conn_id}
     ${ip_list}=    Create List    @{EMPTY}
     : FOR    ${vm}    IN    @{vm_list}
-    \    ${output}=    Write Commands Until Prompt    nova floating-ip-create ${external_net} | grep "${external_net}"    30s
+    \    ${output}=    Write Commands Until Prompt    neutron floatingip-create ${external_net}    30s
     \    Log    ${output}
-    \    @{output_words}    Split String    ${output}
-    \    Append To List    ${ip_list}    @{output_words}[3]
-    \    ${output}=    Write Commands Until Prompt    nova floating-ip-associate ${vm} @{output_words}[3]    30s
+    \    @{ip}    Get Regexp Matches    ${output}    [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
+    \    ${ip_length}    Get Length    ${ip}
+    \    Run Keyword If    ${ip_length}>0    Append To List    ${ip_list}    @{ip}[0]
+    \    ...    ELSE    Append To List    ${ip_list}    None
+    \    ${output}=    Write Commands Until Prompt    nova floating-ip-associate ${vm} @{ip}[0]    30s
     \    Log    ${output}
     [Return]    ${ip_list}