2 Documentation Test suite for VTN Manager using OF13
3 Suite Setup Start SuiteVtnMaTest
4 Suite Teardown Stop SuiteVtnMaTest
5 Resource ../../../libraries/VtnMaKeywords.robot
8 ${flowfilterInetdata} "vtn-flow-filter":[{"condition":"cond_1","vtn-pass-filter":{},"vtn-flow-action":[{"order": "1","vtn-set-inet-src-action":{"ipv4-address":"10.0.0.1/32"}},{"order": "2","vtn-set-inet-dst-action":{"ipv4-address":"10.0.0.3/32"}}],"index": "1"}]
10 ${flowfilterInetdropdata} "vtn-flow-filter":[{"condition":"cond_1","vtn-drop-filter":{},"vtn-flow-action":[{"order": "1","vtn-set-inet-src-action":{"ipv4-address":"10.0.0.1/32"}},{"order": "2","vtn-set-inet-dst-action":{"ipv4-address":"10.0.0.3/32"}}],"index": "1"}]
12 ${flowfilterIcmpCodedata} "vtn-flow-filter":[{"condition": "cond_1","vtn-pass-filter": {},"vtn-flow-action":[{ "order":"1","vtn-set-icmp-code-action":{"code":"9"}}],"index":"2"}]
14 ${flowfilterTpsrcTpdstdata} "vtn-flow-filter": [{"condition": "cond_1","vtn-pass-filter": {},"vtn-flow-action": [{"order": "1","vtn-set-port-src-action": {"port": "5"}},{"order": "2","vtn-set-port-dst-action": {"port": "10"}}],"index": "3"}]
16 ${flowfilterDscpdata} "vtn-flow-filter":[{"condition": "cond_1","vtn-pass-filter": {},"vtn-flow-action": [{"order": "1","vtn-set-inet-dscp-action": {"dscp":"10"}}],"index":"6"}]
18 ${flowfiltervlanpcp} "vtn-flow-filter":[{"condition":"cond_1","vtn-pass-filter":{},"vtn-flow-action":[{"order":"1","vtn-set-inet-src-action":{"ipv4-address":"10.0.0.1/32"}},{"order":"2","vtn-set-inet-dst-action":{"ipv4-address":"10.0.0.3/32"}},{"order":"3","vtn-set-icmp-code-action":{"code":"1"}},{"order":"4","vtn-set-vlan-pcp-action":{"vlan-pcp":"3"}}],"index":"3"}]
21 Check if switch1 detected
22 [Documentation] Check if openflow:1 is detected
23 BuiltIn.Wait_Until_Keyword_Succeeds 12 3 Fetch vtn switch inventory openflow:1
25 Check if switch2 detected
26 [Documentation] Check if openflow:2 is detected
27 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:2
29 Check if switch3 detected
30 [Documentation] Check if openflow:3 is detected
31 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:3
34 [Documentation] Add a vtn Tenant1
37 Add a vBridge vBridge1
38 [Documentation] Add a vBridge vBridge1 in vtn Tenant1
39 Add a vBridge Tenant1 vBridge1
42 [Documentation] Add a interface if1 into vBridge vBridge1
43 Add a interface Tenant1 vBridge1 if1
46 [Documentation] Add a interface if2 into vBridge vBridge1
47 Add a interface Tenant1 vBridge1 if2
49 Add a portmap for interface if1
50 [Documentation] Create a portmap on Interface if1 of vBridge1
51 Add a portmap Tenant1 vBridge1 if1 openflow:2 s2-eth1
53 Add a portmap for interface if2
54 [Documentation] Create a portmap on Interface if2 of vBridge1
55 Add a portmap Tenant1 vBridge1 if2 openflow:3 s3-eth1
58 [Documentation] Ping h1 to h3, verify no packet loss
59 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
61 Add a vBridge vBridge2
62 [Documentation] Add a vBridge vBridge2 in vtn Tenant1
63 Add a vBridge Tenant1 vBridge2
66 [Documentation] Add a interface if3 into vBrdige vBridge1
67 Add a interface Tenant1 vBridge1 if3
70 [Documentation] Add a interface if4 into vBrdige vBridge1
71 Add a interface Tenant1 vBridge1 if4
73 Add a portmap for interface if3
74 [Documentation] Create a portmap on Interface if3 of vBridge1
75 Add a portmap Tenant1 vBridge1 if3 openflow:2 s2-eth2
77 Add a portmap for interface if4
78 [Documentation] Create a portmap on Interface if4 of vBridge1
79 Add a portmap Tenant1 vBridge1 if4 openflow:3 s3-eth2
82 [Documentation] Ping h2 to h4, verify no packet loss
83 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h2 h4
86 [Documentation] Create a flowcondition cond_1 using restconfig api
87 Add a flowcondition cond_1
90 [Documentation] Create a macmap on vBridge vBridge1
92 Add a macmap Tenant1 vBridge1 ${macmap_data}
95 [Documentation] Get flow of a vtn Tenant1
99 Add a flowfilter with inet4src and inet4dst
100 [Documentation] Create a flowfilter with inet4 and Verify ping
101 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterInetdata}
102 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
104 Add a flowfilter with Icmp code
105 [Documentation] Create a flowfilter with icmp code and Verify ping
106 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterIcmpCodedata}
107 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
109 Add a flowfilter with tpsrc and tpdst
110 [Documentation] Create a flowfilter with tpsrc and tpdst and Verify ping
111 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterTpsrcTpdstdata}
112 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
114 Add a flowfilter with dscp
115 [Documentation] Create a flowfilter with dscp and Verify ping
116 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterDscpdata}
117 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
119 Verify Flow Entry for Inet Flowfilter
120 [Documentation] Verify Flow Entry for Inet Flowfilter
121 Verify Flow Entry for Inet Flowfilter
123 Add a flowfilter with vlanpcp
124 [Documentation] Create a flowfilter with vlanpcp and Verify ping
125 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfiltervlanpcp}
126 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
128 Add a flowfilter_vtn with inet4src and inet4dst
129 [Documentation] Create a vtn_flowfilter with inet4 and Verify ping
130 Add a vtn flowfilter Tenant1 ${flowfilterInetdata}
131 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
133 Add a flowfilter_vbr with inet4src and inet4dst
134 [Documentation] Create a vbr_flowfilter with inet4 and Verify ping
135 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterInetdata}
136 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
138 Add a flowfilter with inet4 for drop
139 [Documentation] Create a flowfilter with inet4 for drop action and Verify no pinging
141 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterInetdropdata}
142 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
144 Verify Removed Flow Entry For Inet After Drop Action
145 [Documentation] Verify no flows between the hosts after drop
147 Verify Removed Flow Entry for Inet Drop Flowfilter
149 Delete a flowcondition
150 [Documentation] Delete a flowcondition
151 Remove flowcondition cond_1
154 [Documentation] Delete a vtn Tenant1