[PATCH] Add "disk" type storage pools
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1242062614 25200
# Node ID e08c78615c3ec653c2979b4619b15d48a1c56d48
# Parent 3d42e1423d027c04c104ff0be6d99b86c46d1257
Add "disk" type storage pools.
This storage pool type is a disk backed pool, instead of being a file or
directory backed pool.
This is tricky to test - you'll need a free disk / partition that you can
mount. I've tested this using a spare LVM partition.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 3d42e1423d02 -r e08c78615c3e src/Virt_ResourcePoolConfigurationService.c
--- a/src/Virt_ResourcePoolConfigurationService.c Mon Apr 27 17:05:48 2009 -0700
+++ b/src/Virt_ResourcePoolConfigurationService.c Mon May 11 10:23:34 2009 -0700
@@ -148,8 +148,8 @@
pool->pool_info.disk.src_dir = NULL;
}
-static const char *disk_fs_pool(CMPIInstance *inst,
- struct virt_pool *pool)
+static const char *disk_fs_or_disk_pool(CMPIInstance *inst,
+ struct virt_pool *pool)
{
const char *val = NULL;
@@ -195,19 +195,19 @@
case DISK_POOL_DIR:
break;
case DISK_POOL_FS:
- msg = disk_fs_pool(inst, pool);
- if (msg != NULL)
- goto out;
+ case DISK_POOL_DISK:
+ msg = disk_fs_or_disk_pool(inst, pool);
break;
case DISK_POOL_NETFS:
msg = disk_netfs_pool(inst, pool);
- if (msg != NULL)
- goto out;
break;
default:
return "Storage pool type not supported";
}
+ if (msg != NULL)
+ goto out;
+
pool->pool_info.disk.pool_type = type;
if (cu_get_str_prop(inst, "Path", &val) != CMPI_RC_OK)
15 years, 7 months
[PATCH] This fix the generation of the <boot> tag on fully-virtualizable Xen guests
by Richard Maciel
# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1242071235 10800
# Node ID c0bd6c9a2c0084398784bb1ae36649bd3400e36c
# Parent 5608b9455cd32fccbc324cd540c509d7230a113f
This fix the generation of the <boot> tag on fully-virtualizable Xen guests.
Right now it is generated with the boot device as a the value of the node (e.g. <boot>hd</boot>)
However, the boot device must be a property of the node (e.g. <boot dev='hd'/>)
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 5608b9455cd3 -r c0bd6c9a2c00 libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Mon Apr 27 17:05:48 2009 -0700
+++ b/libxkutil/xmlgen.c Mon May 11 16:47:15 2009 -0300
@@ -457,10 +457,12 @@
if (tmp == NULL)
return XML_ERROR;
- tmp = xmlNewChild(root, NULL, BAD_CAST "boot", BAD_CAST os->boot);
+ tmp = xmlNewChild(root, NULL, BAD_CAST "boot", NULL);
if (tmp == NULL)
return XML_ERROR;
+ xmlNewProp(tmp, BAD_CAST "dev", BAD_CAST os->boot);
+
tmp = xmlNewChild(root, NULL, BAD_CAST "features", NULL);
xmlNewChild(tmp, NULL, BAD_CAST "pae", NULL);
xmlNewChild(tmp, NULL, BAD_CAST "acpi", NULL);
15 years, 7 months
[PATCH] [TEST]Update RPCS/07 with the latest updates of pool verification
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1242291170 25200
# Node ID f899232889810985dadbaabeed1198bad05edde2
# Parent 9391439d65e7ec6b88f34923d97f969c6114a237
[TEST]Update RPCS/07 with the latest updates of pool verification
Tested for KVM with current sources
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r 9391439d65e7 -r f89923288981 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Wed May 13 07:28:33 2009 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Thu May 14 01:52:50 2009 -0700
@@ -33,10 +33,12 @@
# OUT -- Job -- CIM_ConcreteJob REF -- Returned job if started
# OUT -- Error-- String -- Encoded error instance if the operation
# failed and did not return a job.
-# REVISIT :
-# --------
-# As of now the DeleteResourcePool() simply throws an Exception.
-# We must improve this tc once the service is implemented.
+#
+# Exception details before Revision 841
+# -----
+# Error code: CIM_ERR_NOT_SUPPORTED
+#
+# After revision 841, the service is implemented
#
# -Date: 20.02.2008
@@ -46,32 +48,79 @@
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.enumclass import EnumInstances, EnumNames
from XenKvmLib.classes import get_typed_class
+from XenKvmLib.common_util import destroy_netpool
+from XenKvmLib.pool import create_netpool, verify_pool
cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED
cim_mname = "DeleteResourcePool"
+libvirt_cim_child_pool_rev = 841
+test_pool = "nat_pool"
@do_main(platform_sup)
def main():
+ status = FAIL
options = main.options
rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \
"ResourcePoolConfigurationService"))(options.ip)
- try:
- rpcs_conn.DeleteResourcePool()
- except pywbem.CIMError, (err_no, desc):
- 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)
- return PASS
- else:
- logger.error("Unexpected rc code %s and description %s\n",
- err_no, desc)
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
+ if curr_cim_rev < libvirt_cim_child_pool_rev:
+ try:
+ rpcs_conn.DeleteResourcePool()
+ except pywbem.CIMError, (err_no, desc):
+ 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)
+ return PASS
+ else:
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
+ return FAIL
+ elif curr_cim_rev >= libvirt_cim_child_pool_rev:
+ pool_attr = {
+ "Address" : "192.168.0.8",
+ "Netmask" : "255.255.255.0",
+ "IPRangeStart" : "192.168.0.9",
+ "IPRangeEnd" : "192.168.0.15",
+ "ForwardMode" : "nat"
+ }
+ np = get_typed_class(options.virt, 'NetworkPool')
+ np_id = "NetworkPool/%s" % test_pool
+
+ status = create_netpool(options.ip, options.virt, test_pool, pool_attr)
+ if status != PASS:
+ logger.error("Error in networkpool creation")
return FAIL
-
- logger.error("The execution should not have reached here!!")
- return FAIL
+
+ status = verify_pool(options.ip, options.virt, np,
+ test_pool, pool_attr)
+ if status != PASS:
+ logger.error("Error in networkpool verification")
+ destroy_netpool(options.ip, options.virt, test_pool)
+ return FAIL
+
+ netpool = EnumNames(options.ip, np)
+ for i in range(0, len(netpool)):
+ ret_pool = netpool[i].keybindings['InstanceID']
+ if ret_pool == np_id:
+ pool_settings = netpool[i]
+ break
+ try:
+ rpcs_conn.DeleteResourcePool(Pool = pool_settings)
+ netpool = EnumInstances(options.ip, np)
+ for i in range(0, len(netpool)):
+ ret_pool = netpool[i].InstanceID
+ if ret_pool == np_id:
+ raise Exception("Failed to delete %s" % test_pool)
+ status = PASS
+ except Exception, details:
+ logger.error(details)
+ return FAIL
+
+ return status
+
if __name__ == "__main__":
sys.exit(main())
-
15 years, 7 months
[PATCH] [TEST]Update RPCS/04 with the latest updates of pool verification
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1242287412 25200
# Node ID e1ca990097ed08771ba19aa8d6ac21af16c10a65
# Parent 9391439d65e7ec6b88f34923d97f969c6114a237
[TEST]Update RPCS/04 with the latest updates of pool verification
Tested for KVM with current sources
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r 9391439d65e7 -r e1ca990097ed suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Wed May 13 07:28:33 2009 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Thu May 14 00:50:12 2009 -0700
@@ -39,45 +39,59 @@
# OUT -- Error -- String -- Encoded error instance if the operation
# failed and did not return a job
#
-# REVISIT :
-# --------
-# As of now the CreateChildResourcePool() simply throws an Exception.
-# We must improve this tc once the service is implemented.
-#
-# -Date: 20.02.2008
-
+# Exception details before Revision 837
+# -----
+# Error code: CIM_ERR_NOT_SUPPORTED
+#
+# After revision 837, the service is implemented
+#
+# -Date: 20.02.2008
import sys
-import pywbem
-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.classes import get_typed_class
+from XenKvmLib.common_util import destroy_netpool
+from XenKvmLib.pool import create_netpool, verify_pool
-cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED
-cim_mname = "CreateChildResourcePool"
+test_pool = "testpool"
+test_mode = ["nat"]
@do_main(platform_sup)
def main():
+ status = PASS
options = main.options
- rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \
- "ResourcePoolConfigurationService"))(options.ip)
- try:
- rpcs_conn.CreateChildResourcePool()
- except pywbem.CIMError, (err_no, desc):
- 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)
- return PASS
- else:
- logger.error("Unexpected rc code %s and description %s\n",
- err_no, desc)
+
+ np = get_typed_class(options.virt, 'NetworkPool')
+ np_id = "NetworkPool/%s" % test_pool
+ pool_attr = {
+ "Address" : "192.168.0.8",
+ "Netmask" : "255.255.255.0",
+ "IPRangeStart" : "192.168.0.9",
+ "IPRangeEnd" : "192.168.0.15"
+ }
+ for i in range(0, len(test_mode)):
+ pool_attr["ForwardMode"] = test_mode[i]
+ status = create_netpool(options.ip, options.virt,
+ test_pool, pool_attr)
+ if status != PASS:
+ logger.error("Error in networkpool creation")
return FAIL
-
- logger.error("The execution should not have reached here!!")
- return FAIL
+
+ status = verify_pool(options.ip, options.virt, np,
+ test_pool, pool_attr)
+ if status != PASS:
+ logger.error("Error in networkpool verification")
+ destroy_netpool(options.ip, options.virt, test_pool)
+ return FAIL
+
+ status = destroy_netpool(options.ip, options.virt, test_pool)
+ if status != PASS:
+ logger.error("Unable to destroy networkpool %s", test_pool)
+ return FAIL
+
+ return status
+
if __name__ == "__main__":
sys.exit(main())
-
15 years, 7 months
[PATCH] [TEST] Add new SAE/02_reverse.py tc
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1242224913 25200
# Node ID 9391439d65e7ec6b88f34923d97f969c6114a237
# Parent 2d9e512a8116eb52eba4267617bb5b6eac1fc224
[TEST] Add new SAE/02_reverse.py tc
Tested on F10 with KVM and latest sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 2d9e512a8116 -r 9391439d65e7 suites/libvirt-cim/cimtest/ServiceAffectsElement/02_reverse.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/ServiceAffectsElement/02_reverse.py Wed May 13 07:28:33 2009 -0700
@@ -0,0 +1,168 @@
+#!/usr/bin/python
+#
+# Copyright 2009 IBM Corp.
+#
+# Authors:
+# Deepti B. Kalakeri <dkalaker(a)in.ibm.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# This test case is used to verify the SAE association with the ComputerSystem,
+# Poiniting Device, DisplayController providers.
+# The SAE association when queried with the ComputerSystem/PoinitingDevice/
+# DisplayController should give the details of the CRS information
+# to which they are part of.
+#
+# Ex: Command and some of the fields that are verified are given below.
+# Command:
+
+# wbemcli ain -ac KVM_ServiceAffectsElement 'http://root:passwd
+# @localhost/root/virt:KVM_ComputerSystem.CreationClassName=\
+# "KVM_ComputerSystem",Name="demo3"'
+#
+# Output:
+# -------
+# host/root/virt:KVM_ConsoleRedirectionService.CreationClassName=\
+# "KVM_ConsoleRedirectionService",Name="ConsoleRedirectionService",\
+# SystemCreationClassName="KVM_HostSystem",SystemName="host"
+#
+# Similarly the above o/p is expected when SAE is queired with
+# PoinitingDevice and DisplayController
+# Date : 12-05-2009
+
+
+import sys
+from sets import Set
+from XenKvmLib.assoc import Associators, compare_all_prop
+from XenKvmLib import vxml
+from CimTest.Globals import logger
+from XenKvmLib.classes import get_typed_class
+from XenKvmLib.enumclass import EnumInstances, EnumNames
+from XenKvmLib.common_util import parse_instance_id
+from XenKvmLib.const import do_main, get_provider_version
+from CimTest.ReturnCodes import FAIL, PASS
+from pywbem.cim_obj import CIMInstance
+
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
+pd_dev_rev = 746
+dc_dev_rev = 725
+
+test_dom = "SAE_dom"
+
+def get_dom_records(cn, ei_info):
+ ei_insts = {}
+ for ei_item in ei_info:
+ rec = None
+ CCN = ei_item['CreationClassName']
+ if 'DisplayController' in CCN or 'PointingDevice' in CCN :
+ guest, dev, status = parse_instance_id(ei_item['DeviceID'])
+ if status != PASS:
+ logger.error("Unable to parse DeviceID")
+ return ei_insts, status
+
+ if guest == test_dom:
+ rec = ei_item
+ elif 'ComputerSystem' in CCN:
+ if ei_item['Name'] == test_dom:
+ rec = ei_item
+ else:
+ logger.error("Unexpected CreationClassName %s returned by " \
+ "%s association", CCN, cn)
+ return ei_insts, FAIL
+
+ if not CCN in ei_insts.keys() and rec != None:
+ ei_insts[CCN]=rec
+ elif rec != None and (CCN in ei_insts.keys()):
+ logger.error("Got more than one record for '%s'", CCN)
+ return ei_insts, FAIL
+
+ return ei_insts, PASS
+
+
+def init_list_for_assoc(server, virt):
+ c_list = [ 'ComputerSystem']
+ curr_cim_rev, changeset = get_provider_version(virt, server)
+ if curr_cim_rev >= pd_dev_rev:
+ c_list.append('PointingDevice' )
+ if curr_cim_rev >= dc_dev_rev:
+ c_list.append('DisplayController')
+
+ key_dict = {}
+ for name in c_list:
+ init_list = {}
+ c_name = get_typed_class(virt, name)
+ ei_details = EnumNames(server, c_name)
+ init_list, status = get_dom_records(c_name, ei_details)
+ if status != PASS:
+ return init_list, FAIL
+ key_dict[c_name] = dict(init_list[c_name].keybindings)
+
+ return key_dict, PASS
+
+
+@do_main(sup_types)
+def main():
+ options = main.options
+ server = options.ip
+ virt = options.virt
+ status = FAIL
+
+ virt_xml = vxml.get_class(virt)
+ cxml = virt_xml(test_dom)
+ ret = cxml.cim_define(server)
+ if not ret:
+ logger.error("Failed to define the dom: %s", test_dom)
+ return FAIL
+
+ an = get_typed_class(virt, "ServiceAffectsElement")
+
+ try:
+ in_list, status = init_list_for_assoc(server, virt)
+ if status != PASS:
+ raise Exception("Failed to get init_list")
+
+ c_name = get_typed_class(virt, 'ConsoleredirectionService')
+ crs = EnumInstances(server, c_name)
+ if len(crs) != 1:
+ raise Exception("'%s' returned %i records, expected 1" \
+ % (c_name, len(crs)))
+
+ for cn, value in in_list.iteritems():
+ logger.info("Verifying '%s' association with '%s'", an, cn)
+ if 'ComputerSystem' in cn:
+ assoc_info = Associators(server, an, cn,
+ CreationClassName=cn,
+ Name=value['Name'])
+ else:
+ assoc_info = Associators(server, an, cn,
+ CreationClassName=cn,
+ SystemName=value['SystemName'],
+ DeviceID=value['DeviceID'],
+ SystemCreationClassName=\
+ value['SystemCreationClassName'])
+ if len(assoc_info) != 1:
+ raise Exception("Got '%s' records for '%s' association with " \
+ "'%s',expected 1" %(len(assoc_info), an, cn))
+ status = compare_all_prop(assoc_info[0], crs[0])
+
+ except Exception, detail :
+ logger.error("Exception : %s", detail)
+ status = FAIL
+
+ cxml.undefine(server)
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
15 years, 7 months
[PATCH] [TEST] Add new SAE/02_reverse.py tc
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1242224913 25200
# Node ID 9391439d65e7ec6b88f34923d97f969c6114a237
# Parent 2d9e512a8116eb52eba4267617bb5b6eac1fc224
[TEST] Add new SAE/02_reverse.py tc
Tested on F10 with KVM and latest sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 2d9e512a8116 -r 9391439d65e7 suites/libvirt-cim/cimtest/ServiceAffectsElement/02_reverse.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/ServiceAffectsElement/02_reverse.py Wed May 13 07:28:33 2009 -0700
@@ -0,0 +1,168 @@
+#!/usr/bin/python
+#
+# Copyright 2009 IBM Corp.
+#
+# Authors:
+# Deepti B. Kalakeri <dkalaker(a)in.ibm.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# This test case is used to verify the SAE association with the ComputerSystem,
+# Poiniting Device, DisplayController providers.
+# The SAE association when queried with the ComputerSystem/PoinitingDevice/
+# DisplayController should give the details of the CRS information
+# to which they are part of.
+#
+# Ex: Command and some of the fields that are verified are given below.
+# Command:
+
+# wbemcli ain -ac KVM_ServiceAffectsElement 'http://root:passwd
+# @localhost/root/virt:KVM_ComputerSystem.CreationClassName=\
+# "KVM_ComputerSystem",Name="demo3"'
+#
+# Output:
+# -------
+# host/root/virt:KVM_ConsoleRedirectionService.CreationClassName=\
+# "KVM_ConsoleRedirectionService",Name="ConsoleRedirectionService",\
+# SystemCreationClassName="KVM_HostSystem",SystemName="host"
+#
+# Similarly the above o/p is expected when SAE is queired with
+# PoinitingDevice and DisplayController
+# Date : 12-05-2009
+
+
+import sys
+from sets import Set
+from XenKvmLib.assoc import Associators, compare_all_prop
+from XenKvmLib import vxml
+from CimTest.Globals import logger
+from XenKvmLib.classes import get_typed_class
+from XenKvmLib.enumclass import EnumInstances, EnumNames
+from XenKvmLib.common_util import parse_instance_id
+from XenKvmLib.const import do_main, get_provider_version
+from CimTest.ReturnCodes import FAIL, PASS
+from pywbem.cim_obj import CIMInstance
+
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
+pd_dev_rev = 746
+dc_dev_rev = 725
+
+test_dom = "SAE_dom"
+
+def get_dom_records(cn, ei_info):
+ ei_insts = {}
+ for ei_item in ei_info:
+ rec = None
+ CCN = ei_item['CreationClassName']
+ if 'DisplayController' in CCN or 'PointingDevice' in CCN :
+ guest, dev, status = parse_instance_id(ei_item['DeviceID'])
+ if status != PASS:
+ logger.error("Unable to parse DeviceID")
+ return ei_insts, status
+
+ if guest == test_dom:
+ rec = ei_item
+ elif 'ComputerSystem' in CCN:
+ if ei_item['Name'] == test_dom:
+ rec = ei_item
+ else:
+ logger.error("Unexpected CreationClassName %s returned by " \
+ "%s association", CCN, cn)
+ return ei_insts, FAIL
+
+ if not CCN in ei_insts.keys() and rec != None:
+ ei_insts[CCN]=rec
+ elif rec != None and (CCN in ei_insts.keys()):
+ logger.error("Got more than one record for '%s'", CCN)
+ return ei_insts, FAIL
+
+ return ei_insts, PASS
+
+
+def init_list_for_assoc(server, virt):
+ c_list = [ 'ComputerSystem']
+ curr_cim_rev, changeset = get_provider_version(virt, server)
+ if curr_cim_rev >= pd_dev_rev:
+ c_list.append('PointingDevice' )
+ if curr_cim_rev >= dc_dev_rev:
+ c_list.append('DisplayController')
+
+ key_dict = {}
+ for name in c_list:
+ init_list = {}
+ c_name = get_typed_class(virt, name)
+ ei_details = EnumNames(server, c_name)
+ init_list, status = get_dom_records(c_name, ei_details)
+ if status != PASS:
+ return init_list, FAIL
+ key_dict[c_name] = dict(init_list[c_name].keybindings)
+
+ return key_dict, PASS
+
+
+@do_main(sup_types)
+def main():
+ options = main.options
+ server = options.ip
+ virt = options.virt
+ status = FAIL
+
+ virt_xml = vxml.get_class(virt)
+ cxml = virt_xml(test_dom)
+ ret = cxml.cim_define(server)
+ if not ret:
+ logger.error("Failed to define the dom: %s", test_dom)
+ return FAIL
+
+ an = get_typed_class(virt, "ServiceAffectsElement")
+
+ try:
+ in_list, status = init_list_for_assoc(server, virt)
+ if status != PASS:
+ raise Exception("Failed to get init_list")
+
+ c_name = get_typed_class(virt, 'ConsoleredirectionService')
+ crs = EnumInstances(server, c_name)
+ if len(crs) != 1:
+ raise Exception("'%s' returned %i records, expected 1" \
+ % (c_name, len(crs)))
+
+ for cn, value in in_list.iteritems():
+ logger.info("Verifying '%s' association with '%s'", an, cn)
+ if 'ComputerSystem' in cn:
+ assoc_info = Associators(server, an, cn,
+ CreationClassName=cn,
+ Name=value['Name'])
+ else:
+ assoc_info = Associators(server, an, cn,
+ CreationClassName=cn,
+ SystemName=value['SystemName'],
+ DeviceID=value['DeviceID'],
+ SystemCreationClassName=\
+ value['SystemCreationClassName'])
+ if len(assoc_info) != 1:
+ raise Exception("Got '%s' records for '%s' association with " \
+ "'%s',expected 1" %(len(assoc_info), an, cn))
+ status = compare_all_prop(assoc_info[0], crs[0])
+
+ except Exception, detail :
+ logger.error("Exception : %s", detail)
+ status = FAIL
+
+ cxml.undefine(server)
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
15 years, 7 months
Test Run Summary (May 13 2009): KVM on Fedora release 10 (Cambridge) with sfcb
by Guo Lian Yun
=================================================
Test Run Summary (May 13 2009): KVM on Fedora release 10 (Cambridge) with
sfcb
=================================================
Distro: Fedora release 10 (Cambridge)
Kernel: 2.6.27.15-170.2.24.fc10.x86_64
libvirt: 0.4.5
Hypervisor: QEMU 0.9.1
CIMOM: sfcb sfcbd 1.3.4preview
Libvirt-cim revision: 871
Libvirt-cim changeset: 3d42e1423d02
Cimtest revision: 678
Cimtest changeset: 2d9e512a8116
=================================================
FAIL : 5
XFAIL : 4
SKIP : 9
PASS : 134
-----------------
Total : 152
=================================================
FAIL Test Summary:
ComputerSystemIndication - 01_created_indication.py: FAIL
HostSystem - 03_hs_to_settdefcap.py: FAIL
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL
SettingsDefineCapabilities - 01_forward.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL
VirtualSystemManagementService - 16_removeresource.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP
VirtualSystemMigrationService - 07_remote_offline_migration.py: SKIP
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py:
SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Got CIM error Unable to reboot domain: this function is
not supported by the hypervisor: virDomainReboot with return code 1
ERROR - Exception: Unable reboot dom 'cs_test_domain'
InvokeMethod(RequestStateChange): Unable to reboot domain: this function
is not supported by the hypervisor: virDomainReboot
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Got CIM error State not supported with return code 7
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: FAIL
ERROR - Exception : Request Failed: 200
Traceback (most recent call last):
File "./lib/XenKvmLib/const.py", line 139, in do_try
File "01_created_indication.py", line 146, in main
sub_list, ind_names, dict = sub_ind(ip, virt)
File "01_created_indication.py", line 60, in sub_ind
sub.subscribe(dict['default_url'], dict['default_auth'])
File
"/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py",
line 345, in subscribe
"CreateInstance", auth_hdr)
File
"/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py",
line 330, in __do_cimpost
(resp.status, resp.reason))
Exception: Request Failed: 200
ERROR - None
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: PASS
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: PASS
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: FAIL
ERROR - 'KVM_SettingsDefineCapabilities' returned 8 RASD
objects instead of 4
Class not found
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedAccessPoint - 01_forward.py: PASS
--------------------------------------------------------------------
HostedAccessPoint - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: PASS
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: PASS
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: PASS
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: PASS
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: PASS
--------------------------------------------------------------------
Processor - 01_processor.py: PASS
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: PASS
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: PASS
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.py: PASS
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL
ERROR - Unexpected rc code 4 and description One or more
parameter values passed to the method were invalid
InvokeMethod(CreateChildResourcePool): One or more parameter values passed
to the method were invalid
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py:
PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL
ERROR - Unexpected rc code 4 and description One or more
parameter values passed to the method were invalid
InvokeMethod(DeleteResourcePool): One or more parameter values passed to
the method were invalid
--------------------------------------------------------------------
ServiceAccessBySAP - 01_forward.py: PASS
--------------------------------------------------------------------
ServiceAccessBySAP - 02_reverse.py: PASS
--------------------------------------------------------------------
ServiceAffectsElement - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: FAIL
ERROR - KVM_SettingsDefineCapabilities returned 8 ResourcePool
objects instead of 4
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 16_removeresource.py: XFAIL
ERROR - 0 RASD insts for domain/mouse:ps2
No such instance (no device domain/mouse:ps2)
Bug:<00014>
--------------------------------------------------------------------
VirtualSystemManagementService - 17_removeresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 07_remote_offline_migration.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py:
SKIP
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py:
PASS
--------------------------------------------------------------------
15 years, 7 months