# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1206688341 25200
# Node ID 5eae4d73506a53965f3fcf1bb132d04bd9266c4a
# Parent c9bb4d898469450c851139d5faa58a5818835e08
[TEST] update EC.01 for XenFV and KVM support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r c9bb4d898469 -r 5eae4d73506a
suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Thu Mar 27 11:07:12
2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Mar 28 00:12:21
2008 -0700
@@ -25,11 +25,12 @@ from VirtLib import live
from VirtLib import live
from XenKvmLib import assoc
from XenKvmLib import hostsystem
+from XenKvmLib.classes import get_typed_class
from CimTest import Globals
from CimTest.Globals import do_main
from CimTest.ReturnCodes import PASS, FAIL, SKIP
-sup_types = ['Xen']
+sup_types = ['Xen', 'XenFV', 'KVM']
@do_main(sup_types)
def main():
@@ -37,15 +38,16 @@ def main():
Globals.log_param()
try:
- host_sys = hostsystem.enumerate(options.ip)[0]
+ host_sys = hostsystem.enumerate(options.ip, options.virt)[0]
except Exception:
- Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, 'Xen_HostSystem')
+ Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, get_typed_class(options.virt,
'HostSystem'))
return FAIL
try:
elc = assoc.AssociatorNames(options.ip,
- "Xen_ElementCapabilities",
- "Xen_HostSystem",
+ "ElementCapabilities",
+ "HostSystem",
+ options.virt,
Name = host_sys.Name,
CreationClassName = host_sys.CreationClassName)
except Exception:
@@ -53,8 +55,8 @@ def main():
return FAIL
- valid_elc_name = ["Xen_VirtualSystemManagementCapabilities",
- "Xen_VirtualSystemMigrationCapabilities"]
+ valid_elc_name = [get_typed_class(options.virt,
"VirtualSystemManagementCapabilities"),
+ get_typed_class(options.virt,
"VirtualSystemMigrationCapabilities")]
valid_elc_id = ["ManagementCapabilities",
"MigrationCapabilities"]
@@ -74,15 +76,16 @@ def main():
for system in cs:
try:
elec = assoc.AssociatorNames(options.ip,
- "Xen_ElementCapabilities",
- "Xen_ComputerSystem",
+ "ElementCapabilities",
+ "ComputerSystem",
+ options.virt,
Name = system,
- CreationClassName =
"Xen_ComputerSystem")
+ CreationClassName =
get_typed_class(options.virt, "ComputerSystem"))
except Exception:
Globals.logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % system)
return FAIL
- if elec[0].classname != "Xen_EnabledLogicalElementCapabilities":
+ if elec[0].classname != get_typed_class(options.virt,
"EnabledLogicalElementCapabilities"):
Globals.logger.error("ElementCapabilities association classname error")
return FAIL
elif elec[0].keybindings['InstanceID'] != system: