Services
ANTA catalog for services tests¶
Test functions related to the EOS various services settings
VerifyDNSLookup ¶
Bases: AntaTest
This class verifies the DNS (Domain name service) name to IP address resolution.
Expected Results
- success: The test will pass if a domain name is resolved to an IP address.
- failure: The test will fail if a domain name does not resolve to an IP address.
- error: This test will error out if a domain name is invalid.
Source code in anta/tests/services.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
VerifyDNSServers ¶
Bases: AntaTest
Verifies if the DNS (Domain Name Service) servers are correctly configured.
Expected Results
- success: The test will pass if the DNS server specified in the input is configured with the correct VRF and priority.
- failure: The test will fail if the DNS server is not configured or if the VRF and priority of the DNS server do not match the input.
Source code in anta/tests/services.py
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 |
|
Input ¶
Bases: Input
Inputs for the VerifyDNSServers test.
Source code in anta/tests/services.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
DnsServers ¶
Bases: BaseModel
DNS server details
Source code in anta/tests/services.py
111 112 113 114 115 116 117 118 119 |
|
priority
class-attribute
instance-attribute
¶
priority: int = Field(ge=0, le=4)
The priority of the DNS server from 0 to 4, lower is first.
server_address
instance-attribute
¶
server_address: Union[IPv4Address, IPv6Address]
The IPv4/IPv6 address of the DNS server.
vrf
class-attribute
instance-attribute
¶
vrf: str = 'default'
The VRF for the DNS server. Defaults to ‘default’ if not provided.
VerifyErrdisableRecovery ¶
Bases: AntaTest
Verifies the errdisable recovery reason, status, and interval.
Expected Results
- Success: The test will pass if the errdisable recovery reason status is enabled and the interval matches the input.
- Failure: The test will fail if the errdisable recovery reason is not found, the status is not enabled, or the interval does not match the input.
Source code in anta/tests/services.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
Input ¶
Bases: Input
Inputs for the VerifyErrdisableRecovery test.
Source code in anta/tests/services.py
157 158 159 160 161 162 163 164 165 166 167 168 169 |
|
ErrDisableReason ¶
Bases: BaseModel
Details of an errdisable reason
Source code in anta/tests/services.py
163 164 165 166 167 168 169 |
|
VerifyHostname ¶
Bases: AntaTest
Verifies the hostname of a device.
Expected results
- success: The test will pass if the hostname matches the provided input.
- failure: The test will fail if the hostname does not match the provided input.
Source code in anta/tests/services.py
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 |
|