Skip to content

Commit 2fc1b3b

Browse files
authored
Exclude CircuitTermination-connected links while generating the topology. (#132)
1 parent bdeeec5 commit 2fc1b3b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

nextbox_ui_plugin/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class NextBoxUIConfig(PluginConfig):
44
name = 'nextbox_ui_plugin'
55
verbose_name = 'NextBox UI'
66
description = 'A topology visualization plugin for Netbox powered by NextUI Toolkit.'
7-
version = '0.12.0'
7+
version = '0.13.0'
88
author = 'Igor Korotchenkov'
99
author_email = 'iDebugAll@gmail.com'
1010
base_url = 'nextbox-ui'

nextbox_ui_plugin/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django.views.generic import View
55
from dcim.models import Cable, Device, Interface, DeviceRole, PowerFeed
66
from ipam.models import VLAN
7+
from circuits.models import CircuitTermination
78
from .models import SavedTopology
89
from . import forms, filters
910
from django.contrib.auth.mixins import PermissionRequiredMixin
@@ -404,6 +405,9 @@ def get_topology(nb_devices_qs):
404405
# Exclude PowerFeed-connected links
405406
if (isinstance(link.a_terminations[0], PowerFeed) or (isinstance(link.b_terminations[0], PowerFeed))):
406407
continue
408+
# Exclude CircuitTermination-connected links
409+
if (isinstance(link.a_terminations[0], CircuitTermination) or (isinstance(link.b_terminations[0], CircuitTermination))):
410+
continue
407411
# Include links to discovered devices only
408412
if link.b_terminations[0].device_id in device_ids:
409413
links.append(link)

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
setup(
99
name='nextbox_ui_plugin',
10-
version='0.12.0',
10+
version='0.13.0',
1111
url='https://github.com/iDebugAll/nextbox-ui-plugin',
12-
download_url='https://github.com/iDebugAll/nextbox-ui-plugin/archive/v0.12.0.tar.gz',
12+
download_url='https://github.com/iDebugAll/nextbox-ui-plugin/archive/v0.13.0.tar.gz',
1313
description='A topology visualization plugin for Netbox powered by NextUI Toolkit.',
1414
long_description=long_description,
1515
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)