[netcf-devel] [PATCH 3/3] (take two) Add a new API function ncf_if_xml_state().
David Lutterkort
lutter at redhat.com
Sun Sep 27 00:28:16 UTC 2009
On Fri, 2009-09-25 at 09:36 -0400, Laine Stump wrote:
> (I *think* I got all your suggestions in here, including rebase.
ACK. This looks good; I made some minor formatting changes and changed
the commit message + pushed.
One minor nit: for interfaces with static IP's, you get something like
this:
<?xml version="1.0"?>
<interface type="bridge" name="br0">
<start mode="onboot"/>
<protocol family="ipv4">
<ip address="172.31.0.9" prefix="24"/>
<route gateway="172.31.0.1"/>
<ip address="172.31.0.9" prefix="24" source="device"/>
</protocol>
<bridge delay="0">
<interface type="ethernet" name="eth0">
<mac address="00:1c:c0:89:dd:01"/>
</interface>
</bridge>
</interface>
The duplication doesn't bother me, since I would look for the live
address with "ip[@source='device']" so that the other <ip/> element
doesn't matter.
> Also, it wasn't clear to me
> if the rng needs to be changed right away to allow for dhcp and an ip
> address to be set at the same time (was that added in with your ipv6
> commit?); likewise - I guess we need to add something to allow for
> 'source="device"', but I'm not familiar enough with RNG to know what
> to put where.)
Dunno ... since the interface.rng defines what you can use with
ncf_define, it shouldn't go into interface.rng. And forking the
interface.rng will be a lot of work (I mean: making that fork
maintainable)
For the time being, a decent textual description (look for "ip[@device =
'source']" in the returned XML) should be good enough.
David
More information about the netcf-devel
mailing list