Modify CSIT tests for VTN Coordinator of audit feature 84/29184/15
authorKarthik.S <siva-karthik@hcl.com>
Tue, 3 Nov 2015 17:44:20 +0000 (23:14 +0530)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 28 Jan 2016 01:32:11 +0000 (01:32 +0000)
    * Improve test scenario of audit cases and modify 040__vtn_vbrif_audit.robot
      files of both OF10 and OF13
    * Modify create vbr function in VtnCoKeyword library file
    * Modify Mininet ping function by reducing ping interval and modified wait time in Mininet ping test cases.

Change-Id: Ic0eb70df1e3251d6d11720f7db50bed60fcd1f9d
Signed-off-by: Karthik.S <siva-karthik@hcl.com>
12 files changed:
csit/libraries/VtnCoKeywords.robot
csit/suites/vtn/VTN_C_OF10/020__vtn_vbrif_portmap.robot
csit/suites/vtn/VTN_C_OF10/040__vtn_vbrif_audit.robot
csit/suites/vtn/VTN_C_OF10/050__vtn_vbr_flowfilter.robot
csit/suites/vtn/VTN_C_OF10/060__vtn_vbrif_flowfilter.robot
csit/suites/vtn/VTN_C_OF10/070__vtn_flowfilter.robot
csit/suites/vtn/VTN_C_OF10/080__vlan_vtn.robot
csit/suites/vtn/VTN_C_OF13/020__vtn_vbrif_portmap.robot
csit/suites/vtn/VTN_C_OF13/040__vtn_vbrif_audit.robot
csit/suites/vtn/VTN_C_OF13/050__vtn_vbr_flowfilter.robot
csit/suites/vtn/VTN_C_OF13/060__vtn_vbrif_flowfilter.robot
csit/suites/vtn/VTN_C_OF13/070__vtn_flowfilter.robot

index 9ec9a48651d695aab26c3551423dcdaa6f07275c..05695e8dfc935dc57a7702969ac96ede8ab5b8ea 100644 (file)
@@ -71,7 +71,7 @@ Get Coordinator Version
 Add a Controller
     [Arguments]    ${ctrlname}    ${ctrlip}
     [Documentation]    Create a controller
-    ${controllerinfo}    Create Dictionary    controller_id=${ctrlname}    type=odc    ipaddr=${CONTROLLER}    version=1.0
+    ${controllerinfo}    Create Dictionary    controller_id=${ctrlname}    type=odc    ipaddr=${ctrlip}    version=1.0
     ${controllercreate}    Create Dictionary    controller=${controllerinfo}
     ${controllercreate_json}=    json.dumps    ${controllercreate}
     ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${CTRLS_CREATE}    data=${controllercreate_json}
@@ -132,7 +132,8 @@ Create VBR in VTN
     ${vbrcreate}    Create Dictionary    vbridge=${vbrinfo}
     ${vbrcreate_json}=    json.dumps    ${vbrcreate}
     ${resp}    RequestsLibrary.Post    session    ${VTNWEBAPI}/${VTNS}/${vtnname}/${VBRS_CREATE}    data=${vbrcreate_json}
-    Should Be Equal As Strings    ${resp.status_code}    201
+    Run Keyword If    '${vbrname}' == 'Vbr_audit'    Should Be Equal As Strings    ${resp.status_code}    202
+    ...    ELSE     Should Be Equal As Strings    ${resp.status_code}    201
 
 Create VBRIF in VBR
     [Arguments]    ${vtnname}    ${vbrname}    ${vbrifname}    ${ifdescription}    ${retcode}
@@ -266,7 +267,7 @@ Delete a FLOWLIST
 Test Ping
     [Arguments]    ${host1}    ${host2}
     [Documentation]    Ping hosts to check connectivity
-    Write    ${host1} ping -c 4 ${host2}
+    Write    ${host1} ping -c 1 ${host2}
     ${result}    Read Until    mininet>
     Should Contain    ${result}    64 bytes
 
index 8ac0c75a949b03d19e1df551fd1792dc45107e90..cdf114a3fd5ba210947e46e48e3656b50d71f0d3 100644 (file)
@@ -44,7 +44,7 @@ Define Portmap for Interface2
 
 Test Ping for Configuration1
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h3
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h3
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
index 74e7a6e3abc1a2c460a3ed6bdd1ed5d5eeb80531..160676fb9864b8ee308aa082149672e7d760dce2 100644 (file)
@@ -3,51 +3,40 @@ Documentation     Test suite for VTN Coordinator
 Suite Setup       Start SuiteVtnCoTest
 Suite Teardown    Stop SuiteVtnCoTest
 Resource          ../../../libraries/VtnCoKeywords.robot
+Resource          ../../../libraries/WaitForFailure.robot
 
 *** Test Cases ***
-Add a ODL Controller
+Add a ODL Controller with Invalid IP
     [Documentation]    Add a Controller
-    Add a Controller    odc_test    ${CONTROLLER}
+    Add a Controller    odc_test    10.0.0.1
 
-Verify the Controller Status is waiting_audit
+Verify the Controller Status is down
     [Documentation]    Check Controller status
-    Wait Until Keyword Succeeds    12s    2s    Check Controller Status    odc_test    waiting_audit
-
-Audit a controller
-    [Documentation]    Trigger update audit
-    Audit Controller    odc_test
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    12s    1s    Check Controller Status    odc_test    down
 
 Add a Vtn Tenant1
     [Documentation]    Create Vtn Tenant1
     Add a VTN    Tenant1    VTN_TEST
 
 Create VBR in VTN Tenant1
-    [Documentation]    Create a VBR in Tenant1 as Vbridge1
-    Create VBR in VTN    Tenant1    Vbridge1    odc_test
+    [Documentation]    Create a VBR in Tenant1 as Vbr_audit
+    Create VBR in VTN    Tenant1    Vbr_audit    odc_test
 
-Update controller ip invalid
-    [Documentation]    Update Controller ip to invalid
-    Update Controller    odc_test    10.0.0.1    invalid_IP
+Create VBRIF in VBRIDGE Vbr_audit Interface1
+    [Documentation]    Create an interface to Vbr_audit
+    Create VBRIF in VBR    Tenant1    Vbr_audit    Interface1    Interface1    202
 
-Verify the Controller State is down
-    [Documentation]    Check Controller status
-    Wait Until Keyword Succeeds    12s    2s    Check Controller Status    odc_test    down
-
-Create VBRIF in VBRIDGE Vbridge1 Interface1
-    [Documentation]    Create an interface to Vbridge1
-    Create VBRIF in VBR    Tenant1    Vbridge1    Interface1    Interface1    202
+Create VBRIF in VBRIDGE Vbr_audit Interface2
+    [Documentation]    Create an interface to Vbr_audit
+    Create VBRIF in VBR    Tenant1    Vbr_audit    Interface2    Interface2    202
 
-Create VBRIF in VBRIDGE Vbridge1 Interface2
-    [Documentation]    Create an interface to Vbridge1
-    Create VBRIF in VBR    Tenant1    Vbridge1    Interface2    Interface2    202
-
-Update controller ip valid
-    [Documentation]    Update Controller ip to valid
+Update controller to Valid IP
+    [Documentation]    Update Controller ip to valid from invalid
     Update Controller    odc_test    ${CONTROLLER}    valid_IP
 
-Verify the Controller State is in down state
+Verify the Controller State is in waiting_audit
     [Documentation]    Check Controller status
-    Wait Until Keyword Succeeds    12s    2s    Check Controller Status    odc_test    down
+    Wait Until Keyword Succeeds    12s    2s    Check Controller Status    odc_test    waiting_audit
 
 Audit a controller manually
     [Documentation]    Trigger update audit
@@ -55,15 +44,15 @@ Audit a controller manually
 
 Define Portmap for Interface1
     [Documentation]    Map Interface1 to a logical port
-    Define Portmap for VBRIF    Tenant1    Vbridge1    Interface1    PP-OF:openflow:2-s2-eth1
+    Define Portmap for VBRIF    Tenant1    Vbr_audit    Interface1    PP-OF:openflow:2-s2-eth1
 
 Define Portmap for Interface2
     [Documentation]    Map Interface2 to a logical port
-    Define Portmap for VBRIF    Tenant1    Vbridge1    Interface2    PP-OF:openflow:2-s2-eth2
+    Define Portmap for VBRIF    Tenant1    Vbr_audit    Interface2    PP-OF:openflow:2-s2-eth2
 
 Test Ping for Configuration1
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h2
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h2
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
index 37258afbb3143550454147db2c05be5187ea9e23..cd39e6cfac0ac060e418a888b1f2d17d35e07c54 100644 (file)
@@ -59,7 +59,7 @@ Create FlowfilterEntry in VBRFlowFilter
 
 Test Ping for Configuration
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h3
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h3
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
index 05e5d5bb19b53ebe050d17135a2693f0a9903ff0..5b461eda69974d8c731c94d8e85d952611603ee7 100644 (file)
@@ -64,7 +64,7 @@ Create Flowfilterentry With Pass Action in VBRIF
 
 Test Ping for Configuration
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h3
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h3
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
index 36dd9fea84509597fc429565945e5c75747e421c..993030ec8f2590b20aa6d178f3d88492be50896c 100644 (file)
@@ -59,7 +59,7 @@ Create FlowfilterEntry in VTNFlowfilter
 
 Test Ping for Configuration
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h3
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h3
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
index 8904e08a834d2e07d8fe43cef923429ea1ae0852..ce5ccad411b39b3e48c975d3ace0acef23901788 100644 (file)
@@ -43,19 +43,19 @@ Create VLANMAP in VBRIDGE2
 
 Test Ping for Configuration1
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h3
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h3
 
 Test Ping for Configuration2
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h5
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h5
 
 Test Ping for Configuration3
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h2    h4
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h2    h4
 
 Test Ping for Configuration4
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h2    h6
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h2    h6
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
index af2f543d567287b9a3c89d4bff8596f9554d6329..cdf114a3fd5ba210947e46e48e3656b50d71f0d3 100644 (file)
@@ -11,6 +11,7 @@ Add a ODL Controller
 
 Verify the Controller Status is waiting_audit
     [Documentation]    Check Controller status
+    # Ping starts after 12sec of completing audit and controller status become "UP"
     Wait Until Keyword Succeeds    12s    2s    Check Controller Status    odc_test    waiting_audit
 
 Audit a controller
@@ -43,7 +44,7 @@ Define Portmap for Interface2
 
 Test Ping for Configuration1
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h3
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h3
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
index 74e7a6e3abc1a2c460a3ed6bdd1ed5d5eeb80531..160676fb9864b8ee308aa082149672e7d760dce2 100644 (file)
@@ -3,51 +3,40 @@ Documentation     Test suite for VTN Coordinator
 Suite Setup       Start SuiteVtnCoTest
 Suite Teardown    Stop SuiteVtnCoTest
 Resource          ../../../libraries/VtnCoKeywords.robot
+Resource          ../../../libraries/WaitForFailure.robot
 
 *** Test Cases ***
-Add a ODL Controller
+Add a ODL Controller with Invalid IP
     [Documentation]    Add a Controller
-    Add a Controller    odc_test    ${CONTROLLER}
+    Add a Controller    odc_test    10.0.0.1
 
-Verify the Controller Status is waiting_audit
+Verify the Controller Status is down
     [Documentation]    Check Controller status
-    Wait Until Keyword Succeeds    12s    2s    Check Controller Status    odc_test    waiting_audit
-
-Audit a controller
-    [Documentation]    Trigger update audit
-    Audit Controller    odc_test
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    12s    1s    Check Controller Status    odc_test    down
 
 Add a Vtn Tenant1
     [Documentation]    Create Vtn Tenant1
     Add a VTN    Tenant1    VTN_TEST
 
 Create VBR in VTN Tenant1
-    [Documentation]    Create a VBR in Tenant1 as Vbridge1
-    Create VBR in VTN    Tenant1    Vbridge1    odc_test
+    [Documentation]    Create a VBR in Tenant1 as Vbr_audit
+    Create VBR in VTN    Tenant1    Vbr_audit    odc_test
 
-Update controller ip invalid
-    [Documentation]    Update Controller ip to invalid
-    Update Controller    odc_test    10.0.0.1    invalid_IP
+Create VBRIF in VBRIDGE Vbr_audit Interface1
+    [Documentation]    Create an interface to Vbr_audit
+    Create VBRIF in VBR    Tenant1    Vbr_audit    Interface1    Interface1    202
 
-Verify the Controller State is down
-    [Documentation]    Check Controller status
-    Wait Until Keyword Succeeds    12s    2s    Check Controller Status    odc_test    down
-
-Create VBRIF in VBRIDGE Vbridge1 Interface1
-    [Documentation]    Create an interface to Vbridge1
-    Create VBRIF in VBR    Tenant1    Vbridge1    Interface1    Interface1    202
+Create VBRIF in VBRIDGE Vbr_audit Interface2
+    [Documentation]    Create an interface to Vbr_audit
+    Create VBRIF in VBR    Tenant1    Vbr_audit    Interface2    Interface2    202
 
-Create VBRIF in VBRIDGE Vbridge1 Interface2
-    [Documentation]    Create an interface to Vbridge1
-    Create VBRIF in VBR    Tenant1    Vbridge1    Interface2    Interface2    202
-
-Update controller ip valid
-    [Documentation]    Update Controller ip to valid
+Update controller to Valid IP
+    [Documentation]    Update Controller ip to valid from invalid
     Update Controller    odc_test    ${CONTROLLER}    valid_IP
 
-Verify the Controller State is in down state
+Verify the Controller State is in waiting_audit
     [Documentation]    Check Controller status
-    Wait Until Keyword Succeeds    12s    2s    Check Controller Status    odc_test    down
+    Wait Until Keyword Succeeds    12s    2s    Check Controller Status    odc_test    waiting_audit
 
 Audit a controller manually
     [Documentation]    Trigger update audit
@@ -55,15 +44,15 @@ Audit a controller manually
 
 Define Portmap for Interface1
     [Documentation]    Map Interface1 to a logical port
-    Define Portmap for VBRIF    Tenant1    Vbridge1    Interface1    PP-OF:openflow:2-s2-eth1
+    Define Portmap for VBRIF    Tenant1    Vbr_audit    Interface1    PP-OF:openflow:2-s2-eth1
 
 Define Portmap for Interface2
     [Documentation]    Map Interface2 to a logical port
-    Define Portmap for VBRIF    Tenant1    Vbridge1    Interface2    PP-OF:openflow:2-s2-eth2
+    Define Portmap for VBRIF    Tenant1    Vbr_audit    Interface2    PP-OF:openflow:2-s2-eth2
 
 Test Ping for Configuration1
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h2
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h2
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
index 37258afbb3143550454147db2c05be5187ea9e23..cd39e6cfac0ac060e418a888b1f2d17d35e07c54 100644 (file)
@@ -59,7 +59,7 @@ Create FlowfilterEntry in VBRFlowFilter
 
 Test Ping for Configuration
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h3
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h3
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
index 05e5d5bb19b53ebe050d17135a2693f0a9903ff0..5b461eda69974d8c731c94d8e85d952611603ee7 100644 (file)
@@ -64,7 +64,7 @@ Create Flowfilterentry With Pass Action in VBRIF
 
 Test Ping for Configuration
     [Documentation]    ping between hosts in mininet
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h3
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h3
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
index 79eba68fa56224e5d71a364dce019aa204f2e38f..993030ec8f2590b20aa6d178f3d88492be50896c 100644 (file)
@@ -7,85 +7,68 @@ Resource          ../../../libraries/VtnCoKeywords.robot
 *** Test Cases ***
 Add a ODL Controller
     [Documentation]    Add a Controller
-    [Tags]    exclude
     Add a Controller    odc_test    ${CONTROLLER}
 
 Verify the Controller Status is waiting_audit
     [Documentation]    Check Controller status
-    [Tags]    exclude
     Wait Until Keyword Succeeds    12s    2s    Check Controller Status    odc_test    waiting_audit
 
 Audit a controller
     [Documentation]    Trigger update audit
-    [Tags]    exclude
     Audit Controller    odc_test
 
 Add a Vtn Tenant1
     [Documentation]    Create Vtn Tenant1
-    [Tags]    exclude
     Add a VTN    Tenant1    VTN_TEST
 
 Create VBR in VTN Tenant1
     [Documentation]    Create a VBR in Tenant1 as Vbridge1
-    [Tags]    exclude
     Create VBR in VTN    Tenant1    Vbridge1    odc_test
 
 Create VBRIF in VBRIDGE Vbridge1 Interface1
     [Documentation]    Create an interface to Vbridge1
-    [Tags]    exclude
     Create VBRIF in VBR    Tenant1    Vbridge1    Interface1    Interface1    201
 
 Create VBRIF in VBRIDGE Vbridge1 Interface2
     [Documentation]    Create an interface to Vbridge1
-    [Tags]    exclude
     Create VBRIF in VBR    Tenant1    Vbridge1    Interface2    Interface2    201
 
 Define Portmap for Interface1
     [Documentation]    Map Interface1 to a logical port
-    [Tags]    exclude
     Define Portmap for VBRIF    Tenant1    Vbridge1    Interface1    PP-OF:openflow:3-s3-eth1
 
 Define Portmap for Interface2
     [Documentation]    Map Interface2 to a logical port
-    [Tags]    exclude
     Define Portmap for VBRIF    Tenant1    Vbridge1    Interface2    PP-OF:openflow:2-s2-eth1
 
 Add a Flowlist Flowlist1
     [Documentation]    Create Flowlist Tenant1
-    [Tags]    exclude
     Add a FLOWLIST    Flowlist1    IP
 
 Create Flowlistentry_any in Flowlist1
     [Documentation]    Create an Flowlistentry_any to Flowlist1
-    [Tags]    exclude
     Create FLOWLISTENTRY_ANY in FLOWLIST    Flowlist1
 
 Create VTN in Flowfilter1
     [Documentation]    Create Vtn to Flowfilter
-    [Tags]    exclude
     Create FLOWFILTER in VTN    Tenant1    in
 
 Create FlowfilterEntry in VTNFlowfilter
     [Documentation]    Create Vtn FlowfilterEntry
-    [Tags]    exclude
     Create FLOWFILTERENTRY PASS in VTNFLOWFILTER    Tenant1    pass
 
 Test Ping for Configuration
     [Documentation]    ping between hosts in mininet
-    [Tags]    exclude
-    Wait Until Keyword Succeeds    10s    2s    Test Ping    h1    h3
+    Wait Until Keyword Succeeds    20s    1s    Test Ping    h1    h3
 
 Delete a VTN Tenant1
     [Documentation]    Delete Vtn Tenant1
-    [Tags]    exclude
     Delete a VTN    Tenant1
 
 Delete a FLOWLIST Flowlist1
     [Documentation]    Delete Flowlist
-    [Tags]    exclude
     Delete a FLOWLIST    Flowlist1
 
 Delete a Controller odc1
     [Documentation]    Delete Controller odc1
-    [Tags]    exclude
     Remove Controller    odc_test