On 06/01/2012 03:05 PM, Eric Blake wrote:
On 05/25/2012 05:56 AM, Stefan Berger wrote:
An example of a displayed XML may then be:
<interface type='bridge'>
<mac address='52:54:00:68:e3:90'/>
<source bridge='virbr0'/>
<target dev='vnet1'/>
<model type='virtio'/>
<filterref filter='clean-traffic'>
<parameter name='CTRL_IP_LEARNING' value='dhcp'/>
<parameter name='IP_LEASE' value='192.168.122.210,100'/>
It's a shame that we are making the user parse the single XML entity to
get two pieces of information. I wonder if it would be better to have:
<parameter name='IP_LEASE_ADDR' value='192.168.122.210'/>
<parameter name='IP_LEASE_TIMEOUT' value='100'/>
and reserve two variable names rather than one.
I'll review the code as is, but I would get a second opinion from one of
the Dan's on whether we should change the XML to make xpath queries
easier (basically, XML that crams 2 pieces of information into one
attributes is always harder to use).
Ok, I'll wait for their comment(s).
Stefan
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list