Add CSIT for VTN Manager flowfilter functionality
[integration/test.git] / csit / suites / vtn / VTN_Mgr_OF10 / 010__vtn_vbrif_vlanmap.robot
1 *** Settings ***
2 Documentation     Test suite for VTN Manager using OF10
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.3/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    OF10
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 vtn Tenant1
29     [Documentation]    Add a vtn Tenant1
30     Add a vtn    Tenant1
31
32 Add a vBridge vBridge1
33     [Documentation]    Add a vBridge vBridge1 in vtn Tenant1
34     Add a vBridge    Tenant1    vBridge1
35
36 Add a interface if1
37     [Documentation]    Add a interface if1 into vBridge vBridge1
38     Add a interface    Tenant1    vBridge1    if1
39
40 Add a interface if2
41     [Documentation]    Add a interface if2 into vBridge vBridge1
42     Add a interface    Tenant1    vBridge1    if2
43
44 Add a portmap with vlan-id for interface if1
45     [Documentation]    Create a vlan portmap on Interface if1 of vBridge1
46     Add a vlan portmap    Tenant1    vBridge1    if1    200    openflow:1    s1-eth1
47
48 Add a portmap with vlan-id for interface if2
49     [Documentation]    Create a vlan portmap on Interface if2 of vBridge1
50     Add a vlan portmap    Tenant1    vBridge1    if2    200    openflow:2    s2-eth3
51
52 Add a flowcondition
53     [Documentation]    Create a flowcondition cond_1 using restconfig api
54     Add a flowcondition    cond_1    ${flowconditiondata}
55
56 Add a vbrif flowfilter with vlanpcp
57     [Documentation]    Create a flowfilter with vlanpcp and Verify ping
58     Add a vbrif flowfilter    Tenant1    vBridge1    if1    ${flowfiltervlanpcp}
59     Wait_Until_Keyword_Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h3
60
61 Verify vlanpcp of vbrif flowfilter
62     [Documentation]    Verify actions in Flow Enties for vlanpcp
63     Wait_Until_Keyword_Succeeds    20s    1s    Verify Flow Entries for Flowfilter    ${FF_OUT_DUMPFLOWS_OF10}    ${vlanpcp_action}
64
65 Remove vbrif Flowfilter index
66     [Documentation]    Remove a index of vbrif flowfilter
67     Remove a vbrif flowfilter    Tenant1    vBridge1    if1    ${filter_index}
68
69 Delete a flowcondition
70     [Documentation]    Delete a flowcondition
71     Remove flowcondition    cond_1
72
73 Delete a vtn Tenant1
74     [Documentation]    Delete a vtn Tenant1
75     Delete a vtn    Tenant1