From e3270115a41f7536707cc30cc223c84702b05bd3 Mon Sep 17 00:00:00 2001 From: tze089 Date: Tue, 16 Jan 2024 13:20:23 +0100 Subject: [PATCH] updated pynetbox to 7.2, fixed network.py, based on https://github.com/Solvik/netbox-agent/pull/277#issuecomment-1794355867 --- netbox_agent/network.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox_agent/network.py b/netbox_agent/network.py index 36c9472..cec44d2 100644 --- a/netbox_agent/network.py +++ b/netbox_agent/network.py @@ -544,7 +544,7 @@ def connect_interface_to_switch(self, switch_ip, switch_interface, nb_server_int switch_interface = self.lldp.get_switch_port(nb_server_interface.name) nb_switch_interface = nb.dcim.interfaces.get( - device=nb_switch, + device=nb_switch.name, name=switch_interface, ) if nb_switch_interface is None: diff --git a/requirements.txt b/requirements.txt index 3fe252b..01c63ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ jsonargparse==4.23.1 netaddr==0.8.0 netifaces2==0.0.18 packaging==23.1 -pynetbox==7.0.1 +pynetbox==7.2.0 python-slugify==8.0.1 PyYAML==6.0.1 requests==2.31.0