8c46a4eab6d5500f82e11f0a2943644cd8daed24
[integration/test.git] / csit / suites / vtn / VTN_Mgr_OF10 / 010__vtn_manager_dataflow.robot
1 *** Settings ***
2 Documentation     Test suite for VTN Manager Data Flow using OF10
3 Suite Setup       Start SuiteVtnMaTest
4 Suite Teardown    Stop SuiteVtnMaTest
5 Force Tags        exclude
6 Resource          ../../../libraries/VtnMaKeywords.robot
7
8 *** Test Cases ***
9 Check if switch1 detected
10     [Documentation]    Check if openflow:1 is detected
11     BuiltIn.Wait_Until_Keyword_Succeeds    12    3    Fetch vtn switch inventory    openflow:1
12
13 Check if switch2 detected
14     [Documentation]    Check if openflow:2 is detected
15     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:2
16
17 Check if switch3 detected
18     [Documentation]    Check if openflow:3 is detected
19     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:3
20
21 Add a vtn Tenant1
22     [Documentation]    Add a vtn Tenant1
23     Add a vtn    Tenant1    {"idleTimeout": "200","hardTimeout": "600","description": "Virtual Tenant1 for Hackfest network"}
24
25 Add a vBridge vBridge1
26     [Documentation]    Add a vBridge vBridge1 in vtn Tenant1
27     Add a vBridge    Tenant1    vBridge1    {"ageInterval": "300","description": "vBridge1 for Tenant1"}
28
29 Add a interface If1
30     [Documentation]    Add a interface if1 into vBridge vBridge1
31     Add a interface    Tenant1    vBridge1    if1    {"enabled": "true","description": "Interface1 for vBridge1 for Tenant1"}
32
33 Add a interface if2
34     [Documentation]    Add a interface if2 into vBridge vBridge1
35     Add a interface    Tenant1    vBridge1    if2    {"enabled": "true","description": "Interface2 for vBridge1 for Tenant1"}
36
37 Add a portmap for interface if1
38     [Documentation]    Create a portmap on Interface if1 of vBridge1
39     ${node}    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:02
40     ${port}    Create Dictionary    name=s2-eth1
41     ${portmap_data}    Create Dictionary    node=${node}    port=${port}
42     Add a portmap    Tenant1    vBridge1    if1    ${portmap_data}
43
44 Add a portmap for interface if2
45     [Documentation]    Create a portmap on Interface if2 of vBridge1
46     ${node}    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:03
47     ${port}    Create Dictionary    name=s3-eth1
48     ${portmap_data}    Create Dictionary    node=${node}    port=${port}
49     Add a portmap    Tenant1    vBridge1    if2    ${portmap_data}
50
51 Ping h1 to h3
52     [Documentation]    Ping h1 to h3, verify no packet loss
53     Mininet Ping Should Succeed    h1    h3
54
55 Verify data flow details For vBridge1
56     [Documentation]    Verify the data flows for the specified tenant and bridge
57     Verify Data Flows    Tenant1    vBridge1
58
59 Add a vBridge vBridge2
60     [Documentation]    Add a vBridge vBridge2 in vtn Tenant1
61     Add a vBridge    Tenant1    vBridge2    {}
62
63 Add a interface If3
64     [Documentation]    Add a interface if3 into vBrdige vBridge1
65     Add a interface    Tenant1    vBridge2    if3    {}
66
67 Add a interface if4
68     [Documentation]    Add a interface if4 into vBrdige vBridge1
69     Add a interface    Tenant1    vBridge2    if4    {}
70
71 Add a portmap for interface if3
72     [Documentation]    Create a portmap on Interface if3 of vBridge1
73     ${node}    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:02
74     ${port}    Create Dictionary    name=s2-eth2
75     ${portmap_data}    Create Dictionary    node=${node}    port=${port}
76     Add a portmap    Tenant1    vBridge2    if3    ${portmap_data}
77
78 Add a portmap for interface if4
79     [Documentation]    Create a portmap on Interface if4 of vBridge1
80     ${node}    Create Dictionary    type=OF    id=00:00:00:00:00:00:00:03
81     ${port}    Create Dictionary    name=s3-eth2
82     ${portmap_data}    Create Dictionary    node=${node}    port=${port}
83     Add a portmap    Tenant1    vBridge2    if4    ${portmap_data}
84
85 Ping h2 to h4
86     [Documentation]    Ping h2 to h4, verify no packet loss
87     Mininet Ping Should Succeed    h2    h4
88
89 Verify data flow details for vBridge2
90     [Documentation]    Verify the data flows for the specified tenant and bridge
91     Verify Data Flows    Tenant1    vBridge2
92
93 Verify FlowMacAddress
94     [Documentation]    Checking Flows on switch
95     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     Verify RemovedFlowMacAddress    h1    h3    OF10
107
108 Delete a vtn Tenant1
109     [Documentation]    Delete a vtn Tenant1
110     Delete a vtn    Tenant1