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.
There are two ways this repo focuses on keeping quality device-type definitions:
- Pre-Commit Checks - Optional, but highly recommended, for helping to identify simple issues before committing. (trailing-whitespace, end-of-file-fixer, check-yaml, yamlfmt, yamllint)
- Installation
- Virtual Environment Route
- It is recommended to create a virtual env for your repo (
python3 -m venv venv
) - Install the required pip packages (
pip install -r requirements.txt
) - Continue to the "Install
pre-commit
Hooks"
- It is recommended to create a virtual env for your repo (
pre-commit
Only Route- Install pre-commit (
pip install pre-commit
)
- Install pre-commit (
- Install
pre-commit
Hooks- To install the pre-commit script:
pre-commit install
- To install the pre-commit script:
- Virtual Environment Route
- Usage & Useful
pre-commit
Commands- After staging your files with
git
, to run the pre-commit script on changed files:pre-commit run
- To run the pre-commit script on all files:
pre-commit run --all
- To uninstall the pre-commit script:
pre-commit uninstall
- After staging your files with
- Learn more about pre-commit
- Installation
- GitHub Actions - Automatically run before a PR can be merged. Repeats yamllint & validates against NetBox Device-Type Schema.