NetBox Device View plugin
Project description
Netbox Device View Plugin
Install
The plugin is available as a Python package and can be installed with pip.
Run pip install netbox-device-view in your virtual env.
To ensure NetBox Device View plugin is automatically re-installed during future upgrades, create a file named local_requirements.txt (if not already existing) in the NetBox root directory (alongside requirements.txt) and list the netbox-device-view package:
# echo netbox-device-view >> local_requirements.txt
Once installed, the plugin needs to be enabled in your configuration.py and optionally the show_on_device_tab setting enabled.
# In your configuration.py
PLUGINS = ["netbox_device_view"]
PLUGINS_CONFIG = {
'netbox_device_view': {
'show_on_device_tab': True,
},
}
First run source /opt/netbox/venv/bin/activate to enter the Python virtual environment.
Then run
cd /opt/netbox/netbox
pip3 install netbox-device-view
python3 manage.py migrate netbox_device_view
python3 manage.py collectstatic --no-input
How To Use
For each Device Type you need to add a DeviceView.
It is based on a CSS grid view with 32 columns and 2 rows. You need to specify the grid-template-areas.
- Interface positions will use the following format: {interfacename}{module}-{port} or fallback to all lower case + [^.a-zA-Z\d] changed to "-"
- leading "empties" can be specified as x
- trailing "empties" can be specified as z
- between "empties" can be named s{0-99}
- numeric only ports have to be prefixed with "p" e.g. "p1"
Example for Cisco C9300-24T with 8x 10G module ( more in examples folder )
/* C9300-24T */
.deviceview.area {
grid-template-areas:
"x x x x x x x x x x x x x x gigabitethernet0-1 gigabitethernet0-3 gigabitethernet0-5 gigabitethernet0-7 gigabitethernet0-9 gigabitethernet0-11 s0 gigabitethernet0-13 gigabitethernet0-15 gigabitethernet0-17 gigabitethernet0-19 gigabitethernet0-21 gigabitethernet0-23 z z z z z"
"x x x x x x x x x x x x x x gigabitethernet0-2 gigabitethernet0-4 gigabitethernet0-6 gigabitethernet0-8 gigabitethernet0-10 gigabitethernet0-12 s0 gigabitethernet0-14 gigabitethernet0-16 gigabitethernet0-18 gigabitethernet0-20 gigabitethernet0-22 gigabitethernet0-24 z z z z z";
}
/* C9300-24T with C9300-NM-8X */
.deviceview.moduleC9300-NM-8X.area {
grid-template-areas:
"x x x x x x x x x x x x x x gigabitethernet0-1 gigabitethernet0-3 gigabitethernet0-5 gigabitethernet0-7 gigabitethernet0-9 gigabitethernet0-11 s0 gigabitethernet0-13 gigabitethernet0-15 gigabitethernet0-17 gigabitethernet0-19 gigabitethernet0-21 gigabitethernet0-23 s1 tengigabitethernet1-1 tengigabitethernet1-3 tengigabitethernet1-5 tengigabitethernet1-7"
"x x x x x x x x x x x x x x gigabitethernet0-2 gigabitethernet0-4 gigabitethernet0-6 gigabitethernet0-8 gigabitethernet0-10 gigabitethernet0-12 s0 gigabitethernet0-14 gigabitethernet0-16 gigabitethernet0-18 gigabitethernet0-20 gigabitethernet0-22 gigabitethernet0-24 s1 tengigabitethernet1-2 tengigabitethernet1-4 tengigabitethernet1-6 tengigabitethernet1-8";
}
It will look like
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netbox_device_view-0.1.15.tar.gz.
File metadata
- Download URL: netbox_device_view-0.1.15.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4949ed0ff7be04d83570d7695b2b92711c0210acd484fc70628bf6943d85b595
|
|
| MD5 |
63c8ff45be3b9ba43cd223a8bba77cee
|
|
| BLAKE2b-256 |
3df33b86591c8464585c9fdd4785250549ffc939b61fbe6c17987ba272a4932a
|
File details
Details for the file netbox_device_view-0.1.15-py3-none-any.whl.
File metadata
- Download URL: netbox_device_view-0.1.15-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f62c83946161b96309b429b7c86040eda2ff5ecf1bf42691ce703ce561988ef
|
|
| MD5 |
da9bd9834a9e414faa6e547da69dc122
|
|
| BLAKE2b-256 |
ad66f00af547392af7b50a233dd5e4850fb1a50c6f9f15ef1e8d70eb9d2652de
|