From 5e298cb3c95fec214604ee4b8f9512b85e5f104b Mon Sep 17 00:00:00 2001 From: Luis Gomez Date: Mon, 2 Dec 2013 10:08:48 -0800 Subject: [PATCH] Delete flows created by simple fwd + improve OVSDB test + more stable mininet cleaning Change-Id: Ib4d29cc5d391222b2d272a641373d6b60470c2a2 Signed-off-by: Luis Gomez --- test/csit/suites/base/030__arp_handler.txt | 6 ++ test/csit/suites/base/050__OVSDB_plugin.txt | 72 ++++++++++++--------- test/csit/suites/base/__init__.txt | 4 +- 3 files changed, 51 insertions(+), 31 deletions(-) diff --git a/test/csit/suites/base/030__arp_handler.txt b/test/csit/suites/base/030__arp_handler.txt index 691a26b45e..f2d113d3ca 100644 --- a/test/csit/suites/base/030__arp_handler.txt +++ b/test/csit/suites/base/030__arp_handler.txt @@ -38,6 +38,12 @@ List hosts Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} 10.0.0.1 Should Contain ${resp.content} 10.0.0.4 +Remove flows + [Documentation] Remove flows generated by simple fwd + [Tags] Get + Write dpctl del-flows + Sleep 1 + Read Add a subnet [Documentation] Add a subnet, list to validate the result. [Tags] add diff --git a/test/csit/suites/base/050__OVSDB_plugin.txt b/test/csit/suites/base/050__OVSDB_plugin.txt index 63fbf0c6af..c14a3ffa4a 100644 --- a/test/csit/suites/base/050__OVSDB_plugin.txt +++ b/test/csit/suites/base/050__OVSDB_plugin.txt @@ -43,63 +43,77 @@ Add bridge s4 [Tags] add ${resp} Post session ${REST_CONTEXT_BD}/bridge/OVS/MININET/s4 data={} Should Be Equal As Strings ${resp.status_code} 201 -Delete s1 port s1-eth1 - [Documentation] Delete bridge s1 port s1-eth1 +Delete s1 ports + [Documentation] Delete s1 connected ports [Tags] delete ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth1 Should Be Equal As Strings ${resp.status_code} 200 -Delete s1 port s1-eth2 - [Documentation] Delete bridge s1 port s1-eth2 - [Tags] delete ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth2 Should Be Equal As Strings ${resp.status_code} 200 -Delete s2 port s2-eth3 - [Documentation] Delete bridge s2 port s2-eth3 - [Tags] delete ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3 Should Be Equal As Strings ${resp.status_code} 200 -Delete s3 port s3-eth3 - [Documentation] Delete bridge s3 port s3-eth3 - [Tags] delete ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3 Should Be Equal As Strings ${resp.status_code} 200 -Add s4 port s4-eth1 - [Documentation] Add s4 port s4-eth1 and patch to s2 port s2-eth3 +Add s4 ports + [Documentation] Add s4 connected ports [Tags] add ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth1 ... data={"type":"patch", "CUSTOM":{"peer":"s2-eth3"}} Should Be Equal As Strings ${resp.status_code} 201 -Add s4 port s4-eth2 - [Documentation] Add s4 port s4-eth2 and patch to s3 port s3-eth3 - [Tags] add ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth2 ... data={"type":"patch", "CUSTOM":{"peer":"s3-eth3"}} Should Be Equal As Strings ${resp.status_code} 201 -Add s2 port s2-eth3 - [Documentation] Add s2 port s2-eth3 and patch to s4 port s4-eth1 - [Tags] add ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3 ... data={"type":"patch", "CUSTOM":{"peer":"s4-eth1"}} Should Be Equal As Strings ${resp.status_code} 201 -Add s3 port s3-eth3 - [Documentation] Add s3 port s3-eth3 and patch to s4 port s4-eth2 - [Tags] add ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3 ... data={"type":"patch", "CUSTOM":{"peer":"s4-eth2"}} Should Be Equal As Strings ${resp.status_code} 201 -Delete bridge s1 - [Documentation] Delete bridge s1 - [Tags] Delete - ${resp} Delete session ${REST_CONTEXT_BD}/bridge/OVS/MININET/s1 - Should Be Equal As Strings ${resp.status_code} 200 - Sleep 5 Ping h1 to h4 [Documentation] Ping h1 to h4, verify no packet loss [Tags] Get + Sleep 5 Write h1 ping -c 3 h4 Sleep 6 ${result} Read - Should Contain ${result} 64 bytes + Should Contain ${result} 64 bytes +Remove flows + [Documentation] Remove flows generated by simple fwd + [Tags] Get + Write dpctl del-flows + Sleep 1 + Read +Delete s4 ports + [Documentation] Delete s4 connected ports + [Tags] delete + ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth1 + Should Be Equal As Strings ${resp.status_code} 200 + ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s4/s4-eth2 + Should Be Equal As Strings ${resp.status_code} 200 + ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3 + Should Be Equal As Strings ${resp.status_code} 200 + ${resp} Delete session ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3 + Should Be Equal As Strings ${resp.status_code} 200 +Add s1 ports + [Documentation] Add s1 connected ports + [Tags] add + ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth1 + ... data={"type":"patch", "CUSTOM":{"peer":"s2-eth3"}} + Should Be Equal As Strings ${resp.status_code} 201 + ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s1/s1-eth2 + ... data={"type":"patch", "CUSTOM":{"peer":"s3-eth3"}} + Should Be Equal As Strings ${resp.status_code} 201 + ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s2/s2-eth3 + ... data={"type":"patch", "CUSTOM":{"peer":"s1-eth1"}} + Should Be Equal As Strings ${resp.status_code} 201 + ${resp} Post session ${REST_CONTEXT_BD}/port/OVS/MININET/s3/s3-eth3 + ... data={"type":"patch", "CUSTOM":{"peer":"s1-eth2"}} + Should Be Equal As Strings ${resp.status_code} 201 +Delete bridge s4 + [Documentation] Delete bridge s4 + [Tags] Delete + ${resp} Delete session ${REST_CONTEXT_BD}/bridge/OVS/MININET/s4 + Should Be Equal As Strings ${resp.status_code} 200 Disconnect mininet [Documentation] Disconnect mininet, list the nodes and validate result [Tags] delete diff --git a/test/csit/suites/base/__init__.txt b/test/csit/suites/base/__init__.txt index 06cb5ef495..f0c0a85dc1 100644 --- a/test/csit/suites/base/__init__.txt +++ b/test/csit/suites/base/__init__.txt @@ -13,6 +13,8 @@ Start Suite Open Connection ${MININET} prompt=> Login With Public Key ${MININET_USER} ${USER_HOME}/.ssh/id_rsa any Write sudo ovs-vsctl set-manager ptcp:6640 + Write sudo mn -c + Sleep 2 Write ${start} Sleep 65 Read @@ -20,7 +22,5 @@ Stop Suite Log Stop the test on the base edition Write exit Sleep 2 - Write sudo mn -c - Sleep 2 Read Close Connection -- 2.36.6