*** 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
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}