cisco.nxos icon indicating copy to clipboard operation
cisco.nxos copied to clipboard

facts/acls/acls.py - Improper Regex caused matching errors (port_protocol)

Open joshinryz opened this issue 2 years ago • 1 comments

SUMMARY

Line 114 of facts/acls/acls.py has: port_pro = re.search(r"(eq|lt|gt|neq) (\w*)", ace) this should be: port_pro = re.search(r"(eq|lt|gt|neq) (\S*)", ace)

Otherwise protocols such as "ftp-data" fail a "word" match as "ftp".

ISSUE TYPE
  • Bug Report
COMPONENT NAME

facts/acls/acls.py

ANSIBLE VERSION
facts/acls/acls.py
COLLECTION VERSION
cisco.nxos 3.1.0
STEPS TO REPRODUCE

Use gathered function on nxos.nxos_acls

joshinryz avatar Sep 08 '22 14:09 joshinryz

While we are on the topic. Non-sequence lines also get ignored. Should this be handled by the ACL module?

ip access-list test
  statistics per entry
  10 permit any any

The line statistics per entry is ignored as it doesnt have a seq to start it.

joshinryz avatar Sep 08 '22 15:09 joshinryz

@NilashishC do you have a sense when this may get worked on ?

joshinryz avatar Nov 08 '22 13:11 joshinryz

@joshinryz This is currently in progress. Thank you for your patience.

NilashishC avatar Nov 09 '22 06:11 NilashishC