From d2ab05b259ea7fb3de9786d8e324898c1251c303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Solbj=C3=B8rg?= Date: Wed, 22 Mar 2023 20:34:22 +0100 Subject: fix(create-switch): Generate cable path --- tools/netbox/scripts/create-switch/create-switch.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools/netbox/scripts/create-switch/create-switch.py') diff --git a/tools/netbox/scripts/create-switch/create-switch.py b/tools/netbox/scripts/create-switch/create-switch.py index 36477a2..0067200 100644 --- a/tools/netbox/scripts/create-switch/create-switch.py +++ b/tools/netbox/scripts/create-switch/create-switch.py @@ -198,8 +198,7 @@ class CreateSwitch(Script): termination_type=interface_type, ) cable = Cable.objects.get(id=cable.id) - # TODO: fix cables being 'connected' - #cable.a_terminations = [a] - #cable.b_terminations = [b] + # https://github.com/netbox-community/netbox/discussions/10199 + cable._terminations_modified = True cable.save() self.log_success(f"Cabled {data['destination_device']} {a_interface} to {switch} {b_interface}") -- cgit v1.2.3