[libvirt] [PATCH 3/4] Support bond interfaces attached to bridges in interface xml.

Cole Robinson crobinso at redhat.com
Tue Jan 12 22:43:55 UTC 2010

On 01/01/2010 08:40 PM, Laine Stump wrote:
> This was accomplished in xml parsing by doing away with the
> stripped-down virInterfaceBareDef object, and just always using
> virInterfaceDef, but with restrictions in certain places (eg, the type
> of subordinate interface allowed in parsing depends on the parent
> interface).
> xml formatting was similarly adjusted. In addition, the formatting
> functions keep track of the level of interface nesting, and insert
> extra leading spaces on each line accordingly (using %*s).

Kind of unfortunate churn, and certainly makes the XML building uglier, but it
works and is fairly simple.

> The only change in formatted xml from previous (aside frmo supporting
> new combinations of interface types) is that the subordinate ethernet
> interfaces take up 2 lines rather than one, eg:
>    <interface type='ethernet' name='eth0'>
>    </interface>
> instead of:
>    <interface type='ethernet' name='eth0'/>


- Cole

More information about the libvir-list mailing list