New bulkomatic performance test single instance
[integration/test.git] / csit / libraries / ClusterOpenFlow.robot
index f249a5e7ecddb3e90bfc812198e4d59ff39f2360..847149adcef0072b83cf408287812033784c3b51 100644 (file)
@@ -1,6 +1,7 @@
 *** Settings ***
 Documentation     Cluster OpenFlow library. So far this library is only to be used by OpenFlow cluster test as it is very specific for this test.
 Library           RequestsLibrary
+Library           ${CURDIR}/ScaleClient.py
 Resource          ClusterManagement.robot
 Resource          MininetKeywords.robot
 Resource          Utils.robot
@@ -119,3 +120,15 @@ Take OpenFlow Device Link Up and Verify
     Wait Until Keyword Succeeds    5s    1s    ClusterManagement.Check_Item_Occurrence_Member_List_Or_All    uri=${operational_port_1}    dictionary=${dictionary}    member_index_list=${controller_index_list}
     ${dictionary}    Create Dictionary    openflow:1=21    openflow:2=19    openflow:3=19
     Wait Until Keyword Succeeds    5s    1s    ClusterManagement.Check_Item_Occurrence_Member_List_Or_All    uri=${OPERATIONAL_TOPO_API}    dictionary=${dictionary}    member_index_list=${controller_index_list}
+
+Verify_Switch_Connections_Running_On_Member
+    [Arguments]    ${switch_count}    ${member_index}
+    [Documentation]    Check if number of Switch connections on member of given index is equal to ${switch_count}.
+    ${count} =    ScaleClient.Get_Switches_Count    controller=${ODL_SYSTEM_${member_index}_IP}
+    BuiltIn.Should_Be_Equal_As_Numbers    ${switch_count}    ${count}
+
+Check_Flows_Operational_Datastore_On_Member
+    [Arguments]    ${flow_count}    ${member_index}
+    [Documentation]    Check if number of Operational Flows on member of given index is equal to ${flow_count}.
+    ${sw}    ${repf}    ${found_flow}=    ScaleClient.Flow Stats Collected    controller=${ODL_SYSTEM_${member_index}_IP}
+    BuiltIn.Should_Be_Equal_As_Numbers    ${flow_count}    ${found_flow}