# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com>
# Date 1225804761 28800
# Node ID 82afd0f6f9b91ef42c6fd1602d9929faecb94c9e
# Parent a63c661d0e709149d874d7632ac16f721aea60e6
[TEST] Updating 02_enum_crscap.py tc of RedirectionService to work with libvirt-cim
provider with no CRS CAP support.
Updating 02_enum_crscap.py tc of RedirectionService to skip the tc if CRS CAP provider is
not present
in the libvirt_cim provider when the libvirt_cim_revision < 691.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r a63c661d0e70 -r 82afd0f6f9b9
suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py
--- a/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py Tue Nov 04 04:48:25
2008 -0800
+++ b/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py Tue Nov 04 05:19:21
2008 -0800
@@ -31,15 +31,29 @@
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
from XenKvmLib.classes import get_typed_class
from XenKvmLib.const import do_main
-from CimTest.ReturnCodes import PASS, FAIL
+from CimTest.ReturnCodes import PASS, FAIL, SKIP
+from XenKvmLib.const import get_provider_version
SHAREMODESUPP = 3
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
+libvirtcim_crscap_changes = 691
+
@do_main(sup_types)
def main():
virt = main.options.virt
server = main.options.ip
+
+ # This check is required for libivirt-cim providers which do not have
+ # CRSCAP changes in it and the CRSCAP provider is available with
+ # revision >= 691.
+ curr_cim_rev, changeset = get_provider_version(virt, server)
+ if curr_cim_rev < libvirtcim_crscap_changes:
+ logger.info("ConsoleRedirectionServiceCapabilities provider not"
+ " supported, hence skipping the tc ....")
+ return SKIP
+
+
cname = 'ConsoleRedirectionServiceCapabilities'
cap_name = 'ConsoleRedirectionCapabilities'
classname = get_typed_class(virt, cname)