-
Notifications
You must be signed in to change notification settings - Fork 16
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
Device sync limited to 500. #15
Comments
@shauntilyard this would require pagination support in the code. ciscodnacnetbox/ciscodnacnetbox/ciscodnac/__init__.py Lines 65 to 70 in 56de961
ciscodnacnetbox/ciscodnacnetbox/ciscodnac/data.py Lines 261 to 262 in 56de961
|
Bump, same issue here. No pagination is performed on device import. |
I just followed comment cisco-en-programmability/dnacentersdk#70 (comment) in the link robertcsapo referred to. I didn't use a debugger, or anything, just vim. Worked for me. Just in time for robertcsapo to merge in time for Cisco Live 2024. :) My working dir was --- __init__.py.orig 2024-05-02 16:20:15.155869824 -0400 +++ __init__.py 2024-05-02 17:03:51.544401637 -0400 @@ -66,7 +66,16 @@ """ Get Devices from Cisco DNA Center """ - return tenant.devices.get_device_list().response + max_items = 2 #Here goes API Limit elements per page. + devices = [] + offset = 1 + items = max_items + while items >= max_items: + devices_api = tenant.devices.get_device_list(offset=offset, limit = max_items) + devices.extend(devices_api.response) + offset += max_items + items = len(devices_api.response) + return devices def sites(self, tenant): """ |
Hello, I have DNAC/Netbox integrated but I am hitting a device sync limit I believe. I can only ever discover 500 devices? I can sync them all with no issues. Is there a limit coded somewhere?
The text was updated successfully, but these errors were encountered: