Fix for Get Router ID 53/67953/2
authorItzik Brown <itzikb@redhat.com>
Tue, 6 Feb 2018 09:35:53 +0000 (11:35 +0200)
committerJamo Luhrsen <jluhrsen@redhat.com>
Wed, 7 Feb 2018 04:17:13 +0000 (04:17 +0000)
Instead of listing the routers which can be a problem when
routers have similar names - using openstack router show instead.

Change-Id: I759da4efa304820e26ace87bcde7be12da245780
Signed-off-by: Itzik Brown <itzikb@redhat.com>
csit/libraries/OpenStackOperations.robot

index e8f667d6202ee89b1fb29d24722ff6b178696353..6d4c9598f1ab765074a5da34b02ef9e0729aea53 100644 (file)
@@ -237,7 +237,7 @@ Get Port Id
 Get Router Id
     [Arguments]    ${router1}
     [Documentation]    Retrieve the router id for the given router name
-    ${rc}    ${output}=    Run And Return Rc And Output    openstack router list -f table | grep "${router1}" | awk '{print $2}'
+    ${rc}    ${output}=    Run And Return Rc And Output    openstack router show "${router1}" |awk '/ id / {print $4}'
     Should Be True    '${rc}' == '0'
     ${splitted_output}=    Split String    ${output}    ${EMPTY}
     ${router_id}=    Get from List    ${splitted_output}    0