# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1238482424 25200
# Node ID 9722c5133bdb3f6402244e64e3daf8d2e046dd6f
# Parent 9e3054481df49d4045498d50188a62acddffab15
[TEST] Add branch of err code to RPCS/04
Tested for KVM, Xen with current sources and rpm
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r 9e3054481df4 -r 9722c5133bdb
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue
Mar 24 19:15:48 2009 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Mon
Mar 30 23:53:44 2009 -0700
@@ -52,17 +52,22 @@
from XenKvmLib import rpcs_service
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.const import do_main, platform_sup
+from XenKvmLib.const import do_main, platform_sup, get_provider_version
from XenKvmLib.classes import get_typed_class
-cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED
cim_mname = "CreateChildResourcePool"
+libvirt_cim_child_pool_rev = 837
@do_main(platform_sup)
def main():
options = main.options
rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \
"ResourcePoolConfigurationService"))(options.ip)
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
+ if curr_cim_rev >= libvirt_cim_child_pool_rev:
+ cim_errno = 4
+ else:
+ cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED
try:
rpcs_conn.CreateChildResourcePool()
except pywbem.CIMError, (err_no, desc):