Clean: Various libraries
[csit.git] / resources / libraries / robot / overlay / srv6.robot
1 # Copyright (c) 2018 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.SRv6
16 | Documentation | Keywords for SRv6 feature in VPP.
17
18 *** Keywords ***
19 | Configure SR LocalSID on DUT
20 | | [Documentation] | Create SRv6 LocalSID and binds it to a particular\
21 | | ... | behavior on the given DUT node.
22 | | ...
23 | | ... | *Arguments:*
24 | | ... | - dut_node - DUT node where to create localSID on. Type: dictionary
25 | | ... | - local_sid - LocalSID IPv6 address. Type: string
26 | | ... | - behavior - SRv6 LocalSID function. Type: string
27 | | ... | - interface - Interface name (Optional, default value: None; required
28 | | ... | for L2/L3 xconnects). Type: string
29 | | ... | - next_hop - Next hop IPv4/IPv6 address (Optional, default value:
30 | | ... | None; required for L3 xconnects). Type: string
31 | | ... | - fib_table - FIB table for IPv4/IPv6 lookup (Optional, default value:
32 | | ... | None; required for L3 routing). Type: string
33 | | ... | - out_if - Interface name of local interface for sending traffic
34 | | ... | towards the Service Function (Optional, default value: None;
35 | | ... | required for SRv6 endpoint to SR-unaware appliance). Type: string
36 | | ... | - in_if - Interface name of local interface receiving the traffic
37 | | ... | coming back from the Service Function (Optional, default value:
38 | | ... | None; required for SRv6 endpoint to SR-unaware appliance).
39 | | ... | Type: string
40 | | ... | - src_addr - Source address on the packets coming back on in_if
41 | | ... | interface (Optional, default value: None; required for SRv6 endpoint
42 | | ... | to SR-unaware appliance via static proxy). Type: string
43 | | ... | - sid_list - SID list (Optional, default value: []; required for SRv6
44 | | ... | endpoint to SR-unaware appliance via static proxy). Type: list
45 | | ...
46 | | ... | *Example:*
47 | | ...
48 | | ... | \| Configure SR LocalSID on DUT \| ${nodes['DUT1']} \| B:: \| end \|
49 | | ... | \| Configure SR LocalSID on DUT \| ${nodes['DUT1']} \| C:: \
50 | | ... | \| end.dx2 \| interface=GigabitEthernet0/10/0 \|
51 | | ... | \| Configure SR LocalSID on DUT \| ${nodes['DUT1']} \| D:: \
52 | | ... | \| end.dx4 \| interface=GigabitEthernet0/8/0 \| next_hop=10.0.0.1 \|
53 | | ... | \| Configure SR LocalSID on DUT \| ${nodes['DUT2']} \| E:: \
54 | | ... | \| end.dt6 \| fib_table=2 \|
55 | | ... | \| Configure SR LocalSID on DUT \| ${nodes['DUT2']} \| E:: \
56 | | ... | \| end.ad \| next_hop=10.0.0.1 \| out_if=DUT2_VHOST1 \
57 | | ... | \| in_if=DUT2_VHOST2 \|
58 | | ... | \| Configure SR LocalSID on DUT \| ${nodes['DUT2']} \| E:: \
59 | | ... | \| end.as \| next_hop=10.0.0.1 \| out_if=DUT2_VHOST1 \
60 | | ... | \| in_if=DUT2_VHOST2 \| src_addr=B:: \| sid_list=['C::', 'D::'] \|
61 | | ...
62 | | [Arguments] | ${dut_node} | ${local_sid} | ${behavior}
63 | | ... | ${interface}=${None} | ${next_hop}=${None} | ${fib_table}=${None}
64 | | ... | ${out_if}=${None} | ${in_if}=${None} | ${src_addr}=${None}
65 | | ... | @{sid_list}
66 | | ...
67 | | Configure SR LocalSID | ${dut_node} | ${local_sid} | ${behavior}
68 | | ... | interface=${interface} | next_hop=${next_hop} | fib_table=${fib_table}
69 | | ... | out_if=${out_if} | in_if=${in_if} | src_addr=${src_addr}
70 | | ... | sid_list=${sid_list}
71
72 | Delete SR LocalSID on DUT
73 | | [Documentation] | Delete SRv6 LocalSID on the given DUT node.
74 | | ...
75 | | ... | *Arguments:*
76 | | ... | - dut_node - DUT node where to delete localSID on. Type: dictionary
77 | | ... | - local_sid - LocalSID IPv6 address. Type: string
78 | | ...
79 | | ... | *Example:*
80 | | ...
81 | | ... | \| Delete SR LocalSID on DUT \| ${nodes['DUT1']} \| B:: \|
82 | | ...
83 | | [Arguments] | ${dut_node} | ${local_sid}
84 | | ...
85 | | Delete SR LocalSID | ${dut_node} | ${local_sid}
86
87 | Show SR LocalSIDs on DUT
88 | | [Documentation] | Show SRv6 LocalSIDs on the given DUT node.
89 | | ...
90 | | ... | *Arguments:*
91 | | ... | - dut_node - DUT node where to show SR localSIDs on. Type: dictionary
92 | | ...
93 | | ... | *Example:*
94 | | ...
95 | | ... | \| Show SR LocalSIDs on DUT \| ${nodes['DUT1']} \|
96 | | ...
97 | | [Arguments] | ${dut_node}
98 | | ...
99 | | Show SR LocalSIDs | ${dut_node}
100
101 | Configure SR Policy on DUT
102 | | [Documentation] | Create SRv6 policy on the given DUT node.
103 | | ...
104 | | ... | *Arguments:*
105 | | ... | - dut_node - DUT node where to create SRv6 policy on. Type: dictionary
106 | | ... | - bsid - BindingSID - local SID IPv6 address. Type: string
107 | | ... | - mode - Encapsulation / insertion mode. Type: string
108 | | ... | - sid_list - SID list. Type: list
109 | | ...
110 | | ... | *Example:*
111 | | ...
112 | | ... | \| Configure SR Policy on DUT \| ${nodes['DUT2']} \| A:: \| encap \
113 | | ... | \| B::\| C:: \|
114 | | ... | \| Configure SR Policy on DUT \| ${nodes['DUT2']} \| D:: \| insert \
115 | | ... | \| E::\| F:: \|
116 | | ...
117 | | [Arguments] | ${dut_node} | ${bsid} | ${mode} | @{sid_list}
118 | | ...
119 | | Configure SR Policy | ${dut_node} | ${bsid} | ${sid_list} | mode=${mode}
120
121 | Delete SR Policy on DUT
122 | | [Documentation] | Delete SRv6 policy on the given DUT node.
123 | | ...
124 | | ... | *Arguments:*
125 | | ... | - dut_node - DUT node where to delete SRv6 policy on. Type: dictionary
126 | | ... | - bsid - BindingSID - local SID IPv6 address. Type: string
127 | | ...
128 | | ... | *Example:*
129 | | ...
130 | | ... | \| Delete SR Policy on DUT \| ${nodes['DUT1']} \| A:: \|
131 | | ...
132 | | [Arguments] | ${dut_node} | ${bsid}
133 | | ...
134 | | Delete SR Policy | ${dut_node} | ${bsid}
135
136 | Show SR Policies on DUT
137 | | [Documentation] | Show SRv6 policies on the given DUT node.
138 | | ...
139 | | ... | *Arguments:*
140 | | ... | - dut_node - DUT node where to show SR policies on. Type: dictionary
141 | | ...
142 | | ... | *Example:*
143 | | ...
144 | | ... | \| Show SR Policies on DUT \| ${nodes['DUT1']} \|
145 | | ...
146 | | [Arguments] | ${dut_node}
147 | | ...
148 | | Show SR Policies | ${dut_node}
149
150 | Configure SR Steer on DUT
151 | | [Documentation] | Create SRv6 steering policy on the given DUT node.
152 | | ...
153 | | ... | *Arguments:*
154 | | ... | - dut_node - DUT node where to create SR steering policy on.
155 | | ... | Type: dictionary
156 | | ... | - mode - Mode of operation - L2 or L3. Type: string
157 | | ... | - bsid - BindingSID - local SID IPv6 address. Type: string
158 | | ... | - interface - Interface name (Optional, default value: None; required
159 | | ... | in case of L2 mode). Type: string
160 | | ... | - ip_addr - IPv4/IPv6 address (Optional, default value: None; required
161 | | ... | in case of L3 mode). Type: string
162 | | ... | - prefix - IP address prefix (Optional, default value: None; required
163 | | ... | for L3 mode). Type: integer
164 | | ...
165 | | ... | *Example:*
166 | | ...
167 | | ... | \| Configure SR Steer on DUT \| ${nodes['DUT1']} \| L2 \| B:: \
168 | | ... | \| interface=GigabitEthernet0/10/0 \|
169 | | ... | \| Configure SR Steer on DUT \| ${nodes['DUT1']} \| L3 \| C:: \
170 | | ... | \| ip_address=2001::1 \| prefix=64 \|
171 | | ...
172 | | [Arguments] | ${dut_node} | ${mode} | ${bsid}
173 | | ... | ${interface}=${None} | ${ip_addr}=${None} | ${prefix}=${None}
174 | | ...
175 | | Configure SR Steer | ${dut_node} | ${mode} | ${bsid}
176 | | ... | interface=${interface} | ip_addr=${ip_addr} | prefix=${prefix}
177
178 | Delete SR Steer on DUT
179 | | [Documentation] | Delete SRv6 steering policy on the given DUT node.
180 | | ...
181 | | ... | *Arguments:*
182 | | ... | - dut_node - DUT node where to delete SR steering policy on.
183 | | ... | Type: dictionary
184 | | ... | - mode - Mode of operation - L2 or L3. Type: string
185 | | ... | - bsid - BindingSID - local SID IPv6 address. Type: string
186 | | ... | - interface - Interface name (Optional, default value: None; required
187 | | ... | in case of L2 mode). Type: string
188 | | ... | - ip_addr - IPv4/IPv6 address (Optional, default value: None; required
189 | | ... | in case of L3 mode). Type: string
190 | | ... | - prefix - IP address prefix (Optional, default value: None; required
191 | | ... | for L3 mode). Type: integer
192 | | ...
193 | | ... | *Example:*
194 | | ...
195 | | ... | \| Delete SR Steer on DUT \| ${nodes['DUT1']} \| L2 \| B:: \
196 | | ... | \| interface=GigabitEthernet0/10/0 \|
197 | | ... | \| Delete SR Steer on DUT \| ${nodes['DUT1']} \| L3 \| C:: \
198 | | ... | \| ip_address=2001::1 \| prefix=64 \|
199 | | ...
200 | | [Arguments] | ${dut_node} | ${mode} | ${bsid}
201 | | ... | ${interface}=${None} | ${ip_addr}=${None} | ${prefix}=${None}
202 | | ...
203 | | Delete SR Steer | ${dut_node} | ${mode} | ${bsid}
204 | | ... | interface=${interface} | ip_addr=${ip_addr} | prefix=${prefix}
205
206 | Show SR Steering Policies on DUT
207 | | [Documentation] | Show SRv6 steering policies on the given DUT node.
208 | | ...
209 | | ... | *Arguments:*
210 | | ... | - dut_node - DUT node where to show SR steering policies on.
211 | | ... | Type: dictionary
212 | | ...
213 | | ... | *Example:*
214 | | ...
215 | | ... | \| Show SR Steering Policies on DUT \| ${nodes['DUT1']} \|
216 | | ...
217 | | [Arguments] | ${dut_node}
218 | | ...
219 | | Show SR Steering Policies | ${dut_node}
220
221 | Set SR Encaps Source Address on DUT
222 | | [Documentation] | Set SRv6 encapsulation source address on the given DUT
223 | | ... | node.
224 | | ...
225 | | ... | *Arguments:*
226 | | ... | - dut_node - DUT node where to set SRv6 encapsulation source address
227 | | ... | on. Type: dictionary
228 | | ... | - ip6_addr - Local SID IPv6 address. Type: string
229 | | ...
230 | | ... | *Example:*
231 | | ...
232 | | ... | \| Set SR Encaps Source Address on DUT \| ${nodes['DUT1']} \| B:: \|
233 | | ...
234 | | [Arguments] | ${dut_node} | ${ip6_addr}
235 | | ...
236 | | Set SR Encaps Source Address | ${dut_node} | ip6_addr=${ip6_addr}
237
238 | Show SR Policies on all DUTs
239 | | [Documentation] | Show SRv6 policies on all DUT nodes in topology.
240 | | ...
241 | | ... | *Arguments:*
242 | | ... | - nodes - Topology. Type: dictionary
243 | | ...
244 | | ... | *Example:*
245 | | ...
246 | | ... | \| Show SR Policies on all DUTs \| ${nodes} \|
247 | | ...
248 | | [Arguments] | ${nodes}
249 | | ...
250 | | ${duts}= | Get Matches | ${nodes} | DUT*
251 | | :FOR | ${dut} | IN | @{duts}
252 | | | Show SR Policies | ${nodes['${dut}']}
253
254 | Show SR Steering Policies on all DUTs
255 | | [Documentation] | Show SRv6 steering policies on all DUT nodes in topology.
256 | | ...
257 | | ... | *Arguments:*
258 | | ... | - nodes - Topology. Type: dictionary
259 | | ...
260 | | ... | *Example:*
261 | | ...
262 | | ... | \| Show SR Steering Policies on all DUTs \| ${nodes} \|
263 | | ...
264 | | [Arguments] | ${nodes}
265 | | ...
266 | | ${duts}= | Get Matches | ${nodes} | DUT*
267 | | :FOR | ${dut} | IN | @{duts}
268 | | | Show SR Steering Policies | ${nodes['${dut}']}
269
270 | Show SR LocalSIDs on all DUTs
271 | | [Documentation] | Show SRv6 LocalSIDs on all DUT nodes in topology.
272 | | ...
273 | | ... | *Arguments:*
274 | | ... | - nodes - Topology. Type: dictionary
275 | | ...
276 | | ... | *Example:*
277 | | ...
278 | | ... | \| Show SR LocalSIDs on all DUTs \| ${nodes} \|
279 | | ...
280 | | [Arguments] | ${nodes}
281 | | ...
282 | | ${duts}= | Get Matches | ${nodes} | DUT*
283 | | :FOR | ${dut} | IN | @{duts}
284 | | | Show SR LocalSIDs | ${nodes['${dut}']}
285
286 | Initialize IPv6 forwarding over SRv6 with encapsulation with '${n}' x SID '${prepos}' decapsulation in 3-node circular topology
287 | | [Documentation]
288 | | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
289 | | ... | topology. Get the interface MAC addresses and setup neighbours on all
290 | | ... | VPP interfaces. Setup IPv6 addresses on all interfaces. Set segment
291 | | ... | routing for IPv6 for required number of SIDs and configure IPv6 routes
292 | | ... | on both DUT nodes.
293 | | ...
294 | | VPP Interface Set IP Address
295 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
296 | | VPP Interface Set IP Address
297 | | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
298 | | VPP Interface Set IP Address
299 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
300 | | VPP Interface Set IP Address
301 | | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
302 | | Vpp All Ra Suppress Link Layer | ${nodes}
303 | | :FOR | ${number} | IN RANGE | 2 | ${dst_addr_nr}+2
304 | | | ${hexa_nr}= | Convert To Hex | ${number}
305 | | | VPP Add IP Neighbor | ${dut1}
306 | | | ... | ${dut1_if1} | ${tg_if1_ip6_subnet}${hexa_nr} | ${tg_if1_mac}
307 | | | VPP Add IP Neighbor | ${dut2}
308 | | | ... | ${dut2_if2} | ${tg_if2_ip6_subnet}${hexa_nr} | ${tg_if2_mac}
309 | | VPP Add IP Neighbor
310 | | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
311 | | VPP Add IP Neighbor
312 | | ... | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
313 | | ${sid1}= | Set Variable If
314 | | ... | "${n}" == "1" | ${dut2_sid1}
315 | | ... | "${n}" == "2" | ${dut2_sid1_1}
316 | | ${sid2}= | Set Variable If
317 | | ... | "${n}" == "1" | ${dut1_sid2}
318 | | ... | "${n}" == "2" | ${dut1_sid2_1}
319 | | Vpp Route Add | ${dut1} | ${sid1} | ${sid_prefix} | gateway=${dut2_if1_ip6}
320 | | ... | interface=${dut1_if2}
321 | | Vpp Route Add | ${dut2} | ${sid2} | ${sid_prefix} | gateway=${dut1_if2_ip6}
322 | | ... | interface=${dut2_if1}
323 # Configure SRv6 for direction0
324 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
325 | | @{sid_list_dir0}= | Run Keyword If | "${n}" == "1"
326 | | ... | Create List | ${dut2_sid1}
327 | | ... | ELSE IF | "${n}" == "2"
328 | | ... | Create List | ${dut2_sid1_1} | ${dut2_sid1_2}
329 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
330 | | ... | @{sid_list_dir0}
331 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
332 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
333 | | Run Keyword If | "${n}" == "1"
334 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.dx6
335 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
336 | | Run Keyword If | "${n}" == "2"
337 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_1} | end
338 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
339 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_2} | end.dx6
340 | | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2
341 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
342 | | ... | Vpp Route Add | ${dut2} | ${dut2_sid1_2} | ${sid_prefix}
343 | | ... | gateway=${tg_if2_ip6_subnet}2 | interface=${dut2_if2}
344 # Configure SRv6 for direction1
345 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
346 | | @{sid_list_dir1}= | Run Keyword If | "${n}" == "1"
347 | | ... | Create List | ${dut1_sid2}
348 | | ... | ELSE IF | "${n}" == "2"
349 | | ... | Create List | ${dut1_sid2_1} | ${dut1_sid2_2}
350 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
351 | | ... | @{sid_list_dir1}
352 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
353 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
354 | | Run Keyword If | "${n}" == "1"
355 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.dx6
356 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
357 | | Run Keyword If | "${n}" == "2"
358 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_1} | end
359 | | Run Keyword If | "${n}" == "2" and "${prepos}" != "without"
360 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_2} | end.dx6
361 | | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2
362 | | Run Keyword If | "${n}" == "2" and "${prepos}" == "without"
363 | | ... | Vpp Route Add | ${dut1} | ${dut1_sid2_2} | ${sid_prefix}
364 | | ... | gateway=${tg_if1_ip6_subnet}2 | interface=${dut1_if1}
365 | | Set interfaces in path up
366
367 | Initialize IPv6 forwarding over SRv6 with endpoint to SR-unaware Service Function via '${behavior}' behaviour in 3-node circular topology
368 | | [Documentation]
369 | | ... | Create pair of Memif interfaces on all defined VPP nodes. Set UP
370 | | ... | state on VPP interfaces in path on nodes in 3-node circular topology.
371 | | ... | Get the interface MAC addresses and setup neighbours on all VPP
372 | | ... | interfaces. Setup IPv6 addresses on all interfaces. Set segment
373 | | ... | routing for IPv6 with defined behaviour function and configure IPv6
374 | | ... | routes on both DUT nodes.
375 | | ...
376 | | ... | *Note:*
377 | | ... | KW uses test variable rxq_count_int set by KW Add worker threads
378 | | ... | and rxqueues to all DUTs
379 | | ...
380 | | ${sock1}= | Set Variable | memif-DUT1_CNF
381 | | ${sock2}= | Set Variable | memif-DUT2_CNF
382 | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock1}
383 | | ... | ${1} | dut1-memif-1-if1 | dut1-memif-1-if2 | ${rxq_count_int}
384 | | ... | ${rxq_count_int}
385 | | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if1}
386 | | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if2}
387 | | Set up memif interfaces on DUT node | ${dut2} | ${sock2} | ${sock2}
388 | | ... | ${1} | dut2-memif-1-if1 | dut2-memif-1-if2 | ${rxq_count_int}
389 | | ... | ${rxq_count_int}
390 | | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if1}
391 | | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if2}
392 | | :FOR | ${dut} | IN | @{duts}
393 | | | Show Memif | ${nodes['${dut}']}
394 | | VPP Interface Set IP Address
395 | | ... | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix}
396 | | VPP Interface Set IP Address
397 | | ... | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix}
398 | | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if1}
399 | | ... | ${dut1-memif-1-if1_ip6} | ${mem_prefix}
400 | | VPP Interface Set IP Address | ${dut1} | ${dut1-memif-1-if2}
401 | | ... | ${dut1-memif-1-if2_ip6} | ${mem_prefix}
402 | | VPP Interface Set IP Address
403 | | ... | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix}
404 | | VPP Interface Set IP Address
405 | | ... | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix}
406 | | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if1}
407 | | ... | ${dut2-memif-1-if1_ip6} | ${mem_prefix}
408 | | VPP Interface Set IP Address | ${dut2} | ${dut2-memif-1-if2}
409 | | ... | ${dut2-memif-1-if2_ip6} | ${mem_prefix}
410 | | Vpp All Ra Suppress Link Layer | ${nodes}
411 | | VPP Add IP Neighbor
412 | | ... | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac}
413 | | VPP Add IP Neighbor
414 | | ... | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac}
415 | | VPP Add IP Neighbor
416 | | ... | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}2 | ${tg_if1_mac}
417 | | VPP Add IP Neighbor
418 | | ... | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}2 | ${tg_if2_mac}
419 | | ${dut1-memif-1-if2_mac}= | Get Interface MAC | ${dut1} | memif2
420 | | ${dut2-memif-1-if2_mac}= | Get Interface MAC | ${dut2} | memif2
421 | | VPP Add IP Neighbor | ${dut1}
422 | | ... | ${dut1-memif-1-if1} | ${dut1_nh} | ${dut1-memif-1-if2_mac}
423 | | VPP Add IP Neighbor | ${dut2}
424 | | ... | ${dut2-memif-1-if1} | ${dut2_nh} | ${dut2-memif-1-if2_mac}
425 | | Vpp Route Add | ${dut1} | ${dut2_sid1} | ${sid_prefix}
426 | | ... | gateway=${dut2_if1_ip6} | interface=${dut1_if2}
427 | | Vpp Route Add | ${dut1} | ${out_sid2_1} | ${sid_prefix}
428 | | ... | gateway=${tg_if1_ip6_subnet}2 | interface=${dut1_if1}
429 | | Vpp Route Add | ${dut2} | ${dut1_sid2} | ${sid_prefix}
430 | | ... | gateway=${dut1_if2_ip6} | interface=${dut2_if1}
431 | | Vpp Route Add | ${dut2} | ${out_sid1_1} | ${sid_prefix}
432 | | ... | gateway=${tg_if2_ip6_subnet}2 | interface=${dut2_if2}
433 # Configure SRv6 for direction0 on DUT1
434 | | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1}
435 | | @{sid_list_dir0}= | Create List | ${dut2_sid1} | ${out_sid1_1}
436 | | ... | ${out_sid1_2}
437 | | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap
438 | | ... | @{sid_list_dir0}
439 | | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid}
440 | | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix}
441 # Configure SRv6 for direction1 on DUT2
442 | | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2}
443 | | @{sid_list_dir1}= | Create List | ${dut1_sid2} | ${out_sid2_1}
444 | | ... | ${out_sid2_2}
445 | | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap
446 | | ... | @{sid_list_dir1}
447 | | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid}
448 | | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix}
449 # Configure SRv6 for direction0 on DUT2
450 | | ${dut2_out_if}= | Get Interface Name | ${dut2} | memif1
451 | | ${dut2_in_if}= | Get Interface Name | ${dut2} | memif2
452 | | Remove Values From List | ${sid_list_dir0} | ${dut2_sid1}
453 | | Run Keyword If | "${behavior}" == "static_proxy"
454 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.as
455 | | ... | ${NONE} | ${dut2_nh} | ${NONE} | ${dut2_out_if} | ${dut2_in_if}
456 | | ... | ${dut1_sid1} | @{sid_list_dir0}
457 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
458 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.ad
459 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
460 | | ... | ELSE IF | "${behavior}" == "masquerading"
461 | | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.am
462 | | ... | next_hop=${dut2_nh} | out_if=${dut2_out_if} | in_if=${dut2_in_if}
463 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
464 # Configure SRv6 for direction1 on DUT1
465 | | ${dut1_out_if}= | Get Interface Name | ${dut1} | memif1
466 | | ${dut1_in_if}= | Get Interface Name | ${dut1} | memif2
467 | | Remove Values From List | ${sid_list_dir1} | ${dut1_sid2}
468 | | Run Keyword If | "${behavior}" == "static_proxy"
469 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.as
470 | | ... | ${NONE} | ${dut1_nh} | ${NONE} | ${dut1_out_if} | ${dut1_in_if}
471 | | ... | ${dut2_sid2} | @{sid_list_dir1}
472 | | ... | ELSE IF | "${behavior}" == "dynamic_proxy"
473 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.ad
474 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
475 | | ... | ELSE IF | "${behavior}" == "masquerading"
476 | | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.am
477 | | ... | next_hop=${dut1_nh} | out_if=${dut1_out_if} | in_if=${dut1_in_if}
478 | | ... | ELSE | Fail | Unsupported behaviour: ${behavior}
479 | | Set interfaces in path up