[Libguestfs] [PATCH v2 0/7] RFC: switch v2v to ocaml-libvirt

Pino Toscano ptoscano at redhat.com
Tue Nov 27 10:59:01 UTC 2018


Hi,

this is a mostly done attempt to switch to ocaml-libvirt, embedding the
latest version of it from git. This way, it is possible to improve the
way v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).

As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.

I could not test all the libvirt input modes (like VDDK, and Xen), but
VMware and libvirtxml work fine as before.

Changes from v1:
- rebase on master
- update ocaml-libvirt from libvirt-ocaml.git on libvirt.org, and adjust
  the code to it
- pass again the URI to input_libvirt_vddk, so an error message is
  preserved


Pino Toscano (7):
  v2v: require libvirt
  common: Bundle the libvirt-ocaml library for use by virt-v2v
  v2v: switch to ocaml-libvirt
  v2v: -o libvirt: use a Lazy for the connection
  v2v: -o libvirt: switch away from virsh
  v2v: test-harness: stop using the external ocaml-libvirt
  build: stop looking for ocaml-libvirt

 .gitignore                            |    2 +
 Makefile.am                           |    5 +-
 common/mllibvirt/Makefile.am          |  102 ++
 common/mllibvirt/generator.pl         |  908 +++++++++++++
 common/mllibvirt/libvirt.README       |    9 +
 common/mllibvirt/libvirt.ml           | 1661 ++++++++++++++++++++++++
 common/mllibvirt/libvirt.mli          | 1626 +++++++++++++++++++++++
 common/mllibvirt/libvirt_c_epilogue.c |  462 +++++++
 common/mllibvirt/libvirt_c_oneoffs.c  | 1698 +++++++++++++++++++++++++
 common/mllibvirt/libvirt_c_prologue.c |  134 ++
 configure.ac                          |    1 +
 docs/C_SOURCE_FILES                   |    1 -
 m4/guestfs-ocaml.m4                   |    4 -
 po/POTFILES                           |    1 -
 v2v/Makefile.am                       |   26 +-
 v2v/copy_to_local.ml                  |    7 +-
 v2v/dummy.c                           |    2 +
 v2v/input_libvirt.ml                  |   20 +-
 v2v/input_libvirt_other.ml            |   27 +-
 v2v/input_libvirt_other.mli           |    5 +-
 v2v/input_libvirt_vcenter_https.ml    |   13 +-
 v2v/input_libvirt_vcenter_https.mli   |    2 +-
 v2v/input_libvirt_vddk.ml             |   15 +-
 v2v/input_libvirt_vddk.mli            |    4 +-
 v2v/input_libvirt_xen_ssh.ml          |   13 +-
 v2v/input_libvirt_xen_ssh.mli         |    2 +-
 v2v/input_libvirtxml.ml               |    3 +-
 v2v/libvirt_utils-c.c                 |  539 --------
 v2v/libvirt_utils.ml                  |   95 +-
 v2v/libvirt_utils.mli                 |   51 +-
 v2v/output_libvirt.ml                 |   56 +-
 v2v/parse_libvirt_xml.ml              |   14 +-
 v2v/parse_libvirt_xml.mli             |   11 +-
 v2v/test-harness/Makefile.am          |    5 +-
 v2v/v2v.ml                            |   12 +-
 35 files changed, 6838 insertions(+), 698 deletions(-)
 create mode 100644 common/mllibvirt/Makefile.am
 create mode 100755 common/mllibvirt/generator.pl
 create mode 100644 common/mllibvirt/libvirt.README
 create mode 100644 common/mllibvirt/libvirt.ml
 create mode 100644 common/mllibvirt/libvirt.mli
 create mode 100644 common/mllibvirt/libvirt_c_epilogue.c
 create mode 100644 common/mllibvirt/libvirt_c_oneoffs.c
 create mode 100644 common/mllibvirt/libvirt_c_prologue.c
 create mode 100644 v2v/dummy.c
 delete mode 100644 v2v/libvirt_utils-c.c

-- 
2.17.2




More information about the Libguestfs mailing list