[PATCH] [TEST] Update ElementConforms/01_forward.py to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224139240 25200
# Node ID 305508cd6aaacfcfe133372bc963b55f284e599a
# Parent 96d45b1dcc0801ade819413abe1af43b3957dde4
[TEST] Update ElementConforms/01_forward.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 96d45b1dcc08 -r 305508cd6aaa suites/libvirt-cim/cimtest/ElementConforms/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Wed Oct 15 06:07:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Wed Oct 15 23:40:40 2008 -0700
@@ -49,7 +49,7 @@ from CimTest.Globals import logger, CIM_
from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, CIM_ERROR_ENUMERATE
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
-from XenKvmLib.enumclass import enumerate
+from XenKvmLib.enumclass import EnumInstances
from XenKvmLib.const import default_network_name, default_pool_name
@@ -139,8 +139,7 @@ def get_proflist(server, reg_classname,
profiles_instid_list = []
status = PASS
try:
- key_list = ["InstanceID"]
- proflist = enumerate(server, reg_classname, key_list, virt)
+ proflist = EnumInstances(server, reg_classname)
if len(proflist) < 7:
logger.error("'%s' returned '%d' '%s' objects, expected atleast 7",
reg_classname, len(proflist), 'Profile')
16 years, 2 months
[PATCH] [TEST] Update SystemDevice 02_reverse.py and 03_fwderrs.py to call new EnumInstances
by yunguol@cn.ibm.com
# 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:
16 years, 2 months
[PATCH] [TEST] Fix ResourcePoolConfigurationService/01_enum.py to use get_host_info()
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224137120 25200
# Node ID 11d66d14bcac20d9b34bf23a71315f3dcf980be8
# Parent 96d45b1dcc0801ade819413abe1af43b3957dde4
[TEST] Fix ResourcePoolConfigurationService/01_enum.py to use get_host_info()
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 96d45b1dcc08 -r 11d66d14bcac suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Wed Oct 15 06:07:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Wed Oct 15 23:05:20 2008 -0700
@@ -25,7 +25,7 @@ import sys
import sys
from XenKvmLib import enumclass
from XenKvmLib import rpcs
-from XenKvmLib.common_util import check_sblim
+from XenKvmLib.common_util import get_host_info
from CimTest import Globals
from CimTest.ReturnCodes import PASS, FAIL
from CimTest.Globals import logger
@@ -40,16 +40,10 @@ def main():
server = options.ip
classname = get_typed_class(options.virt, "ResourcePoolConfigurationService")
keys = ['Name', 'CreationClassName']
- status, linux_cs = check_sblim(options.ip, options.virt)
- if status == PASS:
- host_sys = linux_cs
- else:
- try:
- host_sys = enumclass.enumerate(server, 'HostSystem', keys, options.virt)[0]
- except Exception:
- host_cn = get_typed_class(options.virt, "HostSystem")
- logger.error(Globals.CIM_ERROR_ENUMERATE % host_cn)
- return FAIL
+ status, host_sys, host_cn = get_host_info(server, options.virt)
+ if status != PASS:
+ logger.error("Error in calling get_host_info function")
+ return FAIL
try:
rpcservice = rpcs.enumerate(server, classname)
@@ -59,8 +53,8 @@ def main():
valid_service = {"Name" : "RPCS",
"CreationClassName" : classname,
- "SystemCreationClassName" : host_sys.CreationClassName,
- "SystemName" : host_sys.Name}
+ "SystemCreationClassName" : host_cn,
+ "SystemName" : host_sys}
if len(rpcservice) != 1:
logger.error("Too many service error")
16 years, 2 months
[PATCH] [TEST]#2 Update VSSD.04 to call new EnumNames
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224136138 25200
# Node ID 58b1362db013915df27d5ce378a3150abef64cd0
# Parent 96d45b1dcc0801ade819413abe1af43b3957dde4
[TEST]#2 Update VSSD.04 to call new EnumNames
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 96d45b1dcc08 -r 58b1362db013 suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py
--- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Wed Oct 15 06:07:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Wed Oct 15 22:48:58 2008 -0700
@@ -104,7 +104,8 @@ def get_inst_from_list(classname, vssd_l
# We expect only one record to be returned.
if len(inst) != 1:
- logger.error("%s returned %i %s objects, expected only 1" % (classname, len(inst), 'VSSD'))
+ logger.error("%s returned %i %s objects, expected only 1"\
+ % (classname, len(inst), 'VSSD'))
status = FAIL
if status != PASS:
@@ -117,9 +118,10 @@ def get_vssd_info():
status = PASS
try:
classname = get_typed_class(virt, 'VirtualSystemSettingData')
- vssd = enumclass.enumerate_inst(server, eval('enumclass.' + classname), virt)
+ vssd = enumclass.EnumNames(server, classname)
if len(vssd) < 1 :
- logger.error("%s returned %i %s objects, expected atleast 1" % (classname, len(vssd), 'VSSD'))
+ logger.error("%s returned %i %s objects, expected atleast 1" \
+ % (classname, len(vssd), 'VSSD'))
status = FAIL
except Exception, detail:
16 years, 2 months
[PATCH] [TEST] 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 1223968768 25200
# Node ID 1fe0fcbda10f32261c3f64f8d77ab4639c2b77ae
# Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0
[TEST] Update common_util.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r c7eaf17bd591 -r 1fe0fcbda10f suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Oct 10 03:08:12 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Oct 14 00:19:28 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(server, '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
Errors on running Cimtest
by Toshifumi Fujimura
Hello!
I made Cimtest environment. But I have some trobles on running cimtest..
These errors are not in Test Run Reports
"http://wiki.libvirt.org/page/Cimtest_testruns".
Would you give me any suggestion of this message?
I check httpd is running on PyWBEM machine.
But "Socket.error" is appeared (occured on cim_http.wbem_request in
cim_operations.py).
======================================================================================
Testing KVM hypervisor
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: FAIL
ERROR - KVM_MemoryPool did not return any instances
ERROR - Only 0 pools returned, expected at least 4
Socket error: (111, 'Connection refused')
Socket error: (111, 'Connection refused')
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL
ERROR - Unexpected rc code 0 and description Socket error: (111,
'Connection refused')
ERROR - ------ FAILED: Invalid InstanceID Key Value.------
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: PASS
--------------------------------------------------------------------
======================================================================================
Works for me.
Toshifumi Fujimura.
16 years, 2 months
[PATCH] [TEST] Modify VirtualSystemMigrationCapabilities/01_enum.py to call new EnumNames
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224123362 25200
# Node ID dd29f042f551d33c00b66c07dacbd90ff0e590bd
# Parent 96d45b1dcc0801ade819413abe1af43b3957dde4
[TEST] Modify VirtualSystemMigrationCapabilities/01_enum.py to call new EnumNames
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 96d45b1dcc08 -r dd29f042f551 suites/libvirt-cim/cimtest/VirtualSystemMigrationCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationCapabilities/01_enum.py Wed Oct 15 06:07:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationCapabilities/01_enum.py Wed Oct 15 19:16:02 2008 -0700
@@ -44,9 +44,7 @@ def main():
instid = 'MigrationCapabilities'
try:
- vsmc = enumclass.enumerate_inst(options.ip,
- "VirtualSystemMigrationCapabilities",
- options.virt)
+ vsmc = enumclass.EnumNames(options.ip, cn)
except Exception:
logger.error(CIM_ERROR_ENUMERATE, cn)
return FAIL
16 years, 2 months
[PATCH] [TEST]Modify VirtualSystemManagementCapabilities/01_enum.py to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224122934 25200
# Node ID f98155eef00a89404a49bbeab68d4aadea03eac1
# Parent 96d45b1dcc0801ade819413abe1af43b3957dde4
[TEST]Modify VirtualSystemManagementCapabilities/01_enum.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 96d45b1dcc08 -r f98155eef00a suites/libvirt-cim/cimtest/VirtualSystemManagementCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementCapabilities/01_enum.py Wed Oct 15 06:07:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementCapabilities/01_enum.py Wed Oct 15 19:08:54 2008 -0700
@@ -47,11 +47,7 @@ def main():
sync_method_val = Set([ 1L, 2L, 3L, 5L, 6L, 7L ])
try:
- key_list = ["InstanceID"]
- vsmc = enumclass.enumerate(server,
- "VirtualSystemManagementCapabilities",
- key_list,
- options.virt)
+ vsmc = enumclass.EnumInstances(server, cn)
except Exception:
logger.error(CIM_ERROR_ENUMERATE, cn)
return FAIL
16 years, 2 months
[PATCH] [TEST] Modify VirtualSystemSnapshotService/01_enum.py to call new EnumNames
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224122626 25200
# Node ID 7a32f75318dedb2743e039cebcf8081cd9524565
# Parent 96d45b1dcc0801ade819413abe1af43b3957dde4
[TEST] Modify VirtualSystemSnapshotService/01_enum.py to call new EnumNames
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 96d45b1dcc08 -r 7a32f75318de suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py Wed Oct 15 06:07:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py Wed Oct 15 19:03:46 2008 -0700
@@ -50,9 +50,7 @@ def main():
if status != PASS:
return status
try:
- vs_sservice = enumclass.enumerate_inst(options.ip,
- "VirtualSystemSnapshotService",
- options.virt)
+ vs_sservice = enumclass.EnumNames(options.ip, cn)
except Exception, detail:
logger.error(CIM_ERROR_ENUMERATE, cn)
logger.error("Exception: %s", detail)
16 years, 2 months