Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Solvik
Copy link
Owner

@Solvik Solvik commented Aug 18, 2023

No description provided.

@Solvik Solvik mentioned this pull request Aug 28, 2023
@telsin
Copy link

telsin commented Sep 8, 2023

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
Copy link

dimm0 commented Oct 12, 2023

Any progress? Please?

@tomo-kivra
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants