-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Juniper driver strip_context_items() suggested change #1328
Comments
Is this applicable for all Junos versions/platforms? Also is there any scenario where the current regex would break things? Don't want to change things if we'll break anything else or its not broken! |
I can't say for all Junos versions/platforms. My understanding is that most all Junos devices exhibit this type of extra output regarding the redundancy roles. Our Junos devices; however, display the {master} {backup} without the ":" and other extra text/digits, whereas other Junos devices output {master:0} or {backup:1}. My recommendation to add the '?' allows your pattern match to work for both {master} and {master:0}, so should work for both cases, correct? |
Cool, yeah I think we'd end up with: |
I'm not in an environment where I can contribute; sorry. Thanks for your attention. |
if I get a chance. I can make the change and open PR for it. |
I think also this might need to be updated cause is line in reference to Linecards?: netmiko/netmiko/juniper/juniper.py Line 202 in d33e5e9
the output is actually (capital L) and the regex isn't ignoring case: |
Fixed here: |
On Juniper MX2020, the extra CLI output is just {master} or {backup}. Recommend changing:
netmiko/netmiko/juniper/juniper.py L205-206 (in your develop branch):
to:
r"{master:?.}",
r"{backup:?.}",
thank you
The text was updated successfully, but these errors were encountered: