[PATCH] [TEST] Modify ElementCapabilities/01_forward.py to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224122345 25200
# Node ID 066002ecfb3df8ddb69fd33ce3cadb44433aa7c0
# Parent cfc2c9d1212d80b4ee2ddf37c5e9398b4e349b26
[TEST] Modify ElementCapabilities/01_forward.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r cfc2c9d1212d -r 066002ecfb3d suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Oct 15 05:57:17 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Oct 15 18:59:05 2008 -0700
@@ -30,7 +30,7 @@ from CimTest.Globals import logger, CIM_
from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC
-from XenKvmLib.enumclass import enumerate
+from XenKvmLib.enumclass import EnumInstances
from XenKvmLib.common_util import get_host_info
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
@@ -38,8 +38,8 @@ bug_sblim = "00007"
bug_sblim = "00007"
def append_to_list(server, virt, poolname, valid_elc_id):
- keys_list = ['InstanceID']
- pool_list = enumerate(server, poolname, keys_list, virt)
+ poolname = get_typed_class(virt, poolname)
+ pool_list = EnumInstances(server, poolname)
if len(pool_list) > 0:
for pool in pool_list:
valid_elc_id.append(pool.InstanceID)
16 years, 2 months
[PATCH] [TEST] #2 Modify LogicalDisk.02 to call new EnumInstances
by yunguol@cn.ibm.com
# 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)
16 years, 2 months
[PATCH] [TEST] #3 Modify VSSD.01 to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224075437 25200
# Node ID 94e61830d6cc83989f0aa4e7179e67e9eb7fe9bb
# Parent b22a7a3c7972648a8067b88189ff5a7a8509b160
[TEST] #3 Modify VSSD.01 to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b22a7a3c7972 -r 94e61830d6cc suites/libvirt-cim/cimtest/VSSD/01_enum.py
--- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 13 22:48:51 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Wed Oct 15 05:57:17 2008 -0700
@@ -29,6 +29,7 @@ import sys
import sys
from VirtLib import live
from XenKvmLib import enumclass
+from XenKvmLib.classes import get_typed_class
from XenKvmLib.test_doms import destroy_and_undefine_all
from XenKvmLib.vxml import get_class
from CimTest.Globals import logger
@@ -53,10 +54,8 @@ def main():
try:
live_cs = live.domain_list(options.ip, options.virt)
- key_list = ["InstanceID"]
- syslst = enumclass.enumerate(options.ip, "VirtualSystemSettingData",
- key_list, options.virt)
-
+ vssd_class = get_typed_class(options.virt, "VirtualSystemSettingData")
+ syslst = enumclass.EnumInstances(options.ip, vssd_class)
found = 0
for vssd in syslst :
if options.virt == 'XenFV':
16 years, 2 months
[PATCH] [TEST] #2 Update common_util.py to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224035857 25200
# Node ID c8fb99643549b9e20efc7854dcbcde9474fbd242
# Parent b22a7a3c7972648a8067b88189ff5a7a8509b160
[TEST] #2 Update common_util.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b22a7a3c7972 -r c8fb99643549 suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Oct 13 22:48:51 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Oct 14 18:57:37 2008 -0700
@@ -217,7 +217,8 @@ def get_host_info(server, virt="Xen"):
# sblim-base-provider provider related changes
ret, linux_cs = check_sblim(server)
- host_info = enumclass.enumerate(server, 'HostSystem', keys, virt)
+ hs_class = get_typed_class(virt, 'HostSystem')
+ host_info = enumclass.EnumInstances(server, hs_class)
if ret == PASS:
host_sys = linux_cs
elif len(host_info) == 1:
@@ -499,8 +500,9 @@ def check_sblim(server, virt='Xen'):
Globals.CIM_NS = 'root/cimv2'
keys = ['Name', 'CreationClassName']
linux_cs = None
+ cs = 'Linux_ComputerSystem'
try:
- linux = enumclass.enumerate(server, 'ComputerSystem', keys, 'Linux')
+ linux = enumclass.EnumInstances(server, cs)
if len(linux) == 1:
status = PASS
linux_cs = linux[0]
16 years, 2 months
Remove enumerate() function in device.py and update tc to call new function in enumclass.py
by Guo Lian Yun
Hi,
Do you think it's better to remove enumerate() function in device.py? Then
we have to update tc to call new EnumInstances() function in enumclass.py.
Who would like to take up this work? If not, I will cook up these patches.
Thanks!
Best,
Regards
Daisy (运国莲)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol(a)cn.ibm.com
TEL: (86)-21-60922403
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203
16 years, 2 months
[PATCH] [TEST] Modify LogicalDisk.02 to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)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(a)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)
16 years, 2 months
[PATCH] [TEST] Modify VirtualSystemSnapshotServiceCapabilities/01_enum.py to call new EnumNames
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1223969074 25200
# Node ID cf9bea2069bd6f692d443281bb86d3e56936b985
# Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0
[TEST] Modify VirtualSystemSnapshotServiceCapabilities/01_enum.py to call new EnumNames
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r c7eaf17bd591 -r cf9bea2069bd suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py Fri Oct 10 03:08:12 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py Tue Oct 14 00:24:34 2008 -0700
@@ -42,9 +42,7 @@ def main():
instid = 'SnapshotCapabilities'
try:
- vs_sservicecap = enumclass.enumerate_inst(options.ip,
- "VirtualSystemSnapshotServiceCapabilities",
- options.virt)
+ vs_sservicecap = enumclass.EnumNames(options.ip, cn)
except Exception, detail:
logger.error(CIM_ERROR_ENUMERATE, cn)
logger.error("Exception: %s", detail)
16 years, 2 months
[PATCH] [TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to call new GetInstance
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1223891987 25200
# Node ID 7cf9ca34ef7b5f8a9f3762f68185c6bd42252e67
# Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0
[TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to call new GetInstance
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r c7eaf17bd591 -r 7cf9ca34ef7b suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Fri Oct 10 03:08:12 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Mon Oct 13 02:59:47 2008 -0700
@@ -62,11 +62,12 @@
# otherwise.
for i in range(1, (timeout + 1)):
sleep(1)
+ cs_class = get_typed_class(options.virt, 'ComputerSystem')
keys = {
'Name' : test_dom,
- 'CreationClassName' : get_typed_class(options.virt, 'ComputerSystem')
+ 'CreationClassName' : cs_class
}
- cs = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt)
+ cs = enumclass.GetInstance(options.ip, cs_class, keys)
if cs.Name != test_dom:
Globals.logger.error("VS %s is not defined" % test_dom)
break
diff -r c7eaf17bd591 -r 7cf9ca34ef7b suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Fri Oct 10 03:08:12 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Mon Oct 13 02:59:47 2008 -0700
@@ -146,10 +146,7 @@
vssd_cn = get_typed_class(options.virt, 'VirtualSystemSettingData')
try:
- vssd = enumclass.getInstance(options.ip, \
- 'VirtualSystemSettingData', \
- key_list, \
- options.virt)
+ vssd = enumclass.GetInstance(options.ip, vssd_cn, key_list)
if vssd is None:
logger.error("VSSD instance for %s not found" % test_dom)
cxml.undefine(options.ip)
16 years, 2 months
[PATCH] [TEST]#Modify VSSD.01 to call new EnumInstances and EnumNames
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1223962756 25200
# Node ID 430656f260d8b29c31a1c207103d849ee9d27aca
# Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0
[TEST]#Modify VSSD.01 to call new EnumInstances and EnumNames
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r c7eaf17bd591 -r 430656f260d8 suites/libvirt-cim/cimtest/VSSD/01_enum.py
--- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Fri Oct 10 03:08:12 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 13 22:39:16 2008 -0700
@@ -31,6 +31,7 @@ from XenKvmLib import enumclass
from XenKvmLib import enumclass
from XenKvmLib.test_doms import destroy_and_undefine_all
from XenKvmLib.vxml import get_class
+from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
@@ -53,9 +54,8 @@ def main():
try:
live_cs = live.domain_list(options.ip, options.virt)
- key_list = ["InstanceID"]
- syslst = enumclass.enumerate(options.ip, "VirtualSystemSettingData",
- key_list, options.virt)
+ vssd_class = get_typed_class(options.virt, "VirtualSystemSettingData")
+ syslst = enumclass.enumerate(options.ip, vssd_class)
found = 0
for vssd in syslst :
16 years, 2 months