Skip to main content

Netbox plugin for splitting interface.

Project description

Interface Relationship Manager

Interface Relationship Manager is a plugin for NetBox that allows you to split a single physical or virtual interface into two separate logical interfaces for RX and TX traffic, while retaining the original interface as the "main" interface. This plugin is useful for scenarios where you need granular control or monitoring of inbound and outbound traffic on an interface.

Features

  • Easy interface splitting: Split any interface into separate RX and TX interfaces with a single click.
  • Retains the original interface: Automatically establishes a relationship between the main interface and the newly created RX/TX interfaces.
  • CRUD Operations: Create, read, update, and delete interface relationships easily.
  • Integration with NetBox UI: Accessible through the NetBox main menu, enabling quick splitting and review of existing relationships.

Requirements

These are the versions of NetBox and Python tested with the plugin. It is recommended to use these versions (or as close as possible) to avoid incompatibilities.

  • NetBox NetBox Community v4.1.6 (2024-10-31)
  • Python version 3.10.12 or higher

Installation

The plugin is available on PyPI, so you can install it easily with pip.

Step 1: Install using pip

pip install interface_relationship_manager

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

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

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

python manage.py migrate interface_relationship_manager

Step 4: Run netbox(for example)

python manage.py runserver

Usage

Splitting an Interface

  1. Open the Interface Splitting Manager page from the plugin menu or go to the device you want to manage.

  2. Choose the device that contains the interface you want to split.

  3. Select the interface.

  4. Click Split Interface.

  5. The plugin will create two new interfaces, interface_name_rx and interface_name_tx, and establish a relationship with the main interface. or

After splitting:

  • The plugin automatically links main_interface to its rx_interface and tx_interface.
  • Any future UI or API calls can show these relationships for easy management.

Project Structure

interface_splitting_manager/
├── models.py                    # InterfaceRelationship model definition
├── views.py                     # Views for selecting device and splitting interfaces
├── forms.py                     # Forms to handle user input
├── templates/                   # HTML templates
├── urls.py                      # Plugin URLs
├── navigation.py                # Plugin menu entries
└── migrations/                  # DB migrations

Changelog

v1.1

  • fixed README

v1.0

  • Initial release with basic interface splitting and relationship tracking.
  • Created a dedicated InterfaceRelationship model to keep track of main, RX, and TX interfaces.
  • Added a management UI for selecting interfaces and performing splits.
  • Improved error handling and user feedback in the UI.

Notes

  • No core override: The plugin doesn't override NetBox's core behavior. It only adds new features related to interface splitting.

  • Relationships: When an interface is split, the original interface remains available as the main interface, and the two new interfaces (RX and TX) are each associated with the main interface through the InterfaceRelationship model.

  • Custom Buttons: To add custom buttons or links in various NetBox UI areas, you can:

    • Edit NetBox core templates (not recommended, as changes can be lost during upgrades),
    • Use NetBox's built-in Custom Links feature,
    • Or override specific templates if needed (though results may vary).

Author

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

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

interface_relationship_manager-1.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

interface_relationship_manager-1.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file interface_relationship_manager-1.1.tar.gz.

File metadata

File hashes

Hashes for interface_relationship_manager-1.1.tar.gz
Algorithm Hash digest
SHA256 57c44049fa17ec61b42ee4b611c4d3210c9db46e3c8e11df65f8fefcce1aa904
MD5 f67cfa48f596b2ed71c03245ef3b2f95
BLAKE2b-256 1830d09b9ffd5b74623fc5615e724a1f29f762f54cc89c314eec15eaa4b1e008

See more details on using hashes here.

File details

Details for the file interface_relationship_manager-1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for interface_relationship_manager-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b6c1ed14a36356c259a8ed5bbb1cdb8cea892c2340f020dbedad23e757ca4d0b
MD5 efa2ef18e2fe455f1c8c55bca5a4b01c
BLAKE2b-256 977cad8fa7ea6ff4339d204507d8bd8bfc20d9ca03e300347d940c80d8ae51f1

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