Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
+Resource ${CURDIR}/../../../libraries/CompareStream.robot
Resource ${CURDIR}/PrefixcountKeywords.robot
*** Variables ***
Configure_Netconf_Device
[Documentation] Configures and verifies netconf device configuration. If configuration is not successful, it de-configures the device before the next attempt.
+ # No need for configuring netconf device in carbon and above, openconfig is used
+ CompareStream.Run_Keyword_If_At_Least_Carbon BuiltIn.Pass_Execution Openconfig usage does not need netconf connector
&{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}
- ... INITIATE=false BGP_RIB=${RIB_INSTANCE}
+ ... INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
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}
- ... INITIATE=false BGP_RIB=${RIB_INSTANCE}
+ ... INITIATE=false BGP_RIB=${RIB_INSTANCE} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
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
+ CompareStream.Run_Keyword_If_At_Least_Carbon BuiltIn.Pass_Execution Openconfig usage does not need netconf connector
&{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}