From 14c1be480643f37f1eeef9d16149b631edd6aa2d Mon Sep 17 00:00:00 2001 From: Sangwook Ha Date: Fri, 9 Sep 2022 19:30:08 -0700 Subject: [PATCH] Update Robot Framework format - step 12 Robotidy has stricter formatting rules for line width, alignment, section ordering & spacing, etc. Update the format of Robot Framework files in the following directory with Robotidy: - csit/suites/openflowplugin JIRA: INTTEST-132 Change-Id: Ia8a0c2dc6a2b51dbeb7b98a11452488f8bd9056c Signed-off-by: Sangwook Ha --- .../openflowplugin/Bug_Validation/2429.robot | 57 ++-- .../openflowplugin/Bug_Validation/6917.robot | 63 ++-- .../openflowplugin/Bug_Validation/7258.robot | 48 ++- .../openflowplugin/Bug_Validation/7335.robot | 56 ++-- .../openflowplugin/Bug_Validation/7349.robot | 61 ++-- .../openflowplugin/Bug_Validation/8723.robot | 55 ++-- .../openflowplugin/Bug_Validation/9145.robot | 28 +- .../010_bundle_resync.robot | 95 ++++-- .../010_Group_Flows.robot | 301 +++++++++++++----- .../010__Cluster_HA_Owner_Failover.robot | 45 ++- ..._Cluster_HA_Leader_Follower_Failover.robot | 43 ++- .../020__Cluster_HA_Owner_Restart.robot | 46 ++- ...ta_Recovery_Leader_Follower_Failover.robot | 56 ++-- ...0__Cluster_Reconcilliation_Multi_DPN.robot | 114 +++++-- ...Data_Recovery_BulkFlow_2Node_Cluster.robot | 158 ++++++--- ...Data_Recovery_BulkFlow_Single_Switch.robot | 190 ++++++++--- ...rent_Term_Verification_3Node_Cluster.robot | 173 +++++++--- .../010_Switch_Disconnect.robot | 102 ++++-- .../020_Cluster_Node_Failure.robot | 106 +++--- .../030_Cluster_Sync_Problems.robot | 120 ++++--- .../010_Lithium_Rps_Calls_Ovs.robot | 39 ++- .../020_Lithium_Rps_Calls_Cpqd.robot | 31 +- .../030_Flow_Update_Test.robot | 46 +-- .../010_SM_add_upd_del_flows.robot | 239 +++----------- .../020_SM_sal_add_upd_del_flows.robot | 208 ++---------- .../Stat_Manager_extended/__init__.robot | 15 +- .../010__SM_add_upd_del_flows.robot | 86 +++-- .../Flows_Stats_OF13/__init__.robot | 12 +- .../005__openflow_group.robot | 103 ++++-- .../010__openflow_meter.robot | 95 ++++-- .../Groups_Meters_OF13/__init__.robot | 19 +- .../010__restconf_inventory.robot | 32 +- .../020__restconf_topology.robot | 40 ++- .../Inventory_Scalability_OF10/__init__.robot | 18 +- .../010__restconf_inventory.robot | 32 +- .../020__restconf_topology.robot | 40 ++- .../Inventory_Scalability_OF13/__init__.robot | 19 +- .../Longevity/010__longevity_test.robot | 42 +-- .../010_restconf_inventory.robot | 118 +++++-- .../020_restconf_topology.robot | 43 ++- .../030_restconf_statistics.robot | 31 +- .../MD_SAL_NSF_OF10/040_restconf_frm.robot | 61 ++-- .../MD_SAL_NSF_OF10/__init__.robot | 15 +- .../010_restconf_inventory.robot | 118 +++++-- .../020_restconf_topology.robot | 43 ++- .../030_restconf_statistics.robot | 31 +- .../MD_SAL_NSF_OF13/040_restconf_frm.robot | 83 +++-- .../MD_SAL_NSF_OF13/__init__.robot | 17 +- .../010__finding_max_links.robot | 27 +- .../010__finding_max_switches.robot | 33 +- .../020__find_max_switches.robot | 43 +-- .../Performance/010_Cbench.robot | 110 ++++--- .../100K_Flows_100DPN_1Node_Perf_Test.robot | 120 ++++--- ...Flows_100DPN_3Node_Cluster_Perf_Test.robot | 121 ++++--- .../010_Rest_Config_Flows.robot | 53 +-- .../020_Stats_Collection_Gauss.robot | 45 +-- .../030_Stats_Collection_Linear.robot | 45 +-- .../040_Stats_Collection_One.robot | 45 +-- .../050_Stats_Collection_FirstTable.robot | 45 +-- ...60_Stats_Collection_Basic16kScenario.robot | 48 +-- ...s_Collection_100k_WithMininetRestart.robot | 100 +++--- ...00k_Flows_Configuration_Time_Measure.robot | 80 +++-- .../090_BulkMaticConfigDsSetup_100k.robot | 78 +++-- .../100K_Flows_100DPN_1Node_Perf_Test.robot | 111 +++++-- ...Flows_100DPN_3Node_Cluster_Perf_Test.robot | 111 +++++-- .../Reconciliation/010_Group_Flows.robot | 92 ++++-- .../010_OpenFlow_Connection.robot | 40 ++- .../020_OpenFlow_Actions.robot | 169 +++++----- 68 files changed, 3180 insertions(+), 1929 deletions(-) diff --git a/csit/suites/openflowplugin/Bug_Validation/2429.robot b/csit/suites/openflowplugin/Bug_Validation/2429.robot index 7720666932..035a36e254 100644 --- a/csit/suites/openflowplugin/Bug_Validation/2429.robot +++ b/csit/suites/openflowplugin/Bug_Validation/2429.robot @@ -1,19 +1,22 @@ *** Settings *** -Documentation OF Handshake threads should be closed if the connection has a -... failure. This bug was fixed in the Helium SR3 release but -... persisted in to the Lithium release. Once fixed, this will -... catch any future regressions -Metadata https://bugs.opendaylight.org/show_bug.cgi?id=2429 ${EMPTY} -Library OperatingSystem -Library SSHLibrary -Library Process -Resource ../../../libraries/Utils.robot -Resource ../../../variables/Variables.robot +Documentation OF Handshake threads should be closed if the connection has a +... failure. This bug was fixed in the Helium SR3 release but +... persisted in to the Lithium release. Once fixed, this will +... catch any future regressions +Metadata https://bugs.opendaylight.org/show_bug.cgi?id=2429 ${EMPTY} + +Library OperatingSystem +Library SSHLibrary +Library Process +Resource ../../../libraries/Utils.robot +Resource ../../../variables/Variables.robot + *** Variables *** -${openflow_port} 6633 -${number_ofconnections_to_fail} 600 -${margin_of_error} 0.05 # percentage +${openflow_port} 6633 +${number_ofconnections_to_fail} 600 +${margin_of_error} 0.05 # percentage + *** Test Cases *** Bug_2429 @@ -24,25 +27,41 @@ Bug_2429 ... a larger number of failed connections will be used and a small margin of error will ... determine if the test is a PASS or FAIL Log Environment Details - ${controller_pid}= Get Process ID Based On Regex On Remote System ${ODL_SYSTEM_IP} java.*karaf ${ODL_SYSTEM_USER} + ${controller_pid}= Get Process ID Based On Regex On Remote System + ... ${ODL_SYSTEM_IP} + ... java.*karaf + ... ${ODL_SYSTEM_USER} Should Match Regexp ${controller_pid} [0-9]+ PID was not discovered - ${starting_thread_count}= Get Process Thread Count On Remote System ${ODL_SYSTEM_IP} ${controller_pid} ${ODL_SYSTEM_USER} + ${starting_thread_count}= Get Process Thread Count On Remote System + ... ${ODL_SYSTEM_IP} + ... ${controller_pid} + ... ${ODL_SYSTEM_USER} Repeat Keyword ${number_ofconnections_to_fail} Start Process nc -w 1 ${ODL_SYSTEM_IP} ... ${openflow_port} Run pkill -f 'nc -w' Log Environment Details - ${ending_thread_count}= Get Process Thread Count On Remote System ${ODL_SYSTEM_IP} ${controller_pid} ${ODL_SYSTEM_USER} + ${ending_thread_count}= Get Process Thread Count On Remote System + ... ${ODL_SYSTEM_IP} + ... ${controller_pid} + ... ${ODL_SYSTEM_USER} Log Environment Details Log starting count: ${starting_thread_count}\nending count: ${ending_thread_count} - ${acceptable_thread_count}= Evaluate ${starting_thread_count} + (${number_of_connections_to_fail} * ${margin_of_error}) - Should Be True ${ending_thread_count} <= ${acceptable_thread_count} Final thread count of ${ending_thread_count} exceeds acceptable count: ${acceptable_thread_count} + ${acceptable_thread_count}= Evaluate + ... ${starting_thread_count} + (${number_of_connections_to_fail} * ${margin_of_error}) + Should Be True + ... ${ending_thread_count} <= ${acceptable_thread_count} + ... Final thread count of ${ending_thread_count} exceeds acceptable count: ${acceptable_thread_count} [Teardown] Report_Failure_Due_To_Bug 2429 + *** Keywords *** Log Environment Details [Documentation] Will display relevant details of the test environement to help aid debugging efforts if ... needed in the future. - ${output}= Get Process ID Based On Regex On Remote System ${ODL_SYSTEM_IP} java.*karaf ${ODL_SYSTEM_USER} + ${output}= Get Process ID Based On Regex On Remote System + ... ${ODL_SYSTEM_IP} + ... java.*karaf + ... ${ODL_SYSTEM_USER} Log ${output} ${output}= Run Command On Remote System ${ODL_SYSTEM_IP} netstat -na | grep 6633 ${ODL_SYSTEM_USER} Log ${output} diff --git a/csit/suites/openflowplugin/Bug_Validation/6917.robot b/csit/suites/openflowplugin/Bug_Validation/6917.robot index 4c3ac1c73a..1b6808b391 100644 --- a/csit/suites/openflowplugin/Bug_Validation/6917.robot +++ b/csit/suites/openflowplugin/Bug_Validation/6917.robot @@ -1,19 +1,23 @@ *** Settings *** -Documentation Test suite for bug 6917 validation. -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library XML -Library RequestsLibrary -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/FlowLib.robot -Resource ../../../variables/Variables.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for bug 6917 validation. + +Library XML +Library RequestsLibrary +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/FlowLib.robot +Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Variables *** -${XmlsDir} ${CURDIR}/../../../variables/xmls -${switch_idx} 1 -${switch_name} s${switch_idx} -${iteration} 4 +${XmlsDir} ${CURDIR}/../../../variables/xmls +${switch_idx} 1 +${switch_name} s${switch_idx} +${iteration} 4 + *** Test Cases *** Add Delete Same Flow @@ -31,12 +35,17 @@ Add Multiple Flows Run Keyword And Continue On Failure Add Flow f23.xml [Teardown] Report_Failure_Due_To_Bug 6917 + *** Keywords *** Initialization Phase [Documentation] Starts mininet and verify if topology is in operational datastore. ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller BuiltIn.Set Suite Variable ${mininet_conn_id} - RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} + RequestsLibrary.Create Session + ... session + ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT} + ... auth=${AUTH} + ... headers=${HEADERS_XML} BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1 Final Phase @@ -45,13 +54,20 @@ Final Phase RequestsLibrary.Delete All Sessions Add And Delete Flow - [Arguments] ${flowfile} [Documentation] Add a Delete a Flow and verify presence in Datastore. The 5 sec sleep is required to reproduce the bug. + [Arguments] ${flowfile} FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile} FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data} BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${True} ${data} - BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile} ${True} ${True} - ... ${False} ${True} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... FlowLib.Check Datastore Presence + ... ${flowfile} + ... ${True} + ... ${True} + ... ${False} + ... ${True} FlowLib.Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${False} ${data} FlowLib.Check Datastore Presence ${flowfile} ${False} ${False} ${True} @@ -59,12 +75,19 @@ Add And Delete Flow [Teardown] BuiltIn.Run Keyword And Ignore Error FlowLib.Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} Add Flow - [Arguments] ${flowfile} [Documentation] Add a Delete a Flow and verify presence in Datastore. The 5 sec sleep is required to reproduce the bug. + [Arguments] ${flowfile} FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile} FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data} BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Operational Flow ${True} ${data} - BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile} ${True} ${True} - ... ${False} ${True} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... FlowLib.Check Datastore Presence + ... ${flowfile} + ... ${True} + ... ${True} + ... ${False} + ... ${True} Sleep 8 [Teardown] BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${RFC8040_NODES_API} diff --git a/csit/suites/openflowplugin/Bug_Validation/7258.robot b/csit/suites/openflowplugin/Bug_Validation/7258.robot index a43a2b1ed2..7f7d99c8ef 100644 --- a/csit/suites/openflowplugin/Bug_Validation/7258.robot +++ b/csit/suites/openflowplugin/Bug_Validation/7258.robot @@ -1,35 +1,51 @@ *** Settings *** -Documentation Test suite for bug 6917 validation. -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library XML -Library RequestsLibrary -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/FlowLib.robot -Resource ../../../variables/Variables.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for bug 6917 validation. + +Library XML +Library RequestsLibrary +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/FlowLib.robot +Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Variables *** -${XmlsDir} ${CURDIR}/../../../variables/xmls -${flowfile} f161.xml -${switch_idx} 1 -${switch_name} s${switch_idx} +${XmlsDir} ${CURDIR}/../../../variables/xmls +${flowfile} f161.xml +${switch_idx} 1 +${switch_name} s${switch_idx} + *** Test Cases *** Add Alien Flow And Verify It Is In Operational DS [Documentation] Add flow with incorrect in-port format to generate alien ID FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile} FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data} - BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile} ${True} ${True} - ... ${False} ${False} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... FlowLib.Check Datastore Presence + ... ${flowfile} + ... ${True} + ... ${True} + ... ${False} + ... ${False} [Teardown] Report_Failure_Due_To_Bug 7258 + *** Keywords *** Initialization Phase [Documentation] Starts mininet and verify if topology is in operational datastore. ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller BuiltIn.Set Suite Variable ${mininet_conn_id} - RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} + RequestsLibrary.Create Session + ... session + ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT} + ... auth=${AUTH} + ... headers=${HEADERS_XML} BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1 Final Phase diff --git a/csit/suites/openflowplugin/Bug_Validation/7335.robot b/csit/suites/openflowplugin/Bug_Validation/7335.robot index 6098363c5d..caa34b2842 100644 --- a/csit/suites/openflowplugin/Bug_Validation/7335.robot +++ b/csit/suites/openflowplugin/Bug_Validation/7335.robot @@ -1,44 +1,64 @@ *** Settings *** -Documentation Test suite for bug 6917 validation. -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library XML -Library RequestsLibrary -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/FlowLib.robot -Resource ../../../variables/Variables.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for bug 6917 validation. + +Library XML +Library RequestsLibrary +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/FlowLib.robot +Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Variables *** -${XmlsDir} ${CURDIR}/../../../variables/xmls -${flowfile1} f162.xml -${flowfile2} f163.xml -${switch_idx} 1 -${switch_name} s${switch_idx} +${XmlsDir} ${CURDIR}/../../../variables/xmls +${flowfile1} f162.xml +${flowfile2} f163.xml +${switch_idx} 1 +${switch_name} s${switch_idx} + *** Test Cases *** Add Flow And Check It Is In Operational DS [Documentation] Add flow match IP and Ethertype IP FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile1} FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data} - BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile1} ${True} ${True} - ... ${False} ${True} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... FlowLib.Check Datastore Presence + ... ${flowfile1} + ... ${True} + ... ${True} + ... ${False} + ... ${True} Update Flow With Invalid Match And Check It Is Not In Operational DS [Documentation] Update flow removing Ethertype, this should remove flow from switch and operational DS FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile2} FlowLib.Update Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} ${data} FlowLib.Check Config Flow ${True} ${data} - BuiltIn.Wait Until Keyword Succeeds 10s 1s Utils.No Content From URI session + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... Utils.No Content From URI + ... session ... ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id}?content=nonconfig [Teardown] Report_Failure_Due_To_Bug 7335 + *** Keywords *** Initialization Phase [Documentation] Starts mininet and verify if topology is in operational datastore. ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller BuiltIn.Set Suite Variable ${mininet_conn_id} - RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} + RequestsLibrary.Create Session + ... session + ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT} + ... auth=${AUTH} + ... headers=${HEADERS_XML} BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1 Final Phase diff --git a/csit/suites/openflowplugin/Bug_Validation/7349.robot b/csit/suites/openflowplugin/Bug_Validation/7349.robot index 8a9d6dd102..03507c9376 100644 --- a/csit/suites/openflowplugin/Bug_Validation/7349.robot +++ b/csit/suites/openflowplugin/Bug_Validation/7349.robot @@ -1,44 +1,67 @@ *** Settings *** -Documentation Test suite for bug 6917 validation. -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library XML -Library RequestsLibrary -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/FlowLib.robot -Resource ../../../variables/Variables.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for bug 6917 validation. + +Library XML +Library RequestsLibrary +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/FlowLib.robot +Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Variables *** -${XmlsDir} ${CURDIR}/../../../variables/xmls -${flowfile1} f162.xml -${flowfile2} f164.xml -${switch_idx} 1 -${switch_name} s${switch_idx} +${XmlsDir} ${CURDIR}/../../../variables/xmls +${flowfile1} f162.xml +${flowfile2} f164.xml +${switch_idx} 1 +${switch_name} s${switch_idx} + *** Test Cases *** Add Flow And Check It Is In Operational DS [Documentation] Add flow match IP and Ethertype IP FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile1} FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data} - BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile1} ${True} ${True} - ... ${False} ${True} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... FlowLib.Check Datastore Presence + ... ${flowfile1} + ... ${True} + ... ${True} + ... ${False} + ... ${True} Delete and Add Flow Same Match With Different ID [Documentation] Delete flow and add flow with same body and different ID. New ID should be shown in operational. FlowLib.Delete Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} FlowLib.Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile2} FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data} - BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Datastore Presence ${flowfile2} ${True} ${True} - ... ${False} ${True} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... FlowLib.Check Datastore Presence + ... ${flowfile2} + ... ${True} + ... ${True} + ... ${False} + ... ${True} [Teardown] Report_Failure_Due_To_Bug 7349 + *** Keywords *** Initialization Phase [Documentation] Starts mininet and verify if topology is in operational datastore. ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller BuiltIn.Set Suite Variable ${mininet_conn_id} - RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} + RequestsLibrary.Create Session + ... session + ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT} + ... auth=${AUTH} + ... headers=${HEADERS_XML} BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1 Final Phase diff --git a/csit/suites/openflowplugin/Bug_Validation/8723.robot b/csit/suites/openflowplugin/Bug_Validation/8723.robot index 8dd96ef2f8..31d2a6b0bc 100644 --- a/csit/suites/openflowplugin/Bug_Validation/8723.robot +++ b/csit/suites/openflowplugin/Bug_Validation/8723.robot @@ -1,27 +1,33 @@ *** Settings *** -Documentation Test suite for Split connection bug. -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library XML -Library SSHLibrary -Library RequestsLibrary -Library Collections -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/FlowLib.robot -Resource ../../../libraries/OVSDB.robot -Resource ../../../variables/Variables.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for Split connection bug. + +Library XML +Library SSHLibrary +Library RequestsLibrary +Library Collections +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/FlowLib.robot +Resource ../../../libraries/OVSDB.robot +Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Variables *** -${ODL_OF_PORT1} 6653 -${SH_CNTL_CMD} ovs-vsctl list Controller -${lprompt} mininet> +${ODL_OF_PORT1} 6653 +${SH_CNTL_CMD} ovs-vsctl list Controller +${lprompt} mininet> + *** Test Cases *** Create Two Active Switch Connections To Controller And Check OVS Connections [Documentation] Make a second connection from switch s1 to a controller ${controller_opt} = BuiltIn.Set Variable - ${controller_opt} = BuiltIn.Catenate ${controller_opt} ${SPACE}tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}${SPACE}tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT1} + ${controller_opt} = BuiltIn.Catenate + ... ${controller_opt} + ... ${SPACE}tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT}${SPACE}tcp:${ODL_SYSTEM_IP}:${ODL_OF_PORT1} OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s1 ${controller_opt} BuiltIn.Wait Until Keyword Succeeds 20s 1s OVSDB.Check OVS OpenFlow Connections ${TOOLS_SYSTEM_IP} 1 Check Master Connection 30 @@ -37,12 +43,17 @@ Restore original Connection To Controller And Check OVS Connection FlowLib.Check Number Of Flows 1 [Teardown] Report_Failure_Due_To_Bug 8723 + *** Keywords *** Initialization Phase [Documentation] Starts mininet and verify if topology is in operational datastore. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ${mininet_conn_id} = MininetKeywords.Start Mininet Single Controller BuiltIn.Set Suite Variable ${mininet_conn_id} - RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} + RequestsLibrary.Create Session + ... session + ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT} + ... auth=${AUTH} + ... headers=${HEADERS_XML} BuiltIn.Wait Until Keyword Succeeds 10s 1s FlowLib.Check Switches In Topology 1 Final Phase @@ -52,10 +63,12 @@ Final Phase RequestsLibrary.Delete All Sessions Check Master Connection - [Arguments] ${timeout}=20 [Documentation] Execute OvsVsctl List Controllers Command and check for master connection. - ${output} = Utils.Run Command On Mininet ${TOOLS_SYSTEM_IP} sudo timeout --signal=KILL ${timeout} ovsdb-client monitor Controller target,role + [Arguments] ${timeout}=20 + ${output} = Utils.Run Command On Mininet + ... ${TOOLS_SYSTEM_IP} + ... sudo timeout --signal=KILL ${timeout} ovsdb-client monitor Controller target,role BuiltIn.Set Suite Variable ${output} Should Contain ${output} master Log ${output} - BuiltIn.Return From Keyword ${output} + RETURN ${output} diff --git a/csit/suites/openflowplugin/Bug_Validation/9145.robot b/csit/suites/openflowplugin/Bug_Validation/9145.robot index f8a0d243eb..b474bf1cf2 100644 --- a/csit/suites/openflowplugin/Bug_Validation/9145.robot +++ b/csit/suites/openflowplugin/Bug_Validation/9145.robot @@ -1,25 +1,32 @@ *** Settings *** -Documentation Switch connections and cluster are restarted. -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library RequestsLibrary -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../variables/Variables.robot +Documentation Switch connections and cluster are restarted. + +Library RequestsLibrary +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../variables/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Test Cases *** Start Mininet Multiple Connections [Documentation] Start mininet linear with connection to all cluster instances. ${cluster_index_list}= ClusterManagement.List All Indices - ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers ${TOOLS_SYSTEM_IP} ${cluster_index_list} + ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers + ... ${TOOLS_SYSTEM_IP} + ... ${cluster_index_list} BuiltIn.Set Suite Variable ${cluster_index_list} BuiltIn.Set Suite Variable ${mininet_conn_id} BuiltIn.Wait Until Keyword Succeeds 10s 1s OVSDB.Check OVS OpenFlow Connections ${TOOLS_SYSTEM_IP} 3 Check Entity Owner Status And Find Owner and Successor [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1. - ${original_owner} ${original_successor_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 1 + ${original_owner} ${original_successor_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 BuiltIn.Set Suite Variable ${original_owner} BuiltIn.Set Suite Variable ${new_cluster_list} ${original_successor_list} [Teardown] Report_Failure_Due_To_Bug 9145 @@ -28,6 +35,7 @@ Stop Mininet [Documentation] Stop Mininet. MininetKeywords.Stop Mininet And Exit ${mininet_conn_id} + *** Keywords *** Initialization Phase [Documentation] Create controller session and set variables. diff --git a/csit/suites/openflowplugin/Bundlebased_Reconciliation/010_bundle_resync.robot b/csit/suites/openflowplugin/Bundlebased_Reconciliation/010_bundle_resync.robot index 1f1a170512..932c3511e5 100644 --- a/csit/suites/openflowplugin/Bundlebased_Reconciliation/010_bundle_resync.robot +++ b/csit/suites/openflowplugin/Bundlebased_Reconciliation/010_bundle_resync.robot @@ -1,26 +1,32 @@ *** Settings *** -Documentation Test suite for verifying Bundle based reconciliation with switch(OVS) -Suite Setup Start Suite -Suite Teardown End Suite -Library XML -Library ${CURDIR}/../../../../csit/libraries/XmlComparator.py -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/OVSDB.robot -Resource ../../../libraries/KarafKeywords.robot -Resource ../../../libraries/FlowLib.robot -Resource ../../../variables/Variables.robot -Resource ../../../variables/netvirt/Variables.robot -Resource ../../../libraries/DataModels.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for verifying Bundle based reconciliation with switch(OVS) + +Library XML +Library ${CURDIR}/../../../../csit/libraries/XmlComparator.py +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/OVSDB.robot +Resource ../../../libraries/KarafKeywords.robot +Resource ../../../libraries/FlowLib.robot +Resource ../../../variables/Variables.robot +Resource ../../../variables/netvirt/Variables.robot +Resource ../../../libraries/DataModels.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Start Suite +Suite Teardown End Suite + *** Variables *** -${XMLSDIR} ${CURDIR}/../../../../csit/variables/openflowplugin -@{FLOWFILE} f279.xml f280.xml f281.xml f282.xml f283.xml f284.xml f278.xml -@{GROUPFILE} g279.xml g280.xml g281.xml -@{GROUP_ID} 1 2 3 -${FLAG_MSG} "bundle-based-reconciliation-enabled configuration property was changed to 'true'" -${STATIC_FLOW} table=91 -@{DATA_MODELS} data/opendaylight-inventory:nodes?${RFC8040_CONFIG_CONTENT} data/opendaylight-inventory:nodes?${RFC8040_OPERATIONAL_CONTENT} +${XMLSDIR} ${CURDIR}/../../../../csit/variables/openflowplugin +@{FLOWFILE} f279.xml f280.xml f281.xml f282.xml f283.xml f284.xml f278.xml +@{GROUPFILE} g279.xml g280.xml g281.xml +@{GROUP_ID} 1 2 3 +${FLAG_MSG} "bundle-based-reconciliation-enabled configuration property was changed to 'true'" +${STATIC_FLOW} table=91 +@{DATA_MODELS} +... data/opendaylight-inventory:nodes?${RFC8040_CONFIG_CONTENT} +... data/opendaylight-inventory:nodes?${RFC8040_OPERATIONAL_CONTENT} + *** Test Cases *** TC01_Reconciliation check after switch restart @@ -31,10 +37,12 @@ TC01_Reconciliation check after switch restart Utils.Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo service openvswitch-switch restart Wait Until Keyword Succeeds 5s 1s FlowLib.Check Operational Flow ${True} ${data} Log Check if static flow is removed in the switch - ${Ovs1Flow} Utils.Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-ofctl dump-flows ${INTEGRATION_BRIDGE} -OOpenflow13 + ${Ovs1Flow} Utils.Run Command On Remote System + ... ${TOOLS_SYSTEM_IP} + ... sudo ovs-ofctl dump-flows ${INTEGRATION_BRIDGE} -OOpenflow13 Should Not Contain ${Ovs1Flow} ${STATIC_FLOW} Log Check if flows are pushed as bundle messages - ${Resyncdone_msg}= BuiltIn.Set Variable "Completing bundle based reconciliation for device ID:${switch_idx}" + ${Resyncdone_msg} BuiltIn.Set Variable "Completing bundle based reconciliation for device ID:${switch_idx}" Check_Karaf_Log_Message_Count ${Resyncdone_msg} 1 TC02_Reconcilation check with new switch added @@ -46,10 +54,12 @@ TC02_Reconcilation check with new switch added Utils.Run Command On Remote System ${TOOLS_SYSTEM_2_IP} sudo service openvswitch-switch restart Wait Until Keyword Succeeds 5s 1s FlowLib.Check Operational Flow ${True} ${data} Log Check if static flow is removed in the switch - ${Ovs1Flow} Utils.Run Command On Remote System ${TOOLS_SYSTEM_2_IP} sudo ovs-ofctl dump-flows ${INTEGRATION_BRIDGE} -OOpenflow13 + ${Ovs1Flow} Utils.Run Command On Remote System + ... ${TOOLS_SYSTEM_2_IP} + ... sudo ovs-ofctl dump-flows ${INTEGRATION_BRIDGE} -OOpenflow13 Should Not Contain ${Ovs1Flow} ${STATIC_FLOW} Log Check if flows are pushed as bundle messages - ${Resyncdone_msg}= BuiltIn.Set Variable "Completing bundle based reconciliation for device ID:${switch_idx}" + ${Resyncdone_msg} BuiltIn.Set Variable "Completing bundle based reconciliation for device ID:${switch_idx}" Check_Karaf_Log_Message_Count ${Resyncdone_msg} 1 TC03_Reconciliation check by pushing group dependent flows @@ -67,14 +77,16 @@ TC03_Reconciliation check by pushing group dependent flows Wait Until Keyword Succeeds 5s 1s FlowLib.Check Operational Flow ${True} ${flowbody[${index}]} END Log Check if flows are pushed as bundle messages - ${Resyncdone_msg}= BuiltIn.Set Variable "Completing bundle based reconciliation for device ID:${switch_idx}" + ${Resyncdone_msg} BuiltIn.Set Variable "Completing bundle based reconciliation for device ID:${switch_idx}" Check_Karaf_Log_Message_Count ${Resyncdone_msg} 2 + *** Keywords *** Start Suite [Documentation] Run at start of the suite Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} - KarafKeywords.Issue_Command_On_Karaf_Console log:set DEBUG org.opendaylight.openflowplugin.applications.frm.impl.FlowNodeReconciliationImpl + KarafKeywords.Issue_Command_On_Karaf_Console + ... log:set DEBUG org.opendaylight.openflowplugin.applications.frm.impl.FlowNodeReconciliationImpl Check_Karaf_Log_Message_Count ${FLAG_MSG} 1 Configure DPN ${TOOLS_SYSTEM_IP} Configure DPN ${TOOLS_SYSTEM_2_IP} @@ -82,27 +94,38 @@ Start Suite End Suite [Documentation] Run at end of the suite RequestsLibrary.Delete Request session ${RFC8040_NODES_API} - KarafKeywords.Issue_Command_On_Karaf_Console log:set INFO org.opendaylight.openflowplugin.applications.frm.impl.FlowNodeReconciliationImpl + KarafKeywords.Issue_Command_On_Karaf_Console + ... log:set INFO org.opendaylight.openflowplugin.applications.frm.impl.FlowNodeReconciliationImpl SSHLibrary.Close All Connections Configure DPN - [Arguments] ${ip} [Documentation] Add the bridge in the DPN specified and set manager,controller for the bridge + [Arguments] ${ip} Utils.Run Command On Remote System ${ip} sudo ovs-vsctl add-br ${INTEGRATION_BRIDGE} Utils.Run Command On Remote System ${ip} sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640 - Utils.Run Command On Remote System ${ip} sudo ovs-vsctl set-controller ${INTEGRATION_BRIDGE} tcp:${ODL_SYSTEM_IP}:6653 + Utils.Run Command On Remote System + ... ${ip} + ... sudo ovs-vsctl set-controller ${INTEGRATION_BRIDGE} tcp:${ODL_SYSTEM_IP}:6653 Utils.Run Command On Remote System ${ip} sudo ovs-vsctl set bridge ${INTEGRATION_BRIDGE} protocols=OpenFlow13 - Wait Until Keyword Succeeds 20s 2s DataModels.Get Model Dump ${ODL_SYSTEM_IP} ${DATA_MODELS} ${RFC8040_RESTCONF_ROOT} + Wait Until Keyword Succeeds + ... 20s + ... 2s + ... DataModels.Get Model Dump + ... ${ODL_SYSTEM_IP} + ... ${DATA_MODELS} + ... ${RFC8040_RESTCONF_ROOT} Push Static Flow - [Arguments] ${ip} [Documentation] Add Static Flow in the DPN specified + [Arguments] ${ip} Utils.Run Command On Remote System ${ip} sudo ovs-ofctl dump-flows ${INTEGRATION_BRIDGE} -OOpenflow13 - Utils.Run Command On Remote System ${ip} sudo ovs-ofctl add-flow ${INTEGRATION_BRIDGE} table=91,ipv6,actions=dec_ttl -OOpenflow13 + Utils.Run Command On Remote System + ... ${ip} + ... sudo ovs-ofctl add-flow ${INTEGRATION_BRIDGE} table=91,ipv6,actions=dec_ttl -OOpenflow13 Push Flow Via Restcall - [Arguments] ${switch_idx} ${flowfile} [Documentation] Adds Flow to the specified DPN via Restcall + [Arguments] ${switch_idx} ${flowfile} FlowLib.Create Flow Variables For Suite From XML File ${XMLSDIR}/${flowfile} FlowLib.Add Flow Via Restconf ${switch_idx} ${table_id} ${data} BuiltIn.Set Test Variable ${switch_idx} @@ -115,4 +138,8 @@ Push Groups Via Restcall ${node_id} BuiltIn.Set Variable openflow%3A${switch_idx} ${group_id} BuiltIn.Set Variable ${GROUP_ID[${index}]} FlowLib.Add Group To Controller And Verify ${GROUP_BODY} ${node_id} ${group_id} - Wait Until Keyword Succeeds 5s 1s Utils.Get URI And Verify ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:group=${group_id}?content=nonconfig + Wait Until Keyword Succeeds + ... 5s + ... 1s + ... Utils.Get URI And Verify + ... ${RFC8040_NODES_API}/node=${node_id}/flow-node-inventory:group=${group_id}?content=nonconfig diff --git a/csit/suites/openflowplugin/Clustered_Reconciliation/010_Group_Flows.robot b/csit/suites/openflowplugin/Clustered_Reconciliation/010_Group_Flows.robot index 9458cd99bf..3e6fc6b6c3 100644 --- a/csit/suites/openflowplugin/Clustered_Reconciliation/010_Group_Flows.robot +++ b/csit/suites/openflowplugin/Clustered_Reconciliation/010_Group_Flows.robot @@ -1,24 +1,28 @@ *** Settings *** -Documentation Switch connections and cluster are restarted. -Suite Setup Initialization Phase -Suite Teardown Final Phase -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Library RequestsLibrary -Library Collections -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Resource ../../../libraries/TemplatedRequests.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/OvsManager.robot -Resource ../../../variables/Variables.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Switch connections and cluster are restarted. + +Library RequestsLibrary +Library Collections +Resource ../../../libraries/SetupUtils.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../libraries/TemplatedRequests.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/OvsManager.robot +Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Final Phase +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + *** Variables *** -${SWITCHES} 3 -${ITER} 100 -${VAR_DIR} ${CURDIR}/../../../variables/openflowplugin +${SWITCHES} 3 +${ITER} 100 +${VAR_DIR} ${CURDIR}/../../../variables/openflowplugin + *** Test Cases *** Add Groups And Flows @@ -28,10 +32,18 @@ Add Groups And Flows Start Mininet Multiple Connections [Documentation] Start mininet linear with connection to all cluster instances. ${cluster_index_list}= ClusterManagement.List All Indices - ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers ${TOOLS_SYSTEM_IP} ${cluster_index_list} --topo linear,${SWITCHES} + ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers + ... ${TOOLS_SYSTEM_IP} + ... ${cluster_index_list} + ... --topo linear,${SWITCHES} BuiltIn.Set Suite Variable ${cluster_index_list} BuiltIn.Set Suite Variable ${mininet_conn_id} - BuiltIn.Wait Until Keyword Succeeds 10s 1s OVSDB.Check OVS OpenFlow Connections ${TOOLS_SYSTEM_IP} ${SWITCHES*3} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... OVSDB.Check OVS OpenFlow Connections + ... ${TOOLS_SYSTEM_IP} + ... ${SWITCHES*3} Check Linear Topology [Documentation] Check Linear Topology. @@ -47,7 +59,11 @@ Check Flows In Operational DS Check Groups In Operational DS [Documentation] Check Groups in operational DS. - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Check Number Of Groups On Member ${all_groups} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Check Number Of Groups On Member + ... ${all_groups} Check Flows In Switch [Documentation] Check Flows in switch. @@ -55,20 +71,28 @@ Check Flows In Switch Check Entity Owner Status And Find Owner and Successor Before Fail [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1. - ${original_owner} ${original_successor_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 1 + ${original_owner} ${original_successor_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 BuiltIn.Set Suite Variable ${original_owner} BuiltIn.Set Suite Variable ${new_cluster_list} ${original_successor_list} Disconnect Mininet From Owner [Documentation] Disconnect mininet from the owner - ${original_owner_list} BuiltIn.Create List ${original_owner} + ${original_owner_list}= BuiltIn.Create List ${original_owner} MininetKeywords.Disconnect Cluster Mininet break ${original_owner_list} BuiltIn.Set Suite Variable ${original_owner_list} Check Entity Owner Status And Find Owner and Successor After Fail [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1. - ${new_owner} ${new_successor_list} BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 - ... 1 ${new_cluster_list} after_stop=True + ${new_owner} ${new_successor_list}= BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 + ... ${new_cluster_list} + ... after_stop=True ${owner_list}= BuiltIn.Create List ${original_owner} ${new_owner} BuiltIn.Set Suite Variable ${owner_list} BuiltIn.Set Suite Variable ${new_owner} @@ -77,7 +101,13 @@ Check Entity Owner Status And Find Owner and Successor After Fail Check Switch Moves To New Master [Documentation] Check switch s1 is connected to new Master. ${new_master}= BuiltIn.Set Variable ${ODL_SYSTEM_${new_owner}_IP} - BuiltIn.Wait Until Keyword Succeeds 10s 1s OvsManager.Should Be Master s1 ${new_master} update_data=${True} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... OvsManager.Should Be Master + ... s1 + ... ${new_master} + ... update_data=${True} Check Linear Topology After Disconnect [Documentation] Check Linear Topology. @@ -93,11 +123,19 @@ Remove Flows And Groups After Mininet Is Disconnected Check Flows In Operational DS After Mininet Is Disconnected [Documentation] Check Flows in Operational DS. - BuiltIn.Wait Until Keyword Succeeds 30s 1s ClusterOpenFlow.Check Number Of Flows On Member ${less_flows} + BuiltIn.Wait Until Keyword Succeeds + ... 30s + ... 1s + ... ClusterOpenFlow.Check Number Of Flows On Member + ... ${less_flows} Check Groups In Operational DS After Mininet Is Disconnected [Documentation] Check Groups in Operational DS. - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Check Number Of Groups On Member ${less_groups} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Check Number Of Groups On Member + ... ${less_groups} Check Flows In Switch After Mininet Is Disconnected [Documentation] Check Flows in switch. @@ -109,7 +147,12 @@ Reconnect Mininet To Owner Check Entity Owner Status And Find Owner and Successor After Reconnect [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1. - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 1 + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 Add Flows And Groups After Owner Reconnect [Documentation] Add 1 group type 1&2 and 1 flow in every switch. @@ -125,7 +168,11 @@ Check Flows After Owner Reconnect In Operational DS Check Groups After Owner Reconnect In Operational DS [Documentation] Check Groups in Operational DS. - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Check Number Of Groups On Member ${all_groups} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Check Number Of Groups On Member + ... ${all_groups} Check Flows After Owner Reconnect In Switch [Documentation] Check Flows in switch. @@ -135,7 +182,12 @@ Check Switches Generate Slave Connection [Documentation] Check switches are connected to new Slave. ${original_master}= BuiltIn.Set Variable ${ODL_SYSTEM_${original_owner}_IP} FOR ${switch} IN RANGE 1 ${switches+1} - BuiltIn.Wait Until Keyword Succeeds 50s 1s OvsManager.Should Be Slave s${switch} ${original_master} + BuiltIn.Wait Until Keyword Succeeds + ... 50s + ... 1s + ... OvsManager.Should Be Slave + ... s${switch} + ... ${original_master} ... update_data=${True} END @@ -145,8 +197,14 @@ Disconnect Mininet From Successor Check Entity Owner Status And Find New Owner and Successor After Disconnect [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1. - ${current_owner} ${current_successor_list} BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 - ... 1 ${owner_list} after_stop=True + ${current_owner} ${current_successor_list}= BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 + ... ${owner_list} + ... after_stop=True BuiltIn.Set Suite Variable ${current_owner} BuiltIn.Set Suite Variable ${current_successor_list} @@ -157,15 +215,27 @@ Disconnect Mininet From Current Owner Check Entity Owner Status And Find Current Owner and Successor After Disconnect [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1. - ${current_new_owner} ${current_new_successor_list} BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 - ... 1 ${original_owner_list} after_stop=True + ${current_new_owner} ${current_new_successor_list}= BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 + ... ${original_owner_list} + ... after_stop=True BuiltIn.Set Suite Variable ${current_new_owner} BuiltIn.Set Suite Variable ${current_new_successor_list} Check Switch Moves To Current Master [Documentation] Check switch s1 is connected to original Master. ${current_new_master}= BuiltIn.Set Variable ${ODL_SYSTEM_${current_new_owner}_IP} - BuiltIn.Wait Until Keyword Succeeds 10s 1s OvsManager.Should Be Master s1 ${current_new_master} update_data=${True} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... OvsManager.Should Be Master + ... s1 + ... ${current_new_master} + ... update_data=${True} BuiltIn.Should Be Equal ${current_new_owner} ${original_owner} Check Linear Topology After Owner Disconnect @@ -182,11 +252,19 @@ Remove Flows And Groups After Owner Disconnected Check Flows In Operational DS After Owner Disconnected [Documentation] Check Flows in Operational DS. - BuiltIn.Wait Until Keyword Succeeds 30s 1s ClusterOpenFlow.Check Number Of Flows On Member ${less_flows} + BuiltIn.Wait Until Keyword Succeeds + ... 30s + ... 1s + ... ClusterOpenFlow.Check Number Of Flows On Member + ... ${less_flows} Check Groups In Operational DS After Owner Disconnected [Documentation] Check Groups in Operational DS. - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Check Number Of Groups On Member ${less_groups} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Check Number Of Groups On Member + ... ${less_groups} Check Flows In Switch After Owner Disconnected [Documentation] Check Flows in switch. @@ -203,7 +281,12 @@ Check No Switches After Disconnect Check Switch Is Not Connected [Documentation] Check switch s1 is not connected to any controller. FOR ${index} IN @{cluster_index_list} - BuiltIn.Wait Until Keyword Succeeds 10s 1s OvsManager.Should Be Disconnected s1 ${ODL_SYSTEM_${index}_IP} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... OvsManager.Should Be Disconnected + ... s1 + ... ${ODL_SYSTEM_${index}_IP} ... update_data=${True} END @@ -225,7 +308,11 @@ Check Flows In Operational DS After Mininet Reconnects Check Groups In Operational DS After Mininet Reconnects [Documentation] Check Groups in Operational DS. - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Check Number Of Groups On Member ${all_groups} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Check Number Of Groups On Member + ... ${all_groups} Check Flows In Switch After Mininet Reconnects [Documentation] Check Flows in switch. @@ -233,7 +320,9 @@ Check Flows In Switch After Mininet Reconnects Check Entity Owner Status And Find Owner and Successor Before Owner Stop [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1. - ${original_owner} ${original_successor_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 1 + ${original_owner} ${original_successor_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 ${original_successor}= Collections.Get From List ${original_successor_list} 0 BuiltIn.Set Suite Variable ${original_owner} BuiltIn.Set Suite Variable ${original_successor_list} @@ -242,7 +331,13 @@ Check Entity Owner Status And Find Owner and Successor Before Owner Stop Check Switch Generates Slave Connection Before Owner Stop [Documentation] Check switch s1 is connected to Slave. ${original_slave}= BuiltIn.Set Variable ${ODL_SYSTEM_${original_successor}_IP} - BuiltIn.Wait Until Keyword Succeeds 50s 1s OvsManager.Should Be Slave s1 ${original_slave} update_data=${True} + BuiltIn.Wait Until Keyword Succeeds + ... 50s + ... 1s + ... OvsManager.Should Be Slave + ... s1 + ... ${original_slave} + ... update_data=${True} Check Shards Status Before Owner Stop [Documentation] Check Status for all shards in OpenFlow application. @@ -259,7 +354,11 @@ Check Shards Status After Stop Check Entity Owner Status And Find Owner and Successor After Stop [Documentation] Check Entity Owner Status and identify owner and successor. - ${new_owner} ${new_successor_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 ${original_successor} ${new_cluster_list} after_stop=True + ${new_owner} ${new_successor_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... ${original_successor} + ... ${new_cluster_list} + ... after_stop=True BuiltIn.Set Suite Variable ${new_owner} Check Stats Are Not Frozen After Owner Stop @@ -272,11 +371,21 @@ Remove Configuration In Owner and Verify After Owner Stop Check Flows After Owner Stop In Operational DS [Documentation] Check Flows in Operational DS in new owner. - BuiltIn.Wait Until Keyword Succeeds 30s 1s ClusterOpenFlow.Check Number Of Flows On Member ${less_flows} ${new_owner} + BuiltIn.Wait Until Keyword Succeeds + ... 30s + ... 1s + ... ClusterOpenFlow.Check Number Of Flows On Member + ... ${less_flows} + ... ${new_owner} Check Groups After Owner Stop In Operational DS [Documentation] Check Groups in Operational DS in new owner. - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Check Number Of Groups On Member ${less_groups} ${new_owner} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Check Number Of Groups On Member + ... ${less_groups} + ... ${new_owner} Check Flows In Switch After Owner Stop [Documentation] Check Flows in switch. @@ -288,7 +397,11 @@ Start Old Owner Instance Check Entity Owner Status And Find Owner and Successor After Start Owner [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1. - ${owner} ${successor_list} BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 + ${owner} ${successor_list}= BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 ... 1 Check Linear Topology After Owner Restart @@ -310,7 +423,11 @@ Check Flows In Operational DS After Owner Restart Check Groups In Operational DS After Owner Restart [Documentation] Check Groups in Operational DS. - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Check Number Of Groups On Member ${all_groups} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Check Number Of Groups On Member + ... ${all_groups} Check Flows In Switch After Owner Restart [Documentation] Check Flows in switch. @@ -320,7 +437,9 @@ Restart Cluster [Documentation] Stop and Start cluster. # Try to stop contoller, if stop does not work or takes too long, kill controller. ${status} ${result}= BuiltIn.Run Keyword And Ignore Error ClusterManagement.Stop_Members_From_List_Or_All - BuiltIn.Run Keyword If '${status}' != 'PASS' ClusterManagement.Kill_Members_From_List_Or_All + IF '${status}' != 'PASS' + ClusterManagement.Kill_Members_From_List_Or_All + END ClusterManagement.Start_Members_From_List_Or_All wait_for_sync=False Check Linear Topology After Controller Restarts @@ -337,7 +456,11 @@ Check Flows In Operational DS After Controller Restarts Check Groups In Operational DS After Controller Restarts [Documentation] Check Groups in Operational DS. - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Check Number Of Groups On Member ${all_groups} + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Check Number Of Groups On Member + ... ${all_groups} Check Flows In Switch After Controller Restarts [Documentation] Check Flows in switch. @@ -351,13 +474,14 @@ Check No Switches [Documentation] Check no switches in topology. BuiltIn.Wait Until Keyword Succeeds 5s 1s ClusterOpenFlow.Check No Switches On Member ${SWITCHES} + *** Keywords *** Initialization Phase [Documentation] Create controller session and set variables. SetupUtils.Setup_Utils_For_Setup_And_Teardown RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} - ${switches} Convert To Integer ${SWITCHES} - ${iter} Convert To Integer ${ITER} + ${switches}= Convert To Integer ${SWITCHES} + ${iter}= Convert To Integer ${ITER} ${all_groups}= BuiltIn.Evaluate ${switches} * ${iter} * 2 ${less_groups}= BuiltIn.Evaluate ${all_groups} - ${switches} * 2 # Stale flows/groups feature enabled in Boron onwards. @@ -374,55 +498,78 @@ Initialization Phase Final Phase [Documentation] Delete all sessions. - ${command} = BuiltIn.Set Variable sudo iptables -v -F + ${command}= BuiltIn.Set Variable sudo iptables -v -F BuiltIn.Run Keyword And Ignore Error ClusterManagement.Run_Bash_Command_On_List_Or_All ${command} BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${RFC8040_NODES_API} RequestsLibrary.Delete All Sessions Add Groups And Flows On Member - [Arguments] ${iter}=1 ${member_index}=1 [Documentation] Add ${ITER} groups type 1 & 2 and flows in every switch. - ${session} = Resolve_Http_Session_For_Member member_index=${member_index} + [Arguments] ${iter}=1 ${member_index}=1 + ${session}= Resolve_Http_Session_For_Member member_index=${member_index} FOR ${switch} IN RANGE 1 ${switches+1} - &{mapping} BuiltIn.Create_Dictionary NODE=openflow:${switch} - TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-1 mapping=${mapping} session=${session} iterations=${iter} - TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-2 mapping=${mapping} session=${session} iterations=${iter} - TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-flow mapping=${mapping} session=${session} iterations=${iter} + &{mapping}= BuiltIn.Create_Dictionary NODE=openflow:${switch} + TemplatedRequests.Post As Json Templated + ... folder=${VAR_DIR}/add-group-1 + ... mapping=${mapping} + ... session=${session} + ... iterations=${iter} + TemplatedRequests.Post As Json Templated + ... folder=${VAR_DIR}/add-group-2 + ... mapping=${mapping} + ... session=${session} + ... iterations=${iter} + TemplatedRequests.Post As Json Templated + ... folder=${VAR_DIR}/add-flow + ... mapping=${mapping} + ... session=${session} + ... iterations=${iter} END Add Single Group And Flow On Member - [Arguments] ${member_index}=1 [Documentation] Add 1 group 1&2 and 1 flow in every switch. + [Arguments] ${member_index}=1 Add Groups And Flows On Member 1 ${member_index} Remove Single Group And Flow On Member - [Arguments] ${member_index}=1 [Documentation] Remove 1 group 1&2 and 1 flow in every switch. - ${session} = Resolve_Http_Session_For_Member member_index=${member_index} + [Arguments] ${member_index}=1 + ${session}= Resolve_Http_Session_For_Member member_index=${member_index} FOR ${switch} IN RANGE 1 ${switches+1} - RequestsLibrary.Delete Request ${session} ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:table=0/flow=1 - RequestsLibrary.Delete Request ${session} ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1 - RequestsLibrary.Delete Request ${session} ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1000 + RequestsLibrary.Delete Request + ... ${session} + ... ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:table=0/flow=1 + RequestsLibrary.Delete Request + ... ${session} + ... ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1 + RequestsLibrary.Delete Request + ... ${session} + ... ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1000 END Check Flow Stats Are Not Frozen - [Arguments] ${member_index}=1 ${period_in_seconds}=5 [Documentation] Verify flow stats are not frozen for flow 1 and switch 1. - ${duration_1} = Extract Flow Duration ${member_index} - ${duration_1} Builtin.Convert To Integer ${duration_1} + [Arguments] ${member_index}=1 ${period_in_seconds}=5 + ${duration_1}= Extract Flow Duration ${member_index} + ${duration_1}= Builtin.Convert To Integer ${duration_1} BuiltIn.Sleep ${period_in_seconds} - ${duration_2} = Extract Flow Duration ${member_index} - ${duration_2} Builtin.Convert To Integer ${duration_2} + ${duration_2}= Extract Flow Duration ${member_index} + ${duration_2}= Builtin.Convert To Integer ${duration_2} Should Not Be Equal As Integers ${duration_1} ${duration_2} Extract Flow Duration - [Arguments] ${member_index} [Documentation] Extract duration for flow 1 in switch 1. - ${session} = Resolve_Http_Session_For_Member member_index=${member_index} - ${resp} RequestsLibrary.Get Request ${session} ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=1?content=nonconfig headers=${headers} + [Arguments] ${member_index} + ${session}= Resolve_Http_Session_For_Member member_index=${member_index} + ${resp}= RequestsLibrary.Get Request + ... ${session} + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=1?content=nonconfig + ... headers=${headers} Log ${resp.content} - ${json_resp} = RequestsLibrary.To_Json ${resp.content} - ${flow_list} = Collections.Get_From_Dictionary ${json_resp} flow-node-inventory:flow - ${flow_stats} = Collections.Get_From_Dictionary ${flow_list}[0] opendaylight-flow-statistics:flow-statistics - ${duration} = Collections.Get_From_Dictionary ${flow_stats}[duration] second - Return From Keyword ${duration} + ${json_resp}= RequestsLibrary.To_Json ${resp.content} + ${flow_list}= Collections.Get_From_Dictionary ${json_resp} flow-node-inventory:flow + ${flow_stats}= Collections.Get_From_Dictionary + ... ${flow_list}[0] + ... opendaylight-flow-statistics:flow-statistics + ${duration}= Collections.Get_From_Dictionary ${flow_stats}[duration] second + RETURN ${duration} diff --git a/csit/suites/openflowplugin/Clustering/010__Cluster_HA_Owner_Failover.robot b/csit/suites/openflowplugin/Clustering/010__Cluster_HA_Owner_Failover.robot index 720e4441cc..3ea5878fa6 100644 --- a/csit/suites/openflowplugin/Clustering/010__Cluster_HA_Owner_Failover.robot +++ b/csit/suites/openflowplugin/Clustering/010__Cluster_HA_Owner_Failover.robot @@ -1,13 +1,16 @@ *** Settings *** -Documentation Test suite for Cluster HA - Device Owner failover -Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown -Suite Teardown Delete All Sessions -Library RequestsLibrary -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/ClusterManagement.robot -Variables ../../../variables/Variables.py +Documentation Test suite for Cluster HA - Device Owner failover + +Library RequestsLibrary +Resource ../../../libraries/SetupUtils.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/ClusterManagement.robot +Variables ../../../variables/Variables.py + +Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown +Suite Teardown Delete All Sessions + *** Test Cases *** Check Shards Status Before Fail @@ -16,13 +19,18 @@ Check Shards Status Before Fail Start Mininet Multiple Connections [Documentation] Start mininet tree,2 with connection to all cluster instances. - ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers ${TOOLS_SYSTEM_IP} ${ClusterManagement__member_index_list} --topo tree,2 + ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers + ... ${TOOLS_SYSTEM_IP} + ... ${ClusterManagement__member_index_list} + ... --topo tree,2 BuiltIn.Set Suite Variable ${mininet_conn_id} BuiltIn.Wait Until Keyword Succeeds 10s 1s OVSDB.Check OVS OpenFlow Connections ${TOOLS_SYSTEM_IP} 9 Check Entity Owner Status And Find Owner and Successor Before Fail [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1. - ${original_owner} ${original_successor_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 1 + ${original_owner} ${original_successor_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 ${original_successor}= Collections.Get From List ${original_successor_list} 0 BuiltIn.Set Suite Variable ${original_owner} BuiltIn.Set Suite Variable ${original_successor_list} @@ -30,9 +38,11 @@ Check Entity Owner Status And Find Owner and Successor Before Fail Reconnect Extra Switches To Successors And Check OVS Connections [Documentation] Connect switches s2 and s3 to successor instances. - ${controller_opt} = BuiltIn.Set Variable + ${controller_opt}= BuiltIn.Set Variable FOR ${index} IN @{original_successor_list} - ${controller_opt} = BuiltIn.Catenate ${controller_opt} ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ODL_OF_PORT} + ${controller_opt}= BuiltIn.Catenate + ... ${controller_opt} + ... ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ODL_OF_PORT} Log ${controller_opt} END OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s2 ${controller_opt} @@ -102,7 +112,10 @@ Check Shards Status After Fail Check Entity Owner Status And Find Owner and Successor After Fail [Documentation] Check Entity Owner Status and identify owner and successor. - ${new_owner} ${new_successor_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 ${original_successor} ${new_cluster_list} + ${new_owner} ${new_successor_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... ${original_successor} + ... ${new_cluster_list} ${new_successor}= Collections.Get From List ${new_successor_list} 0 BuiltIn.Set Suite Variable ${new_owner} BuiltIn.Set Suite Variable ${new_successor} @@ -170,7 +183,9 @@ Check Shards Status After Recover Check Entity Owner Status After Recover [Documentation] Check Entity Owner Status and identify owner and successor. - ${new_owner} ${new_successors_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 1 + ${new_owner} ${new_successors_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 BuiltIn.Set Suite Variable ${new_owner} Check Network Operational Information After Recover diff --git a/csit/suites/openflowplugin/Clustering/020__Cluster_HA_Leader_Follower_Failover.robot b/csit/suites/openflowplugin/Clustering/020__Cluster_HA_Leader_Follower_Failover.robot index c45c940463..f6b456947c 100644 --- a/csit/suites/openflowplugin/Clustering/020__Cluster_HA_Leader_Follower_Failover.robot +++ b/csit/suites/openflowplugin/Clustering/020__Cluster_HA_Leader_Follower_Failover.robot @@ -1,12 +1,15 @@ *** Settings *** -Documentation Test suite for Cluster HA - Device Leader Follower failover -Suite Setup ClusterManagement Setup -Suite Teardown Delete All Sessions -Library RequestsLibrary -Resource ../../../libraries/ClusterOpenFlow.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/MininetKeywords.robot -Variables ../../../variables/Variables.py +Documentation Test suite for Cluster HA - Device Leader Follower failover + +Library RequestsLibrary +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/MininetKeywords.robot +Variables ../../../variables/Variables.py + +Suite Setup ClusterManagement Setup +Suite Teardown Delete All Sessions + *** Test Cases *** Check Shards Status Before Leader Restart @@ -15,7 +18,7 @@ Check Shards Status Before Leader Restart Get inventory Leader Before Leader Restart [Documentation] Find leader in the inventory config shard - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${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 Set Suite Variable ${follower_node_1} @@ -24,7 +27,9 @@ Get inventory Leader Before Leader Restart Start Mininet Connect To Leader [Documentation] Start mininet with connection to cluster Leader. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${inventory_leader}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${inventory_leader}_IP} Set Suite Variable ${mininet_conn_id} Add Flows In Leader and Verify Before Leader Restart @@ -67,7 +72,7 @@ Restart Leader From Cluster Node Get inventory Follower After Leader Restart [Documentation] Find new Followers and Leader in the inventory config shard After Leader Restart - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${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 Set Suite Variable ${follower_node_1} @@ -76,7 +81,9 @@ Get inventory Follower After Leader Restart Start Mininet Connect To Follower Node1 [Documentation] Start mininet with connection to cluster Follower Node1. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${follower_node_1}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${follower_node_1}_IP} Set Suite Variable ${mininet_conn_id} Add Flows In Follower Node2 and Verify Before Follower Restart @@ -119,7 +126,7 @@ Restart Follower Node2 Get inventory Follower After Follower Restart [Documentation] Find Followers and Leader in the inventory config shard After Follower Restart - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${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 Set Suite Variable ${follower_node_1} @@ -128,7 +135,9 @@ Get inventory Follower After Follower Restart Start Mininet Connect To Follower Node2 [Documentation] Start mininet with connection to cluster Follower Node1. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${follower_node_2}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${follower_node_2}_IP} Set Suite Variable ${mininet_conn_id} Add Flows In Follower Node1 and Verify Before Cluster Restart @@ -171,7 +180,7 @@ Restart Full Cluster Get inventory Status After Cluster Restart [Documentation] Find New Followers and Leader in the inventory config shard After Cluster Restart - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${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 Set Suite Variable ${follower_node_1} @@ -180,7 +189,9 @@ Get inventory Status After Cluster Restart Start Mininet Connect To Follower Node2 After Cluster Restart [Documentation] Start mininet with connection to cluster Follower Node1. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${follower_node_2}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${follower_node_2}_IP} Set Suite Variable ${mininet_conn_id} Add Flows In Follower Node1 and Verify After Cluster Restart diff --git a/csit/suites/openflowplugin/Clustering/020__Cluster_HA_Owner_Restart.robot b/csit/suites/openflowplugin/Clustering/020__Cluster_HA_Owner_Restart.robot index e2602263c1..5f8b001134 100644 --- a/csit/suites/openflowplugin/Clustering/020__Cluster_HA_Owner_Restart.robot +++ b/csit/suites/openflowplugin/Clustering/020__Cluster_HA_Owner_Restart.robot @@ -1,13 +1,16 @@ *** Settings *** -Documentation Test suite for Cluster HA - Device Owner Stop and Start -Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown -Suite Teardown Delete All Sessions -Library RequestsLibrary -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/ClusterManagement.robot -Variables ../../../variables/Variables.py +Documentation Test suite for Cluster HA - Device Owner Stop and Start + +Library RequestsLibrary +Resource ../../../libraries/SetupUtils.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/ClusterManagement.robot +Variables ../../../variables/Variables.py + +Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown +Suite Teardown Delete All Sessions + *** Test Cases *** Check Shards Status Before Stop @@ -16,13 +19,18 @@ Check Shards Status Before Stop Start Mininet Multiple Connections [Documentation] Start mininet tree,2 with connection to all cluster instances. - ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers ${TOOLS_SYSTEM_IP} ${ClusterManagement__member_index_list} --topo tree,2 + ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers + ... ${TOOLS_SYSTEM_IP} + ... ${ClusterManagement__member_index_list} + ... --topo tree,2 BuiltIn.Set Suite Variable ${mininet_conn_id} BuiltIn.Wait Until Keyword Succeeds 10s 1s OVSDB.Check OVS OpenFlow Connections ${TOOLS_SYSTEM_IP} 9 Check Entity Owner Status And Find Owner and Successor Before Stop [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1. - ${original_owner} ${original_successor_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 1 + ${original_owner} ${original_successor_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 ${original_successor}= Collections.Get From List ${original_successor_list} 0 BuiltIn.Set Suite Variable ${original_owner} BuiltIn.Set Suite Variable ${original_successor_list} @@ -30,9 +38,11 @@ Check Entity Owner Status And Find Owner and Successor Before Stop Reconnect Extra Switches To Successors And Check OVS Connections [Documentation] Connect switches s2 and s3 to successor instances. - ${controller_opt} = BuiltIn.Set Variable + ${controller_opt}= BuiltIn.Set Variable FOR ${index} IN @{original_successor_list} - ${controller_opt} = BuiltIn.Catenate ${controller_opt} ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ODL_OF_PORT} + ${controller_opt}= BuiltIn.Catenate + ... ${controller_opt} + ... ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ODL_OF_PORT} Log ${controller_opt} END OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s2 ${controller_opt} @@ -102,7 +112,11 @@ Check Shards Status After Stop Check Entity Owner Status And Find Owner and Successor After Stop [Documentation] Check Entity Owner Status and identify owner and successor. - ${new_owner} ${new_successor_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 ${original_successor} ${new_cluster_list} after_stop=True + ${new_owner} ${new_successor_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... ${original_successor} + ... ${new_cluster_list} + ... after_stop=True ${new_successor}= Collections.Get From List ${new_successor_list} 0 BuiltIn.Set Suite Variable ${new_owner} BuiltIn.Set Suite Variable ${new_successor} @@ -169,7 +183,9 @@ Check Shards Status After Start Check Entity Owner Status After Start [Documentation] Check Entity Owner Status and identify owner and successor. - ${new_owner} ${new_successors_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 1 + ${new_owner} ${new_successors_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:1 + ... 1 BuiltIn.Set Suite Variable ${new_owner} Check Network Operational Information After Start diff --git a/csit/suites/openflowplugin/Clustering/030__Cluster_HA_Data_Recovery_Leader_Follower_Failover.robot b/csit/suites/openflowplugin/Clustering/030__Cluster_HA_Data_Recovery_Leader_Follower_Failover.robot index b220cfba87..ea1aa71d4f 100644 --- a/csit/suites/openflowplugin/Clustering/030__Cluster_HA_Data_Recovery_Leader_Follower_Failover.robot +++ b/csit/suites/openflowplugin/Clustering/030__Cluster_HA_Data_Recovery_Leader_Follower_Failover.robot @@ -1,15 +1,18 @@ *** Settings *** -Documentation Test suite for Cluster HA - Data Recovery at Leader Follower failover and cluster restart -Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown -Suite Teardown Delete All Sessions -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Library RequestsLibrary -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/CompareStream.robot -Resource ../../../libraries/MininetKeywords.robot -Variables ../../../variables/Variables.py +Documentation Test suite for Cluster HA - Data Recovery at Leader Follower failover and cluster restart + +Library RequestsLibrary +Resource ../../../libraries/SetupUtils.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/CompareStream.robot +Resource ../../../libraries/MininetKeywords.robot +Variables ../../../variables/Variables.py + +Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown +Suite Teardown Delete All Sessions +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + *** Test Cases *** Check Shards Status Before Leader Restart @@ -20,7 +23,7 @@ Check Shards Status Before Leader Restart Get inventory Leader Before Leader Restart [Documentation] Find leader in the inventory config shard - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${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 Set Suite Variable ${inventory_leader_old} ${inventory_leader} @@ -30,9 +33,16 @@ Get inventory Leader Before Leader Restart 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} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${follower_node_1}_IP} Comment Wait until switch is available in controller - Wait Until Keyword Succeeds 5s 1s ClusterOpenFlow.Verify Switch Connections Running On Member 1 ${follower_node_1} + Wait Until Keyword Succeeds + ... 5s + ... 1s + ... ClusterOpenFlow.Verify Switch Connections Running On Member + ... 1 + ... ${follower_node_1} Set Suite Variable ${mininet_conn_id} Add Flows In Follower Node2 and Verify Before Leader Restart @@ -51,7 +61,7 @@ Restart Leader From Cluster Node Get inventory Follower After Leader Restart [Documentation] Find new Followers and Leader in the inventory config shard After Leader Restart. - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${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 Set Suite Variable ${follower_node_1} @@ -60,7 +70,9 @@ Get inventory Follower After Leader Restart Start Mininet Connect To Old Leader [Documentation] Start mininet with connection to cluster old leader. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${inventory_leader_old}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${inventory_leader_old}_IP} Set Suite Variable ${mininet_conn_id} Verify Flows In Switch After Leader Restart @@ -79,7 +91,7 @@ Restart Follower Node2 Get inventory Follower After Follower Restart [Documentation] Find Followers and Leader in the inventory config shard After Follower Restart. - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${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 Set Suite Variable ${follower_node_1} @@ -88,7 +100,9 @@ Get inventory Follower After Follower Restart Start Mininet Connect To Leader [Documentation] Start mininet with connection to Leader. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${inventory_leader}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${inventory_leader}_IP} Set Suite Variable ${mininet_conn_id} Verify Flows In Switch After Follower Restart @@ -107,7 +121,7 @@ Restart Full Cluster Get inventory Status After Cluster Restart [Documentation] Find New Followers and Leader in the inventory config shard After Cluster Restart. - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${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 Set Suite Variable ${follower_node_1} @@ -116,7 +130,9 @@ Get inventory Status After Cluster Restart Start Mininet Connect To Follower Node2 After Cluster Restart [Documentation] Start mininet with connection to cluster Follower Node2. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${follower_node_2}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${follower_node_2}_IP} Set Suite Variable ${mininet_conn_id} Verify Flows In Switch After Cluster Restart diff --git a/csit/suites/openflowplugin/Clustering_Bulkomatic/010__Cluster_Reconcilliation_Multi_DPN.robot b/csit/suites/openflowplugin/Clustering_Bulkomatic/010__Cluster_Reconcilliation_Multi_DPN.robot index 1a86a7cf54..78797c053b 100644 --- a/csit/suites/openflowplugin/Clustering_Bulkomatic/010__Cluster_Reconcilliation_Multi_DPN.robot +++ b/csit/suites/openflowplugin/Clustering_Bulkomatic/010__Cluster_Reconcilliation_Multi_DPN.robot @@ -1,40 +1,53 @@ *** Settings *** -Documentation Test suite for Cluster with Bulk Flows - Reconcilliation in a multi DPN environment -Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown -Suite Teardown Delete All Sessions -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/BulkomaticKeywords.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Resource ../../../libraries/Utils.robot -Variables ../../../variables/Variables.py +Documentation Test suite for Cluster with Bulk Flows - Reconcilliation in a multi DPN environment + +Resource ../../../libraries/SetupUtils.robot +Resource ../../../libraries/BulkomaticKeywords.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../libraries/Utils.robot +Variables ../../../variables/Variables.py + +Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown +Suite Teardown Delete All Sessions +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + *** Variables *** -${operation_timeout} 100s +${operation_timeout} 100s ${flow_count_per_switch} 10000 -${switch_count} 1 -${flow_count_after_add} 10000 -${flow_count_after_del} 0 -${orig_json_config_add} sal_add_bulk_flow_config.json -${orig_json_config_get} sal_get_bulk_flow_config.json -${orig_json_config_del} sal_del_bulk_flow_config.json +${switch_count} 1 +${flow_count_after_add} 10000 +${flow_count_after_del} 0 +${orig_json_config_add} sal_add_bulk_flow_config.json +${orig_json_config_get} sal_get_bulk_flow_config.json +${orig_json_config_del} sal_del_bulk_flow_config.json + *** Test Cases *** Check Shards Status And Initialize Variables [Documentation] Check Status for all shards in OpenFlow application. ClusterOpenFlow.Check OpenFlow Shards Status - ${temp_json_config_add} BulkomaticKeywords.Set DPN And Flow Count In Json Add ${orig_json_config_add} ${switch_count} ${flow_count_per_switch} - ${temp_json_config_get} BulkomaticKeywords.Set DPN And Flow Count In Json Get ${orig_json_config_get} ${switch_count} ${flow_count_after_add} - ${temp_json_config_del} BulkomaticKeywords.Set DPN And Flow Count In Json Del ${orig_json_config_del} ${switch_count} ${flow_count_per_switch} + ${temp_json_config_add}= BulkomaticKeywords.Set DPN And Flow Count In Json Add + ... ${orig_json_config_add} + ... ${switch_count} + ... ${flow_count_per_switch} + ${temp_json_config_get}= BulkomaticKeywords.Set DPN And Flow Count In Json Get + ... ${orig_json_config_get} + ... ${switch_count} + ... ${flow_count_after_add} + ${temp_json_config_del}= BulkomaticKeywords.Set DPN And Flow Count In Json Del + ... ${orig_json_config_del} + ... ${switch_count} + ... ${flow_count_per_switch} Set Suite Variable ${temp_json_config_add} Set Suite Variable ${temp_json_config_get} Set Suite Variable ${temp_json_config_del} Get Inventory Follower and Leader Before Cluster Restart [Documentation] Find a follower in the inventory config shard - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${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} @@ -47,7 +60,10 @@ Get Inventory Follower and Leader Before Cluster Restart 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} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_1}_IP} + ... --topo linear,${switch_count} Set Suite Variable ${mininet_conn_id} Add Bulk Flow From Follower @@ -56,11 +72,18 @@ Add Bulk Flow From Follower Get Bulk Flows and Verify In Inventory Leader [Documentation] Initiate get operation and check flow count across cluster nodes - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} ${Inventory_Leader_List} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} + ... ${Inventory_Leader_List} 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} ${flow_count_after_add} ${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. @@ -69,12 +92,18 @@ Stop Mininet Connected To Follower Node1 and Exit Start Mininet Reconnect To Follower Node1 [Documentation] Start mininet with reconnection to follower node1. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Follower_Node_1}_IP} --topo linear,${switch_count} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_1}_IP} + ... --topo linear,${switch_count} Set Suite Variable ${mininet_conn_id} Verify Flows In Switch Reconnected To Follower Node1 [Documentation] Verify ${flow_count_per_switch} flows per DPN installed in switch after it is reconnected to follower node1. - MininetKeywords.Verify Aggregate Flow From Mininet Session ${mininet_conn_id} ${flow_count_after_add} ${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. @@ -83,12 +112,18 @@ Stop Mininet Connected To Follower Node1 Start Mininet Connect To Follower Node2 [Documentation] Start mininet with connection to follower node2. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Follower_Node_2}_IP} --topo linear,${switch_count} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_2}_IP} + ... --topo linear,${switch_count} Set Suite Variable ${mininet_conn_id} Verify Flows In Switch Connected To Follower Node2 [Documentation] Verify ${flow_count_per_switch} flows per DPN installed in switch after it is connected to follower node2. - MininetKeywords.Verify Aggregate Flow From Mininet Session ${mininet_conn_id} ${flow_count_after_add} ${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. @@ -97,12 +132,18 @@ Stop Mininet Connected To Follower Node2 Start Mininet Connect To Inventory Leader [Documentation] Start mininet with connection to inventroy leader. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Inventory_Leader}_IP} --topo linear,${switch_count} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Inventory_Leader}_IP} + ... --topo linear,${switch_count} Set Suite Variable ${mininet_conn_id} Verify Flows In Switch Connected To Leader [Documentation] Verify ${flow_count_per_switch} flows per DPN installed in switch after it is connected to inventory leader. - MininetKeywords.Verify Aggregate Flow From Mininet Session ${mininet_conn_id} ${flow_count_after_add} ${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. @@ -111,8 +152,15 @@ Stop Mininet Connected To Inventory Leader Delete All Flows From Follower Node1 [Documentation] ${flow_count_after_add} Flows deleted via Follower Node1 and verify it gets applied in all instances. - BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} ${Follower_Node_1} ${operation_timeout} + BulkomaticKeywords.Delete Bulk Flow In Node + ... ${temp_json_config_del} + ... ${Follower_Node_1} + ... ${operation_timeout} Verify No Flows In Inventory Leader [Documentation] Verify flow count is 0 across cluster nodes. - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del} ${Inventory_Leader_List} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_del} + ... ${Inventory_Leader_List} diff --git a/csit/suites/openflowplugin/Clustering_Bulkomatic/020__Cluster_HA_Data_Recovery_BulkFlow_2Node_Cluster.robot b/csit/suites/openflowplugin/Clustering_Bulkomatic/020__Cluster_HA_Data_Recovery_BulkFlow_2Node_Cluster.robot index 9ae5d195b3..27fa063117 100644 --- a/csit/suites/openflowplugin/Clustering_Bulkomatic/020__Cluster_HA_Data_Recovery_BulkFlow_2Node_Cluster.robot +++ b/csit/suites/openflowplugin/Clustering_Bulkomatic/020__Cluster_HA_Data_Recovery_BulkFlow_2Node_Cluster.robot @@ -1,48 +1,61 @@ *** Settings *** -Documentation Test suite for 2Node Cluster HA with Bulk Flows - Cluster node convergance and Data consistency after leader and follower restart with one switch connected -Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown -Suite Teardown Delete All Sessions -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/BulkomaticKeywords.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Resource ../../../libraries/Utils.robot -Variables ../../../variables/Variables.py +Documentation Test suite for 2Node Cluster HA with Bulk Flows - Cluster node convergance and Data consistency after leader and follower restart with one switch connected + +Resource ../../../libraries/SetupUtils.robot +Resource ../../../libraries/BulkomaticKeywords.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../libraries/Utils.robot +Variables ../../../variables/Variables.py + +Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown +Suite Teardown Delete All Sessions +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + *** Variables *** -${operation_timeout} 100s -${restart_timeout} 350s +${operation_timeout} 100s +${restart_timeout} 350s ${flow_count_per_switch} 10000 -${switch_count} 1 -${flow_count_after_add} 10000 -${flow_count_after_del} 0 -${orig_json_config_add} sal_add_bulk_flow_config.json -${orig_json_config_get} sal_get_bulk_flow_config.json -${orig_json_config_del} sal_del_bulk_flow_config.json +${switch_count} 1 +${flow_count_after_add} 10000 +${flow_count_after_del} 0 +${orig_json_config_add} sal_add_bulk_flow_config.json +${orig_json_config_get} sal_get_bulk_flow_config.json +${orig_json_config_del} sal_del_bulk_flow_config.json + *** Test Cases *** Check Shards Status and Initialize Variables [Documentation] Check Status for all shards in OpenFlow application. ClusterOpenFlow.Check OpenFlow Shards Status - ${temp_json_config_add} BulkomaticKeywords.Set DPN And Flow Count In Json Add ${orig_json_config_add} ${switch_count} ${flow_count_per_switch} - ${temp_json_config_get} BulkomaticKeywords.Set DPN And Flow Count In Json Get ${orig_json_config_get} ${switch_count} ${flow_count_after_add} - ${temp_json_config_del} BulkomaticKeywords.Set DPN And Flow Count In Json Del ${orig_json_config_del} ${switch_count} ${flow_count_per_switch} + ${temp_json_config_add}= BulkomaticKeywords.Set DPN And Flow Count In Json Add + ... ${orig_json_config_add} + ... ${switch_count} + ... ${flow_count_per_switch} + ${temp_json_config_get}= BulkomaticKeywords.Set DPN And Flow Count In Json Get + ... ${orig_json_config_get} + ... ${switch_count} + ... ${flow_count_after_add} + ${temp_json_config_del}= BulkomaticKeywords.Set DPN And Flow Count In Json Del + ... ${orig_json_config_del} + ... ${switch_count} + ... ${flow_count_per_switch} Set Suite Variable ${temp_json_config_add} Set Suite Variable ${temp_json_config_get} Set Suite Variable ${temp_json_config_del} Get Inventory Follower Before Leader Restart [Documentation] Find a follower in the inventory config shard - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${inventory_leader} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status ${Inventory_Pre_Leader_List}= Create List ${Inventory_Leader} ${Follower_Node_1}= Get From List ${Inventory_Followers} 0 Set Suite Variable ${Inventory_Followers} Set Suite Variable ${Follower_Node_1} Set Suite Variable ${Inventory_Leader} Set Suite Variable ${Inventory_Pre_Leader_List} - ${Inventory_Pre_Leader} Set Variable ${Inventory_Leader} + ${Inventory_Pre_Leader}= Set Variable ${Inventory_Leader} Set Suite Variable ${Inventory_Pre_Leader} Shutdown Leader From Cluster Node @@ -51,11 +64,16 @@ Shutdown Leader From Cluster Node Check Shards Status After Leader Shutdown [Documentation] Wait for node convergence and check status for all shards in OpenFlow application. - Wait Until Keyword Succeeds ${operation_timeout} 2s ClusterOpenFlow.Check OpenFlow Shards Status ${Inventory_Followers} + Wait Until Keyword Succeeds + ... ${operation_timeout} + ... 2s + ... ClusterOpenFlow.Check OpenFlow Shards Status + ... ${Inventory_Followers} Check Shard Status For Leader After PreLeader Shutdown [Documentation] Find a Leader in the inventory config shard - ${Inventory_Leader_Post} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status ${Inventory_Followers} + ${Inventory_Leader_Post} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status + ... ${Inventory_Followers} ${Inventory_Leader_List_Post}= Create List ${Inventory_Leader_Post} ${Follower_Node_1}= Get From List ${Inventory_Followers} 0 Set Suite Variable ${Inventory_Followers} @@ -65,7 +83,10 @@ Check Shard Status For Leader After PreLeader Shutdown 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} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_1}_IP} + ... --topo linear,${switch_count} Set Suite Variable ${mininet_conn_id} Add Bulk Flow From Follower @@ -74,11 +95,18 @@ Add Bulk Flow From Follower Get Bulk Flows And Verify In Leader [Documentation] Initiate get operation and check flow count across cluster nodes. - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} ${Inventory_Leader_List_Post} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} + ... ${Inventory_Leader_List_Post} 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} ${flow_count_after_add} ${operation_timeout} + MininetKeywords.Verify Aggregate Flow From Mininet Session + ... ${mininet_conn_id} + ... ${flow_count_after_add} + ... ${operation_timeout} Restart Pre Leader From Cluster Node [Documentation] Restart Leader Node. @@ -90,12 +118,21 @@ Check Shards Status After Leader Restart Verify Data Recovery After Leader Restart [Documentation] ${flow_count_after_add} Flows preserved in all controller instances. - Wait Until Keyword Succeeds ${operation_timeout} 2s BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} + Wait Until Keyword Succeeds + ... ${operation_timeout} + ... 2s + ... BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} ... ${Inventory_Leader_List_Post} 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} ${flow_count_after_add} ${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. @@ -104,15 +141,22 @@ Stop Mininet Connected To Follower Node1 Delete All Flows From Follower Node1 [Documentation] ${flow_count_after_add} Flows deleted via Follower Node1 and verify it gets applied in all instances. - BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} ${Follower_Node_1} ${operation_timeout} + BulkomaticKeywords.Delete Bulk Flow In Node + ... ${temp_json_config_del} + ... ${Follower_Node_1} + ... ${operation_timeout} Verify No Flows In Leader Node [Documentation] Verify flow count is ${flow_count_after_del} across cluster nodes. - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del} ${Inventory_Leader_List_Post} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_del} + ... ${Inventory_Leader_List_Post} Get Inventory Follower And Leader Before Cluster Restart [Documentation] Find a follower in the inventory config shard - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${inventory_leader} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status ${Active_Nodes}= Create List ${Follower_Node_1}= Get From List ${Inventory_Followers} 0 ${Follower_Node_2}= Get From List ${Inventory_Followers} 1 @@ -132,11 +176,18 @@ Shutdown Follower From Cluster Node Check Shards Status After Follower Shutdown [Documentation] Wait for node convergence and check status for all shards in OpenFlow application. - Wait Until Keyword Succeeds ${operation_timeout} 2s ClusterOpenFlow.Check OpenFlow Shards Status ${Active_Nodes} + Wait Until Keyword Succeeds + ... ${operation_timeout} + ... 2s + ... ClusterOpenFlow.Check OpenFlow Shards Status + ... ${Active_Nodes} Start Mininet Connect To Follower Node [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} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_1}_IP} + ... --topo linear,${switch_count} Set Suite Variable ${mininet_conn_id} Add Bulk Flow From Follower Node1 @@ -145,11 +196,18 @@ Add Bulk Flow From Follower Node1 Get Bulk Flows And Verify In Leader Before Follower Restart [Documentation] Initiate get operation and check flow count ${flow_count_after_add} only across active cluster nodes - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} ${Inventory_Leader_List} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} + ... ${Inventory_Leader_List} 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} ${flow_count_after_add} ${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. @@ -161,12 +219,21 @@ Check Shards Status After Follower Restart Verify Data Recovery After Follower Restart [Documentation] ${flow_count_after_add} Flows preserved in all controller instances. - Wait Until Keyword Succeeds ${operation_timeout} 2s BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} + Wait Until Keyword Succeeds + ... ${operation_timeout} + ... 2s + ... BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} ... ${Inventory_Leader_List} 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} ${flow_count_after_add} ${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. @@ -175,8 +242,15 @@ Stop Mininet Connected To Follower Node Delete All Flows From Follower Node [Documentation] ${flow_count_after_add} Flows deleted via Follower Node1 and verify it gets applied in all instances. - BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} ${Follower_Node_1} ${operation_timeout} + BulkomaticKeywords.Delete Bulk Flow In Node + ... ${temp_json_config_del} + ... ${Follower_Node_1} + ... ${operation_timeout} Verify No Flows In Leader Node After Follower Restart [Documentation] Verify flow count is ${flow_count_after_del} across cluster nodes. - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del} ${Inventory_Leader_List} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_del} + ... ${Inventory_Leader_List} diff --git a/csit/suites/openflowplugin/Clustering_Bulkomatic/030__Cluster_HA_Data_Recovery_BulkFlow_Single_Switch.robot b/csit/suites/openflowplugin/Clustering_Bulkomatic/030__Cluster_HA_Data_Recovery_BulkFlow_Single_Switch.robot index f7f3e076d4..8a5de878b6 100644 --- a/csit/suites/openflowplugin/Clustering_Bulkomatic/030__Cluster_HA_Data_Recovery_BulkFlow_Single_Switch.robot +++ b/csit/suites/openflowplugin/Clustering_Bulkomatic/030__Cluster_HA_Data_Recovery_BulkFlow_Single_Switch.robot @@ -1,47 +1,62 @@ *** Settings *** -Documentation Test suite for Cluster HA with Bulk Flows - Data consistency after cluster restart, leader restart and follower restart with one switch connected -Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown -Suite Teardown Delete All Sessions -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/BulkomaticKeywords.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Resource ../../../libraries/Utils.robot -Variables ../../../variables/Variables.py +Documentation Test suite for Cluster HA with Bulk Flows - Data consistency after cluster restart, leader restart and follower restart with one switch connected + +Resource ../../../libraries/SetupUtils.robot +Resource ../../../libraries/BulkomaticKeywords.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../libraries/Utils.robot +Variables ../../../variables/Variables.py + +Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown +Suite Teardown Delete All Sessions +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + *** Variables *** -${operation_timeout} 100s -${restart_timeout} 350s +${operation_timeout} 100s +${restart_timeout} 350s ${flow_count_per_switch} 1000 -${switch_count} 1 -${flow_count_after_add} 1000 -${flow_count_after_del} 0 -${orig_json_config_add} sal_add_bulk_flow_config.json -${orig_json_config_get} sal_get_bulk_flow_config.json -${orig_json_config_del} sal_del_bulk_flow_config.json +${switch_count} 1 +${flow_count_after_add} 1000 +${flow_count_after_del} 0 +${orig_json_config_add} sal_add_bulk_flow_config.json +${orig_json_config_get} sal_get_bulk_flow_config.json +${orig_json_config_del} sal_del_bulk_flow_config.json + *** Test Cases *** Check Shards Status And Initialize Variables [Documentation] Check Status for all shards in OpenFlow application. ClusterOpenFlow.Check OpenFlow Shards Status - ${temp_json_config_add} BulkomaticKeywords.Set DPN And Flow Count In Json Add ${orig_json_config_add} ${switch_count} ${flow_count_per_switch} - ${temp_json_config_get} BulkomaticKeywords.Set DPN And Flow Count In Json Get ${orig_json_config_get} ${switch_count} ${flow_count_after_add} - ${temp_json_config_del} BulkomaticKeywords.Set DPN And Flow Count In Json Del ${orig_json_config_del} ${switch_count} ${flow_count_per_switch} + ${temp_json_config_add}= BulkomaticKeywords.Set DPN And Flow Count In Json Add + ... ${orig_json_config_add} + ... ${switch_count} + ... ${flow_count_per_switch} + ${temp_json_config_get}= BulkomaticKeywords.Set DPN And Flow Count In Json Get + ... ${orig_json_config_get} + ... ${switch_count} + ... ${flow_count_after_add} + ${temp_json_config_del}= BulkomaticKeywords.Set DPN And Flow Count In Json Del + ... ${orig_json_config_del} + ... ${switch_count} + ... ${flow_count_per_switch} Set Suite Variable ${temp_json_config_add} Set Suite Variable ${temp_json_config_get} Set Suite Variable ${temp_json_config_del} Get Inventory Follower Before Cluster Restart [Documentation] Find a follower in the inventory config shard - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${inventory_leader} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status ${Follower_Node_1}= Get From List ${Inventory_Followers} 0 Set Suite Variable ${Follower_Node_1} 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} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_1}_IP} Set Suite Variable ${mininet_conn_id} Add Bulk Flow From Follower @@ -50,11 +65,17 @@ Add Bulk Flow From Follower Get Bulk Flows and Verify In Cluster [Documentation] Initiate get operation and check flow count across cluster nodes - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} 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} ${flow_count_after_add} ${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. @@ -71,16 +92,27 @@ Restart All Cluster Nodes Verify Data Recovery After Cluster Restart [Documentation] 1000 Flows preserved in all controller instances. - Wait Until Keyword Succeeds ${restart_timeout} 2s BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} + Wait Until Keyword Succeeds + ... ${restart_timeout} + ... 2s + ... BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} Start Mininet Again 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} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_1}_IP} Set Suite Variable ${mininet_conn_id} 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} ${flow_count_after_add} ${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. @@ -89,20 +121,28 @@ Stop Mininet Connected To Follower Node1 Delete All Flows From Follower Node1 [Documentation] 1000 Flows deleted via Follower Node1 and verify it gets applied in all instances. - BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} ${Follower_Node_1} ${operation_timeout} + BulkomaticKeywords.Delete Bulk Flow In Node + ... ${temp_json_config_del} + ... ${Follower_Node_1} + ... ${operation_timeout} Verify No Flows In Cluster [Documentation] Verify flow count is 0 across cluster nodes. - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_del} Get Inventory Leader Before Leader Restart [Documentation] Find leader in the inventory config shard - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${inventory_leader} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status Set Suite Variable ${Inventory_Leader} Start Mininet Connect To Leader [Documentation] Start mininet with connection to Leader Node. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Inventory_Leader}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Inventory_Leader}_IP} Set Suite Variable ${mininet_conn_id} Add Bulk Flow From Leader @@ -111,11 +151,17 @@ Add Bulk Flow From Leader Get Bulk Flows and Verify In Cluster Before Leader Restart [Documentation] Initiate get operation and check flow count across cluster nodes - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} 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} ${flow_count_after_add} ${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. @@ -132,21 +178,32 @@ Restart Leader from Cluster Node Verify Data Recovery After Leader Restart [Documentation] 1000 Flows preserved in all controller instances. - Wait Until Keyword Succeeds ${restart_timeout} 2s BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} + Wait Until Keyword Succeeds + ... ${restart_timeout} + ... 2s + ... BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} Check No Network Operational Information After Leader Restart [Documentation] Check device is not in operational inventory or topology in all cluster instances. - [Tags] exclude OPNFLWPLUG-1052 + [Tags] exclude opnflwplug-1052 ClusterOpenFlow.Check No OpenFlow Network Operational Information Start Mininet Again Connect To Leader [Documentation] Start mininet with connection to Leader Node. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Inventory_Leader}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Inventory_Leader}_IP} Set Suite Variable ${mininet_conn_id} 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} ${flow_count_after_add} ${operation_timeout} + MininetKeywords.Verify Aggregate Flow From Mininet Session + ... ${mininet_conn_id} + ... ${flow_count_after_add} + ... ${operation_timeout} Stop Mininet Connected To Leader Node After Leader Restart [Documentation] Stop mininet and exit connection. @@ -155,21 +212,29 @@ Stop Mininet Connected To Leader Node After Leader Restart Delete All Flows From Leader Node [Documentation] 1000 Flows deleted via Leader Node and verify it gets applied in all instances. - BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} ${Inventory_Leader} ${operation_timeout} + BulkomaticKeywords.Delete Bulk Flow In Node + ... ${temp_json_config_del} + ... ${Inventory_Leader} + ... ${operation_timeout} Verify No Flows In Cluster After Leader Restart [Documentation] Verify flow count is 0 across cluster nodes. - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_del} Get Inventory Follower Before follower Restart [Documentation] Find follower in the inventory config shard - ${inventory_leader} ${inventory_followers} ClusterOpenFlow.Get InventoryConfig Shard Status + ${inventory_leader} ${inventory_followers}= ClusterOpenFlow.Get InventoryConfig Shard Status ${Follower_Node_2}= Get From List ${Inventory_Followers} 1 Set Suite Variable ${Follower_Node_2} Start Mininet Connect To Follower Node2 [Documentation] Start mininet with connection to Follower Node2. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Follower_Node_2}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_2}_IP} Set Suite Variable ${mininet_conn_id} Add Bulk Flow From Follower Node2 @@ -178,11 +243,17 @@ Add Bulk Flow From Follower Node2 Get Bulk Flows and Verify In Cluster Before Follower Restart [Documentation] Initiate get operation and check flow count across cluster nodes. - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} 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} ${flow_count_after_add} ${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. @@ -199,21 +270,32 @@ Restart Follower Node2 Verify Data Recovery After Follower Node2 Restart [Documentation] 1000 Flows preserved in all controller instances. - Wait Until Keyword Succeeds ${restart_timeout} 2s BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} + Wait Until Keyword Succeeds + ... ${restart_timeout} + ... 2s + ... BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} Check No Network Operational Information After Follower Node2 Restart [Documentation] Check device is not in operational inventory or topology in all cluster instances. - [Tags] exclude OPNFLWPLUG-1052 + [Tags] exclude opnflwplug-1052 ClusterOpenFlow.Check No OpenFlow Network Operational Information Start Mininet Again Connect To Follower Node2 [Documentation] Start mininet with connection to follower node1. - ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller ${TOOLS_SYSTEM_IP} ${ODL_SYSTEM_${Follower_Node_2}_IP} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_2}_IP} Set Suite Variable ${mininet_conn_id} 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} ${flow_count_after_add} ${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. @@ -222,7 +304,13 @@ Stop Mininet Connected To Follower Node2 Delete All Flows From Follower Node 2 [Documentation] 1000 Flows deleted via Leader Node and verify it gets applied in all instances. - BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} ${Follower_Node_2} ${operation_timeout} + BulkomaticKeywords.Delete Bulk Flow In Node + ... ${temp_json_config_del} + ... ${Follower_Node_2} + ... ${operation_timeout} Verify No Flows In Cluster After Follower Node2 Restart - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_del} diff --git a/csit/suites/openflowplugin/Clustering_Bulkomatic/040__Cluster_Current_Term_Verification_3Node_Cluster.robot b/csit/suites/openflowplugin/Clustering_Bulkomatic/040__Cluster_Current_Term_Verification_3Node_Cluster.robot index 41a2778529..e1b29be401 100644 --- a/csit/suites/openflowplugin/Clustering_Bulkomatic/040__Cluster_Current_Term_Verification_3Node_Cluster.robot +++ b/csit/suites/openflowplugin/Clustering_Bulkomatic/040__Cluster_Current_Term_Verification_3Node_Cluster.robot @@ -1,32 +1,36 @@ *** Settings *** -Documentation Test suite for OF-18 Spurious Leader Election verification of term change while flows are added/deleted # -Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown -Suite Teardown Delete All Sessions -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Resource ../../../libraries/SetupUtils.robot -Resource ../../../libraries/BulkomaticKeywords.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Resource ../../../libraries/Utils.robot -Variables ../../../variables/Variables.py +Documentation Test suite for OF-18 Spurious Leader Election verification of term change while flows are added/deleted # + +Resource ../../../libraries/SetupUtils.robot +Resource ../../../libraries/BulkomaticKeywords.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../libraries/Utils.robot +Variables ../../../variables/Variables.py + +Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown +Suite Teardown Delete All Sessions +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + *** Variables *** -${operation_timeout} 400s -${restart_timeout} 450s -${flow_count_per_switch} 10000 +${operation_timeout} 400s +${restart_timeout} 450s +${flow_count_per_switch} 10000 ${flow_count_per_switch_ten_percent} 1000 -${switch_count} 1 -${flow_count_after_add} 10000 -${flow_count_after_del} 0 -${flow_count_after_del_ten_percent} 9000 -${orig_json_config_add} sal_add_bulk_flow_config.json -${orig_json_config_get} sal_get_bulk_flow_config.json -${orig_json_config_del} sal_del_bulk_flow_config.json -${orig_json_config_table_add} add_table.json -${shard_name} inventory -${shard_type} config -${verify_restconf} False +${switch_count} 1 +${flow_count_after_add} 10000 +${flow_count_after_del} 0 +${flow_count_after_del_ten_percent} 9000 +${orig_json_config_add} sal_add_bulk_flow_config.json +${orig_json_config_get} sal_get_bulk_flow_config.json +${orig_json_config_del} sal_del_bulk_flow_config.json +${orig_json_config_table_add} add_table.json +${shard_name} inventory +${shard_type} config +${verify_restconf} False + *** Test Cases *** Check Shard And Get Inventory @@ -46,7 +50,11 @@ Add Bulk Flow From Follower Get Bulk Flows And Verify In Cluster [Documentation] Initiate get operation and check flow count across cluster nodes - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} ${Inventory_Leader_List} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} + ... ${Inventory_Leader_List} Current Term Verification After Adding Bulk Flow [Documentation] Verifying current term for Leader Node after pushing the flows @@ -56,18 +64,35 @@ Current Term Verification After Adding Bulk Flow Current Term Comparison Before And After Addition Of Flow [Documentation] Comparison of Current Term Before and After Addition of Flows BuiltIn.Log to console Current Term after pushing the flows is ${current_term_value_after} - Run Keyword If ${current_term_value_before} == ${current_term_value_after} Log SUCCESS - ... ELSE Log FAILURE + IF ${current_term_value_before} == ${current_term_value_after} + Log SUCCESS + ELSE + Log FAILURE + END Should Be Equal ${current_term_value_before} ${current_term_value_after} Delete and Add ten percent of the flows for 5 iterations [Documentation] Performeing 5 iterations for Delete and Add ten Percentage of the flows FOR ${index} IN RANGE 1 6 Log ${index} - BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del_ten_percent} ${Follower_Node_1} ${operation_timeout} - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del_ten_percent} ${Inventory_Leader_List} - BulkomaticKeywords.Add Bulk Flow In Node ${temp_json_config_add_ten_percent} ${Follower_Node_1} ${operation_timeout} - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_add} ${Inventory_Leader_List} + BulkomaticKeywords.Delete Bulk Flow In Node + ... ${temp_json_config_del_ten_percent} + ... ${Follower_Node_1} + ... ${operation_timeout} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_del_ten_percent} + ... ${Inventory_Leader_List} + BulkomaticKeywords.Add Bulk Flow In Node + ... ${temp_json_config_add_ten_percent} + ... ${Follower_Node_1} + ... ${operation_timeout} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_add} + ... ${Inventory_Leader_List} END Current Term Verification After Continuous Deletion and Addition Of Flows for 5 iterations @@ -78,17 +103,27 @@ Current Term Verification After Continuous Deletion and Addition Of Flows for 5 Current Term Comparison Before and After Continuous Deletion and Addition Of Flows for 5 iterations [Documentation] Comparison Current Term Before and After Continuous Deletion and Addition Of Flows for 5 iterations BuiltIn.Log to console Current Term after pushing the flows is ${current_term_value_after} - Run Keyword If ${current_term_value_before} == ${current_term_value_after} Log SUCCESS - ... ELSE Log FAILURE + IF ${current_term_value_before} == ${current_term_value_after} + Log SUCCESS + ELSE + Log FAILURE + END Should Be Equal ${current_term_value_before} ${current_term_value_after} Delete All Flows From Follower Node [Documentation] ${flow_count_after_add} Flows deleted via Leader Node and verify it gets applied in all instances. - BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} ${Follower_Node_1} ${operation_timeout} + BulkomaticKeywords.Delete Bulk Flow In Node + ... ${temp_json_config_del} + ... ${Follower_Node_1} + ... ${operation_timeout} Verify No Flows In Cluster After Flow Deletion [Documentation] Verifying No FLows in Cluster after Flows Deletion - BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster ${temp_json_config_get} ${operation_timeout} ${flow_count_after_del} ${Inventory_Leader_List} + BulkomaticKeywords.Get Bulk Flow And Verify Count In Cluster + ... ${temp_json_config_get} + ... ${operation_timeout} + ... ${flow_count_after_del} + ... ${Inventory_Leader_List} PreLeader Verification [Documentation] Verifying LastIndex and LastApplied and compare both are equal @@ -100,16 +135,35 @@ PreLeader Verification ${LastApplied} Get_Last_Applied_Of_Shard_At_Member Should Be Equal ${LastIndex} ${LastApplied} + *** Keywords *** Check Shards Status And Initialize Variables [Documentation] Check Status for all shards in OpenFlow application. ClusterOpenFlow.Check OpenFlow Shards Status - ${temp_json_config_add} BulkomaticKeywords.Set DPN And Flow Count In Json Add ${orig_json_config_add} ${switch_count} ${flow_count_per_switch} - ${temp_json_config_get} BulkomaticKeywords.Set DPN And Flow Count In Json Get ${orig_json_config_get} ${switch_count} ${flow_count_after_add} - ${temp_json_config_del} BulkomaticKeywords.Set DPN And Flow Count In Json Del ${orig_json_config_del} ${switch_count} ${flow_count_per_switch} - ${temp_json_config_del_ten_percent} BulkomaticKeywords.Set DPN And Flow Count In Json Del ${orig_json_config_del} ${switch_count} ${flow_count_per_switch_ten_percent} - ${temp_json_config_add_ten_percent} BulkomaticKeywords.Set DPN And Flow Count In Json Add ${orig_json_config_add} ${switch_count} ${flow_count_per_switch_ten_percent} - ${temp_json_config_table} BulkomaticKeywords.Set DPN And Flow Count In Json Add ${orig_json_config_table_add} ${switch_count} ${flow_count_per_switch} + ${temp_json_config_add} BulkomaticKeywords.Set DPN And Flow Count In Json Add + ... ${orig_json_config_add} + ... ${switch_count} + ... ${flow_count_per_switch} + ${temp_json_config_get} BulkomaticKeywords.Set DPN And Flow Count In Json Get + ... ${orig_json_config_get} + ... ${switch_count} + ... ${flow_count_after_add} + ${temp_json_config_del} BulkomaticKeywords.Set DPN And Flow Count In Json Del + ... ${orig_json_config_del} + ... ${switch_count} + ... ${flow_count_per_switch} + ${temp_json_config_del_ten_percent} BulkomaticKeywords.Set DPN And Flow Count In Json Del + ... ${orig_json_config_del} + ... ${switch_count} + ... ${flow_count_per_switch_ten_percent} + ${temp_json_config_add_ten_percent} BulkomaticKeywords.Set DPN And Flow Count In Json Add + ... ${orig_json_config_add} + ... ${switch_count} + ... ${flow_count_per_switch_ten_percent} + ${temp_json_config_table} BulkomaticKeywords.Set DPN And Flow Count In Json Add + ... ${orig_json_config_table_add} + ... ${switch_count} + ... ${flow_count_per_switch} Set Suite Variable ${temp_json_config_add} Set Suite Variable ${temp_json_config_get} Set Suite Variable ${temp_json_config_del} @@ -120,10 +174,10 @@ Check Shards Status And Initialize Variables Get Inventory Follower [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_Node1_List}= Create List ${Follower_Node_1} + ${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} @@ -136,15 +190,30 @@ Get Inventory Follower Get_Current_Term_Of_Shard_At_Member [Documentation] Find a Raft Property Values From Shard Member - ${current_term_value} = ClusterManagement.Get_Raft_Property_From_Shard_Member CurrentTerm ${shard_name} ${shard_type} ${Inventory_Leader} ${verify_restconf} - [Return] ${current_term_value} + ${current_term_value} ClusterManagement.Get_Raft_Property_From_Shard_Member + ... CurrentTerm + ... ${shard_name} + ... ${shard_type} + ... ${Inventory_Leader} + ... ${verify_restconf} + RETURN ${current_term_value} Get_Last_Index_Of_Shard_At_Member [Documentation] Find a leader and followers in the inventory config shard - ${LastIndex} = ClusterManagement.Get_Raft_Property_From_Shard_Member LastIndex ${shard_name} ${shard_type} ${Inventory_Leader} ${verify_restconf} - [Return] ${LastIndex} + ${LastIndex} ClusterManagement.Get_Raft_Property_From_Shard_Member + ... LastIndex + ... ${shard_name} + ... ${shard_type} + ... ${Inventory_Leader} + ... ${verify_restconf} + RETURN ${LastIndex} Get_Last_Applied_Of_Shard_At_Member [Documentation] Find a leader and followers in the inventory config shard - ${LastApplied} = ClusterManagement.Get_Raft_Property_From_Shard_Member LastApplied ${shard_name} ${shard_type} ${Inventory_Leader} ${verify_restconf} - [Return] ${LastApplied} + ${LastApplied} ClusterManagement.Get_Raft_Property_From_Shard_Member + ... LastApplied + ... ${shard_name} + ... ${shard_type} + ... ${Inventory_Leader} + ... ${verify_restconf} + RETURN ${LastApplied} diff --git a/csit/suites/openflowplugin/EntityOwnership/010_Switch_Disconnect.robot b/csit/suites/openflowplugin/EntityOwnership/010_Switch_Disconnect.robot index 806569d3f6..5b6d760b2f 100644 --- a/csit/suites/openflowplugin/EntityOwnership/010_Switch_Disconnect.robot +++ b/csit/suites/openflowplugin/EntityOwnership/010_Switch_Disconnect.robot @@ -1,38 +1,41 @@ *** Settings *** -Documentation Test suite for entity ownership service and openflowplugin. Makes changes on switch side. -Suite Setup Start Suite -Suite Teardown End Suite -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Template Reconnecting Switch Scenario -Library SSHLibrary -Library RequestsLibrary -Library XML -Resource ${CURDIR}/../../../libraries/SetupUtils.robot -Resource ${CURDIR}/../../../libraries/Utils.robot -Resource ${CURDIR}/../../../libraries/FlowLib.robot -Resource ${CURDIR}/../../../libraries/OvsManager.robot -Resource ${CURDIR}/../../../libraries/ClusterManagement.robot -Resource ${CURDIR}/../../../libraries/ClusterOpenFlow.robot -Library Collections +Documentation Test suite for entity ownership service and openflowplugin. Makes changes on switch side. + +Library SSHLibrary +Library RequestsLibrary +Library XML +Resource ${CURDIR}/../../../libraries/SetupUtils.robot +Resource ${CURDIR}/../../../libraries/Utils.robot +Resource ${CURDIR}/../../../libraries/FlowLib.robot +Resource ${CURDIR}/../../../libraries/OvsManager.robot +Resource ${CURDIR}/../../../libraries/ClusterManagement.robot +Resource ${CURDIR}/../../../libraries/ClusterOpenFlow.robot +Library Collections + +Suite Setup Start Suite +Suite Teardown End Suite +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing +Test Template Reconnecting Switch Scenario + *** Variables *** -${SWITCHES} 1 -${START_CMD} sudo mn --topo linear,${SWITCHES} -@{cntls_idx_list} ${1} ${2} ${3} +${SWITCHES} 1 +${START_CMD} sudo mn --topo linear,${SWITCHES} +@{cntls_idx_list} ${1} ${2} ${3} + *** Test Cases *** Switches To Be Connected To All Nodes [Documentation] Initial check for correct connected topology. [Template] NONE BuiltIn.Wait Until Keyword Succeeds 5x 3s Check All Switches Connected To All Cluster Nodes - Reconnecting Switch s1 s1 - Switches Still Be Connected To All Nodes [Template] NONE BuiltIn.Wait Until Keyword Succeeds 5x 3s Check All Switches Connected To All Cluster Nodes + *** Keywords *** Start Suite SetupUtils.Setup_Utils_For_Setup_And_Teardown @@ -44,15 +47,20 @@ Start Suite SSHLibrary.Execute Command sudo mn -c SSHLibrary.Write ${START_CMD} SSHLibrary.Read Until mininet> - ${cntls_list} BuiltIn.Create List ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP} - ${switch_list} BuiltIn.Create List + ${cntls_list}= BuiltIn.Create List ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP} + ${switch_list}= BuiltIn.Create List FOR ${i} IN RANGE 0 ${SWITCHES} ${sid}= BuiltIn.Evaluate ${i}+1 Collections.Append To List ${switch_list} s${sid} END BuiltIn.Set Suite Variable ${active_member} 1 OvsManager.Setup Clustered Controller For Switches ${switch_list} ${cntls_list} - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Verify Switch Connections Running On Member ${SWITCHES} 1 + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Verify Switch Connections Running On Member + ... ${SWITCHES} + ... 1 End Suite RequestsLibrary.Delete All Sessions @@ -69,8 +77,8 @@ Check All Switches Connected To All Cluster Nodes END Reconnecting Switch Scenario - [Arguments] ${switch_name} [Documentation] Disconnect and connect master and slave and check switch data to be consistent + [Arguments] ${switch_name} BuiltIn.Set Test Variable ${disc_cntl} ${Empty} ${idx}= BuiltIn.Evaluate str("${switch_name}"[1:]) BuiltIn.Set Test Variable ${idx} @@ -82,12 +90,23 @@ Reconnecting Switch Scenario Disconnect Switchs Old Master [Arguments] ${switch_name} - ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} + ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} ${old_master}= BuiltIn.Set Variable ${ODL_SYSTEM_${old_owner}_IP} OvsManager.Disconnect Switch From Controller And Verify Disconnected ${switch_name} ${old_master} BuiltIn.Set Test Variable ${disc_cntl} ${old_master} - ${owner} ${successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} ${old_successors} after_stop=True - ${new_master}= BuiltIn.Wait Until Keyword Succeeds 5x 3s Verify New Master Controller Node ${switch_name} ${old_master} + ${owner} ${successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} + ... ${old_successors} + ... after_stop=True + ${new_master}= BuiltIn.Wait Until Keyword Succeeds + ... 5x + ... 3s + ... Verify New Master Controller Node + ... ${switch_name} + ... ${old_master} BuiltIn.Should Be Equal As Strings ${new_master} ${ODL_SYSTEM_${owner}_IP} BuiltIn.Set Test Variable ${old_owner} BuiltIn.Set Test Variable ${old_successors} @@ -99,19 +118,27 @@ Reconnect Switchs Old Master [Arguments] ${switch_name} OvsManager.Reconnect Switch To Controller And Verify Connected ${switch_name} ${old_master} BuiltIn.Set Test Variable ${disc_cntl} ${Empty} - ${new_owner} ${new_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} + ${new_owner} ${new_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} BuiltIn.Should Be Equal ${owner} ${new_owner} Disconnect Switchs Slave [Arguments] ${switch_name} - ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} + ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} ${old_successor}= Collections.Get From List ${old_successors} 0 ${old_slave}= BuiltIn.Set Variable ${ODL_SYSTEM_${old_successor}_IP} OvsManager.Disconnect Switch From Controller And Verify Disconnected ${switch_name} ${old_slave} BuiltIn.Set Test Variable ${disc_cntl} ${old_slave} ${tmp_candidates}= BuiltIn.Create List @{ClusterManagement__member_index_list} Collections.Remove Values From List ${tmp_candidates} ${old_successor} - ${owner} ${successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} ${tmp_candidates} after_stop=True + ${owner} ${successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} + ... ${tmp_candidates} + ... after_stop=True BuiltIn.Should Be Equal ${owner} ${old_owner} BuiltIn.Should Be Equal As Strings ${new_master} ${ODL_SYSTEM_${owner}_IP} BuiltIn.Set Test Variable ${old_owner} @@ -124,14 +151,19 @@ Reconnect Switchs Slave [Arguments] ${switch_name} OvsManager.Reconnect Switch To Controller And Verify Connected ${switch_name} ${old_slave} BuiltIn.Set Test Variable ${disc_cntl} ${Empty} - ${new_owner} ${new_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} + ${new_owner} ${new_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} BuiltIn.Should Be Equal ${old_owner} ${new_owner} Verify New Master Controller Node - [Arguments] ${switch_name} ${old_master} [Documentation] Checks if given node is different from actual master + [Arguments] ${switch_name} ${old_master} ${idx}= BuiltIn.Evaluate "${switch_name}"[1:] - ${owner} ${successors}= ClusterManagement.Get Owner And Candidates For Device openflow:${idx} openflow ${active_member} - ${new_master} BuiltIn.Set Variable ${ODL_SYSTEM_${owner}_IP} + ${owner} ${successors}= ClusterManagement.Get Owner And Candidates For Device + ... openflow:${idx} + ... openflow + ... ${active_member} + ${new_master}= BuiltIn.Set Variable ${ODL_SYSTEM_${owner}_IP} BuiltIn.Should Not Be Equal ${old_master} ${new_master} - Return From Keyword ${new_master} + RETURN ${new_master} diff --git a/csit/suites/openflowplugin/EntityOwnership/020_Cluster_Node_Failure.robot b/csit/suites/openflowplugin/EntityOwnership/020_Cluster_Node_Failure.robot index a841f29f6a..91ed6875d1 100644 --- a/csit/suites/openflowplugin/EntityOwnership/020_Cluster_Node_Failure.robot +++ b/csit/suites/openflowplugin/EntityOwnership/020_Cluster_Node_Failure.robot @@ -1,38 +1,41 @@ *** Settings *** -Documentation Test suite for entity ownership service and openflowplugin. Makes changes on controller side (restart karaf) -Suite Setup Start Suite -Suite Teardown End Suite -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Template Restarting Karaf Scenario -Library SSHLibrary -Library RequestsLibrary -Library XML -Resource ${CURDIR}/../../../libraries/SetupUtils.robot -Resource ${CURDIR}/../../../libraries/Utils.robot -Resource ${CURDIR}/../../../libraries/FlowLib.robot -Resource ${CURDIR}/../../../libraries/OvsManager.robot -Resource ${CURDIR}/../../../libraries/ClusterManagement.robot -Resource ${CURDIR}/../../../libraries/ClusterOpenFlow.robot -Library Collections +Documentation Test suite for entity ownership service and openflowplugin. Makes changes on controller side (restart karaf) + +Library SSHLibrary +Library RequestsLibrary +Library XML +Resource ${CURDIR}/../../../libraries/SetupUtils.robot +Resource ${CURDIR}/../../../libraries/Utils.robot +Resource ${CURDIR}/../../../libraries/FlowLib.robot +Resource ${CURDIR}/../../../libraries/OvsManager.robot +Resource ${CURDIR}/../../../libraries/ClusterManagement.robot +Resource ${CURDIR}/../../../libraries/ClusterOpenFlow.robot +Library Collections + +Suite Setup Start Suite +Suite Teardown End Suite +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing +Test Template Restarting Karaf Scenario + *** Variables *** -${SWITCHES} 1 -${START_CMD} sudo mn --topo linear,${SWITCHES} -${KARAF_HOME} ${WORKSPACE}${/}${BUNDLEFOLDER} +${SWITCHES} 1 +${START_CMD} sudo mn --topo linear,${SWITCHES} +${KARAF_HOME} ${WORKSPACE}${/}${BUNDLEFOLDER} + *** Test Cases *** Switches To Be Connected To All Nodes [Documentation] Initial check for correct connected topology. [Template] NONE BuiltIn.Wait Until Keyword Succeeds 5x 3s Check All Switches Connected To All Cluster Nodes - Restarting Owner Of Switch s1 s1 - Switches Still Be Connected To All Nodes [Template] NONE BuiltIn.Wait Until Keyword Succeeds 5x 3s Check All Switches Connected To All Cluster Nodes + *** Keywords *** Start Suite SetupUtils.Setup_Utils_For_Setup_And_Teardown @@ -44,15 +47,20 @@ Start Suite SSHLibrary.Execute Command sudo mn -c SSHLibrary.Write ${START_CMD} SSHLibrary.Read Until mininet> - ${cntls_list} BuiltIn.Create List ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP} - ${switch_list} BuiltIn.Create List + ${cntls_list}= BuiltIn.Create List ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP} + ${switch_list}= BuiltIn.Create List FOR ${i} IN RANGE 0 ${SWITCHES} ${sid}= BuiltIn.Evaluate ${i}+1 Collections.Append To List ${switch_list} s${sid} END BuiltIn.Set Suite Variable ${active_member} 1 OvsManager.Setup Clustered Controller For Switches ${switch_list} ${cntls_list} - BuiltIn.Wait Until Keyword Succeeds 10s 1s ClusterOpenFlow.Verify Switch Connections Running On Member ${SWITCHES} 1 + BuiltIn.Wait Until Keyword Succeeds + ... 10s + ... 1s + ... ClusterOpenFlow.Verify Switch Connections Running On Member + ... ${SWITCHES} + ... 1 End Suite RequestsLibrary.Delete All Sessions @@ -69,8 +77,8 @@ Check All Switches Connected To All Cluster Nodes END Restarting Karaf Scenario - [Arguments] ${switch_name} [Documentation] Disconnect and connect owner and successor and check switch data to be consistent + [Arguments] ${switch_name} ${idx}= BuiltIn.Evaluate str("${switch_name}"[1:]) BuiltIn.Set Test Variable ${idx} Kill Switchs Old Owner ${switch_name} @@ -82,15 +90,26 @@ Restarting Karaf Scenario Kill Switchs Old Owner [Arguments] ${switch_name} BuiltIn.Set Test Variable ${stopped_karaf} ${Empty} - ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} + ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} ${old_master}= BuiltIn.Set Variable ${ODL_SYSTEM_${old_owner}_IP} ${active_member}= Collections.Get From List ${old_successors} 0 BuiltIn.Set Suite Variable ${active_member} Stop Controller Node And Verify ${old_owner} BuiltIn.Set Test Variable ${stopped_karaf} ${old_owner} ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event ${old_successors} - ${new_master}= BuiltIn.Wait Until Keyword Succeeds 5x 3s Verify New Master Controller Node ${switch_name} ${old_master} - ${owner} ${successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} ${old_successors} after_stop=True + ${new_master}= BuiltIn.Wait Until Keyword Succeeds + ... 5x + ... 3s + ... Verify New Master Controller Node + ... ${switch_name} + ... ${old_master} + ${owner} ${successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} + ... ${old_successors} + ... after_stop=True BuiltIn.Should Be Equal As Strings ${new_master} ${ODL_SYSTEM_${owner}_IP} BuiltIn.Set Suite Variable ${active_member} ${owner} BuiltIn.Set Test Variable ${old_owner} @@ -104,12 +123,16 @@ Restart Switchs Old Owner Start Controller Node And Verify ${old_owner} BuiltIn.Set Test Variable ${stopped_karaf} ${Empty} ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event - ${new_owner} ${new_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} + ${new_owner} ${new_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} BuiltIn.Should Be Equal ${owner} ${new_owner} Kill Switchs Successor [Arguments] ${switch_name} - ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} + ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} ${old_successor}= Collections.Get From List ${old_successors} 0 ${old_slave}= BuiltIn.Set Variable ${ODL_SYSTEM_${old_successor}_IP} Stop Controller Node And Verify ${old_successor} @@ -117,7 +140,11 @@ Kill Switchs Successor ${tmp_candidates}= BuiltIn.Create List @{ClusterManagement__member_index_list} Collections.Remove Values From List ${tmp_candidates} ${old_successor} ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event ${tmp_candidates} - ${owner} ${successor}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} ${tmp_candidates} after_stop=True + ${owner} ${successor}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} + ... ${tmp_candidates} + ... after_stop=True BuiltIn.Should Be Equal ${owner} ${old_owner} BuiltIn.Should Be Equal As Strings ${new_master} ${ODL_SYSTEM_${owner}_IP} BuiltIn.Set Test Variable ${old_owner} @@ -131,26 +158,31 @@ Restart Switchs Successor Start Controller Node And Verify ${old_successor} BuiltIn.Set Test Variable ${stopped_karaf} ${Empty} ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event - ${new_owner} ${new_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} + ${new_owner} ${new_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} BuiltIn.Should Be Equal ${old_owner} ${new_owner} Verify New Master Controller Node - [Arguments] ${switch_name} ${old_master} [Documentation] Checks if given node is different from actual master + [Arguments] ${switch_name} ${old_master} ${idx}= BuiltIn.Evaluate "${switch_name}"[1:] - ${owner} ${successors}= ClusterManagement.Get Owner And Candidates For Device openflow:${idx} openflow ${active_member} - ${new_master} BuiltIn.Set Variable ${ODL_SYSTEM_${owner}_IP} + ${owner} ${successors}= ClusterManagement.Get Owner And Candidates For Device + ... openflow:${idx} + ... openflow + ... ${active_member} + ${new_master}= BuiltIn.Set Variable ${ODL_SYSTEM_${owner}_IP} BuiltIn.Should Not Be Equal ${old_master} ${new_master} - Return From Keyword ${new_master} + RETURN ${new_master} Stop Controller Node And Verify - [Arguments] ${node} [Documentation] Stops the given node + [Arguments] ${node} ClusterManagement.Stop Single Member ${node} [Teardown] SSHLibrary.Switch Connection ${mininet_conn_id} Start Controller Node And Verify - [Arguments] ${node} [Documentation] Starts the given node + [Arguments] ${node} ClusterManagement.Start Single Member ${node} [Teardown] SSHLibrary.Switch Connection ${mininet_conn_id} diff --git a/csit/suites/openflowplugin/EntityOwnership/030_Cluster_Sync_Problems.robot b/csit/suites/openflowplugin/EntityOwnership/030_Cluster_Sync_Problems.robot index 6247cfcb26..2bb2da1ee5 100644 --- a/csit/suites/openflowplugin/EntityOwnership/030_Cluster_Sync_Problems.robot +++ b/csit/suites/openflowplugin/EntityOwnership/030_Cluster_Sync_Problems.robot @@ -1,27 +1,31 @@ *** Settings *** -Documentation Test suite for entity ownership service and openflowplugin. Makes changes on controller side (isolating cluster node) -Suite Setup Start Suite -Suite Teardown End Suite -Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing -Test Template Isolating Node Scenario -Library SSHLibrary -Library RequestsLibrary -Library XML -Library Collections -Library ${CURDIR}/../../../libraries/ClusterEntities.py -Resource ${CURDIR}/../../../libraries/SetupUtils.robot -Resource ${CURDIR}/../../../libraries/Utils.robot -Resource ${CURDIR}/../../../libraries/FlowLib.robot -Resource ${CURDIR}/../../../libraries/OvsManager.robot -Resource ${CURDIR}/../../../libraries/ClusterManagement.robot -Resource ${CURDIR}/../../../libraries/ClusterOpenFlow.robot -Resource ${CURDIR}/../../../variables/openflowplugin/Variables.robot +Documentation Test suite for entity ownership service and openflowplugin. Makes changes on controller side (isolating cluster node) + +Library SSHLibrary +Library RequestsLibrary +Library XML +Library Collections +Library ${CURDIR}/../../../libraries/ClusterEntities.py +Resource ${CURDIR}/../../../libraries/SetupUtils.robot +Resource ${CURDIR}/../../../libraries/Utils.robot +Resource ${CURDIR}/../../../libraries/FlowLib.robot +Resource ${CURDIR}/../../../libraries/OvsManager.robot +Resource ${CURDIR}/../../../libraries/ClusterManagement.robot +Resource ${CURDIR}/../../../libraries/ClusterOpenFlow.robot +Resource ${CURDIR}/../../../variables/openflowplugin/Variables.robot + +Suite Setup Start Suite +Suite Teardown End Suite +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing +Test Template Isolating Node Scenario + *** Variables *** -${SWITCHES} 1 -${START_CMD} sudo mn --topo linear,${SWITCHES} -@{CONTROLLER_NODES} ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP} -@{cntls_idx_list} ${1} ${2} ${3} +${SWITCHES} 1 +${START_CMD} sudo mn --topo linear,${SWITCHES} +@{CONTROLLER_NODES} ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP} +@{cntls_idx_list} ${1} ${2} ${3} + *** Test Cases *** Start Mininet To All Nodes @@ -34,36 +38,38 @@ Start Mininet To All Nodes SSHLibrary.Execute Command sudo mn -c SSHLibrary.Write ${START_CMD} SSHLibrary.Read Until mininet> - ${cntls_list} BuiltIn.Create List ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP} - ${switch_list} BuiltIn.Create List + ${cntls_list}= BuiltIn.Create List ${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP} + ${switch_list}= BuiltIn.Create List FOR ${i} IN RANGE 0 ${SWITCHES} ${sid}= BuiltIn.Evaluate ${i}+1 Collections.Append To List ${switch_list} s${sid} END BuiltIn.Set Suite Variable ${active_member} 1 OvsManager.Setup Clustered Controller For Switches ${switch_list} ${cntls_list} - BuiltIn.Wait Until Keyword Succeeds 15s 1s ClusterOpenFlow.Verify Switch Connections Running On Member ${SWITCHES} 1 - + BuiltIn.Wait Until Keyword Succeeds + ... 15s + ... 1s + ... ClusterOpenFlow.Verify Switch Connections Running On Member + ... ${SWITCHES} + ... 1 Switches To Be Connected To All Nodes [Documentation] Initial check for correct connected topology. [Template] NONE BuiltIn.Wait Until Keyword Succeeds 15x 1s Check All Switches Connected To All Cluster Nodes - Isolating Owner Of Switch s1 s1 [Teardown] Report_Failure_Due_To_Bug 6177 - Switches Still Be Connected To All Nodes [Template] NONE BuiltIn.Wait Until Keyword Succeeds 15x 1s Check All Switches Connected To All Cluster Nodes [Teardown] Report_Failure_Due_To_Bug 6177 - Stop Mininet And Verify No Owners [Template] NONE Utils.Stop Mininet BuiltIn.Wait Until Keyword Succeeds 15x 1s Check No Device Owners In Controller [Teardown] Report_Failure_Due_To_Bug 6177 + *** Keywords *** Start Suite SetupUtils.Setup_Utils_For_Setup_And_Teardown @@ -83,8 +89,8 @@ Check All Switches Connected To All Cluster Nodes END Isolating Node Scenario - [Arguments] ${switch_name} [Documentation] Disconnect and connect owner and successor and check switch data to be consistent + [Arguments] ${switch_name} BuiltIn.Set Test Variable ${isol_node} ${Empty} ${idx}= BuiltIn.Evaluate str("${switch_name}"[1:]) BuiltIn.Set Test Variable ${idx} @@ -96,15 +102,25 @@ Isolating Node Scenario Isolate Switchs Old Owner [Arguments] ${switch_name} - ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} + ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} ${old_master}= BuiltIn.Set Variable ${ODL_SYSTEM_${old_owner}_IP} ${active_member}= Collections.Get From List ${old_successors} 0 BuiltIn.Set Suite Variable ${active_member} Isolate Controller From The Cluster ${old_owner} BuiltIn.Set Test Variable ${isol_node} ${old_owner} ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event ${old_successors} - ${new_master}= BuiltIn.Wait Until Keyword Succeeds 10x 3s Verify New Master Controller Node ${switch_name} ${old_master} - ${owner} ${successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} ${old_successors} + ${new_master}= BuiltIn.Wait Until Keyword Succeeds + ... 10x + ... 3s + ... Verify New Master Controller Node + ... ${switch_name} + ... ${old_master} + ${owner} ${successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} + ... ${old_successors} BuiltIn.Should Be Equal As Strings ${new_master} ${ODL_SYSTEM_${owner}_IP} BuiltIn.Set Suite Variable ${active_member} ${owner} BuiltIn.Set Test Variable ${old_owner} @@ -118,12 +134,18 @@ Rejoin Switchs Old Owner Rejoin Controller To The Cluster ${old_owner} BuiltIn.Set Test Variable ${isol_node} ${Empty} ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event - ${new_owner} ${new_successors}= BuiltIn.Wait Until Keyword Succeeds 6x 10s ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} + ${new_owner} ${new_successors}= BuiltIn.Wait Until Keyword Succeeds + ... 6x + ... 10s + ... ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} ... ${active_member} Isolate Switchs Successor [Arguments] ${switch_name} - ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} + ${old_owner} ${old_successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} ${old_successor}= Collections.Get From List ${old_successors} 0 ${old_slave}= BuiltIn.Set Variable ${ODL_SYSTEM_${old_successor}_IP} Isolate Controller From The Cluster ${old_successor} @@ -131,7 +153,10 @@ Isolate Switchs Successor ${tmp_candidates}= BuiltIn.Create List @{ClusterManagement__member_index_list} Collections.Remove Values From List ${tmp_candidates} ${old_successor} ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event ${tmp_candidates} - ${owner} ${successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} ${active_member} ${tmp_candidates} + ${owner} ${successors}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} + ... ${active_member} + ... ${tmp_candidates} BuiltIn.Should Be Equal ${owner} ${old_owner} BuiltIn.Set Test Variable ${old_owner} BuiltIn.Set Test Variable ${old_successors} @@ -144,7 +169,11 @@ Rejoin Switchs Successor Rejoin Controller To The Cluster ${old_successor} BuiltIn.Set Test Variable ${isol_node} ${Empty} ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event - ${new_owner} ${new_successors}= BuiltIn.Wait Until Keyword Succeeds 6x 10s ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:${idx} + ${new_owner} ${new_successors}= BuiltIn.Wait Until Keyword Succeeds + ... 6x + ... 10s + ... ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device + ... openflow:${idx} ... ${active_member} Rejoin Controller To The Cluster @@ -159,20 +188,23 @@ Isolate Controller From The Cluster Check No Device Owners In Controller [Documentation] Check there is no owners in controllers - ${ip} = Resolve_IP_Address_For_Member member_index=${active_member} - ${url} = BuiltIn.Catenate SEPARATOR= http:// ${ip} :8181 ${RFC8040_RESTCONF_ROOT} - ${data} = ClusterEntities.Get_Entities ${url} - ${data} = BuiltIn.Convert_To_String ${data} + ${ip}= Resolve_IP_Address_For_Member member_index=${active_member} + ${url}= BuiltIn.Catenate SEPARATOR= http:// ${ip} :8181 ${RFC8040_RESTCONF_ROOT} + ${data}= ClusterEntities.Get_Entities ${url} + ${data}= BuiltIn.Convert_To_String ${data} #ofp-topology-manager entity is introduced in the OPNFLWPLUG-1022 bug fix, and this entity will #always be present in the EOS output. All 3 controller nodes will be candidate, so EOS output will #contain 6 members (members show 2 times). BuiltIn.Should Contain X Times ${data} member 6 Verify New Master Controller Node - [Arguments] ${switch_name} ${old_master} [Documentation] Checks if given node is different from actual master + [Arguments] ${switch_name} ${old_master} ${idx}= BuiltIn.Evaluate "${switch_name}"[1:] - ${owner} ${successors}= ClusterManagement.Get Owner And Candidates For Device openflow:${idx} openflow ${active_member} - ${new_master} BuiltIn.Set Variable ${ODL_SYSTEM_${owner}_IP} + ${owner} ${successors}= ClusterManagement.Get Owner And Candidates For Device + ... openflow:${idx} + ... openflow + ... ${active_member} + ${new_master}= BuiltIn.Set Variable ${ODL_SYSTEM_${owner}_IP} BuiltIn.Should Not Be Equal ${old_master} ${new_master} - Return From Keyword ${new_master} + RETURN ${new_master} diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/010_Lithium_Rps_Calls_Ovs.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/010_Lithium_Rps_Calls_Ovs.robot index fee03a0ba0..d95b6350f7 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/010_Lithium_Rps_Calls_Ovs.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/010_Lithium_Rps_Calls_Ovs.robot @@ -1,31 +1,44 @@ *** Settings *** -Documentation Test suite to test various rcp calls -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library XML -Library RequestsLibrary -Library SSHLibrary -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/FlowLib.robot -Variables ../../../variables/ofplugin/RpcVariables.py +Documentation Test suite to test various rcp calls + +Library XML +Library RequestsLibrary +Library SSHLibrary +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/FlowLib.robot +Variables ../../../variables/ofplugin/RpcVariables.py + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Variables *** -${send_barrier_url} /rests/operations/flow-capable-transaction:send-barrier -${send_echo_url} /rests/operations/sal-echo:send-echo +${send_barrier_url} /rests/operations/flow-capable-transaction:send-barrier +${send_echo_url} /rests/operations/sal-echo:send-echo + *** Test Cases *** Sending Barrier [Documentation] Test to send barrier - ${resp}= RequestsLibrary.Post Request session ${send_barrier_url} data=${RPC_SEND_BARRIER_DATA} headers=${HEADERS_XML} + ${resp}= RequestsLibrary.Post Request + ... session + ... ${send_barrier_url} + ... data=${RPC_SEND_BARRIER_DATA} + ... headers=${HEADERS_XML} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Sending Echo [Documentation] Test to send echo - ${resp}= RequestsLibrary.Post Request session ${send_echo_url} data=${RPC_SEND_ECHO_DATA} headers=${HEADERS_XML} + ${resp}= RequestsLibrary.Post Request + ... session + ... ${send_echo_url} + ... data=${RPC_SEND_ECHO_DATA} + ... headers=${HEADERS_XML} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 + *** Keywords *** Initialization Phase [Documentation] Starts mininet and verify if topology is in operational ds diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/020_Lithium_Rps_Calls_Cpqd.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/020_Lithium_Rps_Calls_Cpqd.robot index e5df8165fc..11ae3dd927 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/020_Lithium_Rps_Calls_Cpqd.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/020_Lithium_Rps_Calls_Cpqd.robot @@ -1,25 +1,34 @@ *** Settings *** -Documentation Test suite to test various rcp calls -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library XML -Library RequestsLibrary -Library SSHLibrary -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/FlowLib.robot -Variables ../../../variables/ofplugin/RpcVariables.py +Documentation Test suite to test various rcp calls + +Library XML +Library RequestsLibrary +Library SSHLibrary +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/FlowLib.robot +Variables ../../../variables/ofplugin/RpcVariables.py + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Variables *** ${send_update_table_url} /rests/operations/sal-table:update-table -${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,1 --switch user +${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,1 --switch user + *** Test Cases *** Sending Update Table [Documentation] Test to send table update request - ${resp}= RequestsLibrary.Post Request session ${send_update_table_url} data=${RPC_SEND_UPDATE_TABLE_DATA} headers=${HEADERS_XML} + ${resp}= RequestsLibrary.Post Request + ... session + ... ${send_update_table_url} + ... data=${RPC_SEND_UPDATE_TABLE_DATA} + ... headers=${HEADERS_XML} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 + *** Keywords *** Initialization Phase [Documentation] Starts mininet and verify if topology is in operational ds diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/030_Flow_Update_Test.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/030_Flow_Update_Test.robot index b6836def75..ae400fa848 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/030_Flow_Update_Test.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/030_Flow_Update_Test.robot @@ -1,23 +1,27 @@ *** Settings *** -Documentation Test suite with independent flow tests -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library String -Library Collections -Library XML -Library RequestsLibrary -Library SSHLibrary -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/FlowLib.robot -Resource ../../../variables/openflowplugin/Variables.robot -Variables ../../../variables/Variables.py -Library ../../../libraries/XmlComparator.py +Documentation Test suite with independent flow tests + +Library String +Library Collections +Library XML +Library RequestsLibrary +Library SSHLibrary +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/FlowLib.robot +Resource ../../../variables/openflowplugin/Variables.robot +Variables ../../../variables/Variables.py +Library ../../../libraries/XmlComparator.py + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Variables *** -${XmlsDir} ${CURDIR}/../../../../csit/variables/xmls -${flowfile} f2.xml -${switch_idx} 1 -${switch_name} s${switch_idx} +${XmlsDir} ${CURDIR}/../../../../csit/variables/xmls +${flowfile} f2.xml +${switch_idx} 1 +${switch_name} s${switch_idx} + *** Test Cases *** Update With Delete And Add @@ -34,6 +38,7 @@ Update With Delete And Add Wait Until Keyword Succeeds 30s 1s Check Operational Flow ${True} ${upddata} [Teardown] Delete Flow + *** Keywords *** Log Switch Flows [Documentation] Logs the switch content @@ -54,7 +59,10 @@ Final Phase Delete Flow [Documentation] Removes used flow - ${resp}= RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} + ${resp}= RequestsLibrary.Delete Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} Log ${resp.content} - ${msg}= Set Variable Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. + ${msg}= Set Variable + ... Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/010_SM_add_upd_del_flows.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/010_SM_add_upd_del_flows.robot index 227621ee28..4267534411 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/010_SM_add_upd_del_flows.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/010_SM_add_upd_del_flows.robot @@ -1,33 +1,37 @@ *** Settings *** -Documentation Test suite for Stats Manager flows collection -Suite Setup Initialization Phase -Suite Teardown Delete All Sessions -Test Template Check Datastore Presence -Library Collections -Library OperatingSystem -Library RequestsLibrary -Library SSHLibrary -Library XML -Library ${CURDIR}/../../../../libraries/Common.py -Library ${CURDIR}/../../../../libraries/XmlComparator.py -Resource ${CURDIR}/../../../../libraries/CompareStream.robot -Resource ${CURDIR}/../../../../libraries/FlowLib.robot -Resource ${CURDIR}/../../../../variables/Variables.robot +Documentation Test suite for Stats Manager flows collection + +Library Collections +Library OperatingSystem +Library RequestsLibrary +Library SSHLibrary +Library XML +Library ${CURDIR}/../../../../libraries/Common.py +Library ${CURDIR}/../../../../libraries/XmlComparator.py +Resource ${CURDIR}/../../../../libraries/CompareStream.robot +Resource ${CURDIR}/../../../../libraries/FlowLib.robot +Resource ${CURDIR}/../../../../variables/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Delete All Sessions +Test Template Check Datastore Presence + *** Variables *** -${flow_update_time} 3s -${XmlsDir} ${CURDIR}/../../../../variables/xmls -${switch_idx} 1 -${switch_name} s${switch_idx} -@{flowlist0} f1.xml f2.xml f3.xml f4.xml f5.xml f6.xml f7.xml -... f8.xml f9.xml f10.xml f11.xml f14.xml f15.xml f16.xml -... f17.xml f18.xml f19.xml f20.xml f21.xml f22.xml f23.xml -... f24.xml f25.xml f31.xml f36.xml f38.xml f43.xml f45.xml -... f101.xml f102.xml f103.xml f104.xml f105.xml f106.xml f107.xml -... f108.xml f109.xml f110.xml f113.xml f156.xml f201.xml f202.xml -... f203.xml f204.xml f205.xml f206.xml f209.xml f214.xml f218.xml -... f219.xml f220.xml f221.xml f222.xml f223.xml f224.xml f225.xml -... f550.xml +${flow_update_time} 3s +${XmlsDir} ${CURDIR}/../../../../variables/xmls +${switch_idx} 1 +${switch_name} s${switch_idx} +@{flowlist0} f1.xml f2.xml f3.xml f4.xml f5.xml f6.xml f7.xml +... f8.xml f9.xml f10.xml f11.xml f14.xml f15.xml f16.xml +... f17.xml f18.xml f19.xml f20.xml f21.xml f22.xml f23.xml +... f24.xml f25.xml f31.xml f36.xml f38.xml f43.xml f45.xml +... f101.xml f102.xml f103.xml f104.xml f105.xml f106.xml f107.xml +... f108.xml f109.xml f110.xml f113.xml f156.xml f201.xml f202.xml +... f203.xml f204.xml f205.xml f206.xml f209.xml f214.xml f218.xml +... f219.xml f220.xml f221.xml f222.xml f223.xml f224.xml f225.xml +... f550.xml + *** Test Cases *** Test Add Flows Group 0 @@ -44,363 +48,252 @@ Test Add Flows Group 0 # Show switch content (for debug purposes if needed) Write dpctl dump-flows -O OpenFlow13 Read Until mininet> - Test Is Flow 1 Added f1.xml ${True} ${True} ${False} ${True} - Test Is Flow 2 Added f2.xml ${True} ${True} ${False} ${True} - Test Is Flow 3 Added f3.xml ${True} ${True} ${False} ${True} - Test Is Flow 4 Added f4.xml ${True} ${True} ${False} ${True} - Test Is Flow 5 Added f5.xml ${True} ${True} ${False} ${True} - Test Is Flow 6 Added f6.xml ${True} ${True} ${False} ${True} - Test Is Flow 7 Added f7.xml ${True} ${True} ${False} ${True} - Test Is Flow 8 Added f8.xml ${True} ${True} ${False} ${True} - Test Is Flow 9 Added f9.xml ${True} ${True} ${False} ${True} - Test Is Flow 10 Added f10.xml ${True} ${True} ${False} ${True} - Test Is Flow 11 Added f11.xml ${True} ${True} ${False} ${True} - Test Is Flow 14 Added f14.xml ${True} ${True} ${False} ${True} - Test Is Flow 15 Added f15.xml ${True} ${True} ${False} ${True} - Test Is Flow 16 Added f16.xml ${True} ${True} ${False} ${True} - Test Is Flow 17 Added f17.xml ${True} ${True} ${False} ${True} - Test Is Flow 18 Added f18.xml ${True} ${True} ${False} ${True} - Test Is Flow 19 Added f19.xml ${True} ${True} ${False} ${True} - Test Is Flow 20 Added f20.xml ${True} ${True} ${False} ${True} - Test Is Flow 21 Added f21.xml ${True} ${True} ${False} ${True} - Test Is Flow 22 Added f22.xml ${True} ${True} ${False} ${True} - Test Is Flow 23 Added f23.xml ${True} ${True} ${False} ${True} - Test Is Flow 24 Added f24.xml ${True} ${True} ${False} ${True} - Test Is Flow 25 Added f25.xml ${True} ${True} ${False} ${True} - Test Is Flow 31 Added f31.xml ${True} ${True} ${False} ${True} - Test Is Flow 36 Added f36.xml ${True} ${True} ${False} ${True} - Test Is Flow 38 Added f38.xml ${True} ${True} ${False} ${True} - Test Is Flow 43 Added f43.xml ${True} ${True} ${False} ${True} - Test Is Flow 45 Added f45.xml ${True} ${True} ${False} ${True} - Test Is Flow 101 Added f101.xml ${True} ${True} ${False} ${True} - Test Is Flow 102 Added f102.xml ${True} ${True} ${False} ${True} - Test Is Flow 103 Added f103.xml ${True} ${True} ${False} ${True} - Test Is Flow 104 Added f104.xml ${True} ${True} ${False} ${True} - Test Is Flow 105 Added f105.xml ${True} ${True} ${False} ${True} - Test Is Flow 106 Added f106.xml ${True} ${True} ${False} ${True} - Test Is Flow 107 Added f107.xml ${True} ${True} ${False} ${True} - Test Is Flow 108 Added f108.xml ${True} ${True} ${False} ${True} - Test Is Flow 109 Added f109.xml ${True} ${True} ${False} ${True} - Test Is Flow 110 Added f110.xml ${True} ${True} ${False} ${True} - Test Is Flow 113 Added f113.xml ${True} ${True} ${False} ${True} - Test Is Flow 156 Added f156.xml ${True} ${True} ${False} ${True} - Test Is Flow 201 Added f201.xml ${True} ${True} ${False} ${True} - Test Is Flow 202 Added f202.xml ${True} ${True} ${False} ${True} - Test Is Flow 203 Added f203.xml ${True} ${True} ${False} ${True} - Test Is Flow 204 Added f204.xml ${True} ${True} ${False} ${True} - Test Is Flow 205 Added f205.xml ${True} ${True} ${False} ${True} - Test Is Flow 206 Added f206.xml ${True} ${True} ${False} ${True} - Test Is Flow 209 Added f209.xml ${True} ${True} ${False} ${True} - Test Is Flow 214 Added f214.xml ${True} ${True} ${False} ${True} - Test Is Flow 218 Added f218.xml ${True} ${True} ${False} ${True} - Test Is Flow 219 Added f219.xml ${True} ${True} ${False} ${True} - Test Is Flow 220 Added f220.xml ${True} ${True} ${False} ${True} - Test Is Flow 221 Added f221.xml ${True} ${True} ${False} ${True} - Test Is Flow 222 Added f222.xml ${True} ${True} ${False} ${True} - Test Is Flow 223 Added f223.xml ${True} ${True} ${False} ${True} - Test Is Flow 224 Added f224.xml ${True} ${True} ${False} ${True} - Test Is Flow 225 Added f225.xml ${True} ${True} ${False} ${True} - Test Is Flow 550 Added f550.xml ${True} ${True} ${False} ${True} - Test Update Flows Group 0 [Documentation] Update all flows and waits for SM to collect data [Template] NONE FOR ${flowfile} IN @{flowlist0} Log ${flowfile} Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile} - Run Keyword And Continue On Failure Update Flow Via Restconf ${switch_idx} ${table_id} ${flow_id} ${upddata} + Run Keyword And Continue On Failure + ... Update Flow Via Restconf + ... ${switch_idx} + ... ${table_id} + ... ${flow_id} + ... ${upddata} # Lets wait for ofp to collect stats END Sleep ${flow_update_time} # Show switch content (for debug purposes if needed) Write dpctl dump-flows -O OpenFlow13 Read Until mininet> - Test Is Flow 1 Updated f1.xml ${True} ${True} ${True} ${True} - Test Is Flow 2 Updated f2.xml ${True} ${True} ${True} ${True} - Test Is Flow 3 Updated f3.xml ${True} ${True} ${True} ${True} - Test Is Flow 4 Updated f4.xml ${True} ${True} ${True} ${True} - Test Is Flow 5 Updated f5.xml ${True} ${True} ${True} ${True} - Test Is Flow 6 Updated f6.xml ${True} ${True} ${True} ${True} - Test Is Flow 7 Updated f7.xml ${True} ${True} ${True} ${True} - Test Is Flow 8 Updated f8.xml ${True} ${True} ${True} ${True} - Test Is Flow 9 Updated f9.xml ${True} ${True} ${True} ${True} - Test Is Flow 10 Updated f10.xml ${True} ${True} ${True} ${True} - Test Is Flow 11 Updated f11.xml ${True} ${True} ${True} ${True} - Test Is Flow 14 Updated f14.xml ${True} ${True} ${True} ${True} - Test Is Flow 15 Updated f15.xml ${True} ${True} ${True} ${True} - Test Is Flow 16 Updated f16.xml ${True} ${True} ${True} ${True} - Test Is Flow 17 Updated f17.xml ${True} ${True} ${True} ${True} - Test Is Flow 18 Updated f18.xml ${True} ${True} ${True} ${True} - Test Is Flow 19 Updated f19.xml ${True} ${True} ${True} ${True} - Test Is Flow 20 Updated f20.xml ${True} ${True} ${True} ${True} - Test Is Flow 21 Updated f21.xml ${True} ${True} ${True} ${True} - Test Is Flow 22 Updated f22.xml ${True} ${True} ${True} ${True} - Test Is Flow 23 Updated f23.xml ${True} ${True} ${True} ${True} - Test Is Flow 24 Updated f24.xml ${True} ${True} ${True} ${True} - Test Is Flow 25 Updated f25.xml ${True} ${True} ${True} ${True} - Test Is Flow 31 Updated f31.xml ${True} ${True} ${True} ${True} - Test Is Flow 36 Updated f36.xml ${True} ${True} ${True} ${True} - Test Is Flow 38 Updated f38.xml ${True} ${True} ${True} ${True} - Test Is Flow 43 Updated f43.xml ${True} ${True} ${True} ${True} - Test Is Flow 45 Updated f45.xml ${True} ${True} ${True} ${True} - Test Is Flow 101 Updated f101.xml ${True} ${True} ${True} ${True} - Test Is Flow 102 Updated f102.xml ${True} ${True} ${True} ${True} - Test Is Flow 103 Updated f103.xml ${True} ${True} ${True} ${True} - Test Is Flow 104 Updated f104.xml ${True} ${True} ${True} ${True} - Test Is Flow 105 Updated f105.xml ${True} ${True} ${True} ${True} - Test Is Flow 106 Updated f106.xml ${True} ${True} ${True} ${True} - Test Is Flow 107 Updated f107.xml ${True} ${True} ${True} ${True} - Test Is Flow 108 Updated f108.xml ${True} ${True} ${True} ${True} - Test Is Flow 109 Updated f109.xml ${True} ${True} ${True} ${True} - Test Is Flow 110 Updated f110.xml ${True} ${True} ${True} ${True} - Test Is Flow 113 Updated f113.xml ${True} ${True} ${True} ${True} - Test Is Flow 156 Updated f156.xml ${True} ${True} ${True} ${True} - Test Is Flow 201 Updated f201.xml ${True} ${True} ${True} ${True} - Test Is Flow 202 Updated f202.xml ${True} ${True} ${True} ${True} - Test Is Flow 203 Updated f203.xml ${True} ${True} ${True} ${True} - Test Is Flow 204 Updated f204.xml ${True} ${True} ${True} ${True} - Test Is Flow 205 Updated f205.xml ${True} ${True} ${True} ${True} - Test Is Flow 206 Updated f206.xml ${True} ${True} ${True} ${True} - Test Is Flow 209 Updated f209.xml ${True} ${True} ${True} ${True} - Test Is Flow 214 Updated f214.xml ${True} ${True} ${True} ${True} - Test Is Flow 218 Updated f218.xml ${True} ${True} ${True} ${True} - Test Is Flow 219 Updated f219.xml ${True} ${True} ${True} ${True} - Test Is Flow 220 Updated f220.xml ${True} ${True} ${True} ${True} - Test Is Flow 221 Updated f221.xml ${True} ${True} ${True} ${True} - Test Is Flow 222 Updated f222.xml ${True} ${True} ${True} ${True} - Test Is Flow 223 Updated f223.xml ${True} ${True} ${True} ${True} - Test Is Flow 224 Updated f224.xml ${True} ${True} ${True} ${True} - Test Is Flow 225 Updated f225.xml ${True} ${True} ${True} ${True} - Test Is Flow 550 Updated f550.xml ${True} ${True} ${True} ${True} - Test Delete Flows Group 0 [Documentation] Delete all flows and waits for SM to collect data [Template] NONE @@ -414,178 +307,122 @@ Test Delete Flows Group 0 # Show switch content (for debug purposes if needed) Write dpctl dump-flows -O OpenFlow13 Read Until mininet> - Test Is Flow 1 Deleted f1.xml ${False} ${False} ${True} - Test Is Flow 2 Deleted f2.xml ${False} ${False} ${True} - Test Is Flow 3 Deleted f3.xml ${False} ${False} ${True} - Test Is Flow 4 Deleted f4.xml ${False} ${False} ${True} - Test Is Flow 5 Deleted f5.xml ${False} ${False} ${True} - Test Is Flow 6 Deleted f6.xml ${False} ${False} ${True} - Test Is Flow 7 Deleted f7.xml ${False} ${False} ${True} - Test Is Flow 8 Deleted f8.xml ${False} ${False} ${True} - Test Is Flow 9 Deleted f9.xml ${False} ${False} ${True} - Test Is Flow 10 Deleted f10.xml ${False} ${False} ${True} - Test Is Flow 11 Deleted f11.xml ${False} ${False} ${True} - Test Is Flow 14 Deleted f14.xml ${False} ${False} ${True} - Test Is Flow 15 Deleted f15.xml ${False} ${False} ${True} - Test Is Flow 16 Deleted f16.xml ${False} ${False} ${True} - Test Is Flow 17 Deleted f17.xml ${False} ${False} ${True} - Test Is Flow 18 Deleted f18.xml ${False} ${False} ${True} - Test Is Flow 19 Deleted f19.xml ${False} ${False} ${True} - Test Is Flow 20 Deleted f20.xml ${False} ${False} ${True} - Test Is Flow 21 Deleted f21.xml ${False} ${False} ${True} - Test Is Flow 22 Deleted f22.xml ${False} ${False} ${True} - Test Is Flow 23 Deleted f23.xml ${False} ${False} ${True} - Test Is Flow 24 Deleted f24.xml ${False} ${False} ${True} - Test Is Flow 25 Deleted f25.xml ${False} ${False} ${True} - Test Is Flow 31 Deleted f31.xml ${False} ${False} ${True} - Test Is Flow 36 Deleted f36.xml ${False} ${False} ${True} - Test Is Flow 38 Deleted f38.xml ${False} ${False} ${True} - Test Is Flow 43 Deleted f43.xml ${False} ${False} ${True} - Test Is Flow 45 Deleted f45.xml ${False} ${False} ${True} - Test Is Flow 101 Deleted f101.xml ${False} ${False} ${True} - Test Is Flow 102 Deleted f102.xml ${False} ${False} ${True} - Test Is Flow 103 Deleted f103.xml ${False} ${False} ${True} - Test Is Flow 104 Deleted f104.xml ${False} ${False} ${True} - Test Is Flow 105 Deleted f105.xml ${False} ${False} ${True} - Test Is Flow 106 Deleted f106.xml ${False} ${False} ${True} - Test Is Flow 107 Deleted f107.xml ${False} ${False} ${True} - Test Is Flow 108 Deleted f108.xml ${False} ${False} ${True} - Test Is Flow 109 Deleted f109.xml ${False} ${False} ${True} - Test Is Flow 110 Deleted f110.xml ${False} ${False} ${True} - Test Is Flow 113 Deleted f113.xml ${False} ${False} ${True} - Test Is Flow 156 Deleted f156.xml ${False} ${False} ${True} - Test Is Flow 201 Deleted f201.xml ${False} ${False} ${True} - Test Is Flow 202 Deleted f202.xml ${False} ${False} ${True} - Test Is Flow 203 Deleted f203.xml ${False} ${False} ${True} - Test Is Flow 204 Deleted f204.xml ${False} ${False} ${True} - Test Is Flow 205 Deleted f205.xml ${False} ${False} ${True} - Test Is Flow 206 Deleted f206.xml ${False} ${False} ${True} - Test Is Flow 209 Deleted f209.xml ${False} ${False} ${True} - Test Is Flow 214 Deleted f214.xml ${False} ${False} ${True} - Test Is Flow 218 Deleted f218.xml ${False} ${False} ${True} - Test Is Flow 219 Deleted f219.xml ${False} ${False} ${True} - Test Is Flow 220 Deleted f220.xml ${False} ${False} ${True} - Test Is Flow 221 Deleted f221.xml ${False} ${False} ${True} - Test Is Flow 222 Deleted f222.xml ${False} ${False} ${True} - Test Is Flow 223 Deleted f223.xml ${False} ${False} ${True} - Test Is Flow 224 Deleted f224.xml ${False} ${False} ${True} - Test Is Flow 225 Deleted f225.xml ${False} ${False} ${True} - Test Is Flow 550 Deleted f550.xml ${False} ${False} ${True} + *** Keywords *** Initialization Phase [Documentation] Initiate tcp connection with controller diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/020_SM_sal_add_upd_del_flows.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/020_SM_sal_add_upd_del_flows.robot index 57024f6620..4dde676aa5 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/020_SM_sal_add_upd_del_flows.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/020_SM_sal_add_upd_del_flows.robot @@ -1,32 +1,36 @@ *** Settings *** -Documentation Test suite for Stats Manager flows collection -Suite Setup Initialization Phase -Suite Teardown Delete All Sessions -Test Template Check Datastore Presence -Library Collections -Library OperatingSystem -Library RequestsLibrary -Library SSHLibrary -Library XML -Library ${CURDIR}/../../../../libraries/Common.py -Library ${CURDIR}/../../../../libraries/XmlComparator.py -Resource ${CURDIR}/../../../../libraries/CompareStream.robot -Resource ${CURDIR}/../../../../libraries/FlowLib.robot -Resource ${CURDIR}/../../../../variables/Variables.robot +Documentation Test suite for Stats Manager flows collection + +Library Collections +Library OperatingSystem +Library RequestsLibrary +Library SSHLibrary +Library XML +Library ${CURDIR}/../../../../libraries/Common.py +Library ${CURDIR}/../../../../libraries/XmlComparator.py +Resource ${CURDIR}/../../../../libraries/CompareStream.robot +Resource ${CURDIR}/../../../../libraries/FlowLib.robot +Resource ${CURDIR}/../../../../variables/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Delete All Sessions +Test Template Check Datastore Presence + *** Variables *** -${flow_update_time} 3s -${XmlsDir} ${CURDIR}/../../../../variables/xmls -${switch_idx} 1 -${switch_name} s${switch_idx} -@{flowlist0} f1.xml f2.xml f3.xml f4.xml f5.xml f6.xml f7.xml -... f8.xml f9.xml f10.xml f11.xml f14.xml f15.xml f16.xml -... f17.xml f18.xml f19.xml f20.xml f21.xml f22.xml f23.xml -... f24.xml f25.xml f31.xml f36.xml f38.xml f43.xml f45.xml -... f101.xml f102.xml f103.xml f104.xml f105.xml f106.xml f107.xml -... f108.xml f109.xml f110.xml f113.xml f201.xml f202.xml f203.xml -... f204.xml f205.xml f206.xml f209.xml f214.xml f218.xml f219.xml -... f220.xml +${flow_update_time} 3s +${XmlsDir} ${CURDIR}/../../../../variables/xmls +${switch_idx} 1 +${switch_name} s${switch_idx} +@{flowlist0} f1.xml f2.xml f3.xml f4.xml f5.xml f6.xml f7.xml +... f8.xml f9.xml f10.xml f11.xml f14.xml f15.xml f16.xml +... f17.xml f18.xml f19.xml f20.xml f21.xml f22.xml f23.xml +... f24.xml f25.xml f31.xml f36.xml f38.xml f43.xml f45.xml +... f101.xml f102.xml f103.xml f104.xml f105.xml f106.xml f107.xml +... f108.xml f109.xml f110.xml f113.xml f201.xml f202.xml f203.xml +... f204.xml f205.xml f206.xml f209.xml f214.xml f218.xml f219.xml +... f220.xml + *** Test Cases *** Test Add Flows Group 0 @@ -43,154 +47,104 @@ Test Add Flows Group 0 # Show switch content (for debug purposes if needed) Write dpctl dump-flows -O OpenFlow13 Read Until mininet> - Test Is Flow 1 Added f1.xml ${False} ${True} ${False} - Test Is Flow 2 Added f2.xml ${False} ${True} ${False} - Test Is Flow 3 Added f3.xml ${False} ${True} ${False} - Test Is Flow 4 Added f4.xml ${False} ${True} ${False} - Test Is Flow 5 Added f5.xml ${False} ${True} ${False} - Test Is Flow 6 Added f6.xml ${False} ${True} ${False} - Test Is Flow 7 Added f7.xml ${False} ${True} ${False} - Test Is Flow 8 Added f8.xml ${False} ${True} ${False} - Test Is Flow 9 Added f9.xml ${False} ${True} ${False} - Test Is Flow 10 Added f10.xml ${False} ${True} ${False} - Test Is Flow 11 Added f11.xml ${False} ${True} ${False} - Test Is Flow 15 Added f15.xml ${False} ${True} ${False} - Test Is Flow 16 Added f16.xml ${False} ${True} ${False} - Test Is Flow 17 Added f17.xml ${False} ${True} ${False} - Test Is Flow 18 Added f18.xml ${False} ${True} ${False} - Test Is Flow 19 Added f19.xml ${False} ${True} ${False} - Test Is Flow 20 Added f20.xml ${False} ${True} ${False} - Test Is Flow 21 Added f21.xml ${False} ${True} ${False} - Test Is Flow 22 Added f22.xml ${False} ${True} ${False} - Test Is Flow 23 Added f23.xml ${False} ${True} ${False} - Test Is Flow 24 Added f24.xml ${False} ${True} ${False} - Test Is Flow 25 Added f25.xml ${False} ${True} ${False} - Test Is Flow 31 Added f31.xml ${False} ${True} ${False} - Test Is Flow 36 Added f36.xml ${False} ${True} ${False} - Test Is Flow 38 Added f38.xml ${False} ${True} ${False} - Test Is Flow 43 Added f43.xml ${False} ${True} ${False} - Test Is Flow 45 Added f45.xml ${False} ${True} ${False} - Test Is Flow 101 Added f101.xml ${False} ${True} ${False} - Test Is Flow 102 Added f102.xml ${False} ${True} ${False} - Test Is Flow 103 Added f103.xml ${False} ${True} ${False} - Test Is Flow 104 Added f104.xml ${False} ${True} ${False} - Test Is Flow 105 Added f105.xml ${False} ${True} ${False} - Test Is Flow 106 Added f106.xml ${False} ${True} ${False} - Test Is Flow 107 Added f107.xml ${False} ${True} ${False} - Test Is Flow 108 Added f108.xml ${False} ${True} ${False} - Test Is Flow 109 Added f109.xml ${False} ${True} ${False} - Test Is Flow 110 Added f110.xml ${False} ${True} ${False} - Test Is Flow 113 Added f113.xml ${False} ${True} ${False} - Test Is Flow 201 Added f201.xml ${False} ${True} ${False} - Test Is Flow 202 Added f202.xml ${False} ${True} ${False} - Test Is Flow 203 Added f203.xml ${False} ${True} ${False} - Test Is Flow 204 Added f204.xml ${False} ${True} ${False} - Test Is Flow 205 Added f205.xml ${False} ${True} ${False} - Test Is Flow 206 Added f206.xml ${False} ${True} ${False} - Test Is Flow 209 Added f209.xml ${False} ${True} ${False} - Test Is Flow 214 Added f214.xml ${False} ${True} ${False} - Test Is Flow 218 Added f218.xml ${False} ${True} ${False} - Test Is Flow 219 Added f219.xml ${False} ${True} ${False} - Test Is Flow 220 Added f220.xml ${False} ${True} ${False} - Test Update Flows Group 0 [Documentation] Update all flows and waits for SM to collect data [Template] NONE @@ -204,157 +158,106 @@ Test Update Flows Group 0 # Show switch content (for debug purposes if needed) Write dpctl dump-flows -O OpenFlow13 Read Until mininet> - Test Is Flow 1 Updated f1.xml ${False} ${True} ${True} - Test Is Flow 2 Updated f2.xml ${False} ${True} ${True} - Test Is Flow 3 Updated f3.xml ${False} ${True} ${True} - Test Is Flow 4 Updated f4.xml ${False} ${True} ${True} - Test Is Flow 5 Updated f5.xml ${False} ${True} ${True} - Test Is Flow 6 Updated f6.xml ${False} ${True} ${True} - Test Is Flow 7 Updated f7.xml ${False} ${True} ${True} - Test Is Flow 8 Updated f8.xml ${False} ${True} ${True} - Test Is Flow 9 Updated f9.xml ${False} ${True} ${True} - Test Is Flow 10 Updated f10.xml ${False} ${True} ${True} - Test Is Flow 11 Updated f11.xml ${False} ${True} ${True} - Test Is Flow 14 Updated f14.xml ${False} ${True} ${True} - Test Is Flow 15 Updated f15.xml ${False} ${True} ${True} - Test Is Flow 16 Updated f16.xml ${False} ${True} ${True} - Test Is Flow 17 Updated f17.xml ${False} ${True} ${True} - Test Is Flow 18 Updated f18.xml ${False} ${True} ${True} - Test Is Flow 19 Updated f19.xml ${False} ${True} ${True} - Test Is Flow 20 Updated f20.xml ${False} ${True} ${True} - Test Is Flow 21 Updated f21.xml ${False} ${True} ${True} - Test Is Flow 22 Updated f22.xml ${False} ${True} ${True} - Test Is Flow 23 Updated f23.xml ${False} ${True} ${True} - Test Is Flow 24 Updated f24.xml ${False} ${True} ${True} - Test Is Flow 25 Updated f25.xml ${False} ${True} ${True} - Test Is Flow 31 Updated f31.xml ${False} ${True} ${True} - Test Is Flow 36 Updated f36.xml ${False} ${True} ${True} - Test Is Flow 38 Updated f38.xml ${False} ${True} ${True} - Test Is Flow 43 Updated f43.xml ${False} ${True} ${True} - Test Is Flow 45 Updated f45.xml ${False} ${True} ${True} - Test Is Flow 101 Updated f101.xml ${False} ${True} ${True} - Test Is Flow 102 Updated f102.xml ${False} ${True} ${True} - Test Is Flow 103 Updated f103.xml ${False} ${True} ${True} - Test Is Flow 104 Updated f104.xml ${False} ${True} ${True} - Test Is Flow 105 Updated f105.xml ${False} ${True} ${True} - Test Is Flow 106 Updated f106.xml ${False} ${True} ${True} - Test Is Flow 107 Updated f107.xml ${False} ${True} ${True} - Test Is Flow 108 Updated f108.xml ${False} ${True} ${True} - Test Is Flow 109 Updated f109.xml ${False} ${True} ${True} - Test Is Flow 110 Updated f110.xml ${False} ${True} ${True} - Test Is Flow 113 Updated f113.xml ${False} ${True} ${True} - Test Is Flow 201 Updated f201.xml ${False} ${True} ${True} - Test Is Flow 202 Updated f202.xml ${False} ${True} ${True} - Test Is Flow 203 Updated f203.xml ${False} ${True} ${True} - Test Is Flow 204 Updated f204.xml ${False} ${True} ${True} - Test Is Flow 205 Updated f205.xml ${False} ${True} ${True} - Test Is Flow 206 Updated f206.xml ${False} ${True} ${True} - Test Is Flow 209 Updated f209.xml ${False} ${True} ${True} - Test Is Flow 214 Updated f214.xml ${False} ${True} ${True} - Test Is Flow 218 Updated f218.xml ${False} ${True} ${True} - Test Is Flow 219 Updated f219.xml ${False} ${True} ${True} - Test Is Flow 220 Updated f220.xml ${False} ${True} ${True} - Test Delete Flows Group 0 [Documentation] Delete all flows and waits for SM to collect data [Template] NONE @@ -368,157 +271,108 @@ Test Delete Flows Group 0 # Show switch content (for debug purposes if needed) Write dpctl dump-flows -O OpenFlow13 Read Until mininet> - Test Is Flow 1 Deleted f1.xml ${False} ${False} ${True} - Test Is Flow 2 Deleted f2.xml ${False} ${False} ${True} - Test Is Flow 3 Deleted f3.xml ${False} ${False} ${True} - Test Is Flow 4 Deleted f4.xml ${False} ${False} ${True} - Test Is Flow 5 Deleted f5.xml ${False} ${False} ${True} - Test Is Flow 6 Deleted f6.xml ${False} ${False} ${True} - Test Is Flow 7 Deleted f7.xml ${False} ${False} ${True} - Test Is Flow 8 Deleted f8.xml ${False} ${False} ${True} - Test Is Flow 9 Deleted f9.xml ${False} ${False} ${True} - Test Is Flow 10 Deleted f10.xml ${False} ${False} ${True} - Test Is Flow 11 Deleted f11.xml ${False} ${False} ${True} - Test Is Flow 14 Deleted f14.xml ${False} ${False} ${True} - Test Is Flow 15 Deleted f15.xml ${False} ${False} ${True} - Test Is Flow 16 Deleted f16.xml ${False} ${False} ${True} - Test Is Flow 17 Deleted f17.xml ${False} ${False} ${True} - Test Is Flow 18 Deleted f18.xml ${False} ${False} ${True} - Test Is Flow 19 Deleted f19.xml ${False} ${False} ${True} - Test Is Flow 20 Deleted f20.xml ${False} ${False} ${True} - Test Is Flow 21 Deleted f21.xml ${False} ${False} ${True} - Test Is Flow 22 Deleted f22.xml ${False} ${False} ${True} - Test Is Flow 23 Deleted f23.xml ${False} ${False} ${True} - Test Is Flow 24 Deleted f24.xml ${False} ${False} ${True} - Test Is Flow 25 Deleted f25.xml ${False} ${False} ${True} - Test Is Flow 31 Deleted f31.xml ${False} ${False} ${True} - Test Is Flow 36 Deleted f36.xml ${False} ${False} ${True} - Test Is Flow 38 Deleted f38.xml ${False} ${False} ${True} - Test Is Flow 43 Deleted f43.xml ${False} ${False} ${True} - Test Is Flow 45 Deleted f45.xml ${False} ${False} ${True} - Test Is Flow 101 Deleted f101.xml ${False} ${False} ${True} - Test Is Flow 102 Deleted f102.xml ${False} ${False} ${True} - Test Is Flow 103 Deleted f103.xml ${False} ${False} ${True} - Test Is Flow 104 Deleted f104.xml ${False} ${False} ${True} - Test Is Flow 105 Deleted f105.xml ${False} ${False} ${True} - Test Is Flow 106 Deleted f106.xml ${False} ${False} ${True} - Test Is Flow 107 Deleted f107.xml ${False} ${False} ${True} - Test Is Flow 108 Deleted f108.xml ${False} ${False} ${True} - Test Is Flow 109 Deleted f109.xml ${False} ${False} ${True} - Test Is Flow 110 Deleted f110.xml ${False} ${False} ${True} - Test Is Flow 113 Deleted f113.xml ${False} ${False} ${True} - Test Is Flow 201 Deleted f201.xml ${False} ${False} ${True} - Test Is Flow 202 Deleted f202.xml ${False} ${False} ${True} - Test Is Flow 203 Deleted f203.xml ${False} ${False} ${True} - Test Is Flow 204 Deleted f204.xml ${False} ${False} ${True} - Test Is Flow 205 Deleted f205.xml ${False} ${False} ${True} - Test Is Flow 206 Deleted f206.xml ${False} ${False} ${True} - Test Is Flow 209 Deleted f209.xml ${False} ${False} ${True} - Test Is Flow 214 Deleted f214.xml ${False} ${False} ${True} - Test Is Flow 218 Deleted f218.xml ${False} ${False} ${True} - Test Is Flow 219 Deleted f219.xml ${False} ${False} ${True} - Test Is Flow 220 Deleted f220.xml ${False} ${False} ${True} + *** Keywords *** Initialization Phase [Documentation] Initiate tcp connection with controller diff --git a/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/__init__.robot b/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/__init__.robot index c163bea9f5..636683471e 100644 --- a/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/__init__.robot +++ b/csit/suites/openflowplugin/Flows_Additional_TCs/Stat_Manager_extended/__init__.robot @@ -1,9 +1,12 @@ *** Settings *** -Documentation Test suite for the OpenDaylight OpenFlow statistics manager -Suite Setup Start Mininet -Suite Teardown Stop Mininet -Library SSHLibrary -Resource ../../../../libraries/Utils.robot +Documentation Test suite for the OpenDaylight OpenFlow statistics manager + +Library SSHLibrary +Resource ../../../../libraries/Utils.robot + +Suite Setup Start Mininet +Suite Teardown Stop Mininet + *** Variables *** -${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,1 --switch ovsk,protocols=OpenFlow13 +${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,1 --switch ovsk,protocols=OpenFlow13 diff --git a/csit/suites/openflowplugin/Flows_Stats_OF13/010__SM_add_upd_del_flows.robot b/csit/suites/openflowplugin/Flows_Stats_OF13/010__SM_add_upd_del_flows.robot index 85b34e9061..e7f3bcc9f1 100644 --- a/csit/suites/openflowplugin/Flows_Stats_OF13/010__SM_add_upd_del_flows.robot +++ b/csit/suites/openflowplugin/Flows_Stats_OF13/010__SM_add_upd_del_flows.robot @@ -1,22 +1,26 @@ *** Settings *** -Documentation Test suite for Stats Manager flows collection -Suite Setup Initialization Phase -Suite Teardown Teardown Phase -Library OperatingSystem -Library Collections -Library XML -Library ../../../libraries/XmlComparator.py -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for Stats Manager flows collection + +Library OperatingSystem +Library Collections +Library XML +Library ../../../libraries/XmlComparator.py +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Teardown Phase + *** Variables *** -${XmlsDir} ${CURDIR}/../../../variables/xmls -${switch_idx} 1 -${switch_name} s${switch_idx} -@{xml_files} f1.xml f2.xml f3.xml f5.xml f7.xml f8.xml f9.xml -... f10.xml f11.xml f14.xml f17.xml f19.xml f24.xml +${XmlsDir} ${CURDIR}/../../../variables/xmls +${switch_idx} 1 +${switch_name} s${switch_idx} +@{xml_files} f1.xml f2.xml f3.xml f5.xml f7.xml f8.xml f9.xml +... f10.xml f11.xml f14.xml f17.xml f19.xml f24.xml + *** Test Cases *** Test Add Flows @@ -191,6 +195,7 @@ Test Is Flow 24 Deleted Check Config Flow ${False} Check Operational Table ${False} + *** Keywords *** Init Flow Variables [Arguments] ${file} @@ -217,13 +222,16 @@ Check Config Flow Presence Flow Presence Config Flow ${headers}= Create Dictionary Accept=application/xml - ${resp}= RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} headers=${headers} + ${resp}= RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} + ... headers=${headers} Log ${resp} Log ${resp.content} - Return From Keyword If ${resp.status_code}!=200 ${False} ${EMPTY} + IF ${resp.status_code}!=200 RETURN ${False} ${EMPTY} ${pres} ${msg}= Is Flow Configured ${data} ${resp.content} - Run Keyword If '''${msg}'''!='${EMPTY}' Log ${msg} - Return From Keyword ${pres} ${msg} + IF '''${msg}'''!='${EMPTY}' Log ${msg} + RETURN ${pres} ${msg} Check Operational Table [Arguments] ${expected} @@ -237,23 +245,34 @@ Check Operational Table Presence Flow Presence Operational Table ${headers}= Create Dictionary Accept=application/xml - ${resp}= RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}?${RFC8040_OPERATIONAL_CONTENT} headers=${headers} + ${resp}= RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}?${RFC8040_OPERATIONAL_CONTENT} + ... headers=${headers} Log ${resp} Log ${resp.content} - Return From Keyword If ${resp.status_code}!=200 ${False} ${EMPTY} + IF ${resp.status_code}!=200 RETURN ${False} ${EMPTY} ${pres} ${msg}= Is Flow Operational2 ${data} ${resp.content} - Run Keyword If '''${msg}'''!='${EMPTY}' Log ${msg} - Return From Keyword ${pres} ${msg} + IF '''${msg}'''!='${EMPTY}' Log ${msg} + RETURN ${pres} ${msg} Add Flow Log ${data} - ${resp}= RequestsLibrary.Put Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} headers=${HEADERS_XML} data=${data} - ${msg}= Set Variable Adding flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. + ${resp}= RequestsLibrary.Put Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} + ... headers=${HEADERS_XML} + ... data=${data} + ${msg}= Set Variable + ... Adding flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} Delete Flow - ${resp}= RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} - ${msg}= Set Variable Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. + ${resp}= RequestsLibrary.Delete Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} + ${msg}= Set Variable + ... Delete flow for ${RFC8040_NODES_API}/node=openflow%3A${switch_idx}/flow-node-inventory:table=${table_id}/flow=${flow_id} failed, http response ${resp.status_code} received. Should Be Equal As Strings ${resp.status_code} 200 msg=${msg} Delete All Flows @@ -274,7 +293,12 @@ Teardown Phase Get Presence Failure Message [Arguments] ${ds} ${expected} ${presence} ${diffmsg} - Return From Keyword If '''${diffmsg}'''!='${EMPTY}' Flow found in ${ds} data store but: ${diffmsg} - ${msgf}= Set Variable If ${expected}==${True} The flow is expected in operational data store, but The flow is not expected in operational data store, but + IF '''${diffmsg}'''!='${EMPTY}' + RETURN Flow found in ${ds} data store but: ${diffmsg} + END + ${msgf}= Set Variable If + ... ${expected}==${True} + ... The flow is expected in operational data store, but + ... The flow is not expected in operational data store, but ${msgp}= Set Variable If ${presence}==${True} it is present. it is not present. - Return From Keyword ${msgf} ${msgp} + RETURN ${msgf} ${msgp} diff --git a/csit/suites/openflowplugin/Flows_Stats_OF13/__init__.robot b/csit/suites/openflowplugin/Flows_Stats_OF13/__init__.robot index 201546853a..aa25acfbfe 100644 --- a/csit/suites/openflowplugin/Flows_Stats_OF13/__init__.robot +++ b/csit/suites/openflowplugin/Flows_Stats_OF13/__init__.robot @@ -1,10 +1,8 @@ *** Settings *** -Documentation Test suite for the OpenDaylight base edition with of13, aimed for statistics manager -Suite Setup Start Mininet -Suite Teardown Stop Mininet -Library SSHLibrary -Resource ../../../libraries/Utils.robot +Documentation Test suite for the OpenDaylight base edition with of13, aimed for statistics manager -*** Variables *** +Library SSHLibrary +Resource ../../../libraries/Utils.robot -*** Keywords *** +Suite Setup Start Mininet +Suite Teardown Stop Mininet diff --git a/csit/suites/openflowplugin/Groups_Meters_OF13/005__openflow_group.robot b/csit/suites/openflowplugin/Groups_Meters_OF13/005__openflow_group.robot index 746581b9fc..7a9e154de9 100644 --- a/csit/suites/openflowplugin/Groups_Meters_OF13/005__openflow_group.robot +++ b/csit/suites/openflowplugin/Groups_Meters_OF13/005__openflow_group.robot @@ -1,72 +1,103 @@ *** Settings *** -Documentation Test suite for OpenFlow group -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library SSHLibrary -Library Collections -Library OperatingSystem -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../variables/openflowplugin/Variables.robot -Resource ../../../libraries/Utils.robot +Documentation Test suite for OpenFlow group + +Library SSHLibrary +Library Collections +Library OperatingSystem +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot +Resource ../../../libraries/Utils.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions + *** Variables *** -${REST_CONTEXT} ${RFC8040_NODES_API}/node=openflow%3A1 -${GROUP} ${CURDIR}/../../../variables/xmls/g4.xml -${FLOW} ${CURDIR}/../../../variables/xmls/f50.xml -${GROUP_NAME} Foo -${FLOW_NAME} forward +${REST_CONTEXT} ${RFC8040_NODES_API}/node=openflow%3A1 +${GROUP} ${CURDIR}/../../../variables/xmls/g4.xml +${FLOW} ${CURDIR}/../../../variables/xmls/f50.xml +${GROUP_NAME} Foo +${FLOW_NAME} forward + *** Test Cases *** Get list of nodes [Documentation] Get the inventory to make sure openflow:1 comes up - ${node_list}= Create List openflow:1 - Wait Until Keyword Succeeds 90s 1s Check For Elements At URI ${REST_CONTEXT}?${RFC8040_OPERATIONAL_CONTENT} ${node_list} + ${node_list} Create List openflow:1 + Wait Until Keyword Succeeds + ... 90s + ... 1s + ... Check For Elements At URI + ... ${REST_CONTEXT}?${RFC8040_OPERATIONAL_CONTENT} + ... ${node_list} Add a group [Documentation] Add a group using RESTCONF - [Tags] Push + [Tags] push ${body} OperatingSystem.Get File ${GROUP} Set Suite Variable ${body} - ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT}/flow-node-inventory:group=1 headers=${HEADERS_XML} data=${body} + ${resp} RequestsLibrary.Put Request + ... session + ... ${REST_CONTEXT}/flow-node-inventory:group=1 + ... headers=${HEADERS_XML} + ... data=${body} Log ${resp.content} BuiltIn.Should_Match "${resp.status_code}" "20?" Verify after adding group config [Documentation] Get the group stat in config - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_CONFIG_CONTENT} + ${resp} RequestsLibrary.Get Request + ... session + ... ${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_CONFIG_CONTENT} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ${GROUP_NAME} Verify after adding group operational [Documentation] Get the group stat in operational - ${elements}= Create List group-statistics ref-count packet-count byte-count buckets + ${elements} Create List group-statistics ref-count packet-count byte-count buckets ... weight group-select - Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_OPERATIONAL_CONTENT} ${elements} + Wait Until Keyword Succeeds + ... 6s + ... 2s + ... Check For Elements At URI + ... ${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_OPERATIONAL_CONTENT} + ... ${elements} Add a flow that includes a group [Documentation] Push a flow through RESTCONF - [Tags] Push + [Tags] push ${body} OperatingSystem.Get File ${FLOW} Set Suite Variable ${body} - ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1 headers=${HEADERS_XML} data=${body} + ${resp} RequestsLibrary.Put Request + ... session + ... ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1 + ... headers=${HEADERS_XML} + ... data=${body} Log ${resp.content} BuiltIn.Should_Match "${resp.status_code}" "20?" Verify after adding flow config [Documentation] Verify the flow - [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT} + [Tags] get + ${resp} RequestsLibrary.Get Request + ... session + ... ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ${FLOW_NAME} Verify after adding flow operational [Documentation] Verify the flow - ${elements}= Create List group-action group-id - Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_OPERATIONAL_CONTENT} ${elements} + ${elements} Create List group-action group-id + Wait Until Keyword Succeeds + ... 6s + ... 2s + ... Check For Elements At URI + ... ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_OPERATIONAL_CONTENT} + ... ${elements} Remove the flow [Documentation] Remove the flow @@ -75,19 +106,23 @@ Remove the flow Verify after deleting flow [Documentation] Verify the flow removal - [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT} + [Tags] get + ${resp} RequestsLibrary.Get Request + ... session + ... ${REST_CONTEXT}/flow-node-inventory:table=0/flow=1?${RFC8040_CONFIG_CONTENT} Should Not Contain ${resp.content} ${FLOW_NAME} Delete the group [Documentation] Remove the group - [Tags] Delete + [Tags] delete ${resp} RequestsLibrary.Delete Request session ${REST_CONTEXT}/flow-node-inventory:group=1 Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Verify after deleting group [Documentation] Verify the flow removal - [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_CONFIG_CONTENT} + [Tags] get + ${resp} RequestsLibrary.Get Request + ... session + ... ${REST_CONTEXT}/flow-node-inventory:group=1?${RFC8040_CONFIG_CONTENT} Should Not Contain ${resp.content} ${GROUP_NAME} diff --git a/csit/suites/openflowplugin/Groups_Meters_OF13/010__openflow_meter.robot b/csit/suites/openflowplugin/Groups_Meters_OF13/010__openflow_meter.robot index d6289dd366..d56e32e484 100644 --- a/csit/suites/openflowplugin/Groups_Meters_OF13/010__openflow_meter.robot +++ b/csit/suites/openflowplugin/Groups_Meters_OF13/010__openflow_meter.robot @@ -1,35 +1,48 @@ *** Settings *** -Documentation Test suite for OpenFlow meter -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library SSHLibrary -Library Collections -Library OperatingSystem -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../variables/openflowplugin/Variables.robot -Resource ../../../libraries/Utils.robot +Documentation Test suite for OpenFlow meter + +Library SSHLibrary +Library Collections +Library OperatingSystem +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot +Resource ../../../libraries/Utils.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions + *** Variables *** -${REST_CONTEXT} ${RFC8040_NODES_API}/node=openflow%3A1 -${METER} ${CURDIR}/../../../variables/xmls/m4.xml -${FLOW} ${CURDIR}/../../../variables/xmls/f51.xml -${METER_NAME} Foo -${FLOW_NAME} forward +${REST_CONTEXT} ${RFC8040_NODES_API}/node=openflow%3A1 +${METER} ${CURDIR}/../../../variables/xmls/m4.xml +${FLOW} ${CURDIR}/../../../variables/xmls/f51.xml +${METER_NAME} Foo +${FLOW_NAME} forward + *** Test Cases *** Get list of nodes [Documentation] Get the inventory to make sure openflow:1 comes up - ${node_list}= Create List openflow:1 - Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${REST_CONTEXT}?${RFC8040_OPERATIONAL_CONTENT} ${node_list} + ${node_list} Create List openflow:1 + Wait Until Keyword Succeeds + ... 3s + ... 1s + ... Check For Elements At URI + ... ${REST_CONTEXT}?${RFC8040_OPERATIONAL_CONTENT} + ... ${node_list} Add a meter [Documentation] Add a meter using RESTCONF - [Tags] Push + [Tags] push ${body} OperatingSystem.Get File ${METER} Set Suite Variable ${body} - ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT}/meter=1 headers=${HEADERS_XML} data=${body} + ${resp} RequestsLibrary.Put Request + ... session + ... ${REST_CONTEXT}/meter=1 + ... headers=${HEADERS_XML} + ... data=${body} Log ${resp.content} BuiltIn.Should_Match "${resp.status_code}" "20?" @@ -42,31 +55,47 @@ Verify after adding meter config Verify after adding meter operational [Documentation] Get the meter stat in operational - ${elements}= Create List meter-statistics meter-kbps flow-count packet-in-count byte-in-count + ${elements} Create List meter-statistics meter-kbps flow-count packet-in-count byte-in-count ... meter-band-stats meter-band-headers - Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT}/meter=1?${RFC8040_OPERATIONAL_CONTENT} ${elements} + Wait Until Keyword Succeeds + ... 6s + ... 2s + ... Check For Elements At URI + ... ${REST_CONTEXT}/meter=1?${RFC8040_OPERATIONAL_CONTENT} + ... ${elements} Add a flow that includes a meter [Documentation] Push a flow through RESTCONF - [Tags] Push + [Tags] push ${body} OperatingSystem.Get File ${FLOW} Set Suite Variable ${body} - ${resp} RequestsLibrary.Put Request session ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2 headers=${HEADERS_XML} data=${body} + ${resp} RequestsLibrary.Put Request + ... session + ... ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2 + ... headers=${HEADERS_XML} + ... data=${body} Log ${resp.content} BuiltIn.Should_Match "${resp.status_code}" "20?" Verify after adding flow config [Documentation] Verify the flow - [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2?${RFC8040_CONFIG_CONTENT} + [Tags] get + ${resp} RequestsLibrary.Get Request + ... session + ... ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2?${RFC8040_CONFIG_CONTENT} Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} ${FLOW_NAME} Verify after adding flow operational [Documentation] Verify the flow - ${elements}= Create List meter-id flow - Wait Until Keyword Succeeds 6s 2s Check For Elements At URI ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2?${RFC8040_OPERATIONAL_CONTENT} ${elements} + ${elements} Create List meter-id flow + Wait Until Keyword Succeeds + ... 6s + ... 2s + ... Check For Elements At URI + ... ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2?${RFC8040_OPERATIONAL_CONTENT} + ... ${elements} Remove the flow [Documentation] Remove the flow @@ -75,19 +104,21 @@ Remove the flow Verify after deleting flow [Documentation] Verify the flow removal - [Tags] Get - ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2?${RFC8040_CONFIG_CONTENT} + [Tags] get + ${resp} RequestsLibrary.Get Request + ... session + ... ${REST_CONTEXT}/flow-node-inventory:table=0/flow=2?${RFC8040_CONFIG_CONTENT} Should Not Contain ${resp.content} ${FLOW_NAME} Delete the meter [Documentation] Remove the meter - [Tags] Delete + [Tags] delete ${resp} RequestsLibrary.Delete Request session ${REST_CONTEXT}/meter=1 Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Verify after deleting meter [Documentation] Verify the flow removal - [Tags] Get + [Tags] get ${resp} RequestsLibrary.Get Request session ${REST_CONTEXT}/meter=1?${RFC8040_CONFIG_CONTENT} Should Not Contain ${resp.content} ${METER_NAME} diff --git a/csit/suites/openflowplugin/Groups_Meters_OF13/__init__.robot b/csit/suites/openflowplugin/Groups_Meters_OF13/__init__.robot index be5e2b84ae..50480c2919 100644 --- a/csit/suites/openflowplugin/Groups_Meters_OF13/__init__.robot +++ b/csit/suites/openflowplugin/Groups_Meters_OF13/__init__.robot @@ -1,12 +1,13 @@ *** Settings *** -Documentation Test suite for OpenFlow Groups and Meters -Suite Setup Start Mininet -Suite Teardown Stop Mininet -Library SSHLibrary -Resource ../../../libraries/Utils.robot -Variables ../../../variables/Variables.py +Documentation Test suite for OpenFlow Groups and Meters -*** Variables *** -${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,1 --switch user +Library SSHLibrary +Resource ../../../libraries/Utils.robot +Variables ../../../variables/Variables.py + +Suite Setup Start Mininet +Suite Teardown Stop Mininet -*** Keywords *** + +*** Variables *** +${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,1 --switch user diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot index 90855427ec..6956e6ce47 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF10/010__restconf_inventory.robot @@ -1,14 +1,15 @@ *** Settings *** -Documentation Test suite for RESTCONF inventory -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for RESTCONF inventory + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions -*** Variables *** *** Test Cases *** Get list of nodes @@ -21,7 +22,9 @@ Get list of nodes Get nodeconnector for the root node [Documentation] Get the inventory for the root node ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Wait Until Keyword Succeeds 30s 2s Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.text} @@ -40,6 +43,7 @@ Get Stats for a node ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} Wait Until Keyword Succeeds 120s 2s Check Every Nodes Stats ${numnodes} + *** Keywords *** Check Every Nodes [Arguments] ${numnodes} @@ -52,7 +56,9 @@ Check Every Nodes Check Every Nodes Stats [Arguments] ${numnodes} FOR ${IND} IN RANGE 1 ${numnodes+1} - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.text} flow-capable-node-connector-statistics @@ -62,7 +68,9 @@ Check Every Nodes Stats Check Every Nodes Nodeconnector [Arguments] ${numnodes} FOR ${IND} IN RANGE 2 ${numnodes+1} - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.text} diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF10/020__restconf_topology.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF10/020__restconf_topology.robot index e570e5bdab..157e736e9e 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF10/020__restconf_topology.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF10/020__restconf_topology.robot @@ -1,15 +1,16 @@ *** Settings *** -Documentation Test suite for RESTCONF topology -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library XML -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for RESTCONF topology + +Library Collections +Library XML +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions -*** Variables *** *** Test Cases *** Get Nodes Count @@ -17,7 +18,13 @@ Get Nodes Count ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} - Wait Until Keyword Succeeds 60s 2s Verify Element Count ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} node ${numnodes} + Wait Until Keyword Succeeds + ... 60s + ... 2s + ... Verify Element Count + ... ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} + ... node + ... ${numnodes} Get Links Count [Documentation] Checks the number of links @@ -25,7 +32,14 @@ Get Links Count ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} ${numlinks} Evaluate (${numnodes}-1)*2 - Wait Until Keyword Succeeds 60s 2s Verify Element Count ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} link ${numlinks} + Wait Until Keyword Succeeds + ... 60s + ... 2s + ... Verify Element Count + ... ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} + ... link + ... ${numlinks} + *** Keywords *** Verify Element Count @@ -33,5 +47,5 @@ Verify Element Count ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} headers=${ACCEPT_XML} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 - ${count}= Get Element Count ${resp.text} xpath=${xpath_location} + ${count} Get Element Count ${resp.text} xpath=${xpath_location} Should Be Equal As Numbers ${count} ${expected_count} diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF10/__init__.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF10/__init__.robot index 7e2db8610f..c3fd6c1786 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF10/__init__.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF10/__init__.robot @@ -1,13 +1,17 @@ *** Settings *** -Documentation Test suite for Inventory Scalability -Suite Setup Start Suite -Suite Teardown Stop Suite -Library SSHLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py +Documentation Test suite for Inventory Scalability + +Library SSHLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +Suite Setup Start Suite +Suite Teardown Stop Suite + *** Variables *** -${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT} +${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT} + *** Keywords *** Start Suite diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF13/010__restconf_inventory.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF13/010__restconf_inventory.robot index 90855427ec..6956e6ce47 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF13/010__restconf_inventory.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF13/010__restconf_inventory.robot @@ -1,14 +1,15 @@ *** Settings *** -Documentation Test suite for RESTCONF inventory -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for RESTCONF inventory + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions -*** Variables *** *** Test Cases *** Get list of nodes @@ -21,7 +22,9 @@ Get list of nodes Get nodeconnector for the root node [Documentation] Get the inventory for the root node ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Wait Until Keyword Succeeds 30s 2s Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.text} @@ -40,6 +43,7 @@ Get Stats for a node ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} Wait Until Keyword Succeeds 120s 2s Check Every Nodes Stats ${numnodes} + *** Keywords *** Check Every Nodes [Arguments] ${numnodes} @@ -52,7 +56,9 @@ Check Every Nodes Check Every Nodes Stats [Arguments] ${numnodes} FOR ${IND} IN RANGE 1 ${numnodes+1} - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.text} flow-capable-node-connector-statistics @@ -62,7 +68,9 @@ Check Every Nodes Stats Check Every Nodes Nodeconnector [Arguments] ${numnodes} FOR ${IND} IN RANGE 2 ${numnodes+1} - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${IND}?${RFC8040_OPERATIONAL_CONTENT} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.text} diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF13/020__restconf_topology.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF13/020__restconf_topology.robot index e570e5bdab..157e736e9e 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF13/020__restconf_topology.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF13/020__restconf_topology.robot @@ -1,15 +1,16 @@ *** Settings *** -Documentation Test suite for RESTCONF topology -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library XML -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for RESTCONF topology + +Library Collections +Library XML +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions -*** Variables *** *** Test Cases *** Get Nodes Count @@ -17,7 +18,13 @@ Get Nodes Count ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} - Wait Until Keyword Succeeds 60s 2s Verify Element Count ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} node ${numnodes} + Wait Until Keyword Succeeds + ... 60s + ... 2s + ... Verify Element Count + ... ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} + ... node + ... ${numnodes} Get Links Count [Documentation] Checks the number of links @@ -25,7 +32,14 @@ Get Links Count ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} ${numlinks} Evaluate (${numnodes}-1)*2 - Wait Until Keyword Succeeds 60s 2s Verify Element Count ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} link ${numlinks} + Wait Until Keyword Succeeds + ... 60s + ... 2s + ... Verify Element Count + ... ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} + ... link + ... ${numlinks} + *** Keywords *** Verify Element Count @@ -33,5 +47,5 @@ Verify Element Count ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} headers=${ACCEPT_XML} Log ${resp.text} Should Be Equal As Strings ${resp.status_code} 200 - ${count}= Get Element Count ${resp.text} xpath=${xpath_location} + ${count} Get Element Count ${resp.text} xpath=${xpath_location} Should Be Equal As Numbers ${count} ${expected_count} diff --git a/csit/suites/openflowplugin/Inventory_Scalability_OF13/__init__.robot b/csit/suites/openflowplugin/Inventory_Scalability_OF13/__init__.robot index 53e3afc269..ccec6302cc 100644 --- a/csit/suites/openflowplugin/Inventory_Scalability_OF13/__init__.robot +++ b/csit/suites/openflowplugin/Inventory_Scalability_OF13/__init__.robot @@ -1,13 +1,18 @@ *** Settings *** -Documentation Test suite for Inventory Scalability -Suite Setup Start Suite -Suite Teardown Stop Suite -Library SSHLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py +Documentation Test suite for Inventory Scalability + +Library SSHLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py + +Suite Setup Start Suite +Suite Teardown Stop Suite + *** Variables *** -${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT} --switch ovsk,protocols=OpenFlow13 +${start} +... sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT} --switch ovsk,protocols=OpenFlow13 + *** Keywords *** Start Suite diff --git a/csit/suites/openflowplugin/Longevity/010__longevity_test.robot b/csit/suites/openflowplugin/Longevity/010__longevity_test.robot index 4955b353c2..ea23c6b78e 100644 --- a/csit/suites/openflowplugin/Longevity/010__longevity_test.robot +++ b/csit/suites/openflowplugin/Longevity/010__longevity_test.robot @@ -1,20 +1,24 @@ *** Settings *** -Documentation Beta Version of the Longevity Test. Currently it does a single test: -... 1. runs one iteration of the link scale test based on ${NUM_SWITCHES} -... Step 1 runs in a psuedo infinite loop and before each loop is -... run, a time check is made against the ${TEST_LENGTH}. If the test duration -... has expired, the loop is exited and the test is marked PASS -Suite Setup Workflow Setup -Suite Teardown Workflow Teardown -Library DateTime -Resource ../../../variables/Variables.robot -Resource ../../../libraries/WorkflowsOpenFlow.robot -Resource ../../../libraries/KarafKeywords.robot +Documentation Beta Version of the Longevity Test. Currently it does a single test: +... 1. runs one iteration of the link scale test based on ${NUM_SWITCHES} +... Step 1 runs in a psuedo infinite loop and before each loop is +... run, a time check is made against the ${TEST_LENGTH}. If the test duration +... has expired, the loop is exited and the test is marked PASS + +Library DateTime +Resource ../../../variables/Variables.robot +Resource ../../../libraries/WorkflowsOpenFlow.robot +Resource ../../../libraries/KarafKeywords.robot + +Suite Setup Workflow Setup +Suite Teardown Workflow Teardown + *** Variables *** -${NUM_SWITCHES} 36 -${SUSTAIN_TIME} 60s -${TEST_LENGTH} 2h +${NUM_SWITCHES} 36 +${SUSTAIN_TIME} 60s +${TEST_LENGTH} 2h + *** Test Cases *** Longevity Test @@ -25,14 +29,16 @@ Longevity Test ${start_time}= DateTime.Get Current Date # This loop is not infinite, so going "sufficiently large" for now. FOR ${i} IN RANGE 1 65536 - ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Full Mesh Topology ${switches} ${SUSTAIN_TIME} + ${status} ${error_message} ${topology_discover_time}= WorkflowsOpenFlow.Workflow Full Mesh Topology + ... ${switches} + ... ${SUSTAIN_TIME} ${current_time}= DateTime.Get Current Date ${duration}= DateTime.Subtract Date From Date ${current_time} ${start_time} number - Exit For Loop If '${status}' == 'FAIL' - Exit For Loop If ${duration} > ${max_duration} + IF '${status}' == 'FAIL' BREAK + IF ${duration} > ${max_duration} BREAK END ${duration_compact}= DateTime.Convert Time ${duration} compact Log to console ${\n} Log To Console Execution stopped because: ${error_message} Log To Console Test executed for ${duration_compact} seconds - Run Keyword If '${status}' == 'FAIL' Fail ${error_message} + IF '${status}' == 'FAIL' Fail ${error_message} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/010_restconf_inventory.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/010_restconf_inventory.robot index 13983dee8a..6fd17c93b4 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/010_restconf_inventory.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/010_restconf_inventory.robot @@ -1,66 +1,120 @@ *** Settings *** -Documentation Test suite for RESTCONF inventory -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../libraries/Utils.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for RESTCONF inventory + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions + *** Variables *** -${VENDOR} Nicira, Inc. -${HARDWARE} Open vSwitch -@{node_list} openflow:1 openflow:2 openflow:3 -${SW_IPADDRESS} "flow-node-inventory:ip-address":"${TOOLS_SYSTEM_IP}" -${SW_VENDOR} "flow-node-inventory:manufacturer":"${VENDOR}" -${SW_HARDWARE} "flow-node-inventory:hardware":"${HARDWARE}" -@{SW_CAPABILITIES} "flow-node-inventory:flow-feature-capability-flow-stats" "flow-node-inventory:flow-feature-capability-table-stats" "flow-node-inventory:flow-feature-capability-port-stats" "flow-node-inventory:flow-feature-capability-queue-stats" +${VENDOR} Nicira, Inc. +${HARDWARE} Open vSwitch +@{node_list} openflow:1 openflow:2 openflow:3 +${SW_IPADDRESS} "flow-node-inventory:ip-address":"${TOOLS_SYSTEM_IP}" +${SW_VENDOR} "flow-node-inventory:manufacturer":"${VENDOR}" +${SW_HARDWARE} "flow-node-inventory:hardware":"${HARDWARE}" +@{SW_CAPABILITIES} +... "flow-node-inventory:flow-feature-capability-flow-stats" +... "flow-node-inventory:flow-feature-capability-table-stats" +... "flow-node-inventory:flow-feature-capability-port-stats" +... "flow-node-inventory:flow-feature-capability-queue-stats" + *** Test Cases *** Get list of nodes [Documentation] Get the inventory - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${node_list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_OPERATIONAL_NODES_API} + ... ${node_list} Check No Link Down [Documentation] Check there is no link down. We have 8 ports in total: s1=2, s2=3, s3=3. - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} "link-down":false 8 + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Specific Number Of Elements At URI + ... ${RFC8040_OPERATIONAL_NODES_API} + ... "link-down":false + ... 8 [Teardown] Report_Failure_Due_To_Bug 6595 Get node 1 inventory [Documentation] Get the inventory for a node ${list} Create List @{SW_CAPABILITIES} ${SW_VENDOR} ${SW_IPADDRESS} ${SW_HARDWARE} openflow:1:1 ... openflow:1:2 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} Get node 2 inventory [Documentation] Get the inventory for a node ${list} Create List @{SW_CAPABILITIES} ${SW_VENDOR} ${SW_IPADDRESS} ${SW_HARDWARE} openflow:2:1 ... openflow:2:2 openflow:2:3 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A2?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} Get node 3 inventory [Documentation] Get the inventory for a node ${list} Create List @{SW_CAPABILITIES} ${SW_VENDOR} ${SW_IPADDRESS} ${SW_HARDWARE} openflow:3:1 ... openflow:3:2 openflow:3:3 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A3?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} Link Down [Documentation] Take link s1-s2 down Write link s1 s2 down Read Until mininet> @{list} Create List "link-down":true - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} Link Up [Documentation] Take link s1-s2 up Write link s1 s2 up Read Until mininet> @{list} Create List "link-down":false - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} Remove Port [Documentation] Remove port s2-eth1 @@ -68,7 +122,12 @@ Remove Port Write sh ovs-vsctl del-port s2 s2-eth1 Read Until mininet> @{list} Create List openflow:2:1 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements Not At URI + ... ${RFC8040_OPERATIONAL_NODES_API} + ... ${list} Add Port [Documentation] Add port s2-eth1, new id 4 @@ -76,4 +135,9 @@ Add Port Write sh ovs-vsctl add-port s2 s2-eth1 Read Until mininet> @{list} Create List openflow:2:4 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_OPERATIONAL_NODES_API} + ... ${list} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/020_restconf_topology.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/020_restconf_topology.robot index 9d73911b3d..143b7c9ccb 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/020_restconf_topology.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/020_restconf_topology.robot @@ -1,21 +1,30 @@ *** Settings *** -Documentation Test suite for RESTCONF Topology -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../variables/openflowplugin/Variables.robot -Resource ../../../libraries/Utils.robot +Documentation Test suite for RESTCONF Topology + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot +Resource ../../../libraries/Utils.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions + *** Variables *** -@{node_list} openflow:1 openflow:2 openflow:3 +@{node_list} openflow:1 openflow:2 openflow:3 + *** Test Cases *** Get RESTCONF Topology [Documentation] Get RESTCONF Topology and validate the result. - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_TOPO_API} ${node_list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_OPERATIONAL_TOPO_API} + ... ${node_list} ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} @@ -51,10 +60,10 @@ Link Down # shot in the dark. maybe the "link s1 s2 down" really didn't take the link(s) down? # hopefully this output below will show that. Write sh ovs-vsctl find Interface name="s1-eth1" - ${output}= Read Until mininet> + ${output} Read Until mininet> Log ${output} Write sh ovs-vsctl find Interface name="s1-eth2" - ${output}= Read Until mininet> + ${output} Read Until mininet> Log ${output} Link Up @@ -70,7 +79,12 @@ Remove Port Write sh ovs-vsctl del-port s2 s2-eth2 Read Until mininet> @{list} Create List openflow:2:2 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_OPERATIONAL_TOPO_API} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements Not At URI + ... ${RFC8040_OPERATIONAL_TOPO_API} + ... ${list} Add Port [Documentation] Add port s2-eth2, new id 5 @@ -80,6 +94,7 @@ Add Port @{list} Create List openflow:2:5 Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_TOPO_API} ${list} + *** Keywords *** Verify Links [Arguments] ${expected_links} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/030_restconf_statistics.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/030_restconf_statistics.robot index e2d9162442..7eb14b71d6 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/030_restconf_statistics.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/030_restconf_statistics.robot @@ -1,21 +1,30 @@ *** Settings *** -Documentation Test suite for RESTCONF statistics -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../libraries/Utils.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for RESTCONF statistics + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions + *** Variables *** -@{node_list} openflow:1 openflow:2 openflow:3 +@{node_list} openflow:1 openflow:2 openflow:3 + *** Test Cases *** Get Stats for all nodes [Documentation] Get the stats for all nodes - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${node_list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_OPERATIONAL_NODES_API} + ... ${node_list} Get Stats for node 1 [Documentation] Get the stats for a node diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/040_restconf_frm.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/040_restconf_frm.robot index a052f3f637..9e735dde9f 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/040_restconf_frm.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/040_restconf_frm.robot @@ -1,47 +1,72 @@ *** Settings *** -Documentation Test suite for RESTCONF FRM -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../libraries/Utils.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for RESTCONF FRM + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions + *** Variables *** -${BODY2} 2Foo204810.0.20.1/32152000openflow:1:1 +${BODY2} +... 2Foo204810.0.20.1/32152000openflow:1:1 + *** Test Cases *** Add a flow - Output to physical port# [Documentation] Push a flow through REST-API - ${resp} RequestsLibrary.Put Request session ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152 headers=${HEADERS_XML} data=${BODY2} + ${resp} RequestsLibrary.Put Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152 + ... headers=${HEADERS_XML} + ... data=${BODY2} BuiltIn.Should_Match "${resp.status_code}" "20?" Verify after adding flow config - Output to physical port# [Documentation] Verify the flow - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=config + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=config Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.text} 152 Verify after adding flow operational - Output to physical port# [Documentation] Verify the flow - ${elements}= Create List 10.0.20.1 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152?content=nonconfig ${elements} + ${elements} Create List 10.0.20.1 + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152?content=nonconfig + ... ${elements} Remove a flow - Output to physical port# [Documentation] Remove a flow - ${resp} RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152 + ${resp} RequestsLibrary.Delete Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0/flow=152 Should Be Equal As Strings ${resp.status_code} 204 Verify after deleting flow config - Output to physical port# [Documentation] Verify the flow - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=config + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=config Should Be Equal As Strings ${resp.status_code} 200 Should Not Contain ${resp.text} 152 # Standing bug #368 - This has been fixed Verify after deleting flow operational - Output to physical port# [Documentation] Verify the flow - ${elements}= Create List 10.0.20.1 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=nonconfig ${elements} + ${elements} Create List 10.0.20.1 + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements Not At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=0?content=nonconfig + ... ${elements} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/__init__.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/__init__.robot index 2442f0b9f4..e35ad233ac 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF10/__init__.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF10/__init__.robot @@ -1,9 +1,12 @@ *** Settings *** -Documentation Test suite for MD-SAL NSF -Suite Setup Start Mininet -Suite Teardown Stop Mininet -Library SSHLibrary -Resource ../../../libraries/Utils.robot +Documentation Test suite for MD-SAL NSF + +Library SSHLibrary +Resource ../../../libraries/Utils.robot + +Suite Setup Start Mininet +Suite Teardown Stop Mininet + *** Variables *** -${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,2 --switch ovsk,protocols=OpenFlow13 +${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,2 --switch ovsk,protocols=OpenFlow13 diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/010_restconf_inventory.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/010_restconf_inventory.robot index b56a8c2c6f..6121f5c712 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/010_restconf_inventory.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/010_restconf_inventory.robot @@ -1,65 +1,119 @@ *** Settings *** -Documentation Test suite for RESTCONF inventory -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../libraries/Utils.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for RESTCONF inventory + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions + *** Variables *** -${VENDOR} Nicira, Inc. -${HARDWARE} Open vSwitch -@{node_list} openflow:1 openflow:2 openflow:3 -${SW_IPADDRESS} "flow-node-inventory:ip-address":"${TOOLS_SYSTEM_IP}" -${SW_VENDOR} "flow-node-inventory:manufacturer":"${VENDOR}" -${SW_HARDWARE} "flow-node-inventory:hardware":"${HARDWARE}" -@{SW_CAPABILITIES} "flow-node-inventory:flow-feature-capability-flow-stats" "flow-node-inventory:flow-feature-capability-table-stats" "flow-node-inventory:flow-feature-capability-port-stats" "flow-node-inventory:flow-feature-capability-queue-stats" +${VENDOR} Nicira, Inc. +${HARDWARE} Open vSwitch +@{node_list} openflow:1 openflow:2 openflow:3 +${SW_IPADDRESS} "flow-node-inventory:ip-address":"${TOOLS_SYSTEM_IP}" +${SW_VENDOR} "flow-node-inventory:manufacturer":"${VENDOR}" +${SW_HARDWARE} "flow-node-inventory:hardware":"${HARDWARE}" +@{SW_CAPABILITIES} +... "flow-node-inventory:flow-feature-capability-flow-stats" +... "flow-node-inventory:flow-feature-capability-table-stats" +... "flow-node-inventory:flow-feature-capability-port-stats" +... "flow-node-inventory:flow-feature-capability-queue-stats" + *** Test Cases *** Get list of nodes [Documentation] Get the inventory - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${node_list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_OPERATIONAL_NODES_API} + ... ${node_list} Check No Link Down [Documentation] Check there is no link down. We have 8 ports in total: s1=2, s2=3, s3=3. - Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} "link-down":false 8 + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Specific Number Of Elements At URI + ... ${RFC8040_OPERATIONAL_NODES_API} + ... "link-down":false + ... 8 Get node 1 inventory [Documentation] Get the inventory for a node ${list} Create List @{SW_CAPABILITIES} ${SW_VENDOR} ${SW_IPADDRESS} ${SW_HARDWARE} openflow:1:1 ... openflow:1:2 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} Get node 2 inventory [Documentation] Get the inventory for a node ${list} Create List @{SW_CAPABILITIES} ${SW_VENDOR} ${SW_IPADDRESS} ${SW_HARDWARE} openflow:2:1 ... openflow:2:2 openflow:2:3 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A2?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} Get node 3 inventory [Documentation] Get the inventory for a node ${list} Create List @{SW_CAPABILITIES} ${SW_VENDOR} ${SW_IPADDRESS} ${SW_HARDWARE} openflow:3:1 ... openflow:3:2 openflow:3:3 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A3?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} Link Down [Documentation] Take link s1-s2 down Write link s1 s2 down Read Until mininet> @{list} Create List "link-down":true - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} Link Up [Documentation] Take link s1-s2 up Write link s1 s2 up Read Until mininet> @{list} Create List "link-down":false - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} ${list} - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1/node-connector=openflow%3A1%3A1?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A2/node-connector=openflow%3A2%3A3?${RFC8040_OPERATIONAL_CONTENT} + ... ${list} Remove Port [Documentation] Remove port s2-eth1 @@ -67,7 +121,12 @@ Remove Port Write sh ovs-vsctl del-port s2 s2-eth1 Read Until mininet> @{list} Create List openflow:2:1 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements Not At URI + ... ${RFC8040_OPERATIONAL_NODES_API} + ... ${list} Add Port [Documentation] Add port s2-eth1, new id 4 @@ -75,4 +134,9 @@ Add Port Write sh ovs-vsctl add-port s2 s2-eth1 Read Until mininet> @{list} Create List openflow:2:4 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_OPERATIONAL_NODES_API} + ... ${list} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/020_restconf_topology.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/020_restconf_topology.robot index 78cedcbe9d..129e642990 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/020_restconf_topology.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/020_restconf_topology.robot @@ -1,21 +1,30 @@ *** Settings *** -Documentation Test suite for RESTCONF Topology -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../variables/openflowplugin/Variables.robot -Resource ../../../libraries/Utils.robot +Documentation Test suite for RESTCONF Topology + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot +Resource ../../../libraries/Utils.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS} +Suite Teardown Delete All Sessions + *** Variables *** -@{node_list} openflow:1 openflow:2 openflow:3 +@{node_list} openflow:1 openflow:2 openflow:3 + *** Test Cases *** Get RESTCONF Topology [Documentation] Get RESTCONF Topology and validate the result. - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_TOPO_API} ${node_list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_OPERATIONAL_TOPO_API} + ... ${node_list} ${resp} RequestsLibrary.Get Request session ${RFC8040_OPERATIONAL_TOPO_API} Log ${resp.text} @@ -51,10 +60,10 @@ Link Down # shot in the dark. maybe the "link s1 s2 down" really didn't take the link(s) down? # hopefully this output below will show that. Write sh ovs-vsctl find Interface name="s1-eth1" - ${output}= Read Until mininet> + ${output} Read Until mininet> Log ${output} Write sh ovs-vsctl find Interface name="s1-eth2" - ${output}= Read Until mininet> + ${output} Read Until mininet> Log ${output} Link Up @@ -70,7 +79,12 @@ Remove Port Write sh ovs-vsctl del-port s2 s2-eth2 Read Until mininet> @{list} Create List openflow%3A2%3A2 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_OPERATIONAL_TOPO_API} ${list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements Not At URI + ... ${RFC8040_OPERATIONAL_TOPO_API} + ... ${list} Add Port [Documentation] Add port s2-eth2, new id 5 @@ -80,6 +94,7 @@ Add Port @{list} Create List openflow%3A2%3A5 Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_TOPO_API} ${list} + *** Keywords *** Verify Links [Arguments] ${expected_links} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/030_restconf_statistics.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/030_restconf_statistics.robot index e2d9162442..7eb14b71d6 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/030_restconf_statistics.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/030_restconf_statistics.robot @@ -1,21 +1,30 @@ *** Settings *** -Documentation Test suite for RESTCONF statistics -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../libraries/Utils.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for RESTCONF statistics + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions + *** Variables *** -@{node_list} openflow:1 openflow:2 openflow:3 +@{node_list} openflow:1 openflow:2 openflow:3 + *** Test Cases *** Get Stats for all nodes [Documentation] Get the stats for all nodes - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${node_list} + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_OPERATIONAL_NODES_API} + ... ${node_list} Get Stats for node 1 [Documentation] Get the stats for a node diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot index 0269124c77..1080e741e1 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/040_restconf_frm.robot @@ -1,63 +1,100 @@ *** Settings *** -Documentation Test suite for RESTCONF FRM -Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Resource ../../../libraries/Utils.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite for RESTCONF FRM + +Library Collections +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Teardown Delete All Sessions + *** Variables *** -${BODY1} 2Foo204810.0.10.1/32139200 -${BODY2} 2Foo204810.0.20.1/32139200160 +${BODY1} +... 2Foo204810.0.10.1/32139200 +${BODY2} +... 2Foo204810.0.20.1/32139200160 + *** Test Cases *** Add a flow - Sending IPv4 Dest Address and Eth type [Documentation] Push a flow through REST-API - ${resp} RequestsLibrary.Put Request session ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139 headers=${HEADERS_XML} data=${BODY1} + ${resp} RequestsLibrary.Put Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139 + ... headers=${HEADERS_XML} + ... data=${BODY1} BuiltIn.Should_Match "${resp.status_code}" "20?" Verify after adding flow config - Sending IPv4 Dest Address and Eth type [Documentation] Verify the flow - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.text} 139 Verify after adding flow operational - Sending IPv4 Dest Address and Eth type [Documentation] Verify the flow - ${elements}= Create List 10.0.10.1 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139?content=nonconfig ${elements} + ${elements} Create List 10.0.10.1 + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139?content=nonconfig + ... ${elements} Modify a flow - Output to physical port# [Documentation] Push a flow through REST-API - ${resp} RequestsLibrary.Put Request session ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139 headers=${HEADERS_XML} data=${BODY2} + ${resp} RequestsLibrary.Put Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139 + ... headers=${HEADERS_XML} + ... data=${BODY2} Should Be Equal As Strings ${resp.status_code} 204 Verify after modifying flow config - Output to physical port# [Documentation] Verify the flow - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.text} 10.0.20.1 Verify after modifying flow operational - Output to physical port# [Documentation] Verify the flow - ${elements}= Create List 10.0.20.1 - Wait Until Keyword Succeeds 10s 2s Check For Elements At URI ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139?content=nonconfig ${elements} + ${elements} Create List 10.0.20.1 + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139?content=nonconfig + ... ${elements} Remove a flow - Output to physical port# [Documentation] Remove a flow - ${resp} RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139 + ${resp} RequestsLibrary.Delete Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2/flow=139 Should Be Equal As Strings ${resp.status_code} 204 Verify after deleting flow config - Output to physical port# [Documentation] Verify the flow - ${resp} RequestsLibrary.Get Request session ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config + ${resp} RequestsLibrary.Get Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=config Should Be Equal As Strings ${resp.status_code} 200 Should Not Contain ${resp.text} 139 Verify after deleting flow operational - Output to physical port# [Documentation] Verify the flow - ${elements}= Create List 10.0.20.1 - Wait Until Keyword Succeeds 10s 2s Check For Elements Not At URI ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=nonconfig ${elements} + ${elements} Create List 10.0.20.1 + Wait Until Keyword Succeeds + ... 10s + ... 2s + ... Check For Elements Not At URI + ... ${RFC8040_NODES_API}/node=openflow%3A1/flow-node-inventory:table=2?content=nonconfig + ... ${elements} diff --git a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/__init__.robot b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/__init__.robot index cb8582e8ad..34e6b2b2fa 100644 --- a/csit/suites/openflowplugin/MD_SAL_NSF_OF13/__init__.robot +++ b/csit/suites/openflowplugin/MD_SAL_NSF_OF13/__init__.robot @@ -1,11 +1,12 @@ *** Settings *** -Documentation Test suite for MD-SAL NSF mininet OF13 -Suite Setup Start Mininet -Suite Teardown Stop Mininet -Library SSHLibrary -Resource ../../../libraries/Utils.robot +Documentation Test suite for MD-SAL NSF mininet OF13 -*** Variables *** -${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,2 --switch ovsk,protocols=OpenFlow13 +Library SSHLibrary +Resource ../../../libraries/Utils.robot + +Suite Setup Start Mininet +Suite Teardown Stop Mininet -*** Keywords *** + +*** Variables *** +${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo tree,2 --switch ovsk,protocols=OpenFlow13 diff --git a/csit/suites/openflowplugin/Maximum_Links/010__finding_max_links.robot b/csit/suites/openflowplugin/Maximum_Links/010__finding_max_links.robot index 428b309d49..521037a228 100644 --- a/csit/suites/openflowplugin/Maximum_Links/010__finding_max_links.robot +++ b/csit/suites/openflowplugin/Maximum_Links/010__finding_max_links.robot @@ -1,16 +1,20 @@ *** Settings *** -Documentation Test suite for finding out max number of Links -Suite Setup Workflow Setup -Suite Teardown Workflow Teardown -Library OperatingSystem -Resource ../../../variables/Variables.robot -Resource ../../../libraries/WorkflowsOpenFlow.robot -Resource ../../../libraries/KarafKeywords.robot +Documentation Test suite for finding out max number of Links + +Library OperatingSystem +Resource ../../../variables/Variables.robot +Resource ../../../libraries/WorkflowsOpenFlow.robot +Resource ../../../libraries/KarafKeywords.robot + +Suite Setup Workflow Setup +Suite Teardown Workflow Teardown + *** Variables *** -@{SWITCH_LIST} ${16} ${32} ${40} ${48} ${52} +@{SWITCH_LIST} ${16} ${32} ${40} ${48} ${52} ${LINKS_RESULT_FILE} links.csv -${TIME_RESULT_FILE} time.csv +${TIME_RESULT_FILE} time.csv + *** Test Cases *** Find Max Links @@ -20,8 +24,9 @@ Find Max Links ${maximum_links}= Set Variable ${0} ${discover_time}= Set Variable 0 FOR ${switches} IN @{SWITCH_LIST} - ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Full Mesh Topology ${switches} - Exit For Loop If '${status}' == 'FAIL' + ${status} ${error_message} ${topology_discover_time}= WorkflowsOpenFlow.Workflow Full Mesh Topology + ... ${switches} + IF '${status}' == 'FAIL' BREAK ${maximum_links}= Evaluate ${switches} * ${switches-1} ${discover_time}= Set Variable ${topology_discover_time} END diff --git a/csit/suites/openflowplugin/Maximum_Switches/010__finding_max_switches.robot b/csit/suites/openflowplugin/Maximum_Switches/010__finding_max_switches.robot index 74ee2ebf50..1cfa4f8c8a 100644 --- a/csit/suites/openflowplugin/Maximum_Switches/010__finding_max_switches.robot +++ b/csit/suites/openflowplugin/Maximum_Switches/010__finding_max_switches.robot @@ -1,18 +1,22 @@ *** Settings *** -Documentation Test suite for finding out max number of switches -Suite Setup Workflow Setup -Suite Teardown Workflow Teardown -Library OperatingSystem -Resource ../../../variables/Variables.robot -Resource ../../../libraries/WorkflowsOpenFlow.robot -Resource ../../../libraries/KarafKeywords.robot +Documentation Test suite for finding out max number of switches + +Library OperatingSystem +Resource ../../../variables/Variables.robot +Resource ../../../libraries/WorkflowsOpenFlow.robot +Resource ../../../libraries/KarafKeywords.robot + +Suite Setup Workflow Setup +Suite Teardown Workflow Teardown + *** Variables *** -${MIN_SWITCHES} 100 -${MAX_SWITCHES} 800 -${STEP_SWITCHES} 100 -${SWITCHES_RESULT_FILE} switches.csv -${TIME_RESULT_FILE} time.csv +${MIN_SWITCHES} 100 +${MAX_SWITCHES} 800 +${STEP_SWITCHES} 100 +${SWITCHES_RESULT_FILE} switches.csv +${TIME_RESULT_FILE} time.csv + *** Test Cases *** Find Max Switches @@ -24,8 +28,9 @@ Find Max Switches ${stop}= Convert to Integer ${MAX_SWITCHES} ${step}= Convert to Integer ${STEP_SWITCHES} FOR ${switches} IN RANGE ${start} ${stop+1} ${step} - ${status} ${error_message} ${topology_discover_time} WorkflowsOpenFlow.Workflow Linear Topology ${switches} - Exit For Loop If '${status}' == 'FAIL' + ${status} ${error_message} ${topology_discover_time}= WorkflowsOpenFlow.Workflow Linear Topology + ... ${switches} + IF '${status}' == 'FAIL' BREAK ${maximum_switches}= Set variable ${switches} ${discover_time}= Set Variable ${topology_discover_time} END diff --git a/csit/suites/openflowplugin/Maximum_Switches/020__find_max_switches.robot b/csit/suites/openflowplugin/Maximum_Switches/020__find_max_switches.robot index 27140293f2..35a33799df 100644 --- a/csit/suites/openflowplugin/Maximum_Switches/020__find_max_switches.robot +++ b/csit/suites/openflowplugin/Maximum_Switches/020__find_max_switches.robot @@ -1,20 +1,24 @@ *** Settings *** -Documentation Test suite to find maximum switches which can be connected to the controller -Suite Setup Start Suite -Suite Teardown Utils.Stop Mininet -Library SSHLibrary -Resource ../../../libraries/Utils.robot -Variables ../../../variables/Variables.py -Library ../../../libraries/ScaleClient.py -Library OperatingSystem +Documentation Test suite to find maximum switches which can be connected to the controller + +Library SSHLibrary +Resource ../../../libraries/Utils.robot +Variables ../../../variables/Variables.py +Library ../../../libraries/ScaleClient.py +Library OperatingSystem + +Suite Setup Start Suite +Suite Teardown Utils.Stop Mininet + *** Variables *** -${start} sudo python DynamicMininet.py -${max_sw} 500 -${step_sw} 10 -${init_sw} 10 -${max_found} 0 -${outfile} max_found.csv +${start} sudo python DynamicMininet.py +${max_sw} 500 +${step_sw} 10 +${init_sw} 10 +${max_found} 0 +${outfile} max_found.csv + *** Test Cases *** Find Max Switches @@ -24,17 +28,18 @@ Find Max Switches ${step_sw} Convert to Integer ${step_sw} FOR ${exp_sw} IN RANGE ${init_sw} ${max_sw+1} ${step_sw} BuiltIn.Wait Until Keyword Succeeds 120s 1s Verify Switches Connected ${exp_sw} - ${max_found}= Set Variable ${exp_sw} + ${max_found} Set Variable ${exp_sw} Set Suite variable ${max_found} Add Switches 10 END [Teardown] Log Store Max Found + *** Keywords *** Start Suite [Documentation] Starts mininet with requested number of switches Log Start the test on the base edition - ${mininet_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${TOOLS_SYSTEM_PROMPT} timeout=1800 + ${mininet_conn_id} Open Connection ${TOOLS_SYSTEM_IP} prompt=${TOOLS_SYSTEM_PROMPT} timeout=1800 Set Suite Variable ${mininet_conn_id} Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any Put File ${CURDIR}/../../../libraries/DynamicMininet.py DynamicMininet.py @@ -47,15 +52,15 @@ Start Suite Wait Until Keyword Succeeds 10s 1s Verify Switches Connected ${init_sw} Add Switches - [Arguments] ${nr_switches} [Documentation] Adds requested number of switches to the network + [Arguments] ${nr_switches} Write add_switches ${nr_switches} Read Until mininet> Verify Switches Connected - [Arguments] ${exp_switches} [Documentation] Verifies if switches are connected/present in operational inventory - ${sw} ${rep} ${found}= Flow Stats Collected controller=${ODL_SYSTEM_IP} + [Arguments] ${exp_switches} + ${sw} ${rep} ${found} Flow Stats Collected controller=${ODL_SYSTEM_IP} Should Be Equal As Numbers ${sw} ${exp_switches} Log Store Max Found diff --git a/csit/suites/openflowplugin/Performance/010_Cbench.robot b/csit/suites/openflowplugin/Performance/010_Cbench.robot index 2113232748..056101a3bf 100644 --- a/csit/suites/openflowplugin/Performance/010_Cbench.robot +++ b/csit/suites/openflowplugin/Performance/010_Cbench.robot @@ -1,32 +1,37 @@ *** Settings *** -Documentation Cbench Latency and Throughput tests can be run from an external -... cbench. -... If cbench is run with a medium number of switches or higher (e.g. 32+) -... the normal openflow operations seem to break. -... BUG: https://bugs.opendaylight.org/show_bug.cgi?id=2897 -Suite Setup Cbench Suite Setup -Test Teardown Log Results As Zero If Cbench Timed Out -Force Tags cbench -Library String -Library Process -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/KarafKeywords.robot +Documentation Cbench Latency and Throughput tests can be run from an external +... cbench. +... If cbench is run with a medium number of switches or higher (e.g. 32+) +... the normal openflow operations seem to break. +... BUG: https://bugs.opendaylight.org/show_bug.cgi?id=2897 + +Library String +Library Process +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/KarafKeywords.robot + +Suite Setup Cbench Suite Setup +Test Teardown Log Results As Zero If Cbench Timed Out + +Force Tags cbench + *** Variables *** -${log_level} ERROR -${throughput_threshold} 30000 -${latency_threshold} 10000 -${switch_count} 16 -${duration_in_secs} 10 -${loops} 10 -${num_of_unique_macs} 100 -${start_delay} 5000 -${test_delay} 0 -${of_port} 6633 -${cbench_system} ${TOOLS_SYSTEM_IP} -${cbench_executable} /usr/local/bin/cbench -${throughput_results_file} throughput.csv -${latency_results_file} latency.csv +${log_level} ERROR +${throughput_threshold} 30000 +${latency_threshold} 10000 +${switch_count} 16 +${duration_in_secs} 10 +${loops} 10 +${num_of_unique_macs} 100 +${start_delay} 5000 +${test_delay} 0 +${of_port} 6633 +${cbench_system} ${TOOLS_SYSTEM_IP} +${cbench_executable} /usr/local/bin/cbench +${throughput_results_file} throughput.csv +${latency_results_file} latency.csv + *** Test Cases *** Cbench Latency Test @@ -34,8 +39,12 @@ Cbench Latency Test ... on the pybot command line [Tags] latency [Timeout] ${test_timeout} - Log Cbench tests using ${loops} iterations of ${duration_in_secs} second tests. Switch Count: ${switch_count}. Unique MACS to cycle: ${num_of_unique_macs} - Run Cbench And Log Results -m ${duration_in_ms} -M ${num_of_unique_macs} -S ${switch_count} -l ${loops} -D ${start_delay} -p ${of_port} ${latency_threshold} ${latency_results_file} + Log + ... Cbench tests using ${loops} iterations of ${duration_in_secs} second tests. Switch Count: ${switch_count}. Unique MACS to cycle: ${num_of_unique_macs} + Run Cbench And Log Results + ... -m ${duration_in_ms} -M ${num_of_unique_macs} -S ${switch_count} -l ${loops} -D ${start_delay} -p ${of_port} + ... ${latency_threshold} + ... ${latency_results_file} # We have to give some time for the controller to recover. See bug 6176. Sleep ${test_delay} @@ -44,8 +53,12 @@ Cbench Throughput Test ... on the pybot command line [Tags] throughput [Timeout] ${test_timeout} - Log Cbench tests using ${loops} iterations of ${duration_in_secs} second tests. Switch Count: ${switch_count}. Unique MACS to cycle: ${num_of_unique_macs} - Run Cbench And Log Results -t -m ${duration_in_ms} -M ${num_of_unique_macs} -S ${switch_count} -l ${loops} -D ${start_delay} -p ${of_port} ${throughput_threshold} ${throughput_results_file} + Log + ... Cbench tests using ${loops} iterations of ${duration_in_secs} second tests. Switch Count: ${switch_count}. Unique MACS to cycle: ${num_of_unique_macs} + Run Cbench And Log Results + ... -t -m ${duration_in_ms} -M ${num_of_unique_macs} -S ${switch_count} -l ${loops} -D ${start_delay} -p ${of_port} + ... ${throughput_threshold} + ... ${throughput_results_file} # We have to give some time for the controller to recover. See bug 6176. Sleep ${test_delay} @@ -53,12 +66,17 @@ Rerun Latency Test To Check Bug 6176 [Documentation] cbench executed in latency mode to see if controller is healthy [Tags] latency [Timeout] ${test_timeout} - Log Cbench tests using ${loops} iterations of ${duration_in_secs} second tests. Switch Count: ${switch_count}. Unique MACS to cycle: ${num_of_unique_macs} - Run Cbench And Log Results -m ${duration_in_ms} -M ${num_of_unique_macs} -S ${switch_count} -l ${loops} -D ${start_delay} -p ${of_port} ${latency_threshold} bug.csv + Log + ... Cbench tests using ${loops} iterations of ${duration_in_secs} second tests. Switch Count: ${switch_count}. Unique MACS to cycle: ${num_of_unique_macs} + Run Cbench And Log Results + ... -m ${duration_in_ms} -M ${num_of_unique_macs} -S ${switch_count} -l ${loops} -D ${start_delay} -p ${of_port} + ... ${latency_threshold} + ... bug.csv # We have to give some time for the controller to recover. See bug 6176. Sleep ${test_delay} [Teardown] Report_Failure_Due_To_Bug 6176 + *** Keywords *** Run Cbench And Log Results [Arguments] ${cbench_args} ${average_threshold} ${output_filename}=results.csv @@ -66,9 +84,16 @@ Run Cbench And Log Results ##down can catch this problem and log the results as zero. However, we need to know which ##file to log to, so setting it as a suite variable here. Set Suite Variable ${output_filename} - ${output}= Run Keyword If "${cbench_system}" == "localhost" Run ${cbench_executable} -c ${ODL_SYSTEM_IP} ${cbench_args} - ... ELSE Run Command On Remote System ${cbench_system} ${cbench_executable} -c ${ODL_SYSTEM_IP} ${cbench_args} prompt_timeout=${test_timeout} return_stdout=False - ... return_stderr=True + IF "${cbench_system}" == "localhost" + ${output}= Run ${cbench_executable} -c ${ODL_SYSTEM_IP} ${cbench_args} + ELSE + ${output}= Run Command On Remote System + ... ${cbench_system} + ... ${cbench_executable} -c ${ODL_SYSTEM_IP} ${cbench_args} + ... prompt_timeout=${test_timeout} + ... return_stdout=False + ... return_stderr=True + END Log ${output} Should Contain ${output} RESULT ${result_line}= Get Lines Containing String ${output} RESULT @@ -93,13 +118,16 @@ Cbench Suite Setup Wait Until Keyword Succeeds 3x 1s KarafKeywords.Issue Command On Karaf Console log:set ${log_level} Append To File ${latency_results_file} LATENCY_MIN,LATENCY_MAX,LATENCY_AVERAGE\n Append To File ${throughput_results_file} THROUGHPUT_MIN,THROUGHPUT_MAX,THROUGHPUT_AVERAGE\n - ${duration_in_ms} Evaluate ${duration_in_secs} * 1000 + ${duration_in_ms}= Evaluate ${duration_in_secs} * 1000 Set Suite Variable ${duration_in_ms} ##Setting the test timeout dynamically in case larger values on command line override default - ${test_timeout} Evaluate (${loops} * ${duration_in_secs}) * 1.5 + ${test_timeout}= Evaluate (${loops} * ${duration_in_secs}) * 1.5 Set Suite Variable ${test_timeout} - Run Keyword If "${cbench_system}" == "localhost" OperatingSystem.File Should Exist ${cbench_executable} - ... ELSE Verify File Exists On Remote System ${cbench_system} ${cbench_executable} + IF "${cbench_system}" == "localhost" + OperatingSystem.File Should Exist ${cbench_executable} + ELSE + Verify File Exists On Remote System ${cbench_system} ${cbench_executable} + END Should Be True ${loops} >= 2 If number of loops is less than 2, cbench will not run Verify Feature Is Installed odl-openflowplugin-drop-test Issue Command On Karaf Console dropallpacketsrpc on @@ -107,7 +135,9 @@ Cbench Suite Setup Log Results And Determine Status [Arguments] ${min} ${max} ${average} ${threshold} ${output_file} Append To File ${output_file} ${min},${max},${average}\n - Should Be True ${average} > ${threshold} ${average} flow_mods per/sec did not exceed threshold of ${threshold} + Should Be True + ... ${average} > ${threshold} + ... ${average} flow_mods per/sec did not exceed threshold of ${threshold} Log Results As Zero If Cbench Timed Out Run Keyword If Timeout Occurred Log Results And Determine Status 0 0 0 0 ${output_filename} diff --git a/csit/suites/openflowplugin/Performance_Bulkomatic/100K_Flows_100DPN_1Node_Perf_Test.robot b/csit/suites/openflowplugin/Performance_Bulkomatic/100K_Flows_100DPN_1Node_Perf_Test.robot index eddceec684..569f00ffdb 100644 --- a/csit/suites/openflowplugin/Performance_Bulkomatic/100K_Flows_100DPN_1Node_Perf_Test.robot +++ b/csit/suites/openflowplugin/Performance_Bulkomatic/100K_Flows_100DPN_1Node_Perf_Test.robot @@ -1,28 +1,32 @@ *** 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 -Resource ../../../libraries/BulkomaticKeywords.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Variables ../../../variables/Variables.py +Documentation Test suite for 3Node Cluster - 100K flows and 10 DPNs in Cluster Scale Up scenario + +Library DateTime +Library OperatingSystem +Resource ../../../libraries/BulkomaticKeywords.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Variables ../../../variables/Variables.py + +Suite Setup ClusterManagement Setup +Suite Teardown Delete All Sessions + *** Variables *** -${enable_openflow_tls} True -${operation_timeout} 250s -${oper_ds_timeout} 400s -${mininet_timeout} 120s +${enable_openflow_tls} True +${operation_timeout} 250s +${oper_ds_timeout} 400s +${mininet_timeout} 120s ${flow_count_per_switch} 1000 -${switch_count} 100 -${karaf_log_level} log:set WARN -${orig_json_config_add} sal_add_bulk_flow_config.json -${orig_json_config_get} sal_get_bulk_flow_config.json -${orig_json_config_del} sal_del_bulk_flow_config.json -${rate_results_file} rate.csv -${time_results_file} time.csv +${switch_count} 100 +${karaf_log_level} log:set WARN +${orig_json_config_add} sal_add_bulk_flow_config.json +${orig_json_config_get} sal_get_bulk_flow_config.json +${orig_json_config_del} sal_del_bulk_flow_config.json +${rate_results_file} rate.csv +${time_results_file} time.csv + *** Test Cases *** Initialize Variables @@ -30,20 +34,37 @@ Initialize Variables 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} - ${temp_json_config_add} BulkomaticKeywords.Set DPN And Flow Count In Json Add ${orig_json_config_add} ${switch_count} ${flow_count_per_switch} - ${temp_json_config_get} BulkomaticKeywords.Set DPN And Flow Count In Json Get ${orig_json_config_get} ${switch_count} ${flow_count_after_add} - ${temp_json_config_del} BulkomaticKeywords.Set DPN And Flow Count In Json Del ${orig_json_config_del} ${switch_count} ${flow_count_per_switch} + ${temp_json_config_add}= BulkomaticKeywords.Set DPN And Flow Count In Json Add + ... ${orig_json_config_add} + ... ${switch_count} + ... ${flow_count_per_switch} + ${temp_json_config_get}= BulkomaticKeywords.Set DPN And Flow Count In Json Get + ... ${orig_json_config_get} + ... ${switch_count} + ... ${flow_count_after_add} + ${temp_json_config_del}= BulkomaticKeywords.Set DPN And Flow Count In Json Del + ... ${orig_json_config_del} + ... ${switch_count} + ... ${flow_count_per_switch} BuiltIn.Set Suite Variable ${temp_json_config_add} BuiltIn.Set Suite Variable ${temp_json_config_get} BuiltIn.Set Suite Variable ${temp_json_config_del} Start Mininet And verify Switches [Documentation] Start mininet, controller OF port 6653 should be enabled for TLS while port 6633 should be for TCP. - ${ofport} Set Variable If '${enable_openflow_tls}' == 'True' 6653 6633 - ${protocol} Set Variable If '${enable_openflow_tls}' == 'True' ssl tcp - ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers options=--topo linear,${switch_count} ofport=${ofport} protocol=${protocol} + ${ofport}= Set Variable If '${enable_openflow_tls}' == 'True' 6653 6633 + ${protocol}= Set Variable If '${enable_openflow_tls}' == 'True' ssl tcp + ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers + ... options=--topo linear,${switch_count} + ... ofport=${ofport} + ... protocol=${protocol} 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 + BuiltIn.Wait Until Keyword Succeeds + ... ${mininet_timeout} + ... 2s + ... ClusterOpenFlow.Verify_Switch_Connections_Running_On_Member + ... ${switch_count} + ... 1 Comment Fail the entire suite if switches cannot connect [Teardown] Run Keyword If Test Failed Fatal Error @@ -52,7 +73,9 @@ Add Bulk Flow ${config_datastore_write_start_time}= DateTime.Get Current Date result_format=timestamp BulkomaticKeywords.Add Bulk Flow In Node ${temp_json_config_add} 1 ${operation_timeout} ${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_time}= DateTime.Subtract Date From Date + ... ${config_datastore_write_end_time} + ... ${config_datastore_write_start_time} ${config_datastore_write_rate}= BuiltIn.Evaluate ${flow_count_after_add} / ${config_datastore_write_time} BuiltIn.Set Suite Variable ${config_datastore_write_start_time} BuiltIn.Log to console ${\n} @@ -64,9 +87,14 @@ 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} ${flow_count_after_add} ${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_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} BuiltIn.Log to console ${\n} BuiltIn.Log to console The Mininet_write_time is ${Mininet_write_time} @@ -76,9 +104,16 @@ Verify Flows In Switch 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_after_add} 1 + BuiltIn.Wait Until Keyword Succeeds + ... ${oper_ds_timeout} + ... 2s + ... ClusterOpenFlow.Check_Flows_Operational_Datastore_On_Member + ... ${flow_count_after_add} + ... 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_time}= DateTime.Subtract Date From Date + ... ${oper_datastore_write_end_time} + ... ${config_datastore_write_start_time} ${oper_datastore_write_rate}= BuiltIn.Evaluate ${flow_count_after_add} / ${oper_datastore_write_time} BuiltIn.Log to console ${\n} BuiltIn.Log to console The operational_datastore_write_time is ${oper_datastore_write_time} @@ -89,14 +124,21 @@ Verify Flows In Oper DS 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 + 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 BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} 1 ${operation_timeout} ${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_time}= Subtract Date From Date + ... ${config_datastore_delete_end_time} + ... ${config_datastore_delete_start_time} ${config_datastore_delete_rate}= Evaluate ${flow_count_after_add} / ${config_datastore_delete_time} BuiltIn.Log to console ${\n} BuiltIn.Log to console The config_datastore_delete_time is ${config_datastore_delete_time} @@ -107,6 +149,10 @@ Delete All Flows 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 + ... ${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 + 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_Bulkomatic/100K_Flows_100DPN_3Node_Cluster_Perf_Test.robot b/csit/suites/openflowplugin/Performance_Bulkomatic/100K_Flows_100DPN_3Node_Cluster_Perf_Test.robot index d5f6bb20b3..76f03d7f7a 100644 --- a/csit/suites/openflowplugin/Performance_Bulkomatic/100K_Flows_100DPN_3Node_Cluster_Perf_Test.robot +++ b/csit/suites/openflowplugin/Performance_Bulkomatic/100K_Flows_100DPN_3Node_Cluster_Perf_Test.robot @@ -1,27 +1,31 @@ *** 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 -Resource ../../../libraries/BulkomaticKeywords.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/ClusterOpenFlow.robot -Variables ../../../variables/Variables.py +Documentation Test suite for 3Node Cluster - 100K flows and 10 DPNs in Cluster Scale Up scenario + +Library DateTime +Library OperatingSystem +Resource ../../../libraries/BulkomaticKeywords.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Variables ../../../variables/Variables.py + +Suite Setup ClusterManagement Setup +Suite Teardown Delete All Sessions + *** Variables *** -${operation_timeout} 250s -${oper_ds_timeout} 400s -${mininet_timeout} 120s +${operation_timeout} 250s +${oper_ds_timeout} 400s +${mininet_timeout} 120s ${flow_count_per_switch} 1000 -${switch_count} 100 -${karaf_log_level} log:set WARN -${orig_json_config_add} sal_add_bulk_flow_config.json -${orig_json_config_get} sal_get_bulk_flow_config.json -${orig_json_config_del} sal_del_bulk_flow_config.json -${rate_results_file} rate.csv -${time_results_file} time.csv +${switch_count} 100 +${karaf_log_level} log:set WARN +${orig_json_config_add} sal_add_bulk_flow_config.json +${orig_json_config_get} sal_get_bulk_flow_config.json +${orig_json_config_del} sal_del_bulk_flow_config.json +${rate_results_file} rate.csv +${time_results_file} time.csv + *** Test Cases *** Check Shards Status And Initialize Variables @@ -30,16 +34,25 @@ Check Shards Status And Initialize Variables 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} - ${temp_json_config_add} BulkomaticKeywords.Set DPN And Flow Count In Json Add ${orig_json_config_add} ${switch_count} ${flow_count_per_switch} - ${temp_json_config_get} BulkomaticKeywords.Set DPN And Flow Count In Json Get ${orig_json_config_get} ${switch_count} ${flow_count_after_add} - ${temp_json_config_del} BulkomaticKeywords.Set DPN And Flow Count In Json Del ${orig_json_config_del} ${switch_count} ${flow_count_per_switch} + ${temp_json_config_add}= BulkomaticKeywords.Set DPN And Flow Count In Json Add + ... ${orig_json_config_add} + ... ${switch_count} + ... ${flow_count_per_switch} + ${temp_json_config_get}= BulkomaticKeywords.Set DPN And Flow Count In Json Get + ... ${orig_json_config_get} + ... ${switch_count} + ... ${flow_count_after_add} + ${temp_json_config_del}= BulkomaticKeywords.Set DPN And Flow Count In Json Del + ... ${orig_json_config_del} + ... ${switch_count} + ... ${flow_count_per_switch} BuiltIn.Set Suite Variable ${temp_json_config_add} BuiltIn.Set Suite Variable ${temp_json_config_get} BuiltIn.Set Suite Variable ${temp_json_config_del} 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 + ${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 BuiltIn.Log to console ${\n} @@ -52,16 +65,26 @@ Get Inventory Config Shard Follower And Leader 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} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_1}_IP} + ... --topo linear,${switch_count} 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} + BuiltIn.Wait Until Keyword Succeeds + ... ${mininet_timeout} + ... 2s + ... ClusterOpenFlow.Verify_Switch_Connections_Running_On_Member + ... ${switch_count} + ... ${Inventory_Leader} Add Bulk Flow 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 BulkomaticKeywords.Add Bulk Flow In Node ${temp_json_config_add} ${Follower_Node_2} ${operation_timeout} ${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_time}= DateTime.Subtract Date From Date + ... ${config_datastore_write_end_time} + ... ${config_datastore_write_start_time} ${config_datastore_write_rate}= BuiltIn.Evaluate ${flow_count_after_add} / ${config_datastore_write_time} BuiltIn.Set Suite Variable ${config_datastore_write_start_time} BuiltIn.Log to console ${\n} @@ -73,9 +96,14 @@ 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} ${flow_count_after_add} ${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_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} BuiltIn.Log to console ${\n} BuiltIn.Log to console The Mininet_write_time is ${Mininet_write_time} @@ -85,9 +113,16 @@ Verify Flows In Switch 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_after_add} ${Inventory_Leader} + Wait Until Keyword Succeeds + ... ${oper_ds_timeout} + ... 2s + ... ClusterOpenFlow.Check_Flows_Operational_Datastore_On_Member + ... ${flow_count_after_add} + ... ${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_time}= DateTime.Subtract Date From Date + ... ${oper_datastore_write_end_time} + ... ${config_datastore_write_start_time} ${oper_datastore_write_rate}= BuiltIn.Evaluate ${flow_count_after_add} / ${oper_datastore_write_time} BuiltIn.Log to console ${\n} BuiltIn.Log to console The oper_datastore_write_time is ${oper_datastore_write_time} @@ -98,14 +133,24 @@ Verify Flows In Oper DS 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} + 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 - BulkomaticKeywords.Delete Bulk Flow In Node ${temp_json_config_del} ${Follower_Node_2} ${operation_timeout} + BulkomaticKeywords.Delete Bulk Flow In Node + ... ${temp_json_config_del} + ... ${Follower_Node_2} + ... ${operation_timeout} ${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_time}= Subtract Date From Date + ... ${config_datastore_delete_end_time} + ... ${config_datastore_delete_start_time} ${config_datastore_delete_rate}= Evaluate ${flow_count_after_add} / ${config_datastore_delete_time} BuiltIn.Log to console ${\n} BuiltIn.Log to console The config_datastore_delete_time is ${config_datastore_delete_time} @@ -116,6 +161,10 @@ Delete All Flows From Follower Node2 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 + ... ${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 + 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_Flow_Config/010_Rest_Config_Flows.robot b/csit/suites/openflowplugin/Performance_Flow_Config/010_Rest_Config_Flows.robot index 8e645e4f7c..bd5032e2a3 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/010_Rest_Config_Flows.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/010_Rest_Config_Flows.robot @@ -1,22 +1,29 @@ *** Settings *** -Documentation Test suite with connection of multiple switches -Suite Setup Utils.Start Mininet -Suite Teardown Utils.Stop Mininet -Library OperatingSystem -Library XML -Library Process -Library RequestsLibrary -Variables ../../../variables/Variables.py -Resource ../../../libraries/Utils.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test suite with connection of multiple switches + +Library OperatingSystem +Library XML +Library Process +Library RequestsLibrary +Variables ../../../variables/Variables.py +Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Utils.Start Mininet +Suite Teardown Utils.Stop Mininet + *** Variables *** -${switches} 25 -${flows} 2000 -${threads} 5 -${start} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${switches},1 --switch ovsk,protocols=OpenFlow13 -${PERFSCRIPT} ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/clustering-performance-test/flow_add_delete_test.py -${PARSESCRIPT} ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/clustering-performance-test/create_plot_data_files.py +${switches} 25 +${flows} 2000 +${threads} 5 +${start} +... sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${switches},1 --switch ovsk,protocols=OpenFlow13 +${PERFSCRIPT} +... ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/clustering-performance-test/flow_add_delete_test.py +${PARSESCRIPT} +... ${CURDIR}/../../../../tools/odl-mdsal-clustering-tests/clustering-performance-test/create_plot_data_files.py + *** Test Cases *** Check Switches Connected @@ -35,16 +42,24 @@ Configure And Deconfigure Flows Should Be Equal As Integers ${result.rc} 0 ${result}= Process.Run Process python ${PARSESCRIPT} + *** Keywords *** Start Http Session [Documentation] Starts http session. Log http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} - RequestsLibrary.Create Session tcsession http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} + RequestsLibrary.Create Session + ... tcsession + ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT} + ... auth=${AUTH} + ... headers=${HEADERS_XML} Are Switches Connected - [Arguments] ${switches} [Documentation] Checks Topology Contains a fix number ${switches} of switces. - ${resp}= RequestsLibrary.Get Request tcsession ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} headers=${ACCEPT_XML} + [Arguments] ${switches} + ${resp}= RequestsLibrary.Get Request + ... tcsession + ... ${RFC8040_OPERATIONAL_TOPO_FLOW1_API} + ... headers=${ACCEPT_XML} Log ${resp.content} ${count}= XML.Get Element Count ${resp.content} xpath=node Should Be Equal As Numbers ${count} ${switches} diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/020_Stats_Collection_Gauss.robot b/csit/suites/openflowplugin/Performance_Flow_Config/020_Stats_Collection_Gauss.robot index 9a39245b3e..9a28988358 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/020_Stats_Collection_Gauss.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/020_Stats_Collection_Gauss.robot @@ -1,27 +1,35 @@ *** Settings *** -Documentation Suite checks if StatMngr is able to collect flows with gaussian spread over the switches and gaussian spread over tables within the switch -Suite Setup Connect Switches -Suite Teardown Stop Switches -Library OperatingSystem -Library Collections -Library XML -Library SSHLibrary -Library RequestsLibrary -Library ../../../../csit/libraries/Common.py -Library ../../../../csit/libraries/ScaleClient.py -Variables ../../../../csit/variables/Variables.py -Resource ../../../../csit/variables/openflowplugin/Variables.robot +Documentation Suite checks if StatMngr is able to collect flows with gaussian spread over the switches and gaussian spread over tables within the switch + +Library OperatingSystem +Library Collections +Library XML +Library SSHLibrary +Library RequestsLibrary +Library ../../../../csit/libraries/Common.py +Library ../../../../csit/libraries/ScaleClient.py +Variables ../../../../csit/variables/Variables.py +Resource ../../../../csit/variables/openflowplugin/Variables.robot + +Suite Setup Connect Switches +Suite Teardown Stop Switches + *** Variables *** -${swnr} 17 -${flnr} 17000 -${swspread} gauss -${tabspread} gauss -@{cntls} ${ODL_SYSTEM_IP} +${swnr} 17 +${flnr} 17000 +${swspread} gauss +${tabspread} gauss +@{cntls} ${ODL_SYSTEM_IP} + *** Test Cases *** Configure Flows - ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread} + ${flows} ${notes}= Generate New Flow Details + ... flows=${flnr} + ... switches=${swnr} + ... swspread=${swspread} + ... tabspread=${tabspread} Log ${notes} ${res}= Configure Flows flow_details=${flows} controllers=@{cntls} nrthreads=5 Log ${res} @@ -38,6 +46,7 @@ Check No Flows In Operational ${noflows}= Create List Wait Until Keyword Succeeds 110s 20s Check Flows Inventory ${noflows} ${ODL_SYSTEM_IP} + *** Keywords *** Connect Switches [Documentation] Starts mininet with requested number of switches (${swnr}) diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/030_Stats_Collection_Linear.robot b/csit/suites/openflowplugin/Performance_Flow_Config/030_Stats_Collection_Linear.robot index 2bd670568a..ab77cd3915 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/030_Stats_Collection_Linear.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/030_Stats_Collection_Linear.robot @@ -1,27 +1,35 @@ *** Settings *** -Documentation Suite checks if StatMngr is able to collect flows with linear spread over the switches and linear spread over tables within the switch -Suite Setup Connect Switches -Suite Teardown Stop Switches -Library OperatingSystem -Library Collections -Library XML -Library SSHLibrary -Library RequestsLibrary -Library ../../../../csit/libraries/Common.py -Library ../../../../csit/libraries/ScaleClient.py -Variables ../../../../csit/variables/Variables.py -Resource ../../../../csit/variables/openflowplugin/Variables.robot +Documentation Suite checks if StatMngr is able to collect flows with linear spread over the switches and linear spread over tables within the switch + +Library OperatingSystem +Library Collections +Library XML +Library SSHLibrary +Library RequestsLibrary +Library ../../../../csit/libraries/Common.py +Library ../../../../csit/libraries/ScaleClient.py +Variables ../../../../csit/variables/Variables.py +Resource ../../../../csit/variables/openflowplugin/Variables.robot + +Suite Setup Connect Switches +Suite Teardown Stop Switches + *** Variables *** -${swnr} 17 -${flnr} 17000 -${swspread} linear -${tabspread} linear -@{cntls} ${ODL_SYSTEM_IP} +${swnr} 17 +${flnr} 17000 +${swspread} linear +${tabspread} linear +@{cntls} ${ODL_SYSTEM_IP} + *** Test Cases *** Configure Flows - ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread} + ${flows} ${notes}= Generate New Flow Details + ... flows=${flnr} + ... switches=${swnr} + ... swspread=${swspread} + ... tabspread=${tabspread} Log ${notes} ${res}= Configure Flows flow_details=${flows} controllers=@{cntls} nrthreads=5 Log ${res} @@ -38,6 +46,7 @@ Check No Flows In Operational ${noflows}= Create List Wait Until Keyword Succeeds 110s 20s Check Flows Inventory ${noflows} ${ODL_SYSTEM_IP} + *** Keywords *** Connect Switches [Documentation] Starts mininet with requested number of switches (${swnr}) diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/040_Stats_Collection_One.robot b/csit/suites/openflowplugin/Performance_Flow_Config/040_Stats_Collection_One.robot index 559f411496..86961c60a4 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/040_Stats_Collection_One.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/040_Stats_Collection_One.robot @@ -1,27 +1,35 @@ *** Settings *** -Documentation Suite checks if StatMngr is able to collect flows if all are present on one switch in one table no matter how many switches are connecteded to the controller -Suite Setup Connect Switches -Suite Teardown Stop Switches -Library OperatingSystem -Library Collections -Library XML -Library SSHLibrary -Library RequestsLibrary -Library ../../../../csit/libraries/Common.py -Library ../../../../csit/libraries/ScaleClient.py -Variables ../../../../csit/variables/Variables.py -Resource ../../../../csit/variables/openflowplugin/Variables.robot +Documentation Suite checks if StatMngr is able to collect flows if all are present on one switch in one table no matter how many switches are connecteded to the controller + +Library OperatingSystem +Library Collections +Library XML +Library SSHLibrary +Library RequestsLibrary +Library ../../../../csit/libraries/Common.py +Library ../../../../csit/libraries/ScaleClient.py +Variables ../../../../csit/variables/Variables.py +Resource ../../../../csit/variables/openflowplugin/Variables.robot + +Suite Setup Connect Switches +Suite Teardown Stop Switches + *** Variables *** -${swnr} 17 -${flnr} 17000 -${swspread} first -${tabspread} first -@{cntls} ${ODL_SYSTEM_IP} +${swnr} 17 +${flnr} 17000 +${swspread} first +${tabspread} first +@{cntls} ${ODL_SYSTEM_IP} + *** Test Cases *** Configure Flows - ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread} + ${flows} ${notes}= Generate New Flow Details + ... flows=${flnr} + ... switches=${swnr} + ... swspread=${swspread} + ... tabspread=${tabspread} Log ${notes} ${res}= Configure Flows flow_details=${flows} controllers=@{cntls} nrthreads=5 Log ${res} @@ -38,6 +46,7 @@ Check No Flows In Operational ${noflows}= Create List Wait Until Keyword Succeeds 110s 20s Check Flows Inventory ${noflows} ${ODL_SYSTEM_IP} + *** Keywords *** Connect Switches [Documentation] Starts mininet with requested number of switches (${swnr}) diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/050_Stats_Collection_FirstTable.robot b/csit/suites/openflowplugin/Performance_Flow_Config/050_Stats_Collection_FirstTable.robot index 9b5db1e656..862b8e1ecf 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/050_Stats_Collection_FirstTable.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/050_Stats_Collection_FirstTable.robot @@ -1,27 +1,35 @@ *** Settings *** -Documentation Suite checks if StatMngr is able to collect flows lineary spread over the switches but in one table on the switch -Suite Setup Connect Switches -Suite Teardown Stop Switches -Library OperatingSystem -Library Collections -Library XML -Library SSHLibrary -Library RequestsLibrary -Library ../../../../csit/libraries/Common.py -Library ../../../../csit/libraries/ScaleClient.py -Variables ../../../../csit/variables/Variables.py -Resource ../../../../csit/variables/openflowplugin/Variables.robot +Documentation Suite checks if StatMngr is able to collect flows lineary spread over the switches but in one table on the switch + +Library OperatingSystem +Library Collections +Library XML +Library SSHLibrary +Library RequestsLibrary +Library ../../../../csit/libraries/Common.py +Library ../../../../csit/libraries/ScaleClient.py +Variables ../../../../csit/variables/Variables.py +Resource ../../../../csit/variables/openflowplugin/Variables.robot + +Suite Setup Connect Switches +Suite Teardown Stop Switches + *** Variables *** -${swnr} 17 -${flnr} 17000 -${swspread} linear -${tabspread} first -@{cntls} ${ODL_SYSTEM_IP} +${swnr} 17 +${flnr} 17000 +${swspread} linear +${tabspread} first +@{cntls} ${ODL_SYSTEM_IP} + *** Test Cases *** Configure Flows - ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread} + ${flows} ${notes}= Generate New Flow Details + ... flows=${flnr} + ... switches=${swnr} + ... swspread=${swspread} + ... tabspread=${tabspread} Log ${notes} ${res}= Configure Flows flow_details=${flows} controllers=@{cntls} nrthreads=5 Log ${res} @@ -38,6 +46,7 @@ Check No Flows In Operational ${noflows}= Create List Wait Until Keyword Succeeds 110s 20s Check Flows Inventory ${noflows} ${ODL_SYSTEM_IP} + *** Keywords *** Connect Switches [Documentation] Starts mininet with requested number of switches (${swnr}) diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/060_Stats_Collection_Basic16kScenario.robot b/csit/suites/openflowplugin/Performance_Flow_Config/060_Stats_Collection_Basic16kScenario.robot index df4d87aeea..e8567aae71 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/060_Stats_Collection_Basic16kScenario.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/060_Stats_Collection_Basic16kScenario.robot @@ -1,24 +1,29 @@ *** Settings *** -Documentation Suite checks if StatMngr is able to collect flows correctly -Suite Setup Create Http Session -Suite Teardown Delete Http Session -Library OperatingSystem -Library Collections -Library XML -Library SSHLibrary -Variables ../../../variables/Variables.py -Library RequestsLibrary -Library ../../../libraries/Common.py -Library ../../../libraries/ScaleClient.py -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Suite checks if StatMngr is able to collect flows correctly + +Library OperatingSystem +Library Collections +Library XML +Library SSHLibrary +Variables ../../../variables/Variables.py +Library RequestsLibrary +Library ../../../libraries/Common.py +Library ../../../libraries/ScaleClient.py +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Http Session +Suite Teardown Delete Http Session + *** Variables *** -${swnr} 16 -${flnr} 16000 -${swspread} linear -${tabspread} linear -@{cntls} ${ODL_SYSTEM_IP} -${start_cmd} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13 +${swnr} 16 +${flnr} 16000 +${swspread} linear +${tabspread} linear +@{cntls} ${ODL_SYSTEM_IP} +${start_cmd} +... sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13 + *** Test Cases *** Connect Mininet @@ -26,7 +31,11 @@ Connect Mininet Configure Flows [Documentation] Configuration of 16k flows into config datastore - ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread} + ${flows} ${notes}= Generate New Flow Details + ... flows=${flnr} + ... switches=${swnr} + ... swspread=${swspread} + ... tabspread=${tabspread} Log ${notes} ${res}= Configure Flows flow_details=${flows} controllers=@{cntls} nrthreads=5 Log ${res} @@ -84,6 +93,7 @@ Check No Flows In Operational Last Stop Mininet End Stop Switches + *** Keywords *** Connect Switches [Documentation] Starts mininet with requested number of switches (${swnr}) diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/070_Stats_Collection_100k_WithMininetRestart.robot b/csit/suites/openflowplugin/Performance_Flow_Config/070_Stats_Collection_100k_WithMininetRestart.robot index a300307a7b..bcfd60119d 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/070_Stats_Collection_100k_WithMininetRestart.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/070_Stats_Collection_100k_WithMininetRestart.robot @@ -1,37 +1,42 @@ *** Settings *** -Documentation Suite checks if StatMngr is able to collect flows correctly -Suite Setup Create Http Session And Upload Files -Suite Teardown Delete Http Session And Store Plot Data -Library OperatingSystem -Library XML -Library SSHLibrary -Library Collections -Variables ../../../variables/Variables.py -Library RequestsLibrary -Library ../../../libraries/Common.py -Library ../../../libraries/ScaleClient.py -Resource ../../../libraries/WaitForFailure.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Suite checks if StatMngr is able to collect flows correctly + +Library OperatingSystem +Library XML +Library SSHLibrary +Library Collections +Variables ../../../variables/Variables.py +Library RequestsLibrary +Library ../../../libraries/Common.py +Library ../../../libraries/ScaleClient.py +Resource ../../../libraries/WaitForFailure.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Http Session And Upload Files +Suite Teardown Delete Http Session And Store Plot Data + *** Variables *** -${swnr} 32 -${flnr} 100000 -${fpr} 200 -${nrthreads} 5 -${swspread} linear -${tabspread} first -@{cntls} ${ODL_SYSTEM_IP} -${start_cmd} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13 -${getf_cmd} sh ./get-total-found.sh -${getr_cmd} sh ./get-total-reported.sh -${iperiod} 1s -${imonitor} 60s -${ichange} 450s -${ratefile} stats_rate.csv -${timefile} stats_time.csv -${setuptime} 0 -${inittime} 0 -${restarttime} 0 +${swnr} 32 +${flnr} 100000 +${fpr} 200 +${nrthreads} 5 +${swspread} linear +${tabspread} first +@{cntls} ${ODL_SYSTEM_IP} +${start_cmd} +... sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13 +${getf_cmd} sh ./get-total-found.sh +${getr_cmd} sh ./get-total-reported.sh +${iperiod} 1s +${imonitor} 60s +${ichange} 450s +${ratefile} stats_rate.csv +${timefile} stats_time.csv +${setuptime} 0 +${inittime} 0 +${restarttime} 0 + *** Test Cases *** Connect Mininet @@ -39,10 +44,18 @@ Connect Mininet Configure Flows [Documentation] Configuration of ${flnr} flows into config datastore - ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread} + ${flows} ${notes}= Generate New Flow Details + ... flows=${flnr} + ... switches=${swnr} + ... swspread=${swspread} + ... tabspread=${tabspread} Log ${notes} ${starttime}= Get Time epoch - ${res}= Configure Flows Bulk flow_details=${flows} controllers=@{cntls} nrthreads=${nrthreads} fpr=${fpr} + ${res}= Configure Flows Bulk + ... flow_details=${flows} + ... controllers=@{cntls} + ... nrthreads=${nrthreads} + ... fpr=${fpr} Log ${res} Set Suite Variable ${flows} ${http201ok}= Create List ${201} @@ -90,6 +103,7 @@ Check No Flows In Operational Last Stop Mininet End Stop Switches + *** Keywords *** Connect Switches [Documentation] Starts mininet with requested number of switches (${swnr}) @@ -101,7 +115,8 @@ Connect Switches Write ${start_cmd} Read Until mininet> Comment Below line disables switch echos - Write sh x=`sudo ovs-vsctl --columns=_uuid list Controller | awk '{print $NF}'`; for i in $x; do sudo ovs-vsctl set Controller $i inactivity_probe=0; done + Write + ... sh x=`sudo ovs-vsctl --columns=_uuid list Controller | awk '{print $NF}'`; for i in $x; do sudo ovs-vsctl set Controller $i inactivity_probe=0; done Read Until mininet> Wait Until Keyword Succeeds 20s 1s Are Switches Connected Topo @@ -137,23 +152,23 @@ Are Switches Connected Topo Should Be Equal As Numbers ${count} ${swnr} Check Flows Inventory - [Arguments] ${rswitches} ${rflows} [Documentation] Checks in inventory has required state + [Arguments] ${rswitches} ${rflows} ${sw} ${repf} ${foundf}= Flow Stats Collected controller=${ODL_SYSTEM_IP} Should Be Equal As Numbers ${rswitches} ${sw} Should Be Equal As Numbers ${rflows} ${foundf} Measure Setup Time - [Arguments] ${rswitches} ${rflows} ${note} [Documentation] This keyword is dedicated to save measured time for plotting + [Arguments] ${rswitches} ${rflows} ${note} ${starttime}= Get Time epoch Log Starting stats collection at time ${starttime} Inventory Change Reached ${rswitches} ${rflows} [Teardown] Save Setup Time ${note} ${starttime} Save Setup Time - [Arguments] ${note} ${starttime} [Documentation] Count the difference and stores it + [Arguments] ${note} ${starttime} ${endtime}= Get Time epoch Log Stats collection finished at time ${endtime} ${res}= Evaluate int(${endtime})-int(${starttime}) @@ -165,14 +180,19 @@ Save Setup Time Set Suite Variable ${setuptime} Inventory Change Reached - [Arguments] ${rswitches} ${rflows} [Documentation] This keywordwaits till inventory reaches required state + [Arguments] ${rswitches} ${rflows} Wait Until Keyword Succeeds ${ichange} ${iperiod} Check Flows Inventory ${rswitches} ${rflows} Monitor Stable State - [Arguments] ${rswitches} ${rflows} [Documentation] This keywordwaits till inventory reaches required state - Verify Keyword Does Not Fail Within Timeout ${imonitor} ${iperiod} Check Flows Inventory ${rswitches} ${rflows} + [Arguments] ${rswitches} ${rflows} + Verify Keyword Does Not Fail Within Timeout + ... ${imonitor} + ... ${iperiod} + ... Check Flows Inventory + ... ${rswitches} + ... ${rflows} Log Switch Details Write ${getf_cmd} diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/080_Rpc_100k_Flows_Configuration_Time_Measure.robot b/csit/suites/openflowplugin/Performance_Flow_Config/080_Rpc_100k_Flows_Configuration_Time_Measure.robot index e9c5056cc2..c980e41a9c 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/080_Rpc_100k_Flows_Configuration_Time_Measure.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/080_Rpc_100k_Flows_Configuration_Time_Measure.robot @@ -1,31 +1,36 @@ *** Settings *** -Documentation Suite to measure setup reate using add-flows-rpc operation -Suite Setup Create Http Session And Upload Files -Suite Teardown Delete Http Session And Store Plot Data -Library OperatingSystem -Library XML -Library SSHLibrary -Library RequestsLibrary -Library ../../../libraries/Common.py -Library ../../../libraries/ScaleClient.py -Variables ../../../variables/Variables.py -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Suite to measure setup reate using add-flows-rpc operation + +Library OperatingSystem +Library XML +Library SSHLibrary +Library RequestsLibrary +Library ../../../libraries/Common.py +Library ../../../libraries/ScaleClient.py +Variables ../../../variables/Variables.py +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Create Http Session And Upload Files +Suite Teardown Delete Http Session And Store Plot Data + *** Variables *** -${swnr} 63 -${flnr} 100000 -${fpr} 25 -${nrthreads} 5 -${swspread} linear -${tabspread} first -@{cntls} ${ODL_SYSTEM_IP} -${start_cmd} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13 -${getf_cmd} sh ./get-total-found.sh -${getr_cmd} sh ./get-total-reported.sh -${iperiod} 1s -${ichange} 450s -${outfile} flows_setup_time.csv -${setuptime} 0 +${swnr} 63 +${flnr} 100000 +${fpr} 25 +${nrthreads} 5 +${swspread} linear +${tabspread} first +@{cntls} ${ODL_SYSTEM_IP} +${start_cmd} +... sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13 +${getf_cmd} sh ./get-total-found.sh +${getr_cmd} sh ./get-total-reported.sh +${iperiod} 1s +${ichange} 450s +${outfile} flows_setup_time.csv +${setuptime} 0 + *** Test Cases *** Connect Mininet @@ -33,10 +38,18 @@ Connect Mininet Configure Flows [Documentation] Setup of ${flnr} flows using rpc calls - ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread} + ${flows} ${notes}= Generate New Flow Details + ... flows=${flnr} + ... switches=${swnr} + ... swspread=${swspread} + ... tabspread=${tabspread} Log ${notes} ${starttime}= Get Time epoch - ${res}= Operations Add Flows Rpc flow_details=${flows} controllers=@{cntls} nrthreads=${nrthreads} fpr=${fpr} + ${res}= Operations Add Flows Rpc + ... flow_details=${flows} + ... controllers=@{cntls} + ... nrthreads=${nrthreads} + ... fpr=${fpr} Log ${res} Set Suite Variable ${flows} ${http200ok}= Create List ${200} @@ -51,7 +64,11 @@ Wait Stats Collected Deconfigure Flows [Documentation] Flows deconfiguration - ${res}= Operations Remove Flows Rpc flow_details=${flows} controllers=@{cntls} nrthreads=${nrthreads} fpr=${fpr} + ${res}= Operations Remove Flows Rpc + ... flow_details=${flows} + ... controllers=@{cntls} + ... nrthreads=${nrthreads} + ... fpr=${fpr} Log ${res} ${http200ok}= Create List ${200} ${validation}= Validate Responses ${res} ${http200ok} @@ -65,6 +82,7 @@ Check No Flows In Operational After Remove Stop Mininet End Stop Switches + *** Keywords *** Connect Switches [Documentation] Starts mininet with requested number of switches (${swnr}) @@ -106,23 +124,23 @@ Are Switches Connected Topo Should Be Equal As Numbers ${count} ${swnr} Check Flows Inventory - [Arguments] ${rswitches} ${rflows} [Documentation] Checks in inventory has required state + [Arguments] ${rswitches} ${rflows} ${sw} ${repf} ${foundf}= Flow Stats Collected controller=${ODL_SYSTEM_IP} Should Be Equal As Numbers ${rswitches} ${sw} Should Be Equal As Numbers ${rflows} ${foundf} Save Setup Time - [Arguments] ${starttime} [Documentation] Count the difference and stores it + [Arguments] ${starttime} ${endtime}= Get Time epoch Log Stats collection finished at time ${endtime} ${setuptime}= Evaluate int(${endtime})-int(${starttime}) Set Suite Variable ${setuptime} Inventory Change Reached - [Arguments] ${rswitches} ${rflows} [Documentation] This keywordwaits till inventory reaches required state + [Arguments] ${rswitches} ${rflows} Wait Until Keyword Succeeds ${ichange} ${iperiod} Check Flows Inventory ${rswitches} ${rflows} Log Switch Details diff --git a/csit/suites/openflowplugin/Performance_Flow_Config/090_BulkMaticConfigDsSetup_100k.robot b/csit/suites/openflowplugin/Performance_Flow_Config/090_BulkMaticConfigDsSetup_100k.robot index f731fcd406..69eaa53a59 100644 --- a/csit/suites/openflowplugin/Performance_Flow_Config/090_BulkMaticConfigDsSetup_100k.robot +++ b/csit/suites/openflowplugin/Performance_Flow_Config/090_BulkMaticConfigDsSetup_100k.robot @@ -1,30 +1,35 @@ *** Settings *** -Documentation Suite to measure flow setup rate using operation add-flows-ds -Suite Setup Create Http Session And Upload Files -Suite Teardown Delete Http Session And Store Plot Data -Library OperatingSystem -Library XML -Library SSHLibrary -Variables ../../../variables/Variables.py -Library RequestsLibrary -Library ../../../libraries/Common.py -Library ../../../libraries/ScaleClient.py +Documentation Suite to measure flow setup rate using operation add-flows-ds + +Library OperatingSystem +Library XML +Library SSHLibrary +Variables ../../../variables/Variables.py +Library RequestsLibrary +Library ../../../libraries/Common.py +Library ../../../libraries/ScaleClient.py + +Suite Setup Create Http Session And Upload Files +Suite Teardown Delete Http Session And Store Plot Data + *** Variables *** -${swnr} 63 -${flnr} 100000 -${fpr} 25 -${nrthreads} 5 -${swspread} linear -${tabspread} first -@{cntls} ${ODL_SYSTEM_IP} -${start_cmd} sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13 -${getf_cmd} sh ./get-total-found.sh -${getr_cmd} sh ./get-total-reported.sh -${iperiod} 1s -${ichange} 450s -${outfile} flows_setup_time.csv -${setuptime} 0 +${swnr} 63 +${flnr} 100000 +${fpr} 25 +${nrthreads} 5 +${swspread} linear +${tabspread} first +@{cntls} ${ODL_SYSTEM_IP} +${start_cmd} +... sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --topo linear,${swnr} --switch ovsk,protocols=OpenFlow13 +${getf_cmd} sh ./get-total-found.sh +${getr_cmd} sh ./get-total-reported.sh +${iperiod} 1s +${ichange} 450s +${outfile} flows_setup_time.csv +${setuptime} 0 + *** Test Cases *** Connect Mininet @@ -32,10 +37,18 @@ Connect Mininet Configure Flows [Documentation] Setup of ${flnr} flows using add-flows-ds operation - ${flows} ${notes}= Generate New Flow Details flows=${flnr} switches=${swnr} swspread=${swspread} tabspread=${tabspread} + ${flows} ${notes}= Generate New Flow Details + ... flows=${flnr} + ... switches=${swnr} + ... swspread=${swspread} + ... tabspread=${tabspread} Log ${notes} ${starttime}= Get Time epoch - ${res}= Operations Add Flows Ds flow_details=${flows} controllers=@{cntls} nrthreads=${nrthreads} fpr=${fpr} + ${res}= Operations Add Flows Ds + ... flow_details=${flows} + ... controllers=@{cntls} + ... nrthreads=${nrthreads} + ... fpr=${fpr} Log ${res} Set Suite Variable ${flows} ${http200ok}= Create List ${200} @@ -50,7 +63,11 @@ Wait Stats Collected Deconfigure Flows [Documentation] Flows deconfiguration - ${res}= Operations Remove Flows Ds flow_details=${flows} controllers=@{cntls} nrthreads=${nrthreads} fpr=${fpr} + ${res}= Operations Remove Flows Ds + ... flow_details=${flows} + ... controllers=@{cntls} + ... nrthreads=${nrthreads} + ... fpr=${fpr} Log ${res} ${http200ok}= Create List ${200} ${validation}= Validate Responses ${res} ${http200ok} @@ -64,6 +81,7 @@ Check No Flows In Operational After Remove Stop Mininet End Stop Switches + *** Keywords *** Connect Switches [Documentation] Starts mininet with requested number of switches (${swnr}) @@ -105,23 +123,23 @@ Are Switches Connected Topo Should Be Equal As Numbers ${count} ${swnr} Check Flows Inventory - [Arguments] ${rswitches} ${rflows} [Documentation] Checks in inventory has required state + [Arguments] ${rswitches} ${rflows} ${sw} ${repf} ${foundf}= Flow Stats Collected controller=${ODL_SYSTEM_IP} Should Be Equal As Numbers ${rswitches} ${sw} Should Be Equal As Numbers ${rflows} ${foundf} Save Setup Time - [Arguments] ${starttime} [Documentation] Count the difference and stores it + [Arguments] ${starttime} ${endtime}= Get Time epoch Log Stats collection finished at time ${endtime} ${setuptime}= Evaluate int(${endtime})-int(${starttime}) Set Suite Variable ${setuptime} Inventory Change Reached - [Arguments] ${rswitches} ${rflows} [Documentation] This keywordwaits till inventory reaches required state + [Arguments] ${rswitches} ${rflows} Wait Until Keyword Succeeds ${ichange} ${iperiod} Check Flows Inventory ${rswitches} ${rflows} Log Switch Details 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 index a6cfc444cc..0daf8ff541 100644 --- 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 @@ -1,51 +1,73 @@ *** 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 -Resource ../../../variables/openflowplugin/Variables.robot -Variables ../../../variables/Variables.py +Documentation Test suite for 3Node Cluster - 100K flows and 10 DPNs in Cluster Scale Up scenario + +Library DateTime +Library OperatingSystem +Library ../../../libraries/ScaleClient.py +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Resource ../../../variables/openflowplugin/Variables.robot +Variables ../../../variables/Variables.py + +Suite Setup ClusterManagement Setup +Suite Teardown Delete All Sessions + *** 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 WARN +${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 WARN ${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} + ${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} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_IP} + ... --topo linear,${switch_count} 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 + 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} + 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_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} @@ -57,9 +79,14 @@ Add Bulk Flow Via REST 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} + 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_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} @@ -69,9 +96,16 @@ Verify Flows In Switch 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 + 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_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} @@ -82,14 +116,21 @@ Verify Flows In Oper DS 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 + 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 ${RFC8040_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_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} @@ -100,6 +141,10 @@ Delete All Flows 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 + ... ${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 + 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 index 53e5442646..1e4ad45e28 100644 --- 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 @@ -1,40 +1,48 @@ *** 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 +Documentation Test suite for 3Node Cluster - 100K flows and 10 DPNs in Cluster Scale Up scenario + +Library DateTime +Library OperatingSystem +Library ../../../libraries/ScaleClient.py +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/ClusterOpenFlow.robot +Variables ../../../variables/Variables.py + +Suite Setup ClusterManagement Setup +Suite Teardown Delete All Sessions + *** 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 WARN +${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 WARN ${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} + ${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 + ${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} @@ -50,16 +58,30 @@ Get Inventory Config Shard Follower And Leader 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} + ${mininet_conn_id}= MininetKeywords.Start Mininet Single Controller + ... ${TOOLS_SYSTEM_IP} + ... ${ODL_SYSTEM_${Follower_Node_1}_IP} + ... --topo linear,${switch_count} 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} + 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} + 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_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} @@ -71,9 +93,14 @@ Add Bulk Flow via REST 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} ${flow_count} ${operation_timeout} + 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_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} @@ -83,9 +110,16 @@ Verify Flows In Switch 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} + 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_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} @@ -96,14 +130,21 @@ Verify Flows In Oper DS 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} + 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 ${RFC8040_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_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} @@ -114,6 +155,10 @@ Delete All Flows From Follower Node2 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 + ... ${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 + 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/Reconciliation/010_Group_Flows.robot b/csit/suites/openflowplugin/Reconciliation/010_Group_Flows.robot index f3cb6e3952..3329a39e4b 100644 --- a/csit/suites/openflowplugin/Reconciliation/010_Group_Flows.robot +++ b/csit/suites/openflowplugin/Reconciliation/010_Group_Flows.robot @@ -1,41 +1,57 @@ *** Settings *** -Documentation Test reconciliation of chained groups and flows after switch connection and controller are restarted. -Suite Setup Initialization Phase -Suite Teardown Final Phase -Library RequestsLibrary -Resource ../../../libraries/ClusterManagement.robot -Resource ../../../libraries/TemplatedRequests.robot -Resource ../../../libraries/MininetKeywords.robot -Resource ../../../libraries/FlowLib.robot -Resource ../../../libraries/Utils.robot -Resource ../../../variables/Variables.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation Test reconciliation of chained groups and flows after switch connection and controller are restarted. + +Library RequestsLibrary +Resource ../../../libraries/ClusterManagement.robot +Resource ../../../libraries/TemplatedRequests.robot +Resource ../../../libraries/MininetKeywords.robot +Resource ../../../libraries/FlowLib.robot +Resource ../../../libraries/Utils.robot +Resource ../../../variables/Variables.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Initialization Phase +Suite Teardown Final Phase + *** Variables *** -${SWITCHES} 3 -${ITER} 100 -${VAR_DIR} ${CURDIR}/../../../variables/openflowplugin +${SWITCHES} 3 +${ITER} 100 +${VAR_DIR} ${CURDIR}/../../../variables/openflowplugin + *** Test Cases *** Add Group 1 In Every Switch [Documentation] Add ${ITER} groups of type 1 in every switch. FOR ${switch} IN RANGE 1 ${switches+1} &{mapping} BuiltIn.Create_Dictionary NODE=openflow:${switch} - TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-1 mapping=${mapping} session=session iterations=${iter} + TemplatedRequests.Post As Json Templated + ... folder=${VAR_DIR}/add-group-1 + ... mapping=${mapping} + ... session=session + ... iterations=${iter} END Add Group 2 In Every Switch [Documentation] Add ${ITER} groups of type 2 in every switch. FOR ${switch} IN RANGE 1 ${switches+1} &{mapping} BuiltIn.Create_Dictionary NODE=openflow:${switch} - TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-group-2 mapping=${mapping} session=session iterations=${iter} + TemplatedRequests.Post As Json Templated + ... folder=${VAR_DIR}/add-group-2 + ... mapping=${mapping} + ... session=session + ... iterations=${iter} END Add Flow to Group 2 In Every Switch [Documentation] Add ${ITER} flows to group type 2 in every switch. FOR ${switch} IN RANGE 1 ${switches+1} &{mapping} BuiltIn.Create_Dictionary NODE=openflow:${switch} - TemplatedRequests.Post As Json Templated folder=${VAR_DIR}/add-flow mapping=${mapping} session=session iterations=${ITER} + TemplatedRequests.Post As Json Templated + ... folder=${VAR_DIR}/add-flow + ... mapping=${mapping} + ... session=session + ... iterations=${ITER} END Start Mininet Linear @@ -77,9 +93,15 @@ Check Linear Topology After Mininet Reconnects Remove Flows And Groups After Mininet Reconnects [Documentation] Remove some groups and flows while network is down. FOR ${switch} IN RANGE 1 ${switches+1} - RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:table=0/flow=1 - RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1 - RequestsLibrary.Delete Request session ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1000 + RequestsLibrary.Delete Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:table=0/flow=1 + RequestsLibrary.Delete Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1 + RequestsLibrary.Delete Request + ... session + ... ${RFC8040_NODES_API}/node=openflow%3A${switch}/flow-node-inventory:group=1000 END Check Flows In Operational DS After Mininet Reconnects @@ -97,8 +119,10 @@ Check Flows In Switch After Mininet Reconnects Restart Controller [Documentation] Stop and Start controller. # Try to stop contoller, if stop does not work or takes too long, kill controller. - ${status} ${result}= BuiltIn.Run Keyword And Ignore Error ClusterManagement.Stop_Members_From_List_Or_All - BuiltIn.Run Keyword If '${status}' != 'PASS' ClusterManagement.Kill_Members_From_List_Or_All + ${status} ${result} BuiltIn.Run Keyword And Ignore Error ClusterManagement.Stop_Members_From_List_Or_All + IF '${status}' != 'PASS' + ClusterManagement.Kill_Members_From_List_Or_All + END ClusterManagement.Start_Members_From_List_Or_All wait_for_sync=False Check Linear Topology After Controller Restarts @@ -125,6 +149,7 @@ Check No Switches [Documentation] Check no switches in topology. BuiltIn.Wait Until Keyword Succeeds 5s 1s FlowLib.Check No Switches In Topology ${SWITCHES} + *** Keywords *** Initialization Phase [Documentation] Create controller session and set variables. @@ -133,11 +158,11 @@ Initialization Phase RequestsLibrary.Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} ${switches} Convert To Integer ${SWITCHES} ${iter} Convert To Integer ${ITER} - ${all_groups}= BuiltIn.Evaluate ${switches} * ${iter} * 2 - ${less_groups}= BuiltIn.Evaluate ${all_groups} - ${switches} * 2 + ${all_groups} BuiltIn.Evaluate ${switches} * ${iter} * 2 + ${less_groups} BuiltIn.Evaluate ${all_groups} - ${switches} * 2 # Stale flows/groups feature enabled in Boron onwards. - ${all_flows}= BuiltIn.Evaluate ${switches} * ${iter+1} - ${less_flows}= BuiltIn.Evaluate ${all_flows} - ${switches} + ${all_flows} BuiltIn.Evaluate ${switches} * ${iter+1} + ${less_flows} BuiltIn.Evaluate ${all_flows} - ${switches} # Stale flows/groups feature enabled in Boron onwards. BuiltIn.Set Suite Variable ${switches} BuiltIn.Set Suite Variable ${iter} @@ -149,17 +174,20 @@ Initialization Phase Final Phase [Documentation] Delete all sessions. - ${command} = BuiltIn.Set Variable sudo iptables -v -F + ${command} BuiltIn.Set Variable sudo iptables -v -F Utils.Run Command On Controller cmd=${command} BuiltIn.Run Keyword And Ignore Error RequestsLibrary.Delete Request session ${RFC8040_NODES_API} RequestsLibrary.Delete All Sessions Disconnect Controller Mininet - [Arguments] ${action}=break [Documentation] Break and restore controller to mininet connection via iptables. - ${rule} = BuiltIn.Set Variable OUTPUT -p all --source ${ODL_SYSTEM_IP} --destination ${TOOLS_SYSTEM_IP} -j DROP - ${command} = BuiltIn.Set Variable If '${action}'=='restore' sudo /sbin/iptables -D ${rule} sudo /sbin/iptables -I ${rule} + [Arguments] ${action}=break + ${rule} BuiltIn.Set Variable OUTPUT -p all --source ${ODL_SYSTEM_IP} --destination ${TOOLS_SYSTEM_IP} -j DROP + ${command} BuiltIn.Set Variable If + ... '${action}'=='restore' + ... sudo /sbin/iptables -D ${rule} + ... sudo /sbin/iptables -I ${rule} Utils.Run Command On Controller cmd=${command} - ${command} = BuiltIn.Set Variable sudo /sbin/iptables -L -n - ${output} = Utils.Run Command On Controller cmd=${command} + ${command} BuiltIn.Set Variable sudo /sbin/iptables -L -n + ${output} Utils.Run Command On Controller cmd=${command} BuiltIn.Log ${output} diff --git a/csit/suites/openflowplugin/Switch_Qualification/010_OpenFlow_Connection.robot b/csit/suites/openflowplugin/Switch_Qualification/010_OpenFlow_Connection.robot index ba63894d93..90bc4ab3f1 100644 --- a/csit/suites/openflowplugin/Switch_Qualification/010_OpenFlow_Connection.robot +++ b/csit/suites/openflowplugin/Switch_Qualification/010_OpenFlow_Connection.robot @@ -1,24 +1,28 @@ *** Settings *** -Documentation TODO -Suite Setup Switch Qualification Suite Setup -Suite Teardown Switch Qualification Suite Teardown -Test Timeout 5m -Library Collections -Library OperatingSystem -Library RequestsLibrary -Library ../../../libraries/Common.py -Library ../../../libraries/SwitchClasses/${SWITCH_CLASS}.py -Variables ../../../variables/Variables.py -Resource ../../../libraries/SwitchUtils.robot -Resource ../../../libraries/Utils.robot -Resource ../../../variables/openflowplugin/Variables.robot +Documentation TODO + +Library Collections +Library OperatingSystem +Library RequestsLibrary +Library ../../../libraries/Common.py +Library ../../../libraries/SwitchClasses/${SWITCH_CLASS}.py +Variables ../../../variables/Variables.py +Resource ../../../libraries/SwitchUtils.robot +Resource ../../../libraries/Utils.robot +Resource ../../../variables/openflowplugin/Variables.robot + +Suite Setup Switch Qualification Suite Setup +Suite Teardown Switch Qualification Suite Teardown +Test Timeout 5m + *** Variables *** -${SWITCH_CLASS} Ovs -${SWITCH_IP} ${TOOLS_SYSTEM_IP} +${SWITCH_CLASS} Ovs +${SWITCH_IP} ${TOOLS_SYSTEM_IP} ${SWITCH_PROMPT} ${TOOLS_SYSTEM_PROMPT} ${ODL_SYSTEM_IP} null -${REST_CONTEXT} ${RFC8040_NODES_API} +${REST_CONTEXT} ${RFC8040_NODES_API} + *** Test Cases *** OF1.3 Connection Between Switch and Controller @@ -34,6 +38,7 @@ OF1.3 Connection Between Switch and Controller ##- proper default flow rules ##- ??? + *** Keywords *** Switch Qualification Suite Setup ${test_switch}= Get Switch ${SWITCH_CLASS} @@ -41,7 +46,8 @@ Switch Qualification Suite Setup Call Method ${test_switch} set_mgmt_ip ${SWITCH_IP} Call Method ${test_switch} set_controller_ip ${ODL_SYSTEM_IP} Call Method ${test_switch} set_mgmt_prompt ${SWITCH_PROMPT} - Log MAKE: ${test_switch.make}\nMODEL: ${test_switch.model}\nIP: ${test_switch.mgmt_ip}\nPROMPT: ${test_switch.mgmt_prompt}\nCONTROLLER_IP: ${test_switch.of_controller_ip}\nMGMT_PROTOCOL: ${test_switch.mgmt_protocol} + Log + ... MAKE: ${test_switch.make}\nMODEL: ${test_switch.model}\nIP: ${test_switch.mgmt_ip}\nPROMPT: ${test_switch.mgmt_prompt}\nCONTROLLER_IP: ${test_switch.of_controller_ip}\nMGMT_PROTOCOL: ${test_switch.mgmt_protocol} Ping ${test_switch.mgmt_ip} Initialize Switch ${test_switch} Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} diff --git a/csit/suites/openflowplugin/Switch_Qualification/020_OpenFlow_Actions.robot b/csit/suites/openflowplugin/Switch_Qualification/020_OpenFlow_Actions.robot index 73ffa98fb4..f2790a5cfe 100644 --- a/csit/suites/openflowplugin/Switch_Qualification/020_OpenFlow_Actions.robot +++ b/csit/suites/openflowplugin/Switch_Qualification/020_OpenFlow_Actions.robot @@ -1,78 +1,80 @@ *** Settings *** -Documentation OF1.3 Suite for flow actions -... - output ALL -... - output CONTROLLER -... - output TABLE -... - output INPORT -... - output LOCAL -... - output NORMAL -... - output FLOOD -... - output ANY +Documentation OF1.3 Suite for flow actions +... - output ALL +... - output CONTROLLER +... - output TABLE +... - output INPORT +... - output LOCAL +... - output NORMAL +... - output FLOOD +... - output ANY ... -... NOTE: for OVS, INPORT does not appear to be supported -Suite Setup OpenFlow Actions Suite Setup -Suite Teardown OpenFlow Actions Suite Teardown -Test Template Create And Remove Flow -Library Collections -Library OperatingSystem -Library String -Library XML -Resource ../../../libraries/Utils.robot -Resource ../../../libraries/FlowLib.robot -Resource ../../../libraries/SwitchUtils.robot -Resource ../../../libraries/OVSDB.robot -Library RequestsLibrary -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py -Library ../../../libraries/SwitchClasses/${SWITCH_CLASS}.py +... NOTE: for OVS, INPORT does not appear to be supported -*** Variables *** -${SWITCH_CLASS} Ovs -${SWITCH_IP} ${TOOLS_SYSTEM_IP} -${SWITCH_PROMPT} ${TOOLS_SYSTEM_PROMPT} -${ODL_SYSTEM_IP} null -${ipv4_src} 11.3.0.0/16 -${ipv4_dst} 99.0.0.0/8 -${eth_type} 0x800 -${eth_src} 00:ab:cd:ef:01:23 -${eth_dst} ff:ff:ff:ff:ff:ff -##documentation strings -${INPORT_doc} OF1.3: OFPP_INPORT = 0xfffffff8, /* Send the packet out the input port. This\nreserved port must be explicitly used\nin order to send back out of the input\nport. */\n -${TABLE_doc} OF1.3: OFPP_TABLE = 0xfffffff9, /* Submit the packet to the first flow table NB: This destination port can only be used in packet-out messages. */ -${NORMAL_doc} OF1.3 OFPP_NORMAL = 0xfffffffa, /* Process with normal L2/L3 switching. */ -${FLOOD_doc} OF1.3 OFPP_FLOOD = 0xfffffffb, /* All physical ports in VLAN, except input port and those blocked or link down. */ -${ALL_doc} OF1.3: OFPP_ALL = 0xfffffffc, /* All physical ports except input port. */ -${CONTROLLER_doc} OF1.3 OFPP_CONTROLLER = 0xfffffffd, /* Send to controller. */ -${LOCAL_doc} OF1.3 OFPP_LOCAL = 0xfffffffe, /* Local openflow "port". */ - -*** Test Cases *** output port tableID flowID priority -INPORT [Documentation] ${INPORT_doc} - [Tags] inport - ${TEST_NAME} 200 161 1 +Library Collections +Library OperatingSystem +Library String +Library XML +Resource ../../../libraries/Utils.robot +Resource ../../../libraries/FlowLib.robot +Resource ../../../libraries/SwitchUtils.robot +Resource ../../../libraries/OVSDB.robot +Library RequestsLibrary +Library ../../../libraries/Common.py +Variables ../../../variables/Variables.py +Library ../../../libraries/SwitchClasses/${SWITCH_CLASS}.py -TABLE [Documentation] ${TABLE_doc} - [Tags] table - ${TEST_NAME} 200 261 65535 +Suite Setup OpenFlow Actions Suite Setup +Suite Teardown OpenFlow Actions Suite Teardown +Test Template Create And Remove Flow -NORMAL [Documentation] ${NORMAL_doc} - [Tags] normal - ${TEST_NAME} 200 361 9 -FLOOD [Documentation] ${FLOOD_doc} - [Tags] flood - ${TEST_NAME} 200 81 255 +*** Variables *** +${SWITCH_CLASS} Ovs +${SWITCH_IP} ${TOOLS_SYSTEM_IP} +${SWITCH_PROMPT} ${TOOLS_SYSTEM_PROMPT} +${ODL_SYSTEM_IP} null +${ipv4_src} 11.3.0.0/16 +${ipv4_dst} 99.0.0.0/8 +${eth_type} 0x800 +${eth_src} 00:ab:cd:ef:01:23 +${eth_dst} ff:ff:ff:ff:ff:ff +##documentation strings +${INPORT_doc} +... OF1.3: OFPP_INPORT = 0xfffffff8, /* Send the packet out the input port. This\nreserved port must be explicitly used\nin order to send back out of the input\nport. */\n +${TABLE_doc} +... OF1.3: OFPP_TABLE = 0xfffffff9, /* Submit the packet to the first flow table NB: This destination port can only be used in packet-out messages. */ +${NORMAL_doc} OF1.3 OFPP_NORMAL = 0xfffffffa, /* Process with normal L2/L3 switching. */ +${FLOOD_doc} +... OF1.3 OFPP_FLOOD = 0xfffffffb, /* All physical ports in VLAN, except input port and those blocked or link down. */ +${ALL_doc} OF1.3: OFPP_ALL = 0xfffffffc, /* All physical ports except input port. */ +${CONTROLLER_doc} OF1.3 OFPP_CONTROLLER = 0xfffffffd, /* Send to controller. */ +${LOCAL_doc} OF1.3 OFPP_LOCAL = 0xfffffffe, /* Local openflow "port". */ -ALL [Documentation] ${ALL_doc} - [Tags] all - ${TEST_NAME} 200 88 42 -CONTROLLER [Documentation] ${CONTROLLER_doc} - [Tags] controller - ${TEST_NAME} 200 21 21 +*** Test Cases *** output port tableID flowID priority +INPORT [Documentation] ${INPORT_doc} + [Tags] inport + ${TEST_NAME} 200 161 1 +TABLE [Documentation] ${TABLE_doc} + [Tags] table + ${TEST_NAME} 200 261 65535 +NORMAL [Documentation] ${NORMAL_doc} + [Tags] normal + ${TEST_NAME} 200 361 9 +FLOOD [Documentation] ${FLOOD_doc} + [Tags] flood + ${TEST_NAME} 200 81 255 +ALL [Documentation] ${ALL_doc} + [Tags] all + ${TEST_NAME} 200 88 42 +CONTROLLER [Documentation] ${CONTROLLER_doc} + [Tags] controller + ${TEST_NAME} 200 21 21 +LOCAL [Documentation] ${LOCAL_doc} + [Tags] local + ${TEST_NAME} 200 32 12345 -LOCAL [Documentation] ${LOCAL_doc} - [Tags] local - ${TEST_NAME} 200 32 12345 *** Keywords *** Create And Remove Flow @@ -93,11 +95,35 @@ Create And Remove Flow Call Method ${test_switch} create_flow_match_elements ${flow.xml} Log ${test_switch.flow_validations} ${dpid_id}= Get Switch Datapath ID ${test_switch} - Wait Until Keyword Succeeds 3s 1s Add Flow To Controller And Verify ${flow.xml} openflow%3A${dpid_id} ${flow.table_id} + Wait Until Keyword Succeeds + ... 3s + ... 1s + ... Add Flow To Controller And Verify + ... ${flow.xml} + ... openflow%3A${dpid_id} + ... ${flow.table_id} + ... ${flow.id} + Wait Until Keyword Succeeds + ... 3s + ... 1s + ... Validate Switch Output + ... ${test_switch} + ... ${test_switch.dump_all_flows} + ... ${test_switch.flow_validations} + Wait Until Keyword Succeeds + ... 3s + ... 1s + ... Remove Flow From Controller And Verify + ... openflow%3A${dpid_id} + ... ${flow.table_id} ... ${flow.id} - Wait Until Keyword Succeeds 3s 1s Validate Switch Output ${test_switch} ${test_switch.dump_all_flows} ${test_switch.flow_validations} - Wait Until Keyword Succeeds 3s 1s Remove Flow From Controller And Verify openflow%3A${dpid_id} ${flow.table_id} ${flow.id} - Wait Until Keyword Succeeds 3s 1s Validate Switch Output ${test_switch} ${test_switch.dump_all_flows} ${test_switch.flow_validations} + Wait Until Keyword Succeeds + ... 3s + ... 1s + ... Validate Switch Output + ... ${test_switch} + ... ${test_switch.dump_all_flows} + ... ${test_switch.flow_validations} ... false OpenFlow Actions Suite Setup @@ -107,7 +133,8 @@ OpenFlow Actions Suite Setup Call Method ${test_switch} set_controller_ip ${ODL_SYSTEM_IP} Call Method ${test_switch} set_mgmt_prompt ${SWITCH_PROMPT} Run Command On Controller ${ODL_SYSTEM_IP} ps -elf | grep java - Log MAKE: ${test_switch.make}\nMODEL: ${test_switch.model}\nIP: ${test_switch.mgmt_ip}\nPROMPT: ${test_switch.mgmt_prompt}\nCONTROLLER_IP: ${test_switch.of_controller_ip}\nMGMT_PROTOCOL: ${test_switch.mgmt_protocol} + Log + ... MAKE: ${test_switch.make}\nMODEL: ${test_switch.model}\nIP: ${test_switch.mgmt_ip}\nPROMPT: ${test_switch.mgmt_prompt}\nCONTROLLER_IP: ${test_switch.of_controller_ip}\nMGMT_PROTOCOL: ${test_switch.mgmt_protocol} Ping ${test_switch.mgmt_ip} Initialize Switch ${test_switch} Configure OpenFlow ${test_switch} -- 2.36.6