Debian Codegraph @

tests/units/anta_tests/test_avt.py

raw symbols SCIP
1 # Copyright (c) 2023-2026 Arista Networks, Inc.
2 # Use of this source code is governed by the Apache License 2.0
3 # that can be found in the LICENSE file.
4 """Tests for anta.tests.avt.py."""
5
6 from __future__ import annotations
7
8 import sys
9 from typing import TYPE_CHECKING, Any
10
11 from anta.models import AntaTest
12 from anta.result_manager.models import AntaTestStatus
13 from anta.tests.avt import VerifyAVTPathHealth, VerifyAVTRole, VerifyAVTSpecificPath
14 from tests.units.anta_tests import test
15
16 if TYPE_CHECKING:
17 from tests.units.anta_tests import AntaUnitTestData
18
19 DATA: AntaUnitTestData = {
20 (VerifyAVTPathHealth, "success"): {
21 "eos_data": [
22 {
23 "vrfs": {
24 "data": {
25 "avts": {
26 "DATA-AVT-POLICY-DEFAULT": {
27 "avtPaths": {
28 "direct:9": {"flags": {"directPath": True, "valid": True, "active": True}},
29 "direct:10": {"flags": {"directPath": True, "valid": True, "active": True}},
30 "direct:1": {"flags": {"directPath": True, "valid": True, "active": True}},
31 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
32 }
33 }
34 }
35 },
36 "guest": {
37 "avts": {
38 "GUEST-AVT-POLICY-DEFAULT": {
39 "avtPaths": {
40 "direct:10": {"flags": {"directPath": True, "valid": True, "active": True}},
41 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
42 }
43 }
44 }
45 },
46 "default": {
47 "avts": {
48 "CONTROL-PLANE-PROFILE": {
49 "avtPaths": {
50 "direct:9": {"flags": {"directPath": True, "valid": True, "active": True}},
51 "direct:10": {"flags": {"directPath": True, "valid": True, "active": True}},
52 "direct:1": {"flags": {"directPath": True, "valid": True, "active": True}},
53 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
54 }
55 },
56 "DEFAULT-AVT-POLICY-DEFAULT": {
57 "avtPaths": {
58 "direct:10": {"flags": {"directPath": True, "valid": True, "active": True}},
59 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
60 }
61 },
62 }
63 },
64 }
65 }
66 ],
67 "inputs": {},
68 "expected": {"result": AntaTestStatus.SUCCESS},
69 },
70 (VerifyAVTPathHealth, "failure-avt-not-configured"): {
71 "eos_data": [{"vrfs": {}}],
72 "inputs": {},
73 "expected": {"result": AntaTestStatus.FAILURE, "messages": ["Adaptive virtual topology paths are not configured"]},
74 },
75 (VerifyAVTPathHealth, "failure-not-active-path"): {
76 "eos_data": [
77 {
78 "vrfs": {
79 "data": {
80 "avts": {
81 "DATA-AVT-POLICY-DEFAULT": {
82 "avtPaths": {
83 "direct:9": {"flags": {"directPath": True, "valid": True, "active": True}},
84 "direct:10": {"flags": {"directPath": True, "valid": True, "active": True}},
85 "direct:1": {"flags": {"directPath": True, "valid": True, "active": True}},
86 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
87 }
88 }
89 }
90 },
91 "guest": {
92 "avts": {
93 "GUEST-AVT-POLICY-DEFAULT": {
94 "avtPaths": {
95 "direct:10": {"flags": {"directPath": True, "valid": True, "active": False}},
96 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
97 }
98 }
99 }
100 },
101 "default": {
102 "avts": {
103 "CONTROL-PLANE-PROFILE": {
104 "avtPaths": {
105 "direct:9": {"flags": {"directPath": True, "valid": True, "active": True}},
106 "direct:10": {"flags": {"directPath": True, "valid": True, "active": True}},
107 "direct:1": {"flags": {"directPath": True, "valid": True, "active": False}},
108 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
109 }
110 },
111 "DEFAULT-AVT-POLICY-DEFAULT": {
112 "avtPaths": {
113 "direct:10": {"flags": {"directPath": True, "valid": True, "active": False}},
114 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
115 }
116 },
117 }
118 },
119 }
120 }
121 ],
122 "inputs": {},
123 "expected": {
124 "result": AntaTestStatus.FAILURE,
125 "messages": [
126 "VRF: guest Profile: GUEST-AVT-POLICY-DEFAULT AVT path: direct:10 - Not active",
127 "VRF: default Profile: CONTROL-PLANE-PROFILE AVT path: direct:1 - Not active",
128 "VRF: default Profile: DEFAULT-AVT-POLICY-DEFAULT AVT path: direct:10 - Not active",
129 ],
130 },
131 },
132 (VerifyAVTPathHealth, "failure-invalid-path"): {
133 "eos_data": [
134 {
135 "vrfs": {
136 "data": {
137 "avts": {
138 "DATA-AVT-POLICY-DEFAULT": {
139 "avtPaths": {
140 "direct:9": {"flags": {"directPath": True, "valid": True, "active": True}},
141 "direct:10": {"flags": {"directPath": True, "valid": False, "active": True}},
142 "direct:1": {"flags": {"directPath": True, "valid": True, "active": True}},
143 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
144 }
145 }
146 }
147 },
148 "guest": {
149 "avts": {
150 "GUEST-AVT-POLICY-DEFAULT": {
151 "avtPaths": {
152 "direct:10": {"flags": {"directPath": True, "valid": True, "active": True}},
153 "direct:8": {"flags": {"directPath": True, "valid": False, "active": True}},
154 }
155 }
156 }
157 },
158 "default": {
159 "avts": {
160 "CONTROL-PLANE-PROFILE": {
161 "avtPaths": {
162 "direct:9": {"flags": {"directPath": True, "valid": True, "active": True}},
163 "direct:10": {"flags": {"directPath": True, "valid": False, "active": True}},
164 "direct:1": {"flags": {"directPath": True, "valid": True, "active": True}},
165 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
166 }
167 },
168 "DEFAULT-AVT-POLICY-DEFAULT": {
169 "avtPaths": {
170 "direct:10": {"flags": {"directPath": True, "valid": True, "active": True}},
171 "direct:8": {"flags": {"directPath": True, "valid": False, "active": True}},
172 }
173 },
174 }
175 },
176 }
177 }
178 ],
179 "inputs": {},
180 "expected": {
181 "result": AntaTestStatus.FAILURE,
182 "messages": [
183 "VRF: data Profile: DATA-AVT-POLICY-DEFAULT AVT path: direct:10 - Invalid",
184 "VRF: guest Profile: GUEST-AVT-POLICY-DEFAULT AVT path: direct:8 - Invalid",
185 "VRF: default Profile: CONTROL-PLANE-PROFILE AVT path: direct:10 - Invalid",
186 "VRF: default Profile: DEFAULT-AVT-POLICY-DEFAULT AVT path: direct:8 - Invalid",
187 ],
188 },
189 },
190 (VerifyAVTPathHealth, "failure-not-active-and-invalid"): {
191 "eos_data": [
192 {
193 "vrfs": {
194 "data": {
195 "avts": {
196 "DATA-AVT-POLICY-DEFAULT": {
197 "avtPaths": {
198 "direct:9": {"flags": {"directPath": True, "valid": True, "active": True}},
199 "direct:10": {"flags": {"directPath": True, "valid": False, "active": False}},
200 "direct:1": {"flags": {"directPath": True, "valid": True, "active": False}},
201 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
202 }
203 }
204 }
205 },
206 "guest": {
207 "avts": {
208 "GUEST-AVT-POLICY-DEFAULT": {
209 "avtPaths": {
210 "direct:10": {"flags": {"directPath": True, "valid": False, "active": True}},
211 "direct:8": {"flags": {"directPath": True, "valid": False, "active": False}},
212 }
213 }
214 }
215 },
216 "default": {
217 "avts": {
218 "CONTROL-PLANE-PROFILE": {
219 "avtPaths": {
220 "direct:9": {"flags": {"directPath": True, "valid": True, "active": True}},
221 "direct:10": {"flags": {"directPath": True, "valid": False, "active": False}},
222 "direct:1": {"flags": {"directPath": True, "valid": True, "active": True}},
223 "direct:8": {"flags": {"directPath": True, "valid": True, "active": True}},
224 }
225 },
226 "DEFAULT-AVT-POLICY-DEFAULT": {
227 "avtPaths": {
228 "direct:10": {"flags": {"directPath": True, "valid": True, "active": False}},
229 "direct:8": {"flags": {"directPath": True, "valid": False, "active": False}},
230 }
231 },
232 }
233 },
234 }
235 }
236 ],
237 "inputs": {},
238 "expected": {
239 "result": AntaTestStatus.FAILURE,
240 "messages": [
241 "VRF: data Profile: DATA-AVT-POLICY-DEFAULT AVT path: direct:10 - Invalid and not active",
242 "VRF: data Profile: DATA-AVT-POLICY-DEFAULT AVT path: direct:1 - Not active",
243 "VRF: guest Profile: GUEST-AVT-POLICY-DEFAULT AVT path: direct:10 - Invalid",
244 "VRF: guest Profile: GUEST-AVT-POLICY-DEFAULT AVT path: direct:8 - Invalid and not active",
245 "VRF: default Profile: CONTROL-PLANE-PROFILE AVT path: direct:10 - Invalid and not active",
246 "VRF: default Profile: DEFAULT-AVT-POLICY-DEFAULT AVT path: direct:10 - Not active",
247 "VRF: default Profile: DEFAULT-AVT-POLICY-DEFAULT AVT path: direct:8 - Invalid and not active",
248 ],
249 },
250 },
251 (VerifyAVTSpecificPath, "success"): {
252 "eos_data": [
253 {
254 "vrfs": {
255 "default": {
256 "avts": {
257 "DEFAULT-AVT-POLICY-CONTROL-PLANE": {
258 "avtPaths": {
259 "direct:10": {
260 "flags": {"directPath": True, "valid": True, "active": True},
261 "nexthopAddr": "10.101.255.1",
262 "destination": "10.101.255.2",
263 },
264 "direct:9": {
265 "flags": {"directPath": True, "valid": True, "active": True},
266 "nexthopAddr": "10.101.255.1",
267 "destination": "10.101.255.2",
268 },
269 "multihop:1": {
270 "flags": {"directPath": False, "valid": True, "active": True},
271 "nexthopAddr": "10.101.255.1",
272 "destination": "10.101.255.2",
273 },
274 "multihop:3": {
275 "flags": {"directPath": False, "valid": True, "active": True},
276 "nexthopAddr": "10.101.255.1",
277 "destination": "10.101.255.2",
278 },
279 }
280 }
281 }
282 },
283 "data": {
284 "avts": {
285 "DATA-AVT-POLICY-CONTROL-PLANE": {
286 "avtPaths": {
287 "direct:10": {
288 "flags": {"directPath": True, "valid": True, "active": True},
289 "nexthopAddr": "10.101.255.1",
290 "destination": "10.101.255.1",
291 },
292 "direct:9": {
293 "flags": {"directPath": True, "valid": True, "active": True},
294 "nexthopAddr": "10.101.255.1",
295 "destination": "10.101.255.1",
296 },
297 "direct:8": {
298 "flags": {"directPath": True, "valid": True, "active": True},
299 "nexthopAddr": "10.101.255.2",
300 "destination": "10.101.255.1",
301 },
302 "multihop:1": {
303 "flags": {"directPath": False, "valid": True, "active": True},
304 "nexthopAddr": "10.101.255.2",
305 "destination": "10.101.255.1",
306 },
307 "multihop:3": {
308 "flags": {"directPath": False, "valid": True, "active": True},
309 "nexthopAddr": "10.101.255.2",
310 "destination": "10.101.255.1",
311 },
312 }
313 }
314 }
315 },
316 }
317 }
318 ],
319 "inputs": {
320 "avt_paths": [
321 {"avt_name": "DEFAULT-AVT-POLICY-CONTROL-PLANE", "destination": "10.101.255.2", "next_hop": "10.101.255.1", "path_type": "multihop"},
322 {"avt_name": "DATA-AVT-POLICY-CONTROL-PLANE", "vrf": "data", "destination": "10.101.255.1", "next_hop": "10.101.255.2", "path_type": "direct"},
323 {"avt_name": "DATA-AVT-POLICY-CONTROL-PLANE", "vrf": "data", "destination": "10.101.255.1", "next_hop": "10.101.255.2"},
324 ]
325 },
326 "expected": {
327 "result": AntaTestStatus.SUCCESS,
328 "atomic_results": [
329 {
330 "description": "AVT: DEFAULT-AVT-POLICY-CONTROL-PLANE VRF: default Destination: 10.101.255.2 Next-hop: 10.101.255.1 Path Type: multihop",
331 "result": AntaTestStatus.SUCCESS,
332 },
333 {
334 "description": "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.2 Path Type: direct",
335 "result": AntaTestStatus.SUCCESS,
336 },
337 {
338 "description": "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.2",
339 "result": AntaTestStatus.SUCCESS,
340 },
341 ],
342 },
343 },
344 (VerifyAVTSpecificPath, "success-with-description"): {
345 "eos_data": [
346 {
347 "vrfs": {
348 "VRF1": {
349 "avts": {
350 "DEFAULT-AVT-POLICY-CONTROL-PLANE": {
351 "avtPaths": {
352 "multihop:1": {
353 "flags": {"directPath": False, "valid": True, "active": True},
354 "nexthopAddr": "10.101.255.1",
355 "destination": "10.101.255.2",
356 },
357 }
358 }
359 }
360 },
361 },
362 }
363 ],
364 "inputs": {
365 "avt_paths": [
366 {
367 "avt_name": "DEFAULT-AVT-POLICY-CONTROL-PLANE",
368 "vrf": "VRF1",
369 "description": "High-volume traffic path for Customer VRF1",
370 "destination": "10.101.255.2",
371 "next_hop": "10.101.255.1",
372 "path_type": "multihop",
373 },
374 ]
375 },
376 "expected": {
377 "result": AntaTestStatus.SUCCESS,
378 "atomic_results": [
379 {
380 "description": "AVT: DEFAULT-AVT-POLICY-CONTROL-PLANE (High-volume traffic path for Customer VRF1) VRF: VRF1 "
381 "Destination: 10.101.255.2 Next-hop: 10.101.255.1 Path Type: multihop",
382 "result": AntaTestStatus.SUCCESS,
383 },
384 ],
385 },
386 },
387 (VerifyAVTSpecificPath, "failure-no-peer"): {
388 "eos_data": [{"vrfs": {}}],
389 "inputs": {
390 "avt_paths": [
391 {"avt_name": "MGMT-AVT-POLICY-DEFAULT", "vrf": "default", "destination": "10.101.255.2", "next_hop": "10.101.255.1", "path_type": "multihop"},
392 {"avt_name": "DATA-AVT-POLICY-CONTROL-PLANE", "vrf": "data", "destination": "10.101.255.1", "next_hop": "10.101.255.2", "path_type": "multihop"},
393 ]
394 },
395 "expected": {
396 "result": AntaTestStatus.FAILURE,
397 "messages": [
398 "AVT: MGMT-AVT-POLICY-DEFAULT VRF: default Destination: 10.101.255.2 Next-hop: 10.101.255.1 Path Type: multihop - No AVT path configured",
399 "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.2 Path Type: multihop - No AVT path configured",
400 ],
401 "atomic_results": [
402 {
403 "description": "AVT: MGMT-AVT-POLICY-DEFAULT VRF: default Destination: 10.101.255.2 Next-hop: 10.101.255.1 Path Type: multihop",
404 "result": AntaTestStatus.FAILURE,
405 "messages": ["No AVT path configured"],
406 },
407 {
408 "description": "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.2 Path Type: multihop",
409 "result": AntaTestStatus.FAILURE,
410 "messages": ["No AVT path configured"],
411 },
412 ],
413 },
414 },
415 (VerifyAVTSpecificPath, "failure-path_type_check_true"): {
416 "eos_data": [
417 {
418 "vrfs": {
419 "default": {
420 "avts": {
421 "DEFAULT-AVT-POLICY-CONTROL-PLANE": {
422 "avtPaths": {
423 "direct:10": {
424 "flags": {"directPath": True, "valid": True, "active": True},
425 "nexthopAddr": "10.101.255.1",
426 "destination": "10.101.255.2",
427 },
428 "direct:9": {
429 "flags": {"directPath": True, "valid": True, "active": True},
430 "nexthopAddr": "10.101.255.1",
431 "destination": "10.101.255.2",
432 },
433 }
434 }
435 }
436 },
437 "data": {
438 "avts": {
439 "DATA-AVT-POLICY-CONTROL-PLANE": {
440 "avtPaths": {
441 "direct:10": {
442 "flags": {"directPath": True, "valid": True, "active": True},
443 "nexthopAddr": "10.101.255.1",
444 "destination": "10.101.255.3",
445 },
446 "direct:9": {
447 "flags": {"directPath": True, "valid": True, "active": True},
448 "nexthopAddr": "10.101.255.1",
449 "destination": "10.101.255.3",
450 },
451 }
452 }
453 }
454 },
455 }
456 }
457 ],
458 "inputs": {
459 "avt_paths": [
460 {
461 "avt_name": "DEFAULT-AVT-POLICY-CONTROL-PLANE",
462 "vrf": "default",
463 "destination": "10.101.255.2",
464 "next_hop": "10.101.255.11",
465 "path_type": "multihop",
466 },
467 {"avt_name": "DATA-AVT-POLICY-CONTROL-PLANE", "vrf": "data", "destination": "10.101.255.1", "next_hop": "10.101.255.21", "path_type": "direct"},
468 ]
469 },
470 "expected": {
471 "result": AntaTestStatus.FAILURE,
472 "messages": [
473 "AVT: DEFAULT-AVT-POLICY-CONTROL-PLANE VRF: default Destination: 10.101.255.2 Next-hop: 10.101.255.11 Path Type: multihop - Path not found",
474 "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.21 Path Type: direct - Path not found",
475 ],
476 "atomic_results": [
477 {
478 "description": "AVT: DEFAULT-AVT-POLICY-CONTROL-PLANE VRF: default Destination: 10.101.255.2 Next-hop: 10.101.255.11 Path Type: multihop",
479 "result": AntaTestStatus.FAILURE,
480 "messages": ["Path not found"],
481 },
482 {
483 "description": "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.21 Path Type: direct",
484 "result": AntaTestStatus.FAILURE,
485 "messages": ["Path not found"],
486 },
487 ],
488 },
489 },
490 (VerifyAVTSpecificPath, "failure-path_type_check_false"): {
491 "eos_data": [
492 {
493 "vrfs": {
494 "default": {
495 "avts": {
496 "DEFAULT-AVT-POLICY-CONTROL-PLANE": {
497 "avtPaths": {
498 "direct:10": {
499 "flags": {"directPath": True, "valid": True, "active": True},
500 "nexthopAddr": "10.101.255.1",
501 "destination": "10.101.255.2",
502 },
503 "direct:9": {
504 "flags": {"directPath": True, "valid": True, "active": True},
505 "nexthopAddr": "10.101.255.1",
506 "destination": "10.101.255.2",
507 },
508 }
509 }
510 }
511 },
512 "data": {
513 "avts": {
514 "DATA-AVT-POLICY-CONTROL-PLANE": {
515 "avtPaths": {
516 "direct:10": {
517 "flags": {"directPath": True, "valid": True, "active": True},
518 "nexthopAddr": "10.101.255.1",
519 "destination": "10.101.255.3",
520 },
521 "direct:9": {
522 "flags": {"directPath": True, "valid": True, "active": True},
523 "nexthopAddr": "10.101.255.1",
524 "destination": "10.101.255.3",
525 },
526 }
527 }
528 }
529 },
530 }
531 }
532 ],
533 "inputs": {
534 "avt_paths": [
535 {"avt_name": "DEFAULT-AVT-POLICY-CONTROL-PLANE", "vrf": "default", "destination": "10.101.255.2", "next_hop": "10.101.255.11"},
536 {"avt_name": "DATA-AVT-POLICY-CONTROL-PLANE", "vrf": "data", "destination": "10.101.255.1", "next_hop": "10.101.255.21"},
537 ]
538 },
539 "expected": {
540 "result": AntaTestStatus.FAILURE,
541 "messages": [
542 "AVT: DEFAULT-AVT-POLICY-CONTROL-PLANE VRF: default Destination: 10.101.255.2 Next-hop: 10.101.255.11 - Path not found",
543 "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.21 - Path not found",
544 ],
545 "atomic_results": [
546 {
547 "description": "AVT: DEFAULT-AVT-POLICY-CONTROL-PLANE VRF: default Destination: 10.101.255.2 Next-hop: 10.101.255.11",
548 "result": AntaTestStatus.FAILURE,
549 "messages": ["Path not found"],
550 },
551 {
552 "description": "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.21",
553 "result": AntaTestStatus.FAILURE,
554 "messages": ["Path not found"],
555 },
556 ],
557 },
558 },
559 (VerifyAVTSpecificPath, "failure-incorrect-path"): {
560 "eos_data": [
561 {
562 "vrfs": {
563 "default": {
564 "avts": {
565 "DEFAULT-AVT-POLICY-CONTROL-PLANE": {
566 "avtPaths": {
567 "multihop:3": {
568 "flags": {"directPath": False, "valid": False, "active": True},
569 "nexthopAddr": "10.101.255.1",
570 "destination": "10.101.255.2",
571 }
572 }
573 }
574 }
575 },
576 "data": {
577 "avts": {
578 "DATA-AVT-POLICY-CONTROL-PLANE": {
579 "avtPaths": {
580 "direct:10": {
581 "flags": {"directPath": True, "valid": False, "active": True},
582 "nexthopAddr": "10.101.255.1",
583 "destination": "10.101.255.1",
584 },
585 "direct:9": {
586 "flags": {"directPath": True, "valid": True, "active": False},
587 "nexthopAddr": "10.101.255.1",
588 "destination": "10.101.255.1",
589 },
590 "direct:8": {
591 "flags": {"directPath": True, "valid": False, "active": False},
592 "nexthopAddr": "10.101.255.2",
593 "destination": "10.101.255.1",
594 },
595 "multihop:1": {
596 "flags": {"directPath": False, "valid": True, "active": True},
597 "nexthopAddr": "10.101.255.2",
598 "destination": "10.101.255.1",
599 },
600 "multihop:3": {
601 "flags": {"directPath": False, "valid": True, "active": True},
602 "nexthopAddr": "10.101.255.2",
603 "destination": "10.101.255.1",
604 },
605 }
606 }
607 }
608 },
609 }
610 }
611 ],
612 "inputs": {
613 "avt_paths": [
614 {
615 "avt_name": "DEFAULT-AVT-POLICY-CONTROL-PLANE",
616 "vrf": "default",
617 "destination": "10.101.255.2",
618 "next_hop": "10.101.255.1",
619 "path_type": "multihop",
620 },
621 {"avt_name": "DATA-AVT-POLICY-CONTROL-PLANE", "vrf": "data", "destination": "10.101.255.1", "next_hop": "10.101.255.1", "path_type": "direct"},
622 ]
623 },
624 "expected": {
625 "result": AntaTestStatus.FAILURE,
626 "messages": [
627 "AVT: DEFAULT-AVT-POLICY-CONTROL-PLANE VRF: default Destination: 10.101.255.2 Next-hop: 10.101.255.1 Path Type: multihop - "
628 "Incorrect path multihop:3 - Valid: False Active: True",
629 "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.1 Path Type: direct - Incorrect path direct:10 - "
630 "Valid: False Active: True",
631 "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.1 Path Type: direct - Incorrect path direct:9 - "
632 "Valid: True Active: False",
633 ],
634 "atomic_results": [
635 {
636 "description": "AVT: DEFAULT-AVT-POLICY-CONTROL-PLANE VRF: default Destination: 10.101.255.2 Next-hop: 10.101.255.1 Path Type: multihop",
637 "result": AntaTestStatus.FAILURE,
638 "messages": ["Incorrect path multihop:3 - Valid: False Active: True"],
639 },
640 {
641 "description": "AVT: DATA-AVT-POLICY-CONTROL-PLANE VRF: data Destination: 10.101.255.1 Next-hop: 10.101.255.1 Path Type: direct",
642 "result": AntaTestStatus.FAILURE,
643 "messages": ["Incorrect path direct:10 - Valid: False Active: True", "Incorrect path direct:9 - Valid: True Active: False"],
644 },
645 ],
646 },
647 },
648 (VerifyAVTRole, "success"): {"eos_data": [{"role": "edge"}], "inputs": {"role": "edge"}, "expected": {"result": AntaTestStatus.SUCCESS}},
649 (VerifyAVTRole, "failure-incorrect-role"): {
650 "eos_data": [{"role": "transit"}],
651 "inputs": {"role": "edge"},
652 "expected": {"result": AntaTestStatus.FAILURE, "messages": ["AVT role mismatch - Expected: edge Actual: transit"]},
653 },
654 }