NetworkConfigUtility
NetworkConfigUtility is currently a small program to assist with pushing configuration data to network devices. It can also retrieve state data. This utility is built using the Nornir framework:
https://github.com/nornir-automation/nornir
Source Code
https://github.com/naonder/NetworkConfigUtility
PyPI package
https://pypi.org/project/networkconfigutility
Setup
pip install networkconfigutility
See sample hosts, groups, and defaults file for reference. Also see the following for more information on Nornir and SimpleInventory
https://nornir.readthedocs.io/en/stable/tutorials/intro/inventory.html
Also - see the sample 'configuration.ini' file on how to set it up properly
Lastly - this requires that ntc-templates are downloaded to the host running this program:
https://github.com/networktocode/ntc-templates
ntc-templates
Easiest method is to download and keep the ntc-templates in the home directory of the user running this program.
git clone https://github.com/networktocode/ntc-templates
Otherwise you can explicitly tell the program (namely Netmiko) where to look for them (example is for Linux):
export NET_TEXTFSM=/path/to/ntc-templates/templates/
More information is here:
https://pynet.twb-tech.com/blog/automation/netmiko-textfsm.html
Usage
Run using the following:
python -m networkconfigutility [options\files\filters]
Example of current capabilities:
usage: networkconfigutility [-h] -config path to config file for device(s |
-getters GETTERS [GETTERS ...] | -cli command)
configuration_file ftype filter
positional arguments:
configuration_file name of configuration file for program itself
ftype type of filter to use
filter name of device or group
optional arguments:
-h, --help show this help message and exit
-config path to config file for device(s)
change configuration on a device or groups of devices
-merge path to config file for device(s)
merge a configuration to a device or group of devices
-getters GETTERS [GETTERS ...]
use built-in NAPALM getters to retrieve information
-cli command use the system CLI to retrieve information
-getters_extra GETTERS_EXTRA [GETTERS_EXTRA ...]
optional, additional getters to use
-cli_extra command optional, additional CLI to retrieve information
Example execution of the getters looks like such:
Enter username: test-user
Input password:
napalm_get**********************************************************************
* test-device ** changed : False ***********************************************
vvvv napalm_get ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO
{ 'get_interfaces_ip': { 'Vlan10': { 'ipv4': { '10.96.128.18': { 'prefix_length': 24}}}}}
^^^^ END napalm_get ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Returned output is utilized from the Nornir 'print_result()' method
Metadata
Release files for networkconfigutility 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| networkconfigutility-1.0.3.tar.gz | 4.6 kB | Without provenance | Details for networkconfigutility-1.0.3.tar.gz |
Release files / networkconfigutility-1.0.3.tar.gz
| Download URL | networkconfigutility-1.0.3.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65b0a1d85649ebb1b4b7ba16c1c929e97a944623123751a015c6866cfcfffa5a
|
|
BLAKE2b-256 checksum How to use checksums |
91a4b2e73040b95e8814d62065c0afbba64ca3d6268541c7cf35c93a8a2d0071
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for networkconfigutility 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.