-
Notifications
You must be signed in to change notification settings - Fork 116
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
Reduce the amount of API requests and improvements #92
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello @maxaudron does this close #87 ? |
Hello, @maxaudron , there's a conflict, can you resolve it? |
hello, @maxaudron could you do rebase to master branch plz to update the Travis file? |
ClusterIntentResource was only used in two places and is the exact same struct as ClusterIntentResponse.
we have the ID available so it is not needed to loop through all the VMs
nutanix allows creating the same resource with the same name multiple times so we should allow this too. This also save us from doing some expensive API calls.
The filter allows us to, e.g. filter by name and dramaticly reduce the number of API requests as there is very little need to paginate anymore
* ussage was removed in a2ddab0
usage removed in 679c2d0
marinsalinas
approved these changes
May 15, 2020
marinsalinas
approved these changes
May 15, 2020
yannickstruyf3
pushed a commit
to yannickstruyf3/terraform-provider-nutanix
that referenced
this pull request
Nov 9, 2021
Reduce the amount of API requests and improvements
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
add filter to ListAll*() function
The filter allows us to, e.g. filter by name and dramaticly reduce the
number of API requests as there is very little need to paginate anymore
improve error messages
remove unnecessary check for existence of resource
nutanix allows creating the same resource with the same name multiple
times so we should allow this too.
This also save us from doing some expensive API calls.
get VM by ID for resourceNutanixVirtualMachineExists
we have the ID available so it is not needed to loop through all the VMs
remove ClusterIntentResource in favor of ClusterIntentResponse
ClusterIntentResource was only used in two places and is the exact same
struct as ClusterIntentResponse.