# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1223987981 25200
# Node ID 3131e7898af7f8c28d18e9c0d92c4855b08c1052
# Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0
[TEST] Fixing 04_hs_to_EAPF.py tc of HostSystem to work with/without sblim-base-provider.
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 c7eaf17bd591 -r 3131e7898af7
suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
--- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Oct 10 03:08:12 2008
-0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Tue Oct 14 05:39:41 2008
-0700
@@ -56,7 +56,7 @@
from XenKvmLib.assoc import AssociatorNames, Associators
from XenKvmLib.common_util import get_host_info
from XenKvmLib.classes import get_typed_class
-from CimTest.ReturnCodes import PASS, FAIL, SKIP
+from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC
from XenKvmLib.test_doms import destroy_and_undefine_all
from XenKvmLib.logicaldevices import verify_device_values
@@ -66,6 +66,7 @@
test_mac = "00:11:22:33:44:aa"
test_mem = 128
test_vcpus = 1
+bug_sblim='00007'
def print_err(err, detail, cn):
logger.error(err % cn)
@@ -147,22 +148,23 @@
return dom_list
-def get_assocname_info(server, cn, an, qcn, hostname, virt):
+def get_assocname_info(server, host_cn, an, qcn, hostname):
status = PASS
assoc_info = []
try:
- assoc_info = AssociatorNames(server,
- an,
- cn,
- CreationClassName=cn,
- Name = hostname)
+ assoc_info = AssociatorNames(server, an, host_cn,
+ CreationClassName=host_cn,
+ Name = hostname)
if len(assoc_info) < 1:
- logger.error("%s returned %i %s objects" % (an,
- len(assoc_info), qcn))
- status = FAIL
+ if host_cn == 'Linux_ComputerSystem':
+ return XFAIL_RC(bug_sblim), assoc_info
+ else:
+ logger.error("%s returned %i %s objects",
+ an, len(assoc_info), qcn)
+ return FAIL, assoc_info
except Exception, detail:
- print_err(CIM_ERROR_ASSOCIATORNAMES, detail, cn)
+ print_err(CIM_ERROR_ASSOCIATORNAMES, detail, host_cn)
status = FAIL
return status, assoc_info
@@ -232,10 +234,11 @@
net_name = vsxml.xml_get_net_network()
# Get the hostedResourcePool info first
- cn = classname
+ host_cn = classname
an = get_typed_class(virt, "HostedResourcePool")
qcn = "Device Pool"
- status, pool = get_assocname_info(server, cn, an, qcn, host_name, virt)
+ logger.error("DEBUG host_name is %s", host_name)
+ status, pool = get_assocname_info(server, host_cn, an, qcn, host_name)
if status != PASS:
vsxml.undefine(server)
return status