Skip to main content
Click to view Validity docs

Validity: vendor-agnostic configuration compliance

CI Coverage Python version NetBox version

What?

Validity is the NetBox plugin to write "auto tests" for your network devices. You define compliance tests and Validity checks device state or configuration against these tests. The two most obvious use cases for such a functionality include:

  • Configuration compliance. You can make sure your devices are provisioned properly, and their config follows the rules you have defined via tests.
  • Pre- / post-configuration checks. You can make sure your network is in the expected state before or/and after configuration changes have been made. You can use Validity API to include these checks into your automation pipelines.

Validity usage workflow:

  1. Gather state/config of your devices. Pull it from Git repository or poll the devices directly.

  2. Define serialization method (the way to translate your raw data into JSON-like structure).

  3. Write compliance test as a Python expression, e.g.
    device.config["ntp-servers"] == ["1.2.3.4", "5.6.7.8"]
    or
    device.state.sh_ospf_neighbors["10.1.1.1"]["state"] == "Up"

  4. Apply created test to specific devices and get the results per device (passed or failed).

Why?

Validity helps you to concentrate on what really matters - defining the criteria of healthy and valid network and following these criteria.

Validity completely separates compliance test code from all the other things like data collection, parsing and storage. It encourages you to write short, clean and understandable compliance tests together with the mandatory description.

Key Features

  • Truly vendor-agnostic. You can easily integrate any vendor config format using TTP or a bunch of other serialization options
  • Writing compliance tests using Python expressions and JQ
  • Gathering configuration or state info directly from the devices via SSH, Telnet, Netconf or REST API.
  • Configuration Backups. Save your device configs to Git or AWS S3 servers.
  • Concept of dynamic pairs. With dynamic pair you can compare 2 different devices between each other (e.g. compare the configuration of 2 MC-LAG members).
  • Test result explanation. When some test fails, you can get the explanation of the calculation process step by step. It helps to identify the cause of the failure.
  • ORM access inside the test. You have full access to the device properties. For instance, you may leverage Configuration Contexts NetBox feature to store your desired configuration and compare it with the config collected from the device.
  • Reports and webhooks. After execution of some bunch of tests you can get the report with passed/failed statistics grouped by some Location/Site/Manufacturer/etc. Moreover, you can provision the webhook to notify an external system when compliance report is generated.
  • Test extensibility. You can define your own python functions or classes to reuse the code between multiple compliance tests.
  • Possibility to store all heavy text-based entities (like compliance tests or TTP Templates) in a Git repository

NetBox Support Policy

Unlike many other plugins, Validity supports multiple NetBox versions inside one single release.

Validity aims to support the latest 3 major/minor releases of NetBox.

For example, if latest NetBox version is 4.1, then latest Validity is going to support NetBox 4.1, 4.0 and 3.7.

Check out compatibility matrix for the details.

Download and Install

You can download Validity via pip

pip install netbox-validity

After that follow the installation guide to correctly add Validity to your NetBox.

Documentation

Read the full documentation on validity.readthedocs.io

Quick Start

A short video about first steps with Validity:

Watch the video

Contributing

Feel free to ask a Question, report an Issue or even make a PR. Read more about contribution in the CONTRIBUTING guide.

Screenshots

Report Per Device

Compliance Test

Compliance Test Result

Device Serialized Configuration

Metadata

Release files for netbox-validity 3.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netbox-validity 3.6.0
File Size Uploaded
netbox_validity-3.6.0.tar.gz 101.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netbox-validity 3.6.0
File Interpreter ABI Platform
netbox_validity-3.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 254.3 kB

Release files / netbox_validity-3.6.0.tar.gz

Download URL netbox_validity-3.6.0.tar.gz
Size 101.3 kB
Tags Source
SHA-256 checksum
How to use checksums
acd18803083f16dbaeec892b972a6f41df80298fa7dcc2cbbd76382b9fae92e3
BLAKE2b-256 checksum
How to use checksums
f64d06adb80ce31820f1a00415eac6c60d8159dea18085823d41842f35e3893c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.14

Release files / netbox_validity-3.6.0-py3-none-any.whl

Download URL netbox_validity-3.6.0-py3-none-any.whl
Size 153.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
087218db0d494e85e2b116a5d707a5340b89d0b09b55117f8b5361e064cc4eb4
BLAKE2b-256 checksum
How to use checksums
077089ab0c3d996668c75d8fb1c5d7da9b3dcedaa125105a06e31501d89f007f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.14

Release history Release notifications | RSS feed

3.6.1

2 release files

This release

3.6.0 This release

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.3

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.3

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page