[Pkg-libvirt-commits] [libguestfs] 29/59: v2v: Replace polymorphic variant source_hypervisor with ordinary variant.
Hilko Bengen
bengen at moszumanska.debian.org
Sun May 3 21:26:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 4546d3f21dc6c6ab73dc8acdab778e26a5fde30a
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sat Apr 25 21:45:14 2015 +0100
v2v: Replace polymorphic variant source_hypervisor with ordinary variant.
See commit 3a080c3fbffa5846f71528c6fd978be7853b33b8.
---
v2v/input_disk.ml | 2 +-
v2v/input_ova.ml | 2 +-
v2v/types.ml | 80 +++++++++++++++++++++++++++----------------------------
v2v/types.mli | 12 ++++-----
v2v/v2v.ml | 2 +-
5 files changed, 49 insertions(+), 49 deletions(-)
diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml
index e6e52d0..b3048e3 100644
--- a/v2v/input_disk.ml
+++ b/v2v/input_disk.ml
@@ -80,7 +80,7 @@ class input_disk verbose input_format disk = object
} in
let source = {
- s_hypervisor = `UnknownHV;
+ s_hypervisor = UnknownHV;
s_name = name; s_orig_name = name;
s_memory = 2048L *^ 1024L *^ 1024L; (* 2048 MB *)
s_vcpu = 1; (* 1 vCPU is a safe default *)
diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml
index badf6aa..ce00f5d 100644
--- a/v2v/input_ova.ml
+++ b/v2v/input_ova.ml
@@ -352,7 +352,7 @@ object
done;
let source = {
- s_hypervisor = `VMware;
+ s_hypervisor = VMware;
s_name = name;
s_orig_name = name;
s_memory = memory;
diff --git a/v2v/types.ml b/v2v/types.ml
index f896fc7..155fdc7 100644
--- a/v2v/types.ml
+++ b/v2v/types.ml
@@ -34,12 +34,12 @@ type source = {
s_nics : source_nic list;
}
and source_hypervisor =
-[ `QEmu | `KQemu | `KVM | `Xen | `LXC | `UML | `OpenVZ
-| `Test | `VMware | `HyperV | `VBox | `Phyp | `Parallels
-| `Bhyve
-| `Physical (* used by virt-p2v *)
-| `UnknownHV (* used by -i disk *)
-| `OtherHV of string ]
+ | QEmu | KQemu | KVM | Xen | LXC | UML | OpenVZ
+ | Test | VMware | HyperV | VBox | Phyp | Parallels
+ | Bhyve
+ | Physical (* used by virt-p2v *)
+ | UnknownHV (* used by -i disk *)
+ | OtherHV of string
and source_disk = {
s_disk_id : int;
s_qemu_uri : string;
@@ -109,42 +109,42 @@ NICs:
(String.concat "\n" (List.map string_of_source_nic s.s_nics))
and string_of_source_hypervisor = function
- | `QEmu -> "qemu"
- | `KQemu -> "kqemu"
- | `KVM -> "kvm"
- | `Xen -> "xen"
- | `LXC -> "lxc"
- | `UML -> "uml"
- | `OpenVZ -> "openvz"
- | `Test -> "test"
- | `VMware -> "vmware"
- | `HyperV -> "hyperv"
- | `VBox -> "vbox"
- | `Phyp -> "phyp"
- | `Parallels -> "parallels"
- | `Bhyve -> "bhyve"
- | `Physical -> "physical"
- | `UnknownHV -> "unknown"
- | `OtherHV s -> s
+ | QEmu -> "qemu"
+ | KQemu -> "kqemu"
+ | KVM -> "kvm"
+ | Xen -> "xen"
+ | LXC -> "lxc"
+ | UML -> "uml"
+ | OpenVZ -> "openvz"
+ | Test -> "test"
+ | VMware -> "vmware"
+ | HyperV -> "hyperv"
+ | VBox -> "vbox"
+ | Phyp -> "phyp"
+ | Parallels -> "parallels"
+ | Bhyve -> "bhyve"
+ | Physical -> "physical"
+ | UnknownHV -> "unknown"
+ | OtherHV s -> s
and source_hypervisor_of_string = function
- | "qemu" -> `QEmu
- | "kqemu" -> `KQemu
- | "kvm" -> `KVM
- | "xen" -> `Xen
- | "lxc" -> `LXC
- | "uml" -> `UML
- | "openvz" -> `OpenVZ
- | "test" -> `Test
- | "vmware" -> `VMware
- | "hyperv" -> `HyperV
- | "vbox" -> `VBox
- | "phyp" -> `Phyp
- | "parallels" -> `Parallels
- | "bhyve" -> `Bhyve
- | "physical" -> `Physical
- | "unknown" -> `OtherHV "unknown" (* because `UnknownHV is for internal use *)
- | s -> `OtherHV s
+ | "qemu" -> QEmu
+ | "kqemu" -> KQemu
+ | "kvm" -> KVM
+ | "xen" -> Xen
+ | "lxc" -> LXC
+ | "uml" -> UML
+ | "openvz" -> OpenVZ
+ | "test" -> Test
+ | "vmware" -> VMware
+ | "hyperv" -> HyperV
+ | "vbox" -> VBox
+ | "phyp" -> Phyp
+ | "parallels" -> Parallels
+ | "bhyve" -> Bhyve
+ | "physical" -> Physical
+ | "unknown" -> OtherHV "unknown" (* because `UnknownHV is for internal use *)
+ | s -> OtherHV s
and string_of_source_disk { s_qemu_uri = qemu_uri; s_format = format;
s_controller = controller } =
diff --git a/v2v/types.mli b/v2v/types.mli
index 78959ed..4c89d3d 100644
--- a/v2v/types.mli
+++ b/v2v/types.mli
@@ -36,12 +36,12 @@ type source = {
(** The source: metadata, disk images. *)
and source_hypervisor =
-[ `QEmu | `KQemu | `KVM | `Xen | `LXC | `UML | `OpenVZ
-| `Test | `VMware | `HyperV | `VBox | `Phyp | `Parallels
-| `Bhyve
-| `Physical (** used by virt-p2v *)
-| `UnknownHV (** used by -i disk *)
-| `OtherHV of string ]
+ | QEmu | KQemu | KVM | Xen | LXC | UML | OpenVZ
+ | Test | VMware | HyperV | VBox | Phyp | Parallels
+ | Bhyve
+ | Physical (** used by virt-p2v *)
+ | UnknownHV (** used by -i disk *)
+ | OtherHV of string
(** Possible source hypervisors. See
[libvirt.git/docs/schemas/domaincommon.rng] for the list supported
by libvirt. *)
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
index b4e6fb2..0ae7f7d 100644
--- a/v2v/v2v.ml
+++ b/v2v/v2v.ml
@@ -74,7 +74,7 @@ let rec main () =
if verbose then printf "%s%!" (string_of_source source);
(match source.s_hypervisor with
- | `OtherHV hv ->
+ | OtherHV hv ->
warning (f_"unknown source hypervisor ('%s') in metadata") hv
| _ -> ()
);
--
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