<keep-alive-time>30</keep-alive-time>
<reconciliation-time>$timeout</reconciliation-time>
<delete-hold-down-time>$timeout</delete-hold-down-time>
+ <hold-time>90</hold-time>
+ <hold-time-max>180</hold-time-max>
+ <hold-time-min>90</hold-time-min>
</connection-timers>
</connection>
</connections>
${MAC_ADDRESS_TABLE} &{EMPTY}
${DEVICE_NODE_ID} ${TOOLS_SYSTEM_IP}
${CLUSTER_NODE_ID} ${TOOLS_SYSTEM_2_IP}
+${INADDR_ANY} 0.0.0.0
*** Keywords ***
Setup SXP Cluster Session
[Documentation] Create session on the SXP device
RequestsLibrary.Create Session ${DEVICE_SESSION} url=http://${DEVICE_NODE_ID}:${RESTCONFPORT} auth=${AUTH} timeout=${DEFAULT_TIMEOUT_HTTP} max_retries=0
+Setup SXP Cluster Session With Device
+ [Documentation] Create sessions asociated with SXP cluster setup and one SXP device
+ Setup SXP Cluster Session
+ Setup Device Session
+
Clean SXP Cluster Session
[Documentation] Clean sessions asociated with SXP cluster setup
ClusterManagement.Flush_Iptables_From_List_Or_All
ClusterManagement.Check_Cluster_Is_In_Sync
- SxpLib.Clean SXP Session
+ RequestsLibrary.Delete All Sessions
SetupUtils.Setup_Logging_For_Debug_Purposes_On_List_Or_All INFO ${SXP_PACKAGE}
Check Shards Status
Setup SXP Cluster
[Arguments] ${peer_mode}=listener
[Documentation] Setup and connect SXP cluster topology
- SxpLib.Add Node ${DEVICE_NODE_ID} ip=0.0.0.0 session=${DEVICE_SESSION}
- BuiltIn.Wait Until Keyword Succeeds 20 1 SxpLib.Check Node Started ${DEVICE_NODE_ID} session=${DEVICE_SESSION} system=${TOOLS_SYSTEM_IP}
- ... ip=${EMPTY}
- ${cluster_mode} = Sxp.Get Opposing Mode ${peer_mode}
+ SxpLib.Add Node ${DEVICE_NODE_ID} session=${DEVICE_SESSION}
: FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ SxpLib.Add Connection version4 ${peer_mode} ${ODL_SYSTEM_${i+1}_IP} 64999 ${DEVICE_NODE_ID}
+ \ SxpLib.Add Connection version4 ${peer_mode} ${ODL_SYSTEM_${i+1}_IP} 64999 node=${DEVICE_NODE_ID}
\ ... session=${DEVICE_SESSION}
- ${controller_id} = Get Any Controller
- SxpLib.Add Node ${CLUSTER_NODE_ID} ip=0.0.0.0 session=ClusterManagement__session_${controller_id}
- BuiltIn.Wait Until Keyword Succeeds 20 1 Check Cluster Node started ${CLUSTER_NODE_ID}
- SxpLib.Add Connection version4 ${cluster_mode} ${TOOLS_SYSTEM_IP} 64999 ${CLUSTER_NODE_ID} session=ClusterManagement__session_${controller_id}
- BuiltIn.Wait Until Keyword Succeeds 120 1 Check Device is Connected ${DEVICE_NODE_ID} session=${DEVICE_SESSION}
+ ${cluster_mode} = Sxp.Get Opposing Mode ${peer_mode}
+ SxpLib.Add Node ${INADDR_ANY} session=${CONTROLLER_SESSION}
+ SxpLib.Add Connection version4 ${cluster_mode} ${DEVICE_NODE_ID} 64999 ${INADDR_ANY} session=${CONTROLLER_SESSION}
+ BuiltIn.Wait Until Keyword Succeeds 1m 1x SxpLib.Check Node Started ${DEVICE_NODE_ID} session=${DEVICE_SESSION}
+ BuiltIn.Wait Until Keyword Succeeds 1m 1x Check Cluster Node started ${INADDR_ANY} ip=${EMPTY}
+ BuiltIn.Wait Until Keyword Succeeds 4m 1x Check Device is Connected ${DEVICE_NODE_ID} session=${DEVICE_SESSION}
Clean SXP Cluster
[Documentation] Disconnect SXP cluster topology
: FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
\ BuiltIn.Wait Until Keyword Succeeds 240 1 ClusterManagement.Sync_Status_Should_Be_True ${i+1}
SxpLib.Delete Node ${DEVICE_NODE_ID} session=${DEVICE_SESSION}
- SxpLib.Delete Node ${CLUSTER_NODE_ID} session=${CONTROLLER_SESSION}
+ SxpLib.Delete Node ${INADDR_ANY} session=${CONTROLLER_SESSION}
Check Cluster Node started
[Arguments] ${node} ${port}=64999 ${ip}=${node}
${output} = Utils.Run Command On Controller ${ODL_SYSTEM_IP} cat ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log* | grep -c 'Successfully pushed configuration snapshot.*${snapshot_string}'
BuiltIn.Should Not Be Equal As Strings ${output} 0
-Clean SXP Session
- [Documentation] Destroy created sessions
- RequestsLibrary.Delete All Sessions
-
Add Domain
[Arguments] ${domain_name} ${sgt}=None ${prefixes}=None ${origin}=LOCAL ${node}=127.0.0.1 ${session}=session
[Documentation] Based on ODL version decide if domain's bindings will be added with or without origin type (introduced in Fluorine)
: FOR ${num} IN RANGE 1 ${node_range}+1
\ ${ip} = Sxp.Get Ip From Number ${num}
\ Delete Node ${ip}
- Clean SXP Session
+ RequestsLibrary.Delete All Sessions
Get Routing Configuration From Controller
[Arguments] ${session}
*** Settings ***
Documentation Test suite to test cluster connection switchover
-Suite Setup Setup SXP Cluster Session
-Suite Teardown Clean SXP Cluster Session
-Test Setup Setup SXP Cluster
-Test Teardown Clean SXP Cluster
+Suite Setup SxpClusterLib.Setup SXP Cluster Session With Device
+Suite Teardown SxpClusterLib.Clean SXP Cluster Session
+Test Setup SxpClusterLib.Setup SXP Cluster
+Test Teardown SxpClusterLib.Clean SXP Cluster
Resource ../../../libraries/ClusterManagement.robot
Resource ../../../libraries/SxpClusterLib.robot
*** Settings ***
Documentation Test suite to test cluster binding propagation
-Suite Setup Setup SXP Cluster Session
-Suite Teardown Clean SXP Cluster Session
-Test Teardown Clean SXP Cluster
+Suite Setup SxpClusterLib.Setup SXP Cluster Session With Device
+Suite Teardown SxpClusterLib.Clean SXP Cluster Session
+Test Teardown SxpClusterLib.Clean SXP Cluster
Library ../../../libraries/Sxp.py
Resource ../../../libraries/ClusterManagement.robot
Resource ../../../libraries/SxpClusterLib.robot
Isolation of SXP service follower Test Listener Part
[Documentation] Test SXP binding propagation only if Controller with SCS is isolated
SxpClusterLib.Check Shards Status
- Setup Custom SXP Cluster listener ${CLUSTER_NODE_ID} controller1
+ Setup Custom SXP Cluster listener ${INADDR_ANY} ${CONTROLLER_SESSION}
${controller_index} = SxpClusterLib.Get Owner Controller
Isolate SXP Controller ${controller_index} ${DEVICE_NODE_ID} ${DEVICE_SESSION}
SxpClusterLib.Check Shards Status
Setup Custom SXP Cluster speaker
${controller_index} = SxpClusterLib.Get Owner Controller
- Isolate SXP Controller ${controller_index} ${CLUSTER_NODE_ID}
+ Isolate SXP Controller ${controller_index} ${INADDR_ANY}
Isolation of SXP noservice follower Test Listener Part
[Documentation] Test SXP binding propagation only if Controller without SCS are isolated
SxpClusterLib.Check Shards Status
- Setup Custom SXP Cluster listener ${CLUSTER_NODE_ID} controller1
+ Setup Custom SXP Cluster listener ${INADDR_ANY} ${CONTROLLER_SESSION}
${controller_index} = SxpClusterLib.Get Not Owner Controller
Isolate SXP Controller ${controller_index} ${DEVICE_NODE_ID} ${DEVICE_SESSION}
SxpClusterLib.Check Shards Status
Setup Custom SXP Cluster speaker
${controller_index} = SxpClusterLib.Get Not Owner Controller
- Isolate SXP Controller ${controller_index} ${CLUSTER_NODE_ID}
+ Isolate SXP Controller ${controller_index} ${INADDR_ANY}
*** Keywords ***
Setup Custom SXP Cluster
\ SxpLib.Add Bindings ${i}0 ${i}.${i}.${i}.${i}/32 node=${node} session=${session}
Isolate SXP Controller
- [Arguments] ${controller_index} ${node} ${session}=${EMPTY}
+ [Arguments] ${controller_index} ${node} ${session}=ClusterManagement__session_${controller_index}
[Documentation] Isolate one of cluster nodes and perform check that bindings were propagated afterwards reverts isolation
- ${find_session} = BuiltIn.Set Variable If '${session}' == '' ${True} ${False}
- ${session} = BuiltIn.Set Variable If ${find_session} controller${controller_index} ${session}
@{running_members} = ClusterManagement.Isolate_Member_From_List_Or_All ${controller_index}
BuiltIn.Wait Until Keyword Succeeds 240 1 ClusterManagement.Sync_Status_Should_Be_False ${controller_index}
BuiltIn.Wait Until Keyword Succeeds 60 1 SxpClusterLib.Check Device is Connected ${DEVICE_NODE_ID} session=${DEVICE_SESSION}
${running_member} = Collections.Get From List ${running_members} 0
${owner_controller} = SxpClusterLib.Get Owner Controller ${running_member}
- ${session} = BuiltIn.Set Variable If ${find_session} controller${owner_controller} ${session}
BuiltIn.Wait Until Keyword Succeeds 30 1 Check Bindings ${node} ${session}
ClusterManagement.Flush_Iptables_From_List_Or_All
BuiltIn.Wait Until Keyword Succeeds 240 1 ClusterManagement.Sync_Status_Should_Be_True ${controller_index}
*** Settings ***
Documentation Test suite to verify RPC funcionality on cluster
-Suite Setup Setup SXP Cluster Session
-Suite Teardown Clean SXP Cluster Session
-Test Setup Setup SXP Cluster
-Test Teardown Clean SXP Cluster
+Suite Setup SxpClusterLib.Setup SXP Cluster Session With Device
+Suite Teardown SxpClusterLib.Clean SXP Cluster Session
+Test Setup SxpClusterLib.Setup SXP Cluster
+Test Teardown SxpClusterLib.Clean SXP Cluster
Library ../../../libraries/Sxp.py
Resource ../../../libraries/ClusterManagement.robot
Resource ../../../libraries/SxpClusterLib.robot
[Documentation] Isolate one of cluster nodes and perform check that RPC changes were performed afterwards reverts isolation
${owner_controller} = SxpClusterLib.Get Owner Controller
: FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ SxpLib.Add Bindings ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32 node=${CLUSTER_NODE_ID} session=controller${owner_controller}
+ \ SxpLib.Add Bindings ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32 node=${INADDR_ANY} session=ClusterManagement__session_${owner_controller}
@{running_members} = ClusterManagement.Isolate_Member_From_List_Or_All ${controller_index}
BuiltIn.Wait Until Keyword Succeeds 240 1 ClusterManagement.Sync_Status_Should_Be_False ${controller_index}
- BuiltIn.Wait Until Keyword Succeeds 30 1 Check Bindings Exist
${running_member} = Collections.Get From List ${running_members} 0
${owner_controller} = SxpClusterLib.Get Owner Controller ${running_member}
+ BuiltIn.Wait Until Keyword Succeeds 30 1 Check Bindings Exist ${owner_controller}
: FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
- \ SXpLib.Delete Bindings ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32 node=${CLUSTER_NODE_ID} session=controller${owner_controller}
+ \ SXpLib.Delete Bindings ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32 node=${INADDR_ANY} session=ClusterManagement__session_${owner_controller}
ClusterManagement.Flush_Iptables_From_List_Or_All
BuiltIn.Wait Until Keyword Succeeds 240 1 ClusterManagement.Sync_Status_Should_Be_True ${controller_index}
- BuiltIn.Wait Until Keyword Succeeds 30 1 Check Bindings Does Not Exist
+ BuiltIn.Wait Until Keyword Succeeds 30 1 Check Bindings Does Not Exist ${owner_controller}
Check Bindings Exist
+ [Arguments] ${owner_controller}
[Documentation] Check that bindings exists in Cluster datastore
- ${controller_index} = SxpClusterLib.Get Owner Controller
- ${resp} = SxpLib.Get Bindings node=${CLUSTER_NODE_ID} session=controller${controller_index}
+ ${resp} = SxpLib.Get Bindings node=${INADDR_ANY} session=ClusterManagement__session_${owner_controller}
: FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
\ SxpLib.Should Contain Binding ${resp} ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32
Check Bindings Does Not Exist
+ [Arguments] ${owner_controller}
[Documentation] Check that bindings does not exist in Cluster datastore
- ${controller_index} = SxpClusterLib.Get Owner Controller
- ${resp} = SxpLib.Get Bindings node=${CLUSTER_NODE_ID} session=controller${controller_index}
+ ${resp} = SxpLib.Get Bindings node=${INADDR_ANY} session=ClusterManagement__session_${owner_controller}
: FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
\ SxpLib.Should Not Contain Binding ${resp} ${i+1}0 ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32