Added keyword to get the rloc object pointed to by hop_index. 39/33339/2
authorAshish <ashishk.iiit@gmail.com>
Fri, 22 Jan 2016 09:32:06 +0000 (15:02 +0530)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 25 Jan 2016 12:45:49 +0000 (12:45 +0000)
Change-Id: Ieb0211d98e198ae94cddc5cad479b07454077769
Signed-off-by: Ashish <ashishk.iiit@gmail.com>
csit/libraries/LISPFlowMapping.robot

index 6464dc12286e9974a9e46f4d2fbc6ac21c39283c..79571cc7d713a78778b5f9bc7885ed3c7637ce0a 100644 (file)
@@ -42,6 +42,15 @@ Get Ipv4 Rloc
     ${ipv4}=    Get From Dictionary    ${loc}    ipv4
     [Return]    ${ipv4}
 
+Get Elp Hop
+    [Arguments]    ${loc_record}    ${hop_index}
+    [Documentation]    Returns the Rloc object pointed to by ${hop_index}
+    ${rloc}=    Get From Dictionary    ${loc_record}    rloc
+    ${exp_loc_path}=    Get From Dictionary    ${rloc}    explicit-locator-path
+    ${actual_hop_index}=    Evaluate    ${hop_index} - 1
+    ${hop}=    Get From List    ${exp_loc_path}     ${actual_hop_index}
+    [Return]    ${hop}
+
 Check Mapping Removal
     [Arguments]    ${json}
     Post Log Check    ${LFM_RPC_API}:get-mapping    ${json}    404