Make netbox_agent compatible with recent Netbox versions and pynetbox v7 #277

Closed
Solvik wants to merge 2 commits from cable into main
Solvik commented 2023-08-18 17:08:59 +02:00 (Migrated from github.com)
No description provided.
telsin commented 2023-09-08 23:44:59 +02:00 (Migrated from github.com)

Any progress on this? I'm using net box 3.6.x and it looks like pynetbox 7.2 (released yesterday) is needed... Just looking to see if it's expected soon, or if I should dive in and see if I can figure it out myself :)

Any progress on this? I'm using net box 3.6.x and it looks like pynetbox 7.2 (released yesterday) is needed... Just looking to see if it's expected soon, or if I should dive in and see if I can figure it out myself :)
dimm0 commented 2023-10-12 21:42:45 +02:00 (Migrated from github.com)

Any progress? Please?

Any progress? Please?
tomo-kivra commented 2023-11-06 10:00:59 +01:00 (Migrated from github.com)

Hi,
I have used this PR on my setup with 2 more changes (see bellow) and it worked:

--- a/netbox_agent/network.py
+++ b/netbox_agent/network.py
@@ -544,7 +544,7 @@ class ServerNetwork(Network):
 
         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:

--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-pynetbox==6.1.2
+pynetbox==7.2.0
 netaddr==0.8.0
 netifaces==0.11.0
 pyyaml==6.0.1

Netbox version: v3.6.4

Hi, I have used this PR on my setup with 2 more changes (see bellow) and it worked: ``` --- a/netbox_agent/network.py +++ b/netbox_agent/network.py @@ -544,7 +544,7 @@ class ServerNetwork(Network): 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: --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -pynetbox==6.1.2 +pynetbox==7.2.0 netaddr==0.8.0 netifaces==0.11.0 pyyaml==6.0.1 ``` Netbox version: v3.6.4

Pull request closed

Sign in to join this conversation.
No description provided.