Skip to content

Commit fe49d0a

Browse files
authored
Fix path trace usage (#27)
* Fix cable trace method usage. termination_a.trace returns 3 values after Netbox 2.8.7 release. In previous versions, there were 2 returned values. Actual trace result which is used by the plugin is the first argument in the list. * v0.6.4 Co-authored-by: Debug All <iDebugAll@gmail.com>
1 parent 212951f commit fe49d0a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
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 = 'Test'
7-
version = '0.6.3'
7+
version = '0.6.4'
88
author = 'Igor Korotchenkov'
99
author_email = 'iDebugAll@gmail.com'
1010
base_url = 'nextbox-ui'

nextbox_ui_plugin/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,10 @@ def get_site_topology(site_id):
301301
"srcIfName": if_shortname(link.termination_a.name),
302302
"tgtIfName": if_shortname(link.termination_b.name)
303303
})
304-
cable_path, endpoint = link.termination_a.trace()
304+
trace_result = link.termination_a.trace()
305+
if not trace_result:
306+
continue
307+
cable_path, *ignore = trace_result
305308
# identify segmented cable paths between end-devices
306309
if len(cable_path) < 2:
307310
continue

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.6.3',
10+
version='0.6.4',
1111
url='https://github.com/iDebugAll/nextbox-ui-plugin',
12-
download_url='https://github.com/iDebugAll/nextbox-ui-plugin/archive/v0.6.3.tar.gz',
12+
download_url='https://github.com/iDebugAll/nextbox-ui-plugin/archive/v0.6.4.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)