Re: [PATCH 14/16] Listing running sandbox containers takes a long time using the current protocol.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 02, 2013 at 06:11:30PM -0400, Dan Walsh wrote:
> So I am execing a virsh list command to show all of the running containers.
> ---
>  bin/virt-sandbox-service | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
> index b559cf5..ceb05b3 100755
> --- a/bin/virt-sandbox-service
> +++ b/bin/virt-sandbox-service
> @@ -907,22 +907,27 @@ def usage(parser, msg):
>      sys.exit(1)
>  
>  def sandbox_list(args):
> +    if args.running:
> +        import libvirt
> +        conn = libvirt.open("lxc:///")
> +        running = conn.listAllDomains(0)
> +        conn.close()
> +        running.sort()
> +        for d in running:
> +            print d.name()
> +        return

NACK to this - we should fix any performance problems in libvirt-glib

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]