+Configure_App_Peer
+ [Documentation] Configures bgp application peer.
+ [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+ &{mapping} Create Dictionary
+ ... IP=127.0.0.12
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Put_As_Xml_Templated
+ ... ${BGP_VAR_FOLDER}/application_peer
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+Reconfigure_ODL_To_Accept_Connections_4
+ [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
+ &{mapping} Create Dictionary
+ ... IP=${IPV4_IP}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Put_As_Xml_Templated
+ ... ${BGP_VAR_FOLDER}/bgp_neighbor_rib
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+ RequestsLibrary.Create Session
+ ... session
+ ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
+ ... auth=${AUTH}
+ ... headers=${HEADERS}
+ ... timeout=5
+
+Start_Exabgp_2
+ [Documentation] Start exabgp and Verify BGP connection
+ [Tags] critical
+ ${cmd} BuiltIn.Set_Variable ${EXABGP2_CFG} > ${EXABGP2_LOG}
+ ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} 127.0.0.1
+
+Inject_Ipv6_Route_1
+ [Documentation] Inject the Ipv6 route from controller
+ &{mapping} Create Dictionary
+ ... IP=127.0.0.12
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Post_As_Xml_Templated
+ ... ${BGP_VAR_FOLDER}/ipv6_route_injection
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+Check_Ipv6_Prefix_In_Bgp_Rib_1
+ [Documentation] Check for the presence of Ipv6 Prefix in the BGP RIB
+ &{mapping} Create Dictionary
+ ... IP=${CONTROLLER_IPV4}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 5x
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... ${BGP_VAR_FOLDER}/bgp_rib
+ ... session=${CONFIG_SESSION}
+ ... mapping=${mapping}
+
+Delete_Injected_Ipv6_Routes_1
+ [Documentation] Delete the injected IPV6 routes
+ &{mapping} Create Dictionary
+ ... IP=127.0.0.12
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Delete_Templated
+ ... ${BGP_VAR_FOLDER}/ipv6_route_injection
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+ KarafKeywords.Fail If Exceptions Found During Test ${SUITE_NAME}.${TEST_NAME} fail=${True}
+
+Delete_Bgp_Peer_Configuration_4
+ [Documentation] Revert the BGP configuration to the original state: without any configured peers.
+ &{mapping} Create Dictionary
+ ... IP=${IPV4_IP}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Delete_Templated
+ ... ${BGP_VAR_FOLDER}/bgp_neighbor_rib
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+Verify_Ipv6_Topology_Empty_4
+ [Documentation] Verifies that example-ipv6-topology is empty after deconfiguring peer for the first time.
+ [Tags] critical
+ Verify_Rib_Status_Empty
+
+Reconfigure_ODL_To_Accept_Connections_5
+ [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
+ &{mapping} Create Dictionary
+ ... IP=${IPV4_IP}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Put_As_Xml_Templated
+ ... ${BGP_VAR_FOLDER}/bgp_peer
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+Inject_Ipv6_Route_2
+ [Documentation] Inject the Ipv6 route from controller
+ &{mapping} Create Dictionary
+ ... IP=127.0.0.12
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Post_As_Xml_Templated
+ ... ${BGP_VAR_FOLDER}/ipv6_route_injection
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+Check_Ipv6_Prefix_In_Bgp_Rib_2
+ [Documentation] Check for the presence of Ipv6 Prefix in the BGP RIB
+ &{mapping} Create Dictionary
+ ... IP=${CONTROLLER_IPV4}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ BuiltIn.Wait_Until_Keyword_Succeeds
+ ... 5x
+ ... 2s
+ ... TemplatedRequests.Get_As_Json_Templated
+ ... ${BGP_VAR_FOLDER}/bgp_rib
+ ... session=${CONFIG_SESSION}
+ ... mapping=${mapping}
+
+Delete_Injected_Ipv6_Routes_2
+ [Documentation] Delete the injected IPV6 routes
+ &{mapping} Create Dictionary
+ ... IP=127.0.0.12
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Delete_Templated
+ ... ${BGP_VAR_FOLDER}/ipv6_route_injection
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+ KarafKeywords.Fail If Exceptions Found During Test ${SUITE_NAME}.${TEST_NAME} fail=${True}
+
+Delete_App_Peer
+ [Documentation] Deletes bgp application peer.
+ [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+ &{mapping} Create Dictionary
+ ... IP=127.0.0.12
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Delete_Templated
+ ... ${BGP_VAR_FOLDER}/application_peer
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+Delete_Bgp_Peer_Configuration_5
+ [Documentation] Revert the BGP configuration to the original state: without any configured peers.
+ &{mapping} Create Dictionary
+ ... IP=${IPV4_IP}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
+
+Verify_Ipv6_Topology_Empty_5
+ [Documentation] Verifies that example-ipv6-topology is empty after deconfiguring peer for the first time.
+ [Tags] critical
+ Verify_Rib_Status_Empty
+
+Stop_All_Exabgps_2
+ [Documentation] Save exabgp logs as exaipv6.log, and stop exabgp with ctrl-c bash signal
+ BGPcliKeywords.Store_File_To_Workspace ${EXABGP2_LOG} ${EXABGP2_LOG}
+ ExaBgpLib.Stop_ExaBgp
+ ${Log_Content} OperatingSystem.Get File ${EXABGP2_LOG}
+ Log ${Log_Content}
+
+Reconfigure_ODL_To_Accept_Connections_6
+ [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
+ &{mapping} Create Dictionary
+ ... IP=${IPV6_IP}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Put_As_Xml_Templated
+ ... ${BGP_VAR_FOLDER}/graceful_restart
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+Start_Exabgp_3
+ [Documentation] Start exabgp with
+ [Tags] critical
+ ${cmd} BuiltIn.Set_Variable ${EXABGP3_CFG} > ${EXABGP3_LOG}
+ ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
+
+Stop_All_Exabgps_3
+ [Documentation] Save exabgp logs as exabgp_graceful_restart.log, and stop exabgp with ctrl-c bash signal
+ BGPcliKeywords.Store_File_To_Workspace ${EXABGP3_LOG} ${EXABGP3_LOG}
+ ExaBgpLib.Stop_ExaBgp
+ Sleep 40s
+ KarafKeywords.Fail If Exceptions Found During Test ${SUITE_NAME}.${TEST_NAME} fail=${True}
+
+Start_Exabgp_4
+ [Documentation] Start exabgp with
+ [Tags] critical
+ ${cmd} BuiltIn.Set_Variable ${EXABGP3_CFG} > ${EXABGP3_LOG}
+ ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
+
+Delete_Bgp_Peer_Configuration_6
+ [Documentation] Revert the BGP configuration to the original state: without any configured peers.
+ &{mapping} Create Dictionary
+ ... IP=${IPV6_IP}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Delete_Templated
+ ... ${BGP_VAR_FOLDER}/graceful_restart
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+Stop_All_Exabgps_4
+ [Documentation] Save exabgp logs as exabgp_graceful_restart.log, and stop exabgp with ctrl-c bash signal
+ BGPcliKeywords.Store_File_To_Workspace ${EXABGP3_LOG} ${EXABGP3_LOG}
+ ExaBgpLib.Stop_ExaBgp
+
+Reconfigure_ODL_To_Accept_Connections_7
+ [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
+ [Tags] exclude
+ &{mapping} Create Dictionary
+ ... IP=${IPV6_IP}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Put_As_Xml_Templated
+ ... ${BGP_VAR_FOLDER}/bgp_peer
+ ... mapping=${mapping}
+ ... session=${CONFIG_SESSION}
+
+Start_Exabgp_5
+ [Documentation] Start exabgp with
+ [Tags] exclude
+ ${cmd} BuiltIn.Set_Variable ${EXABGP4_CFG} > ${EXABGP4_LOG}
+ ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
+
+Delete_Bgp_Peer_Configuration_7
+ [Documentation] Revert the BGP configuration to the original state: without any configured peers.
+ [Tags] exclude
+ &{mapping} Create Dictionary
+ ... IP=${IPV6_IP}
+ ... HOLDTIME=${HOLDTIME}
+ ... PEER_PORT=${BGP_TOOL_PORT}
+ ... INITIATE=false
+ ... BGP_RIB=${RIB_INSTANCE}
+ ... PASSIVE_MODE=true
+ ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
+
+Stop_All_Exabgps_5
+ [Documentation] Save exabgp logs as exabgp_graceful_restart.log, and stop exabgp with ctrl-c bash signal
+ [Tags] exclude
+ BGPcliKeywords.Store_File_To_Workspace ${EXABGP4_LOG} ${EXABGP4_LOG}
+ ExaBgpLib.Stop_ExaBgp
+
+