[Pkg-libvirt-commits] [libguestfs] 13/35: v2v: Fix OVF VmType field, which should be 0 or 1 (RHBZ#1142008).

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 3 14:46:41 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.49-1
in repository libguestfs.

commit d5001304e4952450851ab429416c96cc4c8e2331
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Sep 17 12:56:53 2014 +0100

    v2v: Fix OVF VmType field, which should be 0 or 1 (RHBZ#1142008).
    
    Thanks: Shahar Havivi.
---
 v2v/lib_ovf.ml                 | 2 +-
 v2v/test-v2v-o-vdsm-options.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/v2v/lib_ovf.ml b/v2v/lib_ovf.ml
index dad0af7..6d41c4c 100644
--- a/v2v/lib_ovf.ml
+++ b/v2v/lib_ovf.ml
@@ -205,7 +205,7 @@ let rec create_ovf verbose source targets guestcaps inspect
     match vmtype with
       | Some vmtype -> vmtype
       | None -> get_vmtype inspect in
-  let vmtype = match vmtype with `Desktop -> "DESKTOP" | `Server -> "SERVER" in
+  let vmtype = match vmtype with `Desktop -> "0" | `Server -> "1" in
   let ostype = get_ostype inspect in
 
   let ovf : doc =
diff --git a/v2v/test-v2v-o-vdsm-options.sh b/v2v/test-v2v-o-vdsm-options.sh
index e5bf764..dac17f3 100755
--- a/v2v/test-v2v-o-vdsm-options.sh
+++ b/v2v/test-v2v-o-vdsm-options.sh
@@ -73,8 +73,8 @@ $VG ./virt-v2v --debug-gc \
 # Test the OVF metadata was created.
 test -f $d/12345678-1234-1234-1234-123456789abc/master/vms/VM/VM.ovf
 
-# Test the OVF metadata contains <VmType>DESKTOP</VmType>.
-grep '<VmType>DESKTOP</VmType>' \
+# Test the OVF metadata contains <VmType>0</VmType> (desktop).
+grep '<VmType>0</VmType>' \
     $d/12345678-1234-1234-1234-123456789abc/master/vms/VM/VM.ovf
 
 pushd $d/12345678-1234-1234-1234-123456789abc/images/IMAGE

-- 
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