2 Documentation Test suite for VTN Manager using OF10
3 Suite Setup Start SuiteVtnMaTest
4 Suite Teardown Stop SuiteVtnMaTest
5 Resource ../../../libraries/VtnMaKeywords.robot
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 ${flowfilterInetdata} "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"}]
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.2/32"}},{"order": "2","vtn-set-inet-dst-action":{"ipv4-address":"10.0.0.4/32"}}],"index": "1"}]
11 ${flowfilterIcmpCodedata} "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"}}]}]
12 ${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": "1"}]
13 ${flowfilterDscpdata} "vtn-flow-filter":[{"condition": "cond_1","vtn-pass-filter": {},"vtn-flow-action": [{"order": "1","vtn-set-inet-dscp-action": {"dscp":"32"}}],"index":"1"}]
14 ${flowfiltervlanpcp} "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"}]
17 Check if switch1 detected
18 [Documentation] Check if openflow:1 is detected
19 BuiltIn.Wait_Until_Keyword_Succeeds 12 3 Fetch vtn switch inventory openflow:1
21 Check if switch2 detected
22 [Documentation] Check if openflow:2 is detected
23 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:2
25 Check if switch3 detected
26 [Documentation] Check if openflow:3 is detected
27 BuiltIn.Wait_Until_Keyword_Succeeds 3 1 Fetch vtn switch inventory openflow:3
30 [Documentation] Add a vtn Tenant1
33 Add a vBridge vBridge1
34 [Documentation] Add a vBridge vBridge1 in vtn Tenant1
35 Add a vBridge Tenant1 vBridge1
38 [Documentation] Add a interface if1 into vBridge vBridge1
39 Add a interface Tenant1 vBridge1 if1
42 [Documentation] Add a interface if2 into vBridge vBridge1
43 Add a interface Tenant1 vBridge1 if2
45 Add a portmap for interface if1
46 [Documentation] Create a portmap on Interface if1 of vBridge1
47 Add a portmap Tenant1 vBridge1 if1 openflow:2 s2-eth1
49 Add a portmap for interface if2
50 [Documentation] Create a portmap on Interface if2 of vBridge1
51 Add a portmap Tenant1 vBridge1 if2 openflow:3 s3-eth1
54 [Documentation] Ping h1 to h3, verify no packet loss
55 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
57 Add a vBridge vBridge2
58 [Documentation] Add a vBridge vBridge2 in vtn Tenant1
59 Add a vBridge Tenant1 vBridge2
62 [Documentation] Add a interface if3 into vBrdige vBridge2
63 Add a interface Tenant1 vBridge2 if3
66 [Documentation] Add a interface if4 into vBrdige vBridge2
67 Add a interface Tenant1 vBridge2 if4
69 Add a portmap for interface if3
70 [Documentation] Create a portmap on Interface if3 of vBridge2
71 Add a portmap Tenant1 vBridge2 if3 openflow:2 s2-eth2
73 Add a portmap for interface if4
74 [Documentation] Create a portmap on Interface if4 of vBridge2
75 Add a portmap Tenant1 vBridge2 if4 openflow:3 s3-eth2
78 [Documentation] Ping h2 to h4, verify no packet loss
79 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h2 h4
82 [Documentation] Create a flowcondition cond_1 using restconfig api
83 Add a flowcondition cond_1 ${flowconditiondata}
85 Add a vtn flowfilter with inet4src and inet4dst
86 [Documentation] Create a flowfilter with inet4 and Verify ping
87 Add a vtn flowfilter Tenant1 ${flowfilterInetdata}
88 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
90 Verify inet4src and inet4dst of vtn flowfilter
91 [Documentation] Verify vtn flowfilter actions in Flow Enties for inet4src and inet4dst
92 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${FF_DUMPFLOWS_OF10} @{inet_actions}
94 Remove vtn Flowfilter index
95 [Documentation] Remove a index of vtn flowfilter
96 Remove a vtn flowfilter Tenant1 ${filter_index}
98 Add a vbr flowfilter with inet4src and inet4dst
99 [Documentation] Create a flowfilter with inet4 and Verify ping
100 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterInetdata}
101 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
103 Verify inet4src and inet4dst of vbr flowfilter
104 [Documentation] Verify actions in Flow Enties for inet4src and inet4dst
105 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${FF_DUMPFLOWS_OF10} @{inet_actions}
107 Remove vbr Flowfilter index
108 [Documentation] Remove a index of vbr flowfilter
109 Remove a vbr flowfilter Tenant1 vBridge1 ${filter_index}
111 Add a vbrif flowfilter with inet4src and inet4dst
112 [Documentation] Create a flowfilter with inet4 and Verify ping
113 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterInetdata}
114 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
116 Verify inet4src and inet4dst of vbrif flowfilter
117 [Documentation] Verify actions in Flow Enties for inet4src and inet4dst
118 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${FF_DUMPFLOWS_OF10} @{inet_actions}
120 Remove vbrif Flowfilter index
121 [Documentation] Remove a index of vbrif flowfilter
122 Remove a vbrif flowfilter Tenant1 vBridge1 if1 ${filter_index}
124 Add a vtn flowfilter with Icmp code
125 [Documentation] Create a flowfilter with icmp code and Verify ping
127 Add a vtn flowfilter Tenant1 ${flowfilterIcmpCodedata}
128 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
130 Verify icmp action for vtn flowfilter
131 [Documentation] Verify actions in Flow Enties for icmp code and type
133 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${FF_DUMPFLOWS_OF10} @{icmp_action}
135 Remove vtn Flowfilter index which has ICMP
136 [Documentation] Remove a index of vtn flowfilter which have ICMP
138 Remove a vtn flowfilter Tenant1 ${filter_index}
140 Add a vbr flowfilter with Icmp code
141 [Documentation] Create a flowfilter with icmp code and Verify ping
143 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterIcmpCodedata}
144 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
146 Verify icmp action for vbr flowfilter
147 [Documentation] Verify actions in Flow Enties for icmp code and type
149 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${FF_DUMPFLOWS_OF10} @{icmp_action}
151 Remove vbr Flowfilter index which has ICMP
152 [Documentation] Remove a index of vbr flowfilter which have ICMP
154 Remove a vbr flowfilter Tenant1 vBridge1 ${filter_index}
156 Add a vbrif flowfilter with Icmp code
157 [Documentation] Create a flowfilter with icmp code and Verify ping
159 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterIcmpCodedata}
160 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
162 Verify icmp action for vbrif flowfilter
163 [Documentation] Verify actions in Flow Enties for icmp code and type
165 Wait_Until_Keyword_Succeeds 20s 1s Verify Flow Entries for Flowfilter ${FF_DUMPFLOWS_OF10} @{icmp_action}
167 Remove vbrif Flowfilter index which has ICMP
168 [Documentation] Remove a index of vbrif flowfilter which have ICMP
170 Remove a vbrif flowfilter Tenant1 vBridge1 if1 ${filter_index}
172 Add a vtn flowfilter with dscp
173 [Documentation] Create a flowfilter with dscp and Verify ping
174 Add a vtn flowfilter Tenant1 ${flowfilterDscpdata}
175 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
177 Verify dscp action for vtn flowfilter
178 [Documentation] Verify actions in Flow Enties for dscp
179 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dscp_flow} ${FF_DUMPFLOWS_OF10}
181 Remove vtn Flowfilter index which have dscp
182 [Documentation] Remove a index of vtn flowfilter which have DSCP
183 Remove a vtn flowfilter Tenant1 ${filter_index}
185 Add a vbr flowfilter with dscp
186 [Documentation] Create a flowfilter with dscp and Verify ping
187 Add a vbr flowfilter Tenant1 vBridge1 ${flowfilterDscpdata}
188 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
190 Verify dscp action for vbr flowfilter
191 [Documentation] Verify actions in Flow Enties for dscp
192 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dscp_flow} ${FF_DUMPFLOWS_OF10}
194 Remove vbr Flowfilter index which have dscp
195 [Documentation] Remove a index of vbr flowfilter which have DSCP
196 Remove a vbr flowfilter Tenant1 vBridge1 ${filter_index}
198 Add a vbrif flowfilter with dscp
199 [Documentation] Create a flowfilter with dscp and Verify ping
200 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterDscpdata}
201 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Succeed h1 h3
203 Verify dscp action for vbrif flowfilter
204 [Documentation] Verify actions in Flow Enties for dscp
205 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${dscp_flow} ${FF_DUMPFLOWS_OF10}
207 Remove vbrif Flowfilter index which have dscp
208 [Documentation] Remove a index of vbrif flowfilter which have DSCP
209 Remove a vbrif flowfilter Tenant1 vBridge1 if1 ${filter_index}
211 Add a flowfilter with inet4 for drop
212 [Documentation] Create a flowfilter with inet4 for drop action and Verify no pinging
213 Add a vbrif flowfilter Tenant1 vBridge1 if1 ${flowfilterInetdropdata}
214 Wait_Until_Keyword_Succeeds 20s 1s Mininet Ping Should Not Succeed h1 h3
216 Verify Removed Flow Entry For Inet After Drop Action
217 [Documentation] Verify no flows between the hosts after drop
218 Wait_Until_Keyword_Succeeds 20s 1s Verify flowactions ${drop_action} ${DROP_DUMPFLOWS_OF10}
220 Delete a flowcondition
221 [Documentation] Delete a flowcondition
222 Remove flowcondition cond_1
225 [Documentation] Delete vtn Tenant1