+1
Best,
Regards
Daisy (Ô˹úÁ«)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol@cn.ibm.com
TEL: (86)-21-60922403
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203
libvirt-cim-bounces@redhat.com wrote on 2009-03-30
06:09:19:
> # HG changeset patch
> # User Kaitlin Rupert <karupert@us.ibm.com>
> # Date 1229638233 28800
> # Node ID f0b8eb632baa3a40721364a090ec3d40e4d68f6f
> # Parent ba88e8c112586b1578976e69c33cde6e4ecd91c3
> [TEST] Add SLES 11 specific changeset and branch tests accordingly
>
> Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com>
>
> diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-
> cim/cimtest/AllocationCapabilities/01_enum.py
> --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py
> Fri Mar 27 16:44:59 2009 -0700
> +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py
> Thu Dec 18 14:10:33 2008 -0800
> @@ -27,7 +27,8 @@
>
> import sys
> from XenKvmLib.enumclass import EnumInstances
> -from XenKvmLib.const import do_main, platform_sup, get_provider_version
> +from XenKvmLib.const import do_main, platform_sup, get_provider_version,
\
> +
sles11_changeset
> from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
> from CimTest.ReturnCodes import PASS, FAIL
> from XenKvmLib.common_util import cleanup_restore
> @@ -42,8 +43,8 @@
> get_typed_class(virt, 'DiskPool'),
> get_typed_class(virt, 'NetworkPool')]
>
> - curr_cim_rev, changeset = get_provider_version(virt,
ip)
> - if curr_cim_rev >= input_graphics_pool_rev:
> + curr_rev, changeset = get_provider_version(virt, ip)
> + if curr_rev >= input_graphics_pool_rev and changeset
!= sles11_changeset:
> pt.append(get_typed_class(virt,
'GraphicsPool'))
> pt.append(get_typed_class(virt,
'InputPool'))
>
> diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-
> cim/cimtest/ElementConforms/01_forward.py
> --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py
Fri
> Mar 27 16:44:59 2009 -0700
> +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py
Thu
> Dec 18 14:10:33 2008 -0800
> @@ -44,7 +44,7 @@
> from CimTest import Globals
> from XenKvmLib.common_util import get_host_info
> from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
> -from XenKvmLib.const import do_main, get_provider_version
> +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset
> from CimTest.ReturnCodes import PASS, FAIL
> from XenKvmLib.enumclass import EnumInstances
>
> @@ -61,12 +61,17 @@
>
> cn_names = ["ComputerSystem"]
>
> - curr_cim_rev, changeset = get_provider_version(virt,
server)
> - if curr_cim_rev >= libvirt_cim_ectp_changes:
> + curr_rev, changeset = get_provider_version(virt, server)
> + if curr_rev >= libvirt_cim_ectp_changes:
> cn_names2 = ["VirtualSystemMigrationService",
"DiskPool",
> "NetworkPool",
>
"ProcessorPool", "MemoryPool", "AllocationCapabilities"]
> cn_names.extend(cn_names2)
> - if curr_cim_rev >= libvirt_cim_input_graphics_ectp:
> +
> + if changeset == sles11_changeset:
> + cn_names2 = ["DiskPool", "NetworkPool",
"ProcessorPool"]
> + cn_names.extend(cn_names2)
> +
> + if curr_rev >= libvirt_cim_input_graphics_ectp:
> cn_names.append("ConsoleRedirectionService")
>
> status, host_inst = get_host_info(server, virt)
> diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-
> cim/cimtest/LogicalDisk/03_ld_gi_errs.py
> --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py
Fri
> Mar 27 16:44:59 2009 -0700
> +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py
Thu
> Dec 18 14:10:33 2008 -0800
> @@ -48,7 +48,7 @@
> from XenKvmLib.enumclass import GetInstance, CIM_CimtestClass,
EnumInstances
> from XenKvmLib.classes import get_typed_class
> from XenKvmLib.vxml import get_class
> -from XenKvmLib.const import do_main, get_provider_version
> +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset
>
> sup_types = ['Xen', 'KVM', 'XenFV']
>
> @@ -105,7 +105,7 @@
> return status
>
> rev, changeset = get_provider_version(options.virt,
options.ip)
> - if rev < err_msg_changeset:
> + if rev < err_msg_changeset and changeset != sles11_changeset:
> old_ret = { 'rc' : CIM_ERR_NOT_FOUND,
>
'desc' : "No such instance (invalid_devid)"
> }
> diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-
> cim/cimtest/NetworkPort/01_netport.py
> --- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py
Fri Mar
> 27 16:44:59 2009 -0700
> +++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py
Thu Dec
> 18 14:10:33 2008 -0800
> @@ -37,9 +37,8 @@
> from XenKvmLib.classes import get_typed_class
> from XenKvmLib.vxml import XenXML, KVMXML, get_class
> from CimTest.Globals import logger
> -from XenKvmLib.const import do_main
> +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset
> from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
> -from XenKvmLib.const import get_provider_version
>
> sup_types = ['Xen', 'KVM', 'XenFV']
>
> @@ -53,7 +52,7 @@
>
> # The value of LinkTechnology should be set to
0 for rev > 599
> # else, it should be set to 2
> - if net_rev > rev:
> + if net_rev > rev and changeset != sles11_changeset:
> return 0
> else:
> return 2
> diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-
> cim/cimtest/Processor/03_proc_gi_errs.py
> --- a/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py
Fri
> Mar 27 16:44:59 2009 -0700
> +++ b/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py
Thu
> Dec 18 14:10:33 2008 -0800
> @@ -54,7 +54,7 @@
> from XenKvmLib.classes import get_typed_class
> from XenKvmLib.vxml import get_class
> from XenKvmLib.test_doms import destroy_and_undefine_all
> -from XenKvmLib.const import do_main, get_provider_version
> +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset
> from XenKvmLib.enumclass import GetInstance, CIM_CimtestClass,
EnumInstances
>
> sup_types = ['Xen', 'KVM', 'XenFV']
> @@ -109,7 +109,7 @@
> return FAIL
>
> rev, changeset = get_provider_version(options.virt,
options.ip)
> - if rev < err_msg_changeset:
> + if rev < err_msg_changeset and changeset != sles11_changeset:
> old_ret = { 'rc' : CIM_ERR_NOT_FOUND,
>
'desc' : "No such instance (invalid_devid)"
> }
> diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-
> cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
> --- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
> Fri Mar 27 16:44:59 2009 -0700
> +++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
> Thu Dec 18 14:10:33 2008 -0800
> @@ -151,7 +151,7 @@
> from XenKvmLib.classes import get_typed_class
> from CimTest.ReturnCodes import PASS, FAIL
> from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
> -from XenKvmLib.const import do_main, get_provider_version
> +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset
>
> sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
>
> @@ -252,7 +252,7 @@
> ]
>
> rev, changeset = get_provider_version(options.virt,
options.ip)
> - if rev < 682:
> + if rev < 682 and changeset != sles11_changeset:
> old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
>
'desc' : "No such instance (INVALID_DevID_Keyval)"
> }
> diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-cim/lib/XenKvmLib/const.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Mar 27
16:44:
> 59 2009 -0700
> +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Dec 18
14:10:
> 33 2008 -0800
> @@ -23,14 +23,16 @@
> import traceback
> from optparse import OptionParser
> from VirtLib.live import fv_cap
> +from VirtLib.utils import run_remote
> from CimTest.Globals import CIM_IP
> from pywbem import WBEMConnection
> from XenKvmLib.classes import get_typed_class
>
> platform_sup = ["Xen", "KVM", "XenFV"]
>
> -#RPM changeset values
> +#Distro changeset values
> f9_changeset="1fcf330fadf8+"
> +sles11_changeset="SLES_11"
>
> VIRSH_ERROR_DEFINE = "Failed to define a domain with the
name %s from virsh"
>
> @@ -152,6 +154,11 @@
>
>
> def get_provider_version(virt, ip):
> + cmd = "cat /etc/issue | grep 'SUSE Linux Enterprise
Server 11'"
> + rc, out = run_remote(ip, cmd)
> + if rc == 0:
> + return 0, sles11_changeset
> +
> conn = WBEMConnection('http://%s' % ip,
>
(os.getenv('CIM_USER'), os.getenv('CIM_PASS')),
>
os.getenv('CIM_NS'))
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim