ANTA catalog for Router path-selection tests
VerifyPathsHealth ¶
Verifies the path and telemetry state of all paths under router path-selection.
The expected states are ‘IPsec established’, ‘Resolved’ for path and ‘active’ for telemetry.
Expected Results
- Success: The test will pass if all path states under router path-selection are either ‘IPsec established’ or ‘Resolved’ and their telemetry state as ‘active’.
- Failure: The test will fail if router path-selection is not configured or if any path state is not ‘IPsec established’ or ‘Resolved’, or the telemetry state is ‘inactive’.
Examples
anta.tests.path_selection:
- VerifyPathsHealth:
Source code in anta/tests/path_selection.py
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 |
|
VerifySpecificPath ¶
Verifies the path and telemetry state of a specific path for an IPv4 peer under router path-selection.
The expected states are ‘IPsec established’, ‘Resolved’ for path and ‘active’ for telemetry.
Expected Results
- Success: The test will pass if the path state under router path-selection is either ‘IPsec established’ or ‘Resolved’ and telemetry state as ‘active’.
- Failure: The test will fail if router path-selection is not configured or if the path state is not ‘IPsec established’ or ‘Resolved’, or if the telemetry state is ‘inactive’.
Examples
anta.tests.path_selection:
- VerifySpecificPath:
paths:
- peer: 10.255.0.1
path_group: internet
source_address: 100.64.3.2
destination_address: 100.64.1.2
Inputs¶
Name | Type | Description | Default |
---|---|---|---|
paths |
list[RouterPath]
|
List of router paths to verify.
|
- |
RouterPath¶
Name | Type | Description | Default |
---|---|---|---|
peer |
IPv4Address
|
Static peer IPv4 address.
|
- |
path_group |
str
|
Router path group name.
|
- |
source_address |
IPv4Address
|
Source IPv4 address of path.
|
- |
destination_address |
IPv4Address
|
Destination IPv4 address of path.
|
- |
Source code in anta/tests/path_selection.py
75 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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|