# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1207033501 25200
# Node ID 2842b5c65fefad7348abd031bd3977ff3db760be
# Parent f34da7c52c40aaba7ec9a9475398a5fcb8825c12
[TEST] ElementConforms.03 for XenFV and KVM support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r f34da7c52c40 -r 2842b5c65fef
suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Tue Apr 01 00:03:34
2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Tue Apr 01 00:05:01
2008 -0700
@@ -55,14 +55,13 @@ from VirtLib import utils
from VirtLib import utils
from XenKvmLib import assoc
from XenKvmLib.common_util import try_assoc
+from XenKvmLib.classes import get_typed_class
from CimTest.ReturnCodes import PASS, FAIL
from CimTest import Globals
from CimTest.Globals import log_param, logger, CIM_USER, CIM_PASS, do_main
-sup_types = ['Xen']
+sup_types = ['Xen', 'XenFV', 'KVM']
-classname = 'Xen_RegisteredProfile'
-ac_classname = 'Xen_ElementConformsToProfile'
bug = '92642'
expr_values = {
@@ -72,7 +71,9 @@ expr_values = {
'desc' : 'No such instance' }
}
-def try_invalid_assoc(name_val, i, field):
+def try_invalid_assoc(name_val, i, field, virt="Xen"):
+ classname = get_typed_class(virt, "RegisteredProfile")
+ ac_classname = get_typed_class(virt, "ElementConformsToProfile")
j = 0
keys = {}
temp = name_val[i]
@@ -111,7 +112,7 @@ def main():
status = retval
for i in range(len(tc_scen)):
- retval = try_invalid_assoc(vs_name_val, i, tc_scen[i])
+ retval = try_invalid_assoc(vs_name_val, i, tc_scen[i], options.virt)
if retval != PASS:
status = retval