Update Robot Framework format - step 16
[integration/test.git] / csit / suites / vtn / VTN_Mgr_OF10 / 020__vtn_pathmap_pathpolicy.robot
1 *** Settings ***
2 Documentation       Test suite for VTN Manager PathPolicy using OF10
3
4 Resource            ../../../libraries/VtnMaKeywords.robot
5
6 Suite Setup         Start PathSuiteVtnMaTestOF10
7 Suite Teardown      Stop PathSuiteVtnMaTest
8
9
10 *** Variables ***
11 ${flowconditiondata}
12 ...                     "vtn-flow-match":[{"vtn-ether-match":{"destination-address":"ba:bd:0f:e3:a8:c8","ether-type":"2048","source-address":"ca:9e:58:0c:1e:f0","vlan-id": "1"},"vtn-inet-match":{"source-network":"10.0.0.1/32","protocol":1,"destination-network":"10.0.0.2/32"},"index":"1"}]
13 ${pathmapdata}
14 ...                     {"input":{"tenant-name":"Tenant_path","path-map-list":[{"condition":"flowcond_path","policy":"1","index": "1","idle-timeout":"300","hard-timeout":"0"}]}}
15 ${pathpolicydata}
16 ...                     {"input":{"operation":"SET","id": "1","default-cost": "10000","vtn-path-cost": [{"port-desc":"openflow:1,3,s1-eth3","cost":"1000"},{"port-desc":"openflow:4,2,s4-eth2","cost":"1000"},{"port-desc":"openflow:3,3,s3-eth3","cost":"100000"}]}}
17
18
19 *** Test Cases ***
20 Check if switch1 detected
21     [Documentation]    Check if openflow:1 is detected
22     BuiltIn.Wait_Until_Keyword_Succeeds    12    3    Fetch vtn switch inventory    openflow:1
23
24 Check if switch2 detected
25     [Documentation]    Check if openflow:2 is detected
26     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:2
27
28 Check if switch3 detected
29     [Documentation]    Check if openflow:3 is detected
30     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:3
31
32 Check if switch4 detected
33     [Documentation]    Check if openflow:4 is detected
34     BuiltIn.Wait_Until_Keyword_Succeeds    3    1    Fetch vtn switch inventory    openflow:4
35
36 Add a vtn Tenant_path
37     [Documentation]    Add a vtn Tenant_path
38     Add a vtn    Tenant_path
39
40 Add a vBridge vBridge1
41     [Documentation]    Add a vBridge vBridge1 in vtn Tenant_path
42     Add a vBridge    Tenant_path    vBridge1
43
44 Add a interface If1_path
45     [Documentation]    Add a interface if1_path into vBrdige vBridge1
46     Add a interface    Tenant_path    vBridge1    if1_path
47
48 Add a portmap for interface if1_path
49     [Documentation]    Create a portmap on Interface if1 of vBridge1
50     Add a portmap    Tenant_path    vBridge1    if1_path    openflow:1    s1-eth1
51
52 Add a interface If2_path
53     [Documentation]    Add a interface if2_path into vBrdige vBridge1
54     Add a interface    Tenant_path    vBridge1    if2_path
55
56 Add a portmap for interface if2_path
57     [Documentation]    Create a portmap on Interface if2_path of vBridge1
58     Add a portmap    Tenant_path    vBridge1    if2_path    openflow:3    s3-eth3
59
60 Ping h1 to h2 before path policy
61     [Documentation]    Ping h1 to h2, verify no packet loss
62     Wait_Until_Keyword_Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h2
63
64 Verify flowEntryBeforePathPolicy
65     [Documentation]    Checking Flows on switch s1 and s3
66     [Tags]    exclude
67     Verify flowEntryPathPolicy    OF10    ${in_port}    ${out_before_pathpolicy}
68
69 Add a flowcondition flowcond_path
70     [Documentation]    Create a flowcondition flowcond_path
71     Add a flowcondition    flowcond_path    ${flowconditiondata}
72
73 Add a pathmap
74     [Documentation]    Create a pathmap in the vtn
75     Add a pathmap    ${pathmapdata}
76
77 Add a pathpolicy
78     [Documentation]    Create a pathpolicy in the vtn
79     Add a pathpolicy    ${pathpolicydata}
80
81 Get a pathpolicy
82     [Documentation]    Retrieve a pathpolicy in the vtn
83     Get a pathpolicy    ${policy_id}
84
85 Ping h1 to h2 after path policy
86     [Documentation]    Ping h1 to h2, verify no packet loss
87     Wait_Until_Keyword_Succeeds    20s    1s    Mininet Ping Should Succeed    h1    h2
88
89 Verify flowEntryAfterPathPolicy
90     [Documentation]    Checking Flows on switch s1 and s3
91     [Tags]    exclude
92     Verify flowEntryPathPolicy    OF10    ${in_port}    ${out_after_pathpolicy}
93
94 Delete a pathmap
95     [Documentation]    Delete a pathmap
96     Delete a pathmap    Tenant_path
97
98 Delete a pathpolicy
99     [Documentation]    Delete a pathpolicy
100     Delete a pathpolicy    ${policy_id}
101
102 Delete a flowcondition
103     [Documentation]    Delete a flowcondition
104     Remove flowcondition    flowcond_path
105
106 Delete a vtn Tenant_path
107     [Documentation]    Delete a vtn Tenant_path
108     Delete a vtn    Tenant_path