mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Currently virt-v2v has few custom C-based functions for libvirt operations, which are limited in what they do, and there is a lot of duplicated code. Instead, switch to ocaml-libvirt for all the libvirt interaction currently done by the Libvirt_utils module. This has few advantages: - each input & output module now opens a libvirt connection only once, only when needed - no need to pass URIs and passwords around, if not needed - a wider range of libvirt APIs can now be used, with no need to create bindings manually The hierarchy of input_libvirt* classes is changed to take a Lazy object with the libvirt connection, accessing it through a "proctected" method: this way, the connection is opened only at the first access. Also, the Libvirt_utils module now is just helpers around the Libvirt module, to centralize error handling, and few common operations.