Modify VTN Manager CSIT for Stable Lithium 74/36174/15
authorKarthik.S <siva-karthik@hcl.com>
Mon, 14 Mar 2016 11:09:31 +0000 (16:39 +0530)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 21 Mar 2016 02:53:47 +0000 (02:53 +0000)
* Add Flow to OpenFlow Switch to forward packet in case of Table Miss
* Fix the wrong Keyword that was causing the entire job to fail

Change-Id: I32a66208acb88b66d178ba87d63135922b01840c
Signed-off-by: Karthik.S <siva-karthik@hcl.com>
csit/libraries/VtnMaKeywordsLi.robot
csit/suites/vtn/VTN_Mgr_OF13_Li/__init__.robot

index 4a4094cfb9e7390db57de8d88e520fb7f1456371..473940a078e542d9c44e18f8d99b845a3655ba72 100644 (file)
@@ -38,14 +38,16 @@ ${out_after_pathpolicy}    output:3
 *** Keywords ***
 Start SuiteVtnMa
     [Documentation]    Start VTN Manager Init Test Suite
+    [Arguments]       ${version_flag}=none
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTPORT}    auth=${AUTH}    headers=${HEADERS}
     BuiltIn.Wait_Until_Keyword_Succeeds    30    3    Fetch vtn list
     Start Suite
+    Run Keyword If    '${version_flag}' == 'OF13'    Set Global Variable      ${OPENFLOW_VERSION}     OF13
+    ...    ELSE    Set Global Variable     ${OPENFLOW_VERSION}     OF10
 
 Stop SuiteVtnMa
     [Documentation]    Stop VTN Manager Test Suite
     Delete All Sessions
-    Stop Suite
 
 Start SuiteVtnMaTest
     [Documentation]    Start VTN Manager Test Suite
@@ -55,6 +57,11 @@ Stop SuiteVtnMaTest
     [Documentation]    Stop VTN Manager Test Suite
     Delete All Sessions
 
+Add Table Miss Flows
+    [Documentation]    Add Flow entried to handle table miss situation
+    Write      dpctl add-flow priority=0,actions=output:CONTROLLER -OOpenFlow13
+    Read Until    mininet>
+
 Fetch vtn list
     [Documentation]    Check if VTN Manager is up.
     ${resp}=    RequestsLibrary.Get Request    session    ${REST_CONTEXT_VTNS}
@@ -210,6 +217,7 @@ Add a vBridgeMacMapping
 Mininet Ping Should Succeed
     [Arguments]    ${host1}    ${host2}
     [Documentation]    Ping hosts to check connectivity
+    Run Keyword If    '${OPENFLOW_VERSION}' == 'OF13'     Add Table Miss Flows
     Write    ${host1} ping -c 1 ${host2}
     ${result}    Read Until    mininet>
     Should Contain    ${result}    64 bytes
@@ -217,6 +225,7 @@ Mininet Ping Should Succeed
 Mininet Ping Should Not Succeed
     [Arguments]    ${host1}    ${host2}
     [Documentation]    Ping hosts when there is no connectivity and check hosts is unreachable
+    Run Keyword If    '${OPENFLOW_VERSION}' == 'OF13'     Add Table Miss Flows
     Write    ${host1} ping -c 3 ${host2}
     ${result}    Read Until    mininet>
     Should Not Contain    ${result}    64 bytes
index d3439ce4bba40760a59b016bfb274d110b3766fb..0c7605d2eef8bfbfa5fb500f3150d5b883ef51a9 100644 (file)
@@ -1,6 +1,6 @@
 *** Settings ***
 Documentation     Test suite for VTN Manager (OF13)
-Suite Setup       Start SuiteVtnMa
+Suite Setup       Start SuiteVtnMa     version_flag=OF13
 Suite Teardown    Stop SuiteVtnMa
 Resource          ../../../libraries/VtnMaKeywordsLi.robot