# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com>
# Date 1225804941 28800
# Node ID 914e2bbfeb62295a2a0afb976ed5b2a72e38daed
# Parent 8118a0e17d219b6886b34176423c45c855f08576
[TEST] Updating 01_enum_crs.py tc of RedirectionService to work with libvirt-cim provider
with no CRS support.
Updating 01_enum_crs.py tc of RedirectionService to skip the tc which if CRS provider is
not present
in the libvirt_cim provider when the libvirt_cim_revision < 688.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 8118a0e17d21 -r 914e2bbfeb62
suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py
--- a/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Sun Nov 02 19:16:33
2008 -0800
+++ b/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Tue Nov 04 05:22:21
2008 -0800
@@ -32,19 +32,28 @@
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.common_util import get_host_info
from XenKvmLib.const import get_provider_version
SHAREMODE = 3
REDIRECTION_SER_TYPE = 3
CRS_MAX_SAP_REV = 724
+libvirtcim_hr_crs_changes = 688
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@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
+ # CRS changes in it and the CRS provider is available with revision >= 688.
+ curr_cim_rev, changeset = get_provider_version(virt, server)
+ if curr_cim_rev < libvirtcim_hr_crs_changes:
+ logger.info("ConsoleRedirectionService provider not supported, "
+ "hence skipping the tc ....")
+ return SKIP
status, host_name, host_cn = get_host_info(server, virt)
if status != PASS:
Show replies by date