adjust parser for IOSXE 'show running-config aaa username' to be less rigid #937
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change adjusts how the IOSXE parser for
show running-config aaa username
works.Motivation and Context
I recently encountered a problem where this username line was skipped by the parser:
username testuser8 privilege 15 common-criteria-policy Test-CC secret 9 <hash>
The existing regular expressions (8 of them) each match entire
username
lines that meet a specific format. The line above did not match any of those expressions. The result was that the username was silently skipped by the parser. None of the 8 existing regular expressions allow for bothprivilege
andcommon-criteria-policy
on the same line.I have changed the general nature of this parser to treat the
username
line like a stack. Arguments are popped off of the beginning of the line (along with their parameters) so that the arguments can exist in flexible combinations.This code is untested as the project Makefile relies on resources internal to Cisco.
Impact (If any)
Screenshots:
None.
Checklist: