[netcf-devel] [PATCH 3/3] (take two) Add a new API function ncf_if_xml_state().

David Lutterkort lutter at redhat.com
Wed Sep 30 18:07:26 UTC 2009


On Mon, 2009-09-28 at 21:46 -0400, Laine Stump wrote:
> On 09/27/2009 12:25 AM, David Lutterkort wrote:
> > On Sat, 2009-09-26 at 22:48 -0400, Laine Stump wrote:
> >    
> >> On 09/26/2009 08:28 PM, David Lutterkort wrote:
> >>      
> >>> 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"/>
> >>>
> >>>        
> >>
> >> Shoot! That wasn't intended, and it either wasn't working that way at
> >> some point, or I didn't notice the extra node when looking at the output
> >> (but it's there plain as day now). Do you want a patch to eliminate the
> >> duplicate? (It almost sounds like you prefer it this way.)
> >>      
> > Yeah, a cleanup patch would be good.
> >    
> 
> In the case of an interface that has a static IP in the config, but is 
> currently down, it's not possible to get any addresses from the 
> interface. In that case, should there be no IP addresses, or should the 
> originals from the config file be returned? (I'm leaning toward no 
> addresses, but could possibly be convinced otherwise).

That brings up the big question: what should ncf_if_cml_state return ?
Just information about the live configuration or a combination of live
config + and ondisk config ? I am leaning towards the latter, especially
since we mark the live config with 'source="device"' .. in that case,
the XML above is correct in having two <ip/> elements.

David




More information about the netcf-devel mailing list