From dd8b7a1347848d0510030c13563a5c5a209a3e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Solbj=C3=B8rg?= Date: Tue, 4 Apr 2023 20:54:50 +0200 Subject: =?UTF-8?q?fix(netbox2gondul):=20Always=20pick=20opposite=20end=20?= =?UTF-8?q?of=20cable=20for=20the=20correct=20variable=20=F0=9F=98=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/netbox/scripts/netbox2gondul/netbox2gondul.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/netbox/scripts/netbox2gondul/netbox2gondul.py') 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(). -- cgit v1.2.3