# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224138441 25200
# Node ID a87e6df3505f5fc32361dbf959d200c4f4d6f5e9
# Parent 96d45b1dcc0801ade819413abe1af43b3957dde4
[TEST] Update SystemDevice 02_reverse.py and 03_fwderrs.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 96d45b1dcc08 -r a87e6df3505f
suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Wed Oct 15 06:07:28 2008
-0700
+++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Wed Oct 15 23:27:21 2008
-0700
@@ -58,8 +58,9 @@ def main():
key_list = ["DeviceID", "CreationClassName",
"SystemName",
"SystemCreationClassName"]
for items in devlist:
+ cn = get_typed_class(options.virt, items)
try:
- devs = devices.enumerate(options.ip, items, key_list, options.virt)
+ devs = enumclass.EnumInstances(options.ip, cn)
except Exception, detail:
logger.error("Exception: %s" % detail)
cxml.destroy(options.ip)
@@ -99,7 +100,8 @@ def main():
'Name': systems[0]['Name'],
'CreationClassName': systems[0]['CreationClassName']
}
- system = enumclass.getInstance(options.ip, 'ComputerSystem', keys,
options.virt)
+ cn = get_typed_class(options.virt, 'ComputerSystem')
+ system = enumclass.GetInstance(options.ip, cn, keys)
if system.Name == test_dom:
status = PASS
diff -r 96d45b1dcc08 -r a87e6df3505f
suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Wed Oct 15 06:07:28 2008
-0700
+++ b/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Wed Oct 15 23:27:21 2008
-0700
@@ -34,7 +34,7 @@ from VirtLib import utils
from VirtLib import utils
from XenKvmLib import vxml
from XenKvmLib import assoc
-from XenKvmLib import devices
+from XenKvmLib import enumclass
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger
from XenKvmLib.const import do_main
@@ -89,7 +89,8 @@ def main():
try:
for item in devlist:
- devs = devices.enumerate(options.ip, item, key_list, options.virt)
+ cn = get_typed_class(options.virt, item)
+ devs = enumclass.EnumInstances(options.ip, cn)
if len(devs) == 0:
raise Exception('empty result returned')
for dev in devs:
Show replies by date