# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1206687269 25200
# Node ID 9ae9d9c26a3024f02c8837ba0bca023385ab5c3d
# Parent c9bb4d898469450c851139d5faa58a5818835e08
[TEST] modified enmuclass lib support virt argument
Meanwhile, adapt to the current format
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r c9bb4d898469 -r 9ae9d9c26a30 suites/libvirt-cim/lib/XenKvmLib/enumclass.py
--- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Thu Mar 27 11:07:12 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Thu Mar 27 23:54:29 2008 -0700
@@ -215,7 +215,13 @@ class KVM_DiskResourceAllocationSettingD
# ex: Xen_RegisteredProfile
# keyname = The keyvalue
# ex: InstanceID in case of Xen_RegisteredProfile
-def enumerate_inst(server, classname):
+def enumerate_inst(server, classname, virt="Xen"):
+ classname = "%s" % classname
+ new_classname = classname.split('_')
+ if len(new_classname) == 2:
+ classname = classname[1]
+
+ classname = eval(get_typed_class(virt, classname))
instances = []
conn = pywbem.WBEMConnection('http://%s' % server,
(Globals.CIM_USER, Globals.CIM_PASS),