On Tue, 2009-10-06 at 14:17 -0400, Laine Stump wrote:
On 10/06/2009 01:36 PM, David Lutterkort wrote:
> On Tue, 2009-10-06 at 10:13 +0100, Daniel P. Berrange wrote:
>
>> The live XML should *always* say what the inteface is doing right
>> now.
>>
> And from the rest of this exchange, I think the word 'only' should be
> added to that sentence. In other words, the XML for live setups contains
> *only* what we have figured out from the live setup, completely
> disregarding config files - that also leaves us room to add more live
> info as we gather more. For example, the entire live XML for any
> interface will now look like
>
> <interface name="eth0">
> <protocol family="ipv4">
> <ip address="192.168.0.52" prefix="24"/>
> </protocol>
> </interface>
>
> Note that that doesn't even indicate the type of the interface (which we
> may add at some point, but since we do not have that info right now, we
> won't pretend we know what the interface is)
>
Interesting extrapolation. I can't say that I hadn't thought of it once
or twice, but figured it would be more convenient to have one-stop
shopping. (Also it will require a separate codepath for parse/format,
but maybe that's better anyway.)
Not necessarily - you just have to be mindful when parsing/formatting
that many things the schema says are mandatory are in fact optional.
Should I code this up and see how it flies?
That's what I would do.
David