*** 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
... 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}
*** 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
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
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}
[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}
*** 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
*** 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
*** 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
*** 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
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
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}
*** 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
[Documentation] Stop Mininet.
MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
+
*** Keywords ***
Initialization Phase
[Documentation] Create controller session and set variables.
*** 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
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
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
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}
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}
${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
*** 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
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.
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.
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}
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.
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.
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.
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.
[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
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}
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
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.
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
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.
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}
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.
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
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.
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
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.
[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
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.
[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.
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}
*** 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
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}
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}
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}
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
*** 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
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}
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
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}
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
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}
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
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}
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
*** 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
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}
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}
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}
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
*** 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
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}
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
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}
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
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}
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
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}
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
*** 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}
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
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.
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.
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.
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.
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}
*** 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
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}
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
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.
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.
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
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
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.
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.
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}
*** 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
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.
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.
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
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.
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.
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
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.
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.
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}
*** 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
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
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
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
${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}
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}
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}
*** 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
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
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}
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}
[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}
[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}
*** 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
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
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}
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}
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}
${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}
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}
*** 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
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
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}
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}
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}
${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}
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
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}
*** 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
*** 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
*** 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
Wait Until Keyword Succeeds 30s 1s Check Operational Flow ${True} ${upddata}
[Teardown] Delete Flow
+
*** Keywords ***
Log Switch Flows
[Documentation] Logs the switch content
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}
*** 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
# 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
# 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
*** 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
# 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
# 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
# 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
*** 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
*** 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
Check Config Flow ${False}
Check Operational Table ${False}
+
*** Keywords ***
Init Flow Variables
[Arguments] ${file}
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}
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
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}
*** 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
*** 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
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}
*** 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?"
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
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}
*** 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
*** 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
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}
${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}
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
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}
*** 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
${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
${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
${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}
*** 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
*** 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
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}
${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}
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
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}
*** 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
${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
${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
${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}
*** 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
*** 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
${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}
*** 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
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
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}
*** 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}
# 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
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
@{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}
*** 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
*** 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} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>0</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>openflow:1:1</output-node-connector></output-action></action></apply-actions></instruction></instructions></flow>
+${BODY2}
+... <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>152</id><table_id>0</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>openflow:1:1</output-node-connector></output-action></action></apply-actions></instruction></instructions></flow>
+
*** 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}
*** 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
*** 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
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
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}
*** 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}
# 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
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
@{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}
*** 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
*** 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} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.10.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><dec-nw-ttl/></action></apply-actions></instruction></instructions></flow>
-${BODY2} <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>1</output-node-connector><max-length>60</max-length></output-action></action></apply-actions></instruction></instructions></flow>
+${BODY1}
+... <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.10.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><dec-nw-ttl/></action></apply-actions></instruction></instructions></flow>
+${BODY2}
+... <flow xmlns="urn:opendaylight:flow:inventory"><priority>2</priority><flow-name>Foo</flow-name><match><ethernet-match><ethernet-type><type>2048</type></ethernet-type></ethernet-match><ipv4-destination>10.0.20.1/32</ipv4-destination></match><id>139</id><table_id>2</table_id><instructions><instruction><order>0</order><apply-actions><action><order>0</order><output-action><output-node-connector>1</output-node-connector><max-length>60</max-length></output-action></action></apply-actions></instruction></instructions></flow>
+
*** 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}
*** 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
*** 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
${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
*** 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
${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
*** 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
${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
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
*** 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
... 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}
... 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}
[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
##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
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
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}
*** 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
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
${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}
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}
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}
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}
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
*** 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
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}
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}
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}
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}
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}
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
*** 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
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}
*** 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}
${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})
*** 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}
${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})
*** 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}
${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})
*** 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}
${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})
*** 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
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}
Stop Mininet End
Stop Switches
+
*** Keywords ***
Connect Switches
[Documentation] Starts mininet with requested number of switches (${swnr})
*** 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
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}
Stop Mininet End
Stop Switches
+
*** Keywords ***
Connect Switches
[Documentation] Starts mininet with requested number of switches (${swnr})
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
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})
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}
*** 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
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}
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}
Stop Mininet End
Stop Switches
+
*** Keywords ***
Connect Switches
[Documentation] Starts mininet with requested number of switches (${swnr})
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
*** 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
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}
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}
Stop Mininet End
Stop Switches
+
*** Keywords ***
Connect Switches
[Documentation] Starts mininet with requested number of switches (${swnr})
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
*** 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}
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}
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}
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}
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
*** 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}
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}
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}
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}
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}
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
*** 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
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
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
[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.
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}
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}
*** 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
##- proper default flow rules
##- ???
+
*** Keywords ***
Switch Qualification Suite Setup
${test_switch}= Get Switch ${SWITCH_CLASS}
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}
*** 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
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
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}