podman-py
podman-py copied to clipboard
ImagesManager.prune() - no support for query-params/kwargs?
Hello.
I am building a small application to manage my images and thus tried to prune ALL images not in use by using ImagesManager.prune(). Podman specifies this as possible via the "all" query parameter.
At first I struggled because I didn't realize that the "filters" argument is something else entirely, and that there is (afaik) no way to pass the "all" parameter to perform a full image prune. Is my assessment correct or am I missing something? If yes, then why is it this way? Wouldn't it be much more flexible to enable arbitrary query params for all routes so the user can talk to the entire Podman API using this library?
Hey,
If yes, then why is it this way? Wouldn't it be much more flexible to enable arbitrary query params for all routes so the user can talk to the entire Podman API using this library?
Implementing external, all, and filters params makes sense to me. @jwhonce wdyt?
@inknos Adding external and all as kwargs would require extra validation if the client has been instantiated in compatible_version mode. That is, the client is running without the libpod extensions. Or, should we allow a compatible server to handle extra API parameters?
Otherwise, seems like a good idea to me.
filters has already been implemented for the compatible entries. Adding the libpod label filter would complete the extensions.
would require extra validation if the client has been instantiated in compatible_version mode
I would pursue this path.
Adding the libpod label filter would complete the extensions.
This also makes sense to me