This series adds a new output mode for virt-v2v, called -o json.
It produces local files, just like -o local, although the metadata
produced is a JSON file with data that v2v collected in the conversion
process. This can be useful for converting to unsupported destinations,
still based on QEMU/KVM.
In addition to a simple different metadata, it offers a way to relocate
the disks, with %{...}-like variables (only 3 added ATM, more can be
added) to change their paths depending on data of the guest/disks.
Changes from v1:
- remove extra code for optional named parameters in pcre_tests.ml
- allow %-escaping of variables in Var_expander
Pino Toscano (3):
common/mlpcre: add offset flag for PCRE.matches
v2v: add Var_expander
v2v: add -o json output mode
.gitignore | 1 +
common/mlpcre/PCRE.ml | 2 +-
common/mlpcre/PCRE.mli | 5 +-
common/mlpcre/pcre-c.c | 16 +-
common/mlpcre/pcre_tests.ml | 11 +-
v2v/Makefile.am | 36 +++-
v2v/cmdline.ml | 29 +++
v2v/create_json.ml | 348 ++++++++++++++++++++++++++++++++++
v2v/create_json.mli | 29 +++
v2v/dummy.c | 2 +
v2v/output_json.ml | 116 ++++++++++++
v2v/output_json.mli | 31 +++
v2v/var_expander.ml | 72 +++++++
v2v/var_expander.mli | 82 ++++++++
v2v/var_expander_tests.ml | 113 +++++++++++
v2v/virt-v2v-output-local.pod | 55 ++++++
v2v/virt-v2v.pod | 15 +-
17 files changed, 951 insertions(+), 12 deletions(-)
create mode 100644 v2v/create_json.ml
create mode 100644 v2v/create_json.mli
create mode 100644 v2v/dummy.c
create mode 100644 v2v/output_json.ml
create mode 100644 v2v/output_json.mli
create mode 100644 v2v/var_expander.ml
create mode 100644 v2v/var_expander.mli
create mode 100644 v2v/var_expander_tests.ml
--
2.20.1