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

ImagesManager.prune() - no support for query-params/kwargs? #312

Open
Dsafe1 opened this issue Aug 9, 2023 · 3 comments · May be fixed by #413
Open

ImagesManager.prune() - no support for query-params/kwargs? #312

Dsafe1 opened this issue Aug 9, 2023 · 3 comments · May be fixed by #413
Assignees
Labels
help wanted Extra attention is needed

Comments

@Dsafe1
Copy link

Dsafe1 commented Aug 9, 2023

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?

@umohnani8 umohnani8 added the help wanted Extra attention is needed label Jan 23, 2024
@inknos inknos self-assigned this Jun 3, 2024
@inknos
Copy link
Contributor

inknos commented Jun 3, 2024

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?

@jwhonce
Copy link
Member

jwhonce commented Jun 4, 2024

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

@inknos
Copy link
Contributor

inknos commented Jun 6, 2024

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

inknos added a commit to inknos/podman-py that referenced this issue Aug 1, 2024
Param all is now supported by prune.
Param external is now supported by prune.
Filter by label, which was already supported, is now
documented and tested.

Resolves: containers#312

Signed-off-by: Nicola Sella <[email protected]>
inknos added a commit to inknos/podman-py that referenced this issue Aug 1, 2024
Param all is now supported by prune.
Param external is now supported by prune.
Filter by label, which was already supported, is now
documented and tested.

Resolves: containers#312

Signed-off-by: Nicola Sella <[email protected]>
@inknos inknos linked a pull request Aug 1, 2024 that will close this issue
inknos added a commit to inknos/podman-py that referenced this issue Aug 1, 2024
Param all is now supported by prune.
Param external is now supported by prune.
Filter by label, which was already supported, is now
documented and tested.

Resolves: containers#312

Signed-off-by: Nicola Sella <[email protected]>
inknos added a commit to inknos/podman-py that referenced this issue Aug 1, 2024
Param all is now supported by prune.
Param external is now supported by prune.
Filter by label, which was already supported, is now
documented and tested.

Resolves: containers#312

Signed-off-by: Nicola Sella <[email protected]>
inknos added a commit to inknos/podman-py that referenced this issue Aug 1, 2024
Param all is now supported by prune.
Param external is now supported by prune.
Filter by label, which was already supported, is now
documented and tested.

Resolves: containers#312

Signed-off-by: Nicola Sella <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants