-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Enabled --page-size
as global argument.
#889
Conversation
@@ -546,6 +546,8 @@ def invoke(self, operation_object, parameters, parsed_globals): | |||
endpoint_url=parsed_globals.endpoint_url, | |||
verify=parsed_globals.verify_ssl) | |||
if operation_object.can_paginate and parsed_globals.paginate: | |||
if getattr(parsed_globals, 'page_size', None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is getattr() needed here? If it's a global arg you should just be able to access parsed_globals.page_size
directly right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the unit test failed via a key error when I did not use getattr()
. I am going to change it and see if the unit tests need to be updated or something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the test just needed to be updated.
Overall looks good, just a few questions above. |
The page size controls the amount of items returned by each page while paginating. Smoke tests were added for ``ec2`` and ``s3api`` to ensure the parameter does what is expected to do for known paginating operations.
Changes based on comments are in the latest commit |
Looks good. |
Enabled ``--page-size`` as global argument.
The page size controls the amount of items returned by
each page while paginating. Smoke tests were added for
ec2
and
s3api
to ensure the parameter does what is expected todo for known paginating operations.
cc @jamesls @danielgtaylor