[libvirt] [PATCH 1/8] hellolibvirt: Update hellolibvirt example

Eric Blake eblake at redhat.com
Tue Feb 19 18:36:42 UTC 2013


On 02/19/2013 08:17 AM, Peter Krempa wrote:
>> I originally wrote hellolibvirt because at the time (prehistoric
>> versions!) there was no good example of a trivial use of the library.
>> I think it's not a bad idea to keep it updated with modern code since
>> I'm guessing anybody looking at it probably intends to develop against
>> the version from which they got it.  I think it should illustrate the
>> most basic use of the API, so it should demonstrate best practices for
>> the functionality it implements, in this case, use the new API that
>> lists all domains rather than the two older calls and don't bother
>> with the fallback case.
> 
> I agree.
> 
> Additionally for the fallback case there's "example" code in the virsh
> source tree.

Likewise - letting hellolibvirt be best-practices only, and then adding
a comment that points to virsh as a more complicated example that shows
how to do fallback to older libvirt, seems reasonable.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130219/1251f9c6/attachment-0001.sig>


More information about the libvir-list mailing list