aboutsummaryrefslogtreecommitdiffstats
path: root/tools/netbox/scripts/create-switch/create-switch.py
diff options
context:
space:
mode:
authorHåkon Solbjørg <hakon@solbj.org>2023-03-22 20:34:22 +0100
committerHåkon Solbjørg <hakon@solbj.org>2023-03-22 20:34:22 +0100
commitd2ab05b259ea7fb3de9786d8e324898c1251c303 (patch)
tree4166284ca853cb5141113b6b33c44b477bdaf580 /tools/netbox/scripts/create-switch/create-switch.py
parent86515caebce048f9cace539066b8d1e6a6daac4d (diff)
fix(create-switch): Generate cable path
Diffstat (limited to 'tools/netbox/scripts/create-switch/create-switch.py')
-rw-r--r--tools/netbox/scripts/create-switch/create-switch.py5
1 files changed, 2 insertions, 3 deletions
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}")