Push rendered device configurations from NetBox to devices and apply them.
Project description
NetBox Config Diff Plugin
NetBox plugin for Config Diff.
- Free software: Apache-2.0
- 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_eos
cisco_iosxe
cisco_iosxr
cisco_nxos
juniper_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, 3.7, 4.0 | =>0.1.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
},
}
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for netbox_config_diff-2.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b642cfa1fdfde8e75738794dd73af6e2780c8e4c4059e94a9cb781ceee5aff9e |
|
MD5 | 72d1c9da48d6004ae9af7035b66e4fbe |
|
BLAKE2b-256 | a6aab5fadab6b61f5d21984ab40fde37f6f0644475c16dca107050d5b7d0c58f |