Skip to content

Commit

Permalink
Add template for ASA show acl brief (#1772)
Browse files Browse the repository at this point in the history
* Added Cisco ASA show_access-list_brief command

* Fix index and tests

---------

Co-authored-by: SASCHA SCHWARZ <sascha.schwarz1@kyndryl.com>
  • Loading branch information
jmcgill298 and SaschaSchwarzK authored Jul 20, 2024
1 parent d01d767 commit ee792df
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ntc_templates/templates/cisco_asa_show_access-list_brief.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Value Filldown ACL_NAME (\S+)
Value Filldown ACL_TOTAL_ELEMENTS (\d+)
Value Filldown ACL_NAME_HASH (0x\w+)
Value Required LINE_HASH (\w{8})
Value GROUP_HASH (\w{8})
Value COUNTER (\w{8})
Value LAST_HIT (\w{8})

Start
^access\-list\s+${ACL_NAME};\s+${ACL_TOTAL_ELEMENTS}\s+elements;\s+name\s+hash:\s+${ACL_NAME_HASH}\s*
^${LINE_HASH}\s+${GROUP_HASH}\s+${COUNTER}\s+${LAST_HIT}\s* -> Record
^\s*$$
^.* -> Error

EOF
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ cisco_asa_show_port-channel_summary.textfsm, .*, cisco_asa, sh[[ow]] po[[rt-chan
cisco_asa_show_running-config_ipsec.textfsm, .*, cisco_asa, sh[[ow]] ru[[nning-config]] ips[[ec]]
cisco_asa_show_cpu_usage_detailed.textfsm, .*, cisco_asa, sh[[ow]] cpu u[[sage]] d[[etailed]]
cisco_asa_show_interface_ip_brief.textfsm, .*, cisco_asa, sh[[ow]] int[[erface]] ip br[[ief]]
cisco_asa_show_access-list_brief.textfsm, .*, cisco_asa, sh[[ow]] ac[[cess-list]] (\S+ )?br[[ief]]
cisco_asa_show_interface_detail.textfsm, .*, cisco_asa, sh[[ow]] int[[erface]] d[[etail]]
cisco_asa_show_crypto_ipsec_sa.textfsm, .*, cisco_asa, sh[[ow]] (?:cry[[pto]] ip[[sec]]|ipsec) sa
cisco_asa_show_resource_usage.textfsm, .*, cisco_asa, sh[[ow]] res[[ource]] u[[sage]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
access-list global-acl-test-show-acl-brief; 3 elements; name hash: 0xccfef45c
06228509 d0a2680b 00006049 6178289f
4c8c760a d0a2680b 00000cf5 6245930b
179f5b95 00000000 00000003 61695d26
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
parsed_sample:
- acl_name: "global-acl-test-show-acl-brief"
acl_total_elements: "3"
acl_name_hash: "0xccfef45c"
line_hash: "06228509"
group_hash: "d0a2680b"
counter: "00006049"
last_hit: "6178289f"
- acl_name: "global-acl-test-show-acl-brief"
acl_total_elements: "3"
acl_name_hash: "0xccfef45c"
line_hash: "4c8c760a"
group_hash: "d0a2680b"
counter: "00000cf5"
last_hit: "6245930b"
- acl_name: "global-acl-test-show-acl-brief"
acl_total_elements: "3"
acl_name_hash: "0xccfef45c"
line_hash: "179f5b95"
group_hash: "00000000"
counter: "00000003"
last_hit: "61695d26"

0 comments on commit ee792df

Please # to comment.