# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1223954323 25200
# Node ID 6e9d7bfb27efb912d81e4b702a3a3018395fcc80
# Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0
[TEST] #2 Modify HostedDependency.01&02 to call new EnumInstances
Updates from 1 to 2:
Using cs_class instead of hardcoding the 'ComputerSystem'.
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r c7eaf17bd591 -r 6e9d7bfb27ef
suites/libvirt-cim/cimtest/HostedDependency/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri Oct 10 03:08:12 2008
-0700
+++ b/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Mon Oct 13 20:18:43 2008
-0700
@@ -83,11 +83,11 @@ def main():
cxml.undefine(server)
return status
- keys = ['Name', 'CreationClassName']
+ cs_class = get_typed_class(options.virt, 'ComputerSystem')
try:
- cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt)
+ cs = enumclass.EnumInstances(server, cs_class)
except Exception,detail:
- logger.error(CIM_ERROR_ENUMERATE, 'ComputerSystem')
+ logger.error(CIM_ERROR_ENUMERATE, cs_class)
logger.error("Exception: %s", detail)
cxml.undefine(server)
return FAIL
diff -r c7eaf17bd591 -r 6e9d7bfb27ef
suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri Oct 10 03:08:12 2008
-0700
+++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Mon Oct 13 20:18:43 2008
-0700
@@ -89,8 +89,8 @@ def main():
cxml.undefine(server)
return status
- keys = ['Name', 'CreationClassName']
- cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt)
+ cs_class = get_typed_class(options.virt, 'ComputerSystem')
+ cs = enumclass.EnumInstances(server, cs_class)
if virt == 'Xen' or options.virt == 'XenFV':
# Xen honors additional domain-0
cs_list_len = 2
Show replies by date