Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NXOS: 'show access-lists summary' wrong parsing #749

Open
VladKh opened this issue Apr 20, 2023 · 3 comments
Open

NXOS: 'show access-lists summary' wrong parsing #749

VladKh opened this issue Apr 20, 2023 · 3 comments
Assignees

Comments

@VladKh
Copy link

VladKh commented Apr 20, 2023

Hi genie team,
There is a mistake in the show access-lists summary parser for NXOS in regular expression genie/libs/parser/nxos/show_acl.py line 366
p1 = re.compile(r'^(?P<type>[A-Z0-9]+) +ACL +(?P<name>\S+)$')
and 389
p = re.compile(r'^(?P<ip>[A-Z0-9]+) +ACL +(?P<name>\S+)\n +Total +ACEs +Configured: +(?P<total_configured>\d+)\n +Configured +on +interfaces:\n(?: +(?P<interface>\S+) +- +(?P<traffic>egress|ingress)( +\((?P<type>[\w\s]+)\))?\n)? +(?P<active>Active) +on +interfaces:(?:\n +(?P<interface2>\S+) +- +(?P<traffic2>egress|ingress)( +\((?P<type2>[\w\s]+)\))?)?')

The parser skips output like in the example:

# show access-lists summary

IPV4 ACL ALLOW-MGT
        Total ACEs Configured: 14
        Configured on interfaces:
                VTY         - ingress
        Active on interfaces:
                VTY         - ingress
IPV4 ACL CORP-CCRPRIV-INOUT
        Total ACEs Configured: 8
        Configured on interfaces:
                Vlan2007 - ingress (Router ACL)
                Vlan2007 - egress (Router ACL)
                Vlan2102 - ingress (Router ACL)
                Vlan2102 - egress (Router ACL)
        Active on interfaces:
                Vlan2007 - ingress (Router ACL)
                Vlan2007 - egress (Router ACL)
                Vlan2102 - ingress (Router ACL)
                Vlan2102 - egress (Router ACL)
IPV4 ACL L3-UPG-MEDIUM-TRUST        Statistics enabled
        fragments permit-all
        Total ACEs Configured: 10
        Configured on interfaces:
                Vlan2471 - egress (Router ACL)
                Vlan2473 - egress (Router ACL)
        Active on interfaces:
                Vlan2471 - egress (Router ACL)
                Vlan2473 - egress (Router ACL)
IPV4 ACL L3-UPG-UPG-HIGH-TRUST        Statistics enabled
        fragments permit-all
        Total ACEs Configured: 10
        Configured on interfaces:
                Vlan2472 - egress (Router ACL)
                Vlan2474 - egress (Router ACL)
        Active on interfaces:
                Vlan2472 - egress (Router ACL)
                Vlan2474 - egress (Router ACL)

Software:

BIOS: version 05.45
NXOS: version 9.3(9)
Hardware
cisco Nexus9000 C9336C-FX2 Chassis

Package                      Version
---------------------------- ---------
genie                        23.2
genie.libs.clean             23.2
genie.libs.conf              23.2
genie.libs.filetransferutils 23.2
genie.libs.health            23.2
genie.libs.ops               23.2
genie.libs.parser            23.2
genie.libs.sdk               23.2
pyats                        23.2
pyats.aereport               23.2
pyats.aetest                 23.2
pyats.async                  23.2
pyats.connections            23.2
pyats.datastructures         23.2
pyats.easypy                 23.2
pyats-genie-command-parse    1.3.5
pyats.kleenex                23.2
pyats.log                    23.2
pyats.reporter               23.2
pyats.results                23.2
pyats.tcl                    23.2
pyats.topology               23.2
pyats.utils                  23.2
@ParimiNeeraja
Copy link

Hi @VladKh ,

I Resolved this issue with your output, can you please check and confirm.

@VladKh
Copy link
Author

VladKh commented Jun 27, 2023

Hello @ParimiNeeraja,
Could you please share a link to the fix?

@ParimiNeeraja
Copy link

it will be available on 23.7 released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants