-
Notifications
You must be signed in to change notification settings - Fork 64
Added HP full config parsing #776
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
base: develop
Are you sure you want to change the base?
Conversation
|
can you add a compliance check here: https://github.com/networktocode/netutils/tree/develop/tests/unit/mock/config/compliance/compliance I am interested to see how you define the scope of the configs when there is a space at the start of the line, and would ask that we consider how that will work with GC |
Hmm, ok. In that case I'd probably just |
That may come with other issues for compliance or remediation. Once you put in a compliance test I will take a look at how it works. Pinging @jeffkala on this as well. |
|
Ok, I have added the compliance tests as requested. I have also changed the parser to allow the following to be equivalent so that you don't need to format the intended config in the same manner as the backup config (always separate sections by comments): |
| @@ -0,0 +1,208 @@ | |||
| # | |||
| sysname NTC-Router | |||
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.
Shouldn't the intended be the same spatially aware configs as the backup?
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.
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.
I made it space agnostic for single config lines. Both work. Do you want to require that the intended config match the space exactly?
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.
Do you want to require that the intended config match the space exactly?
I don't know for sure. I just want to be purposeful and consider how it effects GC.
Closes: #752
NTC-4804
This PR adds a more robust config example as well as some edge cases for the HP Comware platform and adds a custom parser method to properly parse the different sections.
I also was confused which class to update initially, but then I noticed that the HPComwareConfigParser class wasn't really doing much by itself and was redundant. I consolidated the two classes and then added some deprecation warnings and updated the parser to directly use the HPEConfigParser class.