Debian Codegraph @

tests/units/anta_tests/test_connectivity.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.connectivity.py."""
5
6 from __future__ import annotations
7
8 from typing import TYPE_CHECKING
9
10 from anta.result_manager.models import AntaTestStatus
11 from anta.tests.connectivity import VerifyLLDPNeighbors, VerifyReachability
12 from tests.units.anta_tests import test
13
14 if TYPE_CHECKING:
15 from tests.units.anta_tests import AntaUnitTestData
16
17 DATA: AntaUnitTestData = {
18 (VerifyReachability, "success-ip"): {
19 "inputs": {"hosts": [{"destination": "10.0.0.1", "source": "10.0.0.5"}, {"destination": "10.0.0.2", "source": "10.0.0.5"}]},
20 "eos_data": [
21 {
22 "messages": [
23 "PING 10.0.0.1 (10.0.0.1) from 10.0.0.5 : 72(100) bytes of data.\n 80 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.247 ms\n"
24 " 80 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.072 ms\n\n --- 10.0.0.1 ping statistics ---\n"
25 " 2 packets transmitted, 2 received, 0% packet loss, time 0ms\n rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms,"
26 " ipg/ewma 0.370/0.225 ms\n\n "
27 ]
28 },
29 {
30 "messages": [
31 "PING 10.0.0.2 (10.0.0.2) from 10.0.0.5 : 72(100) bytes of data.\n 80 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.247 ms\n"
32 " 80 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.072 ms\n\n --- 10.0.0.2 ping statistics ---\n"
33 " 2 packets transmitted, 2 received, 0% packet loss, time 0ms\n rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms,"
34 " ipg/ewma 0.370/0.225 ms\n\n "
35 ]
36 },
37 ],
38 "expected": {
39 "result": AntaTestStatus.SUCCESS,
40 "atomic_results": [
41 {
42 "result": AntaTestStatus.SUCCESS,
43 "description": "Destination 10.0.0.1 from 10.0.0.5 in VRF default",
44 },
45 {
46 "description": "Destination 10.0.0.2 from 10.0.0.5 in VRF default",
47 "result": AntaTestStatus.SUCCESS,
48 },
49 ],
50 },
51 },
52 (VerifyReachability, "success-expected-unreachable"): {
53 "eos_data": [
54 {
55 "messages": [
56 "PING 10.0.0.1 (10.0.0.1) from 10.0.0.5 : 72(100) bytes of data.\n\n --- 10.0.0.1 ping statistics ---\n"
57 " 2 packets transmitted, 0 received, 100% packet loss, time 10ms\n "
58 ]
59 }
60 ],
61 "inputs": {"hosts": [{"destination": "10.0.0.1", "source": "10.0.0.5", "reachable": False}]},
62 "expected": {
63 "result": AntaTestStatus.SUCCESS,
64 "atomic_results": [
65 {
66 "result": AntaTestStatus.SUCCESS,
67 "description": "Destination 10.0.0.1 from 10.0.0.5 in VRF default",
68 },
69 ],
70 },
71 },
72 (VerifyReachability, "success-ipv6"): {
73 "eos_data": [
74 {
75 "messages": [
76 "PING fd12:3456:789a:1::2(fd12:3456:789a:1::2) from fd12:3456:789a:1::1 : 52 data bytes\n 60 bytes from fd12:3456:789a:1::2:"
77 " icmp_seq=1 ttl=64 time=0.097 ms\n 60 bytes from fd12:3456:789a:1::2: icmp_seq=2 ttl=64 time=0.033 ms\n\n"
78 " --- fd12:3456:789a:1::2 ping statistics ---\n 2 packets transmitted, 2 received, 0% packet loss, time 0ms\n"
79 " rtt min/avg/max/mdev = 0.033/0.065/0.097/0.032 ms, ipg/ewma 0.148/0.089 ms\n "
80 ]
81 }
82 ],
83 "inputs": {"hosts": [{"destination": "fd12:3456:789a:1::2", "source": "fd12:3456:789a:1::1"}]},
84 "expected": {
85 "result": AntaTestStatus.SUCCESS,
86 "atomic_results": [
87 {
88 "result": AntaTestStatus.SUCCESS,
89 "description": "Destination fd12:3456:789a:1::2 from fd12:3456:789a:1::1 in VRF default",
90 },
91 ],
92 },
93 },
94 (VerifyReachability, "success-ipv6-vlan"): {
95 "eos_data": [
96 {
97 "messages": [
98 "PING fd12:3456:789a:1::2(fd12:3456:789a:1::2) 52 data bytes\n 60 bytes from fd12:3456:789a:1::2: "
99 "icmp_seq=1 ttl=64 time=0.094 ms\n 60 bytes from fd12:3456:789a:1::2: icmp_seq=2 ttl=64 time=0.027 ms\n\n"
100 " --- fd12:3456:789a:1::2 ping statistics ---\n 2 packets transmitted, 2 received, 0% packet loss,"
101 " time 0ms\n rtt min/avg/max/mdev = 0.027/0.060/0.094/0.033 ms, ipg/ewma 0.152/0.085 ms\n "
102 ]
103 }
104 ],
105 "inputs": {"hosts": [{"destination": "fd12:3456:789a:1::2", "source": "vl110"}]},
106 "expected": {
107 "result": AntaTestStatus.SUCCESS,
108 "atomic_results": [
109 {
110 "result": AntaTestStatus.SUCCESS,
111 "description": "Destination fd12:3456:789a:1::2 from Vlan110 in VRF default",
112 },
113 ],
114 },
115 },
116 (VerifyReachability, "success-interface"): {
117 "inputs": {"hosts": [{"destination": "10.0.0.1", "source": "Management0"}, {"destination": "10.0.0.2", "source": "Management0"}]},
118 "eos_data": [
119 {
120 "messages": [
121 "PING 10.0.0.1 (10.0.0.1) from 10.0.0.5 : 72(100) bytes of data.\n 80 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.247 ms\n"
122 " 80 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.072 ms\n\n --- 10.0.0.1 ping statistics ---\n"
123 " 2 packets transmitted, 2 received, 0% packet loss, time 0ms\n rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms,"
124 " ipg/ewma 0.370/0.225 ms\n\n "
125 ]
126 },
127 {
128 "messages": [
129 "PING 10.0.0.2 (10.0.0.2) from 10.0.0.5 : 72(100) bytes of data.\n 80 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.247 ms\n"
130 " 80 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.072 ms\n\n --- 10.0.0.2 ping statistics ---\n"
131 " 2 packets transmitted, 2 received, 0% packet loss, time 0ms\n rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms,"
132 " ipg/ewma 0.370/0.225 ms\n\n "
133 ]
134 },
135 ],
136 "expected": {
137 "result": AntaTestStatus.SUCCESS,
138 "atomic_results": [
139 {
140 "result": AntaTestStatus.SUCCESS,
141 "description": "Destination 10.0.0.1 from Management0 in VRF default",
142 },
143 {
144 "description": "Destination 10.0.0.2 from Management0 in VRF default",
145 "result": AntaTestStatus.SUCCESS,
146 },
147 ],
148 },
149 },
150 (VerifyReachability, "success-description"): {
151 "inputs": {
152 "hosts": [
153 {"description": "spine1 Ethernet49/1", "destination": "10.0.0.1", "source": "Management0"},
154 {"destination": "10.0.0.2", "source": "Management0"},
155 ]
156 },
157 "eos_data": [
158 {
159 "messages": [
160 """PING 10.0.0.1 (10.0.0.1) from 10.0.0.5 : 72(100) bytes of data.
161 80 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.247 ms
162 80 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.072 ms
163
164 --- 10.0.0.1 ping statistics ---
165 2 packets transmitted, 2 received, 0% packet loss, time 0ms
166 rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms, ipg/ewma 0.370/0.225 ms
167
168 """,
169 ],
170 },
171 {
172 "messages": [
173 """PING 10.0.0.2 (10.0.0.2) from 10.0.0.5 : 72(100) bytes of data.
174 80 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.247 ms
175 80 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.072 ms
176
177 --- 10.0.0.2 ping statistics ---
178 2 packets transmitted, 2 received, 0% packet loss, time 0ms
179 rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms, ipg/ewma 0.370/0.225 ms
180
181 """,
182 ],
183 },
184 ],
185 "expected": {
186 "result": AntaTestStatus.SUCCESS,
187 "atomic_results": [
188 {
189 "result": AntaTestStatus.SUCCESS,
190 "description": "Destination 10.0.0.1 (spine1 Ethernet49/1) from Management0 in VRF default",
191 },
192 {
193 "description": "Destination 10.0.0.2 from Management0 in VRF default",
194 "result": AntaTestStatus.SUCCESS,
195 },
196 ],
197 },
198 },
199 (VerifyReachability, "success-repeat"): {
200 "inputs": {"hosts": [{"destination": "10.0.0.1", "source": "Management0", "repeat": 1}]},
201 "eos_data": [
202 {
203 "messages": [
204 "PING 10.0.0.1 (10.0.0.1) from 10.0.0.5 : 72(100) bytes of data.\n 80 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.247 ms\n\n"
205 " --- 10.0.0.1 ping statistics ---\n 1 packets transmitted, 1 received, 0% packet loss, time 0ms\n"
206 " rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms, ipg/ewma 0.370/0.225 ms\n\n "
207 ]
208 }
209 ],
210 "expected": {
211 "result": AntaTestStatus.SUCCESS,
212 "atomic_results": [
213 {
214 "description": "Destination 10.0.0.1 from Management0 in VRF default",
215 "result": AntaTestStatus.SUCCESS,
216 },
217 ],
218 },
219 },
220 (VerifyReachability, "success-df-bit-size"): {
221 "inputs": {"hosts": [{"destination": "10.0.0.1", "source": "Management0", "repeat": 5, "size": 1500, "df_bit": True}]},
222 "eos_data": [
223 {
224 "messages": [
225 "PING 10.0.0.1 (10.0.0.1) from 172.20.20.6 : 1472(1500) bytes of data.\n 1480 bytes from 10.0.0.1: "
226 "icmp_seq=1 ttl=64 time=0.085 ms\n 1480 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.020 ms\n"
227 " 1480 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.019 ms\n 1480 bytes from 10.0.0.1:"
228 " icmp_seq=4 ttl=64 time=0.018 ms\n 1480 bytes from 10.0.0.1:"
229 " icmp_seq=5 ttl=64 time=0.017 ms\n\n --- 10.0.0.1 ping statistics ---\n 5 packets transmitted,"
230 " 5 received, 0% packet loss, time 0ms\n rtt min/avg/max/mdev = 0.017/0.031/0.085/0.026 ms, ipg/ewma 0.061/0.057 ms"
231 ]
232 }
233 ],
234 "expected": {
235 "result": AntaTestStatus.SUCCESS,
236 "atomic_results": [
237 {
238 "description": "Destination 10.0.0.1 from Management0 in VRF default",
239 "result": AntaTestStatus.SUCCESS,
240 },
241 ],
242 },
243 },
244 (VerifyReachability, "success-without-source"): {
245 "inputs": {"hosts": [{"destination": "10.0.0.1", "repeat": 1}]},
246 "eos_data": [
247 {
248 "messages": [
249 "PING 10.0.0.1 (10.0.0.1) : 72(100) bytes of data.\n 80 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.247 ms\n\n"
250 " --- 10.0.0.1 ping statistics ---\n 1 packets transmitted, 1 received, 0% packet loss, time 0ms\n"
251 " rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms, ipg/ewma 0.370/0.225 ms\n\n "
252 ]
253 }
254 ],
255 "expected": {
256 "result": AntaTestStatus.SUCCESS,
257 "atomic_results": [
258 {
259 "description": "Destination 10.0.0.1 in VRF default",
260 "result": AntaTestStatus.SUCCESS,
261 },
262 ],
263 },
264 },
265 (VerifyReachability, "failure-ip"): {
266 "inputs": {"hosts": [{"destination": "10.0.0.11", "source": "10.0.0.5"}, {"destination": "10.0.0.2", "source": "10.0.0.5"}]},
267 "eos_data": [
268 {
269 "messages": [
270 "ping: sendmsg: Network is unreachable\n ping: sendmsg: Network is unreachable\n "
271 "PING 10.0.0.11 (10.0.0.11) from 10.0.0.5 : 72(100) bytes of data.\n\n --- 10.0.0.11 ping statistics ---\n"
272 " 2 packets transmitted, 0 received, 100% packet loss, time 10ms\n\n\n "
273 ]
274 },
275 {
276 "messages": [
277 "PING 10.0.0.2 (10.0.0.2) from 10.0.0.5 : 72(100) bytes of data.\n 80 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.247 ms\n"
278 " 80 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.072 ms\n\n --- 10.0.0.2 ping statistics ---\n "
279 "2 packets transmitted, 2 received, 0% packet loss, time 0ms\n rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms,"
280 " ipg/ewma 0.370/0.225 ms\n\n "
281 ]
282 },
283 ],
284 "expected": {
285 "result": AntaTestStatus.FAILURE,
286 "messages": ["Destination 10.0.0.11 from 10.0.0.5 in VRF default - Unreachable"],
287 "atomic_results": [
288 {
289 "description": "Destination 10.0.0.11 from 10.0.0.5 in VRF default",
290 "result": AntaTestStatus.FAILURE,
291 "messages": ["Unreachable"],
292 },
293 {
294 "description": "Destination 10.0.0.2 from 10.0.0.5 in VRF default",
295 "result": AntaTestStatus.SUCCESS,
296 },
297 ],
298 },
299 },
300 (VerifyReachability, "failure-ipv6"): {
301 "eos_data": [
302 {
303 "messages": [
304 "PING fd12:3456:789a:1::2(fd12:3456:789a:1::2) from fd12:3456:789a:1::1 : 52 data bytes\n\n --- fd12:3456:789a:1::3 "
305 "ping statistics ---\n 2 packets transmitted, 0 received, 100% packet loss, time 10ms\n "
306 ]
307 }
308 ],
309 "inputs": {"hosts": [{"destination": "fd12:3456:789a:1::2", "source": "fd12:3456:789a:1::1"}]},
310 "expected": {
311 "result": AntaTestStatus.FAILURE,
312 "messages": ["Destination fd12:3456:789a:1::2 from fd12:3456:789a:1::1 in VRF default - Packet loss detected - Transmitted: 2 Received: 0"],
313 "atomic_results": [
314 {
315 "description": "Destination fd12:3456:789a:1::2 from fd12:3456:789a:1::1 in VRF default",
316 "result": AntaTestStatus.FAILURE,
317 "messages": ["Packet loss detected - Transmitted: 2 Received: 0"],
318 },
319 ],
320 },
321 },
322 (VerifyReachability, "failure-interface"): {
323 "inputs": {"hosts": [{"destination": "10.0.0.11", "source": "Management0"}, {"destination": "10.0.0.2", "source": "Management0"}]},
324 "eos_data": [
325 {
326 "messages": [
327 "ping: sendmsg: Network is unreachable\n ping: sendmsg: Network is unreachable\n "
328 "PING 10.0.0.11 (10.0.0.11) from 10.0.0.5 : 72(100) bytes of data.\n\n --- 10.0.0.11 ping statistics ---\n"
329 " 2 packets transmitted, 0 received, 100% packet loss, time 10ms\n\n\n "
330 ]
331 },
332 {
333 "messages": [
334 "PING 10.0.0.2 (10.0.0.2) from 10.0.0.5 : 72(100) bytes of data.\n 80 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.247 ms\n"
335 " 80 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.072 ms\n\n --- 10.0.0.2 ping statistics ---\n"
336 " 2 packets transmitted, 2 received, 0% packet loss, time 0ms\n rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms,"
337 " ipg/ewma 0.370/0.225 ms\n\n "
338 ]
339 },
340 ],
341 "expected": {
342 "result": AntaTestStatus.FAILURE,
343 "messages": ["Destination 10.0.0.11 from Management0 in VRF default - Unreachable"],
344 "atomic_results": [
345 {
346 "description": "Destination 10.0.0.11 from Management0 in VRF default",
347 "result": AntaTestStatus.FAILURE,
348 "messages": ["Unreachable"],
349 },
350 {
351 "description": "Destination 10.0.0.2 from Management0 in VRF default",
352 "result": AntaTestStatus.SUCCESS,
353 },
354 ],
355 },
356 },
357 (VerifyReachability, "failure-size"): {
358 "inputs": {"hosts": [{"destination": "10.0.0.1", "source": "Management0", "repeat": 5, "size": 1501, "df_bit": True}]},
359 "eos_data": [
360 {
361 "messages": [
362 "PING 10.0.0.1 (10.0.0.1) from 172.20.20.6 : 1473(1501) bytes of data.\n ping: local error: message too long, mtu=1500\n"
363 " ping: local error: message too long, mtu=1500\n"
364 " ping: local error: message too long, mtu=1500\n ping: local error: message too long, mtu=1500\n"
365 " ping: local error: message too long, mtu=1500\n\n --- 10.0.0.1 ping statistics ---\n"
366 " 5 packets transmitted, 0 received, +5 errors, 100% packet loss, time 40ms\n "
367 ]
368 }
369 ],
370 "expected": {
371 "result": AntaTestStatus.FAILURE,
372 "messages": ["Destination 10.0.0.1 from Management0 in VRF default - Packet loss detected - Transmitted: 5 Received: 0"],
373 "atomic_results": [
374 {
375 "description": "Destination 10.0.0.1 from Management0 in VRF default",
376 "result": AntaTestStatus.FAILURE,
377 "messages": ["Packet loss detected - Transmitted: 5 Received: 0"],
378 },
379 ],
380 },
381 },
382 (VerifyReachability, "failure-expected-unreachable"): {
383 "eos_data": [
384 {
385 "messages": [
386 "PING 10.0.0.1 (10.0.0.1) from 10.0.0.5 : 72(100) bytes of data.\n 80 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.247 ms\n"
387 " 80 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.072 ms\n\n --- 10.0.0.1 ping statistics ---\n"
388 " 2 packets transmitted, 2 received, 0% packet loss, time 0ms\n rtt min/avg/max/mdev = 0.072/0.159/0.247/0.088 ms,"
389 " ipg/ewma 0.370/0.225 ms\n\n "
390 ]
391 }
392 ],
393 "inputs": {"hosts": [{"destination": "10.0.0.1", "source": "10.0.0.5", "reachable": False}]},
394 "expected": {
395 "result": AntaTestStatus.FAILURE,
396 "messages": ["Destination 10.0.0.1 from 10.0.0.5 in VRF default - Destination is expected to be unreachable but found reachable"],
397 "atomic_results": [
398 {
399 "description": "Destination 10.0.0.1 from 10.0.0.5 in VRF default",
400 "result": AntaTestStatus.FAILURE,
401 "messages": ["Destination is expected to be unreachable but found reachable"],
402 },
403 ],
404 },
405 },
406 (VerifyReachability, "failure-without-source"): {
407 "inputs": {"hosts": [{"destination": "10.0.0.1", "repeat": 1}]},
408 "eos_data": [
409 {
410 "messages": [
411 "ping: sendmsg: Network is unreachable\n PING 10.0.0.1 (10.0.0.1) : 72(100) bytes of data.\n\n"
412 " --- 10.0.0.11 ping statistics ---\n "
413 "2 packets transmitted, 0 received, 100% packet loss, time 10ms\n\n "
414 ]
415 }
416 ],
417 "expected": {
418 "result": AntaTestStatus.FAILURE,
419 "messages": ["Destination 10.0.0.1 in VRF default - Unreachable"],
420 "atomic_results": [
421 {
422 "description": "Destination 10.0.0.1 in VRF default",
423 "result": AntaTestStatus.FAILURE,
424 "messages": ["Unreachable"],
425 },
426 ],
427 },
428 },
429 (VerifyReachability, "failure-network-unreachable"): {
430 "inputs": {"hosts": [{"destination": "10.0.0.1", "repeat": 1}]},
431 "eos_data": [{"messages": ["ping: connect: Network is unreachable\n"]}],
432 "expected": {
433 "result": AntaTestStatus.FAILURE,
434 "messages": ["Destination 10.0.0.1 in VRF default - Unreachable"],
435 "atomic_results": [
436 {
437 "description": "Destination 10.0.0.1 in VRF default",
438 "result": AntaTestStatus.FAILURE,
439 "messages": ["Unreachable"],
440 },
441 ],
442 },
443 },
444 (VerifyReachability, "success-network-unreachable-and-reachable-false"): {
445 "inputs": {"hosts": [{"destination": "10.0.0.1", "repeat": 1, "reachable": False}]},
446 "eos_data": [{"messages": ["ping: connect: Network is unreachable\n"]}],
447 "expected": {
448 "result": AntaTestStatus.SUCCESS,
449 "atomic_results": [
450 {
451 "description": "Destination 10.0.0.1 in VRF default",
452 "result": AntaTestStatus.SUCCESS,
453 },
454 ],
455 },
456 },
457 (VerifyReachability, "failure-source-ip-not-bind"): {
458 "inputs": {"hosts": [{"destination": "10.0.0.1", "source": "10.0.1.2", "repeat": 1}]},
459 "eos_data": [{"messages": ["ping: bind: Cannot assign requested address\n"]}],
460 "expected": {
461 "result": AntaTestStatus.FAILURE,
462 "messages": ["Destination 10.0.0.1 from 10.0.1.2 in VRF default - Error when executing ping: 'ping: bind: Cannot assign requested address'"],
463 "atomic_results": [
464 {
465 "description": "Destination 10.0.0.1 from 10.0.1.2 in VRF default",
466 "result": AntaTestStatus.FAILURE,
467 "messages": ["Error when executing ping: 'ping: bind: Cannot assign requested address'"],
468 },
469 ],
470 },
471 },
472 (VerifyLLDPNeighbors, "success"): {
473 "eos_data": [
474 {
475 "lldpNeighbors": {
476 "Ethernet1": {
477 "lldpNeighborInfo": [
478 {
479 "chassisIdType": "macAddress",
480 "chassisId": "001c.73a0.fc18",
481 "systemName": "DC1-SPINE1.local.com",
482 "neighborInterfaceInfo": {
483 "interfaceIdType": "interfaceName",
484 "interfaceId": "Ethernet1",
485 "interfaceId_v2": "Ethernet1",
486 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet1",
487 },
488 }
489 ]
490 },
491 "Ethernet2": {
492 "lldpNeighborInfo": [
493 {
494 "chassisIdType": "macAddress",
495 "chassisId": "001c.73f7.d138",
496 "systemName": "DC1-SPINE2.local.com",
497 "neighborInterfaceInfo": {
498 "interfaceIdType": "interfaceName",
499 "interfaceId": "Ethernet1",
500 "interfaceId_v2": "Ethernet1",
501 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet2",
502 },
503 }
504 ]
505 },
506 }
507 }
508 ],
509 "inputs": {
510 "require_fqdn": False,
511 "neighbors": [
512 {"port": "Ethernet1", "neighbor_device": "DC1-SPINE1", "neighbor_port": "Ethernet1"},
513 {"port": "Ethernet2", "neighbor_device": "DC1-SPINE2", "neighbor_port": "Ethernet1"},
514 ],
515 },
516 "expected": {
517 "result": AntaTestStatus.SUCCESS,
518 "atomic_results": [
519 {
520 "description": "Port: Ethernet1 Neighbor: DC1-SPINE1 Neighbor Port: Ethernet1",
521 "result": AntaTestStatus.SUCCESS,
522 },
523 {
524 "description": "Port: Ethernet2 Neighbor: DC1-SPINE2 Neighbor Port: Ethernet1",
525 "result": AntaTestStatus.SUCCESS,
526 },
527 ],
528 },
529 },
530 (VerifyLLDPNeighbors, "success-require-fqdn"): {
531 "eos_data": [
532 {
533 "lldpNeighbors": {
534 "Ethernet1": {
535 "lldpNeighborInfo": [
536 {
537 "systemName": "DC1-SPINE1.local.com",
538 "neighborInterfaceInfo": {
539 "interfaceId_v2": "Ethernet1",
540 },
541 }
542 ]
543 },
544 "Ethernet2": {
545 "lldpNeighborInfo": [
546 {
547 "systemName": "DC1-SPINE2.local.com",
548 "neighborInterfaceInfo": {
549 "interfaceId_v2": "Ethernet1",
550 },
551 }
552 ]
553 },
554 }
555 }
556 ],
557 "inputs": {
558 "require_fqdn": True,
559 "neighbors": [
560 {"port": "Ethernet1", "neighbor_device": "DC1-SPINE1.local.com", "neighbor_port": "Ethernet1"},
561 {"port": "Ethernet2", "neighbor_device": "DC1-SPINE2.local.com", "neighbor_port": "Ethernet1"},
562 ],
563 },
564 "expected": {
565 "result": AntaTestStatus.SUCCESS,
566 "atomic_results": [
567 {
568 "description": "Port: Ethernet1 Neighbor: DC1-SPINE1.local.com Neighbor Port: Ethernet1",
569 "result": AntaTestStatus.SUCCESS,
570 },
571 {
572 "description": "Port: Ethernet2 Neighbor: DC1-SPINE2.local.com Neighbor Port: Ethernet1",
573 "result": AntaTestStatus.SUCCESS,
574 },
575 ],
576 },
577 },
578 (VerifyLLDPNeighbors, "success-multiple-neighbors"): {
579 "eos_data": [
580 {
581 "lldpNeighbors": {
582 "Ethernet1": {
583 "lldpNeighborInfo": [
584 {
585 "chassisIdType": "macAddress",
586 "chassisId": "001c.73a0.fc18",
587 "systemName": "DC1-SPINE1.local.com",
588 "neighborInterfaceInfo": {
589 "interfaceIdType": "interfaceName",
590 "interfaceId": "Ethernet1",
591 "interfaceId_v2": "Ethernet1",
592 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet1",
593 },
594 },
595 {
596 "chassisIdType": "macAddress",
597 "chassisId": "001c.73f7.d138",
598 "systemName": "DC1-SPINE2.local.com",
599 "neighborInterfaceInfo": {
600 "interfaceIdType": "interfaceName",
601 "interfaceId": "Ethernet1",
602 "interfaceId_v2": "Ethernet1",
603 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet2",
604 },
605 },
606 ]
607 }
608 }
609 }
610 ],
611 "inputs": {"require_fqdn": False, "neighbors": [{"port": "Ethernet1", "neighbor_device": "DC1-SPINE2", "neighbor_port": "Ethernet1"}]},
612 "expected": {
613 "result": AntaTestStatus.SUCCESS,
614 "atomic_results": [
615 {
616 "description": "Port: Ethernet1 Neighbor: DC1-SPINE2 Neighbor Port: Ethernet1",
617 "result": AntaTestStatus.SUCCESS,
618 },
619 ],
620 },
621 },
622 (VerifyLLDPNeighbors, "success-external-lldp-neighbors"): {
623 "eos_data": [
624 {
625 "lldpNeighbors": {
626 "Ethernet1": {
627 "lldpNeighborInfo": [
628 {
629 "chassisIdType": "macAddress",
630 "chassisId": "001c.73a0.fc18",
631 "systemName": "dc1-leaf2-server1.local.com",
632 "neighborInterfaceInfo": {
633 "interfaceIdType": "interfaceName",
634 "interfaceId": "Ethernet1",
635 "interfaceId_v2": "iLO",
636 "interfaceDescription": "SERVER_dc1-leaf2-server1_Eth1",
637 },
638 },
639 ]
640 }
641 }
642 }
643 ],
644 "inputs": {"require_fqdn": False, "neighbors": [{"port": "Ethernet1", "neighbor_device": "dc1-leaf2-server1", "neighbor_port": "iLO"}]},
645 "expected": {
646 "result": AntaTestStatus.SUCCESS,
647 "atomic_results": [
648 {
649 "description": "Port: Ethernet1 Neighbor: dc1-leaf2-server1 Neighbor Port: iLO",
650 "result": AntaTestStatus.SUCCESS,
651 },
652 ],
653 },
654 },
655 (VerifyLLDPNeighbors, "success-dot-in-hostname-with-fqdn"): {
656 "eos_data": [
657 {
658 "lldpNeighbors": {
659 "Ethernet1": {
660 "lldpNeighborInfo": [
661 {
662 "chassisIdType": "macAddress",
663 "chassisId": "001c.73a0.fc18",
664 "systemName": "DC1.SPINE1.local.com",
665 "neighborInterfaceInfo": {
666 "interfaceIdType": "interfaceName",
667 "interfaceId": "Ethernet1",
668 "interfaceId_v2": "Ethernet1",
669 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet1",
670 },
671 }
672 ]
673 },
674 }
675 }
676 ],
677 "inputs": {
678 "neighbors": [
679 {"port": "Ethernet1", "neighbor_device": "DC1.SPINE1.local.com", "neighbor_port": "Ethernet1"},
680 ],
681 },
682 "expected": {
683 "result": AntaTestStatus.SUCCESS,
684 "atomic_results": [
685 {
686 "description": "Port: Ethernet1 Neighbor: DC1.SPINE1.local.com Neighbor Port: Ethernet1",
687 "result": AntaTestStatus.SUCCESS,
688 },
689 ],
690 },
691 },
692 (VerifyLLDPNeighbors, "success-dot-in-hostname"): {
693 "eos_data": [
694 {
695 "lldpNeighbors": {
696 "Ethernet1": {
697 "lldpNeighborInfo": [
698 {
699 "chassisIdType": "macAddress",
700 "chassisId": "001c.73a0.fc18",
701 "systemName": "DC1.SPINE1.local.com",
702 "neighborInterfaceInfo": {
703 "interfaceIdType": "interfaceName",
704 "interfaceId": "Ethernet1",
705 "interfaceId_v2": "Ethernet1",
706 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet1",
707 },
708 }
709 ]
710 },
711 }
712 }
713 ],
714 "inputs": {
715 "require_fqdn": False,
716 "neighbors": [
717 {"port": "Ethernet1", "neighbor_device": "DC1.SPINE1", "neighbor_port": "Ethernet1"},
718 ],
719 },
720 "expected": {
721 "result": AntaTestStatus.SUCCESS,
722 "atomic_results": [
723 {
724 "description": "Port: Ethernet1 Neighbor: DC1.SPINE1 Neighbor Port: Ethernet1",
725 "result": AntaTestStatus.SUCCESS,
726 },
727 ],
728 },
729 },
730 (VerifyLLDPNeighbors, "failure-port-not-configured"): {
731 "eos_data": [
732 {
733 "lldpNeighbors": {
734 "Ethernet1": {
735 "lldpNeighborInfo": [
736 {
737 "chassisIdType": "macAddress",
738 "chassisId": "001c.73a0.fc18",
739 "systemName": "DC1-SPINE1.local.com",
740 "neighborInterfaceInfo": {
741 "interfaceIdType": "interfaceName",
742 "interfaceId": "Ethernet1",
743 "interfaceId_v2": "Ethernet1",
744 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet1",
745 },
746 }
747 ]
748 }
749 }
750 }
751 ],
752 "inputs": {
753 "require_fqdn": False,
754 "neighbors": [
755 {"port": "Ethernet1", "neighbor_device": "DC1-SPINE1", "neighbor_port": "Ethernet1"},
756 {"port": "Ethernet2", "neighbor_device": "DC1-SPINE2", "neighbor_port": "Ethernet1"},
757 ],
758 },
759 "expected": {
760 "result": AntaTestStatus.FAILURE,
761 "messages": ["Port: Ethernet2 Neighbor: DC1-SPINE2 Neighbor Port: Ethernet1 - Port not found"],
762 "atomic_results": [
763 {
764 "description": "Port: Ethernet1 Neighbor: DC1-SPINE1 Neighbor Port: Ethernet1",
765 "result": AntaTestStatus.SUCCESS,
766 "messages": [],
767 },
768 {
769 "description": "Port: Ethernet2 Neighbor: DC1-SPINE2 Neighbor Port: Ethernet1",
770 "result": AntaTestStatus.FAILURE,
771 "messages": ["Port not found"],
772 },
773 ],
774 },
775 },
776 (VerifyLLDPNeighbors, "failure-no-neighbor"): {
777 "eos_data": [
778 {
779 "lldpNeighbors": {
780 "Ethernet1": {
781 "lldpNeighborInfo": [
782 {
783 "chassisIdType": "macAddress",
784 "chassisId": "001c.73a0.fc18",
785 "systemName": "DC1-SPINE1.local.com",
786 "neighborInterfaceInfo": {
787 "interfaceIdType": "interfaceName",
788 "interfaceId": "Ethernet1",
789 "interfaceId_v2": "Ethernet1",
790 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet1",
791 },
792 }
793 ]
794 },
795 "Ethernet2": {"lldpNeighborInfo": []},
796 }
797 }
798 ],
799 "inputs": {
800 "require_fqdn": False,
801 "neighbors": [
802 {"port": "Ethernet1", "neighbor_device": "DC1-SPINE1", "neighbor_port": "Ethernet1"},
803 {"port": "Ethernet2", "neighbor_device": "DC1-SPINE2", "neighbor_port": "Ethernet1"},
804 ],
805 },
806 "expected": {
807 "result": AntaTestStatus.FAILURE,
808 "messages": ["Port: Ethernet2 Neighbor: DC1-SPINE2 Neighbor Port: Ethernet1 - No LLDP neighbors"],
809 "atomic_results": [
810 {"description": "Port: Ethernet1 Neighbor: DC1-SPINE1 Neighbor Port: Ethernet1", "result": AntaTestStatus.SUCCESS, "messages": []},
811 {
812 "description": "Port: Ethernet2 Neighbor: DC1-SPINE2 Neighbor Port: Ethernet1",
813 "result": AntaTestStatus.FAILURE,
814 "messages": ["No LLDP neighbors"],
815 },
816 ],
817 },
818 },
819 (VerifyLLDPNeighbors, "failure-wrong-neighbor"): {
820 "eos_data": [
821 {
822 "lldpNeighbors": {
823 "Ethernet1": {
824 "lldpNeighborInfo": [
825 {
826 "chassisIdType": "macAddress",
827 "chassisId": "001c.73a0.fc18",
828 "systemName": "DC1-SPINE1.local.com",
829 "neighborInterfaceInfo": {
830 "interfaceIdType": "interfaceName",
831 "interfaceId": "Ethernet1",
832 "interfaceId_v2": "Ethernet1",
833 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet1",
834 },
835 }
836 ]
837 },
838 "Ethernet2": {
839 "lldpNeighborInfo": [
840 {
841 "chassisIdType": "macAddress",
842 "chassisId": "001c.73f7.d138",
843 "systemName": "DC1-SPINE2.local.com",
844 "neighborInterfaceInfo": {
845 "interfaceIdType": "interfaceName",
846 "interfaceId": "Ethernet2",
847 "interfaceId_v2": "Ethernet2",
848 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet2",
849 },
850 }
851 ]
852 },
853 }
854 }
855 ],
856 "inputs": {
857 "require_fqdn": False,
858 "neighbors": [
859 {"port": "Ethernet1", "neighbor_device": "DC1-SPINE1", "neighbor_port": "Ethernet1"},
860 {"port": "Ethernet2", "neighbor_device": "DC1-SPINE2", "neighbor_port": "Ethernet1"},
861 ],
862 },
863 "expected": {
864 "result": AntaTestStatus.FAILURE,
865 "messages": [
866 "Port: Ethernet2 Neighbor: DC1-SPINE2 Neighbor Port: Ethernet1 - Wrong LLDP neighbors: DC1-SPINE2.local.com/Ethernet2",
867 ],
868 "atomic_results": [
869 {
870 "description": "Port: Ethernet1 Neighbor: DC1-SPINE1 Neighbor Port: Ethernet1",
871 "result": AntaTestStatus.SUCCESS,
872 "messages": [],
873 },
874 {
875 "description": "Port: Ethernet2 Neighbor: DC1-SPINE2 Neighbor Port: Ethernet1",
876 "result": AntaTestStatus.FAILURE,
877 "messages": ["Wrong LLDP neighbors: DC1-SPINE2.local.com/Ethernet2"],
878 },
879 ],
880 },
881 },
882 (VerifyLLDPNeighbors, "failure-multiple"): {
883 "eos_data": [
884 {
885 "lldpNeighbors": {
886 "Ethernet1": {
887 "lldpNeighborInfo": [
888 {
889 "chassisIdType": "macAddress",
890 "chassisId": "001c.73a0.fc18",
891 "systemName": "DC1-SPINE1.local.com",
892 "neighborInterfaceInfo": {
893 "interfaceIdType": "interfaceName",
894 "interfaceId": "Ethernet2",
895 "interfaceId_v2": "Ethernet2",
896 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet1",
897 },
898 }
899 ]
900 },
901 "Ethernet2": {"lldpNeighborInfo": []},
902 }
903 }
904 ],
905 "inputs": {
906 "require_fqdn": False,
907 "neighbors": [
908 {"port": "Ethernet1", "neighbor_device": "DC1-SPINE1", "neighbor_port": "Ethernet1"},
909 {"port": "Ethernet2", "neighbor_device": "DC1-SPINE2", "neighbor_port": "Ethernet1"},
910 {"port": "Ethernet3", "neighbor_device": "DC1-SPINE3", "neighbor_port": "Ethernet1"},
911 ],
912 },
913 "expected": {
914 "result": AntaTestStatus.FAILURE,
915 "messages": [
916 "Port: Ethernet1 Neighbor: DC1-SPINE1 Neighbor Port: Ethernet1 - Wrong LLDP neighbors: DC1-SPINE1.local.com/Ethernet2",
917 "Port: Ethernet2 Neighbor: DC1-SPINE2 Neighbor Port: Ethernet1 - No LLDP neighbors",
918 "Port: Ethernet3 Neighbor: DC1-SPINE3 Neighbor Port: Ethernet1 - Port not found",
919 ],
920 "atomic_results": [
921 {
922 "description": "Port: Ethernet1 Neighbor: DC1-SPINE1 Neighbor Port: Ethernet1",
923 "result": AntaTestStatus.FAILURE,
924 "messages": ["Wrong LLDP neighbors: DC1-SPINE1.local.com/Ethernet2"],
925 },
926 {
927 "description": "Port: Ethernet2 Neighbor: DC1-SPINE2 Neighbor Port: Ethernet1",
928 "result": AntaTestStatus.FAILURE,
929 "messages": ["No LLDP neighbors"],
930 },
931 {
932 "description": "Port: Ethernet3 Neighbor: DC1-SPINE3 Neighbor Port: Ethernet1",
933 "result": AntaTestStatus.FAILURE,
934 "messages": ["Port not found"],
935 },
936 ],
937 },
938 },
939 (VerifyLLDPNeighbors, "failure-multiple-neighbors"): {
940 "eos_data": [
941 {
942 "lldpNeighbors": {
943 "Ethernet1": {
944 "lldpNeighborInfo": [
945 {
946 "chassisIdType": "macAddress",
947 "chassisId": "001c.73a0.fc18",
948 "systemName": "DC1-SPINE1.local.com",
949 "neighborInterfaceInfo": {
950 "interfaceIdType": "interfaceName",
951 "interfaceId": "Ethernet1",
952 "interfaceId_v2": "Ethernet1",
953 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet1",
954 },
955 },
956 {
957 "chassisIdType": "macAddress",
958 "chassisId": "001c.73f7.d138",
959 "systemName": "DC1-SPINE2.local.com",
960 "neighborInterfaceInfo": {
961 "interfaceIdType": "interfaceName",
962 "interfaceId": "Ethernet1",
963 "interfaceId_v2": "Ethernet1",
964 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet2",
965 },
966 },
967 ]
968 }
969 }
970 }
971 ],
972 "inputs": {"require_fqdn": False, "neighbors": [{"port": "Ethernet1", "neighbor_device": "DC1-SPINE3", "neighbor_port": "Ethernet1"}]},
973 "expected": {
974 "result": AntaTestStatus.FAILURE,
975 "messages": [
976 "Port: Ethernet1 Neighbor: DC1-SPINE3 Neighbor Port: Ethernet1 - Wrong LLDP neighbors: "
977 "DC1-SPINE1.local.com/Ethernet1, DC1-SPINE2.local.com/Ethernet1"
978 ],
979 "atomic_results": [
980 {
981 "description": "Port: Ethernet1 Neighbor: DC1-SPINE3 Neighbor Port: Ethernet1",
982 "result": AntaTestStatus.FAILURE,
983 "messages": ["Wrong LLDP neighbors: DC1-SPINE1.local.com/Ethernet1, DC1-SPINE2.local.com/Ethernet1"],
984 },
985 ],
986 },
987 },
988 (VerifyLLDPNeighbors, "failure-require-fqdn"): {
989 "eos_data": [
990 {
991 "lldpNeighbors": {
992 "Ethernet1": {
993 "lldpNeighborInfo": [
994 {
995 "systemName": "DC1-SPINE1.local.com",
996 "neighborInterfaceInfo": {
997 "interfaceId_v2": "Ethernet1",
998 },
999 }
1000 ]
1001 },
1002 "Ethernet2": {
1003 "lldpNeighborInfo": [
1004 {
1005 "systemName": "DC1-SPINE2.local.com",
1006 "neighborInterfaceInfo": {
1007 "interfaceId_v2": "Ethernet1",
1008 },
1009 }
1010 ]
1011 },
1012 }
1013 }
1014 ],
1015 "inputs": {
1016 "require_fqdn": True,
1017 "neighbors": [
1018 {"port": "Ethernet1", "neighbor_device": "DC1-SPINE1.domain.com", "neighbor_port": "Ethernet1"},
1019 {"port": "Ethernet2", "neighbor_device": "DC1-SPINE2.domain.com", "neighbor_port": "Ethernet1"},
1020 ],
1021 },
1022 "expected": {
1023 "result": AntaTestStatus.FAILURE,
1024 "messages": [
1025 "Port: Ethernet1 Neighbor: DC1-SPINE1.domain.com Neighbor Port: Ethernet1 - Wrong LLDP neighbors: DC1-SPINE1.local.com/Ethernet1",
1026 "Port: Ethernet2 Neighbor: DC1-SPINE2.domain.com Neighbor Port: Ethernet1 - Wrong LLDP neighbors: DC1-SPINE2.local.com/Ethernet1",
1027 ],
1028 "atomic_results": [
1029 {
1030 "description": "Port: Ethernet1 Neighbor: DC1-SPINE1.domain.com Neighbor Port: Ethernet1",
1031 "result": AntaTestStatus.FAILURE,
1032 "messages": ["Wrong LLDP neighbors: DC1-SPINE1.local.com/Ethernet1"],
1033 },
1034 {
1035 "description": "Port: Ethernet2 Neighbor: DC1-SPINE2.domain.com Neighbor Port: Ethernet1",
1036 "result": AntaTestStatus.FAILURE,
1037 "messages": ["Wrong LLDP neighbors: DC1-SPINE2.local.com/Ethernet1"],
1038 },
1039 ],
1040 },
1041 },
1042 (VerifyLLDPNeighbors, "failure-require-fqdn-mismatch"): {
1043 "eos_data": [
1044 {
1045 "lldpNeighbors": {
1046 "Ethernet1": {
1047 "lldpNeighborInfo": [
1048 {
1049 "systemName": "DC1-SPINE1",
1050 "neighborInterfaceInfo": {
1051 "interfaceId_v2": "Ethernet1",
1052 },
1053 }
1054 ]
1055 },
1056 "Ethernet2": {
1057 "lldpNeighborInfo": [
1058 {
1059 "systemName": "DC1-SPINE2.local.com",
1060 "neighborInterfaceInfo": {
1061 "interfaceId_v2": "Ethernet1",
1062 },
1063 }
1064 ]
1065 },
1066 }
1067 }
1068 ],
1069 "inputs": {
1070 "require_fqdn": True,
1071 "neighbors": [
1072 {"port": "Ethernet1", "neighbor_device": "DC1-SPINE1.domain.com", "neighbor_port": "Ethernet1"},
1073 ],
1074 },
1075 "expected": {
1076 "result": AntaTestStatus.FAILURE,
1077 "messages": ["Port: Ethernet1 Neighbor: DC1-SPINE1.domain.com Neighbor Port: Ethernet1 - Wrong LLDP neighbors: DC1-SPINE1/Ethernet1"],
1078 "atomic_results": [
1079 {
1080 "description": "Port: Ethernet1 Neighbor: DC1-SPINE1.domain.com Neighbor Port: Ethernet1",
1081 "result": AntaTestStatus.FAILURE,
1082 "messages": ["Wrong LLDP neighbors: DC1-SPINE1/Ethernet1"],
1083 },
1084 ],
1085 },
1086 },
1087 (VerifyLLDPNeighbors, "failure-external-lldp-neighbors"): {
1088 "eos_data": [
1089 {
1090 "lldpNeighbors": {
1091 "Ethernet1": {
1092 "lldpNeighborInfo": [
1093 {
1094 "chassisIdType": "macAddress",
1095 "chassisId": "001c.73a0.fc18",
1096 "systemName": "dc2-leaf2-server1.local.com",
1097 "neighborInterfaceInfo": {
1098 "interfaceIdType": "interfaceName",
1099 "interfaceId": "Ethernet1",
1100 "interfaceId_v2": "iLO",
1101 "interfaceDescription": "SERVER_dc1-leaf2-server1_Eth1",
1102 },
1103 },
1104 ]
1105 }
1106 }
1107 }
1108 ],
1109 "inputs": {"require_fqdn": False, "neighbors": [{"port": "Ethernet1", "neighbor_device": "dc1-leaf2-server1", "neighbor_port": "iLO"}]},
1110 "expected": {
1111 "result": AntaTestStatus.FAILURE,
1112 "messages": ["Port: Ethernet1 Neighbor: dc1-leaf2-server1 Neighbor Port: iLO - Wrong LLDP neighbors: dc2-leaf2-server1.local.com/iLO"],
1113 "atomic_results": [
1114 {
1115 "description": "Port: Ethernet1 Neighbor: dc1-leaf2-server1 Neighbor Port: iLO",
1116 "result": AntaTestStatus.FAILURE,
1117 "messages": ["Wrong LLDP neighbors: dc2-leaf2-server1.local.com/iLO"],
1118 },
1119 ],
1120 },
1121 },
1122 (VerifyLLDPNeighbors, "failure-dot-in-hostname"): {
1123 "eos_data": [
1124 {
1125 "lldpNeighbors": {
1126 "Ethernet1": {
1127 "lldpNeighborInfo": [
1128 {
1129 "chassisIdType": "macAddress",
1130 "chassisId": "001c.73a0.fc18",
1131 "systemName": "DC2.SPINE1.local.com",
1132 "neighborInterfaceInfo": {
1133 "interfaceIdType": "interfaceName",
1134 "interfaceId": "Ethernet1",
1135 "interfaceId_v2": "Ethernet1",
1136 "interfaceDescription": "P2P_LINK_TO_DC1-LEAF1A_Ethernet1",
1137 },
1138 }
1139 ]
1140 },
1141 }
1142 }
1143 ],
1144 "inputs": {
1145 "require_fqdn": False,
1146 "neighbors": [
1147 {"port": "Ethernet1", "neighbor_device": "DC1.SPINE1", "neighbor_port": "Ethernet1"},
1148 ],
1149 },
1150 "expected": {
1151 "result": AntaTestStatus.FAILURE,
1152 "messages": ["Port: Ethernet1 Neighbor: DC1.SPINE1 Neighbor Port: Ethernet1 - Wrong LLDP neighbors: DC2.SPINE1.local.com/Ethernet1"],
1153 "atomic_results": [
1154 {
1155 "description": "Port: Ethernet1 Neighbor: DC1.SPINE1 Neighbor Port: Ethernet1",
1156 "result": AntaTestStatus.FAILURE,
1157 "messages": ["Wrong LLDP neighbors: DC2.SPINE1.local.com/Ethernet1"],
1158 },
1159 ],
1160 },
1161 },
1162 }