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

Add pagination to certificate data source #1075

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

wsquan171
Copy link
Contributor

@wsquan171 wsquan171 commented Jan 3, 2024

This PR adds pagination support to certificate data source when getting a cert by name.

Fixes #849

Testing done:
Verified importing cert on NSX-T by name with overriding info.LocalVarOptionals["pageSize"] = int64(20)
while total cert count is 100.

Confirmed with debug log with proper pagination, for both found, not found and multiple found casaes.

@wsquan171
Copy link
Contributor Author

/test-all

@wsquan171 wsquan171 requested a review from annakhm January 3, 2024 22:56
@annakhm
Copy link
Collaborator

annakhm commented Jan 5, 2024

Hi Shawn, I suggest to use handlePagination routine that is used by other MP data sources. It has printouts and additional safeguards.

Signed-off-by: Shawn Wang <wshaoquan@vmware.com>
@wsquan171
Copy link
Contributor Author

/test-all

@wsquan171
Copy link
Contributor Author

Hi Shawn, I suggest to use handlePagination routine that is used by other MP data sources. It has printouts and additional safeguards.

Thanks. Fixed

@wsquan171
Copy link
Contributor Author

/test-all

@wsquan171 wsquan171 merged commit 488d7ac into vmware:master Jan 10, 2024
6 checks passed
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.

data resource "nsxt_certificate" does not support pagination
2 participants