mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2026-03-21 20:18:38 -06:00
Modified API call to sites.all for testing the API connection to devices.count.
This commit is contained in:
@@ -91,7 +91,7 @@ class Sync:
|
|||||||
logger.debug("NetBox version is %s.", nb_version)
|
logger.debug("NetBox version is %s.", nb_version)
|
||||||
# Test API access by attempting to access a basic endpoint
|
# Test API access by attempting to access a basic endpoint
|
||||||
# This will catch authorization errors early
|
# This will catch authorization errors early
|
||||||
netbox.dcim.sites.all()
|
netbox.dcim.devices.count()
|
||||||
self.netbox = netbox
|
self.netbox = netbox
|
||||||
self.nb_version = nb_version
|
self.nb_version = nb_version
|
||||||
except RequestsConnectionError:
|
except RequestsConnectionError:
|
||||||
|
|||||||
Reference in New Issue
Block a user