NetBox Config Diff Plugin
NetBox plugin for Config Diff.
- Find diff between the rendered configuration for a device to its actual configuration, retrieved from the device itself, or stored in DataSource.
- Push the rendered configuration from NetBox to a device and apply it.
Documentation: https://miaow2.github.io/netbox-config-diff/
About
Collecting diffs
With this plugin you can find diff between the rendered configuration for a device to its actual configuration, retrieved from the device itself, or stored in DataSource. Read about DataSources for further details.
Device configuration renders natively in NetBox. This feature was introduced in 3.5 version. NetBox Labs blog post about it.
Plugin supports a wide list of vendors (Cisco, Juniper, Huawei, MicroTik etc.) with the help of Scrapli. Read Scrapli and scrapli-community documentations to find full list of vendors.
Pushing configuration
Also you can push rendered configuration from NetBox to device and apply it.
Supported platforms:
arista_eoscisco_iosxecisco_iosxrcisco_nxosjuniper_junos
This is possible thanks to the scrapli_cfg. Read Scrapli documentation for more info.
Compatibility
| NetBox Version | Plugin Version |
|---|---|
| 3.5 | =>0.1.0, <=2.5.0 |
| 3.6 | =>0.1.0, <=2.6.0 |
| 3.7 | =>0.1.0, <=2.8.0 |
| 4.0 | =>2.6.0, <=2.9.0 |
| 4.1 | =>2.7.0, <=2.12.0 |
| 4.2 | =>2.9.0, <=2.12.0 |
| 4.3 | =>2.10.0, <=2.12.0 |
| 4.4 | =>2.11.0, <=2.13.0 |
| 4.5 | =>2.14.0, <=2.16.0 |
| 4.6 | =>2.15.0, <=2.16.0 |
| 4.7 | =>2.16.0 |
Installing
For adding to a NetBox Docker setup see the general instructions for using netbox-docker with plugins.
Install with pip:
pip install netbox-config-diff
Add to local_requirements.txt:
echo netbox-config-diff >> local_requirements.txt
Enable the plugin in /opt/netbox/netbox/netbox/configuration.py,
or if you use netbox-docker, your /configuration/plugins.py file,
and define credentials for devices connection:
PLUGINS = [
"netbox_config_diff",
]
PLUGINS_CONFIG = {
"netbox_config_diff": {
"USERNAME": "foo",
"PASSWORD": "bar",
"AUTH_SECONDARY": "foobar", # define here password for accessing Privileged EXEC mode, this variable is optional
"PATH_TO_SSH_CONFIG_FILE": "/home/.ssh/config", # define here PATH to SSH config file, it will be used for device connections, this variable is optional
},
}
Run database migrations:
python manage.py migrate
Collect static from the plugin:
python manage.py collectstatic --noinput
Restart NetBox service:
systemctl restart netbox netbox-rq
Usage
Read this doc about collecting diffs, for configuration management read this
Video
My presention about plugin at October NetBox community call (19.10.2023, plugin version 2.0.0).
Screenshots
Compliance finished with error
Render diff between configurations
No diff
Configuration request
Completed Configuration request
Credits
Based on the NetBox plugin tutorial:
This package was created with Cookiecutter and the netbox-community/cookiecutter-netbox-plugin project template.
Metadata
Release files for netbox-config-diff 2.17.0
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 |
|---|---|---|---|---|
| netbox_config_diff-2.17.0.tar.gz | 1.5 MB | Without provenance | Details for netbox_config_diff-2.17.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netbox_config_diff-2.17.0-py3-none-any.whl | Python 3 | none | any | Details for netbox_config_diff-2.17.0-py3-none-any.whl |
Total release size: 3.0 MB
Release files / netbox_config_diff-2.17.0.tar.gz
| Download URL | netbox_config_diff-2.17.0.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c70dec7987595b4e938dcc047de956ed0397b74b2824bd73e6caa71fe74c83a9
|
|
BLAKE2b-256 checksum How to use checksums |
07eb25ba0bf681ba46f89dc134290193ca94458165b2f6af3f3d341ecab5cdb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.22
|
Release files / netbox_config_diff-2.17.0-py3-none-any.whl
| Download URL | netbox_config_diff-2.17.0-py3-none-any.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d7f41336d2bdfd22caf08ea214fc2328a43ddc8a020456051eb661c39f37363
|
|
BLAKE2b-256 checksum How to use checksums |
59e5f51fe5616ca0396785ad176f1e68ab69c8c36180896b56159a1732b7f9fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.22
|
Security for netbox-config-diff 2.17.0
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.