[libvirt] RFC: Introduce API to query IP addresses for given domain

Eric Blake eblake at redhat.com
Mon Jul 8 13:56:58 UTC 2013


On 07/08/2013 02:27 AM, Nehal J. Wani wrote:
> Eric, could you please share your opinion as to what should be more
> appropriate to use for this functionality: Structs/XML/VirTypedParams ?
> 

>>>
>>> Looking at this possible approach of virTypedParameter, I'm think I am
>>> preferring either the XML or fixed struct approach to this API as was
>>> proposed in the past, with a bias towards a fixed struct for simplicity
>>> of use by app developers.
>>>
>>
>> agreed.
>>
>> after seeing the trouble caused by multiple addrs, i'm not sure about
>> using virTypedParameter too. even if we have an array type value, it still
>> looks like not easy to use for api user, one has to know how many elements
>> of the array too.

If extensibility is important (that is, if we think we will ever want to
report additional information in the future, perhaps because qemu is
expanded to give us additional information when using a guest agent
command), then XML or typedParameter makes the most sense.  But at this
point, I'm not seeing that we have much need for extensibility - we
already have as much useful information as you need to establish a
connection with the guest using the IP information just queried, at
which you could then use that guest connection outside of libvirt for
querying any additional information in a format you feel best.  So I am
also leaning towards a fixed struct for the information we return here.

Yes, that means that we aren't as extensible as possible, but ease of
use and the unlikeliness of extension are swaying the argument for me.

-- 
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/20130708/e6019a67/attachment-0001.sig>


More information about the libvir-list mailing list