From: Luis Gomez Date: Thu, 30 Apr 2015 22:03:57 +0000 (-0700) Subject: New L2Switch suite to catch standing issues X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=integration%2Ftest.git;a=commitdiff_plain;h=61dca31dca8c22abed3d56f169c5139c48a1b2cf New L2Switch suite to catch standing issues Addressing Jamo's comments Change-Id: Ida139aa9387e5c10b25ab912cfbc9d823d54b5cd Signed-off-by: Luis Gomez --- diff --git a/test/csit/libraries/Utils.txt b/test/csit/libraries/Utils.txt index f1a80d1fc1..199c58e00c 100644 --- a/test/csit/libraries/Utils.txt +++ b/test/csit/libraries/Utils.txt @@ -46,7 +46,7 @@ Check Nodes Stats [Arguments] ${node} [Documentation] A GET on the /node/${node} API is made and specific flow stat ... strings are checked for existence. - ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/node/${node} + ${resp} RequestsLibrary.Get session ${OPERATIONAL_NODES_API}/node/${node} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} flow-capable-node-connector-statistics Should Contain ${resp.content} flow-table-statistics @@ -56,7 +56,7 @@ Check That Port Count Is Ok [Documentation] A GET on the /port API is made and the specified port ${count} is ... verified. A more generic Keyword "Check For Specific Number Of Elements At URI" ... also does this work and further consolidation should be done. - ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}/port + ${resp} RequestsLibrary.Get session ${OPERATIONAL_NODES_API}/${CONTAINER}/port Log ${resp.content} Should Be Equal As Strings ${resp.status_code} 200 Should Contain X Times ${resp.content} ${node} ${count} diff --git a/test/csit/suites/l2switch/Address_Tracking_OF13/010__restconf_inv_addresses.robot b/test/csit/suites/l2switch/Address_Tracking_OF13/010__restconf_inv_addresses.robot index 475528a41f..126be9b9d8 100644 --- a/test/csit/suites/l2switch/Address_Tracking_OF13/010__restconf_inv_addresses.robot +++ b/test/csit/suites/l2switch/Address_Tracking_OF13/010__restconf_inv_addresses.robot @@ -1,70 +1,54 @@ *** Settings *** Documentation Test suite for AddressObservations in RESTCONF inventory -Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} Suite Teardown Delete All Sessions -Library SSHLibrary -Library Collections -Library ../../../libraries/RequestsLibrary.py -Library ../../../libraries/Common.py +Library RequestsLibrary +Resource ../../../libraries/Utils.txt Variables ../../../variables/Variables.py *** Variables *** -${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes ${IP_1} "10.0.0.1" ${IP_2} "10.0.0.2" ${IP_3} "10.0.0.3" *** Test Cases *** -Get list of nodes - [Documentation] Get the inventory, should not contain address observations - ${resp} Get session ${REST_CONTEXT} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} openflow:1 - Should Contain ${resp.content} openflow:2 - Should Contain ${resp.content} openflow:3 - Should Contain X Times ${resp.content} forwarding 4 - Should Not Contain ${resp.content} ${IP_1} - Should Not Contain ${resp.content} ${IP_2} - Should Not Contain ${resp.content} ${IP_3} +Check Stats for node 1 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:1 + +Check Stats for node 2 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:2 + +Check Stats for node 3 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:3 + +Check No Host Is Present + [Documentation] Get the invnetory, should not contain any host address + @{list} Create List ${IP_1} ${IP_2} ${IP_3} + Wait Until Keyword Succeeds 30s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API} ${list} Ping All [Documentation] Pingall, verify no packet loss - Write pingall - ${result} Read Until mininet> - Should Contain ${result} 0% dropped - Should Not Contain ${result} X - Sleep 3 + Write pingall + ${result} Read Until mininet> + Should Contain ${result} Results: 0% dropped -Get node 1 addresses +Check node 1 addresses [Documentation] Get the address observations for node 1 - ${resp} Get session ${REST_CONTEXT}/node/openflow:1 - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} openflow:1:1 - Should Contain ${resp.content} openflow:1:2 - Should Contain ${resp.content} addresses - Should Contain X Times ${resp.content} ${IP_1} 1 - Should Not Contain ${resp.content} ${IP_2} - Should Not Contain ${resp.content} ${IP_3} + @{list} Create List ${IP_2} ${IP_3} + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:1 ${IP_1} 1 + Wait Until Keyword Succeeds 30s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API}/node/openflow:1 ${list} -Get node 2 addresses +Check node 2 addresses [Documentation] Get the address observations for node 2 - ${resp} Get session ${REST_CONTEXT}/node/openflow:2 - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} openflow:2:1 - Should Contain ${resp.content} openflow:2:2 - Should Contain ${resp.content} openflow:2:3 - Should Contain ${resp.content} addresses - Should Not Contain ${resp.content} ${IP_1} - Should Contain X Times ${resp.content} ${IP_2} 1 - Should Not Contain ${resp.content} ${IP_3} + @{list} Create List ${IP_1} ${IP_3} + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:2 ${IP_2} 1 + Wait Until Keyword Succeeds 30s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API}/node/openflow:2 ${list} -Get node 3 addresses +Check node 3 addresses [Documentation] Get the address observations for node 3 - ${resp} Get session ${REST_CONTEXT}/node/openflow:3 - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} openflow:3:1 - Should Contain ${resp.content} openflow:3:2 - Should Contain ${resp.content} addresses - Should Not Contain ${resp.content} ${IP_1} - Should Not Contain ${resp.content} ${IP_2} - Should Contain X Times ${resp.content} ${IP_3} 1 + @{list} Create List ${IP_1} ${IP_2} + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API}/node/openflow:3 ${IP_3} 1 + Wait Until Keyword Succeeds 30s 2s Check For Elements Not At URI ${OPERATIONAL_NODES_API}/node/openflow:3 ${list} diff --git a/test/csit/suites/l2switch/Address_Tracking_OF13/__init__.robot b/test/csit/suites/l2switch/Address_Tracking_OF13/__init__.robot index 033a6cca3d..7e4cd3c3b1 100644 --- a/test/csit/suites/l2switch/Address_Tracking_OF13/__init__.robot +++ b/test/csit/suites/l2switch/Address_Tracking_OF13/__init__.robot @@ -2,28 +2,8 @@ Documentation Test suite for L2switch's Address Tracking using mininet OF13 Suite Setup Start Suite Suite Teardown Stop Suite -Library SSHLibrary +Library SSHLibrary +Resource ../../../libraries/Utils.txt *** Variables *** -${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo=linear,3 --switch ovsk,protocols=OpenFlow13 - -** Keywords *** -Start Suite - Log Start mininet - Open Connection ${MININET} prompt=> timeout=30 - Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any - Write sudo ovs-vsctl set-manager ptcp:6644 - Read Until > - Write sudo mn -c - Read Until > - Read Until > - Read Until > - Write ${start} - Read Until mininet> - Sleep 30 -Stop Suite - Log Stop mininet - Read - Write exit - Read Until > - Close Connection +${start} sudo mn --controller=remote,ip=${CONTROLLER} --topo=linear,3 --switch ovsk,protocols=OpenFlow13 diff --git a/test/csit/suites/l2switch/Flow_Programming_OF13/010__restconf_inv_flows.robot b/test/csit/suites/l2switch/Flow_Programming_OF13/010__restconf_inv_flows.robot index f6e438966e..3a5ad2ed98 100644 --- a/test/csit/suites/l2switch/Flow_Programming_OF13/010__restconf_inv_flows.robot +++ b/test/csit/suites/l2switch/Flow_Programming_OF13/010__restconf_inv_flows.robot @@ -1,58 +1,33 @@ -** Settings *** +*** Settings *** Documentation Test suite for FlowProgramming in RESTCONF inventory -Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} +Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} Suite Teardown Delete All Sessions -Library SSHLibrary Library Collections -Library ../../../libraries/RequestsLibrary.py -Library ../../../libraries/Common.py +Library RequestsLibrary +Resource ../../../libraries/Utils.txt Variables ../../../variables/Variables.py *** Variables *** -${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes *** Test Cases *** -Get flows before ping through console - [Documentation] Dump flows should list initial flows (drop, arp, lldp, flood per port) - Write sh ovs-ofctl dump-flows s1 -O OpenFlow13 - ${result} Read Until mininet> - Should Contain X Times ${result} actions 4 - Write sh ovs-ofctl dump-flows s2 -O OpenFlow13 - ${result} Read Until mininet> - Should Contain X Times ${result} actions 5 - Write sh ovs-ofctl dump-flows s3 -O OpenFlow13 - ${result} Read Until mininet> - Should Contain X Times ${result} actions 4 +Check Stats for node 1 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:1 -# Get flows before ping through restconf -# [Documentation] Get the inventory, should not contain flows -# ${resp} Get session ${REST_CONTEXT}/node/openflow:1/table/0 -# Should Be Equal As Strings ${resp.status_code} 200 -# Should Not Contain ${resp.content} flow +Check Stats for node 2 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:2 -Ping All - [Documentation] Pingall, verify no packet loss - Write pingall - ${result} Read Until mininet> - Should Contain ${result} 0% dropped - Should Not Contain ${result} X +Check Stats for node 3 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:3 -#Get flows after ping through console -# [Documentation] Dump flows should list flows -# Write sh ovs-ofctl dump-flows s1 -O OpenFlow13 -# ${result} Read Until mininet> -# Should Contain X Times ${result} actions 4 -# Write sh ovs-ofctl dump-flows s2 -O OpenFlow13 -# Sleep 5 -# ${result} Read Until mininet> -# Should Contain X Times ${result} actions 6 -# Write sh ovs-ofctl dump-flows s3 -O OpenFlow13 -# Sleep 5 -# ${result} Read Until mininet> -# Should Contain X Times ${result} actions 4 +Check Flows + [Documentation] Check all flows are present + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} "output-node-connector" 21 - -#Get flows after ping through restconf -# [Documentation] Get the inventory, should not contain flows -# ${resp} Get session ${REST_CONTEXT}/node/openflow:1/table/0 -# Should Be Equal As Strings ${resp.status_code} 200 +Ping All Test + [Documentation] Ping all, verify no packet loss or duplicates + Write pingall + ${result} Read Until mininet> + Should Contain ${result} Results: 0% dropped diff --git a/test/csit/suites/l2switch/Flow_Programming_OF13/__init__.robot b/test/csit/suites/l2switch/Flow_Programming_OF13/__init__.robot index 8bf7a108ee..67188c1865 100644 --- a/test/csit/suites/l2switch/Flow_Programming_OF13/__init__.robot +++ b/test/csit/suites/l2switch/Flow_Programming_OF13/__init__.robot @@ -2,28 +2,8 @@ Documentation Test suite for L2switch's Flow Programming using mininet OF13 Suite Setup Start Suite Suite Teardown Stop Suite -Library SSHLibrary +Library SSHLibrary +Resource ../../../libraries/Utils.txt *** Variables *** -${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo=linear,3 --switch ovsk,protocols=OpenFlow13 - -** Keywords *** -Start Suite - Log Start mininet - Open Connection ${MININET} prompt=> timeout=30 - Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any - Write sudo ovs-vsctl set-manager ptcp:6644 - Read Until > - Write sudo mn -c - Read Until > - Read Until > - Read Until > - Write ${start} - Read Until mininet> - Sleep 15 -Stop Suite - Log Stop mininet - Read - Write exit - Read Until > - Close All Connections +${start} sudo mn --controller=remote,ip=${CONTROLLER} --topo=tree,2 --switch ovsk,protocols=OpenFlow13 diff --git a/test/csit/suites/l2switch/Host_Tracking_OF13/010__restconf_topo_nodes.robot b/test/csit/suites/l2switch/Host_Tracking_OF13/010__restconf_topo_nodes.robot index add2532f6d..f5e35a5a3e 100644 --- a/test/csit/suites/l2switch/Host_Tracking_OF13/010__restconf_topo_nodes.robot +++ b/test/csit/suites/l2switch/Host_Tracking_OF13/010__restconf_topo_nodes.robot @@ -2,14 +2,11 @@ Documentation Test suite for Address in RESTCONF topology Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} Suite Teardown Delete All Sessions -Library SSHLibrary -Library Collections -Library ../../../libraries/RequestsLibrary.py -Library ../../../libraries/Common.py +Library RequestsLibrary +Resource ../../../libraries/Utils.txt Variables ../../../variables/Variables.py *** Variables *** -${REST_TOPO} /restconf/operational/network-topology:network-topology ${MAC_1} 00:00:00:00:00:01 ${MAC_2} 00:00:00:00:00:02 ${MAC_3} 00:00:00:00:00:03 @@ -18,42 +15,46 @@ ${IP_2} 10.0.0.2 ${IP_3} 10.0.0.3 *** Test Cases *** -Get list of host from network topology +Check Stats for node 1 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:1 + +Check Stats for node 2 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:2 + +Check Stats for node 3 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:3 + +Check Switch Links + [Documentation] Get the topology and check links + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} link-id 4 + +Check No Host Is Present [Documentation] Get the network topology, should not contain any host address - ${resp} Get session ${REST_TOPO} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} openflow:1 - Should Contain ${resp.content} openflow:2 - Should Contain ${resp.content} openflow:3 - Should Contain X Times ${resp.content} link-id 4 - Should Not Contain ${resp.content} ${MAC_1} - Should Not Contain ${resp.content} ${MAC_2} - Should Not Contain ${resp.content} ${MAC_3} + @{list} Create List ${MAC_1} ${MAC_2} ${MAC_3} + Wait Until Keyword Succeeds 30s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${list} + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} link-id 4 Ping All [Documentation] Pingall, verify no packet loss Write pingall ${result} Read Until mininet> - Should Contain ${result} 0% dropped - Should Not Contain ${result} X - Sleep 3 + Should Contain ${result} Results: 0% dropped + +Check Host Links + [Documentation] Get the topology and check links + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} link-id 10 + +Host Tracker host1 + [Documentation] Get the network topology, + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} "node-id":"host:${MAC_1}" 1 + +Host Tracker host2 + [Documentation] Get the network topology, + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} "node-id":"host:${MAC_2}" 1 -Host Tracker +Host Tracker host3 [Documentation] Get the network topology, - ${resp} Get session ${REST_TOPO}/topology/flow:1 - Should Be Equal As Strings ${resp.status_code} 200 - Log ${resp.content} - Should Contain X Times ${resp.content} "node-id":"host:${MAC_1}" 1 - Should Contain X Times ${resp.content} "node-id":"host:${MAC_2}" 1 - Should Contain X Times ${resp.content} "node-id":"host:${MAC_3}" 1 - -Check host are deleted - [Documentation] Closing mininet this will remove the switch and the host should also be deleted - Log closing mininet - write exit - Read Until > - sleep 5 - ${resp} Get session ${REST_TOPO}/topology/flow:1 - Should Be Equal as Strings ${resp.status_code} 200 - Should not Contain ${resp.content} "node-id":"host - Log ${resp.content} + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_TOPO_API} "node-id":"host:${MAC_3}" 1 diff --git a/test/csit/suites/l2switch/Host_Tracking_OF13/__init__.robot b/test/csit/suites/l2switch/Host_Tracking_OF13/__init__.robot index bb8e7aa880..f659b29bfd 100644 --- a/test/csit/suites/l2switch/Host_Tracking_OF13/__init__.robot +++ b/test/csit/suites/l2switch/Host_Tracking_OF13/__init__.robot @@ -2,24 +2,8 @@ Documentation Test suite for L2switch's Address Tracking using mininet OF13 Suite Setup Start Suite Suite Teardown Stop Suite -Library SSHLibrary +Library SSHLibrary +Resource ../../../libraries/Utils.txt *** Variables *** -${start}= sudo mn --controller=remote,ip=${CONTROLLER} --topo=linear,3 --switch ovsk,protocols=OpenFlow13 --mac - -** Keywords *** -Start Suite - Log Start mininet - Open Connection ${MININET} prompt=> timeout=20 - Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any - Write sudo ovs-vsctl set-manager ptcp:6644 - Read Until > - Write sudo mn -c - Read Until > - Read Until > - Read Until > - Write ${start} - Read Until mininet> - Sleep 30 -Stop Suite - Close Connection +${start} sudo mn --controller=remote,ip=${CONTROLLER} --topo=linear,3 --switch ovsk,protocols=OpenFlow13 --mac diff --git a/test/csit/suites/l2switch/Loop_Removal_OF13/010__loop_of_3.robot b/test/csit/suites/l2switch/Loop_Removal_OF13/010__loop_of_3.robot index 18d52aefe7..4b308d7512 100644 --- a/test/csit/suites/l2switch/Loop_Removal_OF13/010__loop_of_3.robot +++ b/test/csit/suites/l2switch/Loop_Removal_OF13/010__loop_of_3.robot @@ -1,47 +1,66 @@ *** Settings *** Documentation Test suite for Ring/Loop topology of size 3 -Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library Collections -Library ../../../libraries/RequestsLibrary.py -Library ../../../libraries/Common.py +Suite Setup Start Suite +Suite Teardown Stop Suite +Library RequestsLibrary +Resource ../../../libraries/Utils.txt Variables ../../../variables/Variables.py *** Variables *** -${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes +${FORWARD} "stp-status-aware-node-connector:status":"forwarding" +${DISCARD} "stp-status-aware-node-connector:status":"discarding" *** Test Cases *** -Get opendaylight-inventory - [Documentation] Get all nodes and all link states (forwarding/discarding) - ${resp} Get session ${REST_CONTEXT} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} openflow:1 - Should Contain ${resp.content} openflow:2 - Should Contain ${resp.content} openflow:3 - Should Contain X Times ${resp.content} forwarding 4 - Should Contain X Times ${resp.content} discarding 2 - -Get nodeconnectors for node 1 - [Documentation] Get the inventory for node 1 - ${resp} Get session ${REST_CONTEXT}/node/openflow:1 - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} openflow:1:1 - Should Contain ${resp.content} openflow:1:2 - Should Contain ${resp.content} openflow:1:3 - -Get nodeconnectors for node 2 - [Documentation] Get the inventory for node 2 - ${resp} Get session ${REST_CONTEXT}/node/openflow:2 - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} openflow:2:1 - Should Contain ${resp.content} openflow:2:2 - Should Contain ${resp.content} openflow:2:3 - -Get nodeconnectors for node 3 - [Documentation] Get the inventory for node 3 - ${resp} Get session ${REST_CONTEXT}/node/openflow:3 - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} openflow:3:1 - Should Contain ${resp.content} openflow:3:2 - Should Contain ${resp.content} openflow:3:3 +Check Stats for node 1 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:1 +Check Stats for node 2 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:2 + +Check Stats for node 3 + [Documentation] Get the stats for a node + Wait Until Keyword Succeeds 30s 2s Check Nodes Stats openflow:3 + +Check Ports + [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 30s 2s Check For Elements At URI ${OPERATIONAL_NODES_API} ${list} + +Check Ports STP status + [Documentation] Check the stp status of the ports (forwarding/discarding) + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} ${FORWARD} 4 + Wait Until Keyword Succeeds 30s 2s Check For Specific Number Of Elements At URI ${OPERATIONAL_NODES_API} ${DISCARD} 2 + +Ping Test + [Documentation] Ping h1 to h2, verify no packet loss or duplicates + Write h1 ping -w 1 h2 + ${result} Read Until mininet> + Should Contain ${result} 1 received, 0% packet loss + Should Not Contain ${result} duplicates + +*** Keywords *** +Start Suite + [Documentation] Open controller session & mininet connection and start mininet custom topo + Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} + ${start}= Set Variable sudo mn --controller=remote,ip=${CONTROLLER} --custom customtopo.py --topo ring --switch ovsk,protocols=OpenFlow13 + ${mininet_conn_id}= Open Connection ${MININET} prompt=${linux_prompt} timeout=30s + Set Suite Variable ${mininet_conn_id} + Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any + Put File ${CURDIR}/../topologies/customtopo.py + Execute Command sudo ovs-vsctl set-manager ptcp:6644 + Execute Command sudo mn -c + Write ${start} + Read Until mininet> + +Stop Suite + [Documentation] Stop mininet topo and close connections & sessions + Log Stop the test on the base edition + Switch Connection ${mininet_conn_id} + Read + Write exit + Read Until ${linux_prompt} + Close Connection + Delete All Sessions diff --git a/test/csit/suites/l2switch/Loop_Removal_OF13/020__ping.robot b/test/csit/suites/l2switch/Loop_Removal_OF13/020__ping.robot deleted file mode 100644 index 0b959067b1..0000000000 --- a/test/csit/suites/l2switch/Loop_Removal_OF13/020__ping.robot +++ /dev/null @@ -1,34 +0,0 @@ -*** Settings *** -Documentation Test suite for Pinging in Ring/Loop topology of size 3 -Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} -Suite Teardown Delete All Sessions -Library SSHLibrary -Library Collections -Library ../../../libraries/RequestsLibrary.py -Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py - -*** Variables *** -${REST_CONTEXT} /restconf/operational/opendaylight-inventory:nodes - -*** Test Cases *** -Ping All - [Documentation] Pingall, verify no packet loss - Write pingall - ${result} Read Until mininet> - Should Contain ${result} 0% dropped - Should Contain X Times ${result} h1 3 - Should Contain X Times ${result} h2 3 - Should Contain X Times ${result} h3 3 - Should Not Contain ${result} X - - -Ping h1 to h2 - [Documentation] Ping h1 to h2, verify no packet loss or duplicates - Write h1 ping -w 6 h2 - Read Until mininet> - Write h2 ping -w 6 h1 - ${result} Read Until mininet> - Should Contain ${result} 0% packet loss - Should Not Contain ${result} duplicates - diff --git a/test/csit/suites/l2switch/Loop_Removal_OF13/__init__.robot b/test/csit/suites/l2switch/Loop_Removal_OF13/__init__.robot deleted file mode 100644 index 1aeeb514f3..0000000000 --- a/test/csit/suites/l2switch/Loop_Removal_OF13/__init__.robot +++ /dev/null @@ -1,32 +0,0 @@ -*** Settings *** -Documentation Test suite for L2switch's LoopRemoval using mininet OF13 -Suite Setup Start Suite -Suite Teardown Stop Suite -Library SSHLibrary -Library OperatingSystem - -*** Variables *** -${start}= sudo mn --controller=remote,ip=${CONTROLLER} --custom customtopo.py --topo ring --switch ovsk,protocols=OpenFlow13 - -** Keywords *** -Start Suite - Log Start mininet - Open Connection ${MININET} prompt=> timeout=30 - Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any - Write sudo ovs-vsctl set-manager ptcp:6644 - Read Until > - Write sudo mn -c - Read Until > - Read Until > - Read Until > - Put File ${CURDIR}/../topologies/customtopo.py - Write ${start} - Read Until mininet> - Sleep 10 -Stop Suite - Log Stop mininet - Read - Write exit - Read Until > - Read - Close Connection diff --git a/test/csit/testplans/l2switch-switch.txt b/test/csit/testplans/l2switch-switch.txt index 516594098a..8fbff2d258 100644 --- a/test/csit/testplans/l2switch-switch.txt +++ b/test/csit/testplans/l2switch-switch.txt @@ -1,5 +1,9 @@ # Place the suites in run order: -integration/test/csit/suites/l2switch/Address_Tracking_OF13 integration/test/csit/suites/l2switch/Flow_Programming_OF13 -integration/test/csit/suites/l2switch/Loop_Removal_OF13 +integration/test/csit/suites/l2switch/Flow_Programming_OF13 +integration/test/csit/suites/l2switch/Address_Tracking_OF13 +integration/test/csit/suites/l2switch/Address_Tracking_OF13 +integration/test/csit/suites/l2switch/Host_Tracking_OF13 integration/test/csit/suites/l2switch/Host_Tracking_OF13 +integration/test/csit/suites/l2switch/Loop_Removal_OF13 +integration/test/csit/suites/l2switch/Loop_Removal_OF13 diff --git a/test/csit/variables/Variables.py b/test/csit/variables/Variables.py index d822ea5399..3e82ad9698 100644 --- a/test/csit/variables/Variables.py +++ b/test/csit/variables/Variables.py @@ -66,8 +66,9 @@ VLANMAP_CREATE = 'vlanmaps.json' # ports URL PORTS = 'ports/detail.json' -# nodes +# Common APIs OPERATIONAL_NODES_API = '/restconf/operational/opendaylight-inventory:nodes' +OPERATIONAL_TOPO_API = '/restconf/operational/network-topology:network-topology' # TOKEN AUTH_TOKEN_API = '/oauth2/token'