- &{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
- ... INITIATE=false BGP_RIB=${RIB_INSTANCE}
- TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
-
-Delete_Netconf_Device_Configuration
- [Documentation] Revert the netconf configuration to the original stat
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- &{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${default_oper_shard_leader_node_ip} DEVICE_USER=admin DEVICE_PASSWORD=admin
- TemplatedRequests.Delete_Templated ${NETCONF_DEV_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
-
-*** Keywords ***
-Setup_Everything
- [Documentation] Setup imported resources, SSH-login to tools system,
- ... create HTTP session, put Python tool to tools system.
- SetupUtils.Setup_Utils_For_Setup_And_Teardown
- RequestsLibrary.Create_Session ${CONFIGURATION_1} http://${ODL_SYSTEM_1_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH}
- RequestsLibrary.Create_Session ${CONFIGURATION_2} http://${ODL_SYSTEM_2_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH}
- RequestsLibrary.Create_Session ${CONFIGURATION_3} http://${ODL_SYSTEM_3_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH}
- PrefixCounting.PC_Setup
- SSHLibrary.Set_Default_Configuration prompt=${TOOLS_SYSTEM_PROMPT}
- SSHLibrary.Open_Connection ${TOOLS_SYSTEM_IP}
- Utils.Flexible_Mininet_Login
- # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
- # TODO: Alternatively, create variable in Variables which starts with http.
- # Both TODOs would probably need to update every suite relying on current Variables.
- SSHLibrary.Put_File ${CURDIR}/../../../../tools/fastbgp/play.py
- SSHKeywords.Require_Python
- SSHKeywords.Assure_Library_Ipaddr target_dir=.
- # Calculate the timeout value based on how many routes are going to be pushed
- # TODO: Replace 35 with some formula from period and repetitions.
- ${timeout} = BuiltIn.Evaluate ${TEST_DURATION_MULTIPLIER} * (${COUNT} * 6.0 / 10000 + 35)
- Builtin.Set_Suite_Variable ${bgp_filling_timeout} ${timeout}
- Builtin.Set_Suite_Variable ${bgp_emptying_timeout} ${bgp_filling_timeout*3.0/4}
- KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${KARAF_LOG_LEVEL}
- ClusterKeywords.Create_Controller_Sessions
- ${controller_list}= ClusterKeywords.Get_Controller_List
- Builtin.Set_Suite_Variable ${controller_list}
- BuiltIn.Log ${controller_list}
- ${default_shard_leader_node_ip}= ClusterKeywords.Get_Leader_And_Verify ${SHARD_DEFAULT_CONFIG}
- Builtin.Set_Suite_Variable ${default_shard_leader_node_ip}
- BuiltIn.Log ${default_shard_leader_node_ip}
- ${default_shard_follower_nodes_ip}= ClusterKeywords.Get_All_Followers ${SHARD_DEFAULT_CONFIG}
- Builtin.Set_Suite_Variable ${default_shard_follower_nodes_ip}
- BuiltIn.Log ${default_shard_follower_nodes_ip}
-
-Teardown_Everything
- [Documentation] Make sure Python tool was killed and tear down imported Resources.
- # Environment issue may have dropped the SSH connection, but we do not want Teardown to fail.
- BuiltIn.Run_Keyword_And_Ignore_Error KillPythonTool.Search_And_Kill_Remote_Python 'play\.py'
- RequestsLibrary.Delete_All_Sessions
- SSHLibrary.Close_All_Connections
-
-Store_File_To_Workspace
- [Arguments] ${src_file_name} ${dst_file_name}
- [Documentation] Store the provided file from the SSH client to workspace.
- ${files}= SSHLibrary.List Files In Directory .
- ${output_log}= SSHLibrary.Execute_Command cat ${src_file_name}
- BuiltIn.Log ${output_log}
- Create File ${dst_file_name} ${output_log}
-
-Configure Netconf Device And Check Mounted
- [Arguments] ${mapping}
- TemplatedRequests.Put_As_Xml_Templated ${NETCONF_DEV_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
- BuiltIn.Wait Until Keyword Succeeds 10x 3s TemplatedRequests.Get_As_Xml_Templated ${NETCONF_MOUNT_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
-
-Start Bgp Peer
- [Documentation] Starts bgp peer and verifies that the peer runs.
- BGPSpeaker.Start_BGP_Speaker --amount ${COUNT} --myip=${TOOLS_SYSTEM_IP} --myport=${BGP_TOOL_PORT} --peerip=${default_oper_shard_leader_node_ip} --peerport=${ODL_BGP_PORT} --insert=${INSERT} --withdraw=${WITHDRAW} --prefill ${PREFILL} --update ${UPDATE} --${BGP_TOOL_LOG_LEVEL} --results ${RESULTS_FILE_NAME}
- BGPcliKeywords.Read_And_Fail_If_Prompt_Is_Seen