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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
Added "% Unavailable command" to EOS failed_when_contains
Moved core platform failed_when_contains to base to not have to duplicate them in sync and async platforms
Add file_mode to the enable_basic_logging function, can now choose "append" or "write" for logfile
Add channel_log_mode to the base driver arguments; you can now choose "append" or "write" for this as well!
Improve reading until prompt methods; no longer use re.search on the entire received byte string, now only checks for prompt on the last N chars where N is governed by the base channel args comms_prompt_search_depth attribute... this fixes an issue where scrapli could be wayyyyyy slow for very very large outputs (like full tables show bgp)
Fix bug (or just terrible initial idea!?) in asynctelnet that reset a timer back to a very small value that was used for testing; most people shouldn't have noticed an issue here, but if you had slow devices this could cause issues that "looked" like an authentication issue due to scrapli not having responded to all telnet control characters before punting to auth
Added commandeer to driver object; this is used to "commandeer" an existing connection but treat it like the new connection object (prompt patterns, methods, etc.) -- generally this would be used for using GenericDriver to connect to a console server, then "commandeering" that connection and turning it into an IOSXR/IOSXE/etc. connection object so you have all the "normal" behavior of scrapli
Add missing timeout on the asynctelnet open method
Add py.typed to hopefully do typing more correctly :P
BUGFIX: network drivers aborted configuration sessions if responses were failed even if the stop_on_failed arg was set to False; this has been fixed now so that sessions are only aborted if the response is failed and
Improved typing for send_interactive
Remove napalm dev requirement -- switch to scrapli-cfg for dev environment config management; something something eating dog food or whatever.
Deprecate comms_ansi -- if there is an ANSI escape sequence we will now just strip it out automagically; this is not currently a breaking change, but will be -- there is a deprecation warning now and comms_ansi will be fully removed in the 2022.01.30 release (and pre-releases).
Removed a sleep that was in the default on_open for IOSXR devices... this has been there a while and I think it was just a hold over from early early versions of scrapli that perhaps had a less robust in channel authentication handler. 1 second faster IOSXR for free! Yay!
Fixed an issue with system transport where the transport would get closed twice causing an unhandled exception -- thank you to Alex Lardschneider for finding this!
Added an example for the enable_basic_logging function as well as the commandeer method
Improved priv level handling -- if you try to acquire "parallel" privileges (ex. configuration and configuration exclusive in IOSXR) previously we would say things worked, but we would just stay in configuration mode. This has been fixed (hopefully)!
Move ansi escape pattern to compile globally, so it only compiles once (why it was never like that before... who knows)
Simplify the collect bits for integration tests... this is still not used heavily but hopefully will be soon!
Replace vrnetlab creds in examples with scrapli (felt confusing to have vrnetlab creds everywhere, plus functional testing is moving away from (but still supporting) vrnetlab test environment)
Crank up the rows/cols for system transport -> 80 rows, 256 cols -- this to align with scrapligo and to make it less common that users need to modify these values.
BUGFIX: fixed blocking read in async channel telnet authentication (thank you Dmitry Figol!)
Added not_contains field to privilege levels... this will help greatly simplify the necessary regex patterns, as well as allow us to ditch look arounds which go does not support... step one to a standardized community platform that works with python -or- go!
Simplified (at least a little... more would be good) patterns for privilege levels for core platforms.
Added _generic_driver_mode to the NetworkDriver classes -- this is a private mode as it should probably be used cautiously -- the idea here is that you can send any strings you want and scrapli will not care about privilege levels at all. See the discussion about this here.
BUGFIX: fixed asynctelnet issue with control character handling, thank you to @davaeron -- see #147
BREAKING CHANGE removed the transport.username_prompt and transport.password_prompt attributes of the telnet transports. All authentication has been moved into the channel, so it made no sense to leave these attributes on the transports. This may cause an issue for users that had explicitly set their prompts to something non-standard.
Finally added logic to auto set port to 23 for telnet :)
BUGFIX: fixed a rare issue where decoding bytes received from the channel (in the response object) would raise a UnicodedecodEerror; we now catch this exception and decode with ISO-8859-1 encoding which seems to be much less picky about what it decodes. Thanks to Alex Lardschneider for yet another good catch and fix!
Added interaction_complete_patterns to all "interactive" methods -- this argument accepts a list of strings/patterns; will be re-escape'd if each string does not start with and end with "^" and "$" (line anchors), otherwise will be compiled with the standard scrapli case-insensitive and multiline flags. If the interactive event finds any of these pattenrs during the course of the interacting it will terminate the interactive session. Note that this is entirely optional and is a keyword only argument so no changes are necessary to any existing scrapli programs.