From 1f2a9b240123ffa20e86653495db839fd135b3d5 Mon Sep 17 00:00:00 2001 From: <> Date: Wed, 18 Oct 2023 18:42:13 +0000 Subject: [PATCH] Deployed 967f7d7 with MkDocs version: 1.4.3 --- .nojekyll | 0 404.html | 443 ++ assets/_mkdocstrings.css | 0 assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.220ee61c.min.js | 29 + assets/javascripts/bundle.220ee61c.min.js.map | 8 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.74e28a9f.min.js | 42 + .../workers/search.74e28a9f.min.js.map | 8 + assets/stylesheets/main.26e3688c.min.css | 1 + assets/stylesheets/main.26e3688c.min.css.map | 1 + assets/stylesheets/palette.ecc896b0.min.css | 1 + .../stylesheets/palette.ecc896b0.min.css.map | 1 + changelog/index.html | 670 ++ colliecting-diffs/index.html | 613 ++ configuratiom-management/index.html | 629 ++ contributing/index.html | 730 ++ index.html | 645 ++ media/screenshots/compliance-diff.png | Bin 0 -> 31744 bytes media/screenshots/compliance-error.png | Bin 0 -> 48801 bytes media/screenshots/compliance-list.png | Bin 0 -> 23740 bytes .../screenshots/compliance-missing-extra.png | Bin 0 -> 27108 bytes media/screenshots/compliance-ok.png | Bin 0 -> 17602 bytes media/screenshots/config-temp-substitute.png | Bin 0 -> 9975 bytes media/screenshots/cr-approve-button.png | Bin 0 -> 1427 bytes media/screenshots/cr-approved.png | Bin 0 -> 14192 bytes .../screenshots/cr-collecting-diff-button.png | Bin 0 -> 1613 bytes media/screenshots/cr-diffs-tab.png | Bin 0 -> 65258 bytes media/screenshots/cr-job-log.png | Bin 0 -> 20845 bytes media/screenshots/cr-schedule-button.png | Bin 0 -> 1214 bytes media/screenshots/cr-scheduled.png | Bin 0 -> 14945 bytes media/screenshots/cr-unapprove-button.png | Bin 0 -> 1444 bytes media/screenshots/cr-unschedule-button.png | Bin 0 -> 1408 bytes media/screenshots/navbar.png | Bin 0 -> 7416 bytes media/screenshots/platformsetting.png | Bin 0 -> 28028 bytes media/screenshots/render-temp-substitute.png | Bin 0 -> 8971 bytes media/screenshots/script-list.png | Bin 0 -> 14783 bytes media/screenshots/script.png | Bin 0 -> 37552 bytes media/screenshots/substitute.png | Bin 0 -> 15868 bytes screenshots/index.html | 485 ++ search/search_index.json | 1 + secrets/index.html | 492 ++ sitemap.xml | 38 + sitemap.xml.gz | Bin 0 -> 281 bytes 75 files changed, 12036 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 assets/_mkdocstrings.css create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.220ee61c.min.js create mode 100644 assets/javascripts/bundle.220ee61c.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.74e28a9f.min.js create mode 100644 assets/javascripts/workers/search.74e28a9f.min.js.map create mode 100644 assets/stylesheets/main.26e3688c.min.css create mode 100644 assets/stylesheets/main.26e3688c.min.css.map create mode 100644 assets/stylesheets/palette.ecc896b0.min.css create mode 100644 assets/stylesheets/palette.ecc896b0.min.css.map create mode 100644 changelog/index.html create mode 100644 colliecting-diffs/index.html create mode 100644 configuratiom-management/index.html create mode 100644 contributing/index.html create mode 100644 index.html create mode 100644 media/screenshots/compliance-diff.png create mode 100644 media/screenshots/compliance-error.png create mode 100644 media/screenshots/compliance-list.png create mode 100644 media/screenshots/compliance-missing-extra.png create mode 100644 media/screenshots/compliance-ok.png create mode 100644 media/screenshots/config-temp-substitute.png create mode 100644 media/screenshots/cr-approve-button.png create mode 100644 media/screenshots/cr-approved.png create mode 100644 media/screenshots/cr-collecting-diff-button.png create mode 100644 media/screenshots/cr-diffs-tab.png create mode 100644 media/screenshots/cr-job-log.png create mode 100644 media/screenshots/cr-schedule-button.png create mode 100644 media/screenshots/cr-scheduled.png create mode 100644 media/screenshots/cr-unapprove-button.png create mode 100644 media/screenshots/cr-unschedule-button.png create mode 100644 media/screenshots/navbar.png create mode 100644 media/screenshots/platformsetting.png create mode 100644 media/screenshots/render-temp-substitute.png create mode 100644 media/screenshots/script-list.png create mode 100644 media/screenshots/script.png create mode 100644 media/screenshots/substitute.png create mode 100644 screenshots/index.html create mode 100644 search/search_index.json create mode 100644 secrets/index.html create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..3233c23 --- /dev/null +++ b/404.html @@ -0,0 +1,443 @@ + + + +
+ + + + + + + + + + + + + +Under Plugins
navbar menu you can find plugin
Add PlatformSetting objects for your platforms in NetBox. This model contains info about how to connect and what to collect from device.
+Define:
+With regexps you can exclude big parts of the configuration and compare tiny configuration pieces (only ntp configuration).
+You can test regexp on the site regex101.com.
+ +Plugin adds a custom script ConfigDiffScript
that runs all logic about diff calculations and connections to devices.
+You can find scripts list in navbar Customization -> Scripts
.
In the script, you can define a site, on which devices run compliance, or devices.
+ If you define both fields, script will run only on devices from Devices
field
Warning
+Script runs only on devices with status Active
, assigned Primary IP, Config Template, Platform and PlatformSetting
If you have configs in NetBox DataSource, you can define it, the script instead of connecting to devices will find configs in DataSource by device's names.
+Warning
+Be sure that DataSource is synced and has the latest data
+Note
+Only synced DataSources are acceptable
+After script is done you can find results in Config Compliances
menu. Each device has its own result.
Also result is storing rendered and actual configurations from devices.
+With the help of netutils library plugin stores missing and extra config lines.
+ +Supported platforms for missing/extra lines:
+Compliance finished with error
+ +Render diff between configurations
+ +No diff
+ + + + + + + +With plugin you can push rendered configuration from NetBox to devices.
+Supported platforms:
+arista_eos
cisco_iosxe
cisco_iosxr
cisco_nxos
juniper_junos
Plugin using scrapli-cfg for this feature.
+If you render not full configuration, it is acceptable to pull missing config sections from the actual configuration to render full configuration.
+Note
+If you render full configuration in NetBox, you can proceed to Configuration Request
part
To do that you should create substitute.
+Substitutes is a "tag" that needs to be replaced with output from the real device, and a regex pattern that "pulls" this section from the actual device itself.
+ +In screenshot below we add substitute for Arista PlatformSetting
+Name
jinja2 variable in config templateIn example substitute ethernet_interfaces
section will be replaced with whatever the provided pattern finds from the real device.
This pattern matches all ethernet interfaces on a Arista device.
+To correctly render substitute in config template you have two options:
+{{ "{{ ethernet_interfaces }}" }}
+
+or
+{% raw %}{{ ethernet_interfaces }}{% endraw %}
+
+Config template will look like:
+ +And rendered config template with substitute
+ +Now you let's create Configuration Request
with devices you want to configure.
Warning
+For request only accepts devices with Active
status and assigned Platform, Primary IP, Config Template and PlatformSetting
Find Configuration Requests
in navbar.
Now collect diffs for devices pressing Collecting diffs
button.
On tab Diffs
you can review diffs for devices.
To continue approve request by pressing Approve
button.
Also you can cancel approve after that.
+ +After approval you can see by whom configuration request is approved.
+ +At this moment you can schedule job that will push rendered configuration to devices in configuration request by pressing schedule button.
+ +After that you can see by whom configuration request is scheduled and time.
+ +Also you can cancel scheduled job by pressing Unschedule
button.
Warning
+Approve and Schedule buttons is accessable only to user with netbox_config_diff.approve_configurationrequest
+permission
Warning
+If you unapprove scheduled configuration request, scheduled job will be canceled
+After scheduled job is completed you can job logs on configuration request page.
+ +Note
+Completed configuration requests can't be edited.
+If an error occurs while executing a job that pushes configurations to devices then all configured devices will be rollbacked to the previous version of the configuration.
+ + + + + + +Contributions are welcome, and they are greatly appreciated! Every little bit +helps, and credit will always be given.
+You can contribute in many ways:
+Report bugs at https://github.com/miaow2/netbox-config-diff/issues.
+If you are reporting a bug, please include:
+Look through the GitHub issues for bugs. Anything tagged with "bug" and "help +wanted" is open to whoever wants to implement it.
+Look through the GitHub issues for features. Anything tagged with "enhancement" +and "help wanted" is open to whoever wants to implement it.
+NetBox Config Diff Plugin could always use more documentation, whether as part of the +official NetBox Config Diff Plugin docs, in docstrings, or even on the web in blog posts, +articles, and such.
+The best way to send feedback is to file an issue at https://github.com/miaow2/netbox-config-diff/issues.
+If you are proposing a feature:
+Ready to contribute? Here's how to set up netbox-config-diff
for local development.
netbox-config-diff
repo on GitHub.Clone your fork locally
+$ git clone git@github.com:your_name_here/netbox-config-diff.git
Install dependencies and start your virtualenv:
+$ poetry install -E test -E doc -E dev
Create a branch for local development:
+$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
+When you're done making changes, check that your changes pass the + tests, including testing other Python versions, with tox:
+$ poetry run tox
Commit your changes and push your branch to GitHub:
+$ git add .
+$ git commit -m "Your detailed description of your changes."
+$ git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
+Before you submit a pull request, check that it meets these guidelines:
+A reminder for the maintainers on how to deploy. +Make sure all your changes are committed (including an entry in CHANGELOG.md). +Then run:
+$ poetry run bump2version patch # possible: major / minor / patch
+$ git push
+$ git push --tags
+
+GitHub Actions will then deploy to PyPI if tests pass.
+ + + + + + +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.
+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.
+ + + + +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",
+ },
+}
+
+Run database migrations:
+python manage.py migrate
+
+
+Collect static from the plugin:
+python manage.py collectstatic --noinput
+
+Restart NetBox service:
+systemctl restart netbox
+
+
+
+Read this doc about collecting diffs, for configuration management read this
+ + + + + + +