2 Documentation Test suite for 3Node Cluster - 100K flows and 10 DPNs in Cluster Scale Up scenario
5 Library OperatingSystem
6 Resource ../../../libraries/BulkomaticKeywords.robot
7 Resource ../../../libraries/MininetKeywords.robot
8 Resource ../../../libraries/ClusterManagement.robot
9 Resource ../../../libraries/ClusterOpenFlow.robot
10 Variables ../../../variables/Variables.py
12 Suite Setup ClusterManagement Setup
13 Suite Teardown Delete All Sessions
17 ${enable_openflow_tls} True
18 ${operation_timeout} 250s
19 ${oper_ds_timeout} 400s
20 ${mininet_timeout} 120s
21 ${flow_count_per_switch} 1000
23 ${karaf_log_level} log:set WARN
24 ${orig_json_config_add} sal_add_bulk_flow_config.json
25 ${orig_json_config_get} sal_get_bulk_flow_config.json
26 ${orig_json_config_del} sal_del_bulk_flow_config.json
27 ${rate_results_file} rate.csv
28 ${time_results_file} time.csv
33 [Documentation] Initialize Variables and set the log.
34 Wait Until Keyword Succeeds 3x 3s ClusterManagement.Run_Karaf_Command_On_List_Or_All ${karaf_log_level}
35 ${flow_count_after_add}= BuiltIn.Evaluate ${flow_count_per_switch} * ${switch_count}
36 BuiltIn.Set Suite Variable ${flow_count_after_add}
37 ${temp_json_config_add}= BulkomaticKeywords.Set DPN And Flow Count In Json Add
38 ... ${orig_json_config_add}
40 ... ${flow_count_per_switch}
41 ${temp_json_config_get}= BulkomaticKeywords.Set DPN And Flow Count In Json Get
42 ... ${orig_json_config_get}
44 ... ${flow_count_after_add}
45 ${temp_json_config_del}= BulkomaticKeywords.Set DPN And Flow Count In Json Del
46 ... ${orig_json_config_del}
48 ... ${flow_count_per_switch}
49 BuiltIn.Set Suite Variable ${temp_json_config_add}
50 BuiltIn.Set Suite Variable ${temp_json_config_get}
51 BuiltIn.Set Suite Variable ${temp_json_config_del}
53 Start Mininet And verify Switches
54 [Documentation] Start mininet, controller OF port 6653 should be enabled for TLS while port 6633 should be for TCP.
55 ${ofport}= Set Variable If '${enable_openflow_tls}' == 'True' 6653 6633
56 ${protocol}= Set Variable If '${enable_openflow_tls}' == 'True' ssl tcp
57 ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers
58 ... options=--topo linear,${switch_count}
60 ... protocol=${protocol}
61 BuiltIn.Set Suite Variable ${mininet_conn_id}
62 BuiltIn.Wait Until Keyword Succeeds
63 ... ${mininet_timeout}
65 ... ClusterOpenFlow.Verify_Switch_Connections_Running_On_Member
68 Comment Fail the entire suite if switches cannot connect
69 [Teardown] Run Keyword If Test Failed Fatal Error
72 [Documentation] 100K Flows (1K Flows per DPN) in 100 DPN added and verify it gets applied.
73 ${config_datastore_write_start_time}= DateTime.Get Current Date result_format=timestamp
74 BulkomaticKeywords.Add Bulk Flow In Node ${temp_json_config_add} 1 ${operation_timeout}
75 ${config_datastore_write_end_time}= DateTime.Get Current Date result_format=timestamp
76 ${config_datastore_write_time}= DateTime.Subtract Date From Date
77 ... ${config_datastore_write_end_time}
78 ... ${config_datastore_write_start_time}
79 ${config_datastore_write_rate}= BuiltIn.Evaluate ${flow_count_after_add} / ${config_datastore_write_time}
80 BuiltIn.Set Suite Variable ${config_datastore_write_start_time}
81 BuiltIn.Log to console ${\n}
82 BuiltIn.Log to console The config_datastore_write_time is ${config_datastore_write_time}
83 BuiltIn.Log to console The config_datastore_write_rate is ${config_datastore_write_rate}
84 BuiltIn.Set Suite Variable ${config_datastore_write_time}
85 BuiltIn.Set Suite Variable ${config_datastore_write_rate}
87 Verify Flows In Switch
88 [Documentation] Verify 100K flows are installed in 100 switches.
89 ${Mininet_write_start_time}= DateTime.Get Current Date result_format=timestamp
90 MininetKeywords.Verify Aggregate Flow From Mininet Session
91 ... ${mininet_conn_id}
92 ... ${flow_count_after_add}
93 ... ${operation_timeout}
94 ${Mininet_write_end_time}= DateTime.Get Current Date result_format=timestamp
95 ${Mininet_write_time}= DateTime.Subtract Date From Date
96 ... ${Mininet_write_end_time}
97 ... ${config_datastore_write_start_time}
98 ${Mininet_write_rate}= BuiltIn.Evaluate ${flow_count_after_add} / ${Mininet_write_time}
99 BuiltIn.Log to console ${\n}
100 BuiltIn.Log to console The Mininet_write_time is ${Mininet_write_time}
101 BuiltIn.Log to console The Mininet_write_rate is ${Mininet_write_rate}
102 BuiltIn.Set Suite Variable ${Mininet_write_time}
103 BuiltIn.Set Suite Variable ${Mininet_write_rate}
105 Verify Flows In Oper DS
106 [Documentation] Check Flows in Operational Datastore
107 BuiltIn.Wait Until Keyword Succeeds
108 ... ${oper_ds_timeout}
110 ... ClusterOpenFlow.Check_Flows_Operational_Datastore_On_Member
111 ... ${flow_count_after_add}
113 ${oper_datastore_write_end_time}= DateTime.Get Current Date result_format=timestamp
114 ${oper_datastore_write_time}= DateTime.Subtract Date From Date
115 ... ${oper_datastore_write_end_time}
116 ... ${config_datastore_write_start_time}
117 ${oper_datastore_write_rate}= BuiltIn.Evaluate ${flow_count_after_add} / ${oper_datastore_write_time}
118 BuiltIn.Log to console ${\n}
119 BuiltIn.Log to console The operational_datastore_write_time is ${oper_datastore_write_time}
120 BuiltIn.Log to console The operational_datastore_write_rate is ${oper_datastore_write_rate}
121 BuiltIn.Set Suite Variable ${oper_datastore_write_time}
122 BuiltIn.Set Suite Variable ${oper_datastore_write_rate}
124 Stop Mininet And Verify
125 [Documentation] Stop mininet and exit connection.
126 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
127 BuiltIn.Wait Until Keyword Succeeds
128 ... ${mininet_timeout}
130 ... ClusterOpenFlow.Verify_Switch_Connections_Running_On_Member
135 [Documentation] 100K Flows deleted and verify.
136 ${config_datastore_delete_start_time}= DateTime.Get Current Date result_format=timestamp
137 BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} 1 ${operation_timeout}
138 ${config_datastore_delete_end_time}= Get Current Date result_format=timestamp
139 ${config_datastore_delete_time}= Subtract Date From Date
140 ... ${config_datastore_delete_end_time}
141 ... ${config_datastore_delete_start_time}
142 ${config_datastore_delete_rate}= Evaluate ${flow_count_after_add} / ${config_datastore_delete_time}
143 BuiltIn.Log to console ${\n}
144 BuiltIn.Log to console The config_datastore_delete_time is ${config_datastore_delete_time}
145 BuiltIn.Log to console The config_datastore_delete_rate is ${config_datastore_delete_rate}
146 BuiltIn.Set Suite Variable ${config_datastore_delete_time}
147 BuiltIn.Set Suite Variable ${config_datastore_delete_rate}
149 Log Results And Determine Status
150 [Documentation] Log results for plotting.
151 OperatingSystem.Append To File ${rate_results_file} Config DS,OVS Switch,Operational DS\n
152 OperatingSystem.Append To File
153 ... ${rate_results_file}
154 ... ${config_datastore_write_rate},${Mininet_write_rate},${oper_datastore_write_rate}\n
155 OperatingSystem.Append To File ${time_results_file} Config DS,OVS Switch,Operational DS\n
156 OperatingSystem.Append To File
157 ... ${time_results_file}
158 ... ${config_datastore_write_time},${Mininet_write_time},${oper_datastore_write_time}\n