Suite Setup Initialization Phase
Suite Teardown Delete All Sessions
Test Template Check Datastore Presence
-Library OperatingSystem
Library Collections
-Library XML
-Library SSHLibrary
-Resource ../../../../libraries/FlowLib.robot
-Library ../../../../libraries/XmlComparator.py
-Variables ../../../../variables/Variables.py
+Library OperatingSystem
Library RequestsLibrary
-Library ../../../../libraries/Common.py
+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
*** 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 f12.xml f13.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 f47.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
+... 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
[Documentation] Add 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 Add Flow Via RPC ${switch_idx} ${xmlroot}
- # Lets wait for ofp to collect stats
+ FOR ${flowfile} IN @{flowlist0}
+ Log ${flowfile}
+ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
+ Run Keyword And Continue On Failure Add Flow Via RPC ${switch_idx} ${xmlroot}
+ # Lets wait for ofp to collect stats
+ END
${flows}= Get Length ${flowlist0}
- Wait Until Keyword Succeeds 10s 2s FlowLib.Check Flow Stats Are Available openflow:1 ${flows}
+ Wait Until Keyword Succeeds 30s 2s FlowLib.Check Flow Stats Are Available openflow:1 ${flows}
# Show switch content (for debug purposes if needed)
Write dpctl dump-flows -O OpenFlow13
Read Until mininet>
Test Is Flow 11 Added
f11.xml ${False} ${True} ${False}
-Test Is Flow 12 Added
- f12.xml ${False} ${True} ${False}
-
-Test Is Flow 13 Added
- f13.xml ${False} ${True} ${False}
-
-Test Is Flow 14 Added
- f14.xml ${False} ${True} ${False}
-
Test Is Flow 15 Added
f15.xml ${False} ${True} ${False}
Test Is Flow 45 Added
f45.xml ${False} ${True} ${False}
-Test Is Flow 47 Added
- f47.xml ${False} ${True} ${False}
-
Test Is Flow 101 Added
f101.xml ${False} ${True} ${False}
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 RPC ${switch_idx} ${data} ${upddata}
- # Lets wait for ofp to collect stats
- Sleep 3s
+ 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 RPC ${switch_idx} ${data} ${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 11 Updated
f11.xml ${False} ${True} ${True}
-Test Is Flow 12 Updated
- f12.xml ${False} ${True} ${True}
-
-Test Is Flow 13 Updated
- f13.xml ${False} ${True} ${True}
-
Test Is Flow 14 Updated
f14.xml ${False} ${True} ${True}
Test Is Flow 45 Updated
f45.xml ${False} ${True} ${True}
-Test Is Flow 47 Updated
- f47.xml ${False} ${True} ${True}
-
Test Is Flow 101 Updated
f101.xml ${False} ${True} ${True}
Test Delete Flows Group 0
[Documentation] Delete 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 Delete Flow Via RPC ${switch_idx} ${xmlroot}
- # Lets wait for ofp to collect stats
- Sleep 3s
+ FOR ${flowfile} IN @{flowlist0}
+ Log ${flowfile}
+ Create Flow Variables For Suite From XML File ${XmlsDir}/${flowfile}
+ Run Keyword And Continue On Failure Delete Flow Via RPC ${switch_idx} ${xmlroot}
+ # 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 11 Deleted
f11.xml ${False} ${False} ${True}
-Test Is Flow 12 Deleted
- f12.xml ${False} ${False} ${True}
-
-Test Is Flow 13 Deleted
- f13.xml ${False} ${False} ${True}
-
Test Is Flow 14 Deleted
f14.xml ${False} ${False} ${True}
Test Is Flow 45 Deleted
f45.xml ${False} ${False} ${True}
-Test Is Flow 47 Deleted
- f47.xml ${False} ${False} ${True}
-
Test Is Flow 101 Deleted
f101.xml ${False} ${False} ${True}
Initialization Phase
[Documentation] Initiate tcp connection with controller
Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
+ BuiltIn.Wait Until Keyword Succeeds 10x 1s FlowLib.Check Switches In Inventory ${1}
Write dpctl dump-flows -O OpenFlow13
Read Until mininet>