[Pkg-libvirt-commits] [libguestfs] 08/40: v2v: List convert modules in --machine-readable output.

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 3 14:44:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.27.44-1
in repository libguestfs.

commit a6279f5c7b4a7794eec32c650590790251aeb220
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Sep 10 00:03:20 2014 +0100

    v2v: List convert modules in --machine-readable output.
    
    $ virt-v2v --machine-readable
    [...]
    convert:enterprise-linux
    convert:windows
---
 v2v/cmdline.ml       | 1 +
 v2v/modules_list.ml  | 3 +++
 v2v/modules_list.mli | 3 +++
 3 files changed, 7 insertions(+)

diff --git a/v2v/cmdline.ml b/v2v/cmdline.ml
index c1f30d7..65c8cdc 100644
--- a/v2v/cmdline.ml
+++ b/v2v/cmdline.ml
@@ -209,6 +209,7 @@ read the man page virt-v2v(1).
     printf "libguestfs-rewrite\n";
     List.iter (printf "input:%s\n") (Modules_list.input_modules ());
     List.iter (printf "output:%s\n") (Modules_list.output_modules ());
+    List.iter (printf "convert:%s\n") (Modules_list.convert_modules ());
     exit 0
   );
 
diff --git a/v2v/modules_list.ml b/v2v/modules_list.ml
index 18f5557..34a766c 100644
--- a/v2v/modules_list.ml
+++ b/v2v/modules_list.ml
@@ -43,3 +43,6 @@ let find_convert_module inspect =
     | _ :: rest -> loop rest
   in
   loop !convert_modules
+
+let convert_modules () =
+  List.sort compare (List.map (fun (_, (name, _)) -> name) !convert_modules)
diff --git a/v2v/modules_list.mli b/v2v/modules_list.mli
index 4c41cc5..1d17266 100644
--- a/v2v/modules_list.mli
+++ b/v2v/modules_list.mli
@@ -43,3 +43,6 @@ val find_convert_module : Types.inspect -> string * conversion_fn
 (** [find_convert_module inspect] returns the name and conversion
     function for the guest with inspection data in [inspect], else
     throws [Not_found]. *)
+
+val convert_modules : unit -> string list
+(** Return the list of conversion modules. *)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list