-Verify_ExaBgp_Received_Updates
- [Arguments] ${expcount}
- [Documentation] Gets numebr of received update requests and compares with given expected count
- ${count_recv}= BgpRpcClient.exa_get_received_update_count
- BuiltIn.Should Be Equal As Numbers ${count_recv} ${expcount}
+Verify_Cli_Output_Count
+ [Documentation] Checks notification and update count from odl-bgpcep-bgp-cli.
+ ... odl-bgpcep-bgp-cli is only avaiable on versions oxygen and above.
+ [Arguments] ${notification_count} ${update_count} ${receive_count}
+ ${output} KarafKeywords.Safe_Issue_Command_On_Karaf_Console
+ ... bgp:operational-state -rib example-bgp-rib -neighbor ${TOOLS_SYSTEM_IP}
+ BuiltIn.Log ${output}
+ &{mapping} BuiltIn.Create_Dictionary
+ ... IP=${TOOLS_SYSTEM_IP}
+ ... NOT_COUNT=${notification_count}
+ ... SEND_COUNT=${update_count}
+ ... DIVIDER=│
+ ... RECV_COUNT=${receive_count}
+ ${expstate} TemplatedRequests.Resolve_Text_From_Template_File
+ ... folder=${BGP_RR_VAR_FOLDER}/operational_cli
+ ... file_name=update.txt
+ ... mapping=${mapping}
+ String.Get Line Count ${output}
+ BuiltIn.Log ${expstate}
+ ${expected_line_count} String.Get Line Count ${expstate}
+ FOR ${expected_line_pos} IN RANGE 0 ${expected_line_count-1}
+ ${expected_line_offset} BuiltIn.Evaluate ${MSG_STATE_OFFSET} + ${expected_line_pos}
+ ${output_line} String.Get Line ${output} ${expected_line_offset}
+ ${expected_line} String.Get Line ${expstate} ${expected_line_pos}
+ BuiltIn.Should Match ${output_line} ${expected_line}
+ END