Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

containers.list() gathers too much data #72

Open
parmentelat opened this issue Jan 9, 2020 · 5 comments
Open

containers.list() gathers too much data #72

parmentelat opened this issue Jan 9, 2020 · 5 comments

Comments

@parmentelat
Copy link


I'm facing an issue with the simplest possible API call that I could think about

with podman.Client() as client:
...: list(client.containers.list())

which on my setup, with one single container running, takes in the 2 minutes


This issue was first opened in the plain podman repo
containers/podman#4656

in that issue we have established that this mundane API call actually gathers information about disk space, which in this particular instance I do not need at all, but that slows things down terribly; the fact that 2 minutes are needed here is clearly a concern too, but should be taken separately


bottom line, I would like to know if there is currently a way to quickly obtain a simple list of containers, with minimal - even if quite incomplete - attached information;

@parmentelat
Copy link
Author

FYI here's how it's done in docker:

https://docker-py.readthedocs.io/en/stable/containers.html#docker.models.containers.ContainerCollection.list

where the list() method accepts a sparse parameter

IMHO having all calls to list() perform deep inspection of the subject containers makes it mostly unusable, do you not agree with that ?

@parmentelat
Copy link
Author

hi
a few months back my understanding was there were plans to move to a new generation of the API, that would make this issue essentially obsolete

so just checking in, are there any updates that you guys would like to share ?

thank you

@rhatdan
Copy link
Member

rhatdan commented May 19, 2020

The first versions are available in podman 1.9.2 and you can play with it there.

Python bindings should be being worked on in https://github.com/containers/podman-py. We would love to get contributors working on it.

@parmentelat
Copy link
Author

thanks for the update, great news indeed, will give it a try at the next opportunity !

@parmentelat
Copy link
Author

hi again
just to make sure I got it right; I just upgraded to Fedora 32, I can see version 1.9.1

# rpm -q podman
podman-1.9.1-1.fc32.x86_64

I take it version 1.9.2 is about to be published, right ?

also as far as the python wrapper, is there an rpm (preferred) or should I pip install from the git clone directly ?

thanks !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants