Skip to content

Tags: srfwx/scrapli

Tags

2022.01.30a2

Toggle 2022.01.30a2's commit message
bump version so the pre release channel log isnt broken!

2022.01.30a1

Toggle 2022.01.30a1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request carlmontanari#185 from carlmontanari/develop

Fix Weekly Build && Prep 2022.01.30a1 pre-release to unblock some cfg things!

2021.07.30

Toggle 2021.07.30's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Prepare for 2021.07.30 Release (carlmontanari#155)

- 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](carlmontanari#128).
- BUGFIX: fixed asynctelnet issue with control character handling, thank you to [@davaeron](https://github.com/davaeron) -- see carlmontanari#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.%

2021.07.30a3

Toggle 2021.07.30a3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
A3 pre release (carlmontanari#124)

* bump pins
* deprecate comms_ansi
* convert deprecation warning -> FutureWarning so users see it
* update docs, fix some links, redeploy docs
* handle annoying rare paramiko eof at tear down of integration tests
* first swag adding 3.10 testing
  * skip ssh2 on 3.10 for now
  * skip pyfakefs tests on 3.10 for now
* make tests not a package.... remove unnecessary sleep for iosxr
* fix system transport double timeout issue
* add logging and commandeer example
* remove unnecessary call to strip ansi in in channel auth
* remove comms_ansi arg from tests
* handle "parallel" privs correctly (i.e. configuration and configuration_exclusive)
* Logo (carlmontanari#121)
* change creds to just scrapli/scrapli in examples, functional test updates for lab environment
* remove unnecessary ansi strip in async channel telnet auth

2021.07.30a2

Toggle 2021.07.30a2's commit message
bump new pre-release version (for typing fixes)

2021.07.30a1

Toggle 2021.07.30a1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2021.07.30a1 pre-release to unblock some scrapli netconf things (carl…

…montanari#106)

- 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

2021.01.30

Toggle 2021.01.30's commit message
upgrade pip in all sessions that all requirements are installed in

2020.01.30

Toggle 2020.01.30's commit message
upgrade pip in all sessions that all requirements are installed in

2020.12.31

Toggle 2020.12.31's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Prepare 2020.12.31 Release (carlmontanari#72)

- Make log messages for textfsm and genie parsers failing to parse consistent as `log.warning`
- Add factory example
- Add "root" priv level to junos driver -- probably should be considered experimental for now :)
- Fix issue where `send_config` unified result did not have finish time set
- **POSSIBLY BREAKING CHANGE:** logger names have changed to be easier to get/make more sense -- the logger for each instance used to look like: "scrapli-channel-{{ HOST }}" which kinda was not really smart :). Loggers now look like: "scrapli.{{ HOST }}:{{ PORT }}.channel" -- can be channel|driver|transport!
- Changes to test environment:
  - Support running devices on localhost w/ nat'd management ports -- in "vrouter" mode (poorly named) -- this is enabled with the `SCRAPLI_VROUTER` environment variable set to on/true/something
  - Added bootvar into nxos base config -- when missing causes qemu nxosv to boot into loader prompt so thats no good
  - Replace resource settings in vdc in nxos to account for nxos instances with differing resources (memory/cpu)
  - Got rid of static license udi in iosxe config, replaced more certificate stuff so show run comparisons are easier on iosxe
- **NEW TRANSPORT** `asynctelnet` transport is built using standard library asyncio, as such it is part of scrapli core
  - Should be considered beta for a while :)
  - Added a bunch of tests mocking streamreader/writer to ensure that this driver is well tested
- Added asynctelnet support in nxos and juniper drivers (to change prompt for those platforms)
- Support asynctelnet in base driver
- `auth_bypass` for both telnet drivers completely bypasses not only auth (as it did previously) but also the auth validation where we confirm we got logged in successfully -- reason being is that for console servers and such you may not care about that, you may just want to log in and read data.
- Removed unnecessary re-checking/verifying of ssh config file in system transport (was basically duplicated from base transport, so was pointless!)
- Bumped all the default timeout values up as they were probably a bit on the aggressive side
- Added `eager` argument to send commands/commands from file and config/configs/configs from file methods -- basically this `eager` mode will *not* look for a prompt between lines of commands/configs. This means that things have potential to get out of whack because we will just send things as fast as possible. In order to not totally break things we *will* (whether you like it or not!) wait and find the prompt on the last command/config in the list though -- that way we dont get too out of whack. This now means we can use `eager` to configure banners and macros and things and we no longer need to do the dirty send interactive workaround.
- Added `ScrapliConnectionLost` exception and raise it if we get EOF in system transport -- with a message that is more clear than just "EOF" and some obscure line in ptyprocess!
- Added `tclsh` privilege level for IOSXE
- Fixed a bug that would prevent going to "parallel" privilege levels -- i.e. going from tclsh to configuration or visa versa in IOSXE or from configuration to configuration_exclusive in IOSXR
- If no `failed_when_contains` is passed to `send_interactive` network drivers will now use the network drivers `failed_when_contains` attribute to bring it inline with the normal command/config methods
- Added `timeout_ops` to `send_interactive` and wrap those methods with the `TimeoutModifier` decorator
- Add logic to properly fetch socket address family type so we can handle IPv6 hosts (w/ scrapli-ssh2/scrapli-paramiko)
- Added `tclsh` privilege level for NXOS, didn't even know that existed before!

2020.11.15

Toggle 2020.11.15's commit message
fix setup.py classifier