+ &{mapping} BuiltIn.Create_Dictionary
+ ... DEVICE_NAME=${DEVICE_NAME}
+ ... NAME=example-bgp-peer1
+ ... IP=${BGP_PEER1_IP}
+ ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ TemplatedRequests.Delete_Templated
+ ... ${BGP_VARIABLES_FOLDER}${/}ibgp_peers
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+ &{mapping} BuiltIn.Create_Dictionary
+ ... DEVICE_NAME=${DEVICE_NAME}
+ ... NAME=example-bgp-peer2
+ ... IP=${BGP_PEER2_IP}
+ ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ TemplatedRequests.Delete_Templated
+ ... ${BGP_VARIABLES_FOLDER}${/}ibgp_peers
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+TC4_Configure_Two_iBGP_RR_Clients_With_Cluster_Id
+ [Documentation] Configure two iBGP peers as routing reflector clients with cluster-id argument.
+ [Tags] critical
+ &{mapping} BuiltIn.Create_Dictionary
+ ... IP=${BGP_PEER1_IP}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ ... RR_CLIENT=true
+ TemplatedRequests.Put_As_Xml_Templated
+ ... ${BGP_VARIABLES_FOLDER}${/}cluster_id/ibgp_peer
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+ &{mapping} BuiltIn.Create_Dictionary
+ ... IP=${BGP_PEER2_IP}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ ... RR_CLIENT=true
+ TemplatedRequests.Put_As_Xml_Templated
+ ... ${BGP_VARIABLES_FOLDER}${/}ibgp_peers
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+TC4_Connect_BGP_Peers
+ [Documentation] Connect BGP peers, each set to send 3 prefixes.
+ [Tags] critical
+ SSHLibrary.Switch Connection bgp_peer1_console
+ BuiltIn.Set_Suite_Variable ${peer1_cluster_id} 127.0.0.4
+ BuiltIn.Set_Suite_Variable ${default_cluster_id} 192.0.2.2
+ BGPCliKeywords.Start_Console_Tool ${BGP_PEER1_COMMAND} --cluster=${peer1_cluster_id} ${BGP_PEER1_OPTIONS}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}
+ ... ${DEFAULT_TOPOLOGY_CHECK_PERIOD}
+ ... BgpOperations.Check_Example_IPv4_Topology_Content
+ ... ${CONFIG_SESSION}
+ ... {"prefix":"${BGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
+ SSHLibrary.Switch Connection bgp_peer2_console
+ BGPCliKeywords.Start_Console_Tool ${BGP_PEER2_COMMAND} --cluster=${BGP_PEER2_IP} ${BGP_PEER2_OPTIONS}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}
+ ... ${DEFAULT_TOPOLOGY_CHECK_PERIOD}
+ ... BgpOperations.Check_Example_IPv4_Topology_Content
+ ... ${CONFIG_SESSION}
+ ... {"prefix":"${BGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
+
+TC4_BGP_Peer1_Check_Rib_Out_For_Introduced_Prefixes
+ [Documentation] Check incomming updates for new routes and respective cluster-ids
+ ... on first peer which should contain default-cluster id from global config reflected
+ ... from the second peer equal to router-id.
+ [Tags] critical
+ &{mapping} BuiltIn.Create_Dictionary
+ ... IP=${BGP_PEER1_IP}
+ ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ ... PEER_NUMBER=2
+ ... CLUSTER_ID=${BGP_PEER2_IP}
+ ... DEFAULT_ID=${default_cluster_id}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}
+ ... ${DEFAULT_TOPOLOGY_CHECK_PERIOD}
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... ${BGP_VARIABLES_FOLDER}${/}cluster_id/peer_rib_out
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+ ... verify=True
+
+TC4_BGP_Peer2_Check_Rib_Out_For_Introduced_Prefixes
+ [Documentation] Check incomming updates for new routes and respective cluster-ids
+ ... in second peer which has local route-reflector-cluster-id
+ [Tags] critical
+ &{mapping} BuiltIn.Create_Dictionary
+ ... IP=${BGP_PEER2_IP}
+ ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ ... PEER_NUMBER=1
+ ... CLUSTER_ID=${BGP_PEER1_IP}
+ ... DEFAULT_ID=${peer1_cluster_id}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}
+ ... ${DEFAULT_TOPOLOGY_CHECK_PERIOD}
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... ${BGP_VARIABLES_FOLDER}${/}cluster_id/peer_rib_out
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+ ... verify=True
+
+TC4_Disconnect_BGP_Peers
+ [Documentation] Stop BGP peer & store logs
+ [Tags] critical
+ SSHLibrary.Switch Connection bgp_peer1_console
+ BGPCliKeywords.Stop_Console_Tool
+ BGPCliKeywords.Store_File_To_Workspace ${BGP_PEER1_LOG_FILE} tc4_${BGP_PEER1_LOG_FILE}
+ SSHLibrary.Switch Connection bgp_peer2_console
+ BGPCliKeywords.Stop_Console_Tool
+ BGPCliKeywords.Store_File_To_Workspace ${BGP_PEER2_LOG_FILE} tc4_${BGP_PEER2_LOG_FILE}
+
+TC4_Check_for_Empty_IPv4_Topology
+ [Documentation] Checks for empty topology after
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}
+ ... ${DEFAULT_TOPOLOGY_CHECK_PERIOD}
+ ... BgpOperations.Check_Example_IPv4_Topology_Does_Not_Contain
+ ... ${CONFIG_SESSION}
+ ... prefix
+
+TC4_Delete_BGP_Peers_Configuration
+ [Documentation] Delete all previously configured BGP peers.
+ [Tags] critical
+ &{mapping} BuiltIn.Create_Dictionary IP=${BGP_PEER1_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ TemplatedRequests.Delete_Templated
+ ... ${BGP_VARIABLES_FOLDER}${/}cluster_id/ibgp_peer
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+ &{mapping} BuiltIn.Create_Dictionary IP=${BGP_PEER2_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
+ TemplatedRequests.Delete_Templated
+ ... ${BGP_VARIABLES_FOLDER}${/}ibgp_peers
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+