[libvirt] [PATCH] trivial libvirt example code
Dave Allan
dallan at redhat.com
Tue Jan 27 05:05:44 UTC 2009
Richard W.M. Jones wrote:
> 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.
Hi Rich,
Thanks for taking a look at it. I added a little code to let the user
specify a URI on the command line. Do you think it is worth committing?
Dave
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hellolibvirt.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090127/741e09f2/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: changes.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090127/741e09f2/attachment-0003.ksh>
More information about the libvir-list
mailing list