-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mjbear/asa_sh_run_obj_service_pr1970
Simplify structured data and add support for operators and ICMP
- Loading branch information
Showing
9 changed files
with
296 additions
and
227 deletions.
There are no files selected for viewing
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
15 changes: 7 additions & 8 deletions
15
ntc_templates/templates/cisco_asa_show_running-config_object_service.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,20 +1,19 @@ | ||
Value Required NAME (\S+) | ||
Value DESCRIPTION (.+?) | ||
Value PROTOCOL ([a-z]+) | ||
Value SRC_PORT_EQ (\S+) | ||
Value SRC_PORT_GT (\S+) | ||
Value SRC_PORT_LT (\S+) | ||
Value PROTOCOL (\S+) | ||
Value SRC_OPERATOR (\S+) | ||
Value SRC_PORT_START (\S+) | ||
Value SRC_PORT_END (\S+) | ||
Value DST_PORT_EQ (\S+) | ||
Value DST_PORT_GT (\S+) | ||
Value DST_PORT_LT (\S+) | ||
Value DST_OPERATOR (\S+) | ||
Value DST_PORT_START (\S+) | ||
Value DST_PORT_END (\S+) | ||
Value ICMP_TYPE (\S+) | ||
Value ICMP_CODE (\S+) | ||
|
||
Start | ||
^object\s+service -> Continue.Record | ||
^object\s+service\s+${NAME}\s*$$ | ||
^\s+description\s+${DESCRIPTION}\s*$$ | ||
^\s+service\s+${PROTOCOL}(\s+source\s+(eq\s+${SRC_PORT_EQ}|gt\s+${SRC_PORT_GT}|lt\s+${SRC_PORT_LT}|range\s+${SRC_PORT_START}\s+${SRC_PORT_END}))?(\s+destination\s+(eq\s+${DST_PORT_EQ}|gt\s+${DST_PORT_GT}|lt\s+${DST_PORT_LT}|range\s+${DST_PORT_START}\s+${DST_PORT_END}))?\s*$$ | ||
^\s+service\s+${PROTOCOL}(\s+${ICMP_TYPE}(\s+${ICMP_CODE})?)?\s*$$ | ||
^\s+service\s+${PROTOCOL}(\s+source\s+${SRC_OPERATOR}\s+${SRC_PORT_START}(\s+${SRC_PORT_END})?)?(\s+destination\s+${DST_OPERATOR}\s+${DST_PORT_START}(\s+${DST_PORT_END})?)?\s*$$ | ||
^. -> Error "Did not match any lines" |
7 changes: 7 additions & 0 deletions
7
ntc_templates/templates/cisco_fxos_show_system_firmware.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Value VERSION (\S+) | ||
Value STARTUP_VERSION (\S+) | ||
|
||
Start | ||
^\s*Version:\s+${VERSION}\s*$$ | ||
^\s*Startup-Vers:\s+${STARTUP_VERSION}\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
Oops, something went wrong.