Fix for VTN Manager CSIT test failures in VTN jenkins job
[integration/test.git] / csit / suites / vtn / VTN_Mgr_OF13_Li / 010__vtn_manager_dataflow.robot
1 *** Settings ***
2 Documentation     Test suite for VTN Manager Data Flow using OF13
3 Suite Setup       Start SuiteVtnMaTest
4 Suite Teardown    Stop SuiteVtnMaTest
5 Resource          ../../../libraries/VtnMaKeywordsLi.robot
6
7 *** Test Cases ***
8 Check if switch1 detected
9     [Documentation]    Check if openflow:1 is detected
10     BuiltIn.Wait_Until_Keyword_Succeeds    12    3    Fetch vtn switch inventory    openflow:1
11
12 Check if switch2 detected
13     [Documentation]    Check if openflow:2 is detected
14     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:2
15
16 Check if switch3 detected
17     [Documentation]    Check if openflow:3 is detected
18     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:3
19
20 Add a vtn Tenant1
21     [Documentation]    Add a vtn Tenant1
22     Add a vtn    Tenant1    {"idleTimeout": "200","hardTimeout": "600","description": "Virtual Tenant1 for Hackfest network"}
23
24 Add a vBridge vBridge1
25     [Documentation]    Add a vBridge vBridge1 in vtn Tenant1
26     Add a vBridge    Tenant1    vBridge1    {"ageInterval": "300","description": "vBridge1 for Tenant1"}
27
28 Add a interface If1
29     [Documentation]    Add a interface if1 into vBridge vBridge1
30     Add a interface    Tenant1    vBridge1    if1    {"enabled": "true","description": "Interface1 for vBridge1 for Tenant1"}
31
32 Add a interface if2
33     [Documentation]    Add a interface if2 into vBridge vBridge1
34     Add a interface    Tenant1    vBridge1    if2    {"enabled": "true","description": "Interface2 for vBridge1 for Tenant1"}
35
36 Add a portmap for interface if1
37     [Documentation]    Create a portmap on Interface if1 of vBridge1
38     ${node}    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:02
39     ${port}    Create Dictionary    name=s2-eth1
40     ${portmap_data}    Create Dictionary    node=${node}    port=${port}
41     Add a portmap    Tenant1    vBridge1    if1    ${portmap_data}
42
43 Add a portmap for interface if2
44     [Documentation]    Create a portmap on Interface if2 of vBridge1
45     ${node}    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:03
46     ${port}    Create Dictionary    name=s3-eth1
47     ${portmap_data}    Create Dictionary    node=${node}    port=${port}
48     Add a portmap    Tenant1    vBridge1    if2    ${portmap_data}
49
50 Ping h1 to h3
51     [Documentation]    Verify Ping between hosts h1 and h3. To check mininet ping here added wait until time as '20s'. Since, sometimes it takes maximum '20sec' to send packet b/w hosts.
52     Wait Until Keyword Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h3
53
54 Verify data flow details For vBridge1
55     [Documentation]    Verify the data flows for the specified tenant and bridge
56     Wait Until Keyword Succeeds    20s    1s    Verify Data Flows    Tenant1    vBridge1
57
58 Add a vBridge vBridge2
59     [Documentation]    Add a vBridge vBridge2 in vtn Tenant1
60     Add a vBridge    Tenant1    vBridge2    {}
61
62 Add a interface If3
63     [Documentation]    Add a interface if3 into vBrdige vBridge1
64     Add a interface    Tenant1    vBridge2    if3    {}
65
66 Add a interface if4
67     [Documentation]    Add a interface if4 into vBrdige vBridge1
68     Add a interface    Tenant1    vBridge2    if4    {}
69
70 Add a portmap for interface if3
71     [Documentation]    Create a portmap on Interface if3 of vBridge1
72     ${node}    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:02
73     ${port}    Create Dictionary    name=s2-eth2
74     ${portmap_data}    Create Dictionary    node=${node}    port=${port}
75     Add a portmap    Tenant1    vBridge2    if3    ${portmap_data}
76
77 Add a portmap for interface if4
78     [Documentation]    Create a portmap on Interface if4 of vBridge1
79     ${node}    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:03
80     ${port}    Create Dictionary    name=s3-eth2
81     ${portmap_data}    Create Dictionary    node=${node}    port=${port}
82     Add a portmap    Tenant1    vBridge2    if4    ${portmap_data}
83
84 Ping h2 to h4
85     [Documentation]    Verify Ping between hosts h2 and h4.
86     Wait Until Keyword Succeeds    20s    1s    Mininet Ping Should Succeed    h2    h4
87
88 Verify data flow details for vBridge2
89     [Documentation]    Verify the data flows for the specified tenant and bridge
90     Wait Until Keyword Succeeds    20s    1s    Verify Data Flows    Tenant1    vBridge2
91
92 Verify FlowMacAddress
93     [Documentation]    Checking Flows on switch
94     [Tags]    Switch
95     Wait Until Keyword Succeeds    20s    1s    Verify FlowMacAddress    h2    h4    OF13
96
97 Remove Portmap for If1
98     [Documentation]    Remove portmap for the interface If1
99     ${node}    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:02
100     ${port}    Create Dictionary    name=s2-eth1
101     ${portmap_data}    Create Dictionary    node=${node}    port=${port}
102     Remove a portmap    Tenant1    vBridge1    if1    ${portmap_data}
103
104 Verify RemovedFlowMacAddress
105     [Documentation]    flows will be deleted after the port map is removed
106     Wait Until Keyword Succeeds    20s    1s    Verify RemovedFlowMacAddress    h1    h3    OF13
107
108 Delete a vtn Tenant1
109     [Documentation]    Delete a vtn Tenant1
110     Delete a vtn    Tenant1