[Libvirt-cim] [PATCH] [TEST] Remove default emulator in VSSD, also fix path of default in const.py

Guo Lian Yun yunguol at cn.ibm.com
Mon Mar 30 08:26:16 UTC 2009


+1

Best,
Regards

Daisy (运国莲)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol at cn.ibm.com
TEL: (86)-21-60922403
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203


libvirt-cim-bounces at redhat.com wrote on 2009-03-30 07:25:02:

> # HG changeset patch
> # User Kaitlin Rupert <karupert at us.ibm.com>
> # Date 1238367843 25200
> # Node ID 444cee668a76b0ef7fa1b5da94ae3763522834f2
> # Parent  9e3054481df49d4045498d50188a62acddffab15
> [TEST] Remove default emulator in VSSD, also fix path of default in 
const.py
> 
> libvirt will determine the proper emulator to use based on the 
capabilities
> of the system.  No need to define a default.  If a different 
> emulator is needed
> (i.e. because qemu / kvm is installed in a non-standard location), the 
test
> case can specify an emulator using the Emulator attribute of the VSSD.
> 
> 
> Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
> 
> diff -r 9e3054481df4 -r 444cee668a76 
suites/libvirt-cim/lib/XenKvmLib/const.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/const.py   Tue Mar 24 19:15:
> 48 2009 -0700
> +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py   Sun Mar 29 16:04:
> 03 2009 -0700
> @@ -22,7 +22,6 @@
>  import platform
>  import traceback
>  from optparse import OptionParser
> -from VirtLib.live import fv_cap
>  from CimTest.Globals import CIM_IP
>  from pywbem import WBEMConnection
>  from XenKvmLib.classes import get_typed_class
> @@ -82,12 +81,7 @@
>  Xen_default_mac = '11:22:33:aa:bb:cc'
> 
>  # vxml.KVMXML
> -KVM_default_emulator = '/usr/local/bin/qemu-system-x86_64'
> -if not os.path.exists(KVM_default_emulator):
> -    if fv_cap(CIM_IP):
> -        KVM_default_emulator = '/usr/bin/qemu-kvm'
> -    else:
> -        KVM_default_emulator = '/usr/bin/qemu'
> +KVM_default_emulator = '/usr/bin/qemu-system-x86_64'
>  KVM_disk_path = os.path.join(_image_dir, 'default-kvm-dimage')
>  KVM_secondary_disk_path = os.path.join(_image_dir, 
'default-kvm-dimage.2ND')
>  KVM_default_disk_dev = 'hda'
> diff -r 9e3054481df4 -r 444cee668a76 
suites/libvirt-cim/lib/XenKvmLib/vsms.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py   Tue Mar 24 19:15:482009 
-0700
> +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py   Sun Mar 29 16:04:032009 
-0700
> @@ -89,7 +89,7 @@
> 
>  # classes to define VSSD parameters
>  class CIM_VirtualSystemSettingData(CIMClassMOF):
> -    def __init__(self, name, virt, bldr=None):
> +    def __init__(self, name, virt, bldr=None, emulator=None):
>          type = get_class_type(self.__class__.__name__)
>          self.InstanceID = '%s:%s' % (type, name)
>          self.Caption = self.Description = 'Virtual System'
> @@ -98,10 +98,9 @@
>          self.CreationClassName = self.__class__.__name__
>          self.AutomaticShutdownAction = VSSD_RECOVERY_NONE
>          self.AutomaticRecoveryAction = VSSD_RECOVERY_NONE
> -        if virt == 'KVM' :
> -            self.Emulator = const.KVM_default_emulator
> -        elif virt == 'XenFV' :
> -            self.Emulator = const.XenFV_default_emulator
> +
> +        if emulator is not None:
> +            self.Emulator = emulator 
> 
>          self.isFullVirt = (type == 'KVM' or virt == 'XenFV')
>          if self.isFullVirt:
> 
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20090330/9c58def5/attachment.htm>


More information about the Libvirt-cim mailing list