Fix for VTN Manager CSIT test failures in VTN jenkins job
[integration/test.git] / csit / suites / vtn / VTN_Mgr_OF13 / 020__vtn_pathmap_pathpolicy.robot
1 *** Settings ***
2 Documentation     Test suite for VTN Manager PathPolicy using OF13
3 Suite Setup       Start PathSuiteVtnMaTest
4 Suite Teardown    Stop PathSuiteVtnMaTest
5 Resource          ../../../libraries/VtnMaKeywords.robot
6
7 *** Variables ***
8 ${pathmapdata}    {"input":{"tenant-name":"Tenant_path","path-map-list":[{"condition":"flowcond_path","policy":"1","index": "1","idle-timeout":"300","hard-timeout":"0"}]}}
9 ${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"}]}}
10
11 *** Test Cases ***
12 Check if switch1 detected
13     [Documentation]    Check if openflow:1 is detected
14     BuiltIn.Wait_Until_Keyword_Succeeds    12    3    Fetch vtn switch inventory    openflow:1
15
16 Check if switch2 detected
17     [Documentation]    Check if openflow:2 is detected
18     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:2
19
20 Check if switch3 detected
21     [Documentation]    Check if openflow:3 is detected
22     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:3
23
24 Check if switch4 detected
25     [Documentation]    Check if openflow:4 is detected
26     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:4
27
28 Add a vtn Tenant_path
29     [Documentation]    Add a vtn Tenant_path
30     Add a vtn    Tenant_path
31
32 Add a vBridge vBridge1
33     [Documentation]    Add a vBridge vBridge1 in vtn Tenant_path
34     Add a vBridge    Tenant_path    vBridge1
35
36 Add a interface If1_path
37     [Documentation]    Add a interface if1_path into vBrdige vBridge1
38     Add a interface    Tenant_path    vBridge1    if1_path
39
40 Add a portmap for interface if1_path
41     [Documentation]    Create a portmap on Interface if1 of vBridge1
42     Add a portmap    Tenant_path    vBridge1    if1_path    openflow:1    s1-eth1
43
44 Add a interface If2_path
45     [Documentation]    Add a interface if2_path into vBrdige vBridge1
46     Add a interface    Tenant_path    vBridge1    if2_path
47
48 Add a portmap for interface if2_path
49     [Documentation]    Create a portmap on Interface if2_path of vBridge1
50     Add a portmap    Tenant_path    vBridge1    if2_path    openflow:3    s3-eth3
51
52 Ping h1 to h2 before path policy
53     [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.
54     Wait_Until_Keyword_Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h2
55
56 Verify flowEntryBeforePathPolicy
57     [Documentation]    Checking Flows on switch s1 and s3
58     Wait_Until_Keyword_Succeeds    20s    1s    Verify flowEntryPathPolicy    OF13    ${in_port}    ${out_before_pathpolicy}
59
60 Add a flowcondition flowcond_path
61     [Documentation]    Create a flowcondition flowcond_path
62     Add a flowcondition    flowcond_path
63
64 Add a pathmap
65     [Documentation]    Create a pathmap in the vtn
66     Add a pathmap    ${pathmapdata}
67
68 Add a pathpolicy
69     [Documentation]    Create a pathpolicy in the vtn
70     Add a pathpolicy    ${pathpolicydata}
71
72 Get a pathpolicy
73     [Documentation]    Retrieve a pathpolicy in the vtn
74     Get a pathpolicy    ${policy_id}
75
76 Ping h1 to h2 after path policy
77     [Documentation]    Verify Ping between hosts h1 and h2.
78     Wait_Until_Keyword_Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h2
79
80 Verify flowEntryAfterPathPolicy
81     [Documentation]    Checking Flows on switch s1 and s3
82     Wait_Until_Keyword_Succeeds    20s    1s    Verify flowEntryPathPolicy    OF13    ${in_port}    ${out_after_pathpolicy}
83
84 Delete a pathmap
85     [Documentation]    Delete a pathmap
86     Delete a pathmap    Tenant_path
87
88 Delete a pathpolicy
89     [Documentation]    Delete a pathpolicy
90     Delete a pathpolicy    ${policy_id}
91
92 Delete a flowcondition
93     [Documentation]    Delete a flowcondition
94     Remove flowcondition    flowcond_path
95
96 Delete a vtn Tenant_path
97     [Documentation]    Delete vtn Tenant_path
98     Delete a vtn    Tenant_path