
On Tue, Jul 02, 2013 at 04:34:49PM +0530, 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'.
This would be better as virsh domifaddr --method=[agent|dhcp|snoop] <domain-name> since <method> is not something that will be used commonly.
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.
As I think the previous patches by Michal were not pushed upstream due to lack of extensibility.
All of the 3 options here suck in some respect. I'm not convinced that virTypedParameter is the least bad option. I think the structs are the least-worst option currently, on the grounds that if people want more detailed information about guest interfaces, then this is outside the scope of libvirt & they should use a dedicated mgmt api. The implication being that we don't need to worry about extensibilty if we declare reporting of other information to be out of scope for libvirt. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|