Skip to content
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

Conversation

joewesch
Copy link
Contributor

ISSUE TYPE
  • New Template Pull Request
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.

Copy link
Contributor

@jmcgill298 jmcgill298 left a 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+)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
^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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
^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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
^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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
^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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
^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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
^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}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
^Pointer\s+=\s${POINTER}
^Pointer\s+=\s+${POINTER}

@@ -0,0 +1,37 @@
Value VPN_CTX (\S+)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
^. -> Error
^\s*
^. -> Error

Add catching an empty line just in case that shows up in some other model/version

Joe Wesch added 2 commits November 20, 2018 08:53
… into cisco_asa_show_asp_table_vpn-context_detail
Moved Record to VPN_CTX, Removed EOF to record last entry
Allowed multiple spaces
@joewesch
Copy link
Contributor Author

Changes have been made, thanks.

@jmcgill298
Copy link
Contributor

Thanks @Jaydubya35

@jmcgill298 jmcgill298 merged commit b4783f0 into networktocode:master Nov 20, 2018
@joewesch joewesch deleted the cisco_asa_show_asp_table_vpn-context_detail branch November 26, 2018 14:54
jvanderaa pushed a commit that referenced this pull request Nov 10, 2021
…context_detail

Added cisco_asa_show_asp_table_vpn-context_detail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants