Fix nxos sh license usage for nxos 10+#2296
Fix nxos sh license usage for nxos 10+#2296mjbear wants to merge 2 commits intonetworktocode:masterfrom
Conversation
|
Hello @mjbear. Just checking in to see if you’re planning to merge this PR, as we need it for our deployment. |
| ^\s*$$ | ||
| ^. -> Error | ||
|
|
||
| Version10 |
There was a problem hiding this comment.
Does this apply to the command output for all versions of NXOS? If not, should we add this line or block of text as conditional?
There was a problem hiding this comment.
This is a State for the items that appear to apply to NXOS version 10+
matt852
left a comment
There was a problem hiding this comment.
Added 1 comment requesting clarification
| ^. -> Error | ||
|
|
||
| Version10 | ||
| ^\s+Status:\s+${STATUS}$$ |
There was a problem hiding this comment.
| ^\s+Status:\s+${STATUS}$$ | |
| ^\s*$$ | |
| ^\s+Status:\s+${STATUS}$$ |
^\s*$$ is still needed because a line with only whitespace would match ^. and trigger Error. Looking at the raw file, line 1 appears to be a truly empty line and line 4 appears empty. An empty line won't match ^. (since . requires at least one character), but a line with trailing spaces would. To be safe and consistent with repository standards, ^\s*$$ should be added to the Version10 state.
There was a problem hiding this comment.
I'm fine with this.
For this line it was mirroring of some existing template lines.
| Version10 | ||
| ^\s+Status:\s+${STATUS}$$ | ||
| # overall License Authorization Status | ||
| ^\s+Status:\s+\S+ |
There was a problem hiding this comment.
| ^\s+Status:\s+\S+ | |
| ^\s+Status:\s+.+ |
Fix the non-capturing status fallback regex to handle multi-word values:
There was a problem hiding this comment.
On this one, it depends on what we're willing to be captured.
The suggested regex allows far more character types to be matched.
Hi all, |
resolves #2285
Fix and add support for NX-OS version 10+
show license usageoutput.