# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1208857816 -19800
# Node ID 1369fdc3f3a9f10207a3b2e1966e6908c1af3fb8
# Parent cc4b76d02e85e970d3df8c837dbe5722132b568d
[TEST] Updating 05_reverse_vsmcap.py tc in SettingsDefineCapabilities
1) To support KVM and XenFV
2) To adapt to the new infrastructure changes
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r cc4b76d02e85 -r 1369fdc3f3a9
suites/libvirt-cim/cimtest/SettingsDefineCapabilities/05_reverse_vsmcap.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/05_reverse_vsmcap.py Tue Apr
22 15:18:26 2008 +0530
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/05_reverse_vsmcap.py Tue Apr
22 15:20:16 2008 +0530
@@ -20,12 +20,14 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# This tc is used to verify the Classname and InstanceID of
-# Xen_SettingsDefineCapabilities association with Xen_VirtualSystemMigrationCapabilities
+# Xen_SettingsDefineCapabilities association with
+# Xen_VirtualSystemMigrationCapabilities
# Command
# -------
# wbemcli ai -ac Xen_SettingsDefineCapabilities \
# 'http://localhost:5988/root/virt:\
-#
Xen_VirtualSystemMigrationCapabilities.InstanceID="MigrationCapabilities"'
-nl
+# Xen_VirtualSystemMigrationCapabilities.InstanceID=\
+# "MigrationCapabilities"' -nl
#
#
# Output
@@ -36,32 +38,33 @@
# Date : 05-03-2008
import sys
-from VirtLib import utils
from XenKvmLib import assoc
-from CimTest.Globals import CIM_ERROR_ASSOCIATORS, logger, do_main
+from CimTest.Globals import log_param, CIM_ERROR_ASSOCIATORS, logger
from CimTest.ReturnCodes import PASS, FAIL
-
-sup_types = ['Xen']
+from CimTest.Globals import do_main, platform_sup
+from XenKvmLib.classes import get_typed_class
def print_error(fieldname, ret_value, exp_value):
logger.error("%s Mismatch", fieldname)
logger.error("Returned %s instead of %s", ret_value, exp_value)
-@do_main(sup_types)
+
+@do_main(platform_sup)
def main():
options = main.options
+ log_param()
status = PASS
server = options.ip
- an = 'Xen_SettingsDefineCapabilities'
- cn = 'Xen_VirtualSystemMigrationCapabilities'
- qcn = 'Xen_VirtualSystemMigrationSettingData'
+ an = get_typed_class(options.virt, 'SettingsDefineCapabilities')
+ cn = get_typed_class(options.virt, 'VirtualSystemMigrationCapabilities')
+ qcn = get_typed_class(options.virt, 'VirtualSystemMigrationSettingData')
instid = 'MigrationCapabilities'
-
try:
assoc_info = assoc.Associators(server, \
an, \
cn, \
- InstanceID = instid)
+ InstanceID = instid, \
+ virt = options.virt)
if len(assoc_info) != 1:
logger.error("%s returned %i %s objects", an, len(assoc_info),
qcn)
return FAIL
@@ -70,7 +73,8 @@ def main():
print_error('Classname', verify_assoc.classname, qcn)
status = FAIL
if verify_assoc['InstanceID'] != 'MigrationSettingData':
- print_error('InstanceID', verify_assoc['InstanceID'],
'MigrationCapabilities')
+ print_error('InstanceID', verify_assoc['InstanceID'],
+ 'MigrationCapabilities')
status = FAIL
except Exception, detail:
logger.error(CIM_ERROR_ASSOCIATORS, an)