diff options
author | Håkon Solbjørg <hakon@solbj.org> | 2023-04-04 20:54:50 +0200 |
---|---|---|
committer | Håkon Solbjørg <hakon@solbj.org> | 2023-04-04 20:54:50 +0200 |
commit | dd8b7a1347848d0510030c13563a5c5a209a3e0c (patch) | |
tree | cd3b87632b3acd176ea0ec5eef2ee9627fbae363 /tools | |
parent | d60decb6a46adccd317b65d07c31ef0b9232abad (diff) |
fix(netbox2gondul): Always pick opposite end of cable for the correct variable 😀
Diffstat (limited to 'tools')
-rw-r--r-- | tools/netbox/scripts/netbox2gondul/netbox2gondul.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/netbox/scripts/netbox2gondul/netbox2gondul.py b/tools/netbox/scripts/netbox2gondul/netbox2gondul.py index cf124a7..2a08268 100644 --- a/tools/netbox/scripts/netbox2gondul/netbox2gondul.py +++ b/tools/netbox/scripts/netbox2gondul/netbox2gondul.py @@ -154,8 +154,8 @@ class Netbox2Gondul(Script): first_ae_interface: Interface = uplink_ae.member_interfaces.first() cable: Cable = first_ae_interface.cable # Assuming we only have one entry in the cable termination list. - distro_interface: Interface = cable.a_terminations[0] - distro = distro_interface.device if distro_interface.device != device else cable.b_terminations[0].device + distro_interface: Interface = cable.a_terminations[0] if cable.a_terminations[0].device != device else cable.b_terminations[0] + distro = distro_interface.device # This is the same way as we fetch mgmt vlan in the main run() function. # We could pass it in directly to device_to_gondul(). |