Modify Vlanmapping topology and vlanmap csit
[integration/test.git] / csit / suites / vtn / VTN_Mgr_OF13 / 010__vtn_vlanmap.robot
1 *** Settings ***
2 Documentation     Test suite for VTN Manager using OF13
3 Suite Setup       Start SuiteVtnMaTest
4 Suite Teardown    Stop SuiteVtnMaTest
5 Resource          ../../../libraries/VtnMaKeywords.robot
6
7 *** Variables ***
8 ${flowconditiondata}    "vtn-flow-match":[{"vtn-inet-match":{"source-network":"10.0.0.1/32","destination-network":"10.0.0.5/32"},"index":"1"}]
9 ${flowfiltervlanpcp}    "vtn-flow-filter":[{"condition":"cond_1","vtn-pass-filter":{},"vtn-flow-action":[{"order":"1","vtn-set-vlan-pcp-action":{"vlan-pcp":"6"}}],"index":"1"}]
10
11 *** Test Cases ***
12 Start topology
13     [Documentation]    Add a vlan topology
14     Start vlan_topo    OF13
15
16 Check if switch1 detected
17     [Documentation]    Check if openflow:1 is detected
18     BuiltIn.Wait_Until_Keyword_Succeeds    12    3    Fetch vtn switch inventory    openflow:1
19
20 Check if switch2 detected
21     [Documentation]    Check if openflow:2 is detected
22     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:2
23
24 Check if switch3 detected
25     [Documentation]    Check if openflow:3 is detected
26     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:3
27
28 Add a Topology Wait
29     [Documentation]    Add a topology wait to wait for a completion of inter-switch link
30     Add a Topology wait    6000
31
32 Add a vtn Tenant1
33     [Documentation]    Add a vtn Tenant1
34     Add a vtn    Tenant1
35
36 Add a vBridge vBridge1
37     [Documentation]    Add a vBridge vBridge1 in vtn Tenant1
38     Add a vBridge    Tenant1    vBridge1
39
40 Add a vlanmap for bridge1
41     [Documentation]    Add a Vlanmap for bridge1 in vtn Tenant1
42     Add a vlanmap    Tenant1    vBridge1    ${vlanmap_bridge1}
43
44 Add a vBridge vBridge2
45     [Documentation]    Add a vBridge vBridge2 in vtn Tenant1
46     Add a vBridge    Tenant1    vBridge2
47
48 Add a vlanmap for bridge2
49     [Documentation]    Add a Vlanmap for bridge1 in vtn Tenant1
50     Add a vlanmap    Tenant1    vBridge2    ${vlanmap_bridge2}
51
52 Get vlanflow h1 h5
53     [Documentation]    ping h1 to h5
54     Wait Until Keyword Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h5
55
56 Get vlanflow h3 h5
57     [Documentation]    ping h3 to h5
58     Wait Until Keyword Succeeds    20s    1s    Mininet Ping Should Succeed    h3    h5
59
60 Get vlanflow h2 h4
61     [Documentation]    ping h2 to h4
62     Wait Until Keyword Succeeds    20s    1s    Mininet Ping Should Succeed    h2    h4
63
64 Get vlanflow h2 h6
65     [Documentation]    ping h2 to h6
66     Wait Until Keyword Succeeds    20s    1s    Mininet Ping Should Succeed    h2    h6
67
68 Get vlanflow h1 h4
69     [Documentation]    ping h1 to h4
70     Wait Until Keyword Succeeds    20s    1s    Mininet Ping Should Not Succeed    h1    h4
71
72 Add a flowcondition
73     [Documentation]    Create a flowcondition cond_1 using restconfig api
74     Add a flowcondition    cond_1    ${flowconditiondata}
75
76 Add a vtn flowfilter with vlanpcp
77     [Documentation]    Create a flowfilter with vlanpcp and Verify ping
78     Add a vtn flowfilter    Tenant1    ${flowfiltervlanpcp}
79     Wait_Until_Keyword_Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h5
80
81 Verify vlanpcp of vtn flowfilter
82     [Documentation]    Verify vtn flowfilter actions in Flow Enties for vlanpcp
83     Wait_Until_Keyword_Succeeds    20s    1s    Verify Flow Entries for Flowfilter    ${FF_DUMPFLOWS_OF13}    ${vlanpcp_actions}
84
85 Remove vtn Flowfilter index
86     [Documentation]    Remove a index of vtn flowfilter
87     Remove a vtn flowfilter    Tenant1    ${filter_index}
88
89 Add a vbr flowfilter with vlanpcp
90     [Documentation]    Create a flowfilter with vlanpcp and Verify ping
91     Add a vbr flowfilter    Tenant1    vBridge1    ${flowfiltervlanpcp}
92     Wait_Until_Keyword_Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h5
93
94 Verify vlanpcp of vbr flowfilter
95     [Documentation]    Verify actions in Flow Enties for vlanpcp
96     Wait_Until_Keyword_Succeeds    20s    1s    Verify Flow Entries for Flowfilter    ${FF_DUMPFLOWS_OF13}    ${vlanpcp_actions}
97
98 Remove vbr Flowfilter index
99     [Documentation]    Remove a index of vbr flowfilter
100     Remove a vbr flowfilter    Tenant1    vBridge1    ${filter_index}
101
102 Delete a vtn Tenant1
103     [Documentation]    Delete a vtn Tenant1
104     Delete a vtn    Tenant1