2 Documentation Test suite to test cluster connection switchover
4 Resource ../../../libraries/ClusterManagement.robot
5 Resource ../../../libraries/SxpClusterLib.robot
7 Suite Setup SxpClusterLib.Setup SXP Cluster Session With Device
8 Suite Teardown SxpClusterLib.Clean SXP Cluster Session
9 Test Setup SxpClusterLib.Setup SXP Cluster
10 Test Teardown SxpClusterLib.Clean SXP Cluster
14 Isolation of SXP service follower Test
15 [Documentation] Test SXP connection switchover only if Controller with SCS is isolated
16 SxpClusterLib.Check Shards Status
17 ${controller_index} = SxpClusterLib.Get Owner Controller
18 Isolate SXP Controller ${controller_index}
20 Isolation of SXP noservice follower Test
21 [Documentation] Test SXP connection switchover only if Controller without SCS are isolated
22 SxpClusterLib.Check Shards Status
23 ${controller_index} = SxpClusterLib.Get Not Owner Controller
24 Isolate SXP Controller ${controller_index}
28 Isolate SXP Controller
29 [Documentation] Isolate one of cluster nodes and perform check that Device is still connected afterwards reverts isolation
30 [Arguments] ${controller_index}
31 ${running_members} = ClusterManagement.Isolate_Member_From_List_Or_All ${controller_index}
32 BuiltIn.Wait Until Keyword Succeeds
35 ... ClusterManagement.Verify_Members_Are_Ready
36 ... member_index_list=${running_members}
37 ... verify_cluster_sync=True
38 ... verify_restconf=True
39 ... verify_system_status=False
40 ... service_list=${EMPTY_LIST}
41 BuiltIn.Wait Until Keyword Succeeds
44 ... ClusterManagement.Sync_Status_Should_Be_False
45 ... ${controller_index}
46 BuiltIn.Wait Until Keyword Succeeds
49 ... SxpClusterLib.Check Device is Connected
51 ... session=${DEVICE_SESSION}
52 ClusterManagement.Flush_Iptables_From_List_Or_All
53 BuiltIn.Wait Until Keyword Succeeds
56 ... ClusterManagement.Verify_Members_Are_Ready
57 ... member_index_list=${EMPTY}
58 ... verify_cluster_sync=True
59 ... verify_restconf=True
60 ... verify_system_status=False
61 ... service_list=${EMPTY_LIST}
62 BuiltIn.Wait Until Keyword Succeeds
65 ... SxpClusterLib.Check Device is Connected
67 ... session=${DEVICE_SESSION}