diff --git a/ntc_templates/templates/cisco_asa_show_access-list_brief.textfsm b/ntc_templates/templates/cisco_asa_show_access-list_brief.textfsm new file mode 100644 index 0000000000..7abd7edb93 --- /dev/null +++ b/ntc_templates/templates/cisco_asa_show_access-list_brief.textfsm @@ -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 diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 63b36a9b84..c371bf5f48 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -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]] diff --git a/tests/cisco_asa/show_access-list_brief/cisco_asa_show_access-list_brief.raw b/tests/cisco_asa/show_access-list_brief/cisco_asa_show_access-list_brief.raw new file mode 100644 index 0000000000..ca23401a66 --- /dev/null +++ b/tests/cisco_asa/show_access-list_brief/cisco_asa_show_access-list_brief.raw @@ -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 diff --git a/tests/cisco_asa/show_access-list_brief/cisco_asa_show_access-list_brief.yml b/tests/cisco_asa/show_access-list_brief/cisco_asa_show_access-list_brief.yml new file mode 100644 index 0000000000..ca3bc0d8f1 --- /dev/null +++ b/tests/cisco_asa/show_access-list_brief/cisco_asa_show_access-list_brief.yml @@ -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"