2 Documentation Test suite to test cluster binding propagation
3 Suite Setup Setup SXP Cluster Session
4 Suite Teardown Clean SXP Cluster Session
5 Test Teardown Clean SXP Cluster
6 Library ../../../libraries/Sxp.py
7 Resource ../../../libraries/SxpLib.robot
8 Resource ../../../libraries/ClusterManagement.robot
9 Resource ../../../libraries/SxpClusterLib.robot
15 Isolation of SXP service follower Test Listener Part
16 [Documentation] Test SXP binding propagation only if Controller with SCS is isolated
18 Setup Custom SXP Cluster listener ${CLUSTER_NODE_ID} controller1
19 : FOR ${i} IN RANGE 0 ${SAMPLES}
20 \ ${controller_index} Get Active Controller
21 \ Isolate SXP Controller ${controller_index} ${DEVICE_NODE_ID} ${DEVICE_SESSION}
23 Isolation of SXP service follower Test Speaker Part
24 [Documentation] Test SXP binding propagation only if Controller with SCS is isolated
26 Setup Custom SXP Cluster speaker
27 : FOR ${i} IN RANGE 0 ${SAMPLES}
28 \ ${controller_index} Get Active Controller
29 \ Isolate SXP Controller ${controller_index} ${CLUSTER_NODE_ID}
31 Isolation of SXP noservice follower Test Listener Part
32 [Documentation] Test SXP binding propagation only if Controller without SCS are isolated
34 Setup Custom SXP Cluster listener ${CLUSTER_NODE_ID} controller1
35 : FOR ${i} IN RANGE 0 ${SAMPLES}
36 \ ${controller_index} Get Inactive Controller
37 \ Isolate SXP Controller ${controller_index} ${DEVICE_NODE_ID} ${DEVICE_SESSION}
39 Isolation of SXP noservice follower Test Speaker Part
40 [Documentation] Test SXP binding propagation only if Controller without SCS are isolated
42 Setup Custom SXP Cluster speaker
43 : FOR ${i} IN RANGE 0 ${SAMPLES}
44 \ ${controller_index} Get Inactive Controller
45 \ Isolate SXP Controller ${controller_index} ${CLUSTER_NODE_ID}
48 Setup Custom SXP Cluster
49 [Arguments] ${mode} ${node}=${DEVICE_NODE_ID} ${session}=${DEVICE_SESSION}
50 [Documentation] Setup custom SXP cluster topology
51 Setup SXP Cluster ${mode}
52 : FOR ${i} IN RANGE 1 25
53 \ Add Bindings ${i}0 ${i}.${i}.${i}.${i}/32 node=${node} session=${session}
56 [Arguments] ${node} ${session}
57 [Documentation] Checks that bindings were propagated to Peer
58 ${resp} Get Bindings node=${node} session=${session}
59 : FOR ${i} IN RANGE 1 25
60 \ Should Contain Binding ${resp} ${i}0 ${i}.${i}.${i}.${i}/32
62 Isolate SXP Controller
63 [Arguments] ${controller_index} ${node} ${session}=${EMPTY}
64 [Documentation] Isolate one of cluster nodes and perform check that bindings were propagated afterwards reverts isolation
65 ${find_session} Set Variable If '${session}' == '' ${True} ${False}
66 ${session} Set Variable If ${find_session} controller${controller_index} ${session}
67 Isolate_Member_From_List_Or_All ${controller_index}
68 Wait Until Keyword Succeeds 240 1 Sync_Status_Should_Be_False ${controller_index}
69 Wait Until Keyword Succeeds 60 1 Check Device is Connected ${DEVICE_NODE_ID} session=${DEVICE_SESSION}
70 ${active_controller} Get Active Controller
71 ${session} Set Variable If ${find_session} controller${active_controller} ${session}
72 Wait Until Keyword Succeeds 30 1 Check Bindings ${node} ${session}
73 Flush_Iptables_From_List_Or_All
74 Wait Until Keyword Succeeds 240 1 Sync_Status_Should_Be_True ${controller_index}
75 Wait Until Keyword Succeeds 60 1 Check Device is Connected ${DEVICE_NODE_ID} session=${DEVICE_SESSION}
76 Wait Until Keyword Succeeds 30 1 Check Bindings ${node} ${session}