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