-
Notifications
You must be signed in to change notification settings - Fork 726
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
Added cisco_asa_show_asp_table_vpn-context_detail #303
Added cisco_asa_show_asp_table_vpn-context_detail #303
Conversation
Removed allowing extra spaces between key words
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jaydubya35 Overall this looks pretty good, I had a few suggestions for, mostly being less strict on spacing. The other thing that I thought would be better was to record on a required opening instead of something that might not always be the closing line. There is an implicit record on EOF that should capture the final entry.
@@ -0,0 +1,37 @@ | |||
Value VPN_CTX (\S+) | |||
Value PEER_IP (\d+.\d+.\d+.\d+) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Value PEER_IP (\d+.\d+.\d+.\d+) | |
Value PEER_IP (\S+) |
It should be safe to use simpler match group and is not IPv4 specific.
Value VPN_FILTER (\S+) | ||
|
||
Start | ||
^VPN\sCTX\s+=\s${VPN_CTX} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^VPN\sCTX\s+=\s${VPN_CTX} | |
^VPN\s+CTX -> Continue.Record | |
^VPN\s+CTX\s+=\s+${VPN_CTX} |
Prefer not to restrict spacing to a single space unless required, as that is something that could easily be inconsistent even by accident of the developers.
I think it is probably safer to record on the CTX than on filter, so move capture to entry opening instead of what we currently know as the closing.
|
||
Start | ||
^VPN\sCTX\s+=\s${VPN_CTX} | ||
^Peer\sIP\s+=\s${PEER_IP} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^Peer\sIP\s+=\s${PEER_IP} | |
^Peer\s+IP\s+=\s+${PEER_IP} |
^Bad\sCrypto\s+=\s${BAD_CRYPTO} | ||
^Rekey\sPkt\s+=\s${REKEY_PKT} | ||
^Rekey\sCall\s+=\s${REKEY_CALL} | ||
^VPN\sFilter\s+=\s${VPN_FILTER} -> Record |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^VPN\sFilter\s+=\s${VPN_FILTER} -> Record | |
^VPN\s+Filter\s+=\s+${VPN_FILTER} |
Remove Record since it is on opening
^Spoof\s+=\s${SPOOF} | ||
^Bad\sCrypto\s+=\s${BAD_CRYPTO} | ||
^Rekey\sPkt\s+=\s${REKEY_PKT} | ||
^Rekey\sCall\s+=\s${REKEY_CALL} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^Rekey\sCall\s+=\s${REKEY_CALL} | |
^Rekey\s+Call\s+=\s+${REKEY_CALL} |
^Peer\sIP\s+=\s${PEER_IP} | ||
^Pointer\s+=\s${POINTER} | ||
^State\s+=\s${STATE} | ||
^Flags\s+=\s${FLAGS} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^Flags\s+=\s${FLAGS} | |
^Flags\s+=\s+${FLAGS} |
^VPN\sCTX\s+=\s${VPN_CTX} | ||
^Peer\sIP\s+=\s${PEER_IP} | ||
^Pointer\s+=\s${POINTER} | ||
^State\s+=\s${STATE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^State\s+=\s${STATE} | |
^State\s+=\s+${STATE} |
Start | ||
^VPN\sCTX\s+=\s${VPN_CTX} | ||
^Peer\sIP\s+=\s${PEER_IP} | ||
^Pointer\s+=\s${POINTER} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^Pointer\s+=\s${POINTER} | |
^Pointer\s+=\s+${POINTER} |
@@ -0,0 +1,37 @@ | |||
Value VPN_CTX (\S+) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Value VPN_CTX (\S+) | |
Value Required VPN_CTX (\S+) |
Require the CTX for all entries.
^Rekey\sPkt\s+=\s${REKEY_PKT} | ||
^Rekey\sCall\s+=\s${REKEY_CALL} | ||
^VPN\sFilter\s+=\s${VPN_FILTER} -> Record | ||
^. -> Error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^. -> Error | |
^\s* | |
^. -> Error |
Add catching an empty line just in case that shows up in some other model/version
… into cisco_asa_show_asp_table_vpn-context_detail
Moved Record to VPN_CTX, Removed EOF to record last entry Allowed multiple spaces
Changes have been made, thanks. |
Thanks @Jaydubya35 |
…context_detail Added cisco_asa_show_asp_table_vpn-context_detail
ISSUE TYPE
COMPONENT
cisco_asa_show_asp_table_vpn-context_detail, cisco_asa, show asp table vpn-context detail
SUMMARY
New template.
I purposely left an odd number of records in the raw/parsed as you have the potential to have stale SPI's.