ANTA catalog for connectivity tests
Tests¶
VerifyLLDPNeighbors ¶
Verifies the connection status of the specified LLDP (Link Layer Discovery Protocol) neighbors.
This test performs the following checks for each specified LLDP neighbor:
- Confirming matching ports on both local and neighboring devices.
- Ensuring compatibility of device names and interface identifiers.
- Verifying neighbor configurations match expected values per interface; extra neighbors are ignored.
Expected Results
- Success: The test will pass if all the provided LLDP neighbors are present and correctly connected to the specified port and device.
- Failure: The test will fail if any of the following conditions are met:
- The provided LLDP neighbor is not found in the LLDP table.
- The system name or port of the LLDP neighbor does not match the expected information.
Examples
anta.tests.connectivity:
- VerifyLLDPNeighbors:
neighbors:
- port: Ethernet1
neighbor_device: DC1-SPINE1
neighbor_port: Ethernet1
- port: Ethernet2
neighbor_device: DC1-SPINE2
neighbor_port: Ethernet1
Inputs¶
Name | Type | Description | Default |
---|---|---|---|
neighbors |
list[LLDPNeighbor]
|
List of LLDP neighbors.
|
- |
Neighbor |
type[Neighbor]
|
To maintain backward compatibility.
|
Neighbor
|
Source code in anta/tests/connectivity.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
VerifyReachability ¶
Test network reachability to one or many destination IP(s).
Expected Results
- Success: The test will pass if all destination IP(s) are reachable.
- Failure: The test will fail if one or many destination IP(s) are unreachable.
Examples
anta.tests.connectivity:
- VerifyReachability:
hosts:
- source: Management0
destination: 1.1.1.1
vrf: MGMT
df_bit: True
size: 100
- source: Management0
destination: 8.8.8.8
vrf: MGMT
df_bit: True
size: 100
Inputs¶
Source code in anta/tests/connectivity.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
Input models¶
Host ¶
Model for a remote host to ping.
Name | Type | Description | Default |
---|---|---|---|
destination |
IPv4Address
|
IPv4 address to ping.
|
- |
source |
IPv4Address | Interface
|
IPv4 address source IP or egress interface to use.
|
- |
vrf |
str
|
VRF context. Defaults to `default`.
|
'default'
|
repeat |
int
|
Number of ping repetition. Defaults to 2.
|
2
|
size |
int
|
Specify datagram size. Defaults to 100.
|
100
|
df_bit |
bool
|
Enable do not fragment bit in IP header. Defaults to False.
|
False
|
Source code in anta/input_models/connectivity.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
LLDPNeighbor ¶
LLDP (Link Layer Discovery Protocol) model representing the port details and neighbor information.
Source code in anta/input_models/connectivity.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
Neighbor ¶
Alias for the LLDPNeighbor model to maintain backward compatibility.
When initialized, it will emit a deprecation warning and call the LLDPNeighbor model.
TODO: Remove this class in ANTA v2.0.0.
__init__ ¶
__init__(**data: Any) -> None
Source code in anta/input_models/connectivity.py
76 77 78 79 80 81 82 83 |
|
Source code in anta/input_models/connectivity.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|