[PATCH] [TEST] Fixing the if condition in 01_forward.py of HostedService
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1224229448 25200
# Node ID 5be3bda6fb16a5ece5aa18c254d3d934fb2f8831
# Parent a4a0adafb80f9434e06cb134d7e25bb9c11b1756
[TEST] Fixing the if condition in 01_forward.py of HostedService.
Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r a4a0adafb80f -r 5be3bda6fb16 suites/libvirt-cim/cimtest/HostedService/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Oct 17 00:40:25 2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Oct 17 00:44:08 2008 -0700
@@ -72,7 +72,7 @@ def main():
ccn_list = Set(ccn_list)
- if (len(val_serv) - len(ccn_list)) != 0:
+ if len((val_serv) - (ccn_list)) != 0:
if host_ccn == 'Linux_ComputerSystem':
return XFAIL_RC(bug_sblim)
else:
16 years, 2 months
[PATCH] [TEST] #2 Modify ResourcePoolConfigurationCapabilities/01_enum.py to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224226482 25200
# Node ID eb60cd543c12ba92606eac1777d14296062e36d9
# Parent 69fe94b1348985a337d385865d7522c78f57e116
[TEST] #2 Modify ResourcePoolConfigurationCapabilities/01_enum.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 69fe94b13489 -r eb60cd543c12 suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Thu Oct 16 03:14:27 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Thu Oct 16 23:54:42 2008 -0700
@@ -23,6 +23,7 @@
import sys
from XenKvmLib import enumclass
+from XenKvmLib.classes import get_typed_class
from CimTest import Globals
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
@@ -33,14 +34,11 @@ def main():
def main():
options = main.options
- key_list = ["InstanceID"]
+ cn = get_typed_class(options.virt, "ResourcePoolConfigurationCapabilities")
try:
- rpcc = enumclass.enumerate(options.ip,
- "ResourcePoolConfigurationCapabilities",
- key_list,
- options.virt)
+ rpcc = enumclass.EnumInstances(options.ip, cn)
except Exception:
- Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, '%s_ResourcePoolConfigurationCapabilities' % options.virt)
+ Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, cn)
return FAIL
if len(rpcc) != 1:
16 years, 2 months
[PATCH] [TEST] #2 Modify RASD/04_disk_rasd_size.py to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224226125 25200
# Node ID 9b1a157b8e9dcef3ab009af30088b6f8ac846737
# Parent 69fe94b1348985a337d385865d7522c78f57e116
[TEST] #2 Modify RASD/04_disk_rasd_size.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 69fe94b13489 -r 9b1a157b8e9d suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py
--- a/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Thu Oct 16 03:14:27 2008 -0700
+++ b/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Thu Oct 16 23:48:45 2008 -0700
@@ -33,6 +33,7 @@ from XenKvmLib.common_util import create
from XenKvmLib.common_util import create_using_definesystem
from XenKvmLib import vsms
from XenKvmLib import enumclass
+from XenKvmLib.classes import get_typed_class
def make_image(ip, size):
s, fn = utils.run_remote(ip, "mktemp")
@@ -89,8 +90,9 @@ def test_rasd(options, temp, test_size):
options.ip,
params=params,
virt=options.virt)
-
- rasds = enumclass.enumerate_inst(options.ip, drasd_class, options.virt)
+
+ cn = get_typed_class(options.virt, 'DiskResourceAllocationSettingData')
+ rasds = enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True)
status = FAIL
for rasd in rasds:
16 years, 2 months
[PATCH] [TEST] Modify RPCC.01 and VSMSD.01 to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224123791 25200
# Node ID 1ea2c899795ca1f259b09c1f6813d728f074b56a
# Parent 96d45b1dcc0801ade819413abe1af43b3957dde4
[TEST] Modify RPCC.01 and VSMSD.01 to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 96d45b1dcc08 -r 1ea2c899795c suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Wed Oct 15 06:07:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Wed Oct 15 19:23:11 2008 -0700
@@ -23,6 +23,7 @@
import sys
from XenKvmLib import enumclass
+from XenKvmLib.classes import get_typed_class
from CimTest import Globals
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
@@ -32,15 +33,11 @@ sup_types = ['Xen', 'XenFV', 'KVM', 'LXC
@do_main(sup_types)
def main():
options = main.options
-
- key_list = ["InstanceID"]
+ cn = get_typed_class(options.virt, "ResourcePoolConfigurationCapabilities")
try:
- rpcc = enumclass.enumerate(options.ip,
- "ResourcePoolConfigurationCapabilities",
- key_list,
- options.virt)
+ rpcc = enumclass.EnumInstances(options.ip, cn)
except Exception:
- Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, '%s_ResourcePoolConfigurationCapabilities' % options.virt)
+ Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, cn)
return FAIL
if len(rpcc) != 1:
diff -r 96d45b1dcc08 -r 1ea2c899795c suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Wed Oct 15 06:07:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Wed Oct 15 19:23:11 2008 -0700
@@ -45,9 +45,7 @@ def main():
priority = 0
try:
- vsmsd = enumclass.enumerate_inst(options.ip,
- "VirtualSystemMigrationSettingData",
- options.virt)
+ vsmsd = 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] Update Profile/02_profile_to_elec.py to call new EnumNames
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224140552 25200
# Node ID 0167493d2ce4cad2c09d572964844f199555fcb4
# Parent 96d45b1dcc0801ade819413abe1af43b3957dde4
[TEST] Update Profile/02_profile_to_elec.py to call new EnumNames
This tc updates fails for me, I look into this but I can't work it out.
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 96d45b1dcc08 -r 0167493d2ce4 suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py
--- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Wed Oct 15 06:07:28 2008 -0700
+++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Thu Oct 16 00:02:32 2008 -0700
@@ -95,7 +95,7 @@ def get_profile(server, virt):
profile = None
try:
- proflist = enumclass.enumerate_inst(server, 'RegisteredProfile', virt)
+ proflist = enumclass.EnumNames(server, cn)
status, profile = get_expected_inst(cn, proflist, 'RegisteredName',
registeredname)
except Exception, detail:
16 years, 2 months
[PATCH] [TEST]#2 Modify RASD/02_enum.py to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224225358 25200
# Node ID 4d284efac99979c0f53a642b676a793535aa9767
# Parent 69fe94b1348985a337d385865d7522c78f57e116
[TEST]#2 Modify RASD/02_enum.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 69fe94b13489 -r 4d284efac999 suites/libvirt-cim/cimtest/RASD/02_enum.py
--- a/suites/libvirt-cim/cimtest/RASD/02_enum.py Thu Oct 16 03:14:27 2008 -0700
+++ b/suites/libvirt-cim/cimtest/RASD/02_enum.py Thu Oct 16 23:35:58 2008 -0700
@@ -68,7 +68,7 @@ def get_rasd_values(classname, virt, ser
status = PASS
rasd_list = []
try:
- rasd_list = enumclass.enumerate_inst(server, classname, virt)
+ rasd_list = enumclass.EnumInstances(server, classname, ret_cim_inst=True)
if len(rasd_list) < 1:
logger.error("%s returned %i instances, excepted at least 1.",
classname, len(rasd_list))
16 years, 2 months
[PATCH] [TEST] #2 Update Profile/02_profile_to_elec.py to call new EnumInstance
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224225202 25200
# Node ID 52f1f293e454d4836d0a44ad4026b0b106c8c7af
# Parent 69fe94b1348985a337d385865d7522c78f57e116
[TEST] #2 Update Profile/02_profile_to_elec.py to call new EnumInstance
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 69fe94b13489 -r 52f1f293e454 suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py
--- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Thu Oct 16 03:14:27 2008 -0700
+++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Thu Oct 16 23:33:22 2008 -0700
@@ -95,7 +95,7 @@ def get_profile(server, virt):
profile = None
try:
- proflist = enumclass.enumerate_inst(server, 'RegisteredProfile', virt)
+ proflist = enumclass.EnumInstances(server, cn, ret_cim_inst=True)
status, profile = get_expected_inst(cn, proflist, 'RegisteredName',
registeredname)
except Exception, detail:
16 years, 2 months
[PATCH] [TEST] #2 Update VirtualSystemManagementService/11_define_memrasdunits.py to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224225063 25200
# Node ID 830cc917812e3dc38483d79713ec6fc14a95d9ee
# Parent 69fe94b1348985a337d385865d7522c78f57e116
[TEST] #2 Update VirtualSystemManagementService/11_define_memrasdunits.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 69fe94b13489 -r 830cc917812e suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Oct 16 03:14:27 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Oct 16 23:31:03 2008 -0700
@@ -69,7 +69,7 @@ def try_define(options, vssd, units, val
def check_value(options):
mrasd_cn = get_typed_class(options.virt, rasd.masd_cn)
- rasds = enumclass.enumerate_inst(options.ip, mrasd_cn, options.virt)
+ rasds = enumclass.EnumInstances(options.ip, mrasd_cn, ret_cim_inst=True)
the_rasd = None
mem_kb = mem_bytes >> 10
16 years, 2 months
[PATCH] [TEST] #2 Update VirtualSystemMigrationSettingData/01_enum.py to call new EnumInstances
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224224874 25200
# Node ID 6e3cf406d47a68b3cb1c95f2747842fa9f1b452e
# Parent 69fe94b1348985a337d385865d7522c78f57e116
[TEST] #2 Update VirtualSystemMigrationSettingData/01_enum.py to call new EnumInstances
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 69fe94b13489 -r 6e3cf406d47a suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Thu Oct 16 03:14:27 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Thu Oct 16 23:27:54 2008 -0700
@@ -45,9 +45,7 @@ def main():
priority = 0
try:
- vsmsd = enumclass.enumerate_inst(options.ip,
- "VirtualSystemMigrationSettingData",
- options.virt)
+ vsmsd = enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True)
except Exception, detail:
logger.error(CIM_ERROR_ENUMERATE, cn)
logger.error("Exception: %s", detail)
16 years, 2 months
[PATCH] [TEST] update EnumInstances so it returns both CIMInstance and CIM_CimtestClass objects
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1224224694 25200
# Node ID 3baaf90a47eb13151a67df01718f98b4771df77b
# Parent 69fe94b1348985a337d385865d7522c78f57e116
[TEST] update EnumInstances so it returns both CIMInstance and CIM_CimtestClass objects
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 69fe94b13489 -r 3baaf90a47eb suites/libvirt-cim/lib/XenKvmLib/enumclass.py
--- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Thu Oct 16 03:14:27 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Thu Oct 16 23:24:54 2008 -0700
@@ -477,7 +477,7 @@ def EnumNames(host, cn):
return names
-def EnumInstances(host, cn):
+def EnumInstances(host, cn, ret_cim_inst=False):
'''Resolve the enumeration given the @cn.
Return a list of CIMInstance objects.'''
@@ -491,7 +491,10 @@ def EnumInstances(host, cn):
list = []
for name in refs:
- list.append(CIM_CimtestClass(host, name))
+ inst = CIM_CimtestClass(host, name)
+ if ret_cim_inst:
+ inst = inst.inst
+ list.append(inst)
return list
16 years, 2 months