# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224076048 25200
# Node ID aa2a6448402bcb811883b2c2ab8c6bab65bcbe53
# Parent b22a7a3c7972648a8067b88189ff5a7a8509b160
[TEST] #2 Modify LogicalDisk.02 to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b22a7a3c7972 -r aa2a6448402b suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py
--- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Mon Oct 13 22:48:51 2008 -0700
+++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Wed Oct 15 06:07:28 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.EnumInstances(options.ip, cn)
except Exception, details:
logger.error(CIM_ERROR_ENUMERATE, cn)