Modify Vtn Macmapping robot files for VTN Manager RESTCONF 23/31823/6
authorKarthik.S <siva-karthik@hcl.com>
Wed, 23 Dec 2015 18:35:32 +0000 (00:05 +0530)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 11 Jan 2016 22:32:47 +0000 (22:32 +0000)
    * Removed Force tags "exclude" in 010__vtn_macmap.robot(OF10 and OF13)files
    * Modify test case to work for RESTCONF feature, earlier test was written for RESTAPI spec.
    * Modify VtnMaKeyword.robot file for macmapping functioanlity

Change-Id: I9179f5ce73b9460651f73ebd28d0befc228a34ce
Signed-off-by: Karthik.S <siva-karthik@hcl.com>
csit/libraries/VtnMaKeywords.robot
csit/suites/vtn/VTN_Mgr_OF10/010__vtn_macmap.robot
csit/suites/vtn/VTN_Mgr_OF13/010__vtn_macmap.robot

index b3d8b4922f4e6b8defdef3e405b7a36c22700781..05321af56cf18229aa35b4899f45570b69eb4301 100644 (file)
@@ -176,9 +176,9 @@ Verify flowEntryPathPolicy
     Should Contain    ${result}    in_port=${port}    actions=${output}
 
 Add a macmap
     Should Contain    ${result}    in_port=${port}    actions=${output}
 
 Add a macmap
-    [Arguments]    ${vtn_name}    ${vBridge_name}    ${macmap_data}
+    [Arguments]    ${vtn_name}    ${vBridge_name}    ${src_add}    ${dst_add}
     [Documentation]    Create a macmap for a vbridge
     [Documentation]    Create a macmap for a vbridge
-    ${resp}=    RequestsLibrary.Post Request    session    restconf/operations/vtn-mac-map:set-mac-map    data={"input": { "allowed-hosts": ["${macmap_data}"], "tenant-name":${vtn_name}, "bridge-name": ${vBridge_name}}}    }
+    ${resp}=    RequestsLibrary.Post Request    session    restconf/operations/vtn-mac-map:set-mac-map    data={"input":{"operation":"SET","allowed-hosts":["${dst_add}@0","${src_add}@0"],"tenant-name":"${vtn_name}","bridge-name":"${vBridge_name}"}}
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Get DynamicMacAddress
     Should Be Equal As Strings    ${resp.status_code}    200
 
 Get DynamicMacAddress
index 2f56ba2c729fe716f5fd8e9590c04fabdd1aa2b7..82d1869e5e4964b26c30c57c762b52f6babcc6ea 100644 (file)
@@ -2,7 +2,6 @@
 Documentation     Test suite for VTN Manager using OF13
 Suite Setup       Start SuiteVtnMaTest
 Suite Teardown    Stop SuiteVtnMaTest
 Documentation     Test suite for VTN Manager using OF13
 Suite Setup       Start SuiteVtnMaTest
 Suite Teardown    Stop SuiteVtnMaTest
-Force Tags        exclude
 Resource          ../../../libraries/VtnMaKeywords.robot
 
 *** Test Cases ***
 Resource          ../../../libraries/VtnMaKeywords.robot
 
 *** Test Cases ***
@@ -20,25 +19,21 @@ Check if switch3 detected
 
 Add a vtn Tenant1
     [Documentation]    Add a vtn Tenant1
 
 Add a vtn Tenant1
     [Documentation]    Add a vtn Tenant1
-    Add a vtn    Tenant1    {}
+    Add a vtn    Tenant1
 
 Add a vBridge vBridge1
     [Documentation]    Add a vBridge vBridge1 in vtn Tenant1
 
 Add a vBridge vBridge1
     [Documentation]    Add a vBridge vBridge1 in vtn Tenant1
-    Add a vBridge    Tenant1    vBridge1    {}
+    Add a vBridge    Tenant1    vBridge1
 
 Add a macmap for bridge1
     [Documentation]    Add a macmap for bridge1 in vtn Tenant1
     ${source}=    Get DynamicMacAddress    h1
     ${destination}=    Get DynamicMacAddress    h3
 
 Add a macmap for bridge1
     [Documentation]    Add a macmap for bridge1 in vtn Tenant1
     ${source}=    Get DynamicMacAddress    h1
     ${destination}=    Get DynamicMacAddress    h3
-    ${destaddress}=    Create Dictionary    vlan=0    address=${destination}
-    ${sourceaddress}=    Create Dictionary    vlan=0    address=${source}
-    @{machost}    Create List    ${sourceaddress}    ${destaddress}
-    ${mac_map_data}=    Create Dictionary    machost=${machost}
-    Add a vBridgeMacMapping    Tenant1    vBridge1    ${mac_map_data}
+    Add a macmap    Tenant1    vBridge1    ${source}    ${destination}
 
 Get macmapflow h3 h1
     [Documentation]    ping h3 to h1
 
 Get macmapflow h3 h1
     [Documentation]    ping h3 to h1
-    Wait Until Keyword Succeeds    10s    2s    Mininet Ping Should Succeed    h3    h1
+    Wait Until Keyword Succeeds    20s    1s    Mininet Ping Should Succeed    h3    h1
 
 Delete a vtn Tenant1
     [Documentation]    Delete a vtn Tenant1
 
 Delete a vtn Tenant1
     [Documentation]    Delete a vtn Tenant1
index 2f56ba2c729fe716f5fd8e9590c04fabdd1aa2b7..82d1869e5e4964b26c30c57c762b52f6babcc6ea 100644 (file)
@@ -2,7 +2,6 @@
 Documentation     Test suite for VTN Manager using OF13
 Suite Setup       Start SuiteVtnMaTest
 Suite Teardown    Stop SuiteVtnMaTest
 Documentation     Test suite for VTN Manager using OF13
 Suite Setup       Start SuiteVtnMaTest
 Suite Teardown    Stop SuiteVtnMaTest
-Force Tags        exclude
 Resource          ../../../libraries/VtnMaKeywords.robot
 
 *** Test Cases ***
 Resource          ../../../libraries/VtnMaKeywords.robot
 
 *** Test Cases ***
@@ -20,25 +19,21 @@ Check if switch3 detected
 
 Add a vtn Tenant1
     [Documentation]    Add a vtn Tenant1
 
 Add a vtn Tenant1
     [Documentation]    Add a vtn Tenant1
-    Add a vtn    Tenant1    {}
+    Add a vtn    Tenant1
 
 Add a vBridge vBridge1
     [Documentation]    Add a vBridge vBridge1 in vtn Tenant1
 
 Add a vBridge vBridge1
     [Documentation]    Add a vBridge vBridge1 in vtn Tenant1
-    Add a vBridge    Tenant1    vBridge1    {}
+    Add a vBridge    Tenant1    vBridge1
 
 Add a macmap for bridge1
     [Documentation]    Add a macmap for bridge1 in vtn Tenant1
     ${source}=    Get DynamicMacAddress    h1
     ${destination}=    Get DynamicMacAddress    h3
 
 Add a macmap for bridge1
     [Documentation]    Add a macmap for bridge1 in vtn Tenant1
     ${source}=    Get DynamicMacAddress    h1
     ${destination}=    Get DynamicMacAddress    h3
-    ${destaddress}=    Create Dictionary    vlan=0    address=${destination}
-    ${sourceaddress}=    Create Dictionary    vlan=0    address=${source}
-    @{machost}    Create List    ${sourceaddress}    ${destaddress}
-    ${mac_map_data}=    Create Dictionary    machost=${machost}
-    Add a vBridgeMacMapping    Tenant1    vBridge1    ${mac_map_data}
+    Add a macmap    Tenant1    vBridge1    ${source}    ${destination}
 
 Get macmapflow h3 h1
     [Documentation]    ping h3 to h1
 
 Get macmapflow h3 h1
     [Documentation]    ping h3 to h1
-    Wait Until Keyword Succeeds    10s    2s    Mininet Ping Should Succeed    h3    h1
+    Wait Until Keyword Succeeds    20s    1s    Mininet Ping Should Succeed    h3    h1
 
 Delete a vtn Tenant1
     [Documentation]    Delete a vtn Tenant1
 
 Delete a vtn Tenant1
     [Documentation]    Delete a vtn Tenant1