netbox-topology-plugin


Namenetbox-topology-plugin JSON
Version 0.14.2 PyPI version JSON
download
home_page
SummaryNetbox Topology Plugin, fork of netbox-topology-plugin. Powered by NextUI
upload_time2024-03-07 05:26:38
maintainer
docs_urlNone
author
requires_python>=3.9
licenseMIT License Copyright (c) 2024 Daniel Sheppard Copyright (c) 2020 Igor Korotchenkov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords netbox-plugin netbox-topology
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NetBox Topology Plugin

A topology visualization plugin for [NetBox](https://github.com/netbox-community/netbox) powered by [NextUI](https://developer.cisco.com/site/neXt/) Toolkit. Netbox v2.8.0+ is required.

# Installation

General installation steps and considerations follow the [official guidelines](https://netbox.readthedocs.io/en/stable/plugins/).

### Package Installation from PyPi

Assuming you use a Virtual Environment for Netbox:
```
$ source /opt/netbox/venv/bin/activate
(venv) $ pip3 install netbox-topology-plugin-plugin
```

### Package Installation from Source Code
The source code is available on [GitHub](https://github.com/DanSheps/netbox-topology-plugin-plugin).<br/>
Download and install the package. Assuming you use a Virtual Environment for Netbox:
```
$ git clone https://github.com/DanSheps/netbox-topology-plugin-plugin
$ cd netbox-topology-plugin-plugin
$ source /opt/netbox/venv/bin/activate
(venv) $ pip3 install .
```

To ensure NetBox Topology 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-topology-plugin-plugin` package:

```no-highlight
# echo netbox-topology-plugin-plugin >> local_requirements.txt
```

### Enable the Plugin
In a global Netbox **configuration.py** configuration file, update or add PLUGINS parameter:
```python
PLUGINS = [
    'netbox_topology_plugin',
]
```

Optionally, update a PLUGINS_CONFIG parameter in **configuration.py** to rewrite default plugin behavior:
```python
#PLUGINS_CONFIG = {
#    'netbox_topology_plugin': {
#        'layers_sort_order': (
#            ADD YOUR SETTINGS HERE
#            layer_sort_order is a tuple
#        ),
#        'icon_model_map': {
#            ADD YOUR SETTINGS HERE
#            icon_model_map is a dict
#        },
#        'icon_role_map': {
#            ADD YOUR SETTINGS HERE
#            icon_role_map is a dict
#        }
#        'undisplayed_device_role_slugs': (
# #          ADD YOUR SETTINGS HERE
#            undisplayed_device_role_slugs value is a list or a tuple
#            Listed device role slugs are hidden on initial view load,
#            you may then hide/display any layer with a control button.
#        ),
#        'undisplayed_device_tags': (
#           ADD YOUR SETTINGS HERE
#           undisplayed_device_tags value is a list or a tuple of regex strings.
#           Devices with tags matching any of listed regular expressions are hidden
#           on initial view load, you may then hide/display any layer with a control button.
#        ),
#        'select_layers_list_include_device_tags': (
#           ADD YOUR SETTINGS HERE
#           select_layers_list_include_device_tags value is a list or a tuple of regex strings.
#           Use this parameter to control tags listed in Select Layers menu.
#           If specified, it works as allow list.
#        ),
#        'select_layers_list_exclude_device_tags': (
#           ADD YOUR SETTINGS HERE
#           select_layers_list_exclude_device_tags value is a list or a tuple of regex strings.
#           Use this parameter to control tags listed in Select Layers menu.
#           If specified, it filters out matched tags from the list, except ones mathcing 'undisplayed_device_tags'.
#        ),
#        'DISPLAY_PASSIVE_DEVICES': True|False,
#        'DISPLAY_LOGICAL_MULTICABLE_LINKS': True|False,
#        'DISPLAY_UNCONNECTED': True|False,
#        'INITIAL_LAYOUT': 'vertical'|'horizontal'|'auto'
#    }
#}
```
By default, the Plugin orders devices on a visualized topology based their roles in Netbox device attributes.<br/> This order may be controlled by 'layers_sort_order' parameter. Default sort order includes most commonly used naming conventions:
```
(
    'undefined',
    'outside',
    'border',
    'edge',
    'edge-switch',
    'edge-router',
    'core',
    'core-router',
    'core-switch',
    'distribution',
    'distribution-router',
    'distribution-switch',
    'leaf',
    'spine',
    'access',
    'access-switch',
)
```

By default, the Plugin automatically tries to identify the device icon type based on following logic:
1. 'icon_{icon_type}' tag in the Netbox Device tags.
   Assign a tag to the device to manually control the displayed icon type (e.g. 'icon_router' or 'icon_switch').
   Supported icon types:
```
{
    'switch',
    'router',
    'firewall',
    'wlc',
    'unknown',
    'server',
    'phone',
    'nexus5000',
    'ipphone',
    'host',
    'camera',
    'accesspoint',
    'groups',
    'groupm',
    'groupl',
    'cloud',
    'unlinked',
    'hostgroup',
    'wirelesshost',
}
```
2. If no valid 'icon_{icon_type}' tags found, the Plugin checks the default icon to device_type mapping. You can control this behavior with 'icon_model_map' dict. The Plugin checks for substring in a full device_type attribute. Default mapping:

```
{
    'CSR1000V': 'router',
    'Nexus': 'switch',
    'IOSXRv': 'router',
    'IOSv': 'switch',
    '2901': 'router',
    '2911': 'router',
    '2921': 'router',
    '2951': 'router',
    '4321': 'router',
    '4331': 'router',
    '4351': 'router',
    '4421': 'router',
    '4431': 'router',
    '4451': 'router',
    '2960': 'switch',
    '3750': 'switch',
    '3850': 'switch',
    'ASA': 'firewall',
}
```
Keys are searched substrings. Values should be valid icon types as listed above.<br/>

3. If no match found on steps 1-2, the Plugin checks the Device Role slug to Icon mapping.<br/>
This mapping may be defined within 'icon_role_map' dict in Plugin parameters.<br/>
Default mapping already contains some general categories:
```
{
    'border': 'router',
    'edge-switch': 'switch',
    'edge-router': 'router',
    'core-router': 'router',
    'core-switch': 'switch',
    'distribution': 'switch',
    'distribution-router': 'router',
    'distribution-switch': 'switch',
    'leaf': 'switch',
    'spine': 'switch',
    'access': 'switch',
    'access-switch': 'switch',
}
```

4. Default value is 'unknown' (renders as a question mark icon).
<br/><br/>

The Plugin can control the visibility of the layers and/or specific nodes on the topology view.<br/>
The visibility control is currently implemented for specific device roles, device tags, unconnected devices, and passive devices:<br/>

  - Initial visibility behavior for specific device roles is controlled by 'undisplayed_device_role_slugs' plugin parameter. Listed device role slugs are hidden on initial view load, you may then hide/display any layer with a control button on the topology view page.<br/>

  - Initial visibility behavior for specific device tags is controlled by 'undisplayed_device_tags' plugin parameter. Devices with tags matching listed tag regular expressions are hidden on initial view load, you may then hide/display any layer with a control button on the topology view page.<br/>
  By default, the plugin lists all discovered device tags in Select Layers menu. You can use 'select_layers_list_include_device_tags' and 'select_layers_list_exclude_device_tags' plugin parameters to filter the included tags.<br/>
  All three tag visibility control parameters are optional lists of regular expressions. Tags matching 'undisplayed_device_tags' are always listed in Select Layers menu. Empty or unset 'select_layers_list_include_device_tags' allows all discovered tags to be listed in Select layers menu. If set, 'select_layers_list_include_device_tags' works as an allow list for matched tags. 'select_layers_list_exclude_device_tags' filters out matched tags from the list, excpept for ones matching 'undisplayed_device_tags'.

  - Initial visibility behavior for unconnected nodes is controlled by DISPLAY_UNCONNECTED boolean plugin parameter.<br/>
  By default, unconnected nodes are being displayed. Set DISPLAY_UNCONNECTED to False to hide them on initial topology view load.<br/>
  A separate 'Hide/Display Unconnected' button may then be used to hide or display those nodes.

  - Initial visibility for passive devices (patch panels, PDUs) is controlled by DISPLAY_PASSIVE_DEVICES boolean plugin parameter. A device is considered passive if it has cables connected to Front and Rear Ports only and not to Interfaces.<br/>Passive devices are hidden by default. You can display them with 'Display Passive Devices' button on the topology view page. <br/>
  Actual multi-cable connections between the end-devices a replaced by the direct logical connection once the passive devices are hidden. This logical direct link may be displayed regardless of the passive device visibility in addition to the cabling across patch panels if you set DISPLAY_LOGICAL_MULTICABLE_LINKS plugin parameter to True. DISPLAY_LOGICAL_MULTICABLE_LINKS is set to False by default. This parameter only affects the initial logical link visibility. With hidden passive devices, it is always being displayed.<br/>
<br/>

Device layers are ordered automatically by default. You can control this behavior with INITIAL_LAYOUT plugin parameter. Valid options are 'vertical', 'horizontal', and 'auto'.<br/>
'auto' layout relies on NeXt UI dataprocessor best-effort algorithms. It spreads the Nodes across the view so they would be as distant from each other as possible. You may use it if the vertical and horizontal initial layout does not work properly in your browser (this is the issue to be fixed).



### Collect Static Files
The Plugin contains static files for topology visualization. They should be served directly by the HTTP frontend. In order to collect them from the package to the Netbox static root directory use the following command:
```
(venv) $ cd /opt/netbox/netbox/
(venv) $ python3 manage.py collectstatic
```

### Apply Database Migrations

> For plugin version 0.8.0 and above.

Apply database migrations with Django `manage.py`:
```
(venv) $ python3 manage.py migrate
```

### Restart Netbox
Restart the WSGI service to apply changes:
```
sudo systemctl restart netbox
```

# Installation with Docker
The Plugin may be installed in a Netbox Docker deployment. 
The package contains a Dockerfile for [Netbox-Community Docker](https://github.com/netbox-community/netbox-docker) extension. Latest-LDAP version is used by default as a source.<br/>
Download the Plugin and build from the source:
```
$ git clone https://github.com/DanSheps/netbox-topology-plugin-plugin
$ cd netbox-topology-plugin-plugin
$ docker build -t netbox-custom .
```
Update a netbox image name in **docker-compose.yml** in a Netbox Community Docker project root:
```yaml
services:
  netbox: &netbox
    image: netbox-custom:latest
```
Update a **configuration.py**. It is stored in netbox-docker/configuration/ by default. Update or add PLUGINS parameter and PLUGINS_CONFIG parameter as described above.

Rebuild the running docker containers:
```
$ cd netbox-docker
$ docker-compose down
$ docker-compose up -d
```
Netbox Community Docker setup performs static file collection and database migrations on every startup. No manual actions are required.

# Fixing Common Installation and Post-Upgrade Issues

If you are experiencing some unexpected errors or visual behaviors after the installation or upgrade, please make sure that you execute the following steps first:

1. Clear your browser cache and reload the page.
2. Re-collect static files: `(venv) $ python3 manage.py collectstatic --clear`.
3. Re-apply database migrations: `(venv) $ python3 manage.py migrate`.

# Usage

Once installed and initialized, the Plugin runs on a backend.<br/>
The Plugin supports a topology visualization of arbitrary sets of Sites and Regions.<br/>
<br/>
You can access Topology visualizations in different ways:
1. By clicking a custom plugin Topology button on a Site page.
![](samples/sample_topology_button.png)
The Site topology visualization will open in a pop-up window:
![](samples/sample_topology_view.png)<br/>
Nodes are draggable and clickable:
![](samples/sample_node_tooltip_content.png)<br/>
You can switch between vertical and horizontal layers sort order back and forth. Default is vertical.<br/>

2. Using Plugins dropdown menu item: *Plugins -> NetBox Topology -> Topology Viewer*.<br/>
Use Search form controls to pick desired Sites, Regions, or Devices.<br/>
![](samples/sample_topology_viewer_page01.png)
<br/>

### Visibility control

You can display or hide any specific device roles on the topology view with 'Select Layer' button:
![](samples/sample_layer_visibility.png)<br/>
The list of available device roles is generated automatically based on discovered devices for a visualized site.<br/>
<br/>
'Display/Hide Unconnected' button hides or displays the devices with no links attached.<br/>
<br/>
'Display/Hide Passive Devices' buttons hides or displays the passive devices (patch pannels, PDUs, etc).<br/>
<br/>
In a samples below, edge-sw01 is connected with core-rtr01 and core-rtr02 through Patch Panel A and Patch Panel B with multiple cable hops:<br/>
![](samples/sample_patch_panels.png)<br/>
Once you hide the passive devices (default state), a logical direct link shows up between the edge switch and the core routers:<br/>
![](samples/sample_hide_passive.png)<br/>
If DISPLAY_LOGICAL_MULTICABLE_LINKS is set to True (default is False) this logical link is displayed initially:<br/>
![](samples/sample_display_logical_link.png)

### Required Netbox User Permissions
The Plugin requires the following user permissions to access the topology view:

  - dcim | site   | Can read site
  - dcim | device | Can view device
  - dcim | cable  | Can view cable

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "netbox-topology-plugin",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Daniel Sheppard <dans@dansheps.com>",
    "keywords": "netbox-plugin,netbox-topology",
    "author": "",
    "author_email": "Daniel Sheppard <dans@dansheps.com>, Igor Korotchenkov <iDebugAll@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/1b/3c/7dbabb0a786cee1cb8a26915add5c4f4583ba7a74d6a8c090a627afcbae0/netbox-topology-plugin-0.14.2.tar.gz",
    "platform": null,
    "description": "# NetBox Topology Plugin\n\nA topology visualization plugin for [NetBox](https://github.com/netbox-community/netbox) powered by [NextUI](https://developer.cisco.com/site/neXt/) Toolkit. Netbox v2.8.0+ is required.\n\n# Installation\n\nGeneral installation steps and considerations follow the [official guidelines](https://netbox.readthedocs.io/en/stable/plugins/).\n\n### Package Installation from PyPi\n\nAssuming you use a Virtual Environment for Netbox:\n```\n$ source /opt/netbox/venv/bin/activate\n(venv) $ pip3 install netbox-topology-plugin-plugin\n```\n\n### Package Installation from Source Code\nThe source code is available on [GitHub](https://github.com/DanSheps/netbox-topology-plugin-plugin).<br/>\nDownload and install the package. Assuming you use a Virtual Environment for Netbox:\n```\n$ git clone https://github.com/DanSheps/netbox-topology-plugin-plugin\n$ cd netbox-topology-plugin-plugin\n$ source /opt/netbox/venv/bin/activate\n(venv) $ pip3 install .\n```\n\nTo ensure NetBox Topology 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-topology-plugin-plugin` package:\n\n```no-highlight\n# echo netbox-topology-plugin-plugin >> local_requirements.txt\n```\n\n### Enable the Plugin\nIn a global Netbox **configuration.py** configuration file, update or add PLUGINS parameter:\n```python\nPLUGINS = [\n    'netbox_topology_plugin',\n]\n```\n\nOptionally, update a PLUGINS_CONFIG parameter in **configuration.py** to rewrite default plugin behavior:\n```python\n#PLUGINS_CONFIG = {\n#    'netbox_topology_plugin': {\n#        'layers_sort_order': (\n#            ADD YOUR SETTINGS HERE\n#            layer_sort_order is a tuple\n#        ),\n#        'icon_model_map': {\n#            ADD YOUR SETTINGS HERE\n#            icon_model_map is a dict\n#        },\n#        'icon_role_map': {\n#            ADD YOUR SETTINGS HERE\n#            icon_role_map is a dict\n#        }\n#        'undisplayed_device_role_slugs': (\n# #          ADD YOUR SETTINGS HERE\n#            undisplayed_device_role_slugs value is a list or a tuple\n#            Listed device role slugs are hidden on initial view load,\n#            you may then hide/display any layer with a control button.\n#        ),\n#        'undisplayed_device_tags': (\n#           ADD YOUR SETTINGS HERE\n#           undisplayed_device_tags value is a list or a tuple of regex strings.\n#           Devices with tags matching any of listed regular expressions are hidden\n#           on initial view load, you may then hide/display any layer with a control button.\n#        ),\n#        'select_layers_list_include_device_tags': (\n#           ADD YOUR SETTINGS HERE\n#           select_layers_list_include_device_tags value is a list or a tuple of regex strings.\n#           Use this parameter to control tags listed in Select Layers menu.\n#           If specified, it works as allow list.\n#        ),\n#        'select_layers_list_exclude_device_tags': (\n#           ADD YOUR SETTINGS HERE\n#           select_layers_list_exclude_device_tags value is a list or a tuple of regex strings.\n#           Use this parameter to control tags listed in Select Layers menu.\n#           If specified, it filters out matched tags from the list, except ones mathcing 'undisplayed_device_tags'.\n#        ),\n#        'DISPLAY_PASSIVE_DEVICES': True|False,\n#        'DISPLAY_LOGICAL_MULTICABLE_LINKS': True|False,\n#        'DISPLAY_UNCONNECTED': True|False,\n#        'INITIAL_LAYOUT': 'vertical'|'horizontal'|'auto'\n#    }\n#}\n```\nBy default, the Plugin orders devices on a visualized topology based their roles in Netbox device attributes.<br/> This order may be controlled by 'layers_sort_order' parameter. Default sort order includes most commonly used naming conventions:\n```\n(\n    'undefined',\n    'outside',\n    'border',\n    'edge',\n    'edge-switch',\n    'edge-router',\n    'core',\n    'core-router',\n    'core-switch',\n    'distribution',\n    'distribution-router',\n    'distribution-switch',\n    'leaf',\n    'spine',\n    'access',\n    'access-switch',\n)\n```\n\nBy default, the Plugin automatically tries to identify the device icon type based on following logic:\n1. 'icon_{icon_type}' tag in the Netbox Device tags.\n   Assign a tag to the device to manually control the displayed icon type (e.g. 'icon_router' or 'icon_switch').\n   Supported icon types:\n```\n{\n    'switch',\n    'router',\n    'firewall',\n    'wlc',\n    'unknown',\n    'server',\n    'phone',\n    'nexus5000',\n    'ipphone',\n    'host',\n    'camera',\n    'accesspoint',\n    'groups',\n    'groupm',\n    'groupl',\n    'cloud',\n    'unlinked',\n    'hostgroup',\n    'wirelesshost',\n}\n```\n2. If no valid 'icon_{icon_type}' tags found, the Plugin checks the default icon to device_type mapping. You can control this behavior with 'icon_model_map' dict. The Plugin checks for substring in a full device_type attribute. Default mapping:\n\n```\n{\n    'CSR1000V': 'router',\n    'Nexus': 'switch',\n    'IOSXRv': 'router',\n    'IOSv': 'switch',\n    '2901': 'router',\n    '2911': 'router',\n    '2921': 'router',\n    '2951': 'router',\n    '4321': 'router',\n    '4331': 'router',\n    '4351': 'router',\n    '4421': 'router',\n    '4431': 'router',\n    '4451': 'router',\n    '2960': 'switch',\n    '3750': 'switch',\n    '3850': 'switch',\n    'ASA': 'firewall',\n}\n```\nKeys are searched substrings. Values should be valid icon types as listed above.<br/>\n\n3. If no match found on steps 1-2, the Plugin checks the Device Role slug to Icon mapping.<br/>\nThis mapping may be defined within 'icon_role_map' dict in Plugin parameters.<br/>\nDefault mapping already contains some general categories:\n```\n{\n    'border': 'router',\n    'edge-switch': 'switch',\n    'edge-router': 'router',\n    'core-router': 'router',\n    'core-switch': 'switch',\n    'distribution': 'switch',\n    'distribution-router': 'router',\n    'distribution-switch': 'switch',\n    'leaf': 'switch',\n    'spine': 'switch',\n    'access': 'switch',\n    'access-switch': 'switch',\n}\n```\n\n4. Default value is 'unknown' (renders as a question mark icon).\n<br/><br/>\n\nThe Plugin can control the visibility of the layers and/or specific nodes on the topology view.<br/>\nThe visibility control is currently implemented for specific device roles, device tags, unconnected devices, and passive devices:<br/>\n\n  - Initial visibility behavior for specific device roles is controlled by 'undisplayed_device_role_slugs' plugin parameter. Listed device role slugs are hidden on initial view load, you may then hide/display any layer with a control button on the topology view page.<br/>\n\n  - Initial visibility behavior for specific device tags is controlled by 'undisplayed_device_tags' plugin parameter. Devices with tags matching listed tag regular expressions are hidden on initial view load, you may then hide/display any layer with a control button on the topology view page.<br/>\n  By default, the plugin lists all discovered device tags in Select Layers menu. You can use 'select_layers_list_include_device_tags' and 'select_layers_list_exclude_device_tags' plugin parameters to filter the included tags.<br/>\n  All three tag visibility control parameters are optional lists of regular expressions. Tags matching 'undisplayed_device_tags' are always listed in Select Layers menu. Empty or unset 'select_layers_list_include_device_tags' allows all discovered tags to be listed in Select layers menu. If set, 'select_layers_list_include_device_tags' works as an allow list for matched tags. 'select_layers_list_exclude_device_tags' filters out matched tags from the list, excpept for ones matching 'undisplayed_device_tags'.\n\n  - Initial visibility behavior for unconnected nodes is controlled by DISPLAY_UNCONNECTED boolean plugin parameter.<br/>\n  By default, unconnected nodes are being displayed. Set DISPLAY_UNCONNECTED to False to hide them on initial topology view load.<br/>\n  A separate 'Hide/Display Unconnected' button may then be used to hide or display those nodes.\n\n  - Initial visibility for passive devices (patch panels, PDUs) is controlled by DISPLAY_PASSIVE_DEVICES boolean plugin parameter. A device is considered passive if it has cables connected to Front and Rear Ports only and not to Interfaces.<br/>Passive devices are hidden by default. You can display them with 'Display Passive Devices' button on the topology view page. <br/>\n  Actual multi-cable connections between the end-devices a replaced by the direct logical connection once the passive devices are hidden. This logical direct link may be displayed regardless of the passive device visibility in addition to the cabling across patch panels if you set DISPLAY_LOGICAL_MULTICABLE_LINKS plugin parameter to True. DISPLAY_LOGICAL_MULTICABLE_LINKS is set to False by default. This parameter only affects the initial logical link visibility. With hidden passive devices, it is always being displayed.<br/>\n<br/>\n\nDevice layers are ordered automatically by default. You can control this behavior with INITIAL_LAYOUT plugin parameter. Valid options are 'vertical', 'horizontal', and 'auto'.<br/>\n'auto' layout relies on NeXt UI dataprocessor best-effort algorithms. It spreads the Nodes across the view so they would be as distant from each other as possible. You may use it if the vertical and horizontal initial layout does not work properly in your browser (this is the issue to be fixed).\n\n\n\n### Collect Static Files\nThe Plugin contains static files for topology visualization. They should be served directly by the HTTP frontend. In order to collect them from the package to the Netbox static root directory use the following command:\n```\n(venv) $ cd /opt/netbox/netbox/\n(venv) $ python3 manage.py collectstatic\n```\n\n### Apply Database Migrations\n\n> For plugin version 0.8.0 and above.\n\nApply database migrations with Django `manage.py`:\n```\n(venv) $ python3 manage.py migrate\n```\n\n### Restart Netbox\nRestart the WSGI service to apply changes:\n```\nsudo systemctl restart netbox\n```\n\n# Installation with Docker\nThe Plugin may be installed in a Netbox Docker deployment. \nThe package contains a Dockerfile for [Netbox-Community Docker](https://github.com/netbox-community/netbox-docker) extension. Latest-LDAP version is used by default as a source.<br/>\nDownload the Plugin and build from the source:\n```\n$ git clone https://github.com/DanSheps/netbox-topology-plugin-plugin\n$ cd netbox-topology-plugin-plugin\n$ docker build -t netbox-custom .\n```\nUpdate a netbox image name in **docker-compose.yml** in a Netbox Community Docker project root:\n```yaml\nservices:\n  netbox: &netbox\n    image: netbox-custom:latest\n```\nUpdate a **configuration.py**. It is stored in netbox-docker/configuration/ by default. Update or add PLUGINS parameter and PLUGINS_CONFIG parameter as described above.\n\nRebuild the running docker containers:\n```\n$ cd netbox-docker\n$ docker-compose down\n$ docker-compose up -d\n```\nNetbox Community Docker setup performs static file collection and database migrations on every startup. No manual actions are required.\n\n# Fixing Common Installation and Post-Upgrade Issues\n\nIf you are experiencing some unexpected errors or visual behaviors after the installation or upgrade, please make sure that you execute the following steps first:\n\n1. Clear your browser cache and reload the page.\n2. Re-collect static files: `(venv) $ python3 manage.py collectstatic --clear`.\n3. Re-apply database migrations: `(venv) $ python3 manage.py migrate`.\n\n# Usage\n\nOnce installed and initialized, the Plugin runs on a backend.<br/>\nThe Plugin supports a topology visualization of arbitrary sets of Sites and Regions.<br/>\n<br/>\nYou can access Topology visualizations in different ways:\n1. By clicking a custom plugin Topology button on a Site page.\n![](samples/sample_topology_button.png)\nThe Site topology visualization will open in a pop-up window:\n![](samples/sample_topology_view.png)<br/>\nNodes are draggable and clickable:\n![](samples/sample_node_tooltip_content.png)<br/>\nYou can switch between vertical and horizontal layers sort order back and forth. Default is vertical.<br/>\n\n2. Using Plugins dropdown menu item: *Plugins -> NetBox Topology -> Topology Viewer*.<br/>\nUse Search form controls to pick desired Sites, Regions, or Devices.<br/>\n![](samples/sample_topology_viewer_page01.png)\n<br/>\n\n### Visibility control\n\nYou can display or hide any specific device roles on the topology view with 'Select Layer' button:\n![](samples/sample_layer_visibility.png)<br/>\nThe list of available device roles is generated automatically based on discovered devices for a visualized site.<br/>\n<br/>\n'Display/Hide Unconnected' button hides or displays the devices with no links attached.<br/>\n<br/>\n'Display/Hide Passive Devices' buttons hides or displays the passive devices (patch pannels, PDUs, etc).<br/>\n<br/>\nIn a samples below, edge-sw01 is connected with core-rtr01 and core-rtr02 through Patch Panel A and Patch Panel B with multiple cable hops:<br/>\n![](samples/sample_patch_panels.png)<br/>\nOnce you hide the passive devices (default state), a logical direct link shows up between the edge switch and the core routers:<br/>\n![](samples/sample_hide_passive.png)<br/>\nIf DISPLAY_LOGICAL_MULTICABLE_LINKS is set to True (default is False) this logical link is displayed initially:<br/>\n![](samples/sample_display_logical_link.png)\n\n### Required Netbox User Permissions\nThe Plugin requires the following user permissions to access the topology view:\n\n  - dcim | site   | Can read site\n  - dcim | device | Can view device\n  - dcim | cable  | Can view cable\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Daniel Sheppard Copyright (c) 2020 Igor Korotchenkov  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Netbox Topology Plugin, fork of netbox-topology-plugin.  Powered by NextUI",
    "version": "0.14.2",
    "project_urls": {
        "Documentation": "https://github.com/dansheps/netbox-topology-plugin/blob/main/README.md",
        "Source": "https://github.com/dansheps/netbox-topology-plugin",
        "Tracker": "https://github.com/dansheps/netbox-topology-plugin/issues"
    },
    "split_keywords": [
        "netbox-plugin",
        "netbox-topology"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "512fed948eb69ad7bf1e921036f85856432e765317abe522797058f4c54ab100",
                "md5": "85ece49852e4283135318271dfca489b",
                "sha256": "20b1577e73166538e03abb071cc5ec62bd7322111117b67f1882a06d6d8239aa"
            },
            "downloads": -1,
            "filename": "netbox_topology_plugin-0.14.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "85ece49852e4283135318271dfca489b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 1260638,
            "upload_time": "2024-03-07T05:26:36",
            "upload_time_iso_8601": "2024-03-07T05:26:36.733244Z",
            "url": "https://files.pythonhosted.org/packages/51/2f/ed948eb69ad7bf1e921036f85856432e765317abe522797058f4c54ab100/netbox_topology_plugin-0.14.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1b3c7dbabb0a786cee1cb8a26915add5c4f4583ba7a74d6a8c090a627afcbae0",
                "md5": "e6a792b1a36e01708098de8e1c77e68f",
                "sha256": "706a886e2c1a1ca225beef26809e7e7a9ff88df74b4cf12617ceaadfcc3d9d08"
            },
            "downloads": -1,
            "filename": "netbox-topology-plugin-0.14.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e6a792b1a36e01708098de8e1c77e68f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 1120803,
            "upload_time": "2024-03-07T05:26:38",
            "upload_time_iso_8601": "2024-03-07T05:26:38.471293Z",
            "url": "https://files.pythonhosted.org/packages/1b/3c/7dbabb0a786cee1cb8a26915add5c4f4583ba7a74d6a8c090a627afcbae0/netbox-topology-plugin-0.14.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-07 05:26:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dansheps",
    "github_project": "netbox-topology-plugin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "netbox-topology-plugin"
}
        
Elapsed time: 0.21156s