Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora/Linux Management Tools (http://www.linux-archive.org/fedora-linux-management-tools/)
-   -   virt-convert: Fix PV install (http://www.linux-archive.org/fedora-linux-management-tools/122434-virt-convert-fix-pv-install.html)

07-10-2008 01:48 PM

virt-convert: Fix PV install
 
# HG changeset patch
# User john.levon@sun.com
# Date 1215697436 25200
# Node ID af294fad5bde2b91640c55b8f279cbe8f9a41b37
# Parent a4920bf6af2fa78e7797d971f92e416fd78af0ca
virt-convert: Fix PV install

Need to fix a test that was triggering as VM_TYPE_PV was zero.

Signed-off-by: John Levon <john.levon@sun.com>

diff --git a/virtconv/vmcfg.py b/virtconv/vmcfg.py
--- a/virtconv/vmcfg.py
+++ b/virtconv/vmcfg.py
@@ -18,8 +18,9 @@
# MA 02110-1301 USA.
#

-VM_TYPE_PV = 0
-VM_TYPE_HVM = 1
+VM_TYPE_UNKNOWN = 0
+VM_TYPE_PV = 1
+VM_TYPE_HVM = 2

class vm(object):
"""
@@ -62,7 +63,7 @@
self.description = ""
if not self.nr_vcpus:
self.nr_vcpus = 1
- if not self.type:
+ if self.type == VM_TYPE_UNKNOWN:
raise ValueError("VM type is not set")
if not self.arch:
raise ValueError("VM arch is not set")

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools


All times are GMT. The time now is 01:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.