-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix huawei display acl all - port numbers replaced by names and IPV6 …
…ACL name position (#1222) * Fix huawei display acl all - port numbers replaced by names * Fix Huawei - display acl (ipv6)? all - if name provided, order in IPv6 changes * Huawei - display acl all - add rule description * Huawei - display acl all - separately record ACLs and their rules authored-by: Edouard Lavaud <e.lavaud@unyc.io>
- Loading branch information
Showing
5 changed files
with
181 additions
and
9 deletions.
There are no files selected for viewing
18 changes: 12 additions & 6 deletions
18
ntc_templates/templates/huawei_vrp_display_acl_all.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
Value Filldown ACL_NAME (.*?) | ||
Value Filldown ACL_NUMBER (\d+) | ||
Value Required SN (\d+) | ||
Value Filldown,Required ACL_NUMBER (\d+) | ||
Value SN (\d+) | ||
Value ACTION (deny|permit) | ||
Value PROTOCOL (\d+|icmp(v6)?|tcp|udp|gre|igmp|ip(v6)?|ipinip|ospf) | ||
Value SOURCE (((\d+.){3}\d+|[0-9a-fA-F]{1,4}([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4})[\/\s]((\d+.){3}\d+|\d+)) | ||
Value SOURCE_PORT_MODIFIER (eq|lt|gt|range) | ||
Value SOURCE_PORT_RANGE ((\d+)(\s(\d+))?) | ||
Value SOURCE_PORT_RANGE ((\S+)(\s(\S+))?) | ||
Value DESTINATION (((\d+.){3}\d+|[0-9a-fA-F]{1,4}([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4})[\/\s]((\d+.){3}\d+|\d+)) | ||
Value DESTINATION_PORT_MODIFIER (eq|lt|gt|range) | ||
Value DESTINATION_PORT_RANGE ((\d+)(\s(\d+))?) | ||
Value DESTINATION_PORT_RANGE ((\S+)(\s(\S+))?) | ||
Value MATCHES (\d+) | ||
Value DESCRIPTION (.*) | ||
|
||
Start | ||
^\s*rule\s\d+\s(deny|permit) -> Continue.Record | ||
^\S+\sIPv6\sACL\s -> Continue.Record | ||
^\S+\sACL\s -> Continue.Record | ||
^\s*Total\squantity\sof\snonempty\sACL\snumber\sis\s\d+\s*$$ | ||
^\s*Total\snonempty\sacl6\snumber\sis\s\d+\s*$$ | ||
^\S+(\sIPv6)?\sACL\s(${ACL_NAME}\s)?${ACL_NUMBER},\s\d+.*$$ | ||
^\S+\sIPv6\sACL\s${ACL_NUMBER}(\sname\s${ACL_NAME})?,\s\d+\srules?.*$$ | ||
^\S+\sACL\s(${ACL_NAME}\s)?${ACL_NUMBER},\s\d+\srules?.*$$ | ||
^\s*Acl's\sstep\sis\s\d+\s*$$ | ||
^\s*rule\s${SN}\s${ACTION}(\s${PROTOCOL})?(\ssource\s${SOURCE})?(\ssource-port\s${SOURCE_PORT_MODIFIER}\s${SOURCE_PORT_RANGE})?(\sdestination\s${DESTINATION})?(\sdestination-port\s${DESTINATION_PORT_MODIFIER}\s${DESTINATION_PORT_RANGE})?(\s\(${MATCHES}\smatch(es)?\))?\s*$$ -> Record | ||
^\s*rule\s${SN}\s${ACTION}(\s${PROTOCOL})?(\ssource\s${SOURCE})?(\ssource-port\s${SOURCE_PORT_MODIFIER}\s${SOURCE_PORT_RANGE})?(\sdestination\s${DESTINATION})?(\sdestination-port\s${DESTINATION_PORT_MODIFIER}\s${DESTINATION_PORT_RANGE})?(\s\(${MATCHES}\smatch(es)?\))?\s*$$ | ||
^\s*rule\s\d+\sdescription\s"${DESCRIPTION}"\s*$$ | ||
^\s*$$ | ||
^. -> Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters