2 Documentation Test suite for VTN Manager using OF10
4 Resource ../../../libraries/VtnMaKeywords.robot
6 Suite Setup Start SuiteVtnMaTest
7 Suite Teardown Stop SuiteVtnMaTest
12 ... "vtn-flow-match":[{"vtn-inet-match":{"source-network":"10.0.0.1/32","destination-network":"10.0.0.3/32"},"index":"1"}]
14 ... "vtn-flow-filter":[{"condition":"cond_1","vtn-pass-filter":{},"vtn-flow-action":[{"order": "1","vtn-set-inet-src-action":{"ipv4-address":"192.0.0.1/32"}},{"order": "2","vtn-set-inet-dst-action":{"ipv4-address":"192.0.0.2/32"}}],"index": "1"}]
15 ${flowfilterInetdropdata}
16 ... "vtn-flow-filter":[{"condition":"cond_1","vtn-drop-filter":{},"vtn-flow-action":[{"order": "1","vtn-set-inet-src-action":{"ipv4-address":"10.0.0.2/32"}},{"order": "2","vtn-set-inet-dst-action":{"ipv4-address":"10.0.0.4/32"}}],"index": "1"}]
17 ${flowfilterIcmpCodedata}
18 ... "vtn-flow-filter": [{"condition": "cond_1","index": "1", "vtn-pass-filter": {}, "vtn-flow-action": [{ "order": "1", "vtn-set-icmp-code-action":{"code": "1"}},{"order": "2","vtn-set-icmp-type-action": {"type": "3"}}]}]
19 ${flowfilterTpsrcTpdstdata}
20 ... "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": "1"}]
22 ... "vtn-flow-filter":[{"condition": "cond_1","vtn-pass-filter": {},"vtn-flow-action": [{"order": "1","vtn-set-inet-dscp-action": {"dscp":"32"}}],"index":"1"}]
24 ... "vtn-flow-filter":[{"condition": "cond_1","vtn-pass-filter": {},"vtn-flow-action": [{"order": "1","vtn-set-dl-src-action": {"address":"00:00:00:00:00:11"}}],"index":"1"}]
26 ... "vtn-flow-filter":[{"condition":"cond_1","vtn-pass-filter":{},"vtn-flow-action":[{"order":"3","vtn-set-icmp-code-action":{"code":"1"}},{"order":"4","vtn-set-vlan-pcp-action":{"vlan-pcp":"3"}}],"index":"1"}]
30 Check if switch1 detected
31 [Documentation] Check if openflow:1 is detected
32 BuiltIn.Wait_Until_Keyword_Succeeds 12 3 Fetch vtn switch inventory openflow:1
34 Check if switch2 detected
35 [Documentation] Check if openflow:2 is detected
36 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:2
38 Check if switch3 detected
39 [Documentation] Check if openflow:3 is detected
40 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:3
43 [Documentation] Add a vtn Tenant1
46 Add a vBridge vBridge1
47 [Documentation] Add a vBridge vBridge1 in vtn Tenant1
48 Add a vBridge Tenant1 vBridge1
51 [Documentation] Add a interface if1 into vBridge vBridge1
52 Add a interface Tenant1 vBridge1 if1
55 [Documentation] Add a interface if2 into vBridge vBridge1
56 Add a interface Tenant1 vBridge1 if2
58 Add a portmap for interface if1
59 [Documentation] Create a portmap on Interface if1 of vBridge1
60 Add a portmap Tenant1 vBridge1 if1 openflow:2 s2-eth1
62 Add a portmap for interface if2
63 [Documentation] Create a portmap on Interface if2 of vBridge1
64 Add a portmap Tenant1 vBridge1 if2 openflow:3 s3-eth1
67 [Documentation] Ping h1 to h3, verify no packet loss
68 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
70 Add a vBridge vBridge2
71 [Documentation] Add a vBridge vBridge2 in vtn Tenant1
72 Add a vBridge Tenant1 vBridge2
75 [Documentation] Add a interface if3 into vBrdige vBridge2
76 Add a interface Tenant1 vBridge2 if3
79 [Documentation] Add a interface if4 into vBrdige vBridge2
80 Add a interface Tenant1 vBridge2 if4
82 Add a portmap for interface if3
83 [Documentation] Create a portmap on Interface if3 of vBridge2
84 Add a portmap Tenant1 vBridge2 if3 openflow:2 s2-eth2
86 Add a portmap for interface if4
87 [Documentation] Create a portmap on Interface if4 of vBridge2
88 Add a portmap Tenant1 vBridge2 if4 openflow:3 s3-eth2
91 [Documentation] Ping h2 to h4, verify no packet loss
92 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h2 h4
95 [Documentation] Create a flowcondition cond_1 using restconfig api
96 Add a flowcondition cond_1 ${flowconditiondata}
98 Add a vtn flowfilter with inet4src and inet4dst
99 [Documentation] Create a flowfilter with inet4 and Verify ping
100 Add a vtn flowfilter Tenant1 ${flowfilterInetdata}
101 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
103 Verify inet4src and inet4dst of vtn flowfilter
104 [Documentation] Verify vtn flowfilter actions in Flow Enties for inet4src and inet4dst
105 Wait_Until_Keyword_Succeeds
108 ... Verify Flow Entries for Flowfilter
109 ... ${FF_DUMPFLOWS_OF10}
112 Remove vtn Flowfilter index
113 [Documentation] Remove a index of vtn flowfilter
114 Remove a vtn flowfilter Tenant1 ${filter_index}
116 Add a vbr flowfilter with inet4src and inet4dst
117 [Documentation] Create a flowfilter with inet4 and Verify ping
118 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterInetdata}
119 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
121 Verify inet4src and inet4dst of vbr flowfilter
122 [Documentation] Verify actions in Flow Enties for inet4src and inet4dst
123 Wait_Until_Keyword_Succeeds
126 ... Verify Flow Entries for Flowfilter
127 ... ${FF_DUMPFLOWS_OF10}
130 Remove vbr Flowfilter index
131 [Documentation] Remove a index of vbr flowfilter
132 Remove a vbr flowfilter Tenant1 vBridge1 ${filter_index}
134 Add a vbrif flowfilter with inet4src and inet4dst
135 [Documentation] Create a flowfilter with inet4 and Verify ping
136 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterInetdata}
137 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
139 Verify inet4src and inet4dst of vbrif flowfilter
140 [Documentation] Verify actions in Flow Enties for inet4src and inet4dst
141 Wait_Until_Keyword_Succeeds
144 ... Verify Flow Entries for Flowfilter
145 ... ${FF_DUMPFLOWS_OF10}
148 Remove vbrif Flowfilter index
149 [Documentation] Remove a index of vbrif flowfilter
150 Remove a vbrif flowfilter Tenant1 vBridge1 if1 ${filter_index}
152 Add a vtn flowfilter with Icmp code
153 [Documentation] Create a flowfilter with icmp code and Verify ping
155 Add a vtn flowfilter Tenant1 ${flowfilterIcmpCodedata}
156 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
158 Verify icmp action for vtn flowfilter
159 [Documentation] Verify actions in Flow Enties for icmp code and type
161 Wait_Until_Keyword_Succeeds
164 ... Verify Flow Entries for Flowfilter
165 ... ${FF_DUMPFLOWS_OF10}
168 Remove vtn Flowfilter index which has ICMP
169 [Documentation] Remove a index of vtn flowfilter which have ICMP
171 Remove a vtn flowfilter Tenant1 ${filter_index}
173 Add a vbr flowfilter with Icmp code
174 [Documentation] Create a flowfilter with icmp code and Verify ping
176 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterIcmpCodedata}
177 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
179 Verify icmp action for vbr flowfilter
180 [Documentation] Verify actions in Flow Enties for icmp code and type
182 Wait_Until_Keyword_Succeeds
185 ... Verify Flow Entries for Flowfilter
186 ... ${FF_DUMPFLOWS_OF10}
189 Remove vbr Flowfilter index which has ICMP
190 [Documentation] Remove a index of vbr flowfilter which have ICMP
192 Remove a vbr flowfilter Tenant1 vBridge1 ${filter_index}
194 Add a vbrif flowfilter with Icmp code
195 [Documentation] Create a flowfilter with icmp code and Verify ping
197 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterIcmpCodedata}
198 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
200 Verify icmp action for vbrif flowfilter
201 [Documentation] Verify actions in Flow Enties for icmp code and type
203 Wait_Until_Keyword_Succeeds
206 ... Verify Flow Entries for Flowfilter
207 ... ${FF_DUMPFLOWS_OF10}
210 Remove vbrif Flowfilter index which has ICMP
211 [Documentation] Remove a index of vbrif flowfilter which have ICMP
213 Remove a vbrif flowfilter Tenant1 vBridge1 if1 ${filter_index}
215 Add a vtn flowfilter with dscp
216 [Documentation] Create a flowfilter with dscp and Verify ping
217 Add a vtn flowfilter Tenant1 ${flowfilterDscpdata}
218 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
220 Verify dscp action for vtn flowfilter
221 [Documentation] Verify actions in Flow Enties for dscp
222 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dscp_flow} ${FF_DUMPFLOWS_OF10}
224 Remove vtn Flowfilter index which have dscp
225 [Documentation] Remove a index of vtn flowfilter which have DSCP
226 Remove a vtn flowfilter Tenant1 ${filter_index}
228 Add a vbr flowfilter with dscp
229 [Documentation] Create a flowfilter with dscp and Verify ping
230 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterDscpdata}
231 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
233 Verify dscp action for vbr flowfilter
234 [Documentation] Verify actions in Flow Enties for dscp
235 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dscp_flow} ${FF_DUMPFLOWS_OF10}
237 Remove vbr Flowfilter index which have dscp
238 [Documentation] Remove a index of vbr flowfilter which have DSCP
239 Remove a vbr flowfilter Tenant1 vBridge1 ${filter_index}
241 Add a vbrif flowfilter with dscp
242 [Documentation] Create a flowfilter with dscp and Verify ping
243 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterDscpdata}
244 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
246 Verify dscp action for vbrif flowfilter
247 [Documentation] Verify actions in Flow Enties for dscp
248 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dscp_flow} ${FF_DUMPFLOWS_OF10}
250 Remove vbrif Flowfilter index which have dscp
251 [Documentation] Remove a index of vbrif flowfilter which have DSCP
252 Remove a vbrif flowfilter Tenant1 vBridge1 if1 ${filter_index}
254 Add a vtn flowfilter with dl-src
255 [Documentation] Create a flowfilter with dl-src and Verify ping
256 Add a vtn flowfilter Tenant1 ${flowfilterdlsrc}
257 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
259 Verify dl-src action for vtn flowfilter
260 [Documentation] Verify actions in Flow Enties for dl-src
261 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dlsrc_action} ${FF_DUMPFLOWS_OF10}
263 Remove vtn Flowfilter index which have dl-src
264 [Documentation] Remove a index of vtn flowfilter which have DL_SRC
265 Remove a vtn flowfilter Tenant1 ${filter_index}
267 Add a vbr flowfilter with dl-src
268 [Documentation] Create a flowfilter with dl-src and Verify ping
269 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterdlsrc}
270 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
272 Verify dl-src action for vbr flowfilter
273 [Documentation] Verify actions in Flow Enties for dl-src
274 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dlsrc_action} ${FF_DUMPFLOWS_OF10}
276 Remove vbr Flowfilter index which have dl-src
277 [Documentation] Remove a index of vbr flowfilter which have DL_SRC
278 Remove a vbr flowfilter Tenant1 vBridge1 ${filter_index}
280 Add a vbrif flowfilter with dl-src
281 [Documentation] Create a flowfilter with dl-src and Verify ping
282 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterdlsrc}
283 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
285 Verify dl-src action for vbrif flowfilter
286 [Documentation] Verify actions in Flow Enties for dl-src
287 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dlsrc_action} ${FF_DUMPFLOWS_OF10}
289 Remove vbrif Flowfilter index which have dl-src
290 [Documentation] Remove a index of vbrif flowfilter which have DL_SRC
291 Remove a vbrif flowfilter Tenant1 vBridge1 if1 ${filter_index}
293 Add a flowfilter with inet4 for drop
294 [Documentation] Create a flowfilter with inet4 for drop action and Verify no pinging
295 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterInetdropdata}
296 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
298 Verify Removed Flow Entry For Inet After Drop Action
299 [Documentation] Verify no flows between the hosts after drop
300 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${drop_action} ${DROP_DUMPFLOWS_OF10}
302 Delete a flowcondition
303 [Documentation] Delete a flowcondition
304 Remove flowcondition cond_1
307 [Documentation] Delete vtn Tenant1