[libvirt] [PATCH] Refactor storage XML parsing to be consistent with domain/network conf.

Cole Robinson crobinso at redhat.com
Fri Jun 19 17:24:56 UTC 2009


On 06/19/2009 01:09 PM, Daniel P. Berrange wrote:
> On Fri, Jun 19, 2009 at 12:37:11PM -0400, Cole Robinson wrote:
>> The storage driver arranges its parsing routines in a way that make them
>> difficult to use in the test driver for non-default file parsing. This
>> refactoring moves things to be consistent with the way domain_conf and
>> network_conf do things.
>>
>> Signed-off-by: Cole Robinson <crobinso at redhat.com>
>> ---
>>  src/libvirt_private.syms |    8 ++-
>>  src/storage_conf.c       |  163 ++++++++++++++++++++++++++++++++--------------
>>  src/storage_conf.h       |   26 ++++++--
>>  src/storage_driver.c     |    8 +-
>>  src/test.c               |   25 ++-----
>>  5 files changed, 150 insertions(+), 80 deletions(-)
> 
> ACK, this was on my todo list too.
> 
> Daniel

Hmm, this isn't quite complete. The above doesn't work for inlined pool/volume
definitions for a custom test driver (reading a separate file, like the
example in the docs section, works fine). Reason being that the xpaths in the
parsing routines are all absolute, and not relative to the root node. The
following additive patch solves that issue (this is what domain and network
parsers do as well).

Thanks,
Cole
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-storage-reorg-extra.patch
Type: text/x-diff
Size: 9285 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090619/53d7985b/attachment-0001.bin>


More information about the libvir-list mailing list