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

chg: dev: SDK-330: Add page and per-page option to Cluster and ClusterV2 #257

Merged
merged 4 commits into from
Jan 30, 2019

Conversation

akaranjkar-qu
Copy link
Contributor

  • Added page and per_page option to Cluster
  • Added page and per_page option to ClusterV2
  • Fixed a bug with Cluster#list method where providing state param results in TypeError: string indices must be integers

if per_page:
params['per_page'] = per_page
params = None if not params else params
cluster_list = conn.get(cls.rest_entity_path, params=params)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik clusters v1 does not support pagination

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's right. When using v1.2, it just returns all the clusters. Should I modify it to log a warning that v1.2 doesn't support pagination and will list all the clusters?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that should be fine. Also, the code as of now looks like that its going to support pagination, which is not correct, hence remove all these changes.

@akaranjkar-qu
Copy link
Contributor Author

As discussed, logged a warning when pagination options are provided with API v1.2

@msumit msumit merged commit b430170 into qubole:unreleased Jan 30, 2019
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.

2 participants