[libvirt] [PATCH v7 0/4] Handling of undefine and re define snapshots with VirtualBox 4.2 or higher

Daniel P. Berrange berrange at redhat.com
Thu May 1 10:50:07 UTC 2014


On Fri, Apr 18, 2014 at 11:51:30AM +0200, Yohan BELLEGUIC wrote:
> Hello,
> 
> This is a new series of patches in order to support undefining and redefining 
> snapshots with VirtualBox 4.2 or higher.
> These patches are based on Manuel Vives' patches, taking into account Daniel 
> P. Berrange's remarks.
> 
> The VirtualBox API provides only high level operations to manipulate snapshots,
> so it not possible to support flags like VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE and
> VIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY with only API calls.
> Following an IRC talk with Eric Blake, the decision was made to emulate these
> behaviours by manipulating directly the .vbox XML files.
> 
> The first patch adds extra details in the snapshot XML returned by libvirt. We 
> will need those details in order to redefine the snapshots.
> 
> The second patch adds a new API to manipulate the VirtualBox XML file. It 
> provides several structs describing the VirtualBox XML file nodes and 
> functions which can manipulate these structs.

Thanks for doing this, it has made the code alot clearer to follow IMHO
and makes it possible todo testing of it too.

Overall this series looks like it is alot closer to something that is
ready to be merged. From a functional POV, I'd mostly just like to see
a test added for the XML parser/formatter as explained in my comments
on patch 2. If you see inspiration take a look at any of the existing
tests which have 'xml2xml' in their name - they demonstrate the basic
concept we use for testing XML parsers.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list