Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
&{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${rib_owner_node_id} DEVICE_USER=admin DEVICE_PASSWORD=admin
# After the netconf device is configured, odl starts downloading schemas. If the downloading will not finish within akka timeout, more tries are needed, 3 is based on a user experience.
: FOR ${index} IN RANGE 0 3
&{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${rib_owner_node_id} DEVICE_USER=admin DEVICE_PASSWORD=admin
# After the netconf device is configured, odl starts downloading schemas. If the downloading will not finish within akka timeout, more tries are needed, 3 is based on a user experience.
: FOR ${index} IN RANGE 0 3
[Documentation] Configure BGP peer module with initiate-connection set to false.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
&{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
[Documentation] Configure BGP peer module with initiate-connection set to false.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
&{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
TemplatedRequests.Put_As_Json_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
TemplatedRequests.Put_As_Json_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
[Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
[Documentation] Revert the BGP configuration to the original state: without any configured peers.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
&{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
[Documentation] Revert the BGP configuration to the original state: without any configured peers.
[Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
&{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
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
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} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${rib_owner_node_id} DEVICE_USER=admin DEVICE_PASSWORD=admin
TemplatedRequests.Delete_Templated ${NETCONF_DEV_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
&{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${rib_owner_node_id} DEVICE_USER=admin DEVICE_PASSWORD=admin
TemplatedRequests.Delete_Templated ${NETCONF_DEV_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}