datacenter / ACI-Pre-Upgrade-Validation-Script

A script to run validations to detect potential issues that may cause an ACI fabric upgrade to fail
https://datacenter.github.io/ACI-Pre-Upgrade-Validation-Script/
Apache License 2.0
43 stars 27 forks source link

Add pagination in `icurl()` to support large amount of objects #174

Closed takishida closed 1 month ago

takishida commented 1 month ago

The current API query example made by icurl():

/api/class/fvIfConn.json

The new API query example with pagination:

/api/class/fvIfConn.json?page=0&page-size=100000

With the pagination, the API query in icurl() will query up to 100K object instances at a time. If there are more objects to be returned, it will automatically query again with the next page such as page=1, page=2 and so on, then it will concatenate all the result as a single list so that the output of icurl() remains the same regardless of the pagination or not.

This enhancement will fix issue #173 and any other failure due to massive amount of objects to be returned.