-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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 support for adding custom query parameters to URL #46390
Conversation
The test
|
2c9caa0
to
3da8a1f
Compare
The test
The test
The test
The test
The test
The test
The test
|
f151022
to
286f1ca
Compare
The test
|
@gundalow Could you review and merge? |
@pilou- Could you review? |
So, I am a bit concerned about the level of code duplication between module_utils/scaleway.py and the online.py one, especially since we start to change one to add more flexibility that could end being useful to the others. And also concerned about cut and paste with DO module_utils. |
shipit |
1 similar comment
shipit |
I have a negative opinion on this PR:
|
@pilou- This PR is not about pagination. This PR is about adding the possibility to add query_parameters to the URL from the module. This can be used to offer the possibility to the user to add optional filters to speed up queries for instance if they want to and if the module does not support it natively. |
Users still can use URI module :) I am not convinced by the given examples. And what about the idempotence ? Should not this feature be used only for facts modules ? |
I don't understand what idempotence have to do with this PR. I also don't understand why it should also only be used for facts? Could you give examples? |
@halberom How do you handle the case where you have several time the same key in a url query string? Espically with |
@sieben, not sure what you mean. I made my comment because it looked like you had typos on the doc of the param. It states |
10048b1
to
c373184
Compare
c373184
to
407e46b
Compare
@gundalow Could this be merged? |
Merged into Thanks for the PR and reviews! |
SUMMARY
It is currently not possible to specify query parameters to Scaleway URL. For instance, it is not currently possible to specify how many results you want per page. It makes it difficult to test pagination for Scaleway compute without hitting the default number of machines per pages (50).
By adding arbitrary queries parameters to each ansible modules we will be able to have a greater flexibility in our API calls.
Will be very useful to test #46117
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION