Skip to content

Release v5.8.18 fix network-groups last page - #36

Merged
qrkourier merged 3 commits into
mainfrom
release-v5.8.18
Apr 18, 2022
Merged

Release v5.8.18 fix network-groups last page #36
qrkourier merged 3 commits into
mainfrom
release-v5.8.18

Conversation

@qrkourier

Copy link
Copy Markdown
Contributor

No description provided.

@qrkourier

Copy link
Copy Markdown
Contributor Author

This works around the API bug (won't fix) where the last page of network groups is never fetched thereby preventing any operation that needs a group from that page.

@qrkourier qrkourier self-assigned this Apr 18, 2022
Comment thread netfoundry/ctl.py
network_group = NetworkGroup(
organization,
group=group if group else None,
group=group,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was removed because the default value is already None and so the if/else flow was superfluous.

Comment thread netfoundry/utility.py
# then yield subsequent pages, if applicable
if get_all_pages: # this is False if param 'page' or 'size' to stop recursion or get a single page
for next_page in range(1, total_pages): # first page is 0
if get_all_pages: # this is False if param 'page' or 'size' to stop recursion or get a single page

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

At this point in the generator function utility.find_generic_resources() we've already gotten the first page and decided to loop over the remaining pages.

@qrkourier
qrkourier merged commit dd61eaa into main Apr 18, 2022
@qrkourier
qrkourier deleted the release-v5.8.18 branch April 18, 2022 17:45
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.

1 participant