# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1226091880 28800
# Node ID ceff8a7a75e001a24da909528ea8f333d6a7021c
# Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1
[TEST] Update EC 01_forward.py to work with ConsoleRedirectionServiceCapabilites
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 6591949e8afd -r ceff8a7a75e0
suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Nov 05 22:03:48
2008 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Nov 07 13:04:40
2008 -0800
@@ -32,10 +32,12 @@
from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC
from XenKvmLib.enumclass import EnumInstances
from XenKvmLib.common_util import get_host_info
+from XenKvmLib.const import get_provider_version
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
test_dom = "dom_elecap"
bug_sblim = "00007"
+libvirtcim_crsc_changes = 723
def append_to_list(server, virt, poolname, valid_elc_id):
poolname = get_typed_class(virt, poolname)
@@ -79,12 +81,17 @@
logger.error(CIM_ERROR_ASSOCIATORNAMES, an)
return FAIL
-
valid_elc_name = [get_typed_class(virt,
"VirtualSystemManagementCapabilities"),
get_typed_class(virt,
"VirtualSystemMigrationCapabilities")]
valid_elc_id = ["ManagementCapabilities",
"MigrationCapabilities"]
+
+ cim_rev, changeset = get_provider_version(virt, server)
+ if cim_rev >= libvirtcim_crsc_changes:
+ crsc = get_typed_class(virt, "ConsoleRedirectionServiceCapabilities")
+ valid_elc_name.append(crsc)
+ valid_elc_id.append("ConsoleRedirectionCapabilities")
valid_elc_name.append(get_typed_class(virt, "AllocationCapabilities"))
status, valid_elc_id = set_pool_info(server, virt, valid_elc_id)