You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
The send_command function allows for a pattern to be input to stop the parse, however the default pattern is used as an optional stop point regardless.
This causes issues if you have a comment with the switch name and a > or # following it.
The regular expression should probably be anchored ^ $ to confirm that it is not found in the middle of a line, or other erronous location causing the send_command to prematurely return.
General Information
WIN
Netdev version 9.3
Base.py
Debug information
Reading pattern "WAS-SF02-1-119-DC#" or "WAS-SF02-1-1.?((.?))?[>|#]" was found
So, without line anchors, I have to limit what descriptions I have, and I'm not sure if it's catching a truncating other commands.
The fix???
Well there are a few approaches. First if I override a pattern, it should respect that pattern, and timeout otherwise, not use both my pattern and the default pattern.
Second I think anchors in most cases would be appropriate to ensure the base prompt is found on a "clean" line, not as a mishap of some port description if I have some network admin getting fancy with their descriptions.
The text was updated successfully, but these errors were encountered:
I would NORMALLY just get more picky, and override the pattern... However I can't override the pattern because the defaults, it always looks for the default pattern in the code. So I'm sunk. I have to edit this package to get around this, or search every config we have (28,000+) and ensure we never do this, and put out a memo ugh. Much prefer to make the pattern search more restrictive.
Sadly this version of NXOS spits out \r\n\r\n\rROUTER%
So using ^ won't anchor it, so you would have to use [\r\n] to simulate the ^ since it's out of order. (Thanks Cisco)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
The send_command function allows for a pattern to be input to stop the parse, however the default pattern is used as an optional stop point regardless.
This causes issues if you have a comment with the switch name and a > or # following it.
The regular expression should probably be anchored ^ $ to confirm that it is not found in the middle of a line, or other erronous location causing the send_command to prematurely return.
General Information
Debug information
Reading pattern "WAS-SF02-1-119-DC#" or "WAS-SF02-1-1.?((.?))?[>|#]" was found
^^^^ WHOOOPS!!!
My startup has this line...
description VPC Peerlink<Chassis1 WAS-SF01-1-119-DC | Chassis2 WAS-SF02-1-119-DC>
Additional context
So, without line anchors, I have to limit what descriptions I have, and I'm not sure if it's catching a truncating other commands.
The fix???
Well there are a few approaches. First if I override a pattern, it should respect that pattern, and timeout otherwise, not use both my pattern and the default pattern.
Second I think anchors in most cases would be appropriate to ensure the base prompt is found on a "clean" line, not as a mishap of some port description if I have some network admin getting fancy with their descriptions.
The text was updated successfully, but these errors were encountered: