2 Documentation Test suite for Cluster with Bulk Flows - Reconcilliation in a multi DPN environment
4 Resource ../../../libraries/SetupUtils.robot
5 Resource ../../../libraries/BulkomaticKeywords.robot
6 Resource ../../../libraries/MininetKeywords.robot
7 Resource ../../../libraries/ClusterManagement.robot
8 Resource ../../../libraries/ClusterOpenFlow.robot
9 Resource ../../../libraries/Utils.robot
10 Variables ../../../variables/Variables.py
12 Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown
13 Suite Teardown Delete All Sessions
14 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
18 ${operation_timeout} 100s
19 ${flow_count_per_switch} 10000
21 ${flow_count_after_add} 10000
22 ${flow_count_after_del} 0
23 ${orig_json_config_add} sal_add_bulk_flow_config.json
24 ${orig_json_config_get} sal_get_bulk_flow_config.json
25 ${orig_json_config_del} sal_del_bulk_flow_config.json
29 Check Shards Status And Initialize Variables
30 [Documentation] Check Status for all shards in OpenFlow application.
31 ClusterOpenFlow.Check OpenFlow Shards Status
32 ${temp_json_config_add}= BulkomaticKeywords.Set DPN And Flow Count In Json Add
33 ... ${orig_json_config_add}
35 ... ${flow_count_per_switch}
36 ${temp_json_config_get}= BulkomaticKeywords.Set DPN And Flow Count In Json Get
37 ... ${orig_json_config_get}
39 ... ${flow_count_after_add}
40 ${temp_json_config_del}= BulkomaticKeywords.Set DPN And Flow Count In Json Del
41 ... ${orig_json_config_del}
43 ... ${flow_count_per_switch}
44 Set Suite Variable ${temp_json_config_add}
45 Set Suite Variable ${temp_json_config_get}
46 Set Suite Variable ${temp_json_config_del}
48 Get Inventory Follower and Leader Before Cluster Restart
49 [Documentation] Find a follower in the inventory config shard
50 ${inventory_leader} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status
51 ${Follower_Node_1}= Get From List ${Inventory_Followers} 0
52 ${Follower_Node_2}= Get From List ${Inventory_Followers} 1
53 ${Inventory_Leader_List}= Create List ${inventory_leader}
54 ${Inventory_Follower_Node1_List}= Create List ${Follower_Node_1}
55 Set Suite Variable ${Follower_Node_1}
56 Set Suite Variable ${Follower_Node_2}
57 Set Suite Variable ${Inventory_Leader}
58 Set Suite Variable ${Inventory_Leader_List}
59 Set Suite Variable ${Inventory_Follower_Node1_List}
61 Start Mininet Connect To Follower Node1
62 [Documentation] Start mininet with connection to Follower Node1.
63 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
64 ... ${TOOLS_SYSTEM_IP}
65 ... ${ODL_SYSTEM_${Follower_Node_1}_IP}
66 ... --topo linear,${switch_count}
67 Set Suite Variable ${mininet_conn_id}
69 Add Bulk Flow From Follower
70 [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.
71 BulkomaticKeywords.Add Bulk Flow In Node ${temp_json_config_add} ${Follower_Node_1} ${operation_timeout}
73 Get Bulk Flows and Verify In Inventory Leader
74 [Documentation] Initiate get operation and check flow count across cluster nodes
75 BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster
76 ... ${temp_json_config_get}
77 ... ${operation_timeout}
78 ... ${flow_count_after_add}
79 ... ${Inventory_Leader_List}
81 Verify Flows In Switch Before Cluster Restart
82 [Documentation] Verify flows are installed in switch before cluster restart.
83 MininetKeywords.Verify Aggregate Flow From Mininet Session
84 ... ${mininet_conn_id}
85 ... ${flow_count_after_add}
86 ... ${operation_timeout}
88 Stop Mininet Connected To Follower Node1 and Exit
89 [Documentation] Stop mininet and exit connection.
90 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
91 Utils.Clean Mininet System
93 Start Mininet Reconnect To Follower Node1
94 [Documentation] Start mininet with reconnection to follower node1.
95 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
96 ... ${TOOLS_SYSTEM_IP}
97 ... ${ODL_SYSTEM_${Follower_Node_1}_IP}
98 ... --topo linear,${switch_count}
99 Set Suite Variable ${mininet_conn_id}
101 Verify Flows In Switch Reconnected To Follower Node1
102 [Documentation] Verify ${flow_count_per_switch} flows per DPN installed in switch after it is reconnected to follower node1.
103 MininetKeywords.Verify Aggregate Flow From Mininet Session
104 ... ${mininet_conn_id}
105 ... ${flow_count_after_add}
106 ... ${operation_timeout}
108 Stop Mininet Connected To Follower Node1
109 [Documentation] Stop mininet and exit connection.
110 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
111 Utils.Clean Mininet System
113 Start Mininet Connect To Follower Node2
114 [Documentation] Start mininet with connection to follower node2.
115 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
116 ... ${TOOLS_SYSTEM_IP}
117 ... ${ODL_SYSTEM_${Follower_Node_2}_IP}
118 ... --topo linear,${switch_count}
119 Set Suite Variable ${mininet_conn_id}
121 Verify Flows In Switch Connected To Follower Node2
122 [Documentation] Verify ${flow_count_per_switch} flows per DPN installed in switch after it is connected to follower node2.
123 MininetKeywords.Verify Aggregate Flow From Mininet Session
124 ... ${mininet_conn_id}
125 ... ${flow_count_after_add}
126 ... ${operation_timeout}
128 Stop Mininet Connected To Follower Node2
129 [Documentation] Stop mininet and exit connection.
130 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
131 Utils.Clean Mininet System
133 Start Mininet Connect To Inventory Leader
134 [Documentation] Start mininet with connection to inventroy leader.
135 ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller
136 ... ${TOOLS_SYSTEM_IP}
137 ... ${ODL_SYSTEM_${Inventory_Leader}_IP}
138 ... --topo linear,${switch_count}
139 Set Suite Variable ${mininet_conn_id}
141 Verify Flows In Switch Connected To Leader
142 [Documentation] Verify ${flow_count_per_switch} flows per DPN installed in switch after it is connected to inventory leader.
143 MininetKeywords.Verify Aggregate Flow From Mininet Session
144 ... ${mininet_conn_id}
145 ... ${flow_count_after_add}
146 ... ${operation_timeout}
148 Stop Mininet Connected To Inventory Leader
149 [Documentation] Stop mininet and exit connection.
150 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
151 Utils.Clean Mininet System
153 Delete All Flows From Follower Node1
154 [Documentation] ${flow_count_after_add} Flows deleted via Follower Node1 and verify it gets applied in all instances.
155 BulkomaticKeywords.Delete Bulk Flow In Node
156 ... ${temp_json_config_del}
157 ... ${Follower_Node_1}
158 ... ${operation_timeout}
160 Verify No Flows In Inventory Leader
161 [Documentation] Verify flow count is 0 across cluster nodes.
162 BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster
163 ... ${temp_json_config_get}
164 ... ${operation_timeout}
165 ... ${flow_count_after_del}
166 ... ${Inventory_Leader_List}