[Libvirt-cim] [PATCH] [TEST] Modify LogicalDisk.02 to call new EnumInstances
Deepti B Kalakeri
deeptik at linux.vnet.ibm.com
Tue Oct 14 11:17:59 UTC 2008
yunguol at cn.ibm.com wrote:
> # HG changeset patch
> # User Guolian Yun <yunguol at cn.ibm.com>
> # Date 1223965373 25200
> # Node ID 9c4002ff9f71246bb5e3e09cc9df0261b32fd90a
> # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0
> [TEST] Modify LogicalDisk.02 to call new EnumInstances
>
> Once all tc updated completion, follow up patch will remove
> the enumerate function in device.py
>
> Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>
>
> diff -r c7eaf17bd591 -r 9c4002ff9f71 suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py
> --- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Fri Oct 10 03:08:12 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Mon Oct 13 23:22:53 2008 -0700
> @@ -26,8 +26,8 @@ import sys
> import sys
> import pywbem
> from time import sleep
> -from XenKvmLib import devices
> from XenKvmLib import enumclass
> +from XenKvmLib.classes import get_typed_class
> from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
> from XenKvmLib.const import do_main
> from CimTest.ReturnCodes import PASS, FAIL, SKIP
> @@ -38,8 +38,8 @@ def clean_system(host, virt='Xen'):
> def clean_system(host, virt='Xen'):
> timer_count = 10
> for count in range(0, timer_count):
> - keys = ['Name', 'CreationClassName']
> - l = enumclass.enumerate(host, 'ComputerSystem', keys, virt)
> + cs = get_typed_class(virt, 'ComputerSystem')
> + l = enumclass.EnumInstances(host, cs)
> if len(l) == 0:
> return True
> if virt == 'Xen' or virt == 'XenFV':
> @@ -58,10 +58,10 @@ def main():
> key_list = ["DeviceID", "CreationClassName", "SystemName",
> "SystemCreationClassName"]
>
> - cn = "LogicalDisk"
> + cn = get_typed_class(options.virt, "LogicalDisk")
>
> try:
> - devs = devices.enumerate(options.ip, cn, key_list, options.virt)
> + devs = enumclass.Enumerate(options.ip, cn)
>
> except Exception, details:
> logger.error(CIM_ERROR_ENUMERATE, cn)
>
>
Tested this on KVM and it failed with the following error :
LogicalDisk - 02_nodevs.py: FAIL
ERROR - Failed to enumerate the class of KVM_LogicalDisk
ERROR - 'module' object has no attribute 'Enumerate'
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>
More information about the Libvirt-cim
mailing list