Skip to content
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

Pagination Support #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lukesneeringer
Copy link

Rackspace paginates any list-esque calls to their API. Therefore, such calls from rackdns will return only the first 100 results. If you have more than 100 records (say, because you have lots of subdomains on a given domain), it is impossible to see the ones beyond the first 100 with this tool.

This pull request adds support for pagination, automatically detecting if a totalEntries key is sent down that is greater than 100 and making additional requests using the offset GET key until all records have been retrieved.

It also fixes a slight bug with error handling.

This commit addresses an issue where sometimes Rackspace sends down the
error dict directrly, rather than with "message" and "detail" nested
within another key.

This will make the error be processed correctly in either case. It also
adds the details to the error string on the output, when available.
This commit adds support for listing records beyond the first 100, by
detecting and following Rackspace pagination markers.
@nibalizer
Copy link

This worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants