[libvirt] [PATCH] Refactor storage XML parsing to be consistent with domain/network conf.
Cole Robinson
crobinso at redhat.com
Mon Jun 22 17:21:20 UTC 2009
Cole Robinson wrote:
> 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
>
I've pushed this with the extra change, along with the rest of my
pending patches.
Thanks,
Cole
More information about the libvir-list
mailing list