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

Reduce the amount of API requests and improvements #92

Merged
merged 7 commits into from
May 15, 2020

Conversation

maxaudron
Copy link
Contributor

  • 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.

@ghost ghost added the size/M label Jan 7, 2020
@marinsalinas
Copy link
Contributor

Hello @maxaudron does this close #87 ?

@coderGo93
Copy link
Contributor

Hello, @maxaudron , there's a conflict, can you resolve it?

@PacoDw
Copy link
Contributor

PacoDw commented Apr 24, 2020

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
@marinsalinas marinsalinas merged commit 8c48137 into nutanix:master 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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants