Re: [PATCH 1/2] Restructure domain struct interface "driver" data for easier expansion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/04/2011 02:00 PM, Laine Stump wrote:
> When the <driver> element (and its "name" attribute) was added to the
> domain XML's interface element, a "backend" enum was simply added to
> the toplevel of the virDomainNetDef struct.
> 

> This patch changes virDomainNetDef in two ways:

s/two/three/, given:

> 
> 1) Rename the item in the struct from "backend" to "name", so that
>    it's the same in the XML and in the struct, hopefully avoiding
>    confusion for someone unfamiliar with the function of the
>    attribute.
> 
> 2) Create a "driver" union within virDomainNetDef, and a "virtio"
>    struct in that struct, which contains the "name" enum value.
> 
> 3) Move around the virDomainNetParse and virDomainNetFormat functions
>    to allow for simple plugin of new attributes without disturbing
>    existing code. (you'll note that this results in a seemingly
>    redundant if() in the format function, but that will no longer be
>    the case as soon as a 2nd attribute is added).

...all nice changes.

ACK to this half of the series.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]