Add support for ignore_warning in juniper_junos_common/open_configuration #428
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.
I noticed that
juniper_junos_common/open_configurationwasn't respecting theignore_warningparameter.In our environment we were getting some error when 2 tasks are trying to run a config diff + check at the same time (even in private mode)
Here is the task
Looking at the code, this parameter was not passed to the function but a default value was already defined for
rpc.open_configurationThis patch passed the
ignore_warningarg toopen_configurationand follow this logic:ignore_warningis a bool, pass the boolignore_warningis a string, create a list and add it to the default valueignore_warningis a list, add the default value to the list