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

Eric Blake eblake at redhat.com
Mon Jul 8 13:59:06 UTC 2013


[please don't top-post on technical lists]

On 07/02/2013 05:04 AM, Nehal J. Wani wrote:
> Following will be the methods:
> (i) Querying qemu-guest-agent
> (ii) Getting info from dnsmasq.leases file
> (iii) Using the nwfilter to snoop the traffic
> 
> Valid values:
>  domifaddr <domain-name> qemu-ga
>  domifaddr <domain-name> dnsmasq
>  domifaddr <domain-name> snoop
> 
> Suggestions are welcome for the 'name' of values of the option 'method'.
> 
> The main idea behind using virTypedParameter: It gives us extensibility -
> as long as we tell the user how many interfaces and how many parameters per
> interface, then we can add more parameters per interface.
> 
> If we use structs, then extensibility is lost.
> 
> If we use XML, then first JSON output is parsed into XML, then XML is
> parsed. More effort is involved.

But remember, parsing of JSON into XML is done by libvirtd; the end user
only ever sees XML (which is what they are used to seeing for all other
libvirt interfaces), so it is no additional work for the end user, just
a layer of glue code inside libvirtd.

> 
> As I think the previous patches by Michal were not pushed upstream due to
> lack of extensibility.

That was a question raised at the time.  But if extensibility is not
important, a struct is probably best.

-- 
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/2444ddeb/attachment-0001.sig>


More information about the libvir-list mailing list