Skip to content

Commit 0fb673c

Browse files
updated ha_bgp_prefix_consistency.py to reflect all prefixes in the results
1 parent 32aca52 commit 0fb673c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples_extended/ha_bgp_prefix_consistency.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ def rule_ha_bgp_prefix_consistency(configuration, commands, device):
5353

5454
for neighbor, prefixes in neighbor_prefixes.items():
5555
if prefixes != reference_prefixes:
56+
reference_list = "\n - ".join(sorted(reference_prefixes))
57+
neighbor_list = "\n - ".join(sorted(prefixes))
5658
raise AssertionError(
5759
f"Prefixes from {neighbor} do not match {reference_neighbor}.\n"
58-
f"{reference_neighbor} has: {sorted(reference_prefixes)}\n"
59-
f"{neighbor} has: {sorted(prefixes)}"
60+
f"{reference_neighbor} has:\n - {reference_list}\n"
61+
f"{neighbor} has:\n - {neighbor_list}"
6062
)

0 commit comments

Comments
 (0)