Salt-nornir

Latest version: v0.21.0

Safety actively analyzes 629723 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 9

0.4.0

A lot of new features and improvements added to salt-nornir proxy.

Proxy minion gained support for Ncclient and scrapli-netconf meaning can use NETCONF to interact with devices.

State work flow function added, this function essentially allows to codify network MOP (Method of Procedure) logic in a series of steps and sub steps supporting conditions logic.

Testing capabilities extended to support processors plugins, meaning any nornir task's result can now be passed through a series of tests.

FEATURES

1. cfg and cfg_gen tasks can generate configuration on per-host basis
2. Added new execution module nr.test function to perform test suites using nornir-salt tests processor plugin
3. Added new state function nr.workflow - to define ordered execution of steps with conditions capabilities
4. Added support for "commit" argument for nr.cfg function for netmiko to commit configuration, nr.cfg with plugin Netmiko commits configuration by default
5. Added to stats main_process_fd_count and main_process_fd_limit counters
6. Added support for nr.task to download task function file from master and run it
7. Added new nr.nc Netconf execution module function to interact with devices over Netconf using ncclient or scrapli_netconf nornir-salt plugins
8. Added nr.do execution module function with support for aliases to execute single or multiple tasks using alias names
9. Added table and headers arguments to represent nr.cli, nr.cfg, nr.nc, nr.task or nr.test results in a form of text table using Tabulate module
10. Added event_failed argument to support firing events for failed tasks for nr.cli, nr.cfg, nr.nc, nr.task or nr.test
11. Watchdog updated to monitor worker thread is alive status and restart it if it is dead
12. Added support for experimental promptless mode for netmiko send_command plugin, introduced nr.cli use_ps boolean argument for that
13. Added proxy configuration parameters to control default plugin kwargs: nr_cli, nr_cfg, nr_nc
14. Added support to specify inventory parameters in proxy minion pillar
15. Added support for diff processor to work with to_file (tf) processor to produce text diffs
16. nr.cli commands can be rendered using render=commands argument, rendered with jinja2 and access to host or proxy pillar data
17. Added nr.cli filename argument to support getting commands to send from file on salt-master
18. Added nr.version execution function to return report with versions of packages installed
19. Watchdog - added support for memory usage threshold to either restart nornir process or log messages
20. Added support for salt 3003 in addition to 3002

TESTS

1. Created testing/development environment using docker containers
2. Wrote tests for all execution module functions
3. Wrote tests for state workflow function

CHANGES

1. WATCHDOG: Changed file descriptors usage check to count number of files in /proc/<pid>/fd/ folder instead of trying
to create pipe objects, set threshold for restart equal to 95% out of overall number of FDs that process can open
2. Netmiko send config method parameter "cmd_verify" set to False as netmiko fails without it while doing banners config,
but, if required, cmd_verify can be overridden using kwargs
3. tf (to_file) - simplified, only alias name required, devices stored under default base path and tf_alias.json file
stores references to files
4. nr.cli no longer supports netmiko_kwargs or scrapli_kwargs arguments, instead, any additional arguments supplied to nr.cli used with netmiko or scrapli
5. nr.cli and nr.cfg files download and rendering moved to main proxy minion process prior to executing the task
6. watchdog thread HostsKeepalive updated to use lock object to check if connections are being in use to execute the task
7. nr.cfg task plugins for netmiko, scrapli and napalm moved to separate tasks within nornir-salt
8. Netmiko send config method sends bogus "_0" string prior to starting sending configuration, that is to clean up terminal from previous tasks output
9. Changed rendering approach to account for the fact that starting from SALT 3003 need to use loader_context to reconstruct __salt__ dunder within treads: details: https://github.com/saltstack/salt/issues/59962

BUGS

1. Fixed support for Nornir 3.1.1 as FFun was using state attribute, which was removed, updated FFun behavior and proxy module to fix it, Nornir PR for reference: https://github.com/nornir-automation/nornir/pull/669

0.3.1

BUG

1. Updated nornir_salt package to version 0.3.1 and update salt_nornir requirements to use it, that is to fix 2

0.3.0

FEATURES

1. Added capability to pass "stat" argument to nr.stats function to retrieve value of single stat
2. Added support for proxy_always_alive proxy pillar option to indicate if need to keep connections alive or tear them down after each task execution
3. Added watchdog_interval proxy pillar option to control how often to run watchdog thread
4. Added nornir-runner module, that, for instance, capable of finding nornir proxy that connects to certain device

0.2.2

BUG fixes

- Fixed tping function - missed tcp_ping function import

New Features

- added state module
- added "match" argument to nr.cli function to filter results output similar to cisco "include" or juniper "match" pipe command

0.2.1

Changes

- Generalised task function imports
- Improved logging for failed tasks and added more items in stats dictionary

0.2.0

New Features
- Added support for Scrapli for cli cnf cfg functions

Chagnes
- Improved tasks import logic to do it dynamically, that way only Nornir and nornir-salt must be installed on the system

BUG fixes
- Numerous improvements toward making modules more reliable, such as watchdog thread to monitor stale child processes and kill them

Page 9 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.