Skip to main content

NetBox plugin for automatic cable label generation

Project description

NetBox Auto Cable Label Plugin

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

Compatibility

NetBox Version Plugin Version
4.x 0.1.x

Installing

For adding to a NetBox Docker setup see the general instructions for using netbox-docker with plugins.

Install from PyPI

pip install netbox-cable-labels

Install from GitHub

pip install git+https://github.com/jsenecal/netbox-cable-labels

or by adding to your local_requirements.txt or plugin_requirements.txt (netbox-docker):

netbox-cable-labels

Enable the plugin in /opt/netbox/netbox/netbox/configuration.py, or if you use netbox-docker, your /configuration/plugins.py file :

PLUGINS = [
    'netbox_cable_labels'
]

Configuring

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 cable to the templating engine.

Default configuration

By default, the plugin copies the cable id in the label, prefixed with the pound (#) sign.

"#{{cable.pk}}"

Management command

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox_cable_labels-0.1.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_cable_labels-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file netbox_cable_labels-0.1.0.tar.gz.

File metadata

  • Download URL: netbox_cable_labels-0.1.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for netbox_cable_labels-0.1.0.tar.gz
Algorithm Hash digest
SHA256 268d013912c66dbfbd5470aa1d6d67a5ddb3e72437cbd67cc6d0e6e1b2c07186
MD5 3e32ebfcad5077a0c26b22aac126c481
BLAKE2b-256 83b7ae2c6b3a6493700dbb36708aee29dbc56f5af9fb2a4d9469aa29cc1ee350

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_cable_labels-0.1.0.tar.gz:

Publisher: publish.yml on jsenecal/netbox-cable-labels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netbox_cable_labels-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_cable_labels-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92858f9b232dfd41369471b9f37336204ebc24436a6a7af9dce31bc185e4533c
MD5 942dfe788ac014ff1bb7c42d2c139a74
BLAKE2b-256 c377d1de5e081c8836bca430bac34a609a342523a38daaa352b1638b33b290cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_cable_labels-0.1.0-py3-none-any.whl:

Publisher: publish.yml on jsenecal/netbox-cable-labels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page