Use Variables.robot instead of Variables.py
[integration/test.git] / csit / suites / bgpcep / bgpclustering / 030_singlepeer_prefixcount_1Mroutes_nonreplicated_rib.robot
index 2a3077109dafd6cb920d06986b6c17534da2bf4d..dfb88680d6c3c15f9023beece617c9bf2b83ac40 100644 (file)
@@ -18,33 +18,35 @@ Test Setup        SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
 Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
 Library           SSHLibrary    timeout=10s
 Library           RequestsLibrary
-Variables         ${CURDIR}/../../../variables/Variables.py
-Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
-Resource          ${CURDIR}/../../../libraries/BGPcliKeywords.robot
-Resource          ${CURDIR}/../../../libraries/FailFast.robot
-Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
-Resource          ${CURDIR}/../../../libraries/PrefixCounting.robot
-Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource          ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
-Resource          ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource          ${CURDIR}/PrefixcountKeywords.robot
+Resource          ../../../libraries/BGPcliKeywords.robot
+Resource          ../../../libraries/BGPSpeaker.robot
+Resource          ../../../libraries/ClusterManagement.robot
+Resource          ../../../libraries/FailFast.robot
+Resource          ../../../libraries/KillPythonTool.robot
+Resource          ../../../libraries/PrefixCounting.robot
+Resource          ../../../libraries/SetupUtils.robot
+Resource          ../../../libraries/SSHKeywords.robot
+Resource          ../../../libraries/TemplatedRequests.robot
+Resource          ../../../variables/Variables.robot
+Resource          PrefixcountKeywords.robot
 
 *** Variables ***
 ${COUNT}          1000000
 
 *** Test Cases ***
 Get Example Bgp Rib Owner
-    [Documentation]    Find an odl node which is able to accept incomming connection. To this node netconf connector should be configured.
+    [Documentation]    Find an odl node which is able to accept incomming connection.
     ${rib_owner}    ${rib_candidates}=    ClusterManagement.Get_Owner_And_Successors_For_device    example-bgp-rib    org.opendaylight.mdsal.ServiceEntityType    1
     BuiltIn.Set_Suite_Variable    ${rib_owner}    ${rib_owner}
     BuiltIn.Set_Suite_Variable    ${rib_owner_node_id}    ${ODL_SYSTEM_${rib_owner}_IP}
-    RequestsLibrary.Create_Session    ${CONFIG_SESSION}    http://${ODL_SYSTEM_${rib_owner}_IP}:${RESTCONFPORT}    auth=${AUTH}
+    ${session} =    ClusterManagement.Resolve_Http_Session_For_Member    ${rib_owner}
+    BuiltIn.Set_Suite_Variable    ${config_session}    ${session}
 
 Get Topology Operational Leader
     [Documentation]    Gets the operational topology shard leader
     ${leader}    ${followers}=    ClusterManagement.Get_Leader_And_Followers_For_Shard    shard_name=topology    shard_type=operational
-    BuiltIn.Set_Suite_Variable    ${topo_lead_ses}    operational-${leader}
+    ${session} =    ClusterManagement.Resolve_Http_Session_For_Member    ${leader}
+    BuiltIn.Set_Suite_Variable    ${topo_lead_ses}    ${session}
 
 Check_For_Empty_Ipv4_Topology_Before_Talking
     [Documentation]    Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
@@ -55,8 +57,8 @@ Check_For_Empty_Ipv4_Topology_Before_Talking
 Reconfigure_ODL_To_Accept_Connection
     [Documentation]    Configure BGP peer module in passive mode (not initiating connection)
     [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-    &{mapping}    Create Dictionary    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}    PASSIVE_MODE=true    BGP_RIB=${RIB_INSTANCE}
-    TemplatedRequests.Post_As_Xml_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
+    &{mapping}    Create Dictionary    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    IP=${TOOLS_SYSTEM_IP}    HOLDTIME=${HOLDTIME}    PEER_PORT=${BGP_TOOL_PORT}    PASSIVE_MODE=true
+    TemplatedRequests.Put_As_Xml_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${config_session}
     [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
 
 Start_Talking_BGP_Speaker
@@ -93,5 +95,5 @@ Check_For_Empty_Ipv4_Topology_After_Listening
 
 Delete_Bgp_Peer_Configuration
     [Documentation]    Revert the BGP configuration to the original state: without any configured peers
-    &{mapping}    Create Dictionary    BGP_RIB=${RIB_INSTANCE}
-    TemplatedRequests.Delete_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${CONFIG_SESSION}
+    &{mapping}    Create Dictionary    BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}    IP=${TOOLS_SYSTEM_IP}
+    TemplatedRequests.Delete_Templated    ${BGP_PEER_FOLDER}    mapping=${mapping}    session=${config_session}