[libvirt] [PATCH] nwfilter: Display detected IP address in domain XML

Eric Blake eblake at redhat.com
Mon Jun 11 15:27:15 UTC 2012


On 06/11/2012 07:54 AM, Stefan Berger wrote:
> Display detected IP addresses in the domain XML using the
> IP_LEASE variable name. This variable name now becomes
> a reserved variable name that can be read only but not set
> by the user.
> 
> The format of the value is: <ip address>,<lease timeout in seconds>
> 
> 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'/>

I still think we're wrong in doing it with something that the user has
to reparse instead of being able to get at it via XPath queries.  Are we
any better off having:

<parameter name='IP_LEASE_ADDRESS' value='192.168.122.210'/>
<parameter name='IP_LEASE_TIMEOUT' value='100'/>

Or maybe feeding off of Laine's idea for keeping just one <parameter>,
but adding additional attributes (the redundant value= attribute would
remain, with redundant information, for back-compat), so that the XPath
query is still possible by using the new attributes:

<parameter name='IP_LEASE_ADDRESS' value='192.168.122.210,100'
address='192.168.122.210' timeout='100'/>

-- 
Eric Blake   eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120611/0425c712/attachment-0001.sig>


More information about the libvir-list mailing list