*** Settings ***
-Documentation Test suite for Ring/Loop topology of size 3
-Suite Setup Start Suite
-Suite Teardown Utils.Stop Mininet
-Library RequestsLibrary
-Resource ../../../libraries/Utils.robot
-Resource ../../../variables/openflowplugin/Variables.robot
-Variables ../../../variables/Variables.py
+Documentation Test suite for Ring/Loop topology of size 3
+
+Library RequestsLibrary
+Resource ../../../libraries/Utils.robot
+Resource ../../../variables/openflowplugin/Variables.robot
+Variables ../../../variables/Variables.py
+
+Suite Setup Start Suite
+Suite Teardown Utils.Stop Mininet
+
*** Variables ***
-${FORWARD} "stp-status-aware-node-connector:status":"forwarding"
-${DISCARD} "stp-status-aware-node-connector:status":"discarding"
+${FORWARD} "stp-status-aware-node-connector:status":"forwarding"
+${DISCARD} "stp-status-aware-node-connector:status":"discarding"
+
*** Test Cases ***
Check Stats for node 1
[Documentation] Check all ports are present
@{list} Create List openflow:1:1 openflow:1:2 openflow:1:3 openflow:2:1 openflow:2:2
... openflow:2:3 openflow:3:1 openflow:3:2 openflow:3:3
- 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}
Check Ports STP status
[Documentation] Check the stp status of the ports (forwarding/discarding)
- Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${FORWARD} 4
- Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${DISCARD} 2
+ Wait Until Keyword Succeeds
+ ... 10s
+ ... 2s
+ ... Check For Specific Number Of Elements At URI
+ ... ${RFC8040_OPERATIONAL_NODES_API}
+ ... ${FORWARD}
+ ... 4
+ Wait Until Keyword Succeeds
+ ... 10s
+ ... 2s
+ ... Check For Specific Number Of Elements At URI
+ ... ${RFC8040_OPERATIONAL_NODES_API}
+ ... ${DISCARD}
+ ... 2
Check Flows
[Documentation] Check all flows are present
[Tags] bug 6984 bug
- Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} "output-node-connector" 16
+ Wait Until Keyword Succeeds
+ ... 10s
+ ... 2s
+ ... Check For Specific Number Of Elements At URI
+ ... ${RFC8040_OPERATIONAL_NODES_API}
+ ... "output-node-connector"
+ ... 16
[Teardown] Report_Failure_Due_To_Bug 6984
Ping Test
Write link s1 s2 down
Read Until mininet>
@{list} Create List ${DISCARD}
- 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}
Wait Until Keyword Succeeds 10s 2s Ping Works Good
Link Up
[Tags] exclude
Write link s1 s2 up
Read Until mininet>
- Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${FORWARD} 4
- Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${DISCARD} 2
+ Wait Until Keyword Succeeds
+ ... 10s
+ ... 2s
+ ... Check For Specific Number Of Elements At URI
+ ... ${RFC8040_OPERATIONAL_NODES_API}
+ ... ${FORWARD}
+ ... 4
+ Wait Until Keyword Succeeds
+ ... 10s
+ ... 2s
+ ... Check For Specific Number Of Elements At URI
+ ... ${RFC8040_OPERATIONAL_NODES_API}
+ ... ${DISCARD}
+ ... 2
# This sleep is needed because if the ping in the below WUKS is launched before the STP effectively removes the link,
# it produces a packet storm in mininet that makes the test unresponsive.
Sleep 1
[Tags] exclude
Write sh ovs-vsctl add-port s1 s1-eth2 -- set interface s1-eth2 ofport=2
Read Until mininet>
- Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${FORWARD} 4
- Wait Until Keyword Succeeds 10s 2s Check For Specific Number Of Elements At URI ${RFC8040_OPERATIONAL_NODES_API} ${DISCARD} 2
+ Wait Until Keyword Succeeds
+ ... 10s
+ ... 2s
+ ... Check For Specific Number Of Elements At URI
+ ... ${RFC8040_OPERATIONAL_NODES_API}
+ ... ${FORWARD}
+ ... 4
+ Wait Until Keyword Succeeds
+ ... 10s
+ ... 2s
+ ... Check For Specific Number Of Elements At URI
+ ... ${RFC8040_OPERATIONAL_NODES_API}
+ ... ${DISCARD}
+ ... 2
# This sleep is needed because if the ping in the below WUKS is launched before the STP effectively removes the link,
# it produces a packet storm in mininet that makes the test unresponsive.
Sleep 1
Wait Until Keyword Succeeds 10s 2s Ping Works Good
+
*** Keywords ***
Start Suite
[Documentation] Open controller session & mininet connection and start mininet custom topo
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
- ${start}= Set Variable sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --custom customtopo.py --topo ring --switch ovsk,protocols=OpenFlow13
- ${mininet_conn_id}= Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
+ ${start} Set Variable
+ ... sudo mn --controller=remote,ip=${ODL_SYSTEM_IP} --custom customtopo.py --topo ring --switch ovsk,protocols=OpenFlow13
+ ${mininet_conn_id} Open Connection ${TOOLS_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=30s
Set Suite Variable ${mininet_conn_id}
Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any
Put File ${CURDIR}/../topologies/customtopo.py