Delete flows created by simple fwd + improve OVSDB test + more stable mininet cleaning
authorLuis Gomez <luis.gomez@ericsson.com>
Mon, 2 Dec 2013 18:08:48 +0000 (10:08 -0800)
committerLuis Gomez <luis.gomez@ericsson.com>
Mon, 2 Dec 2013 18:08:48 +0000 (10:08 -0800)
Change-Id: Ib4d29cc5d391222b2d272a641373d6b60470c2a2
Signed-off-by: Luis Gomez <luis.gomez@ericsson.com>
test/csit/suites/base/030__arp_handler.txt
test/csit/suites/base/050__OVSDB_plugin.txt
test/csit/suites/base/__init__.txt

index 691a26b45eea85c15e65080f77ace1a8614adcbb..f2d113d3ca8cc2e0e7e9520732157971cef692ba 100644 (file)
@@ -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
index 63fbf0c6af3fc27433d8124a832a244c9e5ec368..c14a3ffa4adad1df9943cd1739be7a242abcff61 100644 (file)
@@ -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 port
+    [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
index 06cb5ef4957a826a7bfc4ff7cb2eebe3e79f5dad..f0c0a85dc19971f2415141c9d6d942685c527a18 100644 (file)
@@ -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