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

Re: [libvirt] [PATCHv3 1/2] conf: add <listen> subelement to domain <graphics> element


I'd meant to add more explanation in the [0/2] mail, but forgot to add "--compose" on my git send-mail commandline.

Just a couple of points:

1) The old fields in the unions of virDomainGraphicsDef that used to store the attributes from <graphics> (listen, port, tlsPort, autoport) have all been removed. To maintain backward compatibility, if attributes are put into <graphics> (rather than making a separate <listen> subelement), they will be stored in the first virDomainGraphicsListenDef (aka <listen> element) which will be created automatically by the new helper functions if needed.

2) About the helper functions - in the old code, all accesses to the "listen" information was done by referencing the data in virDomainGraphicsDef directly. To continue doing that now that the data structure is more complex would mean that the existing code that uses those attributes would become huge, ugly, and difficult to understand. To avoid this, I made a set of helper functions for getting and setting all the attributes of virDomainGraphicsListenDef. Aw with the data structures themselves, the helper functions are designed to support an array of <listen>s. However, none of our hypervisor drivers know what to do with more than one <listen> right now, so when converting existing code you will see that the index arg is always 0.

3) Patch 1/2 looks large, but much of it is mechanical changes, and it all must be in one patch to maintain bisectability. It can be thought of in three pieces:

1) The parser/formatter additions (including RNG and documentation)

2) updates to hypervisor drivers to access the listen/port data using the new helper functions

3) adding the extra <listen> subelement to every <graphics> element in every test domain XML file (as well as adding a couple of new cases specific to this feature).

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