IPv6: fix in Wait For Routes To Propogate keyword 17/58517/2
authorValentina Krasnobaeva <valentina.krasnobaeva@6wind.com>
Wed, 7 Jun 2017 12:32:48 +0000 (14:32 +0200)
committerJamo Luhrsen <jluhrsen@redhat.com>
Thu, 8 Jun 2017 22:14:17 +0000 (22:14 +0000)
OpenStackOperations.robot: fix in "Wait For Routes To Propogate
keyword". If subnet has ethertype IPv6, set command "ip -6 route" to
execute in VM, instead of "ip route".

Change-Id: I511c03fd157cc0570313f0c3b87ada4716843223
Signed-off-by: Valentina Krasnobaeva <valentina.krasnobaeva@6wind.com>
csit/libraries/OpenStackOperations.robot

index 1067509b991c751cbdfef4abc1d9481d14faa86a..212335084c9f2ca9227ab91355f7487ec8371e31 100644 (file)
@@ -1190,9 +1190,7 @@ Wait For Routes To Propogate
     : FOR    ${INDEX}    IN RANGE    0    1
     \    ${net_id}=    Get Net Id    @{networks}[${INDEX}]    ${devstack_conn_id}
     \    ${is_ipv6}=    Get Regexp Matches    @{subnets}[${INDEX}]    ${IP6_REGEX}
-    \    Log    ${is_ipv6}
-    \    ${eth_prefix} =    Set Variable
-    \    ${eth_prefix} =    Set Variable If    ${is_ipv6}    -6
-    \    Log    ${eth_prefix}
-    \    ${output}=    Write Commands Until Expected Prompt    sudo ip netns exec qdhcp-${net_id} ip ${eth_prefix} route    ]>
+    \    ${length}=    Get Length    ${is_ipv6}
+    \    ${cmd}=    Set Variable If    ${length} == 0    ip route    ip -6 route
+    \    ${output}=    Write Commands Until Expected Prompt    sudo ip netns exec qdhcp-${net_id} ${cmd}    ]>
     \    Should Contain    ${output}    @{subnets}[${INDEX}]