ionos-cloud / module-ansible

Apache License 2.0
10 stars 8 forks source link

Speed up user and user_info modules by filtering server-side #203

Closed jplitza closed 2 months ago

jplitza commented 3 months ago

Current SDK Version

7.4.1

Use-cases

Each invocation of the user or user_info module seems to always fetch a full list of users from the server. For me, this takes 40 seconds.

Attempted Solutions

- ionoscloudsdk.ionoscloud.user:
    firstname: Jane
    lastname: Doe
    email: doe@example.org

And then wait. For a long time. Each time.

Proposal

Use server-side filtering to only fetch relevant users. Since the email is an identifying key, doing the equivalent of ionosctl user list -F email=doe@example.org (which only takes <1s) would suffice for the above invocation.

Also, when using the filters attribute for user_info, it would also be nice to filter server-side.

References

rmocanu-ionos commented 2 months ago

Hello, this should be fixed in the latest beta release, v7.5.0-beta.1, please let us know is the issue persists

jplitza commented 2 months ago

Well, it's faster now, so works for me! :+1: