2 Documentation Test suite for 3Node Cluster - 100K flows and 10 DPNs in Cluster Scale Up scenario
3 Suite Setup ClusterManagement Setup
4 Suite Teardown Delete All Sessions
6 Library OperatingSystem
7 Resource ../../../libraries/BulkomaticKeywords.robot
8 Resource ../../../libraries/MininetKeywords.robot
9 Resource ../../../libraries/ClusterManagement.robot
10 Resource ../../../libraries/ClusterOpenFlow.robot
11 Variables ../../../variables/Variables.py
14 ${enable_openflow_tls} True
15 ${operation_timeout} 250s
16 ${oper_ds_timeout} 400s
17 ${mininet_timeout} 120s
18 ${flow_count_per_switch} 1000
20 ${karaf_log_level} log:set WARN
21 ${orig_json_config_add} sal_add_bulk_flow_config.json
22 ${orig_json_config_get} sal_get_bulk_flow_config.json
23 ${orig_json_config_del} sal_del_bulk_flow_config.json
24 ${rate_results_file} rate.csv
25 ${time_results_file} time.csv
29 [Documentation] Initialize Variables and set the log.
30 Wait Until Keyword Succeeds 3x 3s ClusterManagement.Run_Karaf_Command_On_List_Or_All ${karaf_log_level}
31 ${flow_count_after_add}= BuiltIn.Evaluate ${flow_count_per_switch} * ${switch_count}
32 BuiltIn.Set Suite Variable ${flow_count_after_add}
33 ${temp_json_config_add} BulkomaticKeywords.Set DPN And Flow Count In Json Add ${orig_json_config_add} ${switch_count} ${flow_count_per_switch}
34 ${temp_json_config_get} BulkomaticKeywords.Set DPN And Flow Count In Json Get ${orig_json_config_get} ${switch_count} ${flow_count_after_add}
35 ${temp_json_config_del} BulkomaticKeywords.Set DPN And Flow Count In Json Del ${orig_json_config_del} ${switch_count} ${flow_count_per_switch}
36 BuiltIn.Set Suite Variable ${temp_json_config_add}
37 BuiltIn.Set Suite Variable ${temp_json_config_get}
38 BuiltIn.Set Suite Variable ${temp_json_config_del}
40 Start Mininet And verify Switches
41 [Documentation] Start mininet, controller OF port 6653 should be enabled for TLS while port 6633 should be for TCP.
42 ${ofport} Set Variable If '${enable_openflow_tls}' == 'True' 6653 6633
43 ${protocol} Set Variable If '${enable_openflow_tls}' == 'True' ssl tcp
44 ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers options=--topo linear,${switch_count} ofport=${ofport} protocol=${protocol}
45 BuiltIn.Set Suite Variable ${mininet_conn_id}
46 BuiltIn.Wait Until Keyword Succeeds ${mininet_timeout} 2s ClusterOpenFlow.Verify_Switch_Connections_Running_On_Member ${switch_count} 1
47 Comment Fail the entire suite if switches cannot connect
48 [Teardown] Run Keyword If Test Failed Fatal Error
51 [Documentation] 100K Flows (1K Flows per DPN) in 100 DPN added and verify it gets applied.
52 ${config_datastore_write_start_time}= DateTime.Get Current Date result_format=timestamp
53 BulkomaticKeywords.Add Bulk Flow In Node ${temp_json_config_add} 1 ${operation_timeout}
54 ${config_datastore_write_end_time}= DateTime.Get Current Date result_format=timestamp
55 ${config_datastore_write_time}= DateTime.Subtract Date From Date ${config_datastore_write_end_time} ${config_datastore_write_start_time}
56 ${config_datastore_write_rate}= BuiltIn.Evaluate ${flow_count_after_add} / ${config_datastore_write_time}
57 BuiltIn.Set Suite Variable ${config_datastore_write_start_time}
58 BuiltIn.Log to console ${\n}
59 BuiltIn.Log to console The config_datastore_write_time is ${config_datastore_write_time}
60 BuiltIn.Log to console The config_datastore_write_rate is ${config_datastore_write_rate}
61 BuiltIn.Set Suite Variable ${config_datastore_write_time}
62 BuiltIn.Set Suite Variable ${config_datastore_write_rate}
64 Verify Flows In Switch
65 [Documentation] Verify 100K flows are installed in 100 switches.
66 ${Mininet_write_start_time}= DateTime.Get Current Date result_format=timestamp
67 MininetKeywords.Verify Aggregate Flow From Mininet Session ${mininet_conn_id} ${flow_count_after_add} ${operation_timeout}
68 ${Mininet_write_end_time}= DateTime.Get Current Date result_format=timestamp
69 ${Mininet_write_time}= DateTime.Subtract Date From Date ${Mininet_write_end_time} ${config_datastore_write_start_time}
70 ${Mininet_write_rate}= BuiltIn.Evaluate ${flow_count_after_add} / ${Mininet_write_time}
71 BuiltIn.Log to console ${\n}
72 BuiltIn.Log to console The Mininet_write_time is ${Mininet_write_time}
73 BuiltIn.Log to console The Mininet_write_rate is ${Mininet_write_rate}
74 BuiltIn.Set Suite Variable ${Mininet_write_time}
75 BuiltIn.Set Suite Variable ${Mininet_write_rate}
77 Verify Flows In Oper DS
78 [Documentation] Check Flows in Operational Datastore
79 BuiltIn.Wait Until Keyword Succeeds ${oper_ds_timeout} 2s ClusterOpenFlow.Check_Flows_Operational_Datastore_On_Member ${flow_count_after_add} 1
80 ${oper_datastore_write_end_time}= DateTime.Get Current Date result_format=timestamp
81 ${oper_datastore_write_time}= DateTime.Subtract Date From Date ${oper_datastore_write_end_time} ${config_datastore_write_start_time}
82 ${oper_datastore_write_rate}= BuiltIn.Evaluate ${flow_count_after_add} / ${oper_datastore_write_time}
83 BuiltIn.Log to console ${\n}
84 BuiltIn.Log to console The operational_datastore_write_time is ${oper_datastore_write_time}
85 BuiltIn.Log to console The operational_datastore_write_rate is ${oper_datastore_write_rate}
86 BuiltIn.Set Suite Variable ${oper_datastore_write_time}
87 BuiltIn.Set Suite Variable ${oper_datastore_write_rate}
89 Stop Mininet And Verify
90 [Documentation] Stop mininet and exit connection.
91 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
92 BuiltIn.Wait Until Keyword Succeeds ${mininet_timeout} 2s ClusterOpenFlow.Verify_Switch_Connections_Running_On_Member 0 1
95 [Documentation] 100K Flows deleted and verify.
96 ${config_datastore_delete_start_time}= DateTime.Get Current Date result_format=timestamp
97 BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} 1 ${operation_timeout}
98 ${config_datastore_delete_end_time}= Get Current Date result_format=timestamp
99 ${config_datastore_delete_time}= Subtract Date From Date ${config_datastore_delete_end_time} ${config_datastore_delete_start_time}
100 ${config_datastore_delete_rate}= Evaluate ${flow_count_after_add} / ${config_datastore_delete_time}
101 BuiltIn.Log to console ${\n}
102 BuiltIn.Log to console The config_datastore_delete_time is ${config_datastore_delete_time}
103 BuiltIn.Log to console The config_datastore_delete_rate is ${config_datastore_delete_rate}
104 BuiltIn.Set Suite Variable ${config_datastore_delete_time}
105 BuiltIn.Set Suite Variable ${config_datastore_delete_rate}
107 Log Results And Determine Status
108 [Documentation] Log results for plotting.
109 OperatingSystem.Append To File ${rate_results_file} Config DS,OVS Switch,Operational DS\n
110 OperatingSystem.Append To File ${rate_results_file} ${config_datastore_write_rate},${Mininet_write_rate},${oper_datastore_write_rate}\n
111 OperatingSystem.Append To File ${time_results_file} Config DS,OVS Switch,Operational DS\n
112 OperatingSystem.Append To File ${time_results_file} ${config_datastore_write_time},${Mininet_write_time},${oper_datastore_write_time}\n