Introduce reconfig suites, for dot1q+ip4+vxlan
[csit.git] / resources / libraries / robot / shared / interfaces.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 *** Settings ***
14 | Library | resources.libraries.python.InterfaceUtil
15 | Library | resources.libraries.python.NodePath
16
17 *** Keywords ***
18 | Set interfaces in path up
19 | | [Documentation]
20 | | ... | *Set UP state on VPP interfaces in path on all DUT nodes and set
21 | | ... | maximal MTU.*
22 | | ...
23 # TODO: Rework KW to set all interfaces in path UP and set MTU (including
24 # software interfaces. Run KW at the start phase of VPP setup to split
25 # from other "functional" configuration. This will allow modularity of this
26 # library
27 | | :FOR | ${dut} | IN | @{duts}
28 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
29 | | | ... | Variable Should Exist | ${${dut}_if1}
30 | | | Run Keyword If | '${if1_status}' == 'PASS'
31 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1} | up
32 | | | ... | ELSE
33 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up
34 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
35 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up
36 | | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
37 | | | ... | Variable Should Exist | ${${dut}_if2}
38 | | | Run Keyword If | '${if2_status}' == 'PASS'
39 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2} | up
40 | | | ... | ELSE
41 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_1} | up
42 | | | Run Keyword Unless | '${if2_status}' == 'PASS'
43 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_2} | up
44 | | :FOR | ${dut} | IN | @{duts}
45 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
46 | | | ... | Variable Should Exist | ${${dut}_if1}
47 | | | Run Keyword If | '${if1_status}' == 'PASS'
48 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1}
49 | | | ... | ELSE
50 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_1}
51 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
52 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_2}
53 | | | ${if2_status} | ${value}= | Run Keyword And Ignore Error
54 | | | ... | Variable Should Exist | ${${dut}_if2}
55 | | | Run Keyword If | '${if2_status}' == 'PASS'
56 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2}
57 | | | ... | ELSE
58 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_1}
59 | | | Run Keyword Unless | '${if2_status}' == 'PASS'
60 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_2}
61 | | All VPP Interfaces Ready Wait | ${nodes} | retries=${300}
62
63 | Set single interfaces in path up
64 | | [Documentation]
65 | | ... | *Set UP state on single VPP interfaces in path on all DUT nodes and set
66 | | ... | maximal MTU.*
67 | | ...
68 # TODO: Rework KW to set all interfaces in path UP and set MTU (including
69 # software interfaces. Run KW at the start phase of VPP setup to split
70 # from other "functional" configuration. This will allow modularity of this
71 # library
72 | | :FOR | ${dut} | IN | @{duts}
73 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
74 | | | ... | Variable Should Exist | ${${dut}_if1}
75 | | | Run Keyword If | '${if1_status}' == 'PASS'
76 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1} | up
77 | | | ... | ELSE
78 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up
79 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
80 | | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up
81 | | :FOR | ${dut} | IN | @{duts}
82 | | | ${if1_status} | ${value}= | Run Keyword And Ignore Error
83 | | | ... | Variable Should Exist | ${${dut}_if1}
84 | | | Run Keyword If | '${if1_status}' == 'PASS'
85 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1}
86 | | | ... | ELSE
87 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_1}
88 | | | Run Keyword Unless | '${if1_status}' == 'PASS'
89 | | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_2}
90 | | All VPP Interfaces Ready Wait | ${nodes}
91
92 | Get Vhost dump
93 | | [Documentation] | Get vhost-user dump.
94 | | ...
95 | | ... | *Arguments:*
96 | | ... | - node - DUT node data. Type: dictionary
97 | | ...
98 | | [Arguments] | ${dut_node}
99 | | ...
100 | | [Return] | ${vhost_dump}
101 | | ...
102 | | ${vhost_dump}= | Vhost User Dump | ${dut_node}
103
104 | Initialize layer interface on node
105 | | [Documentation]
106 | | ... | Baseline interfaces variables to be created.
107 | | ...
108 | | ... | *Arguments:*
109 | | ... | - dut - DUT node. Type: string
110 | | ... | - count - Number of baseline interface variables. Type: integer
111 | | ...
112 | | ... | *Example:*
113 | | ...
114 | | ... | \| Initialize layer interface on node \| DUT1 \| 1 \|
115 | | ...
116 | | [Arguments] | ${dut} | ${count}=${1}
117 | | ...
118 | | ${dut_str}= | Convert To Lowercase | ${dut}
119 | | :FOR | ${id} | IN RANGE | 1 | ${count} + 1
120 | | | Set Test Variable | ${${dut_str}_if_${id}_1} | ${${dut_str}_if1}
121 | | | Set Test Variable | ${${dut_str}_if_${id}_2} | ${${dut_str}_if2}
122
123 | Initialize layer interface
124 | | [Documentation]
125 | | ... | Physical interfaces variables to be created on all DUTs.
126 | | ...
127 | | ... | *Arguments:*
128 | | ... | - count - Number of untagged interfaces variables. Type: integer
129 | | ...
130 | | ... | *Example:*
131 | | ...
132 | | ... | \| Initialize layer interface \| 1 \|
133 | | ...
134 | | [Arguments] | ${count}=${1}
135 | | ...
136 | | :FOR | ${dut} | IN | @{duts}
137 | | | Initialize layer interface on node | ${dut} | count=${count}
138 | | Set Test Variable | ${prev_layer} | if
139 | | Set interfaces in path up
140
141 | Initialize layer avf on node
142 | | [Documentation]
143 | | ... | Initialize AVF interfaces on DUT. Interfaces are brought up.
144 | | ...
145 | | ... | *Arguments:*
146 | | ... | - dut - DUT node. Type: string
147 | | ...
148 | | ... | *Example:*
149 | | ...
150 | | ... | \| Initialize layer avf on node \| DUT1 \|
151 | | ...
152 | | [Arguments] | ${dut}
153 | | ...
154 | | ${dut_str}= | Convert To Lowercase | ${dut}
155 | | ${if1_vlan}= | Get Interface Vlan | ${nodes['${dut}']} | ${${dut}_if1}
156 | | ${if2_vlan}= | Get Interface Vlan | ${nodes['${dut}']} | ${${dut}_if2}
157 | | Set Test Variable | ${${dut_str}_vlan1} | ${if1_vlan}
158 | | Set Test Variable | ${${dut_str}_vlan2} | ${if2_vlan}
159 | | ${if1_pci}= | Get Interface PCI Addr | ${nodes['${dut}']}
160 | | ... | ${${dut}_if1_vf0}
161 | | ${if2_pci}= | Get Interface PCI Addr | ${nodes['${dut}']}
162 | | ... | ${${dut}_if2_vf0}
163 | | ${dut_eth_vf_if1}= | VPP Create AVF Interface | ${nodes['${dut}']}
164 | | ... | ${if1_pci} | ${rxq_count_int}
165 | | ${dut_eth_vf_if1_mac}= | Get Interface MAC | ${nodes['${dut}']}
166 | | ... | ${dut_eth_vf_if1}
167 | | ${dut_eth_vf_if2}= | VPP Create AVF Interface | ${nodes['${dut}']}
168 | | ... | ${if2_pci} | ${rxq_count_int}
169 | | ${dut_eth_vf_if2_mac}= | Get Interface MAC | ${nodes['${dut}']}
170 | | ... | ${dut_eth_vf_if2}
171 | | Set Test Variable | ${${dut_str}_if1} | ${dut_eth_vf_if1}
172 | | Set Test Variable | ${${dut_str}_if2} | ${dut_eth_vf_if2}
173 | | Set Test Variable | ${${dut_str}_if1_mac} | ${dut_eth_vf_if1_mac}
174 | | Set Test Variable | ${${dut_str}_if2_mac} | ${dut_eth_vf_if2_mac}
175
176 | Initialize AVF interfaces
177 | | [Documentation]
178 | | ... | Initialize AVF interfaces on each DUT. Interfaces are brought up.
179 | | ...
180 | | :FOR | ${dut} | IN | @{duts}
181 | | | Initialize layer avf on node | ${dut}
182 | | Set Test Variable | ${prev_layer} | vf
183 | | Set interfaces in path up
184
185 | Initialize layer bonding on node
186 | | [Documentation]
187 | | ... | Bonded interface and variables to be created on across east and
188 | | ... | west DUT's node interfaces.
189 | | ...
190 | | ... | *Arguments:*
191 | | ... | - dut - DUT node. Type: string
192 | | ... | - bond_mode - Link bonding mode. Type: string
193 | | ... | - lb_mode - Load balance mode. Type: string
194 | | ... | - count - Number of bond interface variables. Type: integer
195 | | ...
196 | | ... | *Example:*
197 | | ...
198 | | ... | \| Initialize layer bonding on node \| DUT1 \| xor \| l34 \| 1 \|
199 | | ...
200 | | [Arguments] | ${dut} | ${bond_mode}=xor | ${lb_mode}=l34 | ${count}=${1}
201 | | ...
202 | | ${dut_str}= | Convert To Lowercase | ${dut}
203 | | ${if_index}= | VPP Create Bond Interface
204 | | ... | ${nodes['${dut}']} | ${bond_mode} | load_balance=${lb_mode}
205 | | ... | mac=00:00:00:01:01:01
206 | | Set Interface State | ${nodes['${dut}']} | ${if_index} | up
207 | | VPP Enslave Physical Interface
208 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_1_1} | ${if_index}
209 | | VPP Enslave Physical Interface
210 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_1_2} | ${if_index}
211 | | :FOR | ${id} | IN RANGE | 1 | ${count} + 1
212 | | | Set Test Variable | ${${dut_str}_bond_${id}_1} | ${if_index}
213 | | | Set Test Variable | ${${dut_str}_bond_${id}_2} | ${if_index}
214
215 | Initialize layer bonding
216 | | [Documentation]
217 | | ... | Bonded interfaces and variables to be created on all DUT's interfaces.
218 | | ...
219 | | ... | *Arguments:*
220 | | ... | - bond_mode - Link bonding mode. Type: string
221 | | ... | - lb_mode - Load balance mode. Type: string
222 | | ... | - count - Number of bond interface variables. Type: integer
223 | | ...
224 | | ... | *Example:*
225 | | ...
226 | | ... | \| Initialize layer bonding \| xor \| l34 \| 1 \|
227 | | ...
228 | | [Arguments] | ${bond_mode}=xor | ${lb_mode}=l34 | ${count}=${1}
229 | | ...
230 | | :FOR | ${dut} | IN | @{duts}
231 | | | Initialize layer bonding on node
232 | | | ... | ${dut} | bond_mode=${bond_mode} | lb_mode=${lb_mode}
233 | | | ... | count=${count}
234 | | Set Test Variable | ${prev_layer} | bond
235
236 | Initialize layer dot1q on node for chain
237 | | [Documentation]
238 | | ... | Optionally create tag popping subinterface per chain.
239 | | ... | Return interface indices for dot1q layer interfaces,
240 | | ... | or Nones if subinterfaces are not created.
241 | | ...
242 | | ... | *Arguments:*
243 | | ... | - dut - DUT node. Type: string
244 | | ... | - id - Positive index of the chain. Type: integer
245 | | ... | - vlan_per_chain - Whether to create vlan subinterface for each chain.
246 | | ... |     Type: boolean
247 | | ...
248 | | ... | *Example:*
249 | | ...
250 | | ... | \| Initialize layer dot1q on node for chain \| DUT1 \| 1 \| True \|
251 | | ...
252 | | [Arguments] | ${dut} | ${id} | ${vlan_per_chain}=${True}
253 | | ...
254 | | ${dut_str}= | Convert To Lowercase | ${dut}
255 | | Return From Keyword If | ${id} != ${1} and not ${vlan_per_chain}
256 | | ... | ${NONE} | ${NONE}
257 | | # TODO: Is it worth creating Get Variable Value If Not None keyword?
258 | | ${default}= | Evaluate | ${100} + ${id} - ${1}
259 | | ${if1_vlan}= | Get Variable Value | \${${dut_str}_vlan1}
260 | | ${if1_vlan}= | Set Variable If | '${if1_vlan}' != '${NONE}'
261 | | ... | ${if1_vlan} | ${default}
262 | | ${default}= | Evaluate | ${200} + ${id} - ${1}
263 | | ${if2_vlan}= | Get Variable Value | \${${dut_str}_vlan2}
264 | | ${if2_vlan}= | Set Variable If | '${if2_vlan}' != '${NONE}'
265 | | ... | ${if2_vlan} | ${default}
266 | | ${if1_name} | ${if1_index}= | Create Vlan Subinterface
267 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${id}_1}
268 | | ... | ${if1_vlan}
269 | | ${if2_name} | ${if2_index}= | Create Vlan Subinterface
270 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${id}_2}
271 | | ... | ${if2_vlan}
272 | | Set Interface State | ${nodes['${dut}']} | ${if1_index} | up
273 | | Set Interface State | ${nodes['${dut}']} | ${if2_index} | up
274 | | Configure L2 tag rewrite method on interfaces
275 | | ... | ${nodes['${dut}']} | ${if1_index} | TAG_REWRITE_METHOD=pop-1
276 | | Configure L2 tag rewrite method on interfaces
277 | | ... | ${nodes['${dut}']} | ${if2_index} | TAG_REWRITE_METHOD=pop-1
278 | | Return From Keyword | ${if1_index} | ${if2_index}
279
280 | Initialize layer dot1q on node
281 | | [Documentation]
282 | | ... | Dot1q interfaces and variables to be created on all DUT's node
283 | | ... | interfaces.
284 | | ...
285 | | ... | TODO: Unify names for number of chains/pipelines/instances/interfaces.
286 | | ... | Chose names and descriptions that makes sense for both
287 | | ... | nf_density and older tests.
288 | | ... | Note that with vlan_per_chain=False it is not a number of interfaces.
289 | | ... | At least not number of real interfaces, just number of aliases.
290 | | ... | This TODO applies also to all keywords with nf_chains argument.
291 | | ...
292 | | ... | *Arguments:*
293 | | ... | - dut - DUT node. Type: string
294 | | ... | - count - Number of chains. Type: integer
295 | | ... | - vlan_per_chain - Whether to create vlan subinterface for each chain.
296 | | ... |     Type: boolean
297 | | ... | - start - Id of first chain, allows adding chains during test.
298 | | ... |     Type: integer
299 | | ...
300 | | ... | *Example:*
301 | | ...
302 | | ... | \| Initialize layer dot1q on node \| DUT1 \| 3 \| True \| 2 \|
303 | | ...
304 | | [Arguments] | ${dut} | ${count}=${1} | ${vlan_per_chain}=${True}
305 | | ... | ${start}=${1}
306 | | ...
307 | | ${dut_str}= | Convert To Lowercase | ${dut}
308 | | :FOR | ${id} | IN RANGE | ${start} | ${count} + 1
309 | | | ${if1_index} | ${if2_index}= | Initialize layer dot1q on node for chain
310 | | | ... | dut=${dut} | id=${id} | vlan_per_chain=${vlan_per_chain}
311 | | | # First id results in non-None indices, after that _1_ are defined.
312 | | | ${if1_index}= | Set Variable If | '${if1_index}' == '${NONE}'
313 | | | ... | ${${dut_str}_dot1q_1_1} | ${if1_index}
314 | | | ${if2_index}= | Set Variable If | '${if2_index}' == '${NONE}'
315 | | | ... | ${${dut_str}_dot1q_1_2} | ${if2_index}
316 | | | Set Test Variable | ${${dut_str}_dot1q_${id}_1} | ${if1_index}
317 | | | Set Test Variable | ${${dut_str}_dot1q_${id}_2} | ${if2_index}
318
319 | Initialize layer dot1q
320 | | [Documentation]
321 | | ... | Dot1q interfaces and variables to be created on all DUT's interfaces.
322 | | ...
323 | | ... | *Arguments:*
324 | | ... | - count - Number of chains. Type: integer
325 | | ... | - vlan_per_chain - Whether to create vlan subinterface for each chain.
326 | | ... |     Type: boolean
327 | | ... | - start - Id of first chain, allows adding chains during test.
328 | | ... |     Type: integer
329 | | ...
330 | | ... | \| Initialize layer dot1q \| 3 \| True \| 2 \|
331 | | ...
332 | | [Arguments] | ${count}=${1} | ${vlan_per_chain}=${True} | ${start}=${1}
333 | | ...
334 | | :FOR | ${dut} | IN | @{duts}
335 | | | Initialize layer dot1q on node | ${dut} | count=${count}
336 | | | ... | vlan_per_chain=${vlan_per_chain} | start=${start}
337 | | Set Test Variable | ${prev_layer} | dot1q
338
339 | Initialize layer ip4vxlan on node
340 | | [Documentation]
341 | | ... | Setup VXLANoIPv4 between TG and DUTs and DUT to DUT by connecting
342 | | ... | physical and vxlan interfaces on each DUT. All interfaces are brought
343 | | ... | up. IPv4 addresses with prefix /24 are configured on interfaces
344 | | ... | towards TG. VXLAN sub-interfaces has same IPv4 address as interfaces.
345 | | ...
346 | | ... | *Arguments:*
347 | | ... | - dut - DUT node. Type: string
348 | | ... | - count - Number of vxlan interfaces. Type: integer
349 | | ... | - start - Id of first chain, allows adding chains during test.
350 | | ... |     Type: integer
351 | | ...
352 | | ... | *Example:*
353 | | ...
354 | | ... | \| Initialize layer ip4vxlan on node \| DUT1 \| 3 \| 2 \|
355 | | ...
356 | | [Arguments] | ${dut} | ${count}=${1} | ${start}=${1}
357 | | ...
358 | | ${dut_str}= | Convert To Lowercase | ${dut}
359 | | Run Keyword If | "${start}" == "1" | VPP Interface Set IP Address
360 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_1_1}
361 | | ... | 172.16.0.1 | 24
362 | | Run Keyword If | "${start}" == "1" | VPP Interface Set IP Address
363 | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_1_2}
364 | | ... | 172.26.0.1 | 24
365 | | :FOR | ${id} | IN RANGE | ${start} | ${count} + 1
366 | | | ${subnet}= | Evaluate | ${id} - 1
367 | | | ${vni}= | Evaluate | ${id} - 1
368 | | | ${ip4vxlan_1}= | Create VXLAN interface
369 | | | ... | ${nodes['${dut}']} | ${vni} | 172.16.0.1 | 172.17.${subnet}.2
370 | | | ${ip4vxlan_2}= | Create VXLAN interface
371 | | | ... | ${nodes['${dut}']} | ${vni} | 172.26.0.1 | 172.27.${subnet}.2
372 | | | ${prev_mac}= | Set Variable If | '${dut}' == 'DUT1'
373 | | | ... | ${tg_if1_mac} | ${dut1_if2_mac}
374 | | | ${next_mac}= | Set Variable If | '${dut}' == 'DUT1' and ${duts_count} == 2
375 | | | ... | ${dut2_if1_mac} | ${tg_if2_mac}
376 | | | VPP Add IP Neighbor
377 | | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${id}_1}
378 | | | ... | 172.16.${subnet}.2 | ${prev_mac}
379 | | | VPP Add IP Neighbor
380 | | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${id}_2}
381 | | | ... | 172.26.${subnet}.2 | ${next_mac}
382 | | | VPP Route Add
383 | | | ... | ${nodes['${dut}']} | 172.17.${subnet}.0 | 24
384 | | | ... | gateway=172.16.${subnet}.2
385 | | | ... | interface=${${dut_str}_${prev_layer}_${id}_1}
386 | | | VPP Route Add
387 | | | ... | ${nodes['${dut}']} | 172.27.${subnet}.0 | 24
388 | | | ... | gateway=172.26.${subnet}.2
389 | | | ... | interface=${${dut_str}_${prev_layer}_${id}_2}
390 | | | Set VXLAN Bypass
391 | | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${id}_1}
392 | | | Set VXLAN Bypass
393 | | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${id}_2}
394 | | | Set Test Variable
395 | | | ... | ${${dut_str}_ip4vxlan_${id}_1} | ${ip4vxlan_1}
396 | | | Set Test Variable
397 | | | ... | ${${dut_str}_ip4vxlan_${id}_2} | ${ip4vxlan_2}
398
399 | Initialize layer ip4vxlan
400 | | [Documentation]
401 | | ... | VXLAN interfaces and variables to be created on all DUT's interfaces.
402 | | ...
403 | | ... | *Arguments:*
404 | | ... | - count - Number of vxlan interfaces. Type: integer
405 | | ... | - start - Id of first chain, allows adding chains during test.
406 | | ... |     Type: integer
407 | | ...
408 | | ... | \| Initialize layer ip4vxlan \| 3 \| 2 \|
409 | | ...
410 | | [Arguments] | ${count}=${1} | ${start}=${1}
411 | | ...
412 | | :FOR | ${dut} | IN | @{duts}
413 | | | Initialize layer ip4vxlan on node | ${dut} | count=${count}
414 | | ... | start=${start}
415 | | Set Test Variable | ${prev_layer} | ip4vxlan
416
417 | Configure vhost interfaces
418 | | [Documentation]
419 | | ... | Create two Vhost-User interfaces on defined VPP node.
420 | | ...
421 | | ... | *Arguments:*
422 | | ... | - ${dut_node} - DUT node. Type: dictionary
423 | | ... | - ${sock1} - Socket path for first Vhost-User interface. Type: string
424 | | ... | - ${sock2} - Socket path for second Vhost-User interface. Type: string
425 | | ... | - ${vhost_if1} - Name of the first Vhost-User interface (Optional).
426 | | ... | Type: string
427 | | ... | - ${vhost_if2} - Name of the second Vhost-User interface (Optional).
428 | | ... | Type: string
429 | | ...
430 | | ... | _NOTE:_ This KW sets following test case variable:
431 | | ... | - ${${vhost_if1}} - First Vhost-User interface.
432 | | ... | - ${${vhost_if2}} - Second Vhost-User interface.
433 | | ...
434 | | ... | *Example:*
435 | | ...
436 | | ... | \| Configure vhost interfaces \
437 | | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \|
438 | | ... | \| Configure vhost interfaces \
439 | | ... | \| ${nodes['DUT2']} \| /tmp/sock1 \| /tmp/sock2 \| dut2_vhost_if1 \
440 | | ... | \| dut2_vhost_if2 \|
441 | | ...
442 | | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vhost_if1}=vhost_if1
443 | | ... | ${vhost_if2}=vhost_if2
444 | | ...
445 | | ${vhost_1}= | Vpp Create Vhost User Interface | ${dut_node} | ${sock1}
446 | | ${vhost_2}= | Vpp Create Vhost User Interface | ${dut_node} | ${sock2}
447 | | Set Interface State | ${dut_node} | ${vhost_1} | up
448 | | Set Interface State | ${dut_node} | ${vhost_2} | up
449 | | Set Test Variable | ${${vhost_if1}} | ${vhost_1}
450 | | Set Test Variable | ${${vhost_if2}} | ${vhost_2}