Package: netbox-validity
Validity: vendor-agnostic configuration complianceWhat?Validity is theNetBoxplugin 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:Gather state/config of your devices. Pull it from Git repository or poll the devices directly.Defineserialization method(the way to translate your raw data into JSON-like structure).Write compliance test as a Python expression, e.g.device.config["ntp-servers"] == ["1.2.3.4", "5.6.7.8"]ornot device.state.show_stp['enabled']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 other things like data collection, serialization and storage. This one encourages you to write short, clean and understandable compliance tests together with the mandatory description.Key FeaturesTruly vendor-agnostic. You can easily integrate any vendor config format usingTTPWriting compliance tests using Python expressions andJQDirect polling of the devices via SSH or Telnet. More than 100 different platforms are available throughnetmikolibrary.Flexible selector system to apply the tests only to a specific subset of devicesConcept ofdynamic 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 theexplanationof the calculation process step by step. It helps to identify the cause of the failure.ORM accessinside the test. You have full access to thedeviceproperties. For instance, you may leverageConfiguration ContextsNetBox 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 aGit repositoryDownload and InstallYou can download Validity viapippip install netbox-validityAfter that follow theinstallation guideto correctly add Validity to your NetBox.DocumentationRead the full documentation onvalidity.readthedocs.ioQuick StartA short video about first steps with Validity:ContributingFeel free to ask aQuestion, report anIssueor even make aPR. Read more about contribution in theCONTRIBUTINGguide.Screenshots