Skip to content

Commit

Permalink
Update acl_facts to render data correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-m-sullivan committed Oct 25, 2024
1 parent 6ba5a52 commit 902fdfc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelogs/fragments/acl_facts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- iosxr_acls facts - Fix incorrect rendering of some acl facts causing errors.
6 changes: 5 additions & 1 deletion plugins/module_utils/network/iosxr/facts/acls/acls.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,13 @@ def _parse_match_options(rendered_ace, ace_queue):
# In this case, we add the whole unprocessed ACE
# to a key called `line` and send it back
if len(ace_queue) > 0:
for x in split_ace[1:]:
m1 = re.match(r"\(\d", x)
m2 = re.match(r"\w+\)", x)
if m1 or m2:
split_ace.remove(x)
rendered_ace = {
"sequence": sequence,
"line": " ".join(split_ace[1:]),
}

return utils.remove_empties(rendered_ace)

0 comments on commit 902fdfc

Please sign in to comment.