Tidied updated tests.
[integration/test.git] / csit / suites / vtn / VTN_Mgr_OF13 / 020__vtn_pathmap_pathpolicy.robot
index 15981374534535e547ff623ca4e45a332c30c67c..668999b5ab0ef36f71be257f988b56a5c2141cb1 100644 (file)
@@ -5,10 +5,9 @@ Suite Teardown    Stop PathSuiteVtnMaTest
 Resource          ../../../libraries/VtnMaKeywords.robot
 
 *** Variables ***
+${flowconditiondata}    "vtn-flow-match":[{"vtn-ether-match":{"destination-address":"ba:bd:0f:e3:a8:c8","ether-type":"2048","source-address":"ca:9e:58:0c:1e:f0","vlan-id": "1"},"vtn-inet-match":{"source-network":"10.0.0.1/32","protocol":1,"destination-network":"10.0.0.2/32"},"index":"1"}]
 ${pathmapdata}    {"input":{"tenant-name":"Tenant_path","path-map-list":[{"condition":"flowcond_path","policy":"1","index": "1","idle-timeout":"300","hard-timeout":"0"}]}}
-
-${pathpolicydata}    {"input":{"operation":"SET","id": "1","default-cost": "10000","vtn-path-cost": [{"port-desc":"openflow:1,3,s1-eth3","cost":"1000"},{"port-desc":"openflow:4,2,s4-eth2","cost":"1000"},{"port-desc":"openflow:3,3,s3-eth3","cost":"100000"}]}} 
-
+${pathpolicydata}    {"input":{"operation":"SET","id": "1","default-cost": "10000","vtn-path-cost": [{"port-desc":"openflow:1,3,s1-eth3","cost":"1000"},{"port-desc":"openflow:4,2,s4-eth2","cost":"1000"},{"port-desc":"openflow:3,3,s3-eth3","cost":"100000"}]}}
 
 *** Test Cases ***
 Check if switch1 detected
@@ -52,16 +51,16 @@ Add a portmap for interface if2_path
     Add a portmap    Tenant_path    vBridge1    if2_path    openflow:3    s3-eth3
 
 Ping h1 to h2 before path policy
-    [Documentation]    Ping h1 to h2, verify no packet loss
+    [Documentation]    Verify Ping between hosts h1 and h2. To check mininet ping here added wait until time as '20s'. Since, sometimes it takes maximum '20sec' to send packet b/w hosts.
     Wait_Until_Keyword_Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h2
 
 Verify flowEntryBeforePathPolicy
     [Documentation]    Checking Flows on switch s1 and s3
-    Verify flowEntryPathPolicy    OF13    ${in_port}    ${out_before_pathpolicy}
+    Wait_Until_Keyword_Succeeds    20s    1s    Verify flowEntryPathPolicy    OF13    ${in_port}    ${out_before_pathpolicy}
 
 Add a flowcondition flowcond_path
     [Documentation]    Create a flowcondition flowcond_path
-    Add a flowcondition    flowcond_path
+    Add a flowcondition    flowcond_path    ${flowconditiondata}
 
 Add a pathmap
     [Documentation]    Create a pathmap in the vtn
@@ -76,20 +75,20 @@ Get a pathpolicy
     Get a pathpolicy    ${policy_id}
 
 Ping h1 to h2 after path policy
-    [Documentation]    Ping h1 to h2, verify no packet loss
+    [Documentation]    Verify Ping between hosts h1 and h2.
     Wait_Until_Keyword_Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h2
 
 Verify flowEntryAfterPathPolicy
     [Documentation]    Checking Flows on switch s1 and s3
-    Verify flowEntryPathPolicy    OF13    ${in_port}    ${out_after_pathpolicy}
+    Wait_Until_Keyword_Succeeds    20s    1s    Verify flowEntryPathPolicy    OF13    ${in_port}    ${out_after_pathpolicy}
 
 Delete a pathmap
     [Documentation]    Delete a pathmap
     Delete a pathmap    Tenant_path
 
 Delete a pathpolicy
-   [Documentation]    Delete a pathpolicy
-   Delete a pathpolicy    ${policy_id}
+    [Documentation]    Delete a pathpolicy
+    Delete a pathpolicy    ${policy_id}
 
 Delete a flowcondition
     [Documentation]    Delete a flowcondition