# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com>
# Date 1225798839 28800
# Node ID 257b23f359d1bc274222fa25d0f74b222775fae4
# Parent cd24946b4a7f060f0af9299787dbad3e387d81d6
[TEST] Updating 01_forward.py tc of HostedService.
Updating 01_forward.py tc of HostedService to include CRS provider information
when the libvirt_cim_revision >= 695.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r cd24946b4a7f -r 257b23f359d1
suites/libvirt-cim/cimtest/HostedService/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Tue Nov 04 01:04:17 2008
-0800
+++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Tue Nov 04 03:40:39 2008
-0800
@@ -32,9 +32,11 @@
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
from XenKvmLib.common_util import get_host_info
+from XenKvmLib.const import get_provider_version
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
bug_sblim = '00007'
+libvirtcim_hr_crs_changes = 695
@do_main(sup_types)
def main():
@@ -61,10 +63,17 @@
logger.error("No association return")
return FAIL
- val_serv = Set([get_typed_class(virt, "ResourcePoolConfigurationService"),
- get_typed_class(virt, "VirtualSystemManagementService"),
- get_typed_class(virt, "VirtualSystemMigrationService"),
- get_typed_class(virt, "ConsoleRedirectionService")])
+ val_serv = [get_typed_class(virt, "ResourcePoolConfigurationService"),
+ get_typed_class(virt, "VirtualSystemManagementService"),
+ get_typed_class(virt, "VirtualSystemMigrationService")]
+
+ # This check is required for libivirt-cim providers which do not have
+ # CRS changes in it and the CRS provider is available with revision >= 695.
+ cim_rev, changeset = get_provider_version(virt, server)
+ if cim_rev >= libvirtcim_hr_crs_changes:
+ val_serv.append(get_typed_class(virt, "ConsoleRedirectionService"))
+
+ val_serv = Set(val_serv)
ccn_list = []
for item in service: