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

Re: [libvirt] [PATCH] trivial libvirt example code

On Fri, Jan 23, 2009 at 02:51:02PM -0500, Dave Allan wrote:
> The examples directory doesn't have a trivial example of how to connect  
> to a hypervisor, make a few calls, and disconnect, so I put one  
> together.  I would appreciate any suggestions on anything that I've done  
> wrong as well as suggestions for other fundamental API calls that should  
> be illustrated.

Yes, I checked this example code and it is fine.  My only comment
would be on:

> +    /* virConnectOpenAuth called here with all default parameters */
> +    conn = virConnectOpenAuth(NULL, virConnectAuthPtrDefault, 0);

It might be better to let people connect to a named URI.

Another possibility is to default to the test URI (test:///default)
since that (almost) always exists.


Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.

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