2 Documentation Test suite for Cluster with Bulk Flows - Reconcilliation in a multi DPN environment
3 Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown
4 Suite Teardown Delete All Sessions
5 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
6 Resource ../../../libraries/SetupUtils.robot
7 Resource ../../../libraries/BulkomaticKeywords.robot
8 Resource ../../../libraries/MininetKeywords.robot
9 Resource ../../../libraries/ClusterManagement.robot
10 Resource ../../../libraries/ClusterOpenFlow.robot
11 Resource ../../../libraries/Utils.robot
12 Variables ../../../variables/Variables.py
15 ${operation_timeout} 100s
16 ${flow_count_per_switch} 10000
18 ${flow_count_after_add} 10000
19 ${flow_count_after_del} 0
20 ${orig_json_config_add} sal_add_bulk_flow_config.json
21 ${orig_json_config_get} sal_get_bulk_flow_config.json
22 ${orig_json_config_del} sal_del_bulk_flow_config.json
25 Check Shards Status And Initialize Variables
26 [Documentation] Check Status for all shards in OpenFlow application.
27 ClusterOpenFlow.Check OpenFlow Shards Status
28 ${temp_json_config_add} BulkomaticKeywords.Set DPN And Flow Count In Json Add ${orig_json_config_add} ${switch_count} ${flow_count_per_switch}
29 ${temp_json_config_get} BulkomaticKeywords.Set DPN And Flow Count In Json Get ${orig_json_config_get} ${switch_count} ${flow_count_after_add}
30 ${temp_json_config_del} BulkomaticKeywords.Set DPN And Flow Count In Json Del ${orig_json_config_del} ${switch_count} ${flow_count_per_switch}
31 Set Suite Variable ${temp_json_config_add}
32 Set Suite Variable ${temp_json_config_get}
33 Set Suite Variable ${temp_json_config_del}
35 Get Inventory Follower and Leader Before Cluster Restart
36 [Documentation] Find a follower in the inventory config shard
37 ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status
38 ${Follower_Node_1}= Get From List ${Inventory_Followers} 0
39 ${Follower_Node_2}= Get From List ${Inventory_Followers} 1
40 ${Inventory_Leader_List}= Create List ${inventory_leader}
41 ${Inventory_Follower_Node1_List}= Create List ${Follower_Node_1}
42 Set Suite Variable ${Follower_Node_1}
43 Set Suite Variable ${Follower_Node_2}
44 Set Suite Variable ${Inventory_Leader}
45 Set Suite Variable ${Inventory_Leader_List}
46 Set Suite Variable ${Inventory_Follower_Node1_List}
48 Start Mininet Connect To Follower Node1
49 [Documentation] Start mininet with connection to Follower Node1.
50 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Follower_Node_1}_IP} --topo linear,${switch_count} --switch ovsk,protocols=OpenFlow13
51 Set Suite Variable ${mininet_conn_id}
53 Add Bulk Flow From Follower
54 [Documentation] ${flow_count_after_add} Flows ( ${flow_count_per_switch} per DPN) in ${switch_count} DPN added via Follower Node1 and verify it gets applied in all instances.
55 BulkomaticKeywords.Add Bulk Flow In Node ${temp_json_config_add} ${Follower_Node_1} ${operation_timeout}
57 Get Bulk Flows and Verify In Inventory Leader
58 [Documentation] Initiate get operation and check flow count across cluster nodes
59 BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} ${Inventory_Leader_List}
61 Verify Flows In Switch Before Cluster Restart
62 [Documentation] Verify flows are installed in switch before cluster restart.
63 MininetKeywords.Verify Aggregate Flow From Mininet Session ${mininet_conn_id} ${flow_count_after_add} ${operation_timeout}
65 Stop Mininet Connected To Follower Node1 and Exit
66 [Documentation] Stop mininet and exit connection.
67 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
68 Utils.Clean Mininet System
70 Start Mininet Reconnect To Follower Node1
71 [Documentation] Start mininet with reconnection to follower node1.
72 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Follower_Node_1}_IP} --topo linear,${switch_count} --switch ovsk,protocols=OpenFlow13
73 Set Suite Variable ${mininet_conn_id}
75 Verify Flows In Switch Reconnected To Follower Node1
76 [Documentation] Verify ${flow_count_per_switch} flows per DPN installed in switch after it is reconnected to follower node1.
77 MininetKeywords.Verify Aggregate Flow From Mininet Session ${mininet_conn_id} ${flow_count_after_add} ${operation_timeout}
79 Stop Mininet Connected To Follower Node1
80 [Documentation] Stop mininet and exit connection.
81 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
82 Utils.Clean Mininet System
84 Start Mininet Connect To Follower Node2
85 [Documentation] Start mininet with connection to follower node2.
86 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Follower_Node_2}_IP} --topo linear,${switch_count} --switch ovsk,protocols=OpenFlow13
87 Set Suite Variable ${mininet_conn_id}
89 Verify Flows In Switch Connected To Follower Node2
90 [Documentation] Verify ${flow_count_per_switch} flows per DPN installed in switch after it is connected to follower node2.
91 MininetKeywords.Verify Aggregate Flow From Mininet Session ${mininet_conn_id} ${flow_count_after_add} ${operation_timeout}
93 Stop Mininet Connected To Follower Node2
94 [Documentation] Stop mininet and exit connection.
95 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
96 Utils.Clean Mininet System
98 Start Mininet Connect To Inventory Leader
99 [Documentation] Start mininet with connection to inventroy leader.
100 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Inventory_Leader}_IP} --topo linear,${switch_count} --switch ovsk,protocols=OpenFlow13
101 Set Suite Variable ${mininet_conn_id}
103 Verify Flows In Switch Connected To Leader
104 [Documentation] Verify ${flow_count_per_switch} flows per DPN installed in switch after it is connected to inventory leader.
105 MininetKeywords.Verify Aggregate Flow From Mininet Session ${mininet_conn_id} ${flow_count_after_add} ${operation_timeout}
107 Stop Mininet Connected To Inventory Leader
108 [Documentation] Stop mininet and exit connection.
109 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
110 Utils.Clean Mininet System
112 Delete All Flows From Follower Node1
113 [Documentation] ${flow_count_after_add} Flows deleted via Follower Node1 and verify it gets applied in all instances.
114 BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} ${Follower_Node_1} ${operation_timeout}
116 Verify No Flows In Inventory Leader
117 [Documentation] Verify flow count is 0 across cluster nodes.
118 BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del} ${Inventory_Leader_List}