The NetBox community maintains a public library of models used to create NetBox devices.
This library is meant as an extension of the official library for devices that are NRK (Broadcast) specific and does not fit into the contributing guidelines of the official library.
This library follows the official netbox-community/devicetype-library definitions.
See CONTRIBUTING.md for more details on how to contribute. This library is maintained by NRK and has focus on Broadcast devices.
git clone git@github.com:nrkno/netbox-devicetype-library.git
cd netbox-devicetype-library
direnv allowThat's it. direnv will automatically create a virtual environment, install dependencies, and set up pre-commit hooks.
git clone git@github.com:nrkno/netbox-devicetype-library.git
cd netbox-devicetype-library
make install
make hooksRun make help to see all available targets:
| Target | Description |
|---|---|
make install |
Create venv and install dependencies |
make hooks |
Install pre-commit git hooks |
make lint |
Run yamllint on device and module types |
make fmt |
Format YAML files with yamlfmt |
make test |
Run pytest (only changed files vs upstream) |
make validate |
Run all pre-commit hooks on all files |
make validate-all |
Run pytest on ALL files (full validation) |
make clean |
Remove venv, caches, and generated files |
make update-hooks |
Update pre-commit hooks to latest versions |
There are two ways this repo focuses on keeping quality device-type definitions:
- Pre-Commit Hooks - Automatically run on
git commitwhen set up viadirenv allowormake hooks. Checks include trailing-whitespace, end-of-file-fixer, check-yaml, yamlfmt, yamllint, and pytest.- After staging your files with
git, hooks run automatically on commit - To run manually on changed files:
pre-commit run - To run on all files:
make validate - Learn more about pre-commit
- After staging your files with
- GitHub Actions - Automatically run before a PR can be merged. Repeats yamllint & validates against NetBox Device-Type Schema.