Skip to content

Commit

Permalink
Fix(eos_designs): Ensure consistent ordering of underlay route-maps (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausHolbechArista authored Aug 25, 2023
1 parent ea87d70 commit 32f09d1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def _underlay_filter_peer_as_route_maps_asns(self) -> list:
if self.shared_utils.underlay_filter_peer_as is False:
return []

# using set comprehension with `{}`
return list({link["peer_bgp_as"] for link in self._underlay_links if link["type"] == "underlay_p2p"})
# using set comprehension with `{}` to remove duplicates and then run natural_sort to convert to list.
return natural_sort({link["peer_bgp_as"] for link in self._underlay_links if link["type"] == "underlay_p2p"})

@cached_property
def _underlay_links(self) -> list:
Expand Down

0 comments on commit 32f09d1

Please sign in to comment.