Skip to content

Commit

Permalink
fix: get_route_maps not working starting 202211
Browse files Browse the repository at this point in the history
Let's stop doing crappy hack, and use a proper query instead :)
  • Loading branch information
kpetremann committed Oct 3, 2024
1 parent 9150238 commit 7117a46
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions _modules/sonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,16 +811,7 @@ def get_route_maps():
"FABRIC-IN",
]
"""
# for now we only need the name of the route-maps, ? is a small hack
route_map = __salt__["cmd.run"]("show route-map ?", "").split("\n")

# doing some cleaning
del route_map[2]
del route_map[1]
del route_map[0]
route_map = [r.strip() for r in route_map]

return route_map
return __salt__["cmd.run"]("show route-map | awk '/route-map/ {print $2}' | sort -u").split("\n")


def _upload_candidate_bgp_config(remote_tmpfile, content):
Expand Down

0 comments on commit 7117a46

Please sign in to comment.