Skip to content

Commit

Permalink
Update netbox_api.py for netbox 4.1.0
Browse files Browse the repository at this point in the history
print the version number
  • Loading branch information
chatasos authored Oct 3, 2024
1 parent 10e2018 commit 1e1524e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions netbox_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def verify_compatibility(self):
# check if version >= 4.1 in order to use new filter names
if version_split[0] >= 4 and version_split[1] >= 1:
self.new_filters = True
self.handle.log(f'Netbox version {self.netbox.version} found. Using new filters.')

def get_manufacturers(self):
return {str(item): item for item in self.netbox.dcim.manufacturers.all()}
Expand Down

0 comments on commit 1e1524e

Please sign in to comment.