Uh oh!
There was an error while loading. Please reload this page.
Nokia SrOS Parser - #106
Conversation
…arents In order to allow the config section banners to be used for specifying a section in parsing I've simplified it so those banner names are the parent for the section. Should allow for a user to specify "System Configuration" for a section and get the full block.
Realized I could use the inherited method just as well as the one I'd written so getting rid of unnecessary code.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| @@ -0,0 +1,5562 @@ | |||
| exit all | |||
There was a problem hiding this comment.
Does it make sense to include this in the example? I am a bit torn (if I understand this correctly), what is the expected result, but we should be purposeful in our decision.
There was a problem hiding this comment.
I was simply copying this example from @h4ndzdatm0ld TTP repo with the assumption this is a standard format for configurations.
There was a problem hiding this comment.
@itdependsnetworks@jdrew82 I am happy to share a ContainerLab setup with a Nokia SROS device for the team to use for current and future testing or integrations, etc. If interested, please let me know. Also, the basic 'show config' (admin display-config) equivalent of SROS will always include exit all at the end.
There was a problem hiding this comment.
Also, on the needing more configs to test, I could dig up some old configs but they will need some sanitizing.
There was a problem hiding this comment.
that would be great.
itdependsnetworks
commented
Mar 19, 2022
Looking good, but we def need more config tests. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Updated test to use post-processed config for the test
jeffkala
commented
Apr 22, 2022
Approved this PR, the final test that was added was properly being sent in as post processed config for SROS. |
| line (str): A config line from the device that has been found to be a section title. | ||
| Returns: | ||
| str|bool: The section's title from the section banner, else False. |
There was a problem hiding this comment.
I never thought about adding the | to specify or. That's cool.
Here's my second attempt at a parser for Nokia SrOS. This time, I'm using the tab indented format that is standard for their configuration backups. This uses the standard space-based parser but also uses the section banners as parents for the section stripping out the section title from the 'echo "System Configuration"` portion. This theoretically allows the end-user to simply put in "System Configuration" when wanting to compare sections and it should parse the full block.