# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1218593453 25200
# Node ID f476a9817c6f5c6140567f3d144c412e7afe494a
# Parent d1c7391bcfe9f1ab85effa7e8fa5c21063c8e1f7
[TEST] #2 Just check the error number, fix
ResourcePoolConfigurationService.03,04,06&07 to work for both Pegasus and sfcb
The Pegasus and sfcb return the same error code in this case, but different in error
description.
For this specific, we just to check the error number
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r d1c7391bcfe9 -r f476a9817c6f
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py Tue
Aug 12 04:11:28 2008 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py Tue
Aug 12 19:10:53 2008 -0700
@@ -47,7 +47,6 @@
from XenKvmLib.classes import get_typed_class
cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED
-cim_desc = "CIM_ERR_NOT_SUPPORTED"
cim_mname = "CreateResourcePool"
@@ -59,7 +58,7 @@
try:
rpcs_conn.CreateResourcePool()
except pywbem.CIMError, (err_no, desc):
- if err_no == cim_errno and desc.find(cim_desc) >= 0 :
+ if err_no == cim_errno :
logger.info("Got expected exception for '%s' service",
cim_mname)
logger.info("Errno is '%s' ", err_no)
logger.info("Error string is '%s'", desc)
diff -r d1c7391bcfe9 -r f476a9817c6f
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue
Aug 12 04:11:28 2008 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue
Aug 12 19:10:53 2008 -0700
@@ -56,7 +56,6 @@
from XenKvmLib.classes import get_typed_class
cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED
-cim_desc = "CIM_ERR_NOT_SUPPORTED"
cim_mname = "CreateChildResourcePool"
@do_main(platform_sup)
@@ -67,7 +66,7 @@
try:
rpcs_conn.CreateChildResourcePool()
except pywbem.CIMError, (err_no, desc):
- if err_no == cim_errno and desc.find(cim_desc) >= 0 :
+ if err_no == cim_errno :
logger.info("Got expected exception for '%s' service",
cim_mname)
logger.info("Errno is '%s' ", err_no)
logger.info("Error string is '%s'", desc)
diff -r d1c7391bcfe9 -r f476a9817c6f
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Tue
Aug 12 04:11:28 2008 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Tue
Aug 12 19:10:53 2008 -0700
@@ -54,7 +54,6 @@
from XenKvmLib.classes import get_typed_class
cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED
-cim_desc = "CIM_ERR_NOT_SUPPORTED"
cim_mname = "RemoveResourcesFromResourcePool"
@do_main(platform_sup)
@@ -65,7 +64,7 @@
try:
rpcs_conn.RemoveResourcesFromResourcePool()
except pywbem.CIMError, (err_no, desc):
- if err_no == cim_errno and desc.find(cim_desc) >= 0 :
+ if err_no == cim_errno :
logger.info("Got expected exception for '%s' service",
cim_mname)
logger.info("Errno is '%s' ", err_no)
logger.info("Error string is '%s'", desc)
diff -r d1c7391bcfe9 -r f476a9817c6f
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Tue
Aug 12 04:11:28 2008 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Tue
Aug 12 19:10:53 2008 -0700
@@ -50,7 +50,6 @@
from XenKvmLib.classes import get_typed_class
cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED
-cim_desc = "CIM_ERR_NOT_SUPPORTED"
cim_mname = "DeleteResourcePool"
@do_main(platform_sup)
@@ -61,7 +60,7 @@
try:
rpcs_conn.DeleteResourcePool()
except pywbem.CIMError, (err_no, desc):
- if err_no == cim_errno and desc.find(cim_desc) >= 0 :
+ if err_no == cim_errno :
logger.info("Got expected exception for '%s' service",
cim_mname)
logger.info("Errno is '%s' ", err_no)
logger.info("Error string is '%s'", desc)
Show replies by date