Skip to content

Commit

Permalink
Update netbox_api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chatasos authored Oct 3, 2024
1 parent 5a198a4 commit 28e9fb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions netbox_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, settings):
self.connect_api()
self.verify_compatibility()
self.existing_manufacturers = self.get_manufacturers()
self.device_types = DeviceTypes(self.netbox, self.handle, self.counter, self.ignore_ssl)
self.device_types = DeviceTypes(self.netbox, self.handle, self.counter, self.ignore_ssl, self.new_filters)

def connect_api(self):
try:
Expand Down Expand Up @@ -189,12 +189,13 @@ class DeviceTypes:
def __new__(cls, *args, **kwargs):
return super().__new__(cls)

def __init__(self, netbox, handle, counter, ignore_ssl):
def __init__(self, netbox, handle, counter, ignore_ssl, new_filters):
self.netbox = netbox
self.handle = handle
self.counter = counter
self.existing_device_types = self.get_device_types()
self.ignore_ssl = ignore_ssl
self.new_filters = new_filters

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

0 comments on commit 28e9fb0

Please sign in to comment.