c1b52757f291e9b768413765b9b92d24975fce93
[csit.git] / resources / libraries / robot / performance / performance_configuration.robot
1 # Copyright (c) 2019 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Library | resources.libraries.python.DpdkUtil
16 | Library | resources.libraries.python.InterfaceUtil
17 | Library | resources.libraries.python.IPUtil
18 | Library | resources.libraries.python.NodePath
19 | Library | resources.libraries.python.TestConfig
20 | Library | resources.libraries.python.TrafficGenerator
21 | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl
22 | Library | resources.libraries.python.VhostUser
23 | ...
24 | Documentation | Performance suite keywords - configuration
25
26 *** Keywords ***
27 | Initialize IPSec in 3-node circular topology
28 | | [Documentation]
29 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
30 | | ... | topology. Get the interface MAC addresses and setup ARP on all VPP
31 | | ... | interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG and
32 | | ... | DUT1-DUT2 links. Set routing for encrypted traffic on both DUT nodes
33 | | ... | with prefix /8 and next hop of neighbour DUT or TG interface IPv4
34 | | ... | address.
35 | | ...
36 | | Set interfaces in path up
37 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
38 | | ... | ${dut1_if1_ip4} | 24
39 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2}
40 | | ... | ${dut2_if2_ip4} | 24
41 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | ${tg_if1_ip4} | ${tg_if1_mac}
42 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | ${tg_if2_ip4} | ${tg_if2_mac}
43 | | Vpp Route Add | ${dut1} | ${laddr_ip4} | 8 | gateway=${tg_if1_ip4}
44 | | ... | interface=${dut1_if1}
45 | | Vpp Route Add | ${dut2} | ${raddr_ip4} | 8 | gateway=${tg_if2_ip4}
46 | | ... | interface=${dut2_if2}
47
48 | Initialize IPv6 forwarding with VLAN dot1q sub-interfaces in circular topology
49 | | [Documentation]
50 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
51 | | ... | circular topology. In case of 3-node topology create VLAN
52 | | ... | sub-interfaces between DUTs. In case of 2-node topology create VLAN
53 | | ... | sub-interface on dut1-if2 interface. Get the interface MAC addresses
54 | | ... | and setup ARPs. Setup IPv6 addresses with /64 prefix on DUT-TG links
55 | | ... | and set routing with prefix /64. In case of 3-node set IPv6 adresses
56 | | ... | with /64 prefix on VLAN and set routing on both DUT nodes with prefix
57 | | ... | /64. Set next hop of neighbour DUT interface IPv6 address. All
58 | | ... | interfaces are brought up.
59 | | ...
60 | | ... | *Arguments:*
61 | | ... | - tg_if1_net - TG interface 1 IPv6 subnet used by traffic generator.
62 | | ... | Type: integer
63 | | ... | - tg_if2_net - TG interface 2 IPv6 subnet used by traffic generator.
64 | | ... | Type: integer
65 | | ... | - subid - ID of the sub-interface to be created. Type: string
66 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
67 | | ...
68 | | ... | _NOTE:_ This KW uses following test case variables:
69 | | ... | - dut1 - DUT1 node.
70 | | ... | - dut2 - DUT2 node.
71 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
72 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
73 | | ...
74 | | ... | *Example:*
75 | | ...
76 | | ... | \| Initialize IPv6 forwarding with VLAN dot1q sub-interfaces\
77 | | ... | in circular topology \| 2001:1::0 \| 2001:2::0 \| 10 \| pop-1 \|
78 | | ...
79 | | [Arguments] | ${tg_if1_net} | ${tg_if2_net} | ${subid} | ${tag_rewrite}
80 | | ...
81 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
82 | | ... | Variable Should Exist | ${dut2}
83 | | ...
84 | | Set interfaces in path up
85 | | ...
86 | | Run Keyword If | '${dut2_status}' == 'PASS'
87 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
88 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
89 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
90 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
91 | | Run Keyword If | '${dut2_status}' == 'PASS'
92 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
93 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
94 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
95 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
96 | | ...
97 | | ${prefix}= | Set Variable | 64
98 | | ${host_prefix}= | Set Variable | 64
99 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2002:1::1 | ${tg_if1_mac}
100 | | Run Keyword If | '${dut2_status}' == 'PASS'
101 | | ... | VPP Add Ip Neighbor
102 | | ... | ${dut1} | ${subif_index_1} | 2002:2::2 | ${dut2_if1_mac}
103 | | Run Keyword If | '${dut2_status}' == 'PASS'
104 | | ... | VPP Add Ip Neighbor
105 | | ... | ${dut2} | ${subif_index_2} | 2002:2::1 | ${dut1_if2_mac}
106 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
107 | | ... | Set Variable | ${dut2}
108 | | ... | ELSE | Set Variable | ${dut1}
109 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
110 | | ... | Set Variable | ${dut2_if2}
111 | | ... | ELSE | Set Variable | ${subif_index_1}
112 | | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2002:3::1 | ${tg_if2_mac}
113 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2002:1::2 | ${prefix}
114 | | Run Keyword If | '${dut2_status}' == 'PASS'
115 | | ... | VPP Interface Set IP Address | ${dut1} | ${subif_index_1} | 2002:2::1
116 | | ... | ${prefix}
117 | | Run Keyword If | '${dut2_status}' == 'PASS'
118 | | ... | VPP Interface Set IP Address | ${dut2} | ${subif_index_2} | 2002:2::2
119 | | ... | ${prefix}
120 | | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2002:3::2 | ${prefix}
121 | | Vpp All Ra Suppress Link Layer | ${nodes}
122 | | Vpp Route Add | ${dut1} | ${tg_if1_net} | ${host_prefix}
123 | | ... | gateway=2002:1::1 | interface=${dut1_if1}
124 | | Run Keyword If | '${dut2_status}' == 'PASS'
125 | | ... | Vpp Route Add | ${dut1} | ${tg_if2_net} | ${host_prefix}
126 | | ... | gateway=2002:2::2 | interface=${subif_index_1}
127 | | Run Keyword If | '${dut2_status}' == 'PASS'
128 | | ... | Vpp Route Add | ${dut2} | ${tg_if1_net} | ${host_prefix}
129 | | ... | gateway=2002:2::1 | interface=${subif_index_2}
130 | | Vpp Route Add | ${dut} | ${tg_if2_net} | ${host_prefix}
131 | | ... | gateway=2002:3::1 | interface=${dut_if2}
132
133 | Initialize IPv6 forwarding over SRv6 with encapsulation with '${n}' x SID '${prepos}' decapsulation in 3-node circular topology
134 | | [Documentation]
135 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
136 | | ... | topology. Get the interface MAC addresses and setup neighbours on all
137 | | ... | VPP interfaces. Setup IPv6 addresses on all interfaces. Set segment
138 | | ... | routing for IPv6 for required number of SIDs and configure IPv6 routes
139 | | ... | on both DUT nodes.
140 | | ...
141 | | VPP Interface Set IP Address
142 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
143 | | VPP Interface Set IP Address
144 | | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
145 | | VPP Interface Set IP Address
146 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
147 | | VPP Interface Set IP Address
148 | | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
149 | | Vpp All Ra Suppress Link Layer | ${nodes}
150 | | :FOR | ${number} | IN RANGE | 2 | ${dst_addr_nr}+2
151 | | | ${hexa_nr}= | Convert To Hex | ${number}
152 | | | VPP Add IP Neighbor | ${dut1}
153 | | | ... | ${dut1_if1} | ${tg_if1_ip6_subnet}${hexa_nr} | ${tg_if1_mac}
154 | | | VPP Add IP Neighbor | ${dut2}
155 | | | ... | ${dut2_if2} | ${tg_if2_ip6_subnet}${hexa_nr} | ${tg_if2_mac}
156 | | VPP Add IP Neighbor
157 | | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
158 | | VPP Add IP Neighbor
159 | | ... | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
160 | | ${sid1}= | Set Variable If
161 | | ... | "${n}" == "1" | ${dut2_sid1}
162 | | ... | "${n}" == "2" | ${dut2_sid1_1}
163 | | ${sid2}= | Set Variable If
164 | | ... | "${n}" == "1" | ${dut1_sid2}
165 | | ... | "${n}" == "2" | ${dut1_sid2_1}
166 | | Vpp Route Add | ${dut1} | ${sid1} | ${sid_prefix} | gateway=${dut2_if1_ip6}
167 | | ... | interface=${dut1_if2}
168 | | Vpp Route Add | ${dut2} | ${sid2} | ${sid_prefix} | gateway=${dut1_if2_ip6}
169 | | ... | interface=${dut2_if1}
170 # Configure SRv6 for direction0
171 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
172 | | @{sid_list_dir0}= | Run Keyword If | "${n}" == "1"
173 | | ... | Create List | ${dut2_sid1}
174 | | ... | ELSE IF | "${n}" == "2"
175 | | ... | Create List | ${dut2_sid1_1} | ${dut2_sid1_2}
176 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
177 | | ... | @{sid_list_dir0}
178 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
179 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
180 | | Run Keyword If | "${n}" == "1"
181 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.dx6
182 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
183 | | Run Keyword If | "${n}" == "2"
184 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_1} | end
185 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
186 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_2} | end.dx6
187 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
188 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
189 | | ... | Vpp Route Add | ${dut2} | ${dut2_sid1_2} | ${sid_prefix}
190 | | ... | gateway=${tg_if2_ip6_subnet}2 | interface=${dut2_if2}
191 # Configure SRv6 for direction1
192 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
193 | | @{sid_list_dir1}= | Run Keyword If | "${n}" == "1"
194 | | ... | Create List | ${dut1_sid2}
195 | | ... | ELSE IF | "${n}" == "2"
196 | | ... | Create List | ${dut1_sid2_1} | ${dut1_sid2_2}
197 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
198 | | ... | @{sid_list_dir1}
199 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
200 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
201 | | Run Keyword If | "${n}" == "1"
202 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.dx6
203 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
204 | | Run Keyword If | "${n}" == "2"
205 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_1} | end
206 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
207 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_2} | end.dx6
208 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
209 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
210 | | ... | Vpp Route Add | ${dut1} | ${dut1_sid2_2} | ${sid_prefix}
211 | | ... | gateway=${tg_if1_ip6_subnet}2 | interface=${dut1_if1}
212 | | Set interfaces in path up
213
214 | Initialize IPv6 forwarding over SRv6 with endpoint to SR-unaware Service Function via '${behavior}' behaviour in 3-node circular topology
215 | | [Documentation]
216 | | ... | Create pair of Memif interfaces on all defined VPP nodes. Set UP
217 | | ... | state on VPP interfaces in path on nodes in 3-node circular topology.
218 | | ... | Get the interface MAC addresses and setup neighbours on all VPP
219 | | ... | interfaces. Setup IPv6 addresses on all interfaces. Set segment
220 | | ... | routing for IPv6 with defined behaviour function and configure IPv6
221 | | ... | routes on both DUT nodes.
222 | | ...
223 | | ... | *Note:*
224 | | ... | KW uses test variable rxq_count_int set by KW Add worker threads
225 | | ... | and rxqueues to all DUTs
226 | | ...
227 | | ${sock1}= | Set Variable | memif-DUT1_CNF
228 | | ${sock2}= | Set Variable | memif-DUT2_CNF
229 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock1}
230 | | ... | ${1} | dut1-memif-1-if1 | dut1-memif-1-if2 | ${rxq_count_int}
231 | | ... | ${rxq_count_int}
232 | | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if1}
233 | | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if2}
234 | | Set up memif interfaces on DUT node | ${dut2} | ${sock2} | ${sock2}
235 | | ... | ${1} | dut2-memif-1-if1 | dut2-memif-1-if2 | ${rxq_count_int}
236 | | ... | ${rxq_count_int}
237 | | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if1}
238 | | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if2}
239 | | :FOR | ${dut} | IN | @{duts}
240 | | | Show Memif | ${nodes['${dut}']}
241 | | VPP Interface Set IP Address
242 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
243 | | VPP Interface Set IP Address
244 | | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
245 | | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if1}
246 | | ... | ${dut1-memif-1-if1_ip6} | ${mem_prefix}
247 | | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if2}
248 | | ... | ${dut1-memif-1-if2_ip6} | ${mem_prefix}
249 | | VPP Interface Set IP Address
250 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
251 | | VPP Interface Set IP Address
252 | | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
253 | | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if1}
254 | | ... | ${dut2-memif-1-if1_ip6} | ${mem_prefix}
255 | | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if2}
256 | | ... | ${dut2-memif-1-if2_ip6} | ${mem_prefix}
257 | | Vpp All Ra Suppress Link Layer | ${nodes}
258 | | VPP Add IP Neighbor
259 | | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
260 | | VPP Add IP Neighbor
261 | | ... | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
262 | | VPP Add IP Neighbor
263 | | ... | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}2 | ${tg_if1_mac}
264 | | VPP Add IP Neighbor
265 | | ... | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}2 | ${tg_if2_mac}
266 | | ${dut1-memif-1-if2_mac}= | Get Interface MAC | ${dut1} | memif2
267 | | ${dut2-memif-1-if2_mac}= | Get Interface MAC | ${dut2} | memif2
268 | | VPP Add IP Neighbor | ${dut1}
269 | | ... | ${dut1-memif-1-if1} | ${dut1_nh} | ${dut1-memif-1-if2_mac}
270 | | VPP Add IP Neighbor | ${dut2}
271 | | ... | ${dut2-memif-1-if1} | ${dut2_nh} | ${dut2-memif-1-if2_mac}
272 | | Vpp Route Add | ${dut1} | ${dut2_sid1} | ${sid_prefix}
273 | | ... | gateway=${dut2_if1_ip6} | interface=${dut1_if2}
274 | | Vpp Route Add | ${dut1} | ${out_sid2_1} | ${sid_prefix}
275 | | ... | gateway=${tg_if1_ip6_subnet}2 | interface=${dut1_if1}
276 | | Vpp Route Add | ${dut2} | ${dut1_sid2} | ${sid_prefix}
277 | | ... | gateway=${dut1_if2_ip6} | interface=${dut2_if1}
278 | | Vpp Route Add | ${dut2} | ${out_sid1_1} | ${sid_prefix}
279 | | ... | gateway=${tg_if2_ip6_subnet}2 | interface=${dut2_if2}
280 # Configure SRv6 for direction0 on DUT1
281 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
282 | | @{sid_list_dir0}= | Create List | ${dut2_sid1} | ${out_sid1_1}
283 | | ... | ${out_sid1_2}
284 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
285 | | ... | @{sid_list_dir0}
286 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
287 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
288 # Configure SRv6 for direction1 on DUT2
289 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
290 | | @{sid_list_dir1}= | Create List | ${dut1_sid2} | ${out_sid2_1}
291 | | ... | ${out_sid2_2}
292 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
293 | | ... | @{sid_list_dir1}
294 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
295 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
296 # Configure SRv6 for direction0 on DUT2
297 | | ${dut2_out_if}= | Get Interface Name | ${dut2} | memif1
298 | | ${dut2_in_if}= | Get Interface Name | ${dut2} | memif2
299 | | Remove Values From List | ${sid_list_dir0} | ${dut2_sid1}
300 | | Run Keyword If | "${behavior}" == "static_proxy"
301 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.as
302 | | ... | ${NONE} | ${dut2_nh} | ${NONE} | ${dut2_out_if} | ${dut2_in_if}
303 | | ... | ${dut1_sid1} | @{sid_list_dir0}
304 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
305 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.ad
306 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
307 | | ... | ELSE IF | "${behavior}" == "masquerading"
308 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.am
309 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
310 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
311 # Configure SRv6 for direction1 on DUT1
312 | | ${dut1_out_if}= | Get Interface Name | ${dut1} | memif1
313 | | ${dut1_in_if}= | Get Interface Name | ${dut1} | memif2
314 | | Remove Values From List | ${sid_list_dir1} | ${dut1_sid2}
315 | | Run Keyword If | "${behavior}" == "static_proxy"
316 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.as
317 | | ... | ${NONE} | ${dut1_nh} | ${NONE} | ${dut1_out_if} | ${dut1_in_if}
318 | | ... | ${dut2_sid2} | @{sid_list_dir1}
319 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
320 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.ad
321 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
322 | | ... | ELSE IF | "${behavior}" == "masquerading"
323 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.am
324 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
325 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
326 | | Set interfaces in path up
327
328 | Initialize L2 bridge domain in circular topology
329 | | [Documentation]
330 | | ... | Setup L2 DB topology by adding two interfaces on each DUT into BD
331 | | ... | that is created automatically with index 1. Learning is enabled.
332 | | ... | Interfaces are brought up.
333 | | ...
334 | | ... | *Arguments:*
335 | | ... | - bd_id - Bridge domain ID. Type: integer
336 | | ...
337 | | ... | *Example:*
338 | | ...
339 | | ... | \| Initialize L2 bridge domain in circular topology \| 1 \|
340 | | ...
341 | | [Arguments] | ${bd_id}=${1}
342 | | ...
343 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
344 | | ... | Variable Should Exist | ${dut2}
345 | | ...
346 | | Set interfaces in path up
347 | | ...
348 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id}
349 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${bd_id}
350 | | Run Keyword If | '${dut2_status}' == 'PASS'
351 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${bd_id}
352 | | Run Keyword If | '${dut2_status}' == 'PASS'
353 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id}
354
355 | Configure IPv4 ACLs
356 | | [Documentation]
357 | | ... | Configure ACL with required number of not-hitting permit ACEs plus two
358 | | ... | hitting ACEs for both traffic directions.
359 | | ...
360 | | ... | *Arguments:*
361 | | ... | - dut_node - DUT node. Type: dictionary
362 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
363 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
364 | | ...
365 | | ... | *Example:*
366 | | ...
367 | | ... | \| Configure IPv4 ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
368 | | ... | \| GigabitEthernet0/8/0 \|
369 | | ...
370 | | ... | _NOTE:_ This KW uses following test case variables:
371 | | ... | - src_ip_start - Source IP address start. Type: string
372 | | ... | - dst_ip_start - Destination IP address start. Type: string
373 | | ... | - ip_step - IP address step. Type: string
374 | | ... | - sport_start - Source port number start. Type: string
375 | | ... | - dport_start - Destination port number start. Type: string
376 | | ... | - port_step - Port number step. Type: string
377 | | ... | - no_hit_aces_number - Number of not-hitting ACEs to be configured.
378 | | ... | Type: integer
379 | | ... | - acl_apply_type - To what path apply the ACL - input or output.
380 | | ... | Type: string
381 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
382 | | ... | Type: string
383 | | ... | - trex_stream1_subnet - IP subnet used by T-Rex in direction 0->1.
384 | | ... | Type: string
385 | | ... | - trex_stream2_subnet - IP subnet used by T-Rex in direction 1->0.
386 | | ... | Type: string
387 | | ...
388 | | [Arguments] | ${dut} | ${dut_if1}=${NONE} | ${dut_if2}=${NONE}
389 | | ${src_ip_int} = | Evaluate
390 | | ... | int(ipaddress.ip_address(unicode($src_ip_start))) - $ip_step
391 | | ... | modules=ipaddress
392 | | ${dst_ip_int} = | Evaluate
393 | | ... | int(ipaddress.ip_address(unicode($dst_ip_start))) - $ip_step
394 | | ... | modules=ipaddress
395 | | ${ip_limit} = | Set Variable | 255.255.255.255
396 | | ${ip_limit_int} = | Evaluate
397 | | ... | int(ipaddress.ip_address(unicode($ip_limit))) | modules=ipaddress
398 | | ${sport}= | Evaluate | $sport_start - $port_step
399 | | ${dport}= | Evaluate | $dport_start - $port_step
400 | | ${port_limit}= | Set Variable | ${65535}
401 | | ${acl}= | Set Variable | ipv4 permit
402 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
403 | | | ${src_ip_int} = | Evaluate | $src_ip_int + $ip_step
404 | | | ${dst_ip_int} = | Evaluate | $dst_ip_int + $ip_step
405 | | | ${sport}= | Evaluate | $sport + $port_step
406 | | | ${dport}= | Evaluate | $dport + $port_step
407 | | | ${ipv4_limit_reached}= | Set Variable If
408 | | | ... | $src_ip_int > $ip_limit_int or $src_ip_int > $ip_limit_int
409 | | | ... | ${TRUE}
410 | | | ${udp_limit_reached}= | Set Variable If
411 | | | ... | $sport > $port_limit or $dport > $port_limit | ${TRUE}
412 | | | Run Keyword If | $ipv4_limit_reached is True | Log
413 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
414 | | | ... | WARN
415 | | | Run Keyword If | $udp_limit_reached is True | Log
416 | | | ... | Can't do more iterations - UDP port limit has been reached.
417 | | | ... | WARN
418 | | | ${src_ip} = | Run Keyword If | $ipv4_limit_reached is True
419 | | | ... | Set Variable | ${ip_limit}
420 | | | ... | ELSE | Evaluate | str(ipaddress.ip_address($src_ip_int))
421 | | | ... | modules=ipaddress
422 | | | ${dst_ip} = | Run Keyword If | $ipv4_limit_reached is True
423 | | | ... | Set Variable | ${ip_limit}
424 | | | ... | ELSE | Evaluate | str(ipaddress.ip_address($dst_ip_int))
425 | | | ... | modules=ipaddress
426 | | | ${sport}= | Set Variable If | ${sport} > $port_limit | $port_limit
427 | | | ... | ${sport}
428 | | | ${dport}= | Set Variable If | ${dport} > $port_limit | $port_limit
429 | | | ... | ${dport}
430 | | | ${acl}= | Catenate | ${acl} | src ${src_ip}/32 dst ${dst_ip}/32
431 | | | ... | sport ${sport} | dport ${dport},
432 | | | Exit For Loop If
433 | | | ... | $ipv4_limit_reached is True or $udp_limit_reached is True
434 | | ${acl}= | Catenate | ${acl}
435 | | ... | ipv4 ${acl_action} src ${trex_stream1_subnet},
436 | | ... | ipv4 ${acl_action} src ${trex_stream2_subnet}
437 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
438 | | @{acl_list}= | Create List | ${0}
439 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if1 is not None
440 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | input | ${acl_list}
441 | | Run Keyword If | 'input' in $acl_apply_type and $dut_if2 is not None
442 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | input | ${acl_list}
443 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if1 is not None
444 | | ... | Set Acl List For Interface | ${dut} | ${dut_if1} | output
445 | | ... | ${acl_list}
446 | | Run Keyword If | 'output' in $acl_apply_type and $dut_if2 is not None
447 | | ... | Set Acl List For Interface | ${dut} | ${dut_if2} | output
448 | | ... | ${acl_list}
449
450 | Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node circular topology
451 | | [Documentation]
452 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
453 | | ... | domain that is created automatically with index 1. Learning is
454 | | ... | enabled. Interfaces are brought up. Apply required ACL rules to DUT1
455 | | ... | interfaces.
456 | | ...
457 | | ... | *Arguments:*
458 | | ... | _None_
459 | | ...
460 | | ... | *Example:*
461 | | ...
462 | | ... | \| Initialize L2 bridge domain with IPv4 ACLs on DUT1 in 3-node \
463 | | ... | circular topology \|
464 | | ...
465 | | ... | _NOTE:_ This KW uses following test case variables:
466 | | ... | - dut1 - DUT1 node.
467 | | ... | - dut2 - DUT2 node.
468 | | ... | - dut1_if1 - DUT1 interface towards TG.
469 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
470 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
471 | | ... | - dut2_if2 - DUT2 interface towards TG.
472 | | ...
473 | | Set interfaces in path up
474 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
475 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
476 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
477
478 | Initialize IPv4 routing for '${ip_nr}' addresses with IPv4 ACLs on DUT1 in circular topology
479 | | [Documentation]
480 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node / 3-node
481 | | ... | circular topology. Get the interface MAC addresses and setup ARP on
482 | | ... | all VPP interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG
483 | | ... | links. In case of 3-node topology setup IPv4 adresses with /30 prefix
484 | | ... | on DUT1-DUT2 link and set routing on both DUT nodes with prefix /24
485 | | ... | and next hop of neighbour DUT interface IPv4 address.
486 | | ... | Apply required ACL rules to DUT1 interfaces.
487 | | ...
488 | | ... | *Arguments:*
489 | | ... | - ip_nr - Number of IPs to be used. Type: integer or string
490 | | ...
491 | | ... | *Example:*
492 | | ...
493 | | ... | \| Initialize IPv4 routing for '10' addresses with IPv4 ACLs on DUT1 \
494 | | ... | in 3-node circular topology \|
495 | | ...
496 | | ... | _NOTE:_ This KW uses following test case variables:
497 | | ... | - tg - TG node.
498 | | ... | - dut1 - DUT1 node.
499 | | ... | - dut2 - DUT2 node.
500 | | ... | - tg_if1 - TG interface 1 towards DUT1.
501 | | ... | - tg_if2 - TG interface 2 towards DUT2 (3-node topo) or DUT1
502 | | ... | (2-node topo).
503 | | ... | - dut1_if1 - DUT1 interface 1 towards TG.
504 | | ... | - dut1_if2 - DUT1 interface 2 towards DUT2 (3-node topo) or TG
505 | | ... | (2-node topo).
506 | | ... | - dut2_if1 - DUT2 interface 1 towards DUT1.
507 | | ... | - dut2_if2 - DUT2 interface 2 towards TG.
508 | | ...
509 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
510 | | ... | Variable Should Exist | ${dut2}
511 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
512 | | ... | Set Variable | ${dut2}
513 | | ... | ELSE | Set Variable | ${dut1}
514 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
515 | | ... | Set Variable | ${dut2_if2}
516 | | ... | ELSE | Set Variable | ${dut1_if2}
517 | | ...
518 | | Set interfaces in path up
519 | | ...
520 | | :FOR | ${number} | IN RANGE | 2 | ${ip_nr}+2
521 | | | VPP Add IP Neighbor
522 | | | ... | ${dut1} | ${dut1_if1} | 10.10.10.${number} | ${tg_if1_mac}
523 | | | VPP Add IP Neighbor
524 | | | ... | ${dut} | ${dut_if2} | 20.20.20.${number} | ${tg_if2_mac}
525 | | Run Keyword If | '${dut2_status}' == 'PASS'
526 | | ... | VPP Add IP Neighbor
527 | | ... | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
528 | | Run Keyword If | '${dut2_status}' == 'PASS'
529 | | ... | VPP Add IP Neighbor
530 | | ... | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
531 | | ...
532 | | VPP Interface Set IP Address
533 | | ... | ${dut1} | ${dut1_if1} | 10.10.10.1 | 24
534 | | VPP Interface Set IP Address
535 | | ... | ${dut} | ${dut_if2} | 20.20.20.1 | 24
536 | | Run Keyword If | '${dut2_status}' == 'PASS'
537 | | ... | VPP Interface Set IP Address
538 | | ... | ${dut1} | ${dut1_if2} | 1.1.1.1 | 30
539 | | Run Keyword If | '${dut2_status}' == 'PASS'
540 | | ... | VPP Interface Set IP Address
541 | | ... | ${dut2} | ${dut2_if1} | 1.1.1.2 | 30
542 | | ...
543 | | Run Keyword If | '${dut2_status}' == 'PASS'
544 | | ... | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | gateway=1.1.1.2
545 | | ... | interface=${dut1_if2}
546 | | Run Keyword If | '${dut2_status}' == 'PASS'
547 | | ... | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | gateway=1.1.1.1
548 | | ... | interface=${dut2_if1}
549 | | ...
550 | | Configure IPv4 ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
551
552 | Configure MACIP ACLs
553 | | [Documentation]
554 | | ... | Configure MACIP ACL with required number of not-hitting permit ACEs
555 | | ... | plus two hitting ACEs for both traffic directions.
556 | | ...
557 | | ... | *Arguments:*
558 | | ... | - dut_node - DUT node. Type: dictionary
559 | | ... | - dut_if1 - DUT node interface1 name (Optional). Type: string
560 | | ... | - dut_if2 - DUT node interface2 name (Optional). Type: string
561 | | ...
562 | | ... | *Example:*
563 | | ...
564 | | ... | \| Configure MACIP ACLs \| ${nodes['DUT1']} \| GigabitEthernet0/7/0 \
565 | | ... | \| GigabitEthernet0/8/0 \|
566 | | ...
567 | | ... | _NOTE:_ This KW uses following test case variables:
568 | | ... | - src_ip_start - Source IP address start. Type: string
569 | | ... | - ip_step - IP address step. Type: string
570 | | ... | - src_mac_start - Source MAC address start in format with colons.
571 | | ... | Type: string
572 | | ... | - src_mac_step - Source MAC address step. Type: string
573 | | ... | - src_mac_mask - Source MAC address mask. 00:00:00:00:00:00 is a
574 | | ... | wildcard mask. Type: string
575 | | ... | - no_hit_aces_number - Number of not-hitting ACEs to be configured.
576 | | ... | Type: integer
577 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
578 | | ... | Type: string
579 | | ... | - tg_stream1_subnet - IP subnet used by TG in direction 0->1.
580 | | ... | Type: string
581 | | ... | - tg_stream2_subnet - IP subnet used by TG in direction 1->0.
582 | | ... | Type: string
583 | | ... | - tg_stream1_mac - Source MAC address of traffic stream 1.
584 | | ... | Type: string
585 | | ... | - tg_stream2_mac - Source MAC address of traffic stream 2.
586 | | ... | Type: string
587 | | ... | - tg_mac_mask - MAC address mask for traffic streams.
588 | | ... | 00:00:00:00:00:00 is a wildcard mask. Type: string
589 | | ...
590 | | [Arguments] | ${dut} | ${dut_if1}=${NONE} | ${dut_if2}=${NONE}
591 | | ...
592 | | ${src_ip_int} = | IP To Int | ${src_ip_start}
593 | | ${src_ip_int} = | Evaluate | ${src_ip_int} - ${ip_step}
594 | | ...
595 | | ${ip_limit} = | Set Variable | 255.255.255.255
596 | | ${ip_limit_int} = | IP To Int | ${ip_limit}
597 | | ...
598 | | ${src_mac_int} = | Mac To Int | ${src_mac_start}
599 | | ${src_mac_int} = | Evaluate | ${src_mac_int} - ${src_mac_step}
600 | | ...
601 | | ${mac_limit} = | Set Variable | ff:ff:ff:ff:ff:ff
602 | | ${mac_limit_int} = | Mac To Int | ${mac_limit}
603 | | ...
604 | | ${acl}= | Set Variable | ipv4 permit
605 | | :FOR | ${nr} | IN RANGE | 0 | ${no_hit_aces_number}
606 | | | ${src_ip_int} = | Evaluate | ${src_ip_int} + ${ip_step}
607 | | | ${src_mac_int} = | Evaluate | ${src_mac_int} + ${src_mac_step}
608 | | | ${ipv4_limit_reached}= | Set Variable If
609 | | | ... | ${src_ip_int} > ${ip_limit_int} | ${TRUE}
610 | | | ${mac_limit_reached}= | Set Variable If
611 | | | ... | ${src_mac_int} > ${mac_limit_int} | ${TRUE}
612 | | | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}' | Log
613 | | | ... | Can't do more iterations - IPv4 address limit has been reached.
614 | | | ... | WARN
615 | | | Run Keyword If | '${mac_limit_reached}' == '${TRUE}' | Log
616 | | | ... | Can't do more iterations - MAC address limit has been reached.
617 | | | ... | WARN
618 | | | ${src_ip} = | Run Keyword If | '${ipv4_limit_reached}' == '${TRUE}'
619 | | | ... | Set Variable | ${ip_limit}
620 | | | ... | ELSE | Int To IP | ${src_ip_int}
621 | | | ${src_mac}= | Run Keyword If | '${mac_limit_reached}' == '${TRUE}'
622 | | | ... | Set Variable | ${mac_limit}
623 | | | ... | ELSE | Int To Mac | ${src_mac_int}
624 | | | ${acl}= | Catenate | ${acl} | ip ${src_ip}/32
625 | | | ... | mac ${src_mac} | mask ${src_mac_mask},
626 | | | Exit For Loop If | '${ipv4_limit_reached}' == '${TRUE}' or '${mac_limit_reached}' == '${TRUE}'
627 | | ${acl0}= | Catenate | ${acl}
628 | | ... | ipv4 ${acl_action} ip ${tg_stream1_subnet} mac ${tg_stream1_mac}
629 | | ... | mask ${tg_mac_mask}
630 | | ${acl1}= | Catenate | ${acl}
631 | | ... | ipv4 ${acl_action} ip ${tg_stream2_subnet} mac ${tg_stream2_mac}
632 | | ... | mask ${tg_mac_mask}
633 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl0}
634 | | Add Macip Acl Multi Entries | ${dut} | rules=${acl1}
635 | | ${acl_idx}= | Set Variable | 0
636 | | Run Keyword Unless | '${dut_if1}' == '${NONE}'
637 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if1} | add | ${acl_idx}
638 | | ${acl_idx}= | Set Variable | 1
639 | | Run Keyword Unless | '${dut_if2}' == '${NONE}'
640 | | ... | Add Del Macip Acl Interface | ${dut} | ${dut_if2} | add | ${acl_idx}
641
642 | Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node circular topology
643 | | [Documentation]
644 | | ... | Setup L2BD topology by adding two interfaces on DUT1 into bridge
645 | | ... | domain that is created automatically with index 1. Learning is
646 | | ... | enabled. Interfaces are brought up. Apply required MACIP ACL rules to
647 | | ... | DUT1 interfaces.
648 | | ...
649 | | ... | *Arguments:*
650 | | ... | _None_
651 | | ...
652 | | ... | *Example:*
653 | | ...
654 | | ... | \| Initialize L2 bridge domain with MACIP ACLs on DUT1 in 3-node \
655 | | ... | circular topology \|
656 | | ...
657 | | ... | _NOTE 1:_ This KW uses following test case variables:
658 | | ... | - tg - TG node.
659 | | ... | - dut1 - DUT1 node.
660 | | ... | - dut2 - DUT2 node.
661 | | ... | - tg_if1 - TG interface towards DUT1.
662 | | ... | - tg_if2 - TG interface towards DUT2.
663 | | ... | - dut1_if1 - DUT1 interface towards TG.
664 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
665 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
666 | | ... | - dut2_if2 - DUT2 interface towards TG.
667 | | ...
668 | | Set interfaces in path up
669 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1_if2}
670 | | Configure L2XC | ${dut2} | ${dut2_if1} | ${dut2_if2}
671 | | Configure MACIP ACLs | ${dut1} | ${dut1_if1} | ${dut1_if2}
672
673 | Initialize L2 bridge domains with Vhost-User on node
674 | | [Documentation]
675 | | ... | Create pairs of Vhost-User interfaces for defined number of VMs on
676 | | ... | defined VPP node. Add each Vhost-User interface into L2 bridge
677 | | ... | domains with learning enabled with physical inteface or Vhost-User
678 | | ... | interface of another VM.
679 | | ...
680 | | ... | *Arguments:*
681 | | ... | - dut - DUT node. Type: string
682 | | ... | - nf_chain - NF chain. Type: integer
683 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
684 | | ...
685 | | ... | *Note:*
686 | | ... | Socket paths for VM are defined in following format:
687 | | ... | - /var/run/vpp/sock-\${VM_ID}-1
688 | | ... | - /var/run/vpp/sock-\${VM_ID}-2
689 | | ...
690 | | ... | *Example:*
691 | | ...
692 | | ... | \| Initialize L2 bridge domains with Vhost-User on node \| DUT1 \
693 | | ... | \| 1 \| 1 \|
694 | | ...
695 | | [Arguments] | ${dut} | ${nf_chain}=${1} | ${nf_nodes}=${1}
696 | | ...
697 | | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain}
698 | | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain}
699 | | ${dut_str}= | Convert To Lowercase | ${dut}
700 | | Add interface to bridge domain
701 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_1}
702 | | ... | ${bd_id1}
703 | | Add interface to bridge domain
704 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_2}
705 | | ... | ${bd_id2}
706 | | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes} + 1
707 | | | ${qemu_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
708 | | | Configure vhost interfaces for L2BD forwarding
709 | | | ... | ${nodes['${dut}']}
710 | | | ... | /var/run/vpp/sock-${qemu_id}-1 | /var/run/vpp/sock-${qemu_id}-2
711 | | | ... | ${dut}-vhost-${qemu_id}-if1 | ${dut}-vhost-${qemu_id}-if2
712 | | | ${bd_id1}= | Evaluate | ${qemu_id} + (${nf_chain} - 1)
713 | | | ${bd_id2}= | Evaluate | ${bd_id1} + 1
714 | | | Add interface to bridge domain
715 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${qemu_id}-if1} | ${bd_id1}
716 | | | Add interface to bridge domain
717 | | | ... | ${nodes['${dut}']} | ${${dut}-vhost-${qemu_id}-if2} | ${bd_id2}
718
719 | Initialize L2 bridge domains with Vhost-User
720 | | [Documentation]
721 | | ... | Create pairs of Vhost-User interfaces for defined number of VNF nodes
722 | | ... | on all defined VPP nodes. Add each Vhost-User interface into L2 bridge
723 | | ... | domains with learning enabled with physical inteface or Vhost-User
724 | | ... | interface of another VM.
725 | | ...
726 | | ... | *Arguments:*
727 | | ... | - nf_chain - NF chain. Type: integer
728 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
729 | | ...
730 | | ... | *Example:*
731 | | ...
732 | | ... | \| Initialize L2 bridge domains with Vhost-User \| 1 \| 1 \|
733 | | ...
734 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1}
735 | | ...
736 | | :FOR | ${dut} | IN | @{duts}
737 | | | Initialize L2 bridge domains with Vhost-User on node
738 | | | ... | ${dut} | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
739
740 | Initialize L2 bridge domains for multiple chains with Vhost-User
741 | | [Documentation]
742 | | ... | Create pairs of Vhost-User interfaces for defined number of NF chains
743 | | ... | with defined number of VNF nodes on all defined VPP nodes. Add each
744 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
745 | | ... | with physical inteface or Vhost-User interface of another VM.
746 | | ... | Put all interfaces in path up.
747 | | ...
748 | | ... | *Arguments:*
749 | | ... | - nf_chains - Number of chains of NFs. Type: integer
750 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
751 | | ...
752 | | ... | *Example:*
753 | | ...
754 | | ... | \| Initialize L2 bridge domains for multiple chains with Vhost-User \
755 | | ... | \| 1 \| 1 \|
756 | | ...
757 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1}
758 | | ...
759 | | Set interfaces in path up
760 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains} + 1
761 | | | Initialize L2 bridge domains with Vhost-User
762 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
763
764 | Initialize L2 bridge domain with VXLANoIPv4 in 3-node circular topology
765 | | [Documentation]
766 | | ... | Setup L2 bridge domain topology with VXLANoIPv4 by connecting
767 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
768 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
769 | | ... | between DUTs. VXLAN sub-interfaces has same IPv4 address as
770 | | ... | interfaces.
771 | | ...
772 | | Set interfaces in path up
773 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1
774 | | ... | 24
775 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2
776 | | ... | 24
777 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 172.16.0.2 | ${dut2_if1_mac}
778 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if1} | 172.16.0.1 | ${dut1_if2_mac}
779 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
780 | | ... | 172.16.0.1 | 172.16.0.2
781 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
782 | | ... | 172.16.0.2 | 172.16.0.1
783 | | Configure L2BD forwarding | ${dut1} | ${dut1_if1} | ${dut1s_vxlan}
784 | | Configure L2BD forwarding | ${dut2} | ${dut2_if2} | ${dut2s_vxlan}
785
786 | Initialize L2 bridge domain with VLAN and VXLANoIPv4 in 3-node circular topology
787 | | [Documentation]
788 | | ... | Setup L2 bridge domain topology with VLAN and VXLANoIPv4 by connecting
789 | | ... | pairs of VLAN sub-interface and VXLAN interface to separate L2 bridge
790 | | ... | domain on each DUT. All interfaces are brought up. IPv4 addresses
791 | | ... | with prefix /32 are configured on interfaces between DUTs. VXLAN
792 | | ... | sub-interfaces has same IPv4 address as interfaces.
793 | | ...
794 | | ... | *Arguments:*
795 | | ... | - vxlan_count - VXLAN count. Type: integer
796 | | ...
797 | | ... | *Example:*
798 | | ...
799 | | ... | \| Initialize L2 bridge domain with VLAN and VXLANoIPv4 in 3-node \
800 | | ... | \| circular topology \| ${1} \|
801 | | ...
802 | | [Arguments] | ${vxlan_count}=${1}
803 | | ...
804 | | Set interfaces in path up
805 | | ...
806 | | ${bd_id_start}= | Set Variable | ${1}
807 | | ${vni_start} = | Set Variable | ${20}
808 | | ...
809 | | ${ip_step} = | Set Variable | ${2}
810 | | ${dut1_ip_start}= | Set Variable | 172.16.0.1
811 | | ${dut2_ip_start}= | Set Variable | 172.16.0.2
812 | | ...
813 | | Vpp create multiple VXLAN IPv4 tunnels | node=${dut1}
814 | | ... | node_vxlan_if=${dut1_if2} | node_vlan_if=${dut1_if1}
815 | | ... | op_node=${dut2} | op_node_if=${dut2_if1} | n_tunnels=${vxlan_count}
816 | | ... | vni_start=${vni_start} | src_ip_start=${dut1_ip_start}
817 | | ... | dst_ip_start=${dut2_ip_start} | ip_step=${ip_step}
818 | | ... | bd_id_start=${bd_id_start}
819 | | Vpp create multiple VXLAN IPv4 tunnels | node=${dut2}
820 | | ... | node_vxlan_if=${dut2_if1} | node_vlan_if=${dut2_if2}
821 | | ... | op_node=${dut1} | op_node_if=${dut1_if2} | n_tunnels=${vxlan_count}
822 | | ... | vni_start=${vni_start} | src_ip_start=${dut2_ip_start}
823 | | ... | dst_ip_start=${dut1_ip_start} | ip_step=${ip_step}
824 | | ... | bd_id_start=${bd_id_start}
825
826 | Initialize L2 bridge domains with Vhost-User and VXLANoIPv4 in 3-node circular topology
827 | | [Documentation]
828 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
829 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
830 | | ... | with physical inteface.
831 | | ... | Setup VXLANoIPv4 between DUTs by connecting physical and vxlan
832 | | ... | interfaces on each DUT. All interfaces are brought up.
833 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
834 | | ... | DUTs. VXLAN sub-interfaces has same IPv4 address as interfaces.
835 | | ...
836 | | ... | *Arguments:*
837 | | ... | - bd_id1 - Bridge domain ID. Type: integer
838 | | ... | - bd_id2 - Bridge domain ID. Type: integer
839 | | ...
840 | | ... | *Example:*
841 | | ...
842 | | ... | \| L2 bridge domains with Vhost-User and VXLANoIPv4 initialized in a\
843 | | ... | 3-node circular topology \| 1 \| 2 \|
844 | | ...
845 | | [Arguments] | ${bd_id1} | ${bd_id2}
846 | | ...
847 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 172.16.0.1
848 | | ... | 24
849 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 172.16.0.2
850 | | ... | 24
851 | | Set interfaces in path up
852 | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | 24
853 | | ... | 172.16.0.1 | 172.16.0.2
854 | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | 24
855 | | ... | 172.16.0.2 | 172.16.0.1
856 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
857 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
858 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
859 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
860 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
861 | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${bd_id2}
862 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
863 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
864 | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${bd_id1}
865 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
866 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
867 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
868
869 | Init L2 bridge domains with single DUT with Vhost-User and VXLANoIPv4 in 3-node circular topology
870 | | [Documentation]
871 | | ... | Create two Vhost-User interfaces on one VPP node. Add each
872 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
873 | | ... | one connected to physical interface, the other to VXLAN.
874 | | ... | Setup VXLANoIPv4 between DUTs and TG by connecting physical and vxlan
875 | | ... | interfaces on the DUT. All interfaces are brought up.
876 | | ... | IPv4 addresses with prefix /24 are configured on interfaces between
877 | | ... | DUT and TG.
878 | | ...
879 | | ... | *Arguments:*
880 | | ... | - dut1_address - Address of physical interface on DUT1. Type: string
881 | | ... | - dut1_address_subnet - Subnet of the address of physical interface on
882 | | ... |                         DUT1. Type: string
883 | | ... | - dut2_address - Address of physical interface on DUT2. Type: string
884 | | ... | - dut2_address_subnet - Subnet of the address of physical interface on
885 | | ... |                         DUT2. Type: string
886 | | ... | - dut1_gw - Address of the _gateway_ to which the traffic will be
887 | | ... |             forwarded on DUT1. Type: string
888 | | ... | - dut2_gw - Address of the _gateway_ to which the traffic will be
889 | | ... |             forwarded on DUT2. Type: string
890 | | ... | - dut1_vxlans - List of VXLAN params to be configured on DUT1.
891 | | ... |                 Type: list of dicts, dict params vni, vtep
892 | | ... | - dut2_vxlans - List of VXLAN params to be configured on DUT2.
893 | | ... |                 Type: list of dicts, dict params vni, vtep
894 | | ... | - dut1_route_subnet - Subnet address to forward to  _gateway_ on DUT1.
895 | | ... |                       Type: string
896 | | ... | - dut1_route_mask - Subnet address mask to forward to  _gateway_
897 | | ... |                     on DUT1. Type: string
898 | | ... | - dut2_route_subnet - Subnet address to forward to  _gateway_ on DUT2.
899 | | ... |                       Type: string
900 | | ... | - dut2_route_mask - Subnet address mask to forward to  _gateway_
901 | | ... |                     on DUT2. Type: string
902 | | ...
903 | | ... | *Example:*
904 | | ...
905 | | [Arguments] | ${dut1_address} | ${dut1_address_subnet} |
906 | | ... | ${dut2_address} | ${dut2_address_subnet} | ${dut1_gw} | ${dut2_gw} |
907 | | ... | ${dut1_vxlans} | ${dut2_vxlans} | ${dut1_route_subnet} |
908 | | ... | ${dut1_route_mask} | ${dut2_route_subnet} | ${dut2_route_mask}
909 | | ...
910 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
911 | | ... | /var/run/vpp/sock-1-${dut1_bd_id1}
912 | | ... | /var/run/vpp/sock-1-${dut1_bd_id2}
913 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} |
914 | | ... | ${dut1_address} | ${dut1_address_subnet}
915 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2} |
916 | | ... | ${dut2_address} | ${dut2_address_subnet}
917 | | ${dut1_bd_id1}= | Set Variable | 1
918 | | ${dut1_bd_id2}= | Set Variable | 2
919 | | ${dut2_bd_id1}= | Set Variable | 1
920 | | :FOR | ${vxlan} | IN | @{dut1_vxlans}
921 | | | ${dut1s_vxlan}= | Create VXLAN interface | ${dut1} | ${vxlan.vni}
922 | | | ... | ${dut1_address} | ${vxlan.vtep}
923 | | | Add interface to bridge domain | ${dut1} | ${dut1s_vxlan} | ${dut1_bd_id1}
924 | | :FOR | ${vxlan} | IN | @{dut2_vxlans}
925 | | | ${dut2s_vxlan}= | Create VXLAN interface | ${dut2} | ${vxlan.vni}
926 | | | ... | ${dut2_address} | ${vxlan.vtep}
927 | | | Add interface to bridge domain | ${dut2} | ${dut2s_vxlan} | ${dut2_bd_id1}
928 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | ${dut1_gw} | ${tg_if1_mac}
929 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | ${dut2_gw} | ${tg_if2_mac}
930 | | Vpp Route Add | ${dut1} | ${dut1_route_subnet} | ${dut1_route_mask}
931 | | ... | gateway=${dut1_gw} | interface=${dut1_if1}
932 | | Vpp Route Add | ${dut2} | ${dut2_route_subnet} | ${dut2_route_mask}
933 | | ... | gateway=${dut2_gw} | interface=${dut2_if2}
934 | | Add interface to bridge domain | ${dut1} | ${dut1_if2} | ${dut1_bd_id2}
935 | | Add interface to bridge domain | ${dut2} | ${dut2_if1} | ${dut2_bd_id1}
936 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${dut1_bd_id1}
937 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${dut1_bd_id2}
938
939 | Initialize L2 bridge domains with VLAN dot1q sub-interfaces in circular topology
940 | | [Documentation]
941 | | ... | Setup L2 bridge domain topology with learning enabled with VLAN by
942 | | ... | connecting physical and vlan interfaces on each DUT. In case of 3-node
943 | | ... | topology create VLAN sub-interfaces between DUTs. In case of 2-node
944 | | ... | topology create VLAN sub-interface on dut1-if2 interface. All
945 | | ... | interfaces are brought up.
946 | | ...
947 | | ... | *Arguments:*
948 | | ... | - bd_id1 - Bridge domain ID. Type: integer
949 | | ... | - bd_id2 - Bridge domain ID. Type: integer
950 | | ... | - subid - ID of the sub-interface to be created. Type: string
951 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
952 | | ...
953 | | ... | _NOTE:_ This KW uses following test case variables:
954 | | ... | - dut1 - DUT1 node.
955 | | ... | - dut2 - DUT2 node.
956 | | ... | - dut1_if2 - DUT1 interface towards DUT2.
957 | | ... | - dut2_if1 - DUT2 interface towards DUT1.
958 | | ...
959 | | ... | *Example:*
960 | | ...
961 | | ... | \| Initialize L2 bridge domains with VLAN dot1q sub-interfaces
962 | | ... | in a 3-node circular topology \| 1 \| 2 \| 10 \| pop-1 \|
963 | | ...
964 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
965 | | ...
966 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
967 | | ... | Variable Should Exist | ${dut2}
968 | | ...
969 | | Set interfaces in path up
970 | | ...
971 | | Run Keyword If | '${dut2_status}' == 'PASS'
972 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
973 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
974 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
975 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
976 | | Run Keyword If | '${dut2_status}' == 'PASS'
977 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
978 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
979 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
980 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
981 | | ...
982 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
983 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id1}
984 | | Run Keyword If | '${dut2_status}' == 'PASS'
985 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
986 | | ... | ${bd_id2}
987 | | Run Keyword If | '${dut2_status}' == 'PASS'
988 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2}
989 | | ... | ${bd_id2}
990
991 | Initialize L2 bridge domains with Vhost-User and VLAN in circular topology
992 | | [Documentation]
993 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Add each
994 | | ... | Vhost-User interface into L2 bridge domains with learning enabled
995 | | ... | with physical inteface. In case of 3-node topology create VLAN
996 | | ... | sub-interfaces between DUTs. In case of 2-node topology create VLAN
997 | | ... | sub-interface on dut1-if2 interface. All interfaces are brought up.
998 | | ...
999 | | ... | *Arguments:*
1000 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1001 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1002 | | ... | - subid - ID of the sub-interface to be created. Type: string
1003 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1004 | | ...
1005 | | ... | *Example:*
1006 | | ...
1007 | | ... | \| L2 bridge domains with Vhost-User and VLAN initialized in circular\
1008 | | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
1009 | | ...
1010 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1011 | | ...
1012 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1013 | | ... | Variable Should Exist | ${dut2}
1014 | | ...
1015 | | Set interfaces in path up
1016 | | ...
1017 | | Run Keyword If | '${dut2_status}' == 'PASS'
1018 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
1019 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1020 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
1021 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
1022 | | Run Keyword If | '${dut2_status}' == 'PASS'
1023 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
1024 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
1025 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
1026 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
1027 | | ...
1028 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1029 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1030 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1031 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1032 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1033 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1034 | | Run Keyword If | '${dut2_status}' == 'PASS'
1035 | | ... | Configure vhost interfaces for L2BD forwarding | ${dut2}
1036 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1037 | | Run Keyword If | '${dut2_status}' == 'PASS'
1038 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
1039 | | ... | ${bd_id1}
1040 | | Run Keyword If | '${dut2_status}' == 'PASS'
1041 | | ... | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1042 | | Run Keyword If | '${dut2_status}' == 'PASS'
1043 | | ... | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1044 | | Run Keyword If | '${dut2_status}' == 'PASS'
1045 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1046
1047 | Initialize L2 bridge domains with Vhost-User and VLAN with VPP link bonding in a 3-node circular topology
1048 | | [Documentation]
1049 | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Create one
1050 | | ... | link bonding (BondEthernet) interface on both VPP nodes. Enslave one
1051 | | ... | physical interface towards next DUT by BondEthernet interface. Setup
1052 | | ... | VLAN on BondEthernet interfaces between DUTs. Add one Vhost-User
1053 | | ... | interface into L2 bridge domains with learning enabled with physical
1054 | | ... | interface towards TG and other Vhost-User interface into L2 bridge
1055 | | ... | domains with learning enabled with VLAN sub-interface. All interfaces
1056 | | ... | are brought up.
1057 | | ...
1058 | | ... | *Arguments:*
1059 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1060 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1061 | | ... | - subid - ID of the sub-interface to be created. Type: string
1062 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1063 | | ... | - bond_mode - Link bonding mode. Type: string
1064 | | ... | - lb_mode - Load balance mode. Type: string
1065 | | ...
1066 | | ... | *Example:*
1067 | | ...
1068 | | ... | \| Initialize L2 bridge domains with Vhost-User and VLAN with VPP\
1069 | | ... | link bonding in a 3-node circular topology \| 1 \| 2 \
1070 | | ... | \| 10 \| pop-1 \| xor \| l34 \|
1071 | | ...
1072 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1073 | | ... | ${bond_mode} | ${lb_mode}
1074 | | ...
1075 | | Set interfaces in path up
1076 | | ${dut1_eth_bond_if1}= | VPP Create Bond Interface | ${dut1} | ${bond_mode}
1077 | | ... | ${lb_mode}
1078 | | Set Interface State | ${dut1} | ${dut1_eth_bond_if1} | up
1079 | | VPP Set interface MTU | ${dut1} | ${dut1_eth_bond_if1}
1080 | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
1081 | | ... | Variable Should Exist | ${dut1_if2}
1082 | | Run Keyword If | '${if2_status}' == 'PASS'
1083 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2}
1084 | | ... | ${dut1_eth_bond_if1}
1085 | | ... | ELSE
1086 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_1}
1087 | | ... | ${dut1_eth_bond_if1}
1088 | | Run Keyword Unless | '${if2_status}' == 'PASS'
1089 | | ... | VPP Enslave Physical Interface | ${dut1} | ${dut1_if2_2}
1090 | | ... | ${dut1_eth_bond_if1}
1091 | | ${dut2_eth_bond_if1}= | VPP Create Bond Interface | ${dut2} | ${bond_mode}
1092 | | ... | ${lb_mode}
1093 | | Set Interface State | ${dut2} | ${dut2_eth_bond_if1} | up
1094 | | VPP Set interface MTU | ${dut2} | ${dut2_eth_bond_if1}
1095 | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
1096 | | ... | Variable Should Exist | ${dut2_if1}
1097 | | Run Keyword If | '${if1_status}' == 'PASS'
1098 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1}
1099 | | ... | ${dut2_eth_bond_if1}
1100 | | ... | ELSE
1101 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_1}
1102 | | ... | ${dut2_eth_bond_if1}
1103 | | Run Keyword Unless | '${if2_status}' == 'PASS'
1104 | | ... | VPP Enslave Physical Interface | ${dut2} | ${dut2_if1_2}
1105 | | ... | ${dut2_eth_bond_if1}
1106 | | VPP Show Bond Data On All Nodes | ${nodes} | verbose=${TRUE}
1107 | | Initialize VLAN dot1q sub-interfaces in circular topology
1108 | | ... | ${dut1} | ${dut1_eth_bond_if1} | ${dut2} | ${dut2_eth_bond_if1}
1109 | | ... | ${subid}
1110 | | Configure L2 tag rewrite method on interfaces
1111 | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2}
1112 | | ... | ${tag_rewrite}
1113 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
1114 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1115 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1116 | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${bd_id1}
1117 | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${bd_id2}
1118 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1119 | | Configure vhost interfaces for L2BD forwarding | ${dut2}
1120 | | ... | /var/run/vpp/sock-1-${bd_id1} | /var/run/vpp/sock-1-${bd_id2}
1121 | | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id1}
1122 | | Add interface to bridge domain | ${dut2} | ${vhost_if1} | ${bd_id1}
1123 | | Add interface to bridge domain | ${dut2} | ${vhost_if2} | ${bd_id2}
1124 | | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1125
1126 | Initialize LISP IPv4 forwarding in 3-node circular topology
1127 | | [Documentation] | Custom setup of IPv4 addresses on all DUT nodes and TG \
1128 | | ... | Don`t set route.
1129 | | ...
1130 | | ... | *Arguments:*
1131 | | ... | - dut1_dut2_address - Ip address from DUT1 to DUT2. Type: string
1132 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1133 | | ... | - dut2_dut1_address - Ip address from DUT2 to DUT1. Type: string
1134 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1135 | | ... | - duts_prefix - ip prefix. Type: int
1136 | | ...
1137 | | ... | *Return:*
1138 | | ... | - No value returned
1139 | | ...
1140 | | ... | *Example:*
1141 | | ... | \| Initialize LISP IPv4 forwarding in 3-node circular topology \
1142 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1143 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1144 | | ...
1145 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1146 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${duts_prefix}
1147 | | ...
1148 | | Set interfaces in path up
1149 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg_if1_mac}
1150 | | VPP Add IP Neighbor
1151 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
1152 | | VPP Add IP Neighbor
1153 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
1154 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg_if2_mac}
1155 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
1156 | | ... | ${dut1_tg_address} | ${duts_prefix}
1157 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2}
1158 | | ... | ${dut1_dut2_address} | ${duts_prefix}
1159 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if1}
1160 | | ... | ${dut2_dut1_address} | ${duts_prefix}
1161 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2}
1162 | | ... | ${dut2_tg_address} | ${duts_prefix}
1163
1164 | Initialize LISP GPE IPv4 over IPsec in 3-node circular topology
1165 | | [Documentation] | Setup Lisp GPE IPv4 forwarding over IPsec.
1166 | | ...
1167 | | ... | *Arguments:*
1168 | | ... | - encr_alg - Encryption algorithm. Type: string
1169 | | ... | - auth_alg - Authentication algorithm. Type: string
1170 | | ...
1171 | | ... | *Return:*
1172 | | ... | - No value returned
1173 | | ...
1174 | | ... | *Example:*
1175 | | ... | \| Initialize LISP GPE IPv4 over IPsec in 3-node circular topology\
1176 | | ... | \| ${encr_alg} \| ${auth_alg}
1177 | | ...
1178 | | [Arguments] | ${encr_alg} | ${auth_alg}
1179 | | ...
1180 | | Generate keys for IPSec | ${encr_alg} | ${auth_alg}
1181 | | Initialize LISP IPv4 forwarding in 3-node circular topology
1182 | | ... | ${dut1_to_dut2_ip4} | ${dut1_to_tg_ip4} | ${dut2_to_dut1_ip4}
1183 | | ... | ${dut2_to_tg_ip4} | ${prefix4}
1184 | | Configure LISP GPE topology in 3-node circular topology
1185 | | ... | ${dut1} | ${dut1_if2} | ${NONE}
1186 | | ... | ${dut2} | ${dut2_if1} | ${NONE}
1187 | | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
1188 | | ... | ${dut1_ip4_static_adjacency} | ${dut2_ip4_static_adjacency}
1189 | | Configure manual keyed connection for IPSec
1190 | | ... | ${dut1} | ${dut1_if2} | ${encr_alg} | ${encr_key}
1191 | | ... | ${auth_alg} | ${auth_key} | ${dut1_spi} | ${dut2_spi}
1192 | | ... | ${dut1_to_dut2_ip4} | ${dut2_to_dut1_ip4}
1193 | | Configure manual keyed connection for IPSec
1194 | | ... | ${dut2} | ${dut2_if1} | ${encr_alg} | ${encr_key}
1195 | | ... | ${auth_alg} | ${auth_key} | ${dut2_spi} | ${dut1_spi}
1196 | | ... | ${dut2_to_dut1_ip4} | ${dut1_to_dut2_ip4}
1197
1198 | Initialize LISP IPv6 forwarding in 3-node circular topology
1199 | | [Documentation] | Custom setup of IPv6 topology on all DUT nodes \
1200 | | ... | Don`t set route.
1201 | | ...
1202 | | ... | *Arguments:*
1203 | | ... | - dut1_dut2_address - Ip address from DUT1 to DUT2. Type: string
1204 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1205 | | ... | - dut2_dut1_address - Ip address from DUT2 to DUT1. Type: string
1206 | | ... | - dut1_tg_address - Ip address from DUT1 to tg. Type: string
1207 | | ... | - duts_prefix - ip prefix. Type: int
1208 | | ...
1209 | | ... | *Return:*
1210 | | ... | - No value returned
1211 | | ...
1212 | | ... | *Example:*
1213 | | ... | \| Initialize LISP IPv6 forwarding in 3-node circular topology \
1214 | | ... | \| ${dut1_dut2_address} \| ${dut1_tg_address} \
1215 | | ... | \| ${dut2_dut1_address} \| ${dut2_tg_address} \| ${duts_prefix} \|
1216 | | ...
1217 | | [Arguments] | ${dut1_dut2_address} | ${dut1_tg_address}
1218 | | ... | ${dut2_dut1_address} | ${dut2_tg_address} | ${prefix}
1219 | | ...
1220 | | Set interfaces in path up
1221 | | VPP Interface Set IP Address
1222 | | ... | ${dut1} | ${dut1_if1} | ${dut1_tg_address} | ${prefix}
1223 | | VPP Interface Set IP Address
1224 | | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_address} | ${prefix}
1225 | | VPP Interface Set IP Address
1226 | | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_address} | ${prefix}
1227 | | VPP Interface Set IP Address
1228 | | ... | ${dut2} | ${dut2_if2} | ${dut2_tg_address} | ${prefix}
1229 | | Vpp All Ra Suppress Link Layer | ${nodes}
1230 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg_if1_mac}
1231 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg_if2_mac}
1232 | | VPP Add IP Neighbor
1233 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_address} | ${dut2_if1_mac}
1234 | | VPP Add IP Neighbor
1235 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_address} | ${dut1_if2_mac}
1236
1237 | Initialize LISP IPv4 over IPv6 forwarding in 3-node circular topology
1238 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1239 | | ... | Don`t set route.
1240 | | ...
1241 | | ... | *Arguments:*
1242 | | ... | - dut1_dut2_ip6_address - IPv6 address from DUT1 to DUT2.
1243 | | ... | Type: string
1244 | | ... | - dut1_tg_ip4_address - IPv4 address from DUT1 to tg. Type: string
1245 | | ... | - dut2_dut1_ip6_address - IPv6 address from DUT2 to DUT1.
1246 | | ... | Type: string
1247 | | ... | - dut1_tg_ip4_address - IPv4 address from DUT1 to tg. Type: string
1248 | | ... | - prefix4 - IPv4 prefix. Type: int
1249 | | ... | - prefix6 - IPv6 prefix. Type: int
1250 | | ...
1251 | | ... | *Return:*
1252 | | ... | - No value returned
1253 | | ...
1254 | | ... | *Example:*
1255 | | ... | \| Lisp IPv4 over IPv6 forwarding initialized in a 3-node circular \
1256 | | ... | topology \| ${dut1_dut2_ip6_address} \| ${dut1_tg_ip4_address} \
1257 | | ... | \| ${dut2_dut1_ip6_address} \| ${dut2_tg_ip4_address} \
1258 | | ... | \| ${prefix4} \| ${prefix6} \|
1259 | | ...
1260 | | [Arguments] | ${dut1_dut2_ip6_address} | ${dut1_tg_ip4_address}
1261 | | ... | ${dut2_dut1_ip6_address} | ${dut2_tg_ip4_address}
1262 | | ... | ${prefix4} | ${prefix6}
1263 | | ...
1264 | | Set interfaces in path up
1265 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
1266 | | ... | ${dut1_tg_ip4_address} | ${prefix4}
1267 | | VPP Interface Set IP Address
1268 | | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip6_address} | ${prefix6}
1269 | | VPP Interface Set IP Address
1270 | | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip6_address} | ${prefix6}
1271 | | VPP Interface Set IP Address | ${dut2} | ${dut2_if2}
1272 | | ... | ${dut2_tg_ip4_address} | ${prefix4}
1273 | | Vpp All Ra Suppress Link Layer | ${nodes}
1274 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg_if1_mac}
1275 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 20.20.20.2 | ${tg_if2_mac}
1276 | | VPP Add IP Neighbor
1277 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip6_address} | ${dut2_if1_mac}
1278 | | VPP Add IP Neighbor
1279 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip6_address} | ${dut1_if2_mac}
1280
1281 | Initialize LISP IPv6 over IPv4 forwarding in 3-node circular topology
1282 | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \
1283 | | ... | Don`t set route.
1284 | | ...
1285 | | ... | *Arguments:*
1286 | | ... | - dut1_dut2_ip4_address - IPv4 address from DUT1 to DUT2.
1287 | | ... | Type: string
1288 | | ... | - dut1_tg_ip6_address - IPv6 address from DUT1 to tg. Type: string
1289 | | ... | - dut2_dut1_ip4_address - IPv4 address from DUT2 to DUT1.
1290 | | ... | Type: string
1291 | | ... | - dut1_tg_ip6_address - IPv6 address from DUT1 to tg. Type: string
1292 | | ... | - prefix4 - IPv4 prefix. Type: int
1293 | | ... | - prefix6 - IPv6 prefix. Type: int
1294 | | ...
1295 | | ... | *Return:*
1296 | | ... | - No value returned
1297 | | ...
1298 | | ... | *Example:*
1299 | | ... | \| Lisp IPv6 over IPv4 forwarding initialized in a 3-node circular \
1300 | | ... | topology \| ${dut1_dut2_ip4_address} \| ${dut1_tg_ip6_address} \
1301 | | ... | \| ${dut2_dut1_ip4_address} \| ${dut2_tg_ip6_address} \
1302 | | ... | \| ${prefix6} \| ${prefix4} \|
1303 | | ...
1304 | | [Arguments] | ${dut1_dut2_ip4_address} | ${dut1_tg_ip6_address}
1305 | | ... | ${dut2_dut1_ip4_address} | ${dut2_tg_ip6_address}
1306 | | ... | ${prefix6} | ${prefix4}
1307 | | ...
1308 | | Set interfaces in path up
1309 | | VPP Interface Set IP Address
1310 | | ... | ${dut1} | ${dut1_if1} | ${dut1_tg_ip6_address} | ${prefix6}
1311 | | VPP Interface Set IP Address
1312 | | ... | ${dut1} | ${dut1_if2} | ${dut1_dut2_ip4_address} | ${prefix4}
1313 | | VPP Interface Set IP Address
1314 | | ... | ${dut2} | ${dut2_if1} | ${dut2_dut1_ip4_address} | ${prefix4}
1315 | | VPP Interface Set IP Address
1316 | | ... | ${dut2} | ${dut2_if2} | ${dut2_tg_ip6_address} | ${prefix6}
1317 | | Vpp All Ra Suppress Link Layer | ${nodes}
1318 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg_if1_mac}
1319 | | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 2001:2::2 | ${tg_if2_mac}
1320 | | VPP Add IP Neighbor
1321 | | ... | ${dut1} | ${dut1_if2} | ${dut2_dut1_ip4_address} | ${dut2_if1_mac}
1322 | | VPP Add IP Neighbor
1323 | | ... | ${dut2} | ${dut2_if1} | ${dut1_dut2_ip4_address} | ${dut1_if2_mac}
1324
1325 | Initialize NAT44 in circular topology
1326 | | [Documentation] | Initialization of 2-node / 3-node topology with NAT44
1327 | | ... | between DUTs:
1328 | | ... | - set interfaces up
1329 | | ... | - set IP addresses
1330 | | ... | - set ARP
1331 | | ... | - create routes
1332 | | ... | - set NAT44 - only on DUT1
1333 | | ...
1334 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1335 | | ... | Variable Should Exist | ${dut2}
1336 | | ...
1337 | | Set interfaces in path up
1338 | | ...
1339 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 10.0.0.1 | 20
1340 | | Run Keyword If | '${dut2_status}' == 'PASS'
1341 | | ... | VPP Interface Set IP Address | ${dut1} | ${dut1_if2}
1342 | | ... | 11.0.0.1 | 20
1343 | | Run Keyword If | '${dut2_status}' == 'PASS'
1344 | | ... | VPP Interface Set IP Address | ${dut2} | ${dut2_if1}
1345 | | ... | 11.0.0.2 | 20
1346 | | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
1347 | | ... | Set Variable | ${dut2}
1348 | | ... | ELSE | Set Variable | ${dut1}
1349 | | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
1350 | | ... | Set Variable | ${dut2_if2}
1351 | | ... | ELSE | Set Variable | ${dut1_if2}
1352 | | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 12.0.0.1 | 20
1353 | | ...
1354 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
1355 | | Run Keyword If | '${dut2_status}' == 'PASS'
1356 | | ... | VPP Add IP Neighbor
1357 | | ... | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
1358 | | Run Keyword If | '${dut2_status}' == 'PASS'
1359 | | ... | VPP Add IP Neighbor
1360 | | ... | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
1361 | | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 12.0.0.2 | ${tg_if2_mac}
1362 | | ...
1363 | | Vpp Route Add | ${dut1} | 20.0.0.0 | 18 | gateway=10.0.0.2
1364 | | ... | interface=${dut1_if1}
1365 | | Run Keyword If | '${dut2_status}' == 'PASS'
1366 | | ... | Vpp Route Add | ${dut1} | 12.0.0.2 | 32 | gateway=11.0.0.2
1367 | | ... | interface=${dut1_if2}
1368 | | Run Keyword If | '${dut2_status}' == 'PASS'
1369 | | ... | Vpp Route Add | ${dut2} | 12.0.0.0 | 24 | gateway=12.0.0.2
1370 | | ... | interface=${dut2_if2}
1371 | | Run Keyword If | '${dut2_status}' == 'PASS'
1372 | | ... | Vpp Route Add | ${dut2} | 200.0.0.0 | 30 | gateway=11.0.0.1
1373 | | ... | interface=${dut2_if1}
1374 | | ...
1375 | | Configure inside and outside interfaces
1376 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if2}
1377 | | Configure deterministic mode for NAT44
1378 | | ... | ${dut1} | 20.0.0.0 | 18 | 200.0.0.0 | 30
1379
1380 | Initialize L2 Bridge Domain with memif pairs on DUT node
1381 | | [Documentation]
1382 | | ... | Create pairs of Memif interfaces on DUT node. Put each Memif interface
1383 | | ... | to separate L2 bridge domain with one physical or memif interface
1384 | | ... | to create a chain accross DUT node.
1385 | | ...
1386 | | ... | *Arguments:*
1387 | | ... | - dut - DUT node. Type: dictionary
1388 | | ... | - nf_chain - NF chain. Type: integer
1389 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
1390 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
1391 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
1392 | | ...
1393 | | ... | *Note:*
1394 | | ... | Socket paths for Memif are defined in following format:
1395 | | ... | - /tmp/memif-\${dut}_CNF\${nf_id}-\${sid}
1396 | | ...
1397 | | ... | *Example:*
1398 | | ...
1399 | | ... | \| Initialize L2 Bridge Domain with memif pairs on DUT node \
1400 | | ... | \| ${dut} \| 1 \| 1 \|
1401 | | ...
1402 | | [Arguments] | ${dut} | ${nf_chain}=${1} | ${nf_nodes}=${1}
1403 | | ... | ${auto_scale}=${True}
1404 | | ...
1405 | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
1406 | | ... | Set Variable | ${rxq_count_int}
1407 | | ... | ELSE | Set Variable | ${1}
1408 | | ${bd_id2}= | Evaluate | ${nf_nodes}+1
1409 | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1}
1410 | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2}
1411 | | ... | ${bd_id2}
1412 | | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes}+1
1413 | | | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
1414 | | | ${sock1}= | Set Variable | memif-${dut}_CNF
1415 | | | ${sock2}= | Set Variable | memif-${dut}_CNF
1416 | | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
1417 | | | ... | ${sock1} | ${sock2} | ${nf_id} | ${dut}-memif-${nf_id}-if1
1418 | | | ... | ${dut}-memif-${nf_id}-if2 | ${rxq} | ${rxq}
1419 | | | ${bd_id2}= | Evaluate | ${nf_node}+1
1420 | | | Add interface to bridge domain | ${nodes['${dut}']}
1421 | | | ... | ${${dut}-memif-${nf_id}-if1} | ${nf_node}
1422 | | | Add interface to bridge domain | ${nodes['${dut}']}
1423 | | | ... | ${${dut}-memif-${nf_id}-if2} | ${bd_id2}
1424
1425 | Initialize L2 Bridge Domain with memif pairs
1426 | | [Documentation]
1427 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
1428 | | ... | Memif interface to separate L2 bridge domain with one physical or
1429 | | ... | virtual interface to create a chain accross DUT node.
1430 | | ...
1431 | | ... | *Arguments:*
1432 | | ... | - nf_chain - NF chain. Type: integer
1433 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
1434 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
1435 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
1436 | | ...
1437 | | ... | *Example:*
1438 | | ...
1439 | | ... | \| Initialize L2 Bridge Domain with memif pairs \| 1 \| 1 \|
1440 | | ...
1441 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
1442 | | ...
1443 | | :FOR | ${dut} | IN | @{duts}
1444 | | | Initialize L2 Bridge Domain with memif pairs on DUT node | ${dut}
1445 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
1446 | | | ... | auto_scale=${auto_scale}
1447
1448 | Initialize L2 Bridge Domain for multiple chains with memif pairs
1449 | | [Documentation]
1450 | | ... | Create pairs of Memif interfaces for defined number of NF chains
1451 | | ... | with defined number of NF nodes on all defined VPP nodes. Add each
1452 | | ... | Memif interface into L2 bridge domains with learning enabled
1453 | | ... | with physical inteface or Memif interface of another NF.
1454 | | ...
1455 | | ... | *Arguments:*
1456 | | ... | - nf_chains - Number of chains of NFs. Type: integer
1457 | | ... | - nf_nodes - Number of NFs nodes per chain. Type: integer
1458 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
1459 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
1460 | | ...
1461 | | ... | *Example:*
1462 | | ...
1463 | | ... | \| Initialize L2 Bridge Domain for multiple chains with memif pairs \
1464 | | ... | \| 1 \| 1 \|
1465 | | ...
1466 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
1467 | | ...
1468 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
1469 | | | Initialize L2 Bridge Domain with memif pairs | nf_chain=${nf_chain}
1470 | | | ... | nf_nodes=${nf_nodes} | auto_scale=${auto_scale}
1471 | | Set interfaces in path up
1472 | | Show Memif on all DUTs | ${nodes}
1473 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
1474
1475 | Initialize L2 Bridge Domain for pipeline with memif pairs
1476 | | [Documentation]
1477 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
1478 | | ... | Memif interface to separate L2 bridge domain with one physical or
1479 | | ... | virtual interface to create a service pipeline on DUT node.
1480 | | ...
1481 | | ... | *Arguments:*
1482 | | ... | - nf_chain - NF pipe. Type: integer
1483 | | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
1484 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
1485 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
1486 | | ...
1487 | | ... | *Example:*
1488 | | ...
1489 | | ... | \| Initialize L2 Bridge Domain for pipeline with memif pairs \
1490 | | ... | \| 1 \| 1 \|
1491 | | ...
1492 | | [Arguments] | ${nf_chain}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
1493 | | ...
1494 | | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
1495 | | ... | Set Variable | ${rxq_count_int}
1496 | | ... | ELSE | Set Variable | ${1}
1497 | | :FOR | ${dut} | IN | @{duts}
1498 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1}
1499 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2} | ${2}
1500 | | | ${nf_id_frst}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${1}
1501 | | | ${nf_id_last}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${nf_nodes}
1502 | | | ${sid_frst}= | Evaluate | ${nf_id_frst} * ${2} - ${1}
1503 | | | ${sid_last}= | Evaluate | ${nf_id_last} * ${2}
1504 | | | Set up single memif interface on DUT node | ${nodes['${dut}']}
1505 | | | ... | memif-${dut}_CNF | mid=${nf_id_frst} | sid=${sid_frst}
1506 | | | ... | memif_if=${dut}-memif-${nf_id_frst}-if1
1507 | | | ... | rxq=${rxq} | txq=${rxq}
1508 | | | Set up single memif interface on DUT node | ${nodes['${dut}']}
1509 | | | ... | memif-${dut}_CNF | mid=${nf_id_last} | sid=${sid_last}
1510 | | | ... | memif_if=${dut}-memif-${nf_id_last}-if2
1511 | | | ... | rxq=${rxq} | txq=${rxq}
1512 | | | Add interface to bridge domain | ${nodes['${dut}']}
1513 | | | ... | ${${dut}-memif-${nf_id_frst}-if1} | ${1}
1514 | | | Add interface to bridge domain | ${nodes['${dut}']}
1515 | | | ... | ${${dut}-memif-${nf_id_last}-if2} | ${2}
1516
1517 | Initialize L2 Bridge Domain for multiple pipelines with memif pairs
1518 | | [Documentation]
1519 | | ... | Create pairs of Memif interfaces for defined number of NF pipelines
1520 | | ... | with defined number of NF nodes on all defined VPP nodes. Add each
1521 | | ... | Memif interface into L2 bridge domains with learning enabled
1522 | | ... | with physical inteface or Memif interface of another NF.
1523 | | ...
1524 | | ... | *Arguments:*
1525 | | ... | - nf_chains - Number of pipelines of NFs. Type: integer
1526 | | ... | - nf_nodes - Number of NFs nodes per pipeline. Type: integer
1527 | | ... | - auto_scale - Whether to use same amount of RXQs for memif interface
1528 | | ... | in containers as vswitch, otherwise use single RXQ. Type: boolean
1529 | | ...
1530 | | ... | *Example:*
1531 | | ...
1532 | | ... | \| Initialize L2 Bridge Domain for multiple pipelines with memif \
1533 | | ... | pairs \| 1 \| 1 \|
1534 | | ...
1535 | | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
1536 | | ...
1537 | | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
1538 | | | Initialize L2 Bridge Domain for pipeline with memif pairs
1539 | | | ... | nf_chain=${nf_chain} | nf_nodes=${nf_nodes}
1540 | | | ... | auto_scale=${auto_scale}
1541 | | Set interfaces in path up
1542 | | Show Memif on all DUTs | ${nodes}
1543 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
1544
1545 | Initialize L2 Bridge Domain with memif pairs and VLAN in circular topology
1546 | | [Documentation]
1547 | | ... | Create pairs of Memif interfaces on all defined VPP nodes. Put each
1548 | | ... | Memif interface to separate L2 bridge domain with one physical or
1549 | | ... | virtual interface to create a chain accross DUT node. In case of
1550 | | ... | 3-node topology create VLAN sub-interfaces between DUTs. In case of
1551 | | ... | 2-node topology create VLAN sub-interface on dut1-if2 interface. All
1552 | | ... | interfaces are brought up.
1553 | | ...
1554 | | ... | *Arguments:*
1555 | | ... | - bd_id1 - Bridge domain ID. Type: integer
1556 | | ... | - bd_id2 - Bridge domain ID. Type: integer
1557 | | ... | - subid - ID of the sub-interface to be created. Type: string
1558 | | ... | - tag_rewrite - Method of tag rewrite. Type: string
1559 | | ...
1560 | | ... | *Example:*
1561 | | ...
1562 | | ... | \| Initialize L2 Bridge Domain with memif pairs and VLAN in circular\
1563 | | ... | topology \| 1 \| 2 \| 10 \| pop-1 \|
1564 | | ...
1565 | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite}
1566 | | ...
1567 | | ${dut2_status} | ${value}= | Run Keyword And Ignore Error
1568 | | ... | Variable Should Exist | ${dut2}
1569 | | ...
1570 | | Set interfaces in path up
1571 | | ...
1572 | | Run Keyword If | '${dut2_status}' == 'PASS'
1573 | | ... | Initialize VLAN dot1q sub-interfaces in circular topology
1574 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
1575 | | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
1576 | | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
1577 | | Run Keyword If | '${dut2_status}' == 'PASS'
1578 | | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
1579 | | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
1580 | | ... | ELSE | Configure L2 tag rewrite method on interfaces
1581 | | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
1582 | | ...
1583 | | ${number}= | Set Variable | ${1}
1584 | | ${sock1}= | Set Variable | memif-DUT1_CNF
1585 | | ${sock2}= | Set Variable | memif-DUT1_CNF
1586 | | ${memif_if1_name}= | Set Variable | DUT1-memif-${number}-if1
1587 | | ${memif_if2_name}= | Set Variable | DUT1-memif-${number}-if2
1588 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock2}
1589 | | ... | ${number} | ${memif_if1_name} | ${memif_if2_name} | ${rxq_count_int}
1590 | | ... | ${rxq_count_int}
1591 | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1}
1592 | | Add interface to bridge domain | ${dut1} | ${${memif_if1_name}} | ${bd_id1}
1593 | | Add interface to bridge domain | ${dut1} | ${${memif_if2_name}} | ${bd_id2}
1594 | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id2}
1595 | | ${sock1}= | Run Keyword If | '${dut2_status}' == 'PASS'
1596 | | ... | Set Variable | memif-DUT2_CNF
1597 | | ${sock2}= | Run Keyword If | '${dut2_status}' == 'PASS'
1598 | | ... | Set Variable | memif-DUT2_CNF
1599 | | ${memif_if1_name}= | Run Keyword If | '${dut2_status}' == 'PASS'
1600 | | ... | Set Variable | DUT2-memif-${number}-if1
1601 | | ${memif_if2_name}= | Run Keyword If | '${dut2_status}' == 'PASS'
1602 | | ... | Set Variable | DUT2-memif-${number}-if2
1603 | | Run Keyword If | '${dut2_status}' == 'PASS'
1604 | | ... | Set up memif interfaces on DUT node | ${dut2} | ${sock1} | ${sock2}
1605 | | ... | ${number} | ${memif_if1_name} | ${memif_if2_name} | ${rxq_count_int}
1606 | | ... | ${rxq_count_int}
1607 | | Run Keyword If | '${dut2_status}' == 'PASS'
1608 | | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2}
1609 | | ... | ${bd_id1}
1610 | | Run Keyword If | '${dut2_status}' == 'PASS'
1611 | | ... | Add interface to bridge domain | ${dut2} | ${${memif_if1_name}}
1612 | | ... | ${bd_id1}
1613 | | Run Keyword If | '${dut2_status}' == 'PASS'
1614 | | ... | Add interface to bridge domain | ${dut2} | ${${memif_if2_name}}
1615 | | ... | ${bd_id2}
1616 | | Run Keyword If | '${dut2_status}' == 'PASS'
1617 | | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2}
1618 | | ...
1619 | | Show Memif on all DUTs | ${nodes}
1620 | | VPP round robin RX placement on all DUTs | ${nodes} | prefix=memif
1621
1622 | Initialize L2 Bridge Domain for single memif
1623 | | [Documentation]
1624 | | ... | Create single Memif interface on all defined VPP nodes. Put Memif
1625 | | ... | interface to separate L2 bridge domain with one physical interface.
1626 | | ...
1627 | | ... | *Arguments:*
1628 | | ... | - number - Memif ID. Type: integer
1629 | | ...
1630 | | ... | *Note:*
1631 | | ... | Socket paths for Memif are defined in following format:
1632 | | ... | - /tmp/memif-DUT1_CNF\${number}-\${sid}
1633 | | ...
1634 | | ... | KW uses test variable ${rxq_count_int} set by KW Add worker threads
1635 | | ... | and rxqueues to all DUTs
1636 | | ...
1637 | | ... | *Example:*
1638 | | ...
1639 | | ... | \| Initialize L2 Bridge Domain for single memif \| 1 \|
1640 | | ...
1641 | | [Arguments] | ${number}=${1}
1642 | | ...
1643 | | :FOR | ${dut} | IN | @{duts}
1644 | | | ${sock}= | Set Variable | memif-${dut}_CNF
1645 | | | ${sid}= | Evaluate | (${number} * ${2}) - ${1}
1646 | | | Set up single memif interface on DUT node | ${nodes['${dut}']} | ${sock}
1647 | | | ... | mid=${number} | sid=${sid} | memif_if=${dut}-memif-${number}-if1
1648 | | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int}
1649 | | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1}
1650 | | | ... | ${number}
1651 | | | Add interface to bridge domain | ${nodes['${dut}']}
1652 | | | ... | ${${dut}-memif-${number}-if1} | ${number}
1653 | | Set single interfaces in path up
1654 | | Show Memif on all DUTs | ${nodes}
1655
1656 | Configure ACLs on a single interface
1657 | | [Documentation]
1658 | | ... | Configure ACL
1659 | | ...
1660 | | ... | *Arguments:*
1661 | | ... | - dut - DUT node. Type: string
1662 | | ... | - dut_if - DUT node interface name. Type: string
1663 | | ... | - acl_apply_type - To what path apply the ACL - input or output.
1664 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
1665 | | ... | - subnets - Subnets to apply the specific ACL. Type: list
1666 | | ...
1667 | | ... | *Example:*
1668 | | ...
1669 | | ... | \| Configure ACLs on a single interface \| ${nodes['DUT1']}
1670 | | ... | \| ... \| GigabitEthernet0/7/0 \| input \| permit | 0.0.0.0/0
1671 | | ...
1672 | | [Arguments] | ${dut} | ${dut_if} | ${acl_apply_type} | ${acl_action}
1673 | | ... | @{subnets}
1674 | | Set Test variable | ${acl} | ${EMPTY}
1675 | | :FOR | ${subnet} | IN | @{subnets}
1676 | | | ${acl} = | Run Keyword If | '${acl}' == '${EMPTY}'
1677 | | | ... | Set Variable | ipv4 ${acl_action} src ${subnet}
1678 | | | ... | ELSE
1679 | | | ... | Catenate | SEPARATOR=", " | ${acl}
1680 | | | ... | ipv4 ${acl_action} src ${subnet}
1681 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
1682 | | @{acl_list} = | Create List | ${0}
1683 | | Set Acl List For Interface | ${dut} | ${dut_if} | ${acl_apply_type}
1684 | | ... | ${acl_list}