New OpenFlow REST perf test 03/46103/4
authorLuis Gomez <ecelgp@gmail.com>
Thu, 22 Sep 2016 23:29:32 +0000 (16:29 -0700)
committerJamo Luhrsen <jluhrsen@redhat.com>
Fri, 23 Sep 2016 19:15:50 +0000 (19:15 +0000)
New test to send Bulk REST request for single node and cluster.
Includes disable persistence + JVM monitoring framework.
Also modify mininet KW to account for total flows in OVS.

Change-Id: I5f57d983be61b08e6180c703473b70e203e6a5fe
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
14 files changed:
csit/configplans/openflowplugin-restconf-clustering-perf-daily.txt [new file with mode: 0644]
csit/configplans/openflowplugin-restconf-perf-daily.txt [new file with mode: 0644]
csit/libraries/MininetKeywords.robot
csit/scriptplans/openflowplugin-restconf-clustering-perf-daily.txt [new file with mode: 0644]
csit/scriptplans/openflowplugin-restconf-perf-daily.txt [new file with mode: 0644]
csit/suites/openflowplugin/Clustering_Bulkomatic/010__Cluster_HA_Data_Recovery_BulkFlow_Single_Switch.robot
csit/suites/openflowplugin/Clustering_Bulkomatic/020__Cluster_HA_Data_Recovery_BulkFlow_2Node_Cluster.robot
csit/suites/openflowplugin/Clustering_Bulkomatic/030__Cluster_Reconcilliation_Multi_DPN.robot
csit/suites/openflowplugin/Performance_Bulkomatic/100K_Flows_100DPN_1Node_Perf_Test.robot
csit/suites/openflowplugin/Performance_Bulkomatic/100K_Flows_100DPN_3Node_Cluster_Perf_Test.robot
csit/suites/openflowplugin/Performance_Restconf/100K_Flows_100DPN_1Node_Perf_Test.robot [new file with mode: 0644]
csit/suites/openflowplugin/Performance_Restconf/100K_Flows_100DPN_3Node_Cluster_Perf_Test.robot [new file with mode: 0644]
csit/testplans/openflowplugin-restconf-clustering-perf-daily.txt [new file with mode: 0644]
csit/testplans/openflowplugin-restconf-perf-daily.txt [new file with mode: 0644]

diff --git a/csit/configplans/openflowplugin-restconf-clustering-perf-daily.txt b/csit/configplans/openflowplugin-restconf-clustering-perf-daily.txt
new file mode 100644 (file)
index 0000000..4987859
--- /dev/null
@@ -0,0 +1,2 @@
+# Place the suites in run order:
+integration/test/csit/scripts/set_persistence_off.sh
diff --git a/csit/configplans/openflowplugin-restconf-perf-daily.txt b/csit/configplans/openflowplugin-restconf-perf-daily.txt
new file mode 100644 (file)
index 0000000..4987859
--- /dev/null
@@ -0,0 +1,2 @@
+# Place the suites in run order:
+integration/test/csit/scripts/set_persistence_off.sh
index 2fc7d1d25a9f22e945810adac2a286f7b5ce982d..9e2ae96330df5539954941ec615cfd0f088c4cde 100644 (file)
@@ -85,14 +85,15 @@ Stop Mininet And Exit Multiple Sessions
     \    MininetKeywords.Stop Mininet And Exit    ${mininet_conn_id}
 
 Verify Aggregate Flow From Mininet Session
-    [Arguments]    ${mininet_conn_id}    ${switch_count}    ${flow_count}    ${time_out}
+    [Arguments]    ${mininet_conn_id}    ${flow_count}    ${time_out}
     [Documentation]    Verify flow count per switch
-    Wait Until Keyword Succeeds    ${time_out}    2s    MininetKeywords.Mininet Sync Status    ${mininet_conn_id}    ${switch_count}    ${flow_count}
+    Wait Until Keyword Succeeds    ${time_out}    2s    MininetKeywords.Mininet Sync Status    ${mininet_conn_id}    ${flow_count}
 
 Mininet Sync Status
-    [Arguments]    ${mininet_id}    ${switch_count}    ${flow_count}
+    [Arguments]    ${mininet_id}    ${flow_count}
     [Documentation]    Sync with mininet to match exact number of flows
-    Set Test Variable    &{dictionary}    flow_count\=${flow_count}=${switch_count}
     ${cmd} =    Set Variable    dpctl dump-aggregate -O OpenFlow13
     ${output}=    MininetKeywords.Send Mininet Command    ${mininet_id}    ${cmd}
-    Utils.Check Item Occurrence    ${output}    ${dictionary}
+    ${flows}=    String.Get RegExp Matches    ${output}    (?<=flow_count\=).*?(?=\r)
+    ${total_flows}=    BuiltIn.Evaluate    sum(map(int, ${flows}))
+    Should Be Equal As Numbers    ${total_flows}    ${flow_count}
diff --git a/csit/scriptplans/openflowplugin-restconf-clustering-perf-daily.txt b/csit/scriptplans/openflowplugin-restconf-clustering-perf-daily.txt
new file mode 100644 (file)
index 0000000..1a31c3a
--- /dev/null
@@ -0,0 +1,3 @@
+# Place the scripts in run order:
+integration/test/csit/scripts/set_elasticsearch_attribute_short.sh
+integration/test/csit/scripts/set_jvm_common_attribute.sh
diff --git a/csit/scriptplans/openflowplugin-restconf-perf-daily.txt b/csit/scriptplans/openflowplugin-restconf-perf-daily.txt
new file mode 100644 (file)
index 0000000..1a31c3a
--- /dev/null
@@ -0,0 +1,3 @@
+# Place the scripts in run order:
+integration/test/csit/scripts/set_elasticsearch_attribute_short.sh
+integration/test/csit/scripts/set_jvm_common_attribute.sh
index d82b33df0c9f9472b4a63316fbb4ca5c39666106..5122e4fef8275eb55b234b7b07400355fc96ba98 100644 (file)
@@ -52,7 +52,7 @@ Get Bulk Flows and Verify In Cluster
 
 Verify Flows In Switch Before Cluster Restart
     [Documentation]    Verify flows are installed in switch before cluster restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Kill All Cluster Nodes
     [Documentation]    Kill All Nodes.
@@ -78,7 +78,7 @@ Start Mininet Again Connect To Follower Node1
 
 Verify Flows In Switch After Cluster Restart
     [Documentation]    Verify flows are installed in switch after cluster restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Stop Mininet Connected To Follower Node1
     [Documentation]    Stop mininet and exit connection.
@@ -113,7 +113,7 @@ Get Bulk Flows and Verify In Cluster Before Leader Restart
 
 Verify Flows In Switch Before Leader Restart
     [Documentation]    Verify flows are installed in switch before leader restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Kill Leader From Cluster Node
     [Documentation]    Kill Leader Node.
@@ -144,7 +144,7 @@ Start Mininet Again Connect To Leader
 
 Verify Flows In Switch After Leader Restart
     [Documentation]    Verify flows are installed in switch after leader restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
     [Teardown]    Report_Failure_Due_To_Bug    6459
 
 Stop Mininet Connected To Leader Node After Leader Restart
@@ -181,7 +181,7 @@ Get Bulk Flows and Verify In Cluster Before Follower Restart
 
 Verify Flows In Switch Before Follower Restart
     [Documentation]    Verify flows are installed in switch before follower restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Kill Follower Node2
     [Documentation]    Kill Follower Node2.
@@ -212,7 +212,7 @@ Start Mininet Again Connect To Follower Node2
 
 Verify Flows In Switch After Follower Node2 Restart
     [Documentation]    Verify flows are installed in switch after follower restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
     [Teardown]    Report_Failure_Due_To_Bug    6459
 
 Stop Mininet Connected To Follower Node2
index a166f4a89f1d6da3c22a1270386026de0151ab11..ecb6ba7ee3327e537232200bd8e8bfb48bbf9f89 100644 (file)
@@ -64,7 +64,7 @@ Get Bulk Flows and Verify In Cluster
 
 Verify Flows In Switch Before Cluster Restart
     [Documentation]    Verify flows are installed in switch before cluster restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Restart Leader From Cluster Node
     [Documentation]    Restart Leader Node.
@@ -76,7 +76,7 @@ Verify Data Recovery After Leader Restart
 
 Verify Flows In Switch After Leader Restart
     [Documentation]    Verify flows are installed in switch after cluster restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Stop Mininet Connected To Follower Node1
     [Documentation]    Stop mininet and exit connection.
@@ -125,7 +125,7 @@ Get Bulk Flows and Verify In Cluster Before Follower Restart
 
 Verify Flows In Switch Before Follower Restart
     [Documentation]    Verify flows are installed in switch before follower restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Restart Follower From Cluster Node
     [Documentation]    Restart Follower Node2.
@@ -137,7 +137,7 @@ Verify Data Recovery After Follower Restart
 
 Verify Flows In Switch After Follower Restart
     [Documentation]    Verify flows are installed in switch after cluster restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Stop Mininet Connected To Follower Node
     [Documentation]    Stop mininet and exit connection.
index 55c76d869199c175a203ef6445ea432cb9b4e57d..56ded773079af636b2a0e600218981f4cc284748 100644 (file)
@@ -54,7 +54,7 @@ Get Bulk Flows and Verify In Cluster
 
 Verify Flows In Switch Before Cluster Restart
     [Documentation]    Verify flows are installed in switch before cluster restart.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Stop Mininet Connected To Follower Node1 and Exit
     [Documentation]    Stop mininet and exit connection.
@@ -68,7 +68,7 @@ Start Mininet Reconnect To Follower Node1
 
 Verify Flows In Switch Reconnected To Follower Node1
     [Documentation]    Verify 1K flows per DPN installed in switch after it is reconnected to follower node1.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Stop Mininet Connected To Follower Node1
     [Documentation]    Stop mininet and exit connection.
@@ -82,7 +82,7 @@ Start Mininet Connect To Follower Node2
 
 Verify Flows In Switch Connected To Follower Node2
     [Documentation]    Verify 1K flows per DPN installed in switch after it is connected to follower node2.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Stop Mininet Connected To Follower Node2
     [Documentation]    Stop mininet and exit connection.
@@ -96,7 +96,7 @@ Start Mininet Connect To Inventory Leader
 
 Verify Flows In Switch Connected To Leader
     [Documentation]    Verify 1K flows per DPN installed in switch after it is connected to inventory leader.
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
 
 Stop Mininet Connected To Inventory Leader
     [Documentation]    Stop mininet and exit connection.
index 5a8c52b4c2adf38b00376c7ce3342af9cc384628..ebfca5577ec70fe9ced13b21cb113280d714b1cc 100644 (file)
@@ -25,7 +25,7 @@ ${time_results_file}    time.csv
 
 *** Test Cases ***
 Initialize Variables
-    [Documentation]    Check Status for all shards in OpenFlow application and set the logs across cluster nodes.
+    [Documentation]    Initialize Variables and set the log.
     Wait Until Keyword Succeeds    3x    3s    ClusterManagement.Run_Karaf_Command_On_List_Or_All    ${karaf_log_level}
     ${flow_count_after_add}=    BuiltIn.Evaluate    ${flow_count_per_switch} * ${switch_count}
     BuiltIn.Set Suite Variable    ${flow_count_after_add}
@@ -59,7 +59,7 @@ Add Bulk Flow
 Verify Flows In Switch
     [Documentation]    Verify 100K flows are installed in 100 switches.
     ${Mininet_write_start_time}=    DateTime.Get Current Date    result_format=timestamp
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
     ${Mininet_write_end_time}=    DateTime.Get Current Date    result_format=timestamp
     ${Mininet_write_time}=    DateTime.Subtract Date From Date    ${Mininet_write_end_time}    ${config_datastore_write_start_time}
     ${Mininet_write_rate}=    BuiltIn.Evaluate    ${flow_count_after_add} / ${Mininet_write_time}
index 53c1e75c0ce634c127a447faa7eef28db71628b2..dbd61ebb7b15c4f2b8af108188d5e9c95269671b 100644 (file)
@@ -42,8 +42,6 @@ Get Inventory Config Shard Follower And Leader
     ${inventory_leader}    ${inventory_followers}    ClusterOpenFlow.Get InventoryConfig Shard Status
     ${Follower_Node_1}=    Get From List    ${Inventory_Followers}    0
     ${Follower_Node_2}=    Get From List    ${Inventory_Followers}    1
-    ${Inventory_Leader_List}=    Create List    ${inventory_leader}
-    ${Inventory_Follower_Node1_List}=    Create List    ${Follower_Node_1}
     BuiltIn.Log to console    ${\n}
     BuiltIn.Log to console    The follower Node1 is ${Follower_Node_1}
     BuiltIn.Log to console    The follower Node2 is ${Follower_Node_2}
@@ -51,8 +49,6 @@ Get Inventory Config Shard Follower And Leader
     BuiltIn.Set Suite Variable    ${Follower_Node_1}
     BuiltIn.Set Suite Variable    ${Follower_Node_2}
     BuiltIn.Set Suite Variable    ${Inventory_Leader}
-    BuiltIn.Set Suite Variable    ${Inventory_Leader_List}
-    BuiltIn.Set Suite Variable    ${Inventory_Follower_Node1_List}
 
 Start Mininet Connect To Follower Node1
     [Documentation]    Start mininet with connection to follower node1.
@@ -77,7 +73,7 @@ Add Bulk Flow From Follower Node2
 Verify Flows In Switch
     [Documentation]    Verify 100K flows are installed in 10 switches.
     ${Mininet_write_start_time}=    DateTime.Get Current Date    result_format=timestamp
-    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${switch_count}    ${flow_count_per_switch}    ${operation_timeout}
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count_after_add}    ${operation_timeout}
     ${Mininet_write_end_time}=    DateTime.Get Current Date    result_format=timestamp
     ${Mininet_write_time}=    DateTime.Subtract Date From Date    ${Mininet_write_end_time}    ${config_datastore_write_start_time}
     ${Mininet_write_rate}=    BuiltIn.Evaluate    ${flow_count_after_add} / ${Mininet_write_time}
diff --git a/csit/suites/openflowplugin/Performance_Restconf/100K_Flows_100DPN_1Node_Perf_Test.robot b/csit/suites/openflowplugin/Performance_Restconf/100K_Flows_100DPN_1Node_Perf_Test.robot
new file mode 100644 (file)
index 0000000..5c962de
--- /dev/null
@@ -0,0 +1,104 @@
+*** Settings ***
+Documentation     Test suite for 3Node Cluster - 100K flows and 10 DPNs in Cluster Scale Up scenario
+Suite Setup       ClusterManagement Setup
+Suite Teardown    Delete All Sessions
+Library           DateTime
+Library           OperatingSystem
+Library           ../../../libraries/ScaleClient.py
+Resource          ../../../libraries/MininetKeywords.robot
+Resource          ../../../libraries/ClusterManagement.robot
+Resource          ../../../libraries/ClusterOpenFlow.robot
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${operation_timeout}    250s
+${oper_ds_timeout}    400s
+${mininet_timeout}    120s
+${flow_count}     100000
+${switch_count}    100
+${swspread}       linear
+${tabspread}      first
+${fpr}            200
+${nrthreads}      5
+${karaf_log_level}    log:set ERROR
+${rate_results_file}    rate.csv
+${time_results_file}    time.csv
+
+*** Test Cases ***
+Initialize Variables
+    [Documentation]    Initialize variables and set the log.
+    Wait Until Keyword Succeeds    3x    3s    ClusterManagement.Run_Karaf_Command_On_List_Or_All    ${karaf_log_level}
+    ${controller_list}=    Create List    ${ODL_SYSTEM_IP}
+    Set Suite Variable    ${controller_list}
+    ${flows}    ${notes}    ScaleClient.Generate New Flow Details    flows=${flow_count}    switches=${switch_count}    swspread=${swspread}    tabspread=${tabspread}
+    Set Suite Variable    ${flows}
+
+Start Mininet And verify Switches
+    [Documentation]    Start mininet.
+    ${mininet_conn_id}=    MininetKeywords.Start Mininet Single Controller    ${TOOLS_SYSTEM_IP}    ${ODL_SYSTEM_IP}    --topo linear,${switch_count} --switch ovsk,protocols=OpenFlow13
+    BuiltIn.Set Suite Variable    ${mininet_conn_id}
+    BuiltIn.Wait Until Keyword Succeeds    ${mininet_timeout}    2s    ClusterOpenFlow.Verify_Switch_Connections_Running_On_Member    ${switch_count}    1
+
+Add Bulk Flow Via REST
+    [Documentation]    100K Flows (1K Flows per DPN) in 100 DPN added and verify it gets applied.
+    ${config_datastore_write_start_time}=    DateTime.Get Current Date    result_format=timestamp
+    ScaleClient.Configure Flows Bulk    flow_details=${flows}    controllers=${controller_list}    nrthreads=${nrthreads}    fpr=${fpr}
+    ${config_datastore_write_end_time}=    DateTime.Get Current Date    result_format=timestamp
+    ${config_datastore_write_time}=    DateTime.Subtract Date From Date    ${config_datastore_write_end_time}    ${config_datastore_write_start_time}
+    ${config_datastore_write_rate}=    BuiltIn.Evaluate    ${flow_count} / ${config_datastore_write_time}
+    BuiltIn.Set Suite Variable    ${config_datastore_write_start_time}
+    BuiltIn.Log to console    ${\n}
+    BuiltIn.Log to console    The config_datastore_write_time is ${config_datastore_write_time}
+    BuiltIn.Log to console    The config_datastore_write_rate is ${config_datastore_write_rate}
+    BuiltIn.Set Suite Variable    ${config_datastore_write_time}
+    BuiltIn.Set Suite Variable    ${config_datastore_write_rate}
+
+Verify Flows In Switch
+    [Documentation]    Verify 100K flows are installed in 100 switches.
+    ${Mininet_write_start_time}=    DateTime.Get Current Date    result_format=timestamp
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count}    ${operation_timeout}
+    ${Mininet_write_end_time}=    DateTime.Get Current Date    result_format=timestamp
+    ${Mininet_write_time}=    DateTime.Subtract Date From Date    ${Mininet_write_end_time}    ${config_datastore_write_start_time}
+    ${Mininet_write_rate}=    BuiltIn.Evaluate    ${flow_count} / ${Mininet_write_time}
+    BuiltIn.Log to console    ${\n}
+    BuiltIn.Log to console    The Mininet_write_time is ${Mininet_write_time}
+    BuiltIn.Log to console    The Mininet_write_rate is ${Mininet_write_rate}
+    BuiltIn.Set Suite Variable    ${Mininet_write_time}
+    BuiltIn.Set Suite Variable    ${Mininet_write_rate}
+
+Verify Flows In Oper DS
+    [Documentation]    Check Flows in Operational Datastore
+    BuiltIn.Wait Until Keyword Succeeds    ${oper_ds_timeout}    2s    ClusterOpenFlow.Check_Flows_Operational_Datastore_On_Member    ${flow_count}    1
+    ${oper_datastore_write_end_time}=    DateTime.Get Current Date    result_format=timestamp
+    ${oper_datastore_write_time}=    DateTime.Subtract Date From Date    ${oper_datastore_write_end_time}    ${config_datastore_write_start_time}
+    ${oper_datastore_write_rate}=    BuiltIn.Evaluate    ${flow_count} / ${oper_datastore_write_time}
+    BuiltIn.Log to console    ${\n}
+    BuiltIn.Log to console    The operational_datastore_write_time is ${oper_datastore_write_time}
+    BuiltIn.Log to console    The operational_datastore_write_rate is ${oper_datastore_write_rate}
+    BuiltIn.Set Suite Variable    ${oper_datastore_write_time}
+    BuiltIn.Set Suite Variable    ${oper_datastore_write_rate}
+
+Stop Mininet And Verify
+    [Documentation]    Stop mininet and exit connection.
+    MininetKeywords.Stop Mininet And Exit    ${mininet_conn_id}
+    BuiltIn.Wait Until Keyword Succeeds    ${mininet_timeout}    2s    ClusterOpenFlow.Verify_Switch_Connections_Running_On_Member    0    1
+
+Delete All Flows
+    [Documentation]    100K Flows deleted and verify.
+    ${config_datastore_delete_start_time}=    DateTime.Get Current Date    result_format=timestamp
+    ClusterManagement.Delete From Member    ${CONFIG_NODES_API}    1
+    ${config_datastore_delete_end_time}=    Get Current Date    result_format=timestamp
+    ${config_datastore_delete_time}=    Subtract Date From Date    ${config_datastore_delete_end_time}    ${config_datastore_delete_start_time}
+    ${config_datastore_delete_rate}=    Evaluate    ${flow_count} / ${config_datastore_delete_time}
+    BuiltIn.Log to console    ${\n}
+    BuiltIn.Log to console    The config_datastore_delete_time is ${config_datastore_delete_time}
+    BuiltIn.Log to console    The config_datastore_delete_rate is ${config_datastore_delete_rate}
+    BuiltIn.Set Suite Variable    ${config_datastore_delete_time}
+    BuiltIn.Set Suite Variable    ${config_datastore_delete_rate}
+
+Log Results And Determine Status
+    [Documentation]    Log results for plotting.
+    OperatingSystem.Append To File    ${rate_results_file}    Config DS,OVS Switch,Operational DS\n
+    OperatingSystem.Append To File    ${rate_results_file}    ${config_datastore_write_rate},${Mininet_write_rate},${oper_datastore_write_rate}\n
+    OperatingSystem.Append To File    ${time_results_file}    Config DS,OVS Switch,Operational DS\n
+    OperatingSystem.Append To File    ${time_results_file}    ${config_datastore_write_time},${Mininet_write_time},${oper_datastore_write_time}\n
diff --git a/csit/suites/openflowplugin/Performance_Restconf/100K_Flows_100DPN_3Node_Cluster_Perf_Test.robot b/csit/suites/openflowplugin/Performance_Restconf/100K_Flows_100DPN_3Node_Cluster_Perf_Test.robot
new file mode 100644 (file)
index 0000000..bc57c67
--- /dev/null
@@ -0,0 +1,119 @@
+*** Settings ***
+Documentation     Test suite for 3Node Cluster - 100K flows and 10 DPNs in Cluster Scale Up scenario
+Suite Setup       ClusterManagement Setup
+Suite Teardown    Delete All Sessions
+Library           DateTime
+Library           OperatingSystem
+Library           ../../../libraries/ScaleClient.py
+Resource          ../../../libraries/MininetKeywords.robot
+Resource          ../../../libraries/ClusterManagement.robot
+Resource          ../../../libraries/ClusterOpenFlow.robot
+Variables         ../../../variables/Variables.py
+
+*** Variables ***
+${operation_timeout}    250s
+${oper_ds_timeout}    400s
+${mininet_timeout}    120s
+${flow_count}     100000
+${switch_count}    100
+${swspread}       linear
+${tabspread}      first
+${fpr}            10
+${nrthreads}      5
+${karaf_log_level}    log:set ERROR
+${rate_results_file}    rate.csv
+${time_results_file}    time.csv
+
+*** Test Cases ***
+Check Shards Status And Initialize Variables
+    [Documentation]    Check Status for all shards in OpenFlow application and set the logs across cluster nodes.
+    ClusterOpenFlow.Check OpenFlow Shards Status
+    Wait Until Keyword Succeeds    3x    3s    ClusterManagement.Run_Karaf_Command_On_List_Or_All    ${karaf_log_level}
+    ${flows}    ${notes}    ScaleClient.Generate New Flow Details    flows=${flow_count}    switches=${switch_count}    swspread=${swspread}    tabspread=${tabspread}
+    Set Suite Variable    ${flows}
+
+Get Inventory Config Shard Follower And Leader
+    [Documentation]    Find a leader and followers in the inventory config shard
+    ${inventory_leader}    ${inventory_followers}    ClusterOpenFlow.Get InventoryConfig Shard Status
+    ${Follower_Node_1}=    Get From List    ${Inventory_Followers}    0
+    ${Follower_Node_2}=    Get From List    ${Inventory_Followers}    1
+    ${Inventory_Leader_List}=    Create List    ${inventory_leader}
+    ${Inventory_Follower_Node2_List}=    Create List    ${ODL_SYSTEM_${Follower_Node_2}_IP}
+    BuiltIn.Log to console    ${\n}
+    BuiltIn.Log to console    The follower Node1 is ${Follower_Node_1}
+    BuiltIn.Log to console    The follower Node2 is ${Follower_Node_2}
+    BuiltIn.Log to console    The leader Node is ${Inventory_Leader}
+    BuiltIn.Set Suite Variable    ${Follower_Node_1}
+    BuiltIn.Set Suite Variable    ${Follower_Node_2}
+    BuiltIn.Set Suite Variable    ${Inventory_Leader}
+    BuiltIn.Set Suite Variable    ${Inventory_Follower_Node2_List}
+
+Start Mininet Connect To Follower Node1
+    [Documentation]    Start mininet with connection to follower node1.
+    ${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
+    BuiltIn.Set Suite Variable    ${mininet_conn_id}
+    BuiltIn.Wait Until Keyword Succeeds    ${mininet_timeout}    2s    ClusterOpenFlow.Verify_Switch_Connections_Running_On_Member    ${switch_count}    ${Inventory_Leader}
+
+Add Bulk Flow via REST From Follower Node2
+    [Documentation]    100K Flows (1K Flows per DPN) in 100 DPN added via Follower Node2 and verify it gets applied in all instances.
+    ${config_datastore_write_start_time}=    DateTime.Get Current Date    result_format=timestamp
+    ScaleClient.Configure Flows Bulk    flow_details=${flows}    controllers=${Inventory_Follower_Node2_List}    nrthreads=${nrthreads}    fpr=${fpr}
+    ${config_datastore_write_end_time}=    DateTime.Get Current Date    result_format=timestamp
+    ${config_datastore_write_time}=    DateTime.Subtract Date From Date    ${config_datastore_write_end_time}    ${config_datastore_write_start_time}
+    ${config_datastore_write_rate}=    BuiltIn.Evaluate    ${flow_count} / ${config_datastore_write_time}
+    BuiltIn.Set Suite Variable    ${config_datastore_write_start_time}
+    BuiltIn.Log to console    ${\n}
+    BuiltIn.Log to console    The config_datastore_write_time is ${config_datastore_write_time}
+    BuiltIn.Log to console    The config_datastore_write_rate is ${config_datastore_write_rate}
+    BuiltIn.Set Suite Variable    ${config_datastore_write_time}
+    BuiltIn.Set Suite Variable    ${config_datastore_write_rate}
+
+Verify Flows In Switch
+    [Documentation]    Verify 100K flows are installed in 10 switches.
+    ${Mininet_write_start_time}=    DateTime.Get Current Date    result_format=timestamp
+    MininetKeywords.Verify Aggregate Flow From Mininet Session    ${mininet_conn_id}    ${flow_count}    ${operation_timeout}
+    ${Mininet_write_end_time}=    DateTime.Get Current Date    result_format=timestamp
+    ${Mininet_write_time}=    DateTime.Subtract Date From Date    ${Mininet_write_end_time}    ${config_datastore_write_start_time}
+    ${Mininet_write_rate}=    BuiltIn.Evaluate    ${flow_count} / ${Mininet_write_time}
+    BuiltIn.Log to console    ${\n}
+    BuiltIn.Log to console    The Mininet_write_time is ${Mininet_write_time}
+    BuiltIn.Log to console    The Mininet_write_rate is ${Mininet_write_rate}
+    BuiltIn.Set Suite Variable    ${Mininet_write_time}
+    BuiltIn.Set Suite Variable    ${Mininet_write_rate}
+
+Verify Flows In Oper DS
+    [Documentation]    Check Flows in Operational Datastore
+    Wait Until Keyword Succeeds    ${oper_ds_timeout}    2s    ClusterOpenFlow.Check_Flows_Operational_Datastore_On_Member    ${flow_count}    ${Inventory_Leader}
+    ${oper_datastore_write_end_time}=    DateTime.Get Current Date    result_format=timestamp
+    ${oper_datastore_write_time}=    DateTime.Subtract Date From Date    ${oper_datastore_write_end_time}    ${config_datastore_write_start_time}
+    ${oper_datastore_write_rate}=    BuiltIn.Evaluate    ${flow_count} / ${oper_datastore_write_time}
+    BuiltIn.Log to console    ${\n}
+    BuiltIn.Log to console    The oper_datastore_write_time is ${oper_datastore_write_time}
+    BuiltIn.Log to console    The oper_datastore_write_rate is ${oper_datastore_write_rate}
+    BuiltIn.Set Suite Variable    ${oper_datastore_write_time}
+    BuiltIn.Set Suite Variable    ${oper_datastore_write_rate}
+
+Stop Mininet Connected To Follower Node1 After Reconcilliation
+    [Documentation]    Stop mininet and exit connection.
+    MininetKeywords.Stop Mininet And Exit    ${mininet_conn_id}
+    BuiltIn.Wait Until Keyword Succeeds    ${mininet_timeout}    2s    ClusterOpenFlow.Verify_Switch_Connections_Running_On_Member    0    ${Inventory_Leader}
+
+Delete All Flows From Follower Node2
+    [Documentation]    100K Flows deleted via Follower Node2 and verify it gets applied in all instances.
+    ${config_datastore_delete_start_time}=    Get Current Date    result_format=timestamp
+    ClusterManagement.Delete From Member    ${CONFIG_NODES_API}    ${Follower_Node_2}
+    ${config_datastore_delete_end_time}=    Get Current Date    result_format=timestamp
+    ${config_datastore_delete_time}=    Subtract Date From Date    ${config_datastore_delete_end_time}    ${config_datastore_delete_start_time}
+    ${config_datastore_delete_rate}=    Evaluate    ${flow_count} / ${config_datastore_delete_time}
+    BuiltIn.Log to console    ${\n}
+    BuiltIn.Log to console    The config_datastore_delete_time is ${config_datastore_delete_time}
+    BuiltIn.Log to console    The config_datastore_delete_rate is ${config_datastore_delete_rate}
+    BuiltIn.Set Suite Variable    ${config_datastore_delete_time}
+    BuiltIn.Set Suite Variable    ${config_datastore_delete_rate}
+
+Log Results And Determine Status
+    [Documentation]    Log results for plotting.
+    OperatingSystem.Append To File    ${rate_results_file}    Config DS,OVS Switch,Operational DS\n
+    OperatingSystem.Append To File    ${rate_results_file}    ${config_datastore_write_rate},${Mininet_write_rate},${oper_datastore_write_rate}\n
+    OperatingSystem.Append To File    ${time_results_file}    Config DS,OVS Switch,Operational DS\n
+    OperatingSystem.Append To File    ${time_results_file}    ${config_datastore_write_time},${Mininet_write_time},${oper_datastore_write_time}\n
diff --git a/csit/testplans/openflowplugin-restconf-clustering-perf-daily.txt b/csit/testplans/openflowplugin-restconf-clustering-perf-daily.txt
new file mode 100644 (file)
index 0000000..a5011d5
--- /dev/null
@@ -0,0 +1,3 @@
+# Place the suites in run order:
+integration/test/csit/suites/openflowplugin/Performance_Restconf/100K_Flows_100DPN_3Node_Cluster_Perf_Test.robot
+integration/test/csit/suites/integration/Create_JVM_Plots.robot
diff --git a/csit/testplans/openflowplugin-restconf-perf-daily.txt b/csit/testplans/openflowplugin-restconf-perf-daily.txt
new file mode 100644 (file)
index 0000000..e29747c
--- /dev/null
@@ -0,0 +1,3 @@
+# Place the suites in run order:
+integration/test/csit/suites/openflowplugin/Performance_Restconf/100K_Flows_100DPN_1Node_Perf_Test.robot
+integration/test/csit/suites/integration/Create_JVM_Plots.robot