# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1218520874 25200
# Node ID a8604735c04b457abd35327996fae64eb0d5babe
# Parent 98f69895a4dcc3d314d41611cf67f51329e15a44
[TEST] Fix ResourcePoolConfigurationService.03,04,06&07 to work for both Pegasus and
sfcb
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 98f69895a4dc -r a8604735c04b
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py Fri
Aug 08 11:01:29 2008 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py Mon
Aug 11 23:01:14 2008 -0700
@@ -40,6 +40,7 @@
import sys
import pywbem
+from VirtLib import utils
from XenKvmLib import rpcs_service
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
@@ -47,7 +48,6 @@
from XenKvmLib.classes import get_typed_class
cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED
-cim_desc = "CIM_ERR_NOT_SUPPORTED"
cim_mname = "CreateResourcePool"
@@ -56,6 +56,14 @@
options = main.options
rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \
"ResourcePoolConfigurationService"))(options.ip)
+
+ cmd = "lsof -P -i:5988 | grep sfcbd"
+ rc, out = utils.run_remote(options.ip, cmd)
+ if rc == 0:
+ cim_desc = "The requested operation is not supported"
+ else:
+ cim_desc = "CIM_ERR_NOT_SUPPORTED"
+
try:
rpcs_conn.CreateResourcePool()
except pywbem.CIMError, (err_no, desc):
diff -r 98f69895a4dc -r a8604735c04b
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Fri
Aug 08 11:01:29 2008 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Mon
Aug 11 23:01:14 2008 -0700
@@ -50,13 +50,13 @@
import sys
import pywbem
from XenKvmLib import rpcs_service
+from VirtLib import utils
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
from CimTest.Globals import do_main, platform_sup
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)
@@ -64,6 +64,13 @@
options = main.options
rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \
"ResourcePoolConfigurationService"))(options.ip)
+ cmd = "lsof -P -i:5988 | grep sfcbd"
+ rc, out = utils.run_remote(options.ip, cmd)
+ if rc == 0:
+ cim_desc = "The requested operation is not supported"
+ else:
+ cim_desc = "CIM_ERR_NOT_SUPPORTED"
+
try:
rpcs_conn.CreateChildResourcePool()
except pywbem.CIMError, (err_no, desc):
diff -r 98f69895a4dc -r a8604735c04b
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Fri
Aug 08 11:01:29 2008 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Mon
Aug 11 23:01:14 2008 -0700
@@ -46,7 +46,8 @@
import sys
-import pywbem
+import pywbem
+from VirtLib import utils
from XenKvmLib import rpcs_service
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
@@ -54,7 +55,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)
@@ -62,6 +62,14 @@
options = main.options
rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \
"ResourcePoolConfigurationService"))(options.ip)
+
+ cmd = "lsof -P -i:5988 | grep sfcbd"
+ rc, out = utils.run_remote(options.ip, cmd)
+ if rc == 0:
+ cim_desc = "The requested operation is not supported"
+ else:
+ cim_desc = "CIM_ERR_NOT_SUPPORTED"
+
try:
rpcs_conn.RemoveResourcesFromResourcePool()
except pywbem.CIMError, (err_no, desc):
diff -r 98f69895a4dc -r a8604735c04b
suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py
---
a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Fri
Aug 08 11:01:29 2008 -0700
+++
b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Mon
Aug 11 23:01:14 2008 -0700
@@ -43,6 +43,7 @@
import sys
import pywbem
+from VirtLib import utils
from XenKvmLib import rpcs_service
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
@@ -50,7 +51,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)
@@ -58,6 +58,13 @@
options = main.options
rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \
"ResourcePoolConfigurationService"))(options.ip)
+ cmd = "lsof -P -i:5988 | grep sfcbd"
+ rc, out = utils.run_remote(options.ip, cmd)
+ if rc == 0:
+ cim_desc = "The requested operation is not supported"
+ else:
+ cim_desc = "CIM_ERR_NOT_SUPPORTED"
+
try:
rpcs_conn.DeleteResourcePool()
except pywbem.CIMError, (err_no, desc):