Plugin for netbox that allows the automatic generation of the label field content for cables based on a user defined template
- Free software: Apache-2.0
| NetBox Version | Plugin Version |
|---|---|
| 4.x | 0.1.x |
For adding to a NetBox Docker setup see the general instructions for using netbox-docker with plugins.
pip install netbox-cable-labelspip install git+https://github.com/jsenecal/netbox-cable-labelsor by adding to your local_requirements.txt or plugin_requirements.txt (netbox-docker):
netbox-cable-labelsEnable the plugin in /opt/netbox/netbox/netbox/configuration.py,
or if you use netbox-docker, your /configuration/plugins.py file :
PLUGINS = [
'netbox_cable_labels'
]Setup PLUGINS_CONFIG with the following:
PLUGINS_CONFIG = {
"netbox_cable_labels": {"label_template": "Some Jinja2 template string here"},
}Please note that the cable instance is passed as
cableto the templating engine.
By default, the plugin copies the cable id in the label, prefixed with the pound (#) sign.
"#{{cable.pk}}"
See TEMPLATES.md for comprehensive template examples including TIA-606-C compliant formats and various labeling scenarios.
Using manage.py, you can run the command generate_labels to automatically generate labels on cables that do not already have one set, based on the configured template.
./manage.py generate_labels