Skip to main content

Plugin for extending cable data and integrating with inventory.

Project description

Cable Extension

Cable Extension is a plugin for NetBox that enhances cable-related data and provides optional integration with device inventories. With this plugin, you can create and manage cables using a custom form, optionally create InventoryItems on both ends, and store extended information (such as manufacturer or custom comments) in a linked model.


Features

  • Extended Cable Creation: A dedicated form (CableCreateForm) to create cables between one or two Interfaces, capturing extra details (serial, part ID, etc.).
  • Inventory Item Integration: Automatically creates InventoryItem records for each device end if desired.
  • Manufacturer/Comments: Supports additional cable metadata (manufacturer, comments) through the CableExtension model.
  • NetBox UI Integration: Provides a clear user interface under the plugin’s menu for creating cables and editing extended data.

Requirements

  • NetBox: version 4.1.6
  • Python: version 3.10.12 or higher

These are the versions used during development and testing. If you run into compatibility issues on other versions, please open an issue.


Installation

Step 1: Install using pip

pip install cable_extension

Step 2: Add the plugin into PLUGINS array in configuration.py

PLUGINS = [
    'cable_extension',
    # Other plugins...
]

Step 3: Apply migrations(don't forget activating virtual enviroment)

python manage.py migrate cable_extension

Step 4: Run netbox(for example)

python manage.py runserver

Usage

###Creating a Cable

  1. In NetBox, navigate to Plugins → Cable Extension → Create Cable (or your chosen URL path).

  2. Fill out details like:

    • Interfaces for end A and B
    • Cable serial, part ID, label, description, length
    • Check “Create InventoryItem for both ends?” to add inventory entries on both devices
  3. Click Save. The plugin:

    • Creates a new cable in NetBox
    • Sets up cable terminations on the specified interfaces
    • Optionally creates InventoryItem objects for each end
    • Stores any extra details (like manufacturer, comments) in its own CableExtension model

Project Structure

cable_extension/
├── models.py          # CableExtension model for extended cable data
├── forms.py           # CableCreateForm for cable + inventory creation
├── views.py           # View classes for creating/editing cables
├── templates/         # HTML templates
│   └── cable_extension/
│       ├── cable_create.html
│       └── cable_extension_edit.html
├── urls.py            # URL definitions for the plugin

Changelog

v1.0.1

  • Added headers in each file, fixed some comments

v1.0

  • Initial release with custom cable creation form
  • Optional InventoryItem creation on both ends
  • Extended cable data stored in CableExtension model

Notes

  • Non-Invasive: The plugin does not modify NetBox’s core cable logic – it simply provides an alternate creation flow and extension points.

  • Customization: Feel free to adapt the forms or models to suit your environment. The plugin is designed to be extendable without impacting NetBox’s base code.

  • License/Contributions: Contributions and forks are welcome. Please see the repository for more details on licensing.

Author

Viktor Kubec
BUT FIT Brno student
MIT License
GitHub: vubeckubec/cable_extension

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

cable_extension-1.0.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

cable_extension-1.0.1-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file cable_extension-1.0.1.tar.gz.

File metadata

  • Download URL: cable_extension-1.0.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for cable_extension-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5aeebd3476e6e4f826edf058f75991ddfe6e5704e1162e62fad6d603d07c0778
MD5 c9a7521d84a08bc19cf2ec455b32bff0
BLAKE2b-256 aebbeb9c94e938e2d1c91f23abf9eb135e9c3fec714f81e33eaf7357b3ca1a7e

See more details on using hashes here.

File details

Details for the file cable_extension-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cable_extension-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49ed090fe79f2b2b5660e2d90775d6324e07193c93f88c62bce69af1d13acb91
MD5 f22fcabcfc30744736625684b6427da6
BLAKE2b-256 58e793a6e41f68bfee9cb5d8505372f5bfdafc1ccc6dfb5d11411dc9e6bfb5e1

See more details on using hashes here.

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