... than one lispflowmapping test suite. Those suites include
... ../variables/Variables.py, which is where some of the
... variables are coming from.
+Library JsonGenerator.py
*** Variables ***
-${JSON_DIR} ${CURDIR}/../variables/lispflowmapping/Be
+${JSON_DIR} ${CURDIR}/../variables/lispflowmapping/Be
*** Keywords ***
Authentication Key Should Be
${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
+
+Get Mapping JSON
+ [Arguments] ${eid} ${rloc}
+ [Documentation] Returns mapping record JSON dict
+ ${loc_record}= Get LocatorRecord Object ${rloc}
+ ${lisp_address}= Get LispAddress Object ${eid}
+ ${loc_record_list}= Create List ${loc_record}
+ ${mapping_record_json}= Get MappingRecord JSON ${lisp_address} ${loc_record_list}
+ ${mapping}= Wrap input ${mapping_record_json}
+ [Return] ${mapping}