From yunguol at cn.ibm.com Wed Apr 1 05:30:13 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 31 Mar 2009 22:30:13 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add branch of err code to RPCS/04 Message-ID: # HG changeset patch # User Guolian Yun # Date 1238563807 25200 # Node ID e30fda741dc70e6fabefe18eb33eb383ebff7e7e # Parent bfd8818c151aec7e9fa8a675fe29e03e4e07824e [TEST] #2 Add branch of err code to RPCS/04 Updates from 1 to 2: Assign pywbem.CIM_ERR_INVALID_PARAMETER instead of numeric value to cim_errno Tested for KVM, Xen with current sources and rpm Signed-off-by: Guolian Yun diff -r bfd8818c151a -r e30fda741dc7 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Sun Mar 29 16:04:03 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Mar 31 22:30:07 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 = pywbem.CIM_ERR_INVALID_PARAMETER + else: + cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED try: rpcs_conn.CreateChildResourcePool() except pywbem.CIMError, (err_no, desc): From deeptik at linux.vnet.ibm.com Wed Apr 1 05:28:16 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 01 Apr 2009 10:58:16 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add branch of err code to RPCS/04 In-Reply-To: References: Message-ID: <49D2FB70.3040802@linux.vnet.ibm.com> +1 for me. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Wed Apr 1 22:46:55 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 01 Apr 2009 19:46:55 -0300 Subject: [Libvirt-cim] [PATCH 0 of 2] Add support for DeleteResourcePool() In-Reply-To: References: Message-ID: <49D3EEDF.5000603@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Apr 2 00:24:52 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 01 Apr 2009 17:24:52 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add branch of err code to RPCS/04 In-Reply-To: References: Message-ID: <49D405D4.8010200@linux.vnet.ibm.com> > 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 = pywbem.CIM_ERR_INVALID_PARAMETER > + else: > + cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED > try: > rpcs_conn.CreateChildResourcePool() > except pywbem.CIMError, (err_no, desc): Sorry Daisy, I didn't have a chance to look at the first revision. Agreed - you need to branch this test. However, this method is now supported. So, for libvirt-cim >= 837, this test should attempt to create network pool and verify that network pool is created. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Thu Apr 2 06:35:37 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Thu, 02 Apr 2009 03:35:37 -0300 Subject: [Libvirt-cim] [PATCH] This patch removes the error throwed when volume info cannot be extracted in the disk template generation Message-ID: <2f4943568299ef76e285.1238654137@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1238653874 10800 # Node ID 2f4943568299ef76e285e34412ec5ba5f2badbd7 # Parent 3dff43d9b55fdd8b684370a5e1de61640924d63e This patch removes the error throwed when volume info cannot be extracted in the disk template generation If volume information is not available, only a CU_DEBUG message should be generated. Signed-off-by: Richard Maciel diff -r 3dff43d9b55f -r 2f4943568299 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Tue Mar 31 14:25:53 2009 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Thu Apr 02 03:31:14 2009 -0300 @@ -846,10 +846,7 @@ ret = virStorageVolGetInfo(volume_ptr, &vol_info); if (ret == -1) { - virt_set_status(_BROKER, &s, - CMPI_RC_ERR_FAILED, - virStorageVolGetConnect(volume_ptr), - "Unable to get volume information"); + CU_DEBUG("Unable to get volume information"); goto out; } From yunguol at cn.ibm.com Thu Apr 2 06:44:18 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 2 Apr 2009 14:44:18 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add branch of err code to RPCS/04 In-Reply-To: <49D405D4.8010200@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-04-02 08:24:52: > > 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 = pywbem.CIM_ERR_INVALID_PARAMETER > > + else: > > + cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED > > try: > > rpcs_conn.CreateChildResourcePool() > > except pywbem.CIMError, (err_no, desc): > > Sorry Daisy, I didn't have a chance to look at the first revision. > > Agreed - you need to branch this test. However, this method is now > supported. So, for libvirt-cim >= 837, this test should attempt to > create network pool and verify that network pool is created. > I will work it out on the next patch =) > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Fri Apr 3 15:24:05 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Apr 2009 08:24:05 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding remote_copy_guest_image() to vsmigration.py Message-ID: <8923fbe5cb2a4321feff.1238772245@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1238772223 25200 # Node ID 8923fbe5cb2a4321feff81be63a6c458ebdae52d # Parent bfd8818c151aec7e9fa8a675fe29e03e4e07824e [TEST] Adding remote_copy_guest_image() to vsmigration.py. This is needed to make sure that we have the required image files on the destination for the remote migration tests to be successful. Tested for KVM and Xen with current sources. Signed-off-by: Deepti B. Kalakeri diff -r bfd8818c151a -r 8923fbe5cb2a suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Mar 29 16:04:03 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Fri Apr 03 08:23:43 2009 -0700 @@ -21,16 +21,19 @@ # # +import random from time import sleep +from VirtLib import utils from pywbem import WBEMConnection, CIMInstanceName from CimTest.CimExt import CIMMethodClass, CIMClassMOF from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib import enumclass +from XenKvmLib.enumclass import EnumInstances from XenKvmLib.classes import get_typed_class, virt_types from XenKvmLib.xm_virt_util import domain_list from XenKvmLib.const import get_provider_version from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ CIM_ERROR_ENUMERATE + # Migration constants CIM_MIGRATE_OFFLINE=1 CIM_MIGRATE_LIVE=2 @@ -129,6 +132,41 @@ return msd.mof() +def remote_copy_guest_image(virt, s_sysname, t_sysname, test_dom): + cn_name = get_typed_class(virt, 'DiskResourceAllocationSettingData') + req_image = backup_image = None + try: + d_rasds = EnumInstances(s_sysname, cn_name, ret_cim_inst=True) + for d_rasd in d_rasds: + if test_dom in d_rasd["InstanceID"]: + req_image = d_rasd["Address"] + break + + if req_image == None: + logger.error("Failed to get Disk RASD info for '%s'", test_dom) + return FAIL, req_image, backup_image + + # Check if the image file with the same name already exist on the machine. + # Back it up. Copy the required working image to the destination. + cmd = "/bin/ls -l %s" % req_image + rc, out = utils.run_remote(t_sysname, cmd) + if rc == 0: + backup_image = req_image + "." + str(random.randint(1, 100)) + cmd = 'mv %s %s' % (req_image, backup_image) + rc, out = utils.run_remote(t_sysname, cmd) + + s, o = utils.copy_remote(t_sysname, req_image, remote=req_image) + if s != 0: + logger.error("Failed to copy the image file '%s' for migration"\ + " to '%s'", req_image, t_sysname) + return FAIL, req_image, backup_image + except Exception, details: + logger.error("Exception in remote_copy_guest_image()") + logger.error("Exception details %s", details) + return FAIL, req_image, backup_image + + return PASS, req_image, backup_image + def check_possible_host_migration(service, cs_ref, ip, msd=None): res = None try: @@ -181,7 +219,7 @@ mig_job_cn = get_typed_class(virt, 'MigrationJob') try: - job = enumclass.EnumInstances(src_ip, mig_job_cn) + job = EnumInstances(src_ip, mig_job_cn) if len(job) < 1: logger.error("'%s' returned empty list", mig_job_cn) return FAIL, None @@ -285,6 +323,14 @@ logger.error("Guest to be migrated not specified.") return FAIL + if remote_migrate == 1: + status, req_image, backup_image = remote_copy_guest_image(virt, + s_sysname, + t_sysname, + guest_name) + if status != PASS: + return status + # Get the guest ref guest_ref = get_guest_ref(guest_name, virt) if guest_ref == None or guest_ref['Name'] != guest_name: @@ -320,4 +366,15 @@ status = check_migration_job(s_sysname, id, t_sysname, guest_name, remote_migrate, virt, timeout=time_out) + # Make sure we do not remove the images on the local machine + if remote_migrate == 1: + # Cleanup the images that is copied on the remote machine + cmd = "rm -rf %s" % req_image + rc, out = utils.run_remote(t_sysname, cmd) + + # Copy the backed up image if any on the remote machine + if backup_image != None: + cmd = 'mv %s %s' % (backup_image, req_image) + rc, out = utils.run_remote(t_sysname, cmd) + return status From kaitlin at linux.vnet.ibm.com Fri Apr 3 16:47:13 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Apr 2009 09:47:13 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] Add storage pool support to xmlgen In-Reply-To: References: Message-ID: <0d6b3f8aa95de7a57576.1238777233@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1238776731 25200 # Node ID 0d6b3f8aa95de7a57576e1d686ec23190903081e # Parent 9759b13c4f25d20f92bc2d50961e467c1b050acc Add storage pool support to xmlgen Signed-off-by: Kaitlin Rupert diff -r 9759b13c4f25 -r 0d6b3f8aa95d libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Fri Apr 03 08:51:16 2009 -0700 +++ b/libxkutil/xmlgen.c Fri Apr 03 09:38:51 2009 -0700 @@ -845,6 +845,67 @@ return XML_ERROR; } +static const char *disk_pool_type_to_str(uint16_t type) +{ + switch (type) { + case DISK_POOL_DIR: + return "dir"; + case DISK_POOL_FS: + return "fs"; + case DISK_POOL_NETFS: + return "netfs"; + case DISK_POOL_DISK: + return "disk"; + case DISK_POOL_ISCSI: + return "iscsi"; + case DISK_POOL_LOGICAL: + return "logical"; + default: + CU_DEBUG("Unsupported disk pool type"); + } + + return NULL; +} + +static const char *disk_pool_xml(xmlNodePtr root, + struct virt_pool *_pool) +{ + xmlNodePtr disk = NULL; + xmlNodePtr name = NULL; + xmlNodePtr target = NULL; + xmlNodePtr path = NULL; + const char *type = NULL; + struct disk_pool *pool = &_pool->pool_info.disk; + + type = disk_pool_type_to_str(pool->pool_type); + if (type == NULL) + goto out; + + disk = xmlNewChild(root, NULL, BAD_CAST "pool", NULL); + if (disk == NULL) + goto out; + + if (xmlNewProp(disk, BAD_CAST "type", BAD_CAST type) == NULL) + goto out; + + name = xmlNewChild(disk, NULL, BAD_CAST "name", BAD_CAST _pool->id); + if (name == NULL) + goto out; + + target = xmlNewChild(disk, NULL, BAD_CAST "target", NULL); + if (target == NULL) + goto out; + + path = xmlNewChild(target, NULL, BAD_CAST "path", BAD_CAST pool->path); + if (target == NULL) + goto out; + + return NULL; + + out: + return XML_ERROR; + } + char *pool_to_xml(struct virt_pool *pool) { char *xml = NULL; xmlNodePtr root = NULL; @@ -862,6 +923,9 @@ case CIM_RES_TYPE_NET: func = net_pool_xml; break; + case CIM_RES_TYPE_DISK: + func = disk_pool_xml; + break; default: CU_DEBUG("pool_to_xml: invalid type specified: %d", type); msg = "pool_to_xml: invalid type specified"; From kaitlin at linux.vnet.ibm.com Fri Apr 3 16:47:14 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Apr 2009 09:47:14 -0700 Subject: [Libvirt-cim] [PATCH 3 of 4] Add DiskPoolRASD MOF definitions In-Reply-To: References: Message-ID: <2bd3982a2285fbfb5287.1238777234@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1238776732 25200 # Node ID 2bd3982a2285fbfb5287861cfecb1a70e0fe4b43 # Parent 0d6b3f8aa95de7a57576e1d686ec23190903081e Add DiskPoolRASD MOF definitions Signed-off-by: Kaitlin Rupert diff -r 0d6b3f8aa95d -r 2bd3982a2285 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Fri Apr 03 09:38:51 2009 -0700 +++ b/schema/ResourceAllocationSettingData.mof Fri Apr 03 09:38:52 2009 -0700 @@ -163,7 +163,7 @@ string BusType; }; -[Description ("Xen virtual pool settings"), +[Description ("Xen virtual network pool settings"), Provider("cmpi::Virt_RASD") ] class Xen_NetPoolResourceAllocationSettingData : Xen_ResourceAllocationSettingData @@ -174,7 +174,7 @@ string ForwardMode; }; -[Description ("KVM virtual pool settings"), +[Description ("KVM virtual network pool settings"), Provider("cmpi::Virt_RASD") ] class KVM_NetPoolResourceAllocationSettingData : KVM_ResourceAllocationSettingData @@ -185,7 +185,7 @@ string ForwardMode; }; -[Description ("LXC virtual pool settings"), +[Description ("LXC virtual network pool settings"), Provider("cmpi::Virt_RASD") ] class LXC_NetPoolResourceAllocationSettingData : LXC_ResourceAllocationSettingData @@ -195,3 +195,43 @@ string IPRangeEnd; string ForwardMode; }; + +[Description ("Xen virtual disk pool settings"), + Provider("cmpi::Virt_RASD") +] +class Xen_DiskPoolResourceAllocationSettingData : Xen_ResourceAllocationSettingData +{ + [Description ("Storage pool type"), + ValueMap {"0", "1", "2", "3", "4", "5", "6"}, + Values {"Unknown", "Directory, File System, Network File System, " + "Disk, ISCSI, Logical"}] + uint16 Type; + string Path; +}; + +[Description ("KVM virtual disk pool settings"), + Provider("cmpi::Virt_RASD") +] +class KVM_DiskPoolResourceAllocationSettingData : KVM_ResourceAllocationSettingData +{ + [Description ("Storage pool type"), + ValueMap {"0", "1", "2", "3", "4", "5", "6"}, + Values {"Unknown", "Directory, File System, Network File System, " + "Disk, ISCSI, Logical"}] + uint16 Type; + string Path; +}; + +[Description ("LXC virtual disk pool settings"), + Provider("cmpi::Virt_RASD") +] +class LXC_DiskPoolResourceAllocationSettingData : LXC_ResourceAllocationSettingData +{ + [Description ("Storage pool type"), + ValueMap {"0", "1", "2", "3", "4", "5", "6"}, + Values {"Unknown", "Directory, File System, Network File System, " + "Disk, ISCSI, Logical"}] + uint16 Type; + string Path; +}; + diff -r 0d6b3f8aa95d -r 2bd3982a2285 src/Virt_RASD.c --- a/src/Virt_RASD.c Fri Apr 03 09:38:51 2009 -0700 +++ b/src/Virt_RASD.c Fri Apr 03 09:38:52 2009 -0700 @@ -524,7 +524,8 @@ if (base == NULL) goto out; - if (STREQ(base, "DiskResourceAllocationSettingData")) + if ((STREQ(base, "DiskResourceAllocationSettingData")) || + (STREQ(base, "DiskPoolResourceAllocationSettingData"))) *type = CIM_RES_TYPE_DISK; else if ((STREQ(base, "NetResourceAllocationSettingData")) || (STREQ(base, "NetPoolResourceAllocationSettingData"))) From kaitlin at linux.vnet.ibm.com Fri Apr 3 16:47:15 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Apr 2009 09:47:15 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] Add support for creating disk pools to RPCS In-Reply-To: References: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1238776732 25200 # Node ID d08b52d4da57fc8bbe946f8b4f9ddccdccf9dee6 # Parent 2bd3982a2285fbfb5287861cfecb1a70e0fe4b43 Add support for creating disk pools to RPCS Signed-off-by: Kaitlin Rupert diff -r 2bd3982a2285 -r d08b52d4da57 src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Fri Apr 03 09:38:52 2009 -0700 +++ b/src/Virt_ResourcePoolConfigurationService.c Fri Apr 03 09:38:52 2009 -0700 @@ -40,6 +40,16 @@ const char *DEF_POOL_NAME = "libvirt-cim-pool"; +/* + * * Right now, detect support and use it, if available. + * * Later, this can be a configure option if needed + * */ +#if LIBVIR_VERSION_NUMBER > 4000 +# define VIR_USE_LIBVIRT_STORAGE 1 +#else +# define VIR_USE_LIBVIRT_STORAGE 0 +#endif + static CMPIStatus create_child_pool_parse_args(const CMPIArgs *argsin, const char **name, CMPIArray **set, @@ -104,6 +114,40 @@ } +#if VIR_USE_LIBVIRT_STORAGE +static const char *disk_rasd_to_pool(CMPIInstance *inst, + struct virt_pool *pool, + const char *ns) +{ + const char *val = NULL; + const char *msg = NULL; + uint16_t type; + + if (cu_get_u16_prop(inst, "Type", &type) != CMPI_RC_OK) + return "Missing `Type' property"; + + if (type != DISK_POOL_DIR) + return "Storage pool type not supported"; + + pool->pool_info.disk.pool_type = type; + + if (cu_get_str_prop(inst, "Path", &val) != CMPI_RC_OK) + return "Missing `Path' property"; + + pool->pool_info.disk.path = strdup(val); + + return msg; + +} +#else +static const char *disk_rasd_to_pool(CMPIInstance *inst, + struct virt_pool *pool, + const char *ns) +{ + return "Storage pool creation not supported in this version of libvirt"; +} +#endif + static const char *rasd_to_vpool(CMPIInstance *inst, struct virt_pool *pool, uint16_t type, @@ -113,6 +157,8 @@ if (type == CIM_RES_TYPE_NET) { return net_rasd_to_pool(inst, pool, ns); + } else if (type == CIM_RES_TYPE_DISK) { + return disk_rasd_to_pool(inst, pool, ns); } pool->type = CIM_RES_TYPE_UNKNOWN; @@ -150,9 +196,6 @@ if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) return "Unable to determine resource type"; - if (type != CIM_RES_TYPE_NET) - return "Only network pools currently supported"; - msg = rasd_to_vpool(inst, pool, type, NAMESPACE(op)); return msg; From kaitlin at linux.vnet.ibm.com Fri Apr 3 16:47:12 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Apr 2009 09:47:12 -0700 Subject: [Libvirt-cim] [PATCH 1 of 4] Add disk support to pool_parsing In-Reply-To: References: Message-ID: <9759b13c4f25d20f92bc.1238777232@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1238773876 25200 # Node ID 9759b13c4f25d20f92bc2d50961e467c1b050acc # Parent 2f4943568299ef76e285e34412ec5ba5f2badbd7 Add disk support to pool_parsing Signed-off-by: Kaitlin Rupert diff -r 2f4943568299 -r 9759b13c4f25 libxkutil/pool_parsing.c --- a/libxkutil/pool_parsing.c Thu Apr 02 03:31:14 2009 -0300 +++ b/libxkutil/pool_parsing.c Fri Apr 03 08:51:16 2009 -0700 @@ -33,6 +33,16 @@ #include "pool_parsing.h" #include "../src/svpc_types.h" +/* + * * Right now, detect support and use it, if available. + * * Later, this can be a configure option if needed + * */ +#if LIBVIR_VERSION_NUMBER > 4000 +# define VIR_USE_LIBVIRT_STORAGE 1 +#else +# define VIR_USE_LIBVIRT_STORAGE 0 +#endif + static void cleanup_net_pool(struct net_pool pool) { free(pool.addr); free(pool.netmask); @@ -78,8 +88,27 @@ } virNetworkFree(ptr); + } else if (res_type == CIM_RES_TYPE_DISK) { +#if VIR_USE_LIBVIRT_STORAGE + virStoragePoolPtr ptr = virStoragePoolDefineXML(conn, xml, 0); + if (ptr == NULL) { + CU_DEBUG("Unable to define storage pool"); + return 0; + } + + if (virStoragePoolCreate(ptr, 0) != 0) { + CU_DEBUG("Unable to start storage pool"); + ret = 0; + + if (virStoragePoolUndefine(ptr) != 0) + CU_DEBUG("Unable to undefine storage pool"); + } + + virStoragePoolFree(ptr); +#endif } + return ret; } diff -r 2f4943568299 -r 9759b13c4f25 libxkutil/pool_parsing.h --- a/libxkutil/pool_parsing.h Thu Apr 02 03:31:14 2009 -0300 +++ b/libxkutil/pool_parsing.h Fri Apr 03 08:51:16 2009 -0700 @@ -36,10 +36,22 @@ char *forward_dev; }; +struct disk_pool { + enum {DISK_POOL_UNKNOWN, + DISK_POOL_DIR, + DISK_POOL_FS, + DISK_POOL_NETFS, + DISK_POOL_DISK, + DISK_POOL_ISCSI, + DISK_POOL_LOGICAL} pool_type; + char *path; +}; + struct virt_pool { uint16_t type; union { struct net_pool net; + struct disk_pool disk; } pool_info; char *id; }; From kaitlin at linux.vnet.ibm.com Fri Apr 3 16:47:11 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Apr 2009 09:47:11 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] Add support fore creating directory based storage pools Message-ID: libvirt support various storage pool types - support for these pool types will be added in additional patchsets. This set just adds support for directory based pools. From deeptik at linux.vnet.ibm.com Mon Apr 6 10:44:17 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 06 Apr 2009 03:44:17 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to cover offline migration Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1239014625 25200 # Node ID e0c9e0c4b5a3c59ac721286522cbf0f663858090 # Parent 7ec8f401505cb9089e875fececa34814c0ea82cb [TEST] Adding new tc to cover offline migration. Tested with KVM and Xen with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 7ec8f401505c -r e0c9e0c4b5a3 suites/libvirt-cim/cimtest/VirtualSystemMigrationService/07_remote_offline_migration.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/07_remote_offline_migration.py Mon Apr 06 03:43:45 2009 -0700 @@ -0,0 +1,137 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# +# 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 testcase is used to verify the offline(other) remote migration. +# +# Date : 12-03-09 +# + +import sys +import os +from socket import gethostname, gethostbyaddr +from XenKvmLib import vxml +from XenKvmLib.xm_virt_util import domain_list, net_list +from CimTest.Globals import logger +from XenKvmLib.const import do_main, default_network_name +from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.classes import get_typed_class +from XenKvmLib.vsmigrations import local_remote_migrate +from XenKvmLib.common_util import poll_for_state_change, create_netpool_conf,\ + destroy_netpool + +sup_types = ['KVM', 'Xen'] + +REQUESTED_STATE = 3 + +def setup_guest(test_dom, ip, virt): + virt_xml = vxml.get_class(virt) + cxml = virt_xml(test_dom) + ret = cxml.cim_define(ip) + if not ret: + logger.error("Error define domain %s", test_dom) + return FAIL, cxml + + status, dom_cs = poll_for_state_change(ip, virt, test_dom, + REQUESTED_STATE) + if status != PASS: + cxml.undefine(test_dom) + logger.error("'%s' didn't change state as expected" % test_dom) + return FAIL, cxml + + return PASS, cxml + +def cleanup_guest_netpool(virt, cxml, test_dom, t_sysname, s_sysname): + # Clean the domain on target machine. + # This is req when migration is successful, also when migration is not + # completely successful VM might be created on the target machine + # and hence need to clean. + target_list = domain_list(t_sysname, virt) + if target_list != None and test_dom in target_list: + ret_value = cxml.undefine(t_sysname) + if not ret_value: + logger.info("Failed to undefine the migrated domain '%s' on '%s'", + test_dom, t_sysname) + + # clean the networkpool created on the remote machine + target_net_list = net_list(t_sysname, virt) + if target_net_list != None and default_network_name in target_net_list: + ret_value = destroy_netpool(t_sysname, virt, default_network_name) + if ret_value != PASS: + logger.info("Unable to destroy networkpool '%s' on '%s'", + default_network_name, t_sysname) + + # Remote Migration not Successful, clean the domain on src machine + src_list = domain_list(s_sysname, virt) + if src_list != None and test_dom in src_list: + ret_value = cxml.undefine(s_sysname) + if not ret_value: + logger.info("Failed to undefine the domain '%s' on source '%s'", + test_dom, s_sysname) + + + at do_main(sup_types) +def main(): + options = main.options + virt = options.virt + s_sysname = gethostbyaddr(options.ip)[0] + t_sysname = gethostbyaddr(options.t_url)[0] + if options.virt == 'KVM' and (t_sysname == s_sysname or \ + t_sysname in s_sysname): + logger.info("Libvirt does not support local migratoin for KVM") + return SKIP + + status = FAIL + test_dom = 'VM_frm_' + gethostname() + + try: + status, cxml = setup_guest(test_dom, s_sysname, virt) + if status != PASS: + logger.error("Error setting up the guest") + return status + + # create the networkpool used in the domain to be migrated + # on the target machine. + t_net_list = net_list(t_sysname, virt) + if t_net_list != None and default_network_name not in t_net_list: + status, netpool = create_netpool_conf(t_sysname, virt, + net_name=default_network_name) + if status != PASS: + raise Exception("Unable to create network pool '%s' on '%s'" + % (default_network_name, t_sysname)) + + # Migrate the test_dom to t_sysname. + # Enable remote migration by setting remote_migrate=1 + status = local_remote_migrate(s_sysname, t_sysname, virt, + remote_migrate=1, guest_name=test_dom, + mtype='offline') + except Exception, details: + logger.error("Exception details :%s", details) + status = FAIL + + cleanup_guest_netpool(virt, cxml, test_dom, t_sysname, s_sysname) + + return status + +if __name__ == "__main__": + sys.exit(main()) + From deeptik at linux.vnet.ibm.com Mon Apr 6 10:46:40 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 06 Apr 2009 03:46:40 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to cover restart and resume migration scenarios Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1239014783 25200 # Node ID a063e2b6e79e70ff8a253b1b37c437f82d38eb26 # Parent e0c9e0c4b5a3c59ac721286522cbf0f663858090 [TEST] Adding new tc to cover restart and resume migration scenarios . Tested with KVM and Xen with current sources. Signed-off-by: Deepti B. Kalakeri diff -r e0c9e0c4b5a3 -r a063e2b6e79e suites/libvirt-cim/cimtest/VirtualSystemMigrationService/08_remote_restart_resume_migration.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/08_remote_restart_resume_migration.py Mon Apr 06 03:46:23 2009 -0700 @@ -0,0 +1,182 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# +# 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 testcase is used to verify the resume and restart remote migration. +# +# Date : 05-04-2009 +# + +import sys +import os +from socket import gethostname, gethostbyaddr +from XenKvmLib import vxml +from XenKvmLib.xm_virt_util import domain_list, net_list +from CimTest.Globals import logger +from XenKvmLib.const import do_main, default_network_name +from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.classes import get_typed_class +from XenKvmLib.vsmigrations import local_remote_migrate +from XenKvmLib.common_util import poll_for_state_change, create_netpool_conf,\ + destroy_netpool + +sup_types = ['KVM', 'Xen'] + +REQUESTED_STATE = 2 + +def setup_guest(test_dom, ip, virt): + virt_xml = vxml.get_class(virt) + cxml = virt_xml(test_dom) + ret = cxml.cim_define(ip) + if not ret: + logger.error("Error define domain %s", test_dom) + return FAIL, cxml + + status = cxml.cim_start(ip) + if status != PASS: + cxml.undefine(test_dom) + logger.error("Error to start domain %s", test_dom) + return FAIL, cxml + + status, dom_cs = poll_for_state_change(ip, virt, test_dom, + REQUESTED_STATE) + if status != PASS: + cxml.cim_destroy(test_dom) + cxml.undefine(test_dom) + logger.error("'%s' didn't change state as expected" % test_dom) + return FAIL, cxml + + return PASS, cxml + +def cleanup_guest(virt, cxml, test_dom, t_sysname, s_sysname): + # Clean the domain on target machine. + # This is req when migration is successful, also when migration is not + # completely successful VM might be created on the target machine + # and hence need to clean. + target_list = domain_list(t_sysname, virt) + if target_list != None and test_dom in target_list: + ret_value = cxml.destroy(t_sysname) + if not ret_value: + logger.info("Failed to destroy the migrated domain '%s' on '%s'", + test_dom, t_sysname) + + ret_value = cxml.undefine(t_sysname) + if not ret_value: + logger.info("Failed to undefine the migrated domain '%s' on '%s'", + test_dom, t_sysname) + + # Remote Migration not Successful, clean the domain on src machine + src_list = domain_list(s_sysname, virt) + if src_list != None and test_dom in src_list: + ret_value = cxml.cim_destroy(s_sysname) + if not ret_value: + logger.info("Failed to destroy the domain '%s' on the source '%s'", + test_dom, s_sysname) + + ret_value = cxml.undefine(s_sysname) + if not ret_value: + logger.info("Failed to undefine the domain '%s' on source '%s'", + test_dom, s_sysname) + + +def str_status(status): + if status == PASS: + return 'PASSED' + else: + return 'FAILED' + + at do_main(sup_types) +def main(): + options = main.options + virt = options.virt + s_sysname = gethostbyaddr(options.ip)[0] + t_sysname = gethostbyaddr(options.t_url)[0] + if options.virt == 'KVM' and (t_sysname == s_sysname or \ + t_sysname in s_sysname): + logger.info("Libvirt does not support local migratoin for KVM") + return SKIP + + status = FAIL + test_dom = 'VM_frm_' + gethostname() + net_pool_name = default_network_name + mig_types = [ 'restart', 'resume' ] + status_resume = status_restart = None + + try: + + for mig_type in mig_types: + logger.info("Executing '%s' migration for '%s' from '%s' to '%s'", + mig_type, test_dom, s_sysname, t_sysname) + status, cxml = setup_guest(test_dom, s_sysname, virt) + if status != PASS: + logger.error("Error setting up the guest") + return status + + # create the networkpool used in the domain to be migrated + # on the target machine. + t_net_list = net_list(t_sysname, virt) + if t_net_list != None and net_pool_name not in t_net_list: + status, netpool = create_netpool_conf(t_sysname, virt, + net_name=net_pool_name) + if status != PASS: + raise Exception("Unable to create network pool '%s' on '%s'" + % (net_pool_name, t_sysname)) + + # Migrate the test_dom to t_sysname. + # Enable remote migration by setting remote_migrate=1 + status = local_remote_migrate(s_sysname, t_sysname, virt, + remote_migrate=1, guest_name=test_dom, + mtype=mig_type) + + logger.info("'%s' Migration for '%s %s' \n", + mig_type, test_dom, str_status(status)) + if mig_type == 'restart' : + status_restart = status + else: + status_resume = status + + cleanup_guest(virt, cxml, test_dom, t_sysname, s_sysname) + + except Exception, details: + logger.error("Exception details is :%s", details) + cleanup_guest(virt, cxml, test_dom, t_sysname, s_sysname) + status = FAIL + + # clean the networkpool created on the remote machine + target_net_list = net_list(t_sysname, virt) + if target_net_list != None and net_pool_name in target_net_list: + ret_value = destroy_netpool(t_sysname, virt, net_pool_name) + if ret_value != PASS: + logger.info("Unable to destroy networkpool '%s' on '%s'", + net_pool_name, t_sysname) + + if status_restart != PASS or status_resume != PASS: + status = FAIL + else: + status = PASS + + logger.info("Test case %s", str_status(status)) + return status + +if __name__ == "__main__": + sys.exit(main()) + From kaitlin at linux.vnet.ibm.com Mon Apr 6 15:58:42 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Apr 2009 08:58:42 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding remote_copy_guest_image() to vsmigration.py In-Reply-To: <8923fbe5cb2a4321feff.1238772245@localhost.localdomain> References: <8923fbe5cb2a4321feff.1238772245@localhost.localdomain> Message-ID: <49DA26B2.8060302@linux.vnet.ibm.com> > + > + # Check if the image file with the same name already exist on the machine. > + # Back it up. Copy the required working image to the destination. > + cmd = "/bin/ls -l %s" % req_image I would just use "ls" instead of "/bin/ls" - I expect every system to have ls on it, but I suppose it is possible that the executable is installed in a non-standard location. > + rc, out = utils.run_remote(t_sysname, cmd) > + if rc == 0: > + backup_image = req_image + "." + str(random.randint(1, 100)) > + cmd = 'mv %s %s' % (req_image, backup_image) > + rc, out = utils.run_remote(t_sysname, cmd) What renaming the existing file fails? > > + # Make sure we do not remove the images on the local machine > + if remote_migrate == 1: > + # Cleanup the images that is copied on the remote machine > + cmd = "rm -rf %s" % req_image > + rc, out = utils.run_remote(t_sysname, cmd) > + > + # Copy the backed up image if any on the remote machine > + if backup_image != None: > + cmd = 'mv %s %s' % (backup_image, req_image) > + rc, out = utils.run_remote(t_sysname, cmd) I would print a message to the log if either cleanup steps fail. That way, the user is aware that their environment wasn't cleaned up properly. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 6 16:12:37 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Apr 2009 09:12:37 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to cover offline migration In-Reply-To: References: Message-ID: <49DA29F5.5000700@linux.vnet.ibm.com> > + > + at do_main(sup_types) > +def main(): > + options = main.options > + virt = options.virt > + s_sysname = gethostbyaddr(options.ip)[0] > + t_sysname = gethostbyaddr(options.t_url)[0] > + if options.virt == 'KVM' and (t_sysname == s_sysname or \ > + t_sysname in s_sysname): > + logger.info("Libvirt does not support local migratoin for KVM") > + return SKIP This should be a function.. since you'll need to cal it in the live migration case as well. Since this patch looks good otherwise, I've applied this as is. Can you follow up with a patch to break this bit out into a function? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Apr 6 17:44:36 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 06 Apr 2009 23:14:36 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to cover offline migration In-Reply-To: <49DA29F5.5000700@linux.vnet.ibm.com> References: <49DA29F5.5000700@linux.vnet.ibm.com> Message-ID: <49DA3F84.8070001@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> + >> + at do_main(sup_types) >> +def main(): >> + options = main.options >> + virt = options.virt >> + s_sysname = gethostbyaddr(options.ip)[0] >> + t_sysname = gethostbyaddr(options.t_url)[0] + if options.virt >> == 'KVM' and (t_sysname == s_sysname or \ >> + t_sysname in s_sysname): >> + logger.info("Libvirt does not support local migratoin for KVM") >> + return SKIP > > This should be a function.. since you'll need to cal it in the live > migration case as well. > > Since this patch looks good otherwise, I've applied this as is. Can > you follow up with a patch to break this bit out into a function? > Yup I will do that. Also, I was not able to track the for which revision the actual changes to the KVM migration was included as the RSS feed was not working today. Can you lemme know the same. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 6 17:53:45 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Apr 2009 10:53:45 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to cover restart and resume migration scenarios In-Reply-To: References: Message-ID: <49DA41A9.7080202@linux.vnet.ibm.com> > + > + # Migrate the test_dom to t_sysname. > + # Enable remote migration by setting remote_migrate=1 > + status = local_remote_migrate(s_sysname, t_sysname, virt, > + remote_migrate=1, guest_name=test_dom, > + mtype=mig_type) > + > + logger.info("'%s' Migration for '%s %s' \n", > + mig_type, test_dom, str_status(status)) > + if mig_type == 'restart' : > + status_restart = status > + else: > + status_resume = status > + > + cleanup_guest(virt, cxml, test_dom, t_sysname, s_sysname) If the guest cleanup fails the first time through the loop, it could affect the execution the second time through. I would break from the loop and return a failure. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 6 17:58:00 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Apr 2009 10:58:00 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to cover offline migration In-Reply-To: <49DA3F84.8070001@linux.vnet.ibm.com> References: <49DA29F5.5000700@linux.vnet.ibm.com> <49DA3F84.8070001@linux.vnet.ibm.com> Message-ID: <49DA42A8.40505@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Kaitlin Rupert wrote: >>> + >>> + at do_main(sup_types) >>> +def main(): >>> + options = main.options >>> + virt = options.virt >>> + s_sysname = gethostbyaddr(options.ip)[0] >>> + t_sysname = gethostbyaddr(options.t_url)[0] + if options.virt >>> == 'KVM' and (t_sysname == s_sysname or \ >>> + t_sysname in s_sysname): >>> + logger.info("Libvirt does not support local migratoin for KVM") >>> + return SKIP >> >> This should be a function.. since you'll need to cal it in the live >> migration case as well. >> >> Since this patch looks good otherwise, I've applied this as is. Can >> you follow up with a patch to break this bit out into a function? >> > Yup I will do that. > Also, I was not able to track the for which revision the actual changes > to the KVM migration was included as the RSS feed was not working today. > Can you lemme know the same. > It's revision 809 and changeset 6302880bc7b2. The RSS feed is working for me, as is browsing the repo at: http://libvirt.org/hg/libvirt-cim/ Is this still not working for you? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 6 17:58:28 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Apr 2009 10:58:28 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add check to see if user can ssh to remote host In-Reply-To: References: Message-ID: <49DA42C4.3030204@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1238367843 25200 > # Node ID f67cd4aacb45f3a1ecfadeb3103058f0abf675d0 > # Parent 444cee668a76b0ef7fa1b5da94ae3763522834f2 > [TEST] Add check to see if user can ssh to remote host > > If this check fails, indicate to user they need to copy their key to root's > authorized_keys file. If the user is root (or cimtest is run using sudo), the > public key is written to authorized_keys automatically. > > Signed-off-by: Kaitlin Rupert > > diff -r 444cee668a76 -r f67cd4aacb45 lib/VirtLib/utils.py Has anyone had a chance to review this patch yet? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Apr 6 18:14:19 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 06 Apr 2009 23:44:19 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to cover offline migration In-Reply-To: <49DA42A8.40505@linux.vnet.ibm.com> References: <49DA29F5.5000700@linux.vnet.ibm.com> <49DA3F84.8070001@linux.vnet.ibm.com> <49DA42A8.40505@linux.vnet.ibm.com> Message-ID: <49DA467B.2010001@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B Kalakeri wrote: >> >> >> Kaitlin Rupert wrote: >>>> + >>>> + at do_main(sup_types) >>>> +def main(): >>>> + options = main.options >>>> + virt = options.virt >>>> + s_sysname = gethostbyaddr(options.ip)[0] >>>> + t_sysname = gethostbyaddr(options.t_url)[0] + if >>>> options.virt == 'KVM' and (t_sysname == s_sysname or \ >>>> + t_sysname in s_sysname): >>>> + logger.info("Libvirt does not support local migratoin for >>>> KVM") >>>> + return SKIP >>> >>> This should be a function.. since you'll need to cal it in the live >>> migration case as well. >>> >>> Since this patch looks good otherwise, I've applied this as is. Can >>> you follow up with a patch to break this bit out into a function? >>> >> Yup I will do that. >> Also, I was not able to track the for which revision the actual >> changes to the KVM migration was included as the RSS feed was not >> working today. >> Can you lemme know the same. >> > > It's revision 809 and changeset 6302880bc7b2. > > The RSS feed is working for me, as is browsing the repo at: > http://libvirt.org/hg/libvirt-cim/ > > Is this still not working for you? Yup this works now. Thanks -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 6 19:23:03 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Apr 2009 12:23:03 -0700 Subject: [Libvirt-cim] [PATCH] Add distinction between QEMU guests and hardware accelerated KVM guests Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1238533479 25200 # Node ID e5aee0f0edc128d41148ec4cedaba2bdd53cf05e # Parent d08b52d4da57fc8bbe946f8b4f9ddccdccf9dee6 Add distinction between QEMU guests and hardware accelerated KVM guests If the host system doesn't support KVM guests, then the providers should create a QEMU guest. This code generates the proper XML for the given guest type. Signed-off-by: Kaitlin Rupert diff -r d08b52d4da57 -r e5aee0f0edc1 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Fri Apr 03 09:38:52 2009 -0700 +++ b/libxkutil/device_parsing.c Tue Mar 31 14:04:39 2009 -0700 @@ -827,9 +827,10 @@ if ((STREQC(dominfo->os_info.fv.type, "hvm")) && (STREQC(dominfo->typestr, "xen"))) dominfo->type = DOMAIN_XENFV; - else if ((STREQC(dominfo->typestr, "kvm")) || - (STREQC(dominfo->typestr, "qemu"))) + else if (STREQC(dominfo->typestr, "kvm")) dominfo->type = DOMAIN_KVM; + else if (STREQC(dominfo->typestr, "qemu")) + dominfo->type = DOMAIN_QEMU; else if (STREQC(dominfo->typestr, "lxc")) dominfo->type = DOMAIN_LXC; else if (STREQC(dominfo->os_info.pv.type, "linux")) @@ -994,7 +995,7 @@ free(dom->os_info.pv.initrd); free(dom->os_info.pv.cmdline); } else if ((dom->type == DOMAIN_XENFV) || - (dom->type == DOMAIN_KVM)) { + (dom->type == DOMAIN_KVM) || (dom->type == DOMAIN_QEMU)) { free(dom->os_info.fv.type); free(dom->os_info.fv.loader); free(dom->os_info.fv.boot); diff -r d08b52d4da57 -r e5aee0f0edc1 libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Fri Apr 03 09:38:52 2009 -0700 +++ b/libxkutil/device_parsing.h Tue Mar 31 14:04:39 2009 -0700 @@ -107,7 +107,11 @@ }; struct domain { - enum { DOMAIN_XENPV, DOMAIN_XENFV, DOMAIN_KVM, DOMAIN_LXC } type; + enum { DOMAIN_XENPV, + DOMAIN_XENFV, + DOMAIN_KVM, + DOMAIN_QEMU, + DOMAIN_LXC } type; char *name; char *typestr; /*xen, kvm, etc */ char *uuid; diff -r d08b52d4da57 -r e5aee0f0edc1 libxkutil/xml_parse_test.c --- a/libxkutil/xml_parse_test.c Fri Apr 03 09:38:52 2009 -0700 +++ b/libxkutil/xml_parse_test.c Tue Mar 31 14:04:39 2009 -0700 @@ -41,7 +41,7 @@ print_value(d, "Loader", dom->os_info.fv.loader); print_value(d, "Boot", dom->os_info.fv.boot); - } else if (dom->type == DOMAIN_KVM) { + } else if ((dom->type == DOMAIN_KVM) || (dom->type == DOMAIN_QEMU)) { print_value(d, "Domain Type", "KVM/QEMU"); print_value(d, "Type", dom->os_info.fv.type); print_value(d, "Loader", dom->os_info.fv.loader); diff -r d08b52d4da57 -r e5aee0f0edc1 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Fri Apr 03 09:38:52 2009 -0700 +++ b/libxkutil/xmlgen.c Tue Mar 31 14:04:39 2009 -0700 @@ -545,7 +545,7 @@ return _xenpv_os_xml(os, domain); else if (domain->type == DOMAIN_XENFV) return _xenfv_os_xml(os, domain); - else if (domain->type == DOMAIN_KVM) + else if ((domain->type == DOMAIN_KVM) || (domain->type == DOMAIN_QEMU)) return _kvm_os_xml(os, domain); else if (domain->type == DOMAIN_LXC) return _lxc_os_xml(os, domain); @@ -694,6 +694,8 @@ domtype = "xen"; else if (dominfo->type == DOMAIN_KVM) domtype = "kvm"; + else if (dominfo->type == DOMAIN_QEMU) + domtype = "qemu"; else if (dominfo->type == DOMAIN_LXC) domtype = "lxc"; else diff -r d08b52d4da57 -r e5aee0f0edc1 src/Virt_VSSD.c --- a/src/Virt_VSSD.c Fri Apr 03 09:38:52 2009 -0700 +++ b/src/Virt_VSSD.c Tue Mar 31 14:04:39 2009 -0700 @@ -144,7 +144,7 @@ if ((dominfo->type == DOMAIN_XENFV) || - (dominfo->type == DOMAIN_KVM)) + (dominfo->type == DOMAIN_KVM) || (dominfo->type == DOMAIN_QEMU)) _set_fv_prop(dominfo, inst); else if (dominfo->type == DOMAIN_XENPV) _set_pv_prop(dominfo, inst); diff -r d08b52d4da57 -r e5aee0f0edc1 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Fri Apr 03 09:38:52 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Tue Mar 31 14:04:39 2009 -0700 @@ -174,6 +174,29 @@ return true; } +static bool system_has_kvm(const char *pfx) +{ + CMPIStatus s; + virConnectPtr conn; + char *caps = NULL; + bool kvm = false; + + conn = connect_by_classname(_BROKER, pfx, &s); + if ((conn == NULL) || (s.rc != CMPI_RC_OK)) { + return false; + } + + caps = virConnectGetCapabilities(conn); + if (caps != NULL) + kvm = (strstr(caps, "kvm") != NULL); + + free(caps); + + virConnectClose(conn); + + return kvm; +} + static int fv_vssd_to_domain(CMPIInstance *inst, struct domain *domain, const char *pfx) @@ -182,7 +205,10 @@ const char *val; if (STREQC(pfx, "KVM")) { - domain->type = DOMAIN_KVM; + if (system_has_kvm(pfx)) + domain->type = DOMAIN_KVM; + else + domain->type = DOMAIN_QEMU; } else if (STREQC(pfx, "Xen")) { domain->type = DOMAIN_XENFV; } else { From rmaciel at linux.vnet.ibm.com Tue Apr 7 01:10:05 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Mon, 06 Apr 2009 22:10:05 -0300 Subject: [Libvirt-cim] [PATCH 0 of 4] Add support fore creating directory based storage pools In-Reply-To: References: Message-ID: <49DAA7ED.6000102@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > libvirt support various storage pool types - support for these pool types will > be added in additional patchsets. This set just adds support for directory > based pools. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Tue Apr 7 01:42:03 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Mon, 06 Apr 2009 22:42:03 -0300 Subject: [Libvirt-cim] [PATCH] Add distinction between QEMU guests and hardware accelerated KVM guests In-Reply-To: References: Message-ID: <49DAAF6B.4000801@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1238533479 25200 > # Node ID e5aee0f0edc128d41148ec4cedaba2bdd53cf05e > # Parent d08b52d4da57fc8bbe946f8b4f9ddccdccf9dee6 > Add distinction between QEMU guests and hardware accelerated KVM guests > > If the host system doesn't support KVM guests, then the providers should > create a QEMU guest. This code generates the proper XML for the given guest > type. > > Signed-off-by: Kaitlin Rupert > > diff -r d08b52d4da57 -r e5aee0f0edc1 libxkutil/device_parsing.c > --- a/libxkutil/device_parsing.c Fri Apr 03 09:38:52 2009 -0700 > +++ b/libxkutil/device_parsing.c Tue Mar 31 14:04:39 2009 -0700 > @@ -827,9 +827,10 @@ > if ((STREQC(dominfo->os_info.fv.type, "hvm")) && > (STREQC(dominfo->typestr, "xen"))) > dominfo->type = DOMAIN_XENFV; > - else if ((STREQC(dominfo->typestr, "kvm")) || > - (STREQC(dominfo->typestr, "qemu"))) > + else if (STREQC(dominfo->typestr, "kvm")) > dominfo->type = DOMAIN_KVM; > + else if (STREQC(dominfo->typestr, "qemu")) > + dominfo->type = DOMAIN_QEMU; > else if (STREQC(dominfo->typestr, "lxc")) > dominfo->type = DOMAIN_LXC; > else if (STREQC(dominfo->os_info.pv.type, "linux")) > @@ -994,7 +995,7 @@ > free(dom->os_info.pv.initrd); > free(dom->os_info.pv.cmdline); > } else if ((dom->type == DOMAIN_XENFV) || > - (dom->type == DOMAIN_KVM)) { > + (dom->type == DOMAIN_KVM) || (dom->type == DOMAIN_QEMU)) { > free(dom->os_info.fv.type); > free(dom->os_info.fv.loader); > free(dom->os_info.fv.boot); > diff -r d08b52d4da57 -r e5aee0f0edc1 libxkutil/device_parsing.h > --- a/libxkutil/device_parsing.h Fri Apr 03 09:38:52 2009 -0700 > +++ b/libxkutil/device_parsing.h Tue Mar 31 14:04:39 2009 -0700 > @@ -107,7 +107,11 @@ > }; > > struct domain { > - enum { DOMAIN_XENPV, DOMAIN_XENFV, DOMAIN_KVM, DOMAIN_LXC } type; > + enum { DOMAIN_XENPV, > + DOMAIN_XENFV, > + DOMAIN_KVM, > + DOMAIN_QEMU, > + DOMAIN_LXC } type; > char *name; > char *typestr; /*xen, kvm, etc */ > char *uuid; > diff -r d08b52d4da57 -r e5aee0f0edc1 libxkutil/xml_parse_test.c > --- a/libxkutil/xml_parse_test.c Fri Apr 03 09:38:52 2009 -0700 > +++ b/libxkutil/xml_parse_test.c Tue Mar 31 14:04:39 2009 -0700 > @@ -41,7 +41,7 @@ > print_value(d, "Loader", dom->os_info.fv.loader); > print_value(d, "Boot", dom->os_info.fv.boot); > > - } else if (dom->type == DOMAIN_KVM) { > + } else if ((dom->type == DOMAIN_KVM) || (dom->type == DOMAIN_QEMU)) { > print_value(d, "Domain Type", "KVM/QEMU"); > print_value(d, "Type", dom->os_info.fv.type); > print_value(d, "Loader", dom->os_info.fv.loader); > diff -r d08b52d4da57 -r e5aee0f0edc1 libxkutil/xmlgen.c > --- a/libxkutil/xmlgen.c Fri Apr 03 09:38:52 2009 -0700 > +++ b/libxkutil/xmlgen.c Tue Mar 31 14:04:39 2009 -0700 > @@ -545,7 +545,7 @@ > return _xenpv_os_xml(os, domain); > else if (domain->type == DOMAIN_XENFV) > return _xenfv_os_xml(os, domain); > - else if (domain->type == DOMAIN_KVM) > + else if ((domain->type == DOMAIN_KVM) || (domain->type == DOMAIN_QEMU)) > return _kvm_os_xml(os, domain); > else if (domain->type == DOMAIN_LXC) > return _lxc_os_xml(os, domain); > @@ -694,6 +694,8 @@ > domtype = "xen"; > else if (dominfo->type == DOMAIN_KVM) > domtype = "kvm"; > + else if (dominfo->type == DOMAIN_QEMU) > + domtype = "qemu"; > else if (dominfo->type == DOMAIN_LXC) > domtype = "lxc"; > else > diff -r d08b52d4da57 -r e5aee0f0edc1 src/Virt_VSSD.c > --- a/src/Virt_VSSD.c Fri Apr 03 09:38:52 2009 -0700 > +++ b/src/Virt_VSSD.c Tue Mar 31 14:04:39 2009 -0700 > @@ -144,7 +144,7 @@ > > > if ((dominfo->type == DOMAIN_XENFV) || > - (dominfo->type == DOMAIN_KVM)) > + (dominfo->type == DOMAIN_KVM) || (dominfo->type == DOMAIN_QEMU)) > _set_fv_prop(dominfo, inst); > else if (dominfo->type == DOMAIN_XENPV) > _set_pv_prop(dominfo, inst); > diff -r d08b52d4da57 -r e5aee0f0edc1 src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Fri Apr 03 09:38:52 2009 -0700 > +++ b/src/Virt_VirtualSystemManagementService.c Tue Mar 31 14:04:39 2009 -0700 > @@ -174,6 +174,29 @@ > return true; > } > > +static bool system_has_kvm(const char *pfx) > +{ > + CMPIStatus s; > + virConnectPtr conn; > + char *caps = NULL; > + bool kvm = false; > + > + conn = connect_by_classname(_BROKER, pfx, &s); > + if ((conn == NULL) || (s.rc != CMPI_RC_OK)) { > + return false; > + } > + > + caps = virConnectGetCapabilities(conn); > + if (caps != NULL) > + kvm = (strstr(caps, "kvm") != NULL); > + > + free(caps); > + > + virConnectClose(conn); > + > + return kvm; > +} > + > static int fv_vssd_to_domain(CMPIInstance *inst, > struct domain *domain, > const char *pfx) > @@ -182,7 +205,10 @@ > const char *val; > > if (STREQC(pfx, "KVM")) { > - domain->type = DOMAIN_KVM; > + if (system_has_kvm(pfx)) > + domain->type = DOMAIN_KVM; > + else > + domain->type = DOMAIN_QEMU; > } else if (STREQC(pfx, "Xen")) { > domain->type = DOMAIN_XENFV; > } else { > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Apr 7 05:43:39 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 07 Apr 2009 11:13:39 +0530 Subject: [Libvirt-cim] Test Run Summary (Apr 07 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49DAE80B.2060606@linux.vnet.ibm.com> ================================================= Test Run Summary (Apr 07 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 842 Libvirt-cim changeset: 2f4943568299 Cimtest revision: Cimtest changeset: ================================================= FAIL : 9 XFAIL : 2 SKIP : 3 PASS : 136 ----------------- Total : 150 ================================================= FAIL Test Summary: ComputerSystem - 01_enum.py: FAIL ElementCapabilities - 01_forward.py: FAIL ElementCapabilities - 02_reverse.py: FAIL EnabledLogicalElementCapabilities - 01_enum.py: FAIL KVMRedirectionSAP - 01_enum_KVMredSAP.py: FAIL ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 16_removeresource.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: FAIL ERROR - Provider does not report system `Xen', but virsh does ERROR - Provider does not report system `Xen', but virsh does -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - Got CIM error CIM_ERR_NOT_SUPPORTED: State not supported with return code 7 ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: 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: PASS -------------------------------------------------------------------- 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: FAIL ERROR - IndexError : list index out of range Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 139, in do_try File "01_forward.py", line 138, in main if elec[0].classname != cn: IndexError: list index out of range ERROR - None CIM_ERR_INVALID_CLASS: Linux_ComputerSystem CIM_ERR_NOT_FOUND: Referenced domain `Xen' does not exist: Domain not found: xenUnifiedDomainLookupByName -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: FAIL ERROR - No ELEC instances returned CIM_ERR_INVALID_CLASS: Linux_ComputerSystem CIM_ERR_NOT_FOUND: No such instance (Xen): Domain not found: xenUnifiedDomainLookupByName -------------------------------------------------------------------- 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: FAIL ERROR - Get domain list error, the number of domains is not equal -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: FAIL ERROR - Exception details: 'ElementName' Value Mismatch, Expected 5902:-1, Got 5902:0 ERROR - Exception: Failed to verify information for the defined dom:test_kvmredsap_dom -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- 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 CIM_ERR_INVALID_PARAMETER InvokeMethod(CreateChildResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - Unexpected rc code 4 and description CIM_ERR_INVALID_PARAMETER InvokeMethod(DeleteResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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:xen CIM_ERR_NOT_FOUND: No such instance (no device domain/mouse:xen) 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: FAIL ERROR - Error create domain dom_migrate -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Migration verification for 'dom_migrate' failed -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 06_remote_live_migration.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 07_remote_offline_migration.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Apr 7 12:25:54 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 07 Apr 2009 17:55:54 +0530 Subject: [Libvirt-cim] Test Run Summary (Apr 07 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus Message-ID: <49DB4652.2060801@linux.vnet.ibm.com> ================================================= Test Run Summary (Apr 07 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus ================================================= Distro: Fedora release 10.90 (Rawhide) Kernel: 2.6.29-0.24.rc0.git13.fc11.x86_64 libvirt: 0.6.1 Hypervisor: QEMU 0.10.0 CIMOM: Pegasus 2.7.2 Libvirt-cim revision: 842 Libvirt-cim changeset: 2f4943568299 Cimtest revision: 662 Cimtest changeset: a2c6bcec55c1 ================================================= FAIL : 9 XFAIL : 3 SKIP : 6 PASS : 132 ----------------- Total : 150 ================================================= FAIL Test Summary: ElementAllocatedFromPool - 01_forward.py: FAIL ElementAllocatedFromPool - 02_reverse.py: FAIL HostSystem - 03_hs_to_settdefcap.py: FAIL HostSystem - 04_hs_to_EAPF.py: FAIL ResourceAllocationFromPool - 01_forward.py: FAIL ResourceAllocationFromPool - 02_reverse.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 - 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 ================================================= 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 CIM_ERR_FAILED: 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): CIM_ERR_FAILED: 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 CIM_ERR_NOT_SUPPORTED: State not supported with return code 7 ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: 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: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: FAIL ERROR - InstanceID Mismatch ERROR - Returned DiskPool/meep-disk instead of DiskPool/cimtest-diskpool -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: FAIL ERROR - 'KVM_ElementAllocatedFromPool' with 'KVM_DiskPool' did not return any records for domain: 'eafp_domain' -------------------------------------------------------------------- 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 92 RASD objects instead of 8 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: FAIL ERROR - DEBUG host_name is elm3b41 ERROR - KVM_ElementAllocatedFromPool returned 0 KVM_DiskPool objects CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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: FAIL ERROR - No RASD associated with DiskPool/cimtest-diskpool -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: FAIL ERROR - InstanceID Mismatch ERROR - Got DiskPool/meep-disk instead of DiskPool/cimtest-diskpool -------------------------------------------------------------------- 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 CIM_ERR_INVALID_PARAMETER InvokeMethod(CreateChildResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - Unexpected rc code 4 and description CIM_ERR_INVALID_PARAMETER InvokeMethod(DeleteResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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 36 ResourcePool objects instead of 8 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 CIM_ERR_NOT_FOUND: 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: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 07_remote_offline_migration.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Apr 7 13:30:07 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 07 Apr 2009 06:30:07 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Adding remote_copy_guest_image() to vsmigration.py Message-ID: <6027a48279e6daff2145.1239111007@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1239110977 25200 # Node ID 6027a48279e6daff21453a30b3749a0b79218c8a # Parent a2c6bcec55c1fb8c7a0e7ced19d6840865180297 [TEST] #2 Adding remote_copy_guest_image() to vsmigration.py. Updates: -------- Patch 2: -------- 1) Included log message when the image restoration fails. 2) Included try , Except block in local_remote_migrate(). 3) Moved the cleanup of image to a function cleanup_image. This is needed to make sure that we have the required image files on the destination for the remote migration tests to be successful. Tested for KVM and Xen with current sources. Signed-off-by: Deepti B. Kalakeri diff -r a2c6bcec55c1 -r 6027a48279e6 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Mon Apr 06 03:43:45 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Tue Apr 07 06:29:37 2009 -0700 @@ -21,16 +21,19 @@ # # +import random from time import sleep +from VirtLib import utils from pywbem import WBEMConnection, CIMInstanceName from CimTest.CimExt import CIMMethodClass, CIMClassMOF from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib import enumclass +from XenKvmLib.enumclass import EnumInstances from XenKvmLib.classes import get_typed_class, virt_types from XenKvmLib.xm_virt_util import domain_list from XenKvmLib.const import get_provider_version from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ CIM_ERROR_ENUMERATE + # Migration constants CIM_MIGRATE_OFFLINE=1 CIM_MIGRATE_LIVE=2 @@ -129,6 +132,48 @@ return msd.mof() +def remote_copy_guest_image(virt, s_sysname, t_sysname, test_dom): + cn_name = get_typed_class(virt, 'DiskResourceAllocationSettingData') + req_image = backup_image = None + + try: + d_rasds = EnumInstances(s_sysname, cn_name, ret_cim_inst=True) + for d_rasd in d_rasds: + if test_dom in d_rasd["InstanceID"]: + req_image = d_rasd["Address"] + break + + if req_image == None: + logger.error("Failed to get Disk RASD info for '%s'", test_dom) + return FAIL, req_image, backup_image + + # Check if the image file with the same name already exist on the machine. + # Back it up. Copy the required working image to the destination. + cmd = "ls -l %s" % req_image + rc, out = utils.run_remote(t_sysname, cmd) + if rc == 0: + backup_image = req_image + "." + str(random.randint(1, 100)) + cmd = 'mv %s %s' % (req_image, backup_image) + rc, out = utils.run_remote(t_sysname, cmd) + if rc != 0: + backup_image = None + logger.error("Failed to backup the image '%s' on '%s'", + req_image, t_sysname) + return FAIL, req_image, backup_image + + s, o = utils.copy_remote(t_sysname, req_image, remote=req_image) + if s != 0: + logger.error("Failed to copy the image file '%s' for migration"\ + " to '%s'", req_image, t_sysname) + return FAIL, req_image, backup_image + + except Exception, details: + logger.error("Exception in remote_copy_guest_image()") + logger.error("Exception details %s", details) + return FAIL, req_image, backup_image + + return PASS, req_image, backup_image + def check_possible_host_migration(service, cs_ref, ip, msd=None): res = None try: @@ -181,7 +226,7 @@ mig_job_cn = get_typed_class(virt, 'MigrationJob') try: - job = enumclass.EnumInstances(src_ip, mig_job_cn) + job = EnumInstances(src_ip, mig_job_cn) if len(job) < 1: logger.error("'%s' returned empty list", mig_job_cn) return FAIL, None @@ -260,6 +305,25 @@ logger.error("In check_migration_job() Exception details: %s", details) return FAIL + +def cleanup_image(backup_image, req_image, t_sysname, remote_migrate=1): + # Make sure we do not remove the images on the local machine + if remote_migrate == 1: + # Cleanup the images that is copied on the remote machine + cmd = "rm -rf %s" % req_image + rc, out = utils.run_remote(t_sysname, cmd) + if rc != 0: + logger.info("Failed to remove the copied image '%s' from '%s'", + req_image, t_sysname) + + # Copy the backed up image if any on the remote machine + if backup_image != None: + cmd = 'mv %s %s' % (backup_image, req_image) + rc, out = utils.run_remote(t_sysname, cmd) + if rc != 0: + logger.info("Failed to restore the original backed up image" \ + "'%s' on '%s'", backup_image, t_sysname) + # Desc: # Fn Name : local_remote_migrate() # @@ -285,39 +349,54 @@ logger.error("Guest to be migrated not specified.") return FAIL - # Get the guest ref - guest_ref = get_guest_ref(guest_name, virt) - if guest_ref == None or guest_ref['Name'] != guest_name: - logger.error("Failed to get the guest refernce to be migrated") - return FAIL + try: + if remote_migrate == 1: + status, req_image, backup_image = remote_copy_guest_image(virt, + s_sysname, + t_sysname, + guest_name) + if status != PASS: + raise Exception("Failure from remote_copy_guest_image()") - # Get MigrationSettingData information - msd = get_msd(virt, mtype, mpriority) - if msd == None: - return FAIL + # Get the guest ref + guest_ref = get_guest_ref(guest_name, virt) + if guest_ref == None or guest_ref['Name'] != guest_name: + raise Exception ("Failed to get the guest refernce to be migrated") - # Get VirtualSystemMigrationService object - vsms_cn = get_vs_mig_setting_class(virt) - vsmservice = vsms_cn(s_sysname, virt) + # Get MigrationSettingData information + msd = get_msd(virt, mtype, mpriority) + if msd == None: + raise Exception("No MigrationSettingData details found") - # Verify is destination(t_sysname) can be used for migration - status = check_possible_host_migration(vsmservice, guest_ref, - t_sysname, msd) - if status != PASS: - return FAIL + # Get VirtualSystemMigrationService object + vsms_cn = get_vs_mig_setting_class(virt) + vsmservice = vsms_cn(s_sysname, virt) - logger.info("Migrating %s.. this will take some time.", guest_name) - # Migrate the guest to t_sysname - status, ret = migrate_guest_to_host(vsmservice, guest_ref, t_sysname, msd) - if status == FAIL: - logger.error("Failed to Migrate guest '%s' from '%s' to '%s'", - guest_name, s_sysname, t_sysname) - return status - elif len(ret) == 2: - id = ret[1]['Job'].keybindings['InstanceID'] + # Verify if destination(t_sysname) can be used for migration + status = check_possible_host_migration(vsmservice, guest_ref, + t_sysname, msd) + if status != PASS: + raise Exception("Failed to verify Migration support on host '%s'" \ + % t_sysname) - # Verify if migration status - status = check_migration_job(s_sysname, id, t_sysname, guest_name, - remote_migrate, virt, timeout=time_out) + logger.info("Migrating '%s'.. this will take some time.", guest_name) + # Migrate the guest to t_sysname + status, ret = migrate_guest_to_host(vsmservice, guest_ref, t_sysname, msd) + if status == FAIL: + raise Exception("Failed to Migrate guest '%s' from '%s' to '%s'" \ + % (guest_name, s_sysname, t_sysname)) + elif len(ret) == 2: + id = ret[1]['Job'].keybindings['InstanceID'] + + # Verify if migration status + status = check_migration_job(s_sysname, id, t_sysname, guest_name, + remote_migrate, virt, timeout=time_out) + + except Exception, details: + logger.error("Exception in local_remote_migrate()") + logger.error("Exception details %s", details) + status = FAIL + + cleanup_image(backup_image, req_image, t_sysname, remote_migrate=1) return status From rmaciel at linux.vnet.ibm.com Tue Apr 7 19:30:10 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 07 Apr 2009 16:30:10 -0300 Subject: [Libvirt-cim] [PATCH] This patch changes the status message generated when a live migration cannot be executed because the domain isn't in the live/resume state Message-ID: # HG changeset patch # User Richard Maciel # Date 1239131809 10800 # Node ID c940cdadd76903db3f4970624890978fb934a898 # Parent e5aee0f0edc128d41148ec4cedaba2bdd53cf05e This patch changes the status message generated when a live migration cannot be executed because the domain isn't in the live/resume state Signed-off-by: Richard Maciel diff -r e5aee0f0edc1 -r c940cdadd769 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Tue Mar 31 14:04:39 2009 -0700 +++ b/src/Virt_VSMigrationService.c Tue Apr 07 16:16:49 2009 -0300 @@ -960,7 +960,8 @@ if ((const int)info.state == VIR_DOMAIN_SHUTOFF) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_INVALID_PARAMETER, - "Domain must not be shut off for live migration"); + "Domain must be running for live \ + or resume migration"); goto out; } From kaitlin at linux.vnet.ibm.com Wed Apr 8 00:32:39 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 07 Apr 2009 17:32:39 -0700 Subject: [Libvirt-cim] [PATCH] This patch changes the status message generated when a live migration cannot be executed because the domain isn't in the live/resume state In-Reply-To: References: Message-ID: <49DBF0A7.6070701@linux.vnet.ibm.com> > @@ -960,7 +960,8 @@ > if ((const int)info.state == VIR_DOMAIN_SHUTOFF) { > cu_statusf(_BROKER, &s, > CMPI_RC_ERR_INVALID_PARAMETER, > - "Domain must not be shut off for live migration"); > + "Domain must be running for live \ > + or resume migration"); > goto out; Can you quote the string like the following: cu_statusf(_BROKER, &s, CMPI_RC_ERR_INVALID_PARAMETER, "Domain must be running for live " "or resume migration"); Otherwise, the error message is formatted like the following: 'Domain must be running for live or resume migration' 'Domain must be running for live or resume migration' Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Wed Apr 8 00:55:50 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 07 Apr 2009 21:55:50 -0300 Subject: [Libvirt-cim] [PATCH] (#2)This patch changes the status message generated when a live migration cannot be executed because the domain isn't in the live/resume state Message-ID: <3b7ba02cd34a4b91903e.1239152150@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1239152083 10800 # Node ID 3b7ba02cd34a4b91903e4d412fc7d5dd75779598 # Parent e5aee0f0edc128d41148ec4cedaba2bdd53cf05e (#2)This patch changes the status message generated when a live migration cannot be executed because the domain isn't in the live/resume state 2: - Formatted string correctly Signed-off-by: Richard Maciel diff -r e5aee0f0edc1 -r 3b7ba02cd34a src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Tue Mar 31 14:04:39 2009 -0700 +++ b/src/Virt_VSMigrationService.c Tue Apr 07 21:54:43 2009 -0300 @@ -960,7 +960,8 @@ if ((const int)info.state == VIR_DOMAIN_SHUTOFF) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_INVALID_PARAMETER, - "Domain must not be shut off for live migration"); + "Domain must be running for live " + "or resume migration"); goto out; } From deeptik at linux.vnet.ibm.com Wed Apr 8 09:05:32 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 08 Apr 2009 02:05:32 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Adding new tc to cover restart and resume migration scenarios Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1239181516 25200 # Node ID fbd3990003091191b34ce74569d07d999b22eb41 # Parent 9fc3064048044e18e14f96d12cadf7a0f8245c07 [TEST] #2 Adding new tc to cover restart and resume migration scenarios . Updates: -------- Patch 2: -------- Included break stmt when cleanup of guest fails. Tested with KVM and Xen with current sources and rpm. Signed-off-by: Deepti B. Kalakeri diff -r 9fc306404804 -r fbd399000309 suites/libvirt-cim/cimtest/VirtualSystemMigrationService/08_remote_restart_resume_migration.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/08_remote_restart_resume_migration.py Wed Apr 08 02:05:16 2009 -0700 @@ -0,0 +1,189 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# +# 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 testcase is used to verify the resume and restart remote migration. +# +# Date : 05-04-2009 +# + +import sys +import os +from socket import gethostname +from XenKvmLib import vxml +from XenKvmLib.xm_virt_util import domain_list, net_list +from CimTest.Globals import logger +from XenKvmLib.const import do_main, default_network_name +from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.classes import get_typed_class +from XenKvmLib.vsmigrations import check_mig_support, local_remote_migrate +from XenKvmLib.common_util import poll_for_state_change, create_netpool_conf,\ + destroy_netpool + +sup_types = ['KVM', 'Xen'] + +REQUESTED_STATE = 2 + +def setup_guest(test_dom, ip, virt): + virt_xml = vxml.get_class(virt) + cxml = virt_xml(test_dom) + ret = cxml.cim_define(ip) + if not ret: + logger.error("Error define domain %s", test_dom) + return FAIL, cxml + + status = cxml.cim_start(ip) + if status != PASS: + cxml.undefine(test_dom) + logger.error("Error to start domain %s", test_dom) + return FAIL, cxml + + status, dom_cs = poll_for_state_change(ip, virt, test_dom, + REQUESTED_STATE) + if status != PASS: + cxml.cim_destroy(test_dom) + cxml.undefine(test_dom) + logger.error("'%s' didn't change state as expected" % test_dom) + return FAIL, cxml + + return PASS, cxml + +def cleanup_guest(virt, cxml, test_dom, t_sysname, s_sysname): + status = PASS + # Clean the domain on target machine. + # This is req when migration is successful, also when migration is not + # completely successful VM might be created on the target machine + # and hence need to clean. + target_list = domain_list(t_sysname, virt) + if target_list != None and test_dom in target_list: + ret_value = cxml.destroy(t_sysname) + if not ret_value: + logger.info("Failed to destroy the migrated domain '%s' on '%s'", + test_dom, t_sysname) + status = FAIL + + ret_value = cxml.undefine(t_sysname) + if not ret_value: + logger.info("Failed to undefine the migrated domain '%s' on '%s'", + test_dom, t_sysname) + status = FAIL + + # Remote Migration not Successful, clean the domain on src machine + src_list = domain_list(s_sysname, virt) + if src_list != None and test_dom in src_list: + ret_value = cxml.cim_destroy(s_sysname) + if not ret_value: + logger.info("Failed to destroy the domain '%s' on the source '%s'", + test_dom, s_sysname) + status = FAIL + + ret_value = cxml.undefine(s_sysname) + if not ret_value: + logger.info("Failed to undefine the domain '%s' on source '%s'", + test_dom, s_sysname) + status = FAIL + + return status + +def str_status(status): + if status == PASS: + return 'PASSED' + else: + return 'FAILED' + + at do_main(sup_types) +def main(): + options = main.options + virt = options.virt + status, s_sysname, t_sysname = check_mig_support(virt, options) + if status != PASS: + return status + + status = FAIL + test_dom = 'VM_frm_' + gethostname() + net_pool_name = default_network_name + mig_types = [ 'restart', 'resume' ] + status_resume = status_restart = None + cxml = None + + try: + + for mig_type in mig_types: + logger.info("Executing '%s' migration for '%s' from '%s' to '%s'", + mig_type, test_dom, s_sysname, t_sysname) + status, cxml = setup_guest(test_dom, s_sysname, virt) + if status != PASS: + logger.error("Error setting up the guest") + return status + + # create the networkpool used in the domain to be migrated + # on the target machine. + t_net_list = net_list(t_sysname, virt) + if t_net_list != None and net_pool_name not in t_net_list: + status, netpool = create_netpool_conf(t_sysname, virt, + net_name=net_pool_name) + if status != PASS: + raise Exception("Unable to create network pool '%s' on '%s'" + % (net_pool_name, t_sysname)) + + # Migrate the test_dom to t_sysname. + # Enable remote migration by setting remote_migrate=1 + status = local_remote_migrate(s_sysname, t_sysname, virt, + remote_migrate=1, guest_name=test_dom, + mtype=mig_type) + + logger.info("'%s' Migration for '%s %s' \n", + mig_type, test_dom, str_status(status)) + if mig_type == 'restart' : + status_restart = status + else: + status_resume = status + + ret = cleanup_guest(virt, cxml, test_dom, t_sysname, s_sysname) + if ret != PASS: + logger.error("Cleanup failed after '%s' migration", mig_type) + break + + except Exception, details: + logger.error("Exception details is :%s", details) + cleanup_guest(virt, cxml, test_dom, t_sysname, s_sysname) + status = FAIL + + # clean the networkpool created on the remote machine + target_net_list = net_list(t_sysname, virt) + if target_net_list != None and net_pool_name in target_net_list: + ret_value = destroy_netpool(t_sysname, virt, net_pool_name) + if ret_value != PASS: + logger.info("Unable to destroy networkpool '%s' on '%s'", + net_pool_name, t_sysname) + + if status_restart != PASS or status_resume != PASS: + status = FAIL + else: + status = PASS + + logger.info("Test case %s", str_status(status)) + return status + +if __name__ == "__main__": + sys.exit(main()) + From deeptik at linux.vnet.ibm.com Wed Apr 8 09:00:13 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 08 Apr 2009 02:00:13 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding check_mig_support() to vsmigration.py Message-ID: <9fc3064048044e18e14f.1239181213@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1239181167 25200 # Node ID 9fc3064048044e18e14f96d12cadf7a0f8245c07 # Parent a2c6bcec55c1fb8c7a0e7ced19d6840865180297 [TEST] Adding check_mig_support() to vsmigration.py. This check is used to verify if local migration is triggered for KVM. Tested for Xen/KVM with current sources and rpm. Signed-off-by: Deepti B. Kalakeri diff -r a2c6bcec55c1 -r 9fc306404804 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Mon Apr 06 03:43:45 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Apr 08 01:59:27 2009 -0700 @@ -22,6 +22,7 @@ # from time import sleep +from socket import gethostbyaddr from pywbem import WBEMConnection, CIMInstanceName from CimTest.CimExt import CIMMethodClass, CIMClassMOF from CimTest.ReturnCodes import PASS, FAIL @@ -129,6 +130,15 @@ return msd.mof() +def check_mig_support(virt, options): + s_sysname = gethostbyaddr(options.ip)[0] + t_sysname = gethostbyaddr(options.t_url)[0] + if virt == 'KVM' and (t_sysname == s_sysname or t_sysname in s_sysname): + logger.info("Libvirt does not support local migration for KVM") + return SKIP, s_sysname, t_sysname + + return PASS, s_sysname, t_sysname + def check_possible_host_migration(service, cs_ref, ip, msd=None): res = None try: From deeptik at linux.vnet.ibm.com Wed Apr 8 09:23:06 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 08 Apr 2009 02:23:06 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 06_remote_live_migration.py, 07_remote_offline_migration.py tc to use check_mig_support() Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1239182573 25200 # Node ID b52473e2e6d72077d2aaa7bdd0593b9ad24924e8 # Parent fbd3990003091191b34ce74569d07d999b22eb41 [TEST] Updating 06_remote_live_migration.py, 07_remote_offline_migration.py tc to use check_mig_support(). This patch is dependent on Adding check_mig_support() to vsmigration.py. Tested with Xen/KVM with current sources and rpm. Signed-off-by: Deepti B. Kalakeri diff -r fbd399000309 -r b52473e2e6d7 suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_live_migration.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_live_migration.py Wed Apr 08 02:05:16 2009 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_live_migration.py Wed Apr 08 02:22:53 2009 -0700 @@ -28,14 +28,14 @@ import sys import os -from socket import gethostname, gethostbyaddr +from socket import gethostname from XenKvmLib import vxml from XenKvmLib.xm_virt_util import domain_list, net_list from CimTest.Globals import logger from XenKvmLib.const import do_main, default_network_name from CimTest.ReturnCodes import PASS, FAIL, SKIP from XenKvmLib.classes import get_typed_class -from XenKvmLib.vsmigrations import local_remote_migrate +from XenKvmLib.vsmigrations import check_mig_support, local_remote_migrate from XenKvmLib.common_util import poll_for_state_change, create_netpool_conf,\ destroy_netpool @@ -110,12 +110,9 @@ def main(): options = main.options virt = options.virt - s_sysname = gethostbyaddr(options.ip)[0] - t_sysname = gethostbyaddr(options.t_url)[0] - if options.virt == 'KVM' and (t_sysname == s_sysname or \ - t_sysname in s_sysname): - logger.info("Libvirt does not support local migratoin for KVM") - return SKIP + status, s_sysname, t_sysname = check_mig_support(virt, options) + if status != PASS: + return status status = FAIL test_dom = 'VM_frm_' + gethostname() diff -r fbd399000309 -r b52473e2e6d7 suites/libvirt-cim/cimtest/VirtualSystemMigrationService/07_remote_offline_migration.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/07_remote_offline_migration.py Wed Apr 08 02:05:16 2009 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/07_remote_offline_migration.py Wed Apr 08 02:22:53 2009 -0700 @@ -28,14 +28,14 @@ import sys import os -from socket import gethostname, gethostbyaddr +from socket import gethostname from XenKvmLib import vxml from XenKvmLib.xm_virt_util import domain_list, net_list from CimTest.Globals import logger from XenKvmLib.const import do_main, default_network_name -from CimTest.ReturnCodes import PASS, FAIL, SKIP +from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.classes import get_typed_class -from XenKvmLib.vsmigrations import local_remote_migrate +from XenKvmLib.vsmigrations import check_mig_support, local_remote_migrate from XenKvmLib.common_util import poll_for_state_change, create_netpool_conf,\ destroy_netpool @@ -93,12 +93,9 @@ def main(): options = main.options virt = options.virt - s_sysname = gethostbyaddr(options.ip)[0] - t_sysname = gethostbyaddr(options.t_url)[0] - if options.virt == 'KVM' and (t_sysname == s_sysname or \ - t_sysname in s_sysname): - logger.info("Libvirt does not support local migratoin for KVM") - return SKIP + status, s_sysname, t_sysname = check_mig_support(virt, options) + if status != PASS: + return status status = FAIL test_dom = 'VM_frm_' + gethostname() From deeptik at linux.vnet.ibm.com Wed Apr 8 10:03:14 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 08 Apr 2009 15:33:14 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Add check to see if user can ssh to remote host In-Reply-To: References: Message-ID: <49DC7662.4040103@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1238367843 25200 > # Node ID f67cd4aacb45f3a1ecfadeb3103058f0abf675d0 > # Parent 444cee668a76b0ef7fa1b5da94ae3763522834f2 > [TEST] Add check to see if user can ssh to remote host > > If this check fails, indicate to user they need to copy their key to root's > authorized_keys file. If the user is root (or cimtest is run using sudo), the > public key is written to authorized_keys automatically. > > Signed-off-by: Kaitlin Rupert > > diff -r 444cee668a76 -r f67cd4aacb45 lib/VirtLib/utils.py > --- a/lib/VirtLib/utils.py Sun Mar 29 16:04:03 2009 -0700 > +++ b/lib/VirtLib/utils.py Sun Mar 29 16:04:03 2009 -0700 > @@ -27,9 +27,16 @@ > # ssh utils > > SSH_PARMS="-q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" > -root_dot_ssh = os.path.join(os.getenv('HOME'), '.ssh') > -SSH_KEY = os.path.join(root_dot_ssh, 'id_rsa') > -AUTHED_KEYS = os.path.join(root_dot_ssh, 'authorized_keys') > +USER_SSH_PATH = os.path.join(os.getenv('HOME'), '.ssh') > +ROOT_SSH_PATH = "/root/.ssh" > +SSH_KEY = os.path.join(USER_SSH_PATH, 'id_rsa') > +AUTHED_KEYS = os.path.join(ROOT_SSH_PATH, 'authorized_keys') > + > +def run_remote_chk(ip, cmd): > + > + cmd = 'ssh %s -o PasswordAuthentication=no -i %s root@%s "%s"' % \ > + (SSH_PARMS, SSH_KEY, ip, cmd) > + return commands.getstatusoutput(cmd) > > def run_remote(ip, cmd): > > @@ -72,23 +79,37 @@ > t0Vm53Jlg5CzFbn9EZp3LN9D/GEwKOqPehB+P0qhz15H8j6VQQ== > -----END RSA PRIVATE KEY----- > """ > + > + def gen_pubkey(): > + print "\nGenerating public key from private key...\n" > + cmd = 'ssh-keygen -y -f %s' % SSH_KEY > + return commands.getoutput(cmd) > > def write_pubkey(pubkey): > + cmd = "whoami" > + rc, o = commands.getstatusoutput(cmd) > + if rc != 0 or o != "root": > + return > + > f = open(AUTHED_KEYS, 'a+') > f.write('\n'+pubkey) > f.flush() > f.close() > - > + > def write_privkey(privkey): > How and when will the write_privkey() will be called ? > - f = open(SSH_KEY, 'w') > + if not os.path.exists(SSH_KEY): > + if not os.path.exists(USER_SSH_PATH): > + os.mkdir(USER_SSH_PATH) > + f = file(SSH_KEY,'wt') > + else: > + f = open(SSH_KEY, 'w') > f.write(privkey) > f.flush() > f.close() > os.chmod(SSH_KEY, 0400) > > if os.path.exists(SSH_KEY): > - cmd = 'ssh-keygen -y -f %s' % SSH_KEY > - pubkey = commands.getoutput(cmd) > + pubkey = gen_pubkey() > if os.path.exists(AUTHED_KEYS): > cmd = """grep "%s" %s >/dev/null 2>&1""" % (pubkey, AUTHED_KEYS) > rc, o = commands.getstatusoutput(cmd) > @@ -98,6 +119,5 @@ > write_pubkey(pubkey) > else: > write_privkey(ssh_key) > - cmd = 'ssh-keygen -y -f %s' % SSH_KEY > - pubkey = commands.getoutput(cmd) > + pubkey = gen_pubkey() > write_pubkey(pubkey) > diff -r 444cee668a76 -r f67cd4aacb45 suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Sun Mar 29 16:04:03 2009 -0700 > +++ b/suites/libvirt-cim/main.py Sun Mar 29 16:04:03 2009 -0700 > @@ -93,6 +93,14 @@ > print "Cleaned log files." > > def pre_check(ip, virt): > + cmd = "ls" > + ret, out = utils.run_remote_chk(ip, cmd) > + if ret != 0: > + msg = "Unable to write to %s.\nPlease add your public key (%s.pub)" \ > + " to %s's %s and rerun the test" % (utils.AUTHED_KEYS, > + utils.SSH_KEY, ip, utils.AUTHED_KEYS) > + return msg > + > cmd = "virsh -c %s list --all" % virt2uri(virt) > ret, out = utils.run_remote(ip, cmd) > if ret != 0: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Apr 9 00:18:20 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 08 Apr 2009 17:18:20 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding check_mig_support() to vsmigration.py In-Reply-To: <9fc3064048044e18e14f.1239181213@localhost.localdomain> References: <9fc3064048044e18e14f.1239181213@localhost.localdomain> Message-ID: <49DD3ECC.2030909@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1239181167 25200 > # Node ID 9fc3064048044e18e14f96d12cadf7a0f8245c07 > # Parent a2c6bcec55c1fb8c7a0e7ced19d6840865180297 > [TEST] Adding check_mig_support() to vsmigration.py. > > > This check is used to verify if local migration is triggered for KVM. > Tested for Xen/KVM with current sources and rpm. > > Signed-off-by: Deepti B. Kalakeri > > diff -r a2c6bcec55c1 -r 9fc306404804 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Can you rebase this on recent sources? I get the following in the reject file: --- vsmigrations.py +++ vsmigrations.py @@ -22,6 +22,7 @@ # from time import sleep +from socket import gethostbyaddr from pywbem import WBEMConnection, CIMInstanceName from CimTest.CimExt import CIMMethodClass, CIMClassMOF from CimTest.ReturnCodes import PASS, FAIL -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Apr 9 05:23:34 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 08 Apr 2009 22:23:34 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding check_mig_support() to vsmigration.py [Rebased Patch] Message-ID: <2f260c9f4cc7f914038f.1239254614@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1239254376 25200 # Node ID 2f260c9f4cc7f914038f5eef12deb7c72e1cacf8 # Parent 6027a48279e6daff21453a30b3749a0b79218c8a [TEST] Adding check_mig_support() to vsmigration.py [Rebased Patch]. This check is used to verify if local migration is triggered for KVM. Tested for Xen/KVM with current sources and rpm. Signed-off-by: Deepti B. Kalakeri diff -r 6027a48279e6 -r 2f260c9f4cc7 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Tue Apr 07 06:29:37 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Apr 08 22:19:36 2009 -0700 @@ -23,6 +23,7 @@ import random from time import sleep +from socket import gethostbyaddr from VirtLib import utils from pywbem import WBEMConnection, CIMInstanceName from CimTest.CimExt import CIMMethodClass, CIMClassMOF @@ -90,6 +91,16 @@ class KVM_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): pass +def check_mig_support(virt, options): + s_sysname = gethostbyaddr(options.ip)[0] + t_sysname = gethostbyaddr(options.t_url)[0] + if virt == 'KVM' and (t_sysname == s_sysname or t_sysname in s_sysname): + logger.info("Libvirt does not support local migration for KVM") + return SKIP, s_sysname, t_sysname + + return PASS, s_sysname, t_sysname + + def get_msd(virt, mtype='live', mpriority=0): if mtype == "live": mtype = CIM_MIGRATE_LIVE From deeptik at linux.vnet.ibm.com Thu Apr 9 09:30:41 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 09 Apr 2009 15:00:41 +0530 Subject: [Libvirt-cim] Test Run Summary (Apr 08 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49DDC041.2090007@linux.vnet.ibm.com> ================================================= Test Run Summary (Apr 08 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 662 Cimtest changeset: a2c6bcec55c1 ================================================= FAIL : 3 XFAIL : 1 SKIP : 12 PASS : 134 ----------------- Total : 150 ================================================= FAIL Test Summary: RASD - 01_verify_rasd_fields.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostedAccessPoint - 01_forward.py: SKIP HostedAccessPoint - 02_reverse.py: SKIP KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP ServiceAccessBySAP - 01_forward.py: SKIP ServiceAccessBySAP - 02_reverse.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 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - Got CIM error CIM_ERR_NOT_SUPPORTED: State not supported with return code 7 ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- HostedAccessPoint - 02_reverse.py: SKIP -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- 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: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/11:22:33:aa:bb:cc)') ERROR - Enum RASDs failed -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: SKIP -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.py: SKIP -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 17_removeresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Error create domain dom_migrate -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Migration verification for 'dom_migrate' failed -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 06_remote_live_migration.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 07_remote_offline_migration.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Apr 9 09:48:21 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 09 Apr 2009 15:18:21 +0530 Subject: [Libvirt-cim] Test Run Summary (Apr 08 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49DDC465.9050600@linux.vnet.ibm.com> ================================================= Test Run Summary (Apr 08 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 662 Cimtest changeset: a2c6bcec55c1 ================================================= FAIL : 5 XFAIL : 1 SKIP : 15 PASS : 129 ----------------- Total : 150 ================================================= FAIL Test Summary: NetworkPort - 02_np_gi_errors.py: FAIL RASD - 01_verify_rasd_fields.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostedAccessPoint - 01_forward.py: SKIP HostedAccessPoint - 02_reverse.py: SKIP KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP ServiceAccessBySAP - 01_forward.py: SKIP ServiceAccessBySAP - 02_reverse.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP VirtualSystemMigrationService - 07_remote_offline_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 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - Got CIM error CIM_ERR_NOT_SUPPORTED: State not supported with return code 7 ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- HostedAccessPoint - 02_reverse.py: SKIP -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- 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: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)') -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- 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: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/00:16:3e:5d:c7:9e)') ERROR - Enum RASDs failed -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: SKIP -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.py: SKIP -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: FAIL ERROR - VirtualQuantity is 1, expected 3 ERROR - Exception: details CPU scheduling not set properly for the dom: procrasd_persist_dom -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 17_removeresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - JobStatus for dom 'dom_migrate' has 'Migration Failed' instead of 'Completed' Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Migration timed out.... ERROR - Increase timeout > 50 and try again.. -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 07_remote_offline_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 -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Apr 9 17:28:57 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 09 Apr 2009 10:28:57 -0700 Subject: [Libvirt-cim] [PATCH] Add logic to delete storage pools Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1239296847 25200 # Node ID cdf4fa212c15f1b22b0b4b1d1535e1716e1e52d2 # Parent 3b7ba02cd34a4b91903e4d412fc7d5dd75779598 Add logic to delete storage pools. Older versions of libvirt don't support storage pool creation / deletion. So the pool deletion logic needs to return a different error message in the case of older versions. Signed-off-by: Kaitlin Rupert diff -r 3b7ba02cd34a -r cdf4fa212c15 libxkutil/pool_parsing.c --- a/libxkutil/pool_parsing.c Tue Apr 07 21:54:43 2009 -0300 +++ b/libxkutil/pool_parsing.c Thu Apr 09 10:07:27 2009 -0700 @@ -138,9 +138,32 @@ err1: virNetworkFree(ptr); + + } else if (res_type == CIM_RES_TYPE_DISK) { +#if VIR_USE_LIBVIRT_STORAGE + virStoragePoolPtr ptr = virStoragePoolLookupByName(conn, name); + if (ptr == NULL) { + CU_DEBUG("Storage pool %s is not defined", name); + return 0; + } + + if (virStoragePoolDestroy(ptr) != 0) { + CU_DEBUG("Unable to destroy storage pool"); + goto err2; + } + + if (virStoragePoolUndefine(ptr) != 0) { + CU_DEBUG("Unable to undefine storage pool"); + goto err2; + } + + ret = 1; + + err2: + virStoragePoolFree(ptr); +#endif } - return ret; } diff -r 3b7ba02cd34a -r cdf4fa212c15 src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Tue Apr 07 21:54:43 2009 -0300 +++ b/src/Virt_ResourcePoolConfigurationService.c Thu Apr 09 10:07:27 2009 -0700 @@ -139,6 +139,18 @@ return msg; } + +static const char *_delete_pool(virConnectPtr conn, + const char *pool_name, + uint16_t type) +{ + const char *msg = NULL; + + if (destroy_pool(conn, pool_name, type) == 0) + msg = "Unable to destroy resource pool"; + + return msg; +} #else static const char *disk_rasd_to_pool(CMPIInstance *inst, struct virt_pool *pool, @@ -146,6 +158,13 @@ { return "Storage pool creation not supported in this version of libvirt"; } + +static const char *_delete_pool(virConnectPtr conn, + const char *pool_name, + uint16_t type) +{ + return "Storage pool deletion not supported in this version of libvirt"; +} #endif static const char *rasd_to_vpool(CMPIInstance *inst, @@ -379,6 +398,7 @@ CMPIObjectPath *pool = NULL; virConnectPtr conn = NULL; const char *poolid = NULL; + const char *msg = NULL; char *pool_name = NULL; uint16_t type; @@ -432,10 +452,12 @@ goto out; } - if (destroy_pool(conn, pool_name, type) == 0) { + msg = _delete_pool(conn, pool_name, type); + if (msg != NULL) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, - "Unable to destroy resource pool"); + "Storage pool deletion error: %s", msg); + goto out; } From kaitlin at linux.vnet.ibm.com Thu Apr 9 23:27:41 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 09 Apr 2009 16:27:41 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] Clean up leaks, ensure libvirt pointers are properly freed Message-ID: These fixes resolve an occasional hang and and recv error messages seen when running with upstream libvirt. The recv error message is the same one seen in the test run from March 25th on KVM on Fedora rawhide: "libvir: Remote error : cannot recv data: Connection reset by peer" From kaitlin at linux.vnet.ibm.com Thu Apr 9 23:27:43 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 09 Apr 2009 16:27:43 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Fix spots where virConnectPtr isn't being closed properly In-Reply-To: References: Message-ID: <2e7cebb8a166483d9997.1239319663@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1238622609 25200 # Node ID 2e7cebb8a166483d9997becd030666166631c301 # Parent 58ebddb9670798102bf8fcd4d47a6137b0779571 Fix spots where virConnectPtr isn't being closed properly Signed-off-by: Kaitlin Rupert diff -r 58ebddb96707 -r 2e7cebb8a166 src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Wed Apr 08 22:12:21 2009 -0400 +++ b/src/Virt_KVMRedirectionSAP.c Wed Apr 01 14:50:09 2009 -0700 @@ -269,7 +269,7 @@ struct inst_list *list) { CMPIStatus s = {CMPI_RC_OK, NULL}; - virConnectPtr conn; + virConnectPtr conn = NULL; virDomainPtr *domain_list; struct domain *dominfo = NULL; struct vnc_ports port_list; @@ -364,6 +364,7 @@ } free(port_list.list); + virConnectClose(conn); return s; } diff -r 58ebddb96707 -r 2e7cebb8a166 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Apr 08 22:12:21 2009 -0400 +++ b/src/Virt_SettingsDefineCapabilities.c Wed Apr 01 14:50:09 2009 -0700 @@ -374,6 +374,7 @@ ret = true; out: + virConnectClose(conn); return ret; } @@ -702,7 +703,7 @@ bool ret = false; const char *inst_id; CMPIrc prop_ret; - virConnectPtr conn; + virConnectPtr conn = NULL; CMPIInstance *pool_inst; if (cu_get_str_path(ref, "InstanceID", &inst_id) != CMPI_RC_OK) { @@ -738,6 +739,7 @@ ret = true; out: + virConnectClose(conn); return ret; } diff -r 58ebddb96707 -r 2e7cebb8a166 src/Virt_VSSD.c --- a/src/Virt_VSSD.c Wed Apr 08 22:12:21 2009 -0400 +++ b/src/Virt_VSSD.c Wed Apr 01 14:50:09 2009 -0700 @@ -238,6 +238,7 @@ out: free(list); + virConnectClose(conn); return s; } diff -r 58ebddb96707 -r 2e7cebb8a166 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Apr 08 22:12:21 2009 -0400 +++ b/src/Virt_VirtualSystemManagementService.c Wed Apr 01 14:50:09 2009 -0700 @@ -969,7 +969,7 @@ CMPI_RC_ERR_FAILED, conn, "Failed to define domain"); - return NULL; + goto out; } name = virDomainGetName(dom); @@ -982,6 +982,7 @@ "Failed to lookup resulting system"); } + out: virDomainFree(dom); virConnectClose(conn); From kaitlin at linux.vnet.ibm.com Thu Apr 9 23:27:44 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 09 Apr 2009 16:27:44 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] Fix places where virDomainPtr aren't properly freed In-Reply-To: References: Message-ID: <8d0ce3b79aaacde9a7b2.1239319664@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1239243762 14400 # Node ID 8d0ce3b79aaacde9a7b25d8e2fe2eb79878229ee # Parent 2e7cebb8a166483d9997becd030666166631c301 Fix places where virDomainPtr aren't properly freed. diff -r 2e7cebb8a166 -r 8d0ce3b79aaa src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Wed Apr 01 14:50:09 2009 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Wed Apr 08 22:22:42 2009 -0400 @@ -374,7 +374,7 @@ CMPIInstance **_inst) { virConnectPtr conn; - virDomainPtr dom; + virDomainPtr dom = NULL; CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; struct domain *dominfo = NULL; @@ -445,14 +445,13 @@ inst = get_console_sap(broker, ref, conn, port, &s); - virDomainFree(dom); - if (s.rc != CMPI_RC_OK) goto out; *_inst = inst; out: + virDomainFree(dom); virConnectClose(conn); if (port != NULL) free(port->name); diff -r 2e7cebb8a166 -r 8d0ce3b79aaa src/Virt_RASD.c --- a/src/Virt_RASD.c Wed Apr 01 14:50:09 2009 -0700 +++ b/src/Virt_RASD.c Wed Apr 08 22:22:42 2009 -0400 @@ -63,12 +63,17 @@ struct virt_device **list) { virDomainPtr dom; + int count = 0; dom = virDomainLookupByName(conn, host); if (dom == NULL) return 0; - return get_devices(dom, list, type); + count = get_devices(dom, list, type); + + virDomainFree(dom); + + return count; } static struct virt_device *find_dev(virConnectPtr conn, @@ -703,6 +708,7 @@ out: virConnectClose(conn); + free(domains); return s; } From kaitlin at linux.vnet.ibm.com Thu Apr 9 23:27:42 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 09 Apr 2009 16:27:42 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Free virStorageVolPtr in disk_template() in SDC In-Reply-To: References: Message-ID: <58ebddb9670798102bf8.1239319662@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1239243141 14400 # Node ID 58ebddb9670798102bf8fcd4d47a6137b0779571 # Parent cdf4fa212c15f1b22b0b4b1d1535e1716e1e52d2 Free virStorageVolPtr in disk_template() in SDC Need to free the pointer each time through the loop. diff -r cdf4fa212c15 -r 58ebddb96707 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Thu Apr 09 10:07:27 2009 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Wed Apr 08 22:12:21 2009 -0400 @@ -1014,6 +1014,9 @@ } s = volume_template(ref, template_type, volptr, list); + + virStorageVolFree(volptr); + if (s.rc != CMPI_RC_OK) goto out; } @@ -1024,7 +1027,6 @@ free(pfx); free(volnames); free(host); - virStorageVolFree(volptr); virStoragePoolFree(poolptr); virConnectClose(conn); From yunguol at cn.ibm.com Fri Apr 10 02:07:24 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 10 Apr 2009 10:07:24 +0800 Subject: [Libvirt-cim] Test Run Summary (Apr 10 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus Message-ID: ================================================= Test Run Summary (Apr 10 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus ================================================= Distro: Fedora release 10.90 (Rawhide) Kernel: 2.6.29-0.24.rc0.git13.fc11.x86_64 libvirt: 0.6.2 Hypervisor: QEMU 0.10.0 CIMOM: Pegasus 2.7.2 Libvirt-cim revision: 852 Libvirt-cim changeset: 8d0ce3b79aaa Cimtest revision: 663 Cimtest changeset: 6027a48279e6 ================================================= FAIL : 5 XFAIL : 4 SKIP : 8 PASS : 133 ----------------- Total : 150 ================================================= FAIL Test Summary: HostSystem - 03_hs_to_settdefcap.py: FAIL KVMRedirectionSAP - 01_enum_KVMredSAP.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 ================================================= 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 CIM_ERR_FAILED: 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): CIM_ERR_FAILED: 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 CIM_ERR_NOT_SUPPORTED: State not supported with return code 7 ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: 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: PASS -------------------------------------------------------------------- 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 40 RASD objects instead of 8 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain: internal error unable to start guest: char device redirected to /dev/pts/3 inet_listen: bind(ipv4,127.0.0.1,5989): Address already in use inet_listen: FAILED with return code 1 ERROR - Exception details: 'ElementName' Value Mismatch, Expected 5989:0, Got 5989:-1 ERROR - Exception: Failed to verify information for running dom:test_kvmredsap_dom InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain: internal error unable to start guest: char device redirected to /dev/pts/3 inet_listen: bind(ipv4,127.0.0.1,5989): Address already in use inet_listen: FAILED -------------------------------------------------------------------- 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 CIM_ERR_INVALID_PARAMETER InvokeMethod(CreateChildResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - Unexpected rc code 4 and description CIM_ERR_INVALID_PARAMETER InvokeMethod(DeleteResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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 36 ResourcePool objects instead of 8 -------------------------------------------------------------------- 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 CIM_ERR_NOT_FOUND: 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Apr 10 08:10:40 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 10 Apr 2009 16:10:40 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add branch of err code to RPCS/04 In-Reply-To: <49D405D4.8010200@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-04-02 08:24:52: > > 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 = pywbem.CIM_ERR_INVALID_PARAMETER > > + else: > > + cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED > > try: > > rpcs_conn.CreateChildResourcePool() > > except pywbem.CIMError, (err_no, desc): > > Sorry Daisy, I didn't have a chance to look at the first revision. > > Agreed - you need to branch this test. However, this method is now > supported. So, for libvirt-cim >= 837, this test should attempt to > create network pool and verify that network pool is created. There are three arguments in CreateChildResourcePool: ElementName, Settings and ParentPool. What's the ParentPool on cimtest? Do I have to create a primordial pool at first? One more thing, the provider only support create networkpool now, right? Thanks! > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 13 02:10:54 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 13 Apr 2009 10:10:54 +0800 Subject: [Libvirt-cim] Test Run Summary (Apr 13 2009): KVM on Fedora release 10 (Cambridge) with sfcb Message-ID: ================================================= Test Run Summary (Apr 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: 848 Libvirt-cim changeset: 3b7ba02cd34a Cimtest revision: 663 Cimtest changeset: 6027a48279e6 ================================================= FAIL : 5 XFAIL : 4 SKIP : 8 PASS : 133 ----------------- Total : 150 ================================================= 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 ================================================= 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 56 RASD objects instead of 8 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 -------------------------------------------------------------------- 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 52 ResourcePool objects instead of 8 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 13 03:18:47 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 12 Apr 2009 20:18:47 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix 03_hs_to_settdefcap.py with the provider's changes of the output of ac association when using DiskPool as input Message-ID: <9ed17bb61735ba341a32.1239592727@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1239592696 25200 # Node ID 9ed17bb61735ba341a323e1c2c105ae9091cf235 # Parent 6027a48279e6daff21453a30b3749a0b79218c8a [TEST] Fix 03_hs_to_settdefcap.py with the provider's changes of the output of ac association when using DiskPool as input Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r 6027a48279e6 -r 9ed17bb61735 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue Apr 07 06:29:37 2009 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Sun Apr 12 20:18:16 2009 -0700 @@ -57,6 +57,7 @@ test_vcpus = 1 libvirt_rasd_template_changes = 707 libvirt_rasd_new_changes = 805 +libvirt_ac_diskpool_changes = 839 def setup_env(server, virt="Xen"): status = PASS @@ -227,8 +228,11 @@ if curr_cim_rev >= libvirt_rasd_new_changes: exp_len = 16 if virt == 'KVM': - if curr_cim_rev >= libvirt_rasd_new_changes: + if curr_cim_rev >= libvirt_rasd_new_changes and \ + curr_cim_rev < libvirt_ac_diskpool_changes: exp_len = 8 + else: + exp_len = 56 if len(assoc_info) != exp_len: logger.error("'%s' returned %i RASD objects instead of %i", From deeptik at linux.vnet.ibm.com Mon Apr 13 05:34:32 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Apr 2009 11:04:32 +0530 Subject: [Fwd: [Libvirt-cim] [PATCH] [TEST] Adding check_mig_support() to vsmigration.py [Rebased Patch]] Message-ID: <49E2CEE8.6000101@linux.vnet.ibm.com> Kaitlin/Daisy/Richard, Did you get a chance to look at these changes.. I do not see them applied in the tree either.. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com -------------- next part -------------- An embedded message was scrubbed... From: "Deepti B. Kalakeri" Subject: [Libvirt-cim] [PATCH] [TEST] Adding check_mig_support() to vsmigration.py [Rebased Patch] Date: Wed, 08 Apr 2009 22:23:34 -0700 Size: 7365 URL: -------------- next part -------------- An embedded message was scrubbed... From: "Deepti B. Kalakeri" Subject: [Libvirt-cim] [PATCH] [TEST] #2 Adding new tc to cover restart and resume migration scenarios Date: Wed, 08 Apr 2009 02:05:32 -0700 Size: 13734 URL: From yunguol at cn.ibm.com Mon Apr 13 06:24:09 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 13 Apr 2009 14:24:09 +0800 Subject: [Libvirt-cim] Test Run Summary (Apr 13 2009): KVM on Fedora release 10 (Cambridge) with sfcb Message-ID: ================================================= Test Run Summary (Apr 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: 848 Libvirt-cim changeset: 3b7ba02cd34a Cimtest revision: 663 Cimtest changeset: 6027a48279e6 ================================================= FAIL : 5 XFAIL : 4 SKIP : 8 PASS : 133 ----------------- Total : 150 ================================================= 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 ================================================= 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 56 RASD objects instead of 8 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 -------------------------------------------------------------------- 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 52 ResourcePool objects instead of 8 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 13 06:43:30 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 13 Apr 2009 14:43:30 +0800 Subject: [Libvirt-cim] Test Run Summary (Apr 13 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus Message-ID: ================================================= Test Run Summary (Apr 13 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus ================================================= Distro: Fedora release 10.90 (Rawhide) Kernel: 2.6.29-0.24.rc0.git13.fc11.x86_64 libvirt: 0.6.2 Hypervisor: QEMU 0.10.0 CIMOM: Pegasus 2.7.2 Libvirt-cim revision: 848 Libvirt-cim changeset: 3b7ba02cd34a Cimtest revision: 663 Cimtest changeset: 6027a48279e6 ================================================= FAIL : 4 XFAIL : 4 SKIP : 9 PASS : 133 ----------------- Total : 150 ================================================= FAIL Test Summary: 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 HostSystem - 05_hs_gi_errs.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 ================================================= 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 CIM_ERR_FAILED: 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): CIM_ERR_FAILED: 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 CIM_ERR_NOT_SUPPORTED: State not supported with return code 7 ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: 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: PASS -------------------------------------------------------------------- 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 40 RASD objects instead of 8 -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: SKIP -------------------------------------------------------------------- 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 CIM_ERR_INVALID_PARAMETER InvokeMethod(CreateChildResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - Unexpected rc code 4 and description CIM_ERR_INVALID_PARAMETER InvokeMethod(DeleteResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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 36 ResourcePool objects instead of 8 -------------------------------------------------------------------- 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 CIM_ERR_NOT_FOUND: 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaitlin at linux.vnet.ibm.com Mon Apr 13 19:39:26 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 13 Apr 2009 12:39:26 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add branch of err code to RPCS/04 In-Reply-To: <49E3924C.3010104@us.ibm.com> References: <49E3924C.3010104@us.ibm.com> Message-ID: <49E394EE.5020904@linux.vnet.ibm.com> > > supported. So, for libvirt-cim >= 837, this test should attempt to > > create network pool and verify that network pool is created. > > There are three arguments in CreateChildResourcePool: > ElementName, Settings and ParentPool. > What's the ParentPool on cimtest? Do I have to create a primordial > pool at first? Right now, the providers ignore the value specified for the ParentPool. Support for ParentPool still needs to be added. > > One more thing, the provider only support create networkpool now, > right? > > Creating network pools and directory based storage pools is supported. From kaitlin at linux.vnet.ibm.com Mon Apr 13 19:40:59 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 13 Apr 2009 12:40:59 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix 03_hs_to_settdefcap.py with the provider's changes of the output of ac association when using DiskPool as input In-Reply-To: <49E392B9.3030900@us.ibm.com> References: <9ed17bb61735ba341a32.1239592727@elm3b197.beaverton.ibm.com> <49E392B9.3030900@us.ibm.com> Message-ID: <49E3954B.7020402@linux.vnet.ibm.com> > diff -r 6027a48279e6 -r 9ed17bb61735 > suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py > --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue > Apr 07 06:29:37 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Sun > Apr 12 20:18:16 2009 -0700 > @@ -57,6 +57,7 @@ > test_vcpus = 1 > libvirt_rasd_template_changes = 707 > libvirt_rasd_new_changes = 805 > +libvirt_ac_diskpool_changes = 839 > > def setup_env(server, virt="Xen"): > status = PASS > @@ -227,8 +228,11 @@ > if curr_cim_rev >= libvirt_rasd_new_changes: > exp_len = 16 > if virt == 'KVM': > - if curr_cim_rev >= libvirt_rasd_new_changes: > + if curr_cim_rev >= libvirt_rasd_new_changes and \ > + curr_cim_rev < libvirt_ac_diskpool_changes: > exp_len = 8 > + else: > + exp_len = 56 > The number of DiskRASDs returned will depend on the number of images in the storage pool. Instead of hardcoding this number, you'll need to query libvirt to see how many volumes are in the pool. From tyreld at us.ibm.com Tue Apr 14 01:14:12 2009 From: tyreld at us.ibm.com (Tyrel Datwyler) Date: Mon, 13 Apr 2009 18:14:12 -0700 Subject: [Libvirt-cim] virNodeGetFreeMemory() returns bytes with Xen driver Message-ID: The libvirt API states that the return value of virNodeGetFreeMemory() is in kilobytes. When making this call against a Xen hypervisor and comparing the returned value with what is listed by "xm info" it appears that libvirt is returning the free memory in bytes and not kilobytes. Can anybody confirm this behavior? This code snippet: conn = virConnectOpen("xen:///localhost/"); hostmem = virNodeGetFreeMemory(conn); fprintf(stdout, "Host free memory = %llu\n", hostmem); produces the following output: Host free memory = 3236012032 The following comes from running "xm info" on the Xen host: free_memory : 3086 The libvirt value is convertable into the "xm" returned value if bytes is assumed. Regards, Tyrel Datwyler Linux Software Engineer eServer Systems Management IBM Systems and Technology Group Email: tyreld at us.ibm.com External: (503) 578-3489, T/L: 775-3489 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Tue Apr 14 05:47:54 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 14 Apr 2009 13:47:54 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add branch of err code to RPCS/04 In-Reply-To: <49E394EE.5020904@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-04-14 03:39:26: > > > supported. So, for libvirt-cim >= 837, this test should attempt to > > > create network pool and verify that network pool is created. > > > > There are three arguments in CreateChildResourcePool: > > ElementName, Settings and ParentPool. > > What's the ParentPool on cimtest? Do I have to create a primordial > > pool at first? > > Right now, the providers ignore the value specified for the ParentPool. > Support for ParentPool still needs to be added. Kaitlin, I'm sorry to say that the patch is delayed and is not send out yet. I'm working a new feature on another project these two days. Not only 04_CreateChildResourcePool.py, but also 03_CreateResourcePool.py has to be updated with network pool creation and verification. I've updated these on the cimtest wiki and plan to complete them by the end of April 20th. Sorry for my late response =) Thanks! > > > > > One more thing, the provider only support create networkpool now, > > right? > > > > > Creating network pools and directory based storage pools is supported. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmaciel at linux.vnet.ibm.com Tue Apr 14 12:17:28 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 14 Apr 2009 09:17:28 -0300 Subject: [Libvirt-cim] [PATCH 0 of 3] Clean up leaks, ensure libvirt pointers are properly freed In-Reply-To: References: Message-ID: <49E47ED8.90301@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > These fixes resolve an occasional hang and and recv error messages seen when > running with upstream libvirt. > > The recv error message is the same one seen in the test run from March 25th on > KVM on Fedora rawhide: > > "libvir: Remote error : cannot recv data: Connection reset by peer" > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Apr 14 15:12:54 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 14 Apr 2009 08:12:54 -0700 Subject: [Libvirt-cim] [PATCH] Pass OP with root/virt NS to get_host() in ECTP Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1239679403 25200 # Node ID c9160bb4698b629c7832efcd32f6641fd74449de # Parent 8d0ce3b79aaacde9a7b25d8e2fe2eb79878229ee Pass OP with root/virt NS to get_host() in ECTP When calling get_host() in ECTP, be sure to pass object path with root/virt namespace instead of root/interop. get_host() uses the namespace of the ref when creating the instance, so this needs to be set properly. Signed-off-by: Kaitlin Rupert diff -r 8d0ce3b79aaa -r c9160bb4698b src/Virt_ElementConformsToProfile.c --- a/src/Virt_ElementConformsToProfile.c Wed Apr 08 22:22:42 2009 -0400 +++ b/src/Virt_ElementConformsToProfile.c Mon Apr 13 20:23:23 2009 -0700 @@ -64,15 +64,7 @@ if (class == NULL) return s; - if (STREQC(class, "HostSystem")) { - s = get_host(_BROKER, info->context, ref, &inst, false); - if (s.rc == CMPI_RC_OK) - inst_list_add(list, inst); - goto out; - } - - classname = get_typed_class(pfx_from_conn(conn), - class); + classname = get_typed_class(pfx_from_conn(conn), class); if (classname == NULL) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -83,7 +75,14 @@ op = CMNewObjectPath(_BROKER, CIM_VIRT_NS, classname, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullObject(op)) goto out; - + + if (STREQC(class, "HostSystem")) { + s = get_host(_BROKER, info->context, op, &inst, false); + if (s.rc == CMPI_RC_OK) + inst_list_add(list, inst); + goto out; + } + en = CBEnumInstances(_BROKER, info->context , op, info->properties, &s); if (en == NULL) { cu_statusf(_BROKER, &s, From kaitlin at linux.vnet.ibm.com Tue Apr 14 15:12:10 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 14 Apr 2009 08:12:10 -0700 Subject: [Libvirt-cim] virNodeGetFreeMemory() returns bytes with Xen driver In-Reply-To: References: Message-ID: <49E4A7CA.4030202@linux.vnet.ibm.com> Hi Tyrel, My guess is that the libvirt documentation is incorrect. I would follow up with the libvirt devs on libvir-list at redhat.com to be sure though. Tyrel Datwyler wrote: > > The libvirt API states that the return value of virNodeGetFreeMemory() > is in kilobytes. When making this call against a Xen hypervisor and > comparing the returned value with what is listed by "xm info" it > appears that libvirt is returning the free memory in bytes and not > kilobytes. Can anybody confirm this behavior? > > This code snippet: > > conn = virConnectOpen("xen:///localhost/"); > hostmem = virNodeGetFreeMemory(conn); > fprintf(stdout, "Host free memory = %llu\n", hostmem); > > produces the following output: > > Host free memory = 3236012032 > > The following comes from running "xm info" on the Xen host: > > free_memory : 3086 > > The libvirt value is convertable into the "xm" returned value if bytes > is assumed. > > Regards, > > Tyrel Datwyler > > Linux Software Engineer > eServer Systems Management > IBM Systems and Technology Group > Email: tyreld at us.ibm.com > External: (503) 578-3489, T/L: 775-3489 > > ------------------------------------------------------------------------ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From rmaciel at linux.vnet.ibm.com Tue Apr 14 20:59:25 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 14 Apr 2009 17:59:25 -0300 Subject: [Libvirt-cim] [PATCH] Add logic to delete storage pools In-Reply-To: References: Message-ID: <49E4F92D.2090002@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1239296847 25200 > # Node ID cdf4fa212c15f1b22b0b4b1d1535e1716e1e52d2 > # Parent 3b7ba02cd34a4b91903e4d412fc7d5dd75779598 > Add logic to delete storage pools. > > Older versions of libvirt don't support storage pool creation / deletion. So > the pool deletion logic needs to return a different error message in the case > of older versions. > > Signed-off-by: Kaitlin Rupert > > diff -r 3b7ba02cd34a -r cdf4fa212c15 libxkutil/pool_parsing.c > --- a/libxkutil/pool_parsing.c Tue Apr 07 21:54:43 2009 -0300 > +++ b/libxkutil/pool_parsing.c Thu Apr 09 10:07:27 2009 -0700 > @@ -138,9 +138,32 @@ > > err1: > virNetworkFree(ptr); > + > + } else if (res_type == CIM_RES_TYPE_DISK) { > +#if VIR_USE_LIBVIRT_STORAGE > + virStoragePoolPtr ptr = virStoragePoolLookupByName(conn, name); > + if (ptr == NULL) { > + CU_DEBUG("Storage pool %s is not defined", name); > + return 0; > + } > + > + if (virStoragePoolDestroy(ptr) != 0) { > + CU_DEBUG("Unable to destroy storage pool"); > + goto err2; > + } > + > + if (virStoragePoolUndefine(ptr) != 0) { > + CU_DEBUG("Unable to undefine storage pool"); > + goto err2; > + } > + > + ret = 1; > + > + err2: > + virStoragePoolFree(ptr); > +#endif > } > > - > return ret; > } > > diff -r 3b7ba02cd34a -r cdf4fa212c15 src/Virt_ResourcePoolConfigurationService.c > --- a/src/Virt_ResourcePoolConfigurationService.c Tue Apr 07 21:54:43 2009 -0300 > +++ b/src/Virt_ResourcePoolConfigurationService.c Thu Apr 09 10:07:27 2009 -0700 > @@ -139,6 +139,18 @@ > return msg; > > } > + > +static const char *_delete_pool(virConnectPtr conn, > + const char *pool_name, > + uint16_t type) > +{ > + const char *msg = NULL; > + > + if (destroy_pool(conn, pool_name, type) == 0) > + msg = "Unable to destroy resource pool"; > + > + return msg; > +} > #else > static const char *disk_rasd_to_pool(CMPIInstance *inst, > struct virt_pool *pool, > @@ -146,6 +158,13 @@ > { > return "Storage pool creation not supported in this version of libvirt"; > } > + > +static const char *_delete_pool(virConnectPtr conn, > + const char *pool_name, > + uint16_t type) > +{ > + return "Storage pool deletion not supported in this version of libvirt"; > +} > #endif > > static const char *rasd_to_vpool(CMPIInstance *inst, > @@ -379,6 +398,7 @@ > CMPIObjectPath *pool = NULL; > virConnectPtr conn = NULL; > const char *poolid = NULL; > + const char *msg = NULL; > char *pool_name = NULL; > uint16_t type; > > @@ -432,10 +452,12 @@ > goto out; > } > > - if (destroy_pool(conn, pool_name, type) == 0) { > + msg = _delete_pool(conn, pool_name, type); > + if (msg != NULL) { > cu_statusf(_BROKER, &s, > CMPI_RC_ERR_FAILED, > - "Unable to destroy resource pool"); > + "Storage pool deletion error: %s", msg); > + > goto out; > } > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Wed Apr 15 19:20:53 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 15 Apr 2009 16:20:53 -0300 Subject: [Libvirt-cim] [PATCH] Pass OP with root/virt NS to get_host() in ECTP In-Reply-To: References: Message-ID: <49E63395.2010702@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1239679403 25200 > # Node ID c9160bb4698b629c7832efcd32f6641fd74449de > # Parent 8d0ce3b79aaacde9a7b25d8e2fe2eb79878229ee > Pass OP with root/virt NS to get_host() in ECTP > > When calling get_host() in ECTP, be sure to pass object path with root/virt > namespace instead of root/interop. get_host() uses the namespace of the ref > when creating the instance, so this needs to be set properly. > > Signed-off-by: Kaitlin Rupert > > diff -r 8d0ce3b79aaa -r c9160bb4698b src/Virt_ElementConformsToProfile.c > --- a/src/Virt_ElementConformsToProfile.c Wed Apr 08 22:22:42 2009 -0400 > +++ b/src/Virt_ElementConformsToProfile.c Mon Apr 13 20:23:23 2009 -0700 > @@ -64,15 +64,7 @@ > if (class == NULL) > return s; > > - if (STREQC(class, "HostSystem")) { > - s = get_host(_BROKER, info->context, ref, &inst, false); > - if (s.rc == CMPI_RC_OK) > - inst_list_add(list, inst); > - goto out; > - } > - > - classname = get_typed_class(pfx_from_conn(conn), > - class); > + classname = get_typed_class(pfx_from_conn(conn), class); > if (classname == NULL) { > cu_statusf(_BROKER, &s, > CMPI_RC_ERR_FAILED, > @@ -83,7 +75,14 @@ > op = CMNewObjectPath(_BROKER, CIM_VIRT_NS, classname, &s); > if ((s.rc != CMPI_RC_OK) || CMIsNullObject(op)) > goto out; > - > + > + if (STREQC(class, "HostSystem")) { > + s = get_host(_BROKER, info->context, op, &inst, false); > + if (s.rc == CMPI_RC_OK) > + inst_list_add(list, inst); > + goto out; > + } > + > en = CBEnumInstances(_BROKER, info->context , op, info->properties, &s); > if (en == NULL) { > cu_statusf(_BROKER, &s, > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Apr 15 23:11:43 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 15 Apr 2009 16:11:43 -0700 Subject: [Libvirt-cim] Release of libvirt-cim 0.5.5 Message-ID: <49E669AF.8030005@linux.vnet.ibm.com> A new release of libvirt-cim is now available at: ftp://libvirt.org/libvirt-cim/ * Features: - Basic network pool creation and deletion - Basic storage pool creation and deletion (directory pools only) - Storage volumes in a pool represented as template ResourceAllocationSettingData - Advertise profiles via SLP * Bug fixes: - Improved reporting: libvirt error is now included in error message returned to the user - ElementConformsToProfile association now supports the RegisteredProfile <--> AllocationCapabilities - Prevent seg fault in get_typed_class() by returning is a NULL value is specified for refcn - Fix xmlgen so XML isn't generated for devices with an UNKNOWN device type - Set the device type of a resource to UNKNOWN after the call to detach_device(), otherwise detach_device() doesn't know what device type to handle - Allow user to specify guest's emulator and expose emulator via the guest's VirtualSystemSettingData - Improve randomization of MAC generation - Determine whether the host system supports KVM or QEMU guests. If KVM support is available, create a KVM guest. Otherwise, create a QEMU guest. - Fix some connection leaks and some libvirt pointer leaks - Be sure to specify the root/virt namespace (instead of root/interop) in ElementConformsToProfile when building the instance of HostSystem From yunguol at cn.ibm.com Thu Apr 16 02:32:53 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Apr 2009 19:32:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Fix 03_hs_to_settdefcap.py with the provider's changes of the output of ac association when using DiskPool as input Message-ID: <7b81278fbdd9d4337ac7.1239849173@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1239849166 25200 # Node ID 7b81278fbdd9d4337ac7422e98bcfebc93b70e64 # Parent 4ec367c94c356de7fac5a19ffe215c316d0cdcd1 [TEST]#2 Fix 03_hs_to_settdefcap.py with the provider's changes of the output of ac association when using DiskPool as input Updates from 1 to 2: Query libvirt to get the number of DiskRASD instances and then compare to the result Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r 4ec367c94c35 -r 7b81278fbdd9 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Apr 08 02:22:53 2009 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Apr 15 19:32:46 2009 -0700 @@ -40,7 +40,9 @@ # Feb 13 2008 import sys -from VirtLib.live import full_hostname +from VirtLib.live import full_hostname +from VirtLib.utils import run_remote +from XenKvmLib.xm_virt_util import virt2uri from XenKvmLib.common_util import get_host_info from XenKvmLib.assoc import Associators from XenKvmLib.vxml import XenXML, KVMXML, get_class @@ -57,6 +59,7 @@ test_vcpus = 1 libvirt_rasd_template_changes = 707 libvirt_rasd_new_changes = 805 +libvirt_rasd_dpool_changes = 839 def setup_env(server, virt="Xen"): status = PASS @@ -216,6 +219,16 @@ curr_cim_rev, changeset = get_provider_version(virt, server) exp_len = 4 + + volume = 0 + cmd = "virsh -c %s vol-list %s" % (virt2uri(server), 'cimtest-diskpool') + ret, out = run_remote(server ,cmd) + if ret != 0: + return None + lines = out.split("\n") + for line in lines: + volume = volume + 1 + if 'DiskPool' in ap['InstanceID']: # For Diskpool, we have info 1 for each of Min, Max, # default, Increment and 1 for each of PV and FV @@ -227,8 +240,11 @@ if curr_cim_rev >= libvirt_rasd_new_changes: exp_len = 16 if virt == 'KVM': - if curr_cim_rev >= libvirt_rasd_new_changes: + if curr_cim_rev >= libvirt_rasd_new_changes and \ + curr_cim_rev < libvirt_rasd_dpool_changes: exp_len = 8 + if curr_cim_rev >= libvirt_rasd_dpool_changes: + exp_len = volume if len(assoc_info) != exp_len: logger.error("'%s' returned %i RASD objects instead of %i", From yunguol at cn.ibm.com Thu Apr 16 02:52:05 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 16 Apr 2009 10:52:05 +0800 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Fix 03_hs_to_settdefcap.py with the provider's changes of the output of ac association when using DiskPool as input In-Reply-To: <7b81278fbdd9d4337ac7.1239849173@elm3b197.beaverton.ibm.com> Message-ID: Please ignore this patch. I will send a new patch. Thanks! Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 Guo Lian Yun/China/IBM at IBMCN Sent by: libvirt-cim-bounces at redhat.com 2009-04-16 10:32 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH] [TEST]#2 Fix 03_hs_to_settdefcap.py with the provider's changes of the output of ac association when using DiskPool as input # HG changeset patch # User Guolian Yun # Date 1239849166 25200 # Node ID 7b81278fbdd9d4337ac7422e98bcfebc93b70e64 # Parent 4ec367c94c356de7fac5a19ffe215c316d0cdcd1 [TEST]#2 Fix 03_hs_to_settdefcap.py with the provider's changes of the output of ac association when using DiskPool as input Updates from 1 to 2: Query libvirt to get the number of DiskRASD instances and then compare to the result Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r 4ec367c94c35 -r 7b81278fbdd9 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Apr 08 02:22:53 2009 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Apr 15 19:32:46 2009 -0700 @@ -40,7 +40,9 @@ # Feb 13 2008 import sys -from VirtLib.live import full_hostname +from VirtLib.live import full_hostname +from VirtLib.utils import run_remote +from XenKvmLib.xm_virt_util import virt2uri from XenKvmLib.common_util import get_host_info from XenKvmLib.assoc import Associators from XenKvmLib.vxml import XenXML, KVMXML, get_class @@ -57,6 +59,7 @@ test_vcpus = 1 libvirt_rasd_template_changes = 707 libvirt_rasd_new_changes = 805 +libvirt_rasd_dpool_changes = 839 def setup_env(server, virt="Xen"): status = PASS @@ -216,6 +219,16 @@ curr_cim_rev, changeset = get_provider_version(virt, server) exp_len = 4 + + volume = 0 + cmd = "virsh -c %s vol-list %s" % (virt2uri(server), 'cimtest-diskpool') + ret, out = run_remote(server ,cmd) + if ret != 0: + return None + lines = out.split("\n") + for line in lines: + volume = volume + 1 + if 'DiskPool' in ap['InstanceID']: # For Diskpool, we have info 1 for each of Min, Max, # default, Increment and 1 for each of PV and FV @@ -227,8 +240,11 @@ if curr_cim_rev >= libvirt_rasd_new_changes: exp_len = 16 if virt == 'KVM': - if curr_cim_rev >= libvirt_rasd_new_changes: + if curr_cim_rev >= libvirt_rasd_new_changes and \ + curr_cim_rev < libvirt_rasd_dpool_changes: exp_len = 8 + if curr_cim_rev >= libvirt_rasd_dpool_changes: + exp_len = volume if len(assoc_info) != exp_len: logger.error("'%s' returned %i RASD objects instead of %i", _______________________________________________ Libvirt-cim mailing list Libvirt-cim at redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Thu Apr 16 03:12:09 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Apr 2009 20:12:09 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix 03_hs_to_settdefcap.py with the provider's changes of the output of ac association when using DiskPool as input Message-ID: <352e8509493cfce2620b.1239851529@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1239851524 25200 # Node ID 352e8509493cfce2620bca94798a1012c63cb410 # Parent 4ec367c94c356de7fac5a19ffe215c316d0cdcd1 [TEST] #2 Fix 03_hs_to_settdefcap.py with the provider's changes of the output of ac association when using DiskPool as input Updates from 1 to 2: Query libvirt to get the number of DiskRASD instances instead of hardcode Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r 4ec367c94c35 -r 352e8509493c suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Apr 08 02:22:53 2009 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Apr 15 20:12:04 2009 -0700 @@ -51,12 +51,14 @@ from XenKvmLib.test_xml import testxml from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.const import get_provider_version +from XenKvmLib.pool import enum_volumes sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "domgst_test" test_vcpus = 1 libvirt_rasd_template_changes = 707 libvirt_rasd_new_changes = 805 +libvirt_rasd_dpool_changes = 839 def setup_env(server, virt="Xen"): status = PASS @@ -227,8 +229,12 @@ if curr_cim_rev >= libvirt_rasd_new_changes: exp_len = 16 if virt == 'KVM': - if curr_cim_rev >= libvirt_rasd_new_changes: + if curr_cim_rev >= libvirt_rasd_new_changes and \ + curr_cim_rev < libvirt_rasd_dpool_changes: exp_len = 8 + if curr_cim_rev >= libvirt_rasd_dpool_changes: + volumes = enum_volumes(virt, server) + exp_len = volumes * 4 if len(assoc_info) != exp_len: logger.error("'%s' returned %i RASD objects instead of %i", diff -r 4ec367c94c35 -r 352e8509493c suites/libvirt-cim/lib/XenKvmLib/pool.py --- a/suites/libvirt-cim/lib/XenKvmLib/pool.py Wed Apr 08 02:22:53 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/pool.py Wed Apr 15 20:12:04 2009 -0700 @@ -26,6 +26,8 @@ from XenKvmLib.classes import get_typed_class from XenKvmLib.const import get_provider_version from XenKvmLib.enumclass import EnumInstances +from VirtLib.utils import run_remote +from XenKvmLib.xm_virt_util import virt2uri input_graphics_pool_rev = 757 @@ -78,3 +80,16 @@ return pool_insts, PASS +def enum_volumes(virt, server): + volume = 0 + cmd = "virsh -c %s vol-list %s | sed -e '1,2 d' -e '$ d'" % \ + (virt2uri(virt), 'cimtest-diskpool') + ret, out = run_remote(server ,cmd) + if ret != 0: + return None + lines = out.split("\n") + for line in lines: + volume = volume + 1 + + return volume + From yunguol at cn.ibm.com Thu Apr 16 03:19:35 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Apr 2009 20:19:35 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/01_forward.py with the provider's changes of the output of ac association when using DiskPool as input Message-ID: # HG changeset patch # User Guolian Yun # Date 1239851971 25200 # Node ID de971738caf9e9b3eae3c3fe8dc65cc7114a7ff1 # Parent 4ec367c94c356de7fac5a19ffe215c316d0cdcd1 [TEST] Fix SettingsDefineCapabilities/01_forward.py with the provider's changes of the output of ac association when using DiskPool as input Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun= libvirt_rasd_new_changes: exp_len = 16 if virt == 'KVM': - if curr_cim_rev >= libvirt_rasd_new_changes: + if curr_cim_rev >= libvirt_rasd_new_changes and \ + curr_cim_rev < libvirt_rasd_dpool_changes: exp_len = 8 + if curr_cim_rev >= libvirt_rasd_dpool_changes: + volumes = enum_volumes(virt, server) + exp_len = volumes * 4 if len(assoc_info) != exp_len: logger.error("%s returned %i ResourcePool objects instead" From yunguol at cn.ibm.com Thu Apr 16 07:55:30 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Apr 2009 00:55:30 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]Update RPCS/04 to validate that the Network child pool can be created through the providers Message-ID: <860c994006a12104618e.1239868530@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1239868524 25200 # Node ID 860c994006a12104618e29bf051730993568bcc1 # Parent 4ec367c94c356de7fac5a19ffe215c316d0cdcd1 [TEST]Update RPCS/04 to validate that the Network child pool can be created through the providers Follow up patch will valide Disk child pool creation and verification in the same tc Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r 4ec367c94c35 -r 860c994006a1 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Wed Apr 08 02:22:53 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Thu Apr 16 00:55:24 2009 -0700 @@ -52,32 +52,84 @@ 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 +from pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.enumclass import EnumInstances +from XenKvmLib.common_util import destroy_netpool cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED cim_mname = "CreateChildResourcePool" +libvirt_cim_child_pool_rev = 837 +testpool = "mypool" + +def verify_pool(pool_list, poolname): + status = PASS + if len(pool_list) < 1: + logger.error("Returen %i instances, expected at least one instance", + len(pool_list)) + return FAIL + + for i in range(0, len(pool_list)): + ret_pool = pool_list[i].InstanceID + if ret_pool == poolname: + break + elif ret_pool != poolname and i == len(pool_list)-1: + logger.error("Can not find expected pool") + status = FAIL + + return status @do_main(platform_sup) def main(): 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) + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev < libvirt_cim_child_pool_rev: + 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) + return FAIL + elif curr_cim_rev >= libvirt_cim_child_pool_rev: + nprasd = get_typed_class(options.virt, + 'NetPoolResourceAllocationSettingData') + np_id = 'NetworkPool/%s' % testpool + iname = CIMInstanceName(nprasd, + namespace = 'root/virt', + keybindings = {'InstanceID':np_id}) + logger.info('iname is %s', iname) + nrasd = CIMInstance(nprasd, path = iname, + properties ={ + "Address" : "192.168.0.30", + "Netmask" : "255.255.255.0", + "IPRangeStart" : "192.168.0.31", + "IPRangeEnd" : "192.168.0.57", + "ForwardMode":"route eth1"}) + try: + rpcs_conn.CreateChildResourcePool(ElementName=testpool, + Settings=[nrasd.tomof()]) + except pywbem.CIMError, details: + logger.error("Invoke CreateChildResourcePool() error") + logger.error(details) return FAIL - - logger.error("The execution should not have reached here!!") - return FAIL + + np = get_typed_class(options.virt, 'NetworkPool') + netpool = EnumInstances(options.ip, np) + status = verify_pool(netpool, np_id) + + destroy_netpool(options.ip, options.virt, testpool) + return status + if __name__ == "__main__": sys.exit(main()) From kaitlin at linux.vnet.ibm.com Thu Apr 16 18:11:21 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Apr 2009 11:11:21 -0700 Subject: [Libvirt-cim] [PATCH] Remove ns param from rasd_to_vpool() in RPCS Message-ID: <4574c6f289f29c9afd2b.1239905481@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1239816487 25200 # Node ID 4574c6f289f29c9afd2bd3a3434360c17891e9fe # Parent 0c6f5aa107a82840acffa2e3931ddf05726c35c5 Remove ns param from rasd_to_vpool() in RPCS This parameter isn't being used by any of the functions. Signed-off-by: Kaitlin Rupert diff -r 0c6f5aa107a8 -r 4574c6f289f2 src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Thu Apr 09 10:07:27 2009 -0700 +++ b/src/Virt_ResourcePoolConfigurationService.c Wed Apr 15 10:28:07 2009 -0700 @@ -78,8 +78,7 @@ } static const char *net_rasd_to_pool(CMPIInstance *inst, - struct virt_pool *pool, - const char *ns) + struct virt_pool *pool) { const char *val = NULL; const char *msg = NULL; @@ -116,8 +115,7 @@ #if VIR_USE_LIBVIRT_STORAGE static const char *disk_rasd_to_pool(CMPIInstance *inst, - struct virt_pool *pool, - const char *ns) + struct virt_pool *pool) { const char *val = NULL; const char *msg = NULL; @@ -153,8 +151,7 @@ } #else static const char *disk_rasd_to_pool(CMPIInstance *inst, - struct virt_pool *pool, - const char *ns) + struct virt_pool *pool) { return "Storage pool creation not supported in this version of libvirt"; } @@ -169,15 +166,14 @@ static const char *rasd_to_vpool(CMPIInstance *inst, struct virt_pool *pool, - uint16_t type, - const char *ns) + uint16_t type) { pool->type = type; if (type == CIM_RES_TYPE_NET) { - return net_rasd_to_pool(inst, pool, ns); + return net_rasd_to_pool(inst, pool); } else if (type == CIM_RES_TYPE_DISK) { - return disk_rasd_to_pool(inst, pool, ns); + return disk_rasd_to_pool(inst, pool); } pool->type = CIM_RES_TYPE_UNKNOWN; @@ -215,7 +211,7 @@ if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) return "Unable to determine resource type"; - msg = rasd_to_vpool(inst, pool, type, NAMESPACE(op)); + msg = rasd_to_vpool(inst, pool, type); return msg; } From kaitlin at linux.vnet.ibm.com Thu Apr 16 18:18:51 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Apr 2009 11:18:51 -0700 Subject: [Libvirt-cim] [PATCH] Add support for creating filesystem type storage pools Message-ID: <261a49710d0cb13c83e2.1239905931@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1239905650 25200 # Node ID 261a49710d0cb13c83e28f460583079db473d04f # Parent 4574c6f289f29c9afd2bd3a3434360c17891e9fe Add support for creating filesystem type storage pools Signed-off-by: Kaitlin Rupert diff -r 4574c6f289f2 -r 261a49710d0c libxkutil/pool_parsing.c --- a/libxkutil/pool_parsing.c Wed Apr 15 10:28:07 2009 -0700 +++ b/libxkutil/pool_parsing.c Thu Apr 16 11:14:10 2009 -0700 @@ -52,6 +52,11 @@ free(pool.forward_dev); } +static void cleanup_disk_pool(struct disk_pool pool) { + free(pool.path); + free(pool.device_path); +} + void cleanup_virt_pool(struct virt_pool **pool) { struct virt_pool *_pool = *pool; @@ -61,6 +66,8 @@ if (_pool->type == CIM_RES_TYPE_NET) cleanup_net_pool(_pool->pool_info.net); + else if (_pool->type == CIM_RES_TYPE_DISK) + cleanup_disk_pool(_pool->pool_info.disk); free(_pool->id); free(_pool); diff -r 4574c6f289f2 -r 261a49710d0c libxkutil/pool_parsing.h --- a/libxkutil/pool_parsing.h Wed Apr 15 10:28:07 2009 -0700 +++ b/libxkutil/pool_parsing.h Thu Apr 16 11:14:10 2009 -0700 @@ -45,6 +45,7 @@ DISK_POOL_ISCSI, DISK_POOL_LOGICAL} pool_type; char *path; + char *device_path; }; struct virt_pool { diff -r 4574c6f289f2 -r 261a49710d0c libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Wed Apr 15 10:28:07 2009 -0700 +++ b/libxkutil/xmlgen.c Thu Apr 16 11:14:10 2009 -0700 @@ -874,6 +874,8 @@ { xmlNodePtr disk = NULL; xmlNodePtr name = NULL; + xmlNodePtr src = NULL; + xmlNodePtr dev = NULL; xmlNodePtr target = NULL; xmlNodePtr path = NULL; const char *type = NULL; @@ -894,6 +896,21 @@ if (name == NULL) goto out; + if (pool->device_path != NULL) { + src = xmlNewChild(disk, NULL, BAD_CAST "source", NULL); + if (src == NULL) + goto out; + + dev = xmlNewChild(src, NULL, BAD_CAST "device", BAD_CAST NULL); + if (dev == NULL) + goto out; + + if (xmlNewProp(dev, + BAD_CAST "path", + BAD_CAST pool->device_path) == NULL) + goto out; + } + target = xmlNewChild(disk, NULL, BAD_CAST "target", NULL); if (target == NULL) goto out; diff -r 4574c6f289f2 -r 261a49710d0c schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Wed Apr 15 10:28:07 2009 -0700 +++ b/schema/ResourceAllocationSettingData.mof Thu Apr 16 11:14:10 2009 -0700 @@ -207,6 +207,7 @@ "Disk, ISCSI, Logical"}] uint16 Type; string Path; + string DevicePath; }; [Description ("KVM virtual disk pool settings"), @@ -220,6 +221,7 @@ "Disk, ISCSI, Logical"}] uint16 Type; string Path; + string DevicePath; }; [Description ("LXC virtual disk pool settings"), @@ -233,5 +235,6 @@ "Disk, ISCSI, Logical"}] uint16 Type; string Path; + string DevicePath; }; diff -r 4574c6f289f2 -r 261a49710d0c src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Wed Apr 15 10:28:07 2009 -0700 +++ b/src/Virt_ResourcePoolConfigurationService.c Thu Apr 16 11:14:10 2009 -0700 @@ -114,6 +114,25 @@ } #if VIR_USE_LIBVIRT_STORAGE +static void init_disk_pool(struct virt_pool *pool) +{ + pool->pool_info.disk.device_path = NULL; + pool->pool_info.disk.path = NULL; +} + +static const char *disk_fs_pool(CMPIInstance *inst, + struct virt_pool *pool) +{ + const char *val = NULL; + + if (cu_get_str_prop(inst, "DevicePath", &val) != CMPI_RC_OK) + return "Missing `DevicePath' property"; + + pool->pool_info.disk.device_path = strdup(val); + + return NULL; +} + static const char *disk_rasd_to_pool(CMPIInstance *inst, struct virt_pool *pool) { @@ -124,8 +143,19 @@ if (cu_get_u16_prop(inst, "Type", &type) != CMPI_RC_OK) return "Missing `Type' property"; - if (type != DISK_POOL_DIR) + init_disk_pool(pool); + + switch (type) { + case DISK_POOL_DIR: + break; + case DISK_POOL_FS: + msg = disk_fs_pool(inst, pool); + if (msg != NULL) + goto out; + break; + default: return "Storage pool type not supported"; + } pool->pool_info.disk.pool_type = type; @@ -134,6 +164,7 @@ pool->pool_info.disk.path = strdup(val); + out: return msg; } From kaitlin at linux.vnet.ibm.com Thu Apr 16 18:22:55 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Apr 2009 11:22:55 -0700 Subject: [Libvirt-cim] [PATCH] Consolidate redundant code in for generating XML for net devices Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1239906021 25200 # Node ID abf66df18db6275e312f8024ddadfd6a2b252bb1 # Parent 261a49710d0cb13c83e28f460583079db473d04f Consolidate redundant code in for generating XML for net devices Most of the interface specific functions have the same code, so this can all be moved into the common function. Signed-off-by: Kaitlin Rupert diff -r 261a49710d0c -r abf66df18db6 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Thu Apr 16 11:14:10 2009 -0700 +++ b/libxkutil/xmlgen.c Thu Apr 16 11:20:21 2009 -0700 @@ -153,84 +153,45 @@ return msg; } -static const char *bridge_net_to_xml(xmlNodePtr root, struct net_device *dev) +static const char *set_net_source(xmlNodePtr nic, + struct net_device *dev, + const char *src_type) +{ + xmlNodePtr tmp; + + if (dev->source != NULL) { + tmp = xmlNewChild(nic, NULL, BAD_CAST "source", NULL); + if (tmp == NULL) + return XML_ERROR; + xmlNewProp(tmp, BAD_CAST src_type, BAD_CAST dev->source); + } + + return NULL; +} + + +static const char *bridge_net_to_xml(xmlNodePtr nic, struct net_device *dev) { const char *script = "vif-bridge"; - xmlNodePtr nic; xmlNodePtr tmp; - - nic = xmlNewChild(root, NULL, BAD_CAST "interface", NULL); - if (nic == NULL) - return XML_ERROR; - xmlNewProp(nic, BAD_CAST "type", BAD_CAST dev->type); - - tmp = xmlNewChild(nic, NULL, BAD_CAST "mac", NULL); - if (tmp == NULL) - return XML_ERROR; - xmlNewProp(tmp, BAD_CAST "address", BAD_CAST dev->mac); + const char *msg = NULL; tmp = xmlNewChild(nic, NULL, BAD_CAST "script", NULL); if (tmp == NULL) return XML_ERROR; xmlNewProp(tmp, BAD_CAST "path", BAD_CAST script); - if (dev->source != NULL) { - tmp = xmlNewChild(nic, NULL, BAD_CAST "source", NULL); - if (tmp == NULL) - return XML_ERROR; - xmlNewProp(tmp, BAD_CAST "bridge", BAD_CAST dev->source); - } + msg = set_net_source(nic, dev, "bridge"); - return NULL; -} - -static const char *network_net_to_xml(xmlNodePtr root, struct net_device *dev) -{ - xmlNodePtr nic; - xmlNodePtr tmp; - - nic = xmlNewChild(root, NULL, BAD_CAST "interface", NULL); - if (nic == NULL) - return XML_ERROR; - xmlNewProp(nic, BAD_CAST "type", BAD_CAST dev->type); - - tmp = xmlNewChild(nic, NULL, BAD_CAST "mac", NULL); - if (tmp == NULL) - return XML_ERROR; - xmlNewProp(tmp, BAD_CAST "address", BAD_CAST dev->mac); - - if (dev->source != NULL) { - tmp = xmlNewChild(nic, NULL, BAD_CAST "source", NULL); - if (tmp == NULL) - return XML_ERROR; - xmlNewProp(tmp, BAD_CAST "network", BAD_CAST dev->source); - } - - return NULL; -} - -static const char *user_net_to_xml(xmlNodePtr root, struct net_device *dev) -{ - xmlNodePtr nic; - xmlNodePtr tmp; - - nic = xmlNewChild(root, NULL, BAD_CAST "interface", NULL); - if (nic == NULL) - return XML_ERROR; - xmlNewProp(nic, BAD_CAST "type", BAD_CAST dev->type); - - tmp = xmlNewChild(nic, NULL, BAD_CAST "mac", NULL); - if (tmp == NULL) - return XML_ERROR; - xmlNewProp(tmp, BAD_CAST "address", BAD_CAST dev->mac); - - return NULL; + return msg; } static const char *net_xml(xmlNodePtr root, struct domain *dominfo) { int i; const char *msg = NULL; + xmlNodePtr nic; + xmlNodePtr tmp; for (i = 0; (i < dominfo->dev_net_ct) && (msg == NULL); i++) { struct virt_device *dev = &dominfo->dev_net[i]; @@ -239,12 +200,22 @@ struct net_device *net = &dev->dev.net; + nic = xmlNewChild(root, NULL, BAD_CAST "interface", NULL); + if (nic == NULL) + return XML_ERROR; + xmlNewProp(nic, BAD_CAST "type", BAD_CAST net->type); + + tmp = xmlNewChild(nic, NULL, BAD_CAST "mac", NULL); + if (tmp == NULL) + return XML_ERROR; + xmlNewProp(tmp, BAD_CAST "address", BAD_CAST net->mac); + if (STREQ(dev->dev.net.type, "network")) - msg = network_net_to_xml(root, net); + msg = set_net_source(nic, net, "network"); else if (STREQ(dev->dev.net.type, "bridge")) msg = bridge_net_to_xml(root, net); else if (STREQ(dev->dev.net.type, "user")) - msg = user_net_to_xml(root, net); + continue; else msg = "Unknown interface type"; } From kaitlin at linux.vnet.ibm.com Thu Apr 16 23:04:05 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Apr 2009 16:04:05 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]Update RPCS/04 to validate that the Network child pool can be created through the providers In-Reply-To: <860c994006a12104618e.1239868530@elm3b197.beaverton.ibm.com> References: <860c994006a12104618e.1239868530@elm3b197.beaverton.ibm.com> Message-ID: <49E7B965.3050404@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1239868524 25200 > # Node ID 860c994006a12104618e29bf051730993568bcc1 > # Parent 4ec367c94c356de7fac5a19ffe215c316d0cdcd1 > [TEST]Update RPCS/04 to validate that the Network child pool can be created through the providers > > > Follow up patch will valide Disk child pool creation and verification in the same tc > libvirt supports several different disk pool types. Not all of these are supported in libvirt-cim yet, but they will be in the future. I would put the disk pool verification in a different test, otherwise, this test might become to cluttered / confusing. > Tested for KVM with current sources > Signed-off-by: Guolian Yun > > diff -r 4ec367c94c35 -r 860c994006a1 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py > --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Wed Apr 08 02:22:53 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Thu Apr 16 00:55:24 2009 -0700 > @@ -52,32 +52,84 @@ > Can you update the comment block at the top of the test? > + > +def verify_pool(pool_list, poolname): > + status = PASS > + if len(pool_list) < 1: > + logger.error("Returen %i instances, expected at least one instance", > Typo here.. this should be "Return" > + len(pool_list)) > + return FAIL > + > + for i in range(0, len(pool_list)): > + ret_pool = pool_list[i].InstanceID > + if ret_pool == poolname: > + break > + elif ret_pool != poolname and i == len(pool_list)-1: > + logger.error("Can not find expected pool") > + status = FAIL > This for loop is a little odd. Why not set status to FAIL at the top of the function. If you find the pool you are looking for, set status to PASS and break from the loop. If you don't find the pool, then status will be FAIL at the end of the loop. > + elif curr_cim_rev >= libvirt_cim_child_pool_rev: > + nprasd = get_typed_class(options.virt, > + 'NetPoolResourceAllocationSettingData') > + np_id = 'NetworkPool/%s' % testpool > + iname = CIMInstanceName(nprasd, > + namespace = 'root/virt', > + keybindings = {'InstanceID':np_id}) > + logger.info('iname is %s', iname) > + nrasd = CIMInstance(nprasd, path = iname, > + properties ={ > + "Address" : "192.168.0.30", > + "Netmask" : "255.255.255.0", > + "IPRangeStart" : "192.168.0.31", > + "IPRangeEnd" : "192.168.0.57", > + "ForwardMode":"route eth1"}) > Since this test will be network pool specific, can you also test the other types of network pools (http://libvirt.org/formatnetwork.html#examples) > + try: > + rpcs_conn.CreateChildResourcePool(ElementName=testpool, > + Settings=[nrasd.tomof()]) > + except pywbem.CIMError, details: > + logger.error("Invoke CreateChildResourcePool() error") > + logger.error(details) > return FAIL > - > - logger.error("The execution should not have reached here!!") > - return FAIL > + > + np = get_typed_class(options.virt, 'NetworkPool') > + netpool = EnumInstances(options.ip, np) > + status = verify_pool(netpool, np_id) > + > + destroy_netpool(options.ip, options.virt, testpool) > Also be sure to undefine the pool as well. From yunguol at cn.ibm.com Fri Apr 17 07:21:45 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 17 Apr 2009 15:21:45 +0800 Subject: [Libvirt-cim] [PATCH] [TEST]Update RPCS/04 to validate that the Network child pool can be created through the providers In-Reply-To: <49E7B965.3050404@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-04-17 07:04:05: > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1239868524 25200 > > # Node ID 860c994006a12104618e29bf051730993568bcc1 > > # Parent 4ec367c94c356de7fac5a19ffe215c316d0cdcd1 > > [TEST]Update RPCS/04 to validate that the Network child pool can > be created through the providers > > > > > > Follow up patch will valide Disk child pool creation and > verification in the same tc > > > libvirt supports several different disk pool types. Not all of these are > supported in libvirt-cim yet, but they will be in the future. I would > put the disk pool verification in a different test, otherwise, this test > might become to cluttered / confusing. > > Tested for KVM with current sources > > Signed-off-by: Guolian Yun > > > > diff -r 4ec367c94c35 -r 860c994006a1 suites/libvirt- > cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py > > --- a/suites/libvirt- > cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool. > py Wed Apr 08 02:22:53 2009 -0700 > > +++ b/suites/libvirt- > cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool. > py Thu Apr 16 00:55:24 2009 -0700 > > @@ -52,32 +52,84 @@ > > > Can you update the comment block at the top of the test? > > > + > > +def verify_pool(pool_list, poolname): > > + status = PASS > > + if len(pool_list) < 1: > > + logger.error("Returen %i instances, expected at least oneinstance", > > > Typo here.. this should be "Return" > > + len(pool_list)) > > + return FAIL > > + > > + for i in range(0, len(pool_list)): > > + ret_pool = pool_list[i].InstanceID > > + if ret_pool == poolname: > > + break > > + elif ret_pool != poolname and i == len(pool_list)-1: > > + logger.error("Can not find expected pool") > > + status = FAIL > > > This for loop is a little odd. Why not set status to FAIL at the top of > the function. If you find the pool you are looking for, set status to > PASS and break from the loop. If you don't find the pool, then status > will be FAIL at the end of the loop. > > + elif curr_cim_rev >= libvirt_cim_child_pool_rev: > > + nprasd = get_typed_class(options.virt, > > + 'NetPoolResourceAllocationSettingData') > > + np_id = 'NetworkPool/%s' % testpool > > + iname = CIMInstanceName(nprasd, > > + namespace = 'root/virt', > > + keybindings = {'InstanceID':np_id}) > > + logger.info('iname is %s', iname) > > + nrasd = CIMInstance(nprasd, path = iname, > > + properties ={ > > + "Address" : "192.168.0.30", > > + "Netmask" : "255.255.255.0", > > + "IPRangeStart" : "192.168.0.31", > > + "IPRangeEnd" : "192.168.0.57", > > + "ForwardMode":"route eth1"}) > > > Since this test will be network pool specific, can you also test the > other types of network pools > (http://libvirt.org/formatnetwork.html#examples) The NAT based network has to set ForwaredMode by "nat", I'm not sure how to test isolated network? Which properties has to set for this type? Thanks! > > + try: > > + rpcs_conn.CreateChildResourcePool(ElementName=testpool, > > + Settings=[nrasd.tomof()]) > > + except pywbem.CIMError, details: > > + logger.error("Invoke CreateChildResourcePool() error") > > + logger.error(details) > > return FAIL > > - > > - logger.error("The execution should not have reached here!!") > > - return FAIL > > + > > + np = get_typed_class(options.virt, 'NetworkPool') > > + netpool = EnumInstances(options.ip, np) > > + status = verify_pool(netpool, np_id) > > + > > + destroy_netpool(options.ip, options.virt, testpool) > > > Also be sure to undefine the pool as well. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From veillard at redhat.com Fri Apr 17 14:07:36 2009 From: veillard at redhat.com (Daniel Veillard) Date: Fri, 17 Apr 2009 16:07:36 +0200 Subject: [Libvirt-cim] virNodeGetFreeMemory() returns bytes with Xen driver In-Reply-To: <49E4A7CA.4030202@linux.vnet.ibm.com> References: <49E4A7CA.4030202@linux.vnet.ibm.com> Message-ID: <20090417140736.GQ23619@redhat.com> On Tue, Apr 14, 2009 at 08:12:10AM -0700, Kaitlin Rupert wrote: > Hi Tyrel, > > My guess is that the libvirt documentation is incorrect. I would follow > up with the libvirt devs on libvir-list at redhat.com to be sure though. Yes, that's unfortunate, as I replied on the list the implementations didn't follow the description, so I'm updating the description with a note to avoid troubles. Daniel > Tyrel Datwyler wrote: >> >> The libvirt API states that the return value of virNodeGetFreeMemory() >> is in kilobytes. When making this call against a Xen hypervisor and >> comparing the returned value with what is listed by "xm info" it >> appears that libvirt is returning the free memory in bytes and not >> kilobytes. Can anybody confirm this behavior? >> >> This code snippet: >> >> conn = virConnectOpen("xen:///localhost/"); >> hostmem = virNodeGetFreeMemory(conn); >> fprintf(stdout, "Host free memory = %llu\n", hostmem); >> >> produces the following output: >> >> Host free memory = 3236012032 >> >> The following comes from running "xm info" on the Xen host: >> >> free_memory : 3086 >> >> The libvirt value is convertable into the "xm" returned value if bytes >> is assumed. >> >> Regards, >> >> Tyrel Datwyler >> >> Linux Software Engineer >> eServer Systems Management >> IBM Systems and Technology Group >> Email: tyreld at us.ibm.com >> External: (503) 578-3489, T/L: 775-3489 >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Libvirt-cim mailing list >> Libvirt-cim at redhat.com >> https://www.redhat.com/mailman/listinfo/libvirt-cim > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From kaitlin at linux.vnet.ibm.com Fri Apr 17 16:26:16 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 17 Apr 2009 09:26:16 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]Update RPCS/04 to validate that the Network child pool can be created through the providers In-Reply-To: References: Message-ID: <49E8ADA8.1060405@linux.vnet.ibm.com> > > > + elif curr_cim_rev >= libvirt_cim_child_pool_rev: > > > + nprasd = get_typed_class(options.virt, > > > + > 'NetPoolResourceAllocationSettingData') > > > + np_id = 'NetworkPool/%s' % testpool > > > + iname = CIMInstanceName(nprasd, > > > + namespace = 'root/virt', > > > + keybindings = {'InstanceID':np_id}) > > > + logger.info('iname is %s', iname) > > > + nrasd = CIMInstance(nprasd, path = iname, > > > + properties ={ > > > + "Address" : "192.168.0.30", > > > + "Netmask" : "255.255.255.0", > > > + "IPRangeStart" : > "192.168.0.31", > > > + "IPRangeEnd" : > "192.168.0.57", > > > + "ForwardMode":"route eth1"}) > > > > > Since this test will be network pool specific, can you also test the > > other types of network pools > > (http://libvirt.org/formatnetwork.html#examples) > > The NAT based network has to set ForwaredMode by "nat", I'm not sure > how to test > isolated network? Which properties has to set for this type? Isolated would look like: properties ={ "Address" : "192.168.0.30", "Netmask" : "255.255.255.0", "IPRangeStart" : "192.168.0.31", "IPRangeEnd" : "192.168.0.57"} From rmaciel at linux.vnet.ibm.com Fri Apr 17 16:48:42 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 17 Apr 2009 13:48:42 -0300 Subject: [Libvirt-cim] [PATCH] Remove ns param from rasd_to_vpool() in RPCS In-Reply-To: <4574c6f289f29c9afd2b.1239905481@localhost.localdomain> References: <4574c6f289f29c9afd2b.1239905481@localhost.localdomain> Message-ID: <49E8B2EA.2010000@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1239816487 25200 > # Node ID 4574c6f289f29c9afd2bd3a3434360c17891e9fe > # Parent 0c6f5aa107a82840acffa2e3931ddf05726c35c5 > Remove ns param from rasd_to_vpool() in RPCS > > This parameter isn't being used by any of the functions. > > Signed-off-by: Kaitlin Rupert > > diff -r 0c6f5aa107a8 -r 4574c6f289f2 src/Virt_ResourcePoolConfigurationService.c > --- a/src/Virt_ResourcePoolConfigurationService.c Thu Apr 09 10:07:27 2009 -0700 > +++ b/src/Virt_ResourcePoolConfigurationService.c Wed Apr 15 10:28:07 2009 -0700 > @@ -78,8 +78,7 @@ > } > > static const char *net_rasd_to_pool(CMPIInstance *inst, > - struct virt_pool *pool, > - const char *ns) > + struct virt_pool *pool) > { > const char *val = NULL; > const char *msg = NULL; > @@ -116,8 +115,7 @@ > > #if VIR_USE_LIBVIRT_STORAGE > static const char *disk_rasd_to_pool(CMPIInstance *inst, > - struct virt_pool *pool, > - const char *ns) > + struct virt_pool *pool) > { > const char *val = NULL; > const char *msg = NULL; > @@ -153,8 +151,7 @@ > } > #else > static const char *disk_rasd_to_pool(CMPIInstance *inst, > - struct virt_pool *pool, > - const char *ns) > + struct virt_pool *pool) > { > return "Storage pool creation not supported in this version of libvirt"; > } > @@ -169,15 +166,14 @@ > > static const char *rasd_to_vpool(CMPIInstance *inst, > struct virt_pool *pool, > - uint16_t type, > - const char *ns) > + uint16_t type) > { > pool->type = type; > > if (type == CIM_RES_TYPE_NET) { > - return net_rasd_to_pool(inst, pool, ns); > + return net_rasd_to_pool(inst, pool); > } else if (type == CIM_RES_TYPE_DISK) { > - return disk_rasd_to_pool(inst, pool, ns); > + return disk_rasd_to_pool(inst, pool); > } > > pool->type = CIM_RES_TYPE_UNKNOWN; > @@ -215,7 +211,7 @@ > if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) > return "Unable to determine resource type"; > > - msg = rasd_to_vpool(inst, pool, type, NAMESPACE(op)); > + msg = rasd_to_vpool(inst, pool, type); > > return msg; > } > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Fri Apr 17 17:32:59 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 17 Apr 2009 14:32:59 -0300 Subject: [Libvirt-cim] [PATCH] Consolidate redundant code in for generating XML for net devices In-Reply-To: References: Message-ID: <49E8BD4B.4030004@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1239906021 25200 > # Node ID abf66df18db6275e312f8024ddadfd6a2b252bb1 > # Parent 261a49710d0cb13c83e28f460583079db473d04f > Consolidate redundant code in for generating XML for net devices > > Most of the interface specific functions have the same code, so this can all > be moved into the common function. > > Signed-off-by: Kaitlin Rupert > > diff -r 261a49710d0c -r abf66df18db6 libxkutil/xmlgen.c > --- a/libxkutil/xmlgen.c Thu Apr 16 11:14:10 2009 -0700 > +++ b/libxkutil/xmlgen.c Thu Apr 16 11:20:21 2009 -0700 > @@ -153,84 +153,45 @@ > return msg; > } > > -static const char *bridge_net_to_xml(xmlNodePtr root, struct net_device *dev) > +static const char *set_net_source(xmlNodePtr nic, > + struct net_device *dev, > + const char *src_type) > +{ > + xmlNodePtr tmp; > + > + if (dev->source != NULL) { > + tmp = xmlNewChild(nic, NULL, BAD_CAST "source", NULL); > + if (tmp == NULL) > + return XML_ERROR; > + xmlNewProp(tmp, BAD_CAST src_type, BAD_CAST dev->source); > + } > + > + return NULL; > +} > + > + > +static const char *bridge_net_to_xml(xmlNodePtr nic, struct net_device *dev) > { > const char *script = "vif-bridge"; > - xmlNodePtr nic; > xmlNodePtr tmp; > - > - nic = xmlNewChild(root, NULL, BAD_CAST "interface", NULL); > - if (nic == NULL) > - return XML_ERROR; > - xmlNewProp(nic, BAD_CAST "type", BAD_CAST dev->type); > - > - tmp = xmlNewChild(nic, NULL, BAD_CAST "mac", NULL); > - if (tmp == NULL) > - return XML_ERROR; > - xmlNewProp(tmp, BAD_CAST "address", BAD_CAST dev->mac); > + const char *msg = NULL; > > tmp = xmlNewChild(nic, NULL, BAD_CAST "script", NULL); > if (tmp == NULL) > return XML_ERROR; > xmlNewProp(tmp, BAD_CAST "path", BAD_CAST script); > > - if (dev->source != NULL) { > - tmp = xmlNewChild(nic, NULL, BAD_CAST "source", NULL); > - if (tmp == NULL) > - return XML_ERROR; > - xmlNewProp(tmp, BAD_CAST "bridge", BAD_CAST dev->source); > - } > + msg = set_net_source(nic, dev, "bridge"); > > - return NULL; > -} > - > -static const char *network_net_to_xml(xmlNodePtr root, struct net_device *dev) > -{ > - xmlNodePtr nic; > - xmlNodePtr tmp; > - > - nic = xmlNewChild(root, NULL, BAD_CAST "interface", NULL); > - if (nic == NULL) > - return XML_ERROR; > - xmlNewProp(nic, BAD_CAST "type", BAD_CAST dev->type); > - > - tmp = xmlNewChild(nic, NULL, BAD_CAST "mac", NULL); > - if (tmp == NULL) > - return XML_ERROR; > - xmlNewProp(tmp, BAD_CAST "address", BAD_CAST dev->mac); > - > - if (dev->source != NULL) { > - tmp = xmlNewChild(nic, NULL, BAD_CAST "source", NULL); > - if (tmp == NULL) > - return XML_ERROR; > - xmlNewProp(tmp, BAD_CAST "network", BAD_CAST dev->source); > - } > - > - return NULL; > -} > - > -static const char *user_net_to_xml(xmlNodePtr root, struct net_device *dev) > -{ > - xmlNodePtr nic; > - xmlNodePtr tmp; > - > - nic = xmlNewChild(root, NULL, BAD_CAST "interface", NULL); > - if (nic == NULL) > - return XML_ERROR; > - xmlNewProp(nic, BAD_CAST "type", BAD_CAST dev->type); > - > - tmp = xmlNewChild(nic, NULL, BAD_CAST "mac", NULL); > - if (tmp == NULL) > - return XML_ERROR; > - xmlNewProp(tmp, BAD_CAST "address", BAD_CAST dev->mac); > - > - return NULL; > + return msg; > } > > static const char *net_xml(xmlNodePtr root, struct domain *dominfo) > { > int i; > const char *msg = NULL; > + xmlNodePtr nic; > + xmlNodePtr tmp; > > for (i = 0; (i < dominfo->dev_net_ct) && (msg == NULL); i++) { > struct virt_device *dev = &dominfo->dev_net[i]; > @@ -239,12 +200,22 @@ > > struct net_device *net = &dev->dev.net; > > + nic = xmlNewChild(root, NULL, BAD_CAST "interface", NULL); > + if (nic == NULL) > + return XML_ERROR; > + xmlNewProp(nic, BAD_CAST "type", BAD_CAST net->type); > + > + tmp = xmlNewChild(nic, NULL, BAD_CAST "mac", NULL); > + if (tmp == NULL) > + return XML_ERROR; > + xmlNewProp(tmp, BAD_CAST "address", BAD_CAST net->mac); > + > if (STREQ(dev->dev.net.type, "network")) > - msg = network_net_to_xml(root, net); > + msg = set_net_source(nic, net, "network"); > else if (STREQ(dev->dev.net.type, "bridge")) > msg = bridge_net_to_xml(root, net); > else if (STREQ(dev->dev.net.type, "user")) > - msg = user_net_to_xml(root, net); > + continue; > else > msg = "Unknown interface type"; > } > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Fri Apr 17 18:59:41 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 17 Apr 2009 15:59:41 -0300 Subject: [Libvirt-cim] [PATCH] Add support for creating filesystem type storage pools In-Reply-To: <261a49710d0cb13c83e2.1239905931@localhost.localdomain> References: <261a49710d0cb13c83e2.1239905931@localhost.localdomain> Message-ID: <49E8D19D.9000204@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1239905650 25200 > # Node ID 261a49710d0cb13c83e28f460583079db473d04f > # Parent 4574c6f289f29c9afd2bd3a3434360c17891e9fe > Add support for creating filesystem type storage pools > > Signed-off-by: Kaitlin Rupert > > diff -r 4574c6f289f2 -r 261a49710d0c libxkutil/pool_parsing.c > --- a/libxkutil/pool_parsing.c Wed Apr 15 10:28:07 2009 -0700 > +++ b/libxkutil/pool_parsing.c Thu Apr 16 11:14:10 2009 -0700 > @@ -52,6 +52,11 @@ > free(pool.forward_dev); > } > > +static void cleanup_disk_pool(struct disk_pool pool) { > + free(pool.path); > + free(pool.device_path); > +} > + > void cleanup_virt_pool(struct virt_pool **pool) > { > struct virt_pool *_pool = *pool; > @@ -61,6 +66,8 @@ > > if (_pool->type == CIM_RES_TYPE_NET) > cleanup_net_pool(_pool->pool_info.net); > + else if (_pool->type == CIM_RES_TYPE_DISK) > + cleanup_disk_pool(_pool->pool_info.disk); > > free(_pool->id); > free(_pool); > diff -r 4574c6f289f2 -r 261a49710d0c libxkutil/pool_parsing.h > --- a/libxkutil/pool_parsing.h Wed Apr 15 10:28:07 2009 -0700 > +++ b/libxkutil/pool_parsing.h Thu Apr 16 11:14:10 2009 -0700 > @@ -45,6 +45,7 @@ > DISK_POOL_ISCSI, > DISK_POOL_LOGICAL} pool_type; > char *path; > + char *device_path; > }; > > struct virt_pool { > diff -r 4574c6f289f2 -r 261a49710d0c libxkutil/xmlgen.c > --- a/libxkutil/xmlgen.c Wed Apr 15 10:28:07 2009 -0700 > +++ b/libxkutil/xmlgen.c Thu Apr 16 11:14:10 2009 -0700 > @@ -874,6 +874,8 @@ > { > xmlNodePtr disk = NULL; > xmlNodePtr name = NULL; > + xmlNodePtr src = NULL; > + xmlNodePtr dev = NULL; > xmlNodePtr target = NULL; > xmlNodePtr path = NULL; > const char *type = NULL; > @@ -894,6 +896,21 @@ > if (name == NULL) > goto out; > > + if (pool->device_path != NULL) { > + src = xmlNewChild(disk, NULL, BAD_CAST "source", NULL); > + if (src == NULL) > + goto out; > + > + dev = xmlNewChild(src, NULL, BAD_CAST "device", BAD_CAST NULL); > + if (dev == NULL) > + goto out; > + > + if (xmlNewProp(dev, > + BAD_CAST "path", > + BAD_CAST pool->device_path) == NULL) > + goto out; > + } > + > target = xmlNewChild(disk, NULL, BAD_CAST "target", NULL); > if (target == NULL) > goto out; > diff -r 4574c6f289f2 -r 261a49710d0c schema/ResourceAllocationSettingData.mof > --- a/schema/ResourceAllocationSettingData.mof Wed Apr 15 10:28:07 2009 -0700 > +++ b/schema/ResourceAllocationSettingData.mof Thu Apr 16 11:14:10 2009 -0700 > @@ -207,6 +207,7 @@ > "Disk, ISCSI, Logical"}] > uint16 Type; > string Path; > + string DevicePath; > }; > > [Description ("KVM virtual disk pool settings"), > @@ -220,6 +221,7 @@ > "Disk, ISCSI, Logical"}] > uint16 Type; > string Path; > + string DevicePath; > }; > > [Description ("LXC virtual disk pool settings"), > @@ -233,5 +235,6 @@ > "Disk, ISCSI, Logical"}] > uint16 Type; > string Path; > + string DevicePath; > }; > > diff -r 4574c6f289f2 -r 261a49710d0c src/Virt_ResourcePoolConfigurationService.c > --- a/src/Virt_ResourcePoolConfigurationService.c Wed Apr 15 10:28:07 2009 -0700 > +++ b/src/Virt_ResourcePoolConfigurationService.c Thu Apr 16 11:14:10 2009 -0700 > @@ -114,6 +114,25 @@ > } > > #if VIR_USE_LIBVIRT_STORAGE > +static void init_disk_pool(struct virt_pool *pool) > +{ > + pool->pool_info.disk.device_path = NULL; > + pool->pool_info.disk.path = NULL; > +} > + > +static const char *disk_fs_pool(CMPIInstance *inst, > + struct virt_pool *pool) > +{ > + const char *val = NULL; > + > + if (cu_get_str_prop(inst, "DevicePath", &val) != CMPI_RC_OK) > + return "Missing `DevicePath' property"; > + > + pool->pool_info.disk.device_path = strdup(val); > + > + return NULL; > +} > + > static const char *disk_rasd_to_pool(CMPIInstance *inst, > struct virt_pool *pool) > { > @@ -124,8 +143,19 @@ > if (cu_get_u16_prop(inst, "Type", &type) != CMPI_RC_OK) > return "Missing `Type' property"; > > - if (type != DISK_POOL_DIR) > + init_disk_pool(pool); > + > + switch (type) { > + case DISK_POOL_DIR: > + break; > + case DISK_POOL_FS: > + msg = disk_fs_pool(inst, pool); > + if (msg != NULL) > + goto out; > + break; > + default: > return "Storage pool type not supported"; > + } > > pool->pool_info.disk.pool_type = type; > > @@ -134,6 +164,7 @@ > > pool->pool_info.disk.path = strdup(val); > > + out: > return msg; > > } > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Apr 17 20:38:50 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 17 Apr 2009 13:38:50 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HS 03 to work with Xen on upstream libvirt Message-ID: <6d9a4f2dd357dd62d05d.1240000730@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240000721 25200 # Node ID 6d9a4f2dd357dd62d05d0415a6af7b16f3fffd93 # Parent ced161a8198115797a6036f3f22e02d234439a76 [TEST] Fix HS 03 to work with Xen on upstream libvirt Signed-off-by: Kaitlin Rupert diff -r ced161a81981 -r 6d9a4f2dd357 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Apr 15 20:19:31 2009 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Apr 17 13:38:41 2009 -0700 @@ -29,13 +29,15 @@ # Steps: # 1. Create a guest. # 2. Enumerate the HostSystem . -# 3. Using the HostedResourcePool association, get the HostSystem instances on the system -# 4. Using the ElementCapabilities association get the ProcessorPool, MemPool, DiskPool & -# NetPool instances on the system. -# 5. Using the SettingsDefineCapabilities association on the AllocationCapabilities, get -# the (Default, Minimum, Maximum and Increment) instances for ProcRASD. -# 6. Similarly for the MemRASD, DiskRASD & NetRASD get the SettingDefineCap assocn and \ -# get the instances for (Def, Min, Max and Inc). +# 3. Using the HostedResourcePool association, get the HostSystem instances +# on the system +# 4. Using the ElementCapabilities association get the ProcessorPool, +# MemPool, DiskPool & NetPool instances on the system. +# 5. Using the SettingsDefineCapabilities association on the +# AllocationCapabilities, get the (Default, Minimum, Maximum and Increment) +# instances for ProcRASD. +# 6. Similarly for the MemRASD, DiskRASD & NetRASD get the SettingDefineCap +# assocn and get the instances for (Def, Min, Max and Inc). # # Feb 13 2008 @@ -228,6 +230,10 @@ exp_len = 8 if curr_cim_rev >= libvirt_rasd_new_changes: exp_len = 16 + if curr_cim_rev >= libvirt_rasd_dpool_changes: + volumes = enum_volumes(virt, server) + exp_len = volumes * 8 + if virt == 'KVM': if curr_cim_rev >= libvirt_rasd_new_changes and \ curr_cim_rev < libvirt_rasd_dpool_changes: From kaitlin at linux.vnet.ibm.com Fri Apr 17 21:08:00 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 17 Apr 2009 14:08:00 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HS 03 to work with Xen on upstream libvirt In-Reply-To: <6d9a4f2dd357dd62d05d.1240000730@localhost.localdomain> References: <6d9a4f2dd357dd62d05d.1240000730@localhost.localdomain> Message-ID: <49E8EFB0.9000800@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240000721 25200 > # Node ID 6d9a4f2dd357dd62d05d0415a6af7b16f3fffd93 > # Parent ced161a8198115797a6036f3f22e02d234439a76 > [TEST] Fix HS 03 to work with Xen on upstream libvirt > > Signed-off-by: Kaitlin Rupert > > diff -r ced161a81981 -r 6d9a4f2dd357 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Please ignore this patch. I'm going to see if I can refactor the way we verify the number of template RASDs returned. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Sun Apr 19 23:14:46 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 19 Apr 2009 16:14:46 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Improve enum volumes Message-ID: <5706fea95239f1633296.1240182886@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240002683 25200 # Node ID 5706fea95239f1633296e2fbce13ada882848e13 # Parent ced161a8198115797a6036f3f22e02d234439a76 [TEST] Improve enum volumes The providers don't return a template RASD for volumes that libvirt is unable to get volume info for. So the testsuite needs to do the same. Also, don't use a hardcoded disk pool name - use the default value from const.py Signed-off-by: Kaitlin Rupert diff -r ced161a81981 -r 5706fea95239 suites/libvirt-cim/lib/XenKvmLib/pool.py --- a/suites/libvirt-cim/lib/XenKvmLib/pool.py Wed Apr 15 20:19:31 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/pool.py Fri Apr 17 14:11:23 2009 -0700 @@ -24,7 +24,7 @@ from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.classes import get_typed_class -from XenKvmLib.const import get_provider_version +from XenKvmLib.const import get_provider_version, default_pool_name from XenKvmLib.enumclass import EnumInstances from VirtLib.utils import run_remote from XenKvmLib.xm_virt_util import virt2uri @@ -83,13 +83,19 @@ def enum_volumes(virt, server): volume = 0 cmd = "virsh -c %s vol-list %s | sed -e '1,2 d' -e '$ d'" % \ - (virt2uri(virt), 'cimtest-diskpool') + (virt2uri(virt), default_pool_name) ret, out = run_remote(server ,cmd) if ret != 0: return None lines = out.split("\n") for line in lines: - volume = volume + 1 + vol = line.split()[0] + cmd = "virsh vol-info --pool cimtest-diskpool meep" + cmd = "virsh -c %s vol-info --pool %s %s" % (virt2uri(virt), + default_pool_name, vol) + ret, out = run_remote(server ,cmd) + if ret == 0: + volume = volume + 1 return volume From kaitlin at linux.vnet.ibm.com Sun Apr 19 23:32:54 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 19 Apr 2009 16:32:54 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Update tests to use get_exp_template_rasd_len() In-Reply-To: References: Message-ID: <7bac72ee3582b0bb822b.1240183974@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240183800 25200 # Node ID 7bac72ee3582b0bb822b9062234ae1989a464f60 # Parent 7ce2862e03dc20cd1e6d3ec9845912285d64eef1 [TEST] Update tests to use get_exp_template_rasd_len() This way, the template RASD calculation only needs to be updated in one place if it changes in the future. Signed-off-by: Kaitlin Rupert diff -r 7ce2862e03dc -r 7bac72ee3582 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Sun Apr 19 16:29:59 2009 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Sun Apr 19 16:30:00 2009 -0700 @@ -29,13 +29,15 @@ # Steps: # 1. Create a guest. # 2. Enumerate the HostSystem . -# 3. Using the HostedResourcePool association, get the HostSystem instances on the system -# 4. Using the ElementCapabilities association get the ProcessorPool, MemPool, DiskPool & -# NetPool instances on the system. -# 5. Using the SettingsDefineCapabilities association on the AllocationCapabilities, get -# the (Default, Minimum, Maximum and Increment) instances for ProcRASD. -# 6. Similarly for the MemRASD, DiskRASD & NetRASD get the SettingDefineCap assocn and \ -# get the instances for (Def, Min, Max and Inc). +# 3. Using the HostedResourcePool association, get the HostSystem instances +# on the system +# 4. Using the ElementCapabilities association get the ProcessorPool, +# MemPool, DiskPool & NetPool instances on the system. +# 5. Using the SettingsDefineCapabilities association on the +# AllocationCapabilities, get the (Default, Minimum, Maximum and +# Increment) instances for ProcRASD. +# 6. Similarly for the MemRASD, DiskRASD & NetRASD get the SettingDefineCap +# assocn and get the instances for (Def, Min, Max and Inc). # # Feb 13 2008 @@ -50,15 +52,11 @@ from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_xml import testxml from XenKvmLib.test_doms import destroy_and_undefine_all -from XenKvmLib.const import get_provider_version -from XenKvmLib.pool import enum_volumes +from XenKvmLib.rasd import get_exp_template_rasd_len sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "domgst_test" test_vcpus = 1 -libvirt_rasd_template_changes = 707 -libvirt_rasd_new_changes = 805 -libvirt_rasd_dpool_changes = 839 def setup_env(server, virt="Xen"): status = PASS @@ -173,7 +171,8 @@ InstanceID = inst['InstanceID']) if len(assoc_info) < 1: - logger.error("'%s' has returned %i objects", an, len(assoc_info)) + logger.error("'%s' has returned %i objects", an, + len(assoc_info)) status = FAIL return status, alloccap @@ -181,10 +180,10 @@ if c != inst.classname: continue status, setdefcap = get_inst_from_list(an, - c, - assoc_info, - filter, - rt ) + c, + assoc_info, + filter, + rt ) if status != FAIL: alloccap.append(setdefcap) @@ -216,25 +215,7 @@ ccn, InstanceID = ap['InstanceID']) - curr_cim_rev, changeset = get_provider_version(virt, server) - exp_len = 4 - if 'DiskPool' in ap['InstanceID']: - # For Diskpool, we have info 1 for each of Min, Max, - # default, Increment and 1 for each of PV and FV - # hence 4 * 2 = 8 records - if virt == 'Xen': - if curr_cim_rev >= libvirt_rasd_template_changes and \ - curr_cim_rev < libvirt_rasd_new_changes: - exp_len = 8 - if curr_cim_rev >= libvirt_rasd_new_changes: - exp_len = 16 - if virt == 'KVM': - if curr_cim_rev >= libvirt_rasd_new_changes and \ - curr_cim_rev < libvirt_rasd_dpool_changes: - exp_len = 8 - if curr_cim_rev >= libvirt_rasd_dpool_changes: - volumes = enum_volumes(virt, server) - exp_len = volumes * 4 + exp_len = get_exp_template_rasd_len(virt, server, ap['InstanceID']) if len(assoc_info) != exp_len: logger.error("'%s' returned %i RASD objects instead of %i", diff -r 7ce2862e03dc -r 7bac72ee3582 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Sun Apr 19 16:29:59 2009 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Sun Apr 19 16:30:00 2009 -0700 @@ -63,13 +63,9 @@ from XenKvmLib.const import do_main, default_pool_name, default_network_name from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import print_field_error -from XenKvmLib.const import get_provider_version -from XenKvmLib.pool import enum_volumes +from XenKvmLib.rasd import get_exp_template_rasd_len platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] -libvirt_rasd_template_changes = 707 -libvirt_rasd_new_changes = 805 -libvirt_rasd_dpool_changes = 839 memid = "MemoryPool/0" procid = "ProcessorPool/0" @@ -173,25 +169,7 @@ assoc_info = assoc.Associators(server, assoc_cname, cn, InstanceID = instid) - curr_cim_rev, changeset = get_provider_version(virt, server) - exp_len = 4 - if 'DiskPool' in instid: - # For Diskpool, we have info 1 for each of Min, Max, - # default, Increment and 1 for each of PV and FV - # hence 4 * 2 = 8 records - if virt == 'Xen' or virt == 'XenFV': - if curr_cim_rev >= libvirt_rasd_template_changes and \ - curr_cim_rev < libvirt_rasd_new_changes: - exp_len = 8 - if curr_cim_rev >= libvirt_rasd_new_changes: - exp_len = 16 - if virt == 'KVM': - if curr_cim_rev >= libvirt_rasd_new_changes and \ - curr_cim_rev < libvirt_rasd_dpool_changes: - exp_len = 8 - if curr_cim_rev >= libvirt_rasd_dpool_changes: - volumes = enum_volumes(virt, server) - exp_len = volumes * 4 + exp_len = get_exp_template_rasd_len(virt, server, instid) if len(assoc_info) != exp_len: logger.error("%s returned %i ResourcePool objects instead" From kaitlin at linux.vnet.ibm.com Sun Apr 19 23:32:53 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 19 Apr 2009 16:32:53 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Add get_exp_template_rasd_len() - returns the expected # of template RASD In-Reply-To: References: Message-ID: <7ce2862e03dc20cd1e6d.1240183973@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240183799 25200 # Node ID 7ce2862e03dc20cd1e6d3ec9845912285d64eef1 # Parent 5706fea95239f1633296e2fbce13ada882848e13 [TEST] Add get_exp_template_rasd_len() - returns the expected # of template RASD Signed-off-by: Kaitlin Rupert diff -r 5706fea95239 -r 7ce2862e03dc suites/libvirt-cim/lib/XenKvmLib/rasd.py --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Fri Apr 17 14:11:23 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Sun Apr 19 16:29:59 2009 -0700 @@ -28,7 +28,9 @@ from XenKvmLib.classes import get_typed_class, get_class_type from XenKvmLib.enumclass import GetInstance, EnumInstances from XenKvmLib.assoc import Associators -from XenKvmLib.const import default_pool_name, default_network_name +from XenKvmLib.const import default_pool_name, default_network_name, \ + get_provider_version +from XenKvmLib.pool import enum_volumes pasd_cn = 'ProcResourceAllocationSettingData' nasd_cn = 'NetResourceAllocationSettingData' @@ -302,3 +304,45 @@ return rasd_insts, PASS +def get_exp_template_rasd_len(virt, ip, id): + libvirt_rasd_template_changes = 707 + libvirt_rasd_new_changes = 805 + libvirt_rasd_dpool_changes = 839 + + curr_cim_rev, changeset = get_provider_version(virt, ip) + + # For Diskpool, we have info 1 for each of Min, Max, Default, and Incr + exp_base_num = 4 + exp_cdrom = 4 + + exp_len = exp_base_num + + if 'DiskPool' in id: + if virt == 'Xen' or virt == 'XenFV': + # For Xen and XenFV, there is a template for PV and FV, so you + # end up with double the number of templates + xen_multi = 2 + + if curr_cim_rev >= libvirt_rasd_template_changes and \ + curr_cim_rev < libvirt_rasd_new_changes: + exp_len = exp_base_num + exp_cdrom + + elif curr_cim_rev >= libvirt_rasd_new_changes and \ + curr_cim_rev < libvirt_rasd_dpool_changes: + exp_len = (exp_base_num + exp_cdrom) * xen_multi + + elif curr_cim_rev >= libvirt_rasd_dpool_changes: + volumes = enum_volumes(virt, ip) + exp_len = (volumes * exp_base_num) * xen_multi + (exp_cdrom * 2) + + elif virt == 'KVM': + if curr_cim_rev >= libvirt_rasd_new_changes and \ + curr_cim_rev < libvirt_rasd_dpool_changes: + exp_len = exp_base_num + exp_cdrom + + elif curr_cim_rev >= libvirt_rasd_dpool_changes: + volumes = enum_volumes(virt, ip) + exp_len = (volumes * exp_base_num) + exp_cdrom + + return exp_len + From kaitlin at linux.vnet.ibm.com Sun Apr 19 23:32:52 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 19 Apr 2009 16:32:52 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Create function for determine exp # of template RASDs Message-ID: From kaitlin at linux.vnet.ibm.com Sun Apr 19 23:34:25 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 19 Apr 2009 16:34:25 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] For localhost migration, do not copy image file to host Message-ID: <3220adb67645abf37848.1240184065@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240184059 25200 # Node ID 3220adb67645abf3784876851de4eab6748e76b3 # Parent 7bac72ee3582b0bb822b9062234ae1989a464f60 [TEST] For localhost migration, do not copy image file to host No need to do this step since the file already exists Signed-off-by: Kaitlin Rupert diff -r 7bac72ee3582 -r 3220adb67645 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Apr 19 16:30:00 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Apr 19 16:34:19 2009 -0700 @@ -158,6 +158,10 @@ logger.error("Failed to get Disk RASD info for '%s'", test_dom) return FAIL, req_image, backup_image + if t_sysname == s_sysname or t_sysname in s_sysname: + #Localhost migration, no need to copy image + return PASS, req_image, backup_image + # Check if the image file with the same name already exist on the machine. # Back it up. Copy the required working image to the destination. cmd = "ls -l %s" % req_image From kaitlin at linux.vnet.ibm.com Sun Apr 19 23:36:03 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 19 Apr 2009 16:36:03 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Check to see if either qemu or qemu-kvm is present on the system Message-ID: <6d914f871271725d4ed3.1240184163@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240184148 25200 # Node ID 6d914f871271725d4ed31abe4e35a5846b298fea # Parent 3220adb67645abf3784876851de4eab6748e76b3 [TEST] Check to see if either qemu or qemu-kvm is present on the system If the qemu binary doesn't exist, don't fail - check qemu-kvm first. Signed-off-by: Kaitlin Rupert diff -r 3220adb67645 -r 6d914f871271 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Sun Apr 19 16:34:19 2009 -0700 +++ b/suites/libvirt-cim/main.py Sun Apr 19 16:35:48 2009 -0700 @@ -107,12 +107,10 @@ cmd = "qemu -help" ret, out = utils.run_remote(ip, cmd) if ret != 0: - return "Encountered an error querying for qemu" - - cmd = "qemu-kvm -help" - ret, out = utils.run_remote(ip, cmd) - if ret != 0: - return "Encountered an error querying for qemu-kvm " + cmd = "qemu-kvm -help" + ret, out = utils.run_remote(ip, cmd) + if ret != 0: + return "Encountered an error querying for qemu-kvm and qemu " cmd = "ps -ef | grep -v grep | grep cimserver" rc, out = utils.run_remote(ip, cmd) From yunguol at cn.ibm.com Mon Apr 20 02:03:31 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 20 Apr 2009 10:03:31 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HS 03 to work with Xen on upstream libvirt In-Reply-To: <6d9a4f2dd357dd62d05d.1240000730@localhost.localdomain> Message-ID: +1 from me. Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2009-04-18 04:38:50: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240000721 25200 > # Node ID 6d9a4f2dd357dd62d05d0415a6af7b16f3fffd93 > # Parent ced161a8198115797a6036f3f22e02d234439a76 > [TEST] Fix HS 03 to work with Xen on upstream libvirt > > Signed-off-by: Kaitlin Rupert > > diff -r ced161a81981 -r 6d9a4f2dd357 suites/libvirt- > cim/cimtest/HostSystem/03_hs_to_settdefcap.py > --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py > Wed Apr 15 20:19:31 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py > Fri Apr 17 13:38:41 2009 -0700 > @@ -29,13 +29,15 @@ > # Steps: > # 1. Create a guest. > # 2. Enumerate the HostSystem . > -# 3. Using the HostedResourcePool association, get the HostSystem > instances on the system > -# 4. Using the ElementCapabilities association get the > ProcessorPool, MemPool, DiskPool & > -# NetPool instances on the system. > -# 5. Using the SettingsDefineCapabilities association on the > AllocationCapabilities, get > -# the (Default, Minimum, Maximum and Increment) instances for ProcRASD. > -# 6. Similarly for the MemRASD, DiskRASD & NetRASD get the > SettingDefineCap assocn and \ > -# get the instances for (Def, Min, Max and Inc). > +# 3. Using the HostedResourcePool association, get the HostSystem instances > +# on the system > +# 4. Using the ElementCapabilities association get the ProcessorPool, > +# MemPool, DiskPool & NetPool instances on the system. > +# 5. Using the SettingsDefineCapabilities association on the > +# AllocationCapabilities, get the (Default, Minimum, Maximum > and Increment) > +# instances for ProcRASD. > +# 6. Similarly for the MemRASD, DiskRASD & NetRASD get the SettingDefineCap > +# assocn and get the instances for (Def, Min, Max and Inc). > # > # Feb 13 2008 > > @@ -228,6 +230,10 @@ > exp_len = 8 > if curr_cim_rev >= libvirt_rasd_new_changes: > exp_len = 16 > + if curr_cim_rev >= libvirt_rasd_dpool_changes: > + volumes = enum_volumes(virt, server) > + exp_len = volumes * 8 > + > if virt == 'KVM': > if curr_cim_rev >= libvirt_rasd_new_changes and \ > curr_cim_rev < libvirt_rasd_dpool_changes: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 20 02:04:08 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 20 Apr 2009 10:04:08 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] For localhost migration, do not copy image file to host In-Reply-To: <3220adb67645abf37848.1240184065@localhost.localdomain> Message-ID: +1 from me. libvirt-cim-bounces at redhat.com wrote on 2009-04-20 07:34:25: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240184059 25200 > # Node ID 3220adb67645abf3784876851de4eab6748e76b3 > # Parent 7bac72ee3582b0bb822b9062234ae1989a464f60 > [TEST] For localhost migration, do not copy image file to host > > No need to do this step since the file already exists > > Signed-off-by: Kaitlin Rupert > > diff -r 7bac72ee3582 -r 3220adb67645 suites/libvirt- > cim/lib/XenKvmLib/vsmigrations.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Apr 19 > 16:30:00 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Apr 19 > 16:34:19 2009 -0700 > @@ -158,6 +158,10 @@ > logger.error("Failed to get Disk RASD info for '%s'", test_dom) > return FAIL, req_image, backup_image > > + if t_sysname == s_sysname or t_sysname in s_sysname: > + #Localhost migration, no need to copy image > + return PASS, req_image, backup_image > + > # Check if the image file with the same name already exist > on the machine. > # Back it up. Copy the required working image to the destination. > cmd = "ls -l %s" % req_image > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 20 02:07:08 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 20 Apr 2009 10:07:08 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Improve enum volumes In-Reply-To: <5706fea95239f1633296.1240182886@localhost.localdomain> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-04-20 07:14:46: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240002683 25200 > # Node ID 5706fea95239f1633296e2fbce13ada882848e13 > # Parent ced161a8198115797a6036f3f22e02d234439a76 > [TEST] Improve enum volumes > > The providers don't return a template RASD for volumes that libvirt is > unable to get volume info for. So the testsuite needs to do the same. > > Also, don't use a hardcoded disk pool name - use the default value > from const.py > > Signed-off-by: Kaitlin Rupert > > diff -r ced161a81981 -r 5706fea95239 suites/libvirt-cim/lib/XenKvmLib/pool.py > --- a/suites/libvirt-cim/lib/XenKvmLib/pool.py Wed Apr 15 20:19:312009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/pool.py Fri Apr 17 14:11:232009 -0700 > @@ -24,7 +24,7 @@ > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.classes import get_typed_class > -from XenKvmLib.const import get_provider_version > +from XenKvmLib.const import get_provider_version, default_pool_name > from XenKvmLib.enumclass import EnumInstances > from VirtLib.utils import run_remote > from XenKvmLib.xm_virt_util import virt2uri > @@ -83,13 +83,19 @@ > def enum_volumes(virt, server): > volume = 0 > cmd = "virsh -c %s vol-list %s | sed -e '1,2 d' -e '$ d'" % \ > - (virt2uri(virt), 'cimtest-diskpool') > + (virt2uri(virt), default_pool_name) > ret, out = run_remote(server ,cmd) > if ret != 0: > return None > lines = out.split("\n") > for line in lines: > - volume = volume + 1 > + vol = line.split()[0] > + cmd = "virsh vol-info --pool cimtest-diskpool meep" I think above command line is your test code when you cook up this patch, right? If yes, please remove it. Thanks! > + cmd = "virsh -c %s vol-info --pool %s %s" % (virt2uri(virt), > + default_pool_name, vol) > + ret, out = run_remote(server ,cmd) > + if ret == 0: > + volume = volume + 1 > > return volume > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 20 02:08:45 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 20 Apr 2009 10:08:45 +0800 Subject: [Libvirt-cim] Test Run Summary (Apr 20 2009): KVM on Fedora release 10 (Cambridge) with sfcb Message-ID: ================================================= Test Run Summary (Apr 20 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: 855 Libvirt-cim changeset: 4eef240f8ffc Cimtest revision: 668 Cimtest changeset: ced161a81981 ================================================= FAIL : 7 XFAIL : 4 SKIP : 15 PASS : 134 ----------------- Total : 160 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.py: FAIL ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL SettingsDefineCapabilities - 01_forward.py: FAIL VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL VirtualSystemMigrationService - 08_remote_restart_resume_migration.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 ERROR - NameError : global name 'SKIP' is not defined return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ERROR - NameError : global name 'SKIP' is not defined return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ERROR - NameError : global name 'SKIP' is not defined return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ================================================= 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: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- 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 52 ResourcePool objects instead of 56 -------------------------------------------------------------------- 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: FAIL ERROR - NameError : global name 'SKIP' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 139, in do_try File "06_remote_live_migration.py", line 113, in main status, s_sysname, t_sysname = check_mig_support(virt, options) File "/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py", line 99, in check_mig_support return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ERROR - None -------------------------------------------------------------------- VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL ERROR - NameError : global name 'SKIP' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 139, in do_try File "07_remote_offline_migration.py", line 96, in main status, s_sysname, t_sysname = check_mig_support(virt, options) File "/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py", line 99, in check_mig_support return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ERROR - None -------------------------------------------------------------------- VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: FAIL ERROR - NameError : global name 'SKIP' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 139, in do_try File "08_remote_restart_resume_migration.py", line 117, in main status, s_sysname, t_sysname = check_mig_support(virt, options) File "/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py", line 99, in check_mig_support return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ERROR - None -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 20 02:20:28 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 20 Apr 2009 10:20:28 +0800 Subject: [Libvirt-cim] Test Run Summary (Apr 20 2009): KVM on Fedora release 10 (Cambridge) with sfcb In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-04-20 10:08:45: > > ================================================= > Test Run Summary (Apr 20 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: 855 > Libvirt-cim changeset: 4eef240f8ffc > Cimtest revision: 668 > Cimtest changeset: ced161a81981 > ================================================= > FAIL : 7 > XFAIL : 4 > SKIP : 15 > PASS : 134 > ----------------- > Total : 160 > ================================================= > FAIL Test Summary: > ComputerSystemIndication - 01_created_indication.py: FAIL > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL The above two test fail because that the provider supports creating child pool and deleting. I'm working on these patches. > SettingsDefineCapabilities - 01_forward.py: FAIL The failure because of the number of DiskRASD instance. Kaitlin sent out a patch with fix. > VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL > VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL > VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: FAIL > Deepti, would you please look into these migration tests? Thanks! > ================================================= > 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 > ERROR - NameError : global name 'SKIP' is not defined > return SKIP, s_sysname, t_sysname > NameError: global name 'SKIP' is not defined > ERROR - NameError : global name 'SKIP' is not defined > return SKIP, s_sysname, t_sysname > NameError: global name 'SKIP' is not defined > ERROR - NameError : global name 'SKIP' is not defined > return SKIP, s_sysname, t_sysname > NameError: global name 'SKIP' is not defined > > ================================================= > 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: PASS > -------------------------------------------------------------------- > 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 > -------------------------------------------------------------------- > 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 52 > ResourcePool objects instead of 56 > -------------------------------------------------------------------- > 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: FAIL > ERROR - NameError : global name 'SKIP' is not defined > Traceback (most recent call last): > File "./lib/XenKvmLib/const.py", line 139, in do_try > File "06_remote_live_migration.py", line 113, in main > status, s_sysname, t_sysname = check_mig_support(virt, options) > File "/data/users/daisy/cimtest/suites/libvirt- > cim/lib/XenKvmLib/vsmigrations.py", line 99, in check_mig_support > return SKIP, s_sysname, t_sysname > NameError: global name 'SKIP' is not defined > ERROR - None > -------------------------------------------------------------------- > VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL > ERROR - NameError : global name 'SKIP' is not defined > Traceback (most recent call last): > File "./lib/XenKvmLib/const.py", line 139, in do_try > File "07_remote_offline_migration.py", line 96, in main > status, s_sysname, t_sysname = check_mig_support(virt, options) > File "/data/users/daisy/cimtest/suites/libvirt- > cim/lib/XenKvmLib/vsmigrations.py", line 99, in check_mig_support > return SKIP, s_sysname, t_sysname > NameError: global name 'SKIP' is not defined > ERROR - None > -------------------------------------------------------------------- > VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: FAIL > ERROR - NameError : global name 'SKIP' is not defined > Traceback (most recent call last): > File "./lib/XenKvmLib/const.py", line 139, in do_try > File "08_remote_restart_resume_migration.py", line 117, in main > status, s_sysname, t_sysname = check_mig_support(virt, options) > File "/data/users/daisy/cimtest/suites/libvirt- > cim/lib/XenKvmLib/vsmigrations.py", line 99, in check_mig_support > return SKIP, s_sysname, t_sysname > NameError: global name 'SKIP' is not defined > ERROR - None > -------------------------------------------------------------------- > 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 > -------------------------------------------------------------------- > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 20 02:42:26 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 20 Apr 2009 10:42:26 +0800 Subject: [Libvirt-cim] Test Run Summary (Apr 20 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus Message-ID: ================================================= Test Run Summary (Apr 20 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus ================================================= Distro: Fedora release 10.90 (Rawhide) Kernel: 2.6.29-0.24.rc0.git13.fc11.x86_64 libvirt: 0.6.2 Hypervisor: QEMU 0.10.0 CIMOM: Pegasus 2.7.2 Libvirt-cim revision: 852 Libvirt-cim changeset: 0c6f5aa107a8 Cimtest revision: 668 Cimtest changeset: ced161a81981 ================================================= FAIL : 6 XFAIL : 4 SKIP : 15 PASS : 135 ----------------- Total : 160 ================================================= FAIL Test Summary: ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL SettingsDefineCapabilities - 01_forward.py: FAIL VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL VirtualSystemMigrationService - 08_remote_restart_resume_migration.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 ERROR - NameError : global name 'SKIP' is not defined return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ERROR - NameError : global name 'SKIP' is not defined return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ERROR - NameError : global name 'SKIP' is not defined return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ================================================= 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 CIM_ERR_FAILED: 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): CIM_ERR_FAILED: 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 CIM_ERR_NOT_SUPPORTED: State not supported with return code 7 ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 CIM_ERR_INVALID_PARAMETER InvokeMethod(CreateChildResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - Unexpected rc code 4 and description CIM_ERR_INVALID_PARAMETER InvokeMethod(DeleteResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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 40 ResourcePool objects instead of 44 -------------------------------------------------------------------- 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 CIM_ERR_NOT_FOUND: 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: FAIL ERROR - NameError : global name 'SKIP' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 139, in do_try File "06_remote_live_migration.py", line 113, in main status, s_sysname, t_sysname = check_mig_support(virt, options) File "/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py", line 99, in check_mig_support return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ERROR - None -------------------------------------------------------------------- VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL ERROR - NameError : global name 'SKIP' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 139, in do_try File "07_remote_offline_migration.py", line 96, in main status, s_sysname, t_sysname = check_mig_support(virt, options) File "/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py", line 99, in check_mig_support return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ERROR - None -------------------------------------------------------------------- VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: FAIL ERROR - NameError : global name 'SKIP' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 139, in do_try File "08_remote_restart_resume_migration.py", line 117, in main status, s_sysname, t_sysname = check_mig_support(virt, options) File "/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py", line 99, in check_mig_support return SKIP, s_sysname, t_sysname NameError: global name 'SKIP' is not defined ERROR - None -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 20 02:44:57 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 20 Apr 2009 10:44:57 +0800 Subject: [Libvirt-cim] [PATCH 0 of 2] Create function for determine exp # of template RASDs In-Reply-To: Message-ID: +1 for this patch set. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2009-04-20 07:32:52: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 20 05:59:16 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 19 Apr 2009 22:59:16 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update RPCS/04 to validate that the Network child pool can be created through the providers Message-ID: # HG changeset patch # User Guolian Yun # Date 1240207150 25200 # Node ID fd53d858ff5fa251862bf36c26eafd79290c2f65 # Parent ced161a8198115797a6036f3f22e02d234439a76 [TEST] #2 Update RPCS/04 to validate that the Network child pool can be created through the providers Updates from 1 to 2: Test all types of networkpool including routed network, nat based network and isolated network Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r ced161a81981 -r fd53d858ff5f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Wed Apr 15 20:19:31 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Sun Apr 19 22:59:10 2009 -0700 @@ -41,8 +41,8 @@ # # REVISIT : # -------- -# As of now the CreateChildResourcePool() simply throws an Exception. -# We must improve this tc once the service is implemented. +# The CreateChildResourcePool() simply throws an Exception before the +# changeset number of 839, and now the service is implemented. # # -Date: 20.02.2008 @@ -52,32 +52,100 @@ 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 +from pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.enumclass import EnumInstances +from XenKvmLib.common_util import destroy_netpool cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED cim_mname = "CreateChildResourcePool" +libvirt_cim_child_pool_rev = 837 +test_pool = ["routedpool", "natpool", "isolatedpool"] + +def verify_pool(pool_list, poolname): + status = FAIL + if len(pool_list) < 1: + logger.error("Return %i instances, expected at least one instance", + len(pool_list)) + return FAIL + + for i in range(0, len(pool_list)): + ret_pool = pool_list[i].InstanceID + if ret_pool == poolname: + status = PASS + break + elif ret_pool != poolname and i == len(pool_list)-1: + logger.error("Can not find expected pool") + + return status @do_main(platform_sup) def main(): 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) - return FAIL - - logger.error("The execution should not have reached here!!") - return FAIL + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev < libvirt_cim_child_pool_rev: + 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) + return FAIL + elif curr_cim_rev >= libvirt_cim_child_pool_rev: + nprasd = get_typed_class(options.virt, + 'NetPoolResourceAllocationSettingData') + for i in range(0, len(test_pool)): + np_id = 'NetworkPool/%s' % test_pool[i] + iname = CIMInstanceName(nprasd, + namespace = 'root/virt', + keybindings = {'InstanceID':np_id}) + np_prop = { + "Address" : "192.168.0.30", + "Netmask" : "255.255.255.0", + "IPRangeStart" : "192.168.0.31", + "IPRangeEnd" : "192.168.0.57", + } + if test_pool == "routedpool": + np_prop["ForwardMode"] = "route eth1" + elif test_pool == "natpool": + np_prop["ForwardMode"] = "nat" + + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) + try: + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], + Settings=[nrasd.tomof()]) + except pywbem.CIMError, details: + logger.error("Invoke CreateChildResourcePool() error when " + "create %s", np_id) + logger.error(details) + return FAIL + + try: + np = get_typed_class(options.virt, 'NetworkPool') + netpool = EnumInstances(options.ip, np) + status = verify_pool(netpool, np_id) + if status != PASS: + raise Exception("Error in networkpool verification") + + destroy_netpool(options.ip, options.virt, test_pool[i]) + if status != PASS: + raise Exception("Unable to destroy networkpool %s" + % test_pool[i]) + except Exception, details: + logger.error(detatils) + return FAIL + + return status + if __name__ == "__main__": sys.exit(main()) From deeptik at linux.vnet.ibm.com Mon Apr 20 10:31:25 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Apr 2009 16:01:25 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Improve enum volumes In-Reply-To: <5706fea95239f1633296.1240182886@localhost.localdomain> References: <5706fea95239f1633296.1240182886@localhost.localdomain> Message-ID: <49EC4EFD.9010907@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240002683 25200 > # Node ID 5706fea95239f1633296e2fbce13ada882848e13 > # Parent ced161a8198115797a6036f3f22e02d234439a76 > [TEST] Improve enum volumes > > The providers don't return a template RASD for volumes that libvirt is > unable to get volume info for. So the testsuite needs to do the same. > > Also, don't use a hardcoded disk pool name - use the default value from const.py > > Signed-off-by: Kaitlin Rupert > > diff -r ced161a81981 -r 5706fea95239 suites/libvirt-cim/lib/XenKvmLib/pool.py > --- a/suites/libvirt-cim/lib/XenKvmLib/pool.py Wed Apr 15 20:19:31 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/pool.py Fri Apr 17 14:11:23 2009 -0700 > @@ -24,7 +24,7 @@ > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.classes import get_typed_class > -from XenKvmLib.const import get_provider_version > +from XenKvmLib.const import get_provider_version, default_pool_name > from XenKvmLib.enumclass import EnumInstances > from VirtLib.utils import run_remote > from XenKvmLib.xm_virt_util import virt2uri > @@ -83,13 +83,19 @@ > def enum_volumes(virt, server): > It would be better to pass the networkpool name as a param. We can use default_pool_name as a default value for it though. > volume = 0 > cmd = "virsh -c %s vol-list %s | sed -e '1,2 d' -e '$ d'" % \ > - (virt2uri(virt), 'cimtest-diskpool') > + (virt2uri(virt), default_pool_name) > ret, out = run_remote(server ,cmd) > if ret != 0: > return None > lines = out.split("\n") > for line in lines: > - volume = volume + 1 > + vol = line.split()[0] > + cmd = "virsh vol-info --pool cimtest-diskpool meep" > + cmd = "virsh -c %s vol-info --pool %s %s" % (virt2uri(virt), > + default_pool_name, vol) > + ret, out = run_remote(server ,cmd) > + if ret == 0: > + volume = volume + 1 > > return volume > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Apr 20 11:42:21 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Apr 2009 17:12:21 +0530 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Add get_exp_template_rasd_len() - returns the expected # of template RASD In-Reply-To: <7ce2862e03dc20cd1e6d.1240183973@localhost.localdomain> References: <7ce2862e03dc20cd1e6d.1240183973@localhost.localdomain> Message-ID: <49EC5F9D.9010900@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240183799 25200 > # Node ID 7ce2862e03dc20cd1e6d3ec9845912285d64eef1 > # Parent 5706fea95239f1633296e2fbce13ada882848e13 > [TEST] Add get_exp_template_rasd_len() - returns the expected # of template RASD > > Signed-off-by: Kaitlin Rupert > > diff -r 5706fea95239 -r 7ce2862e03dc suites/libvirt-cim/lib/XenKvmLib/rasd.py > --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Fri Apr 17 14:11:23 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Sun Apr 19 16:29:59 2009 -0700 > @@ -28,7 +28,9 @@ > from XenKvmLib.classes import get_typed_class, get_class_type > from XenKvmLib.enumclass import GetInstance, EnumInstances > from XenKvmLib.assoc import Associators > -from XenKvmLib.const import default_pool_name, default_network_name > +from XenKvmLib.const import default_pool_name, default_network_name, \ > + get_provider_version > +from XenKvmLib.pool import enum_volumes > > pasd_cn = 'ProcResourceAllocationSettingData' > nasd_cn = 'NetResourceAllocationSettingData' > @@ -302,3 +304,45 @@ > > return rasd_insts, PASS > > +def get_exp_template_rasd_len(virt, ip, id): > + libvirt_rasd_template_changes = 707 > + libvirt_rasd_new_changes = 805 > + libvirt_rasd_dpool_changes = 839 > + > + curr_cim_rev, changeset = get_provider_version(virt, ip) > + > + # For Diskpool, we have info 1 for each of Min, Max, Default, and Incr > + exp_base_num = 4 > + exp_cdrom = 4 > + > + exp_len = exp_base_num > + > + if 'DiskPool' in id: > + if virt == 'Xen' or virt == 'XenFV': > + # For Xen and XenFV, there is a template for PV and FV, so you > + # end up with double the number of templates > + xen_multi = 2 > + > + if curr_cim_rev >= libvirt_rasd_template_changes and \ > + curr_cim_rev < libvirt_rasd_new_changes: > + exp_len = exp_base_num + exp_cdrom > + > + elif curr_cim_rev >= libvirt_rasd_new_changes and \ > + curr_cim_rev < libvirt_rasd_dpool_changes: > + exp_len = (exp_base_num + exp_cdrom) * xen_multi > + > + elif curr_cim_rev >= libvirt_rasd_dpool_changes: > + volumes = enum_volumes(virt, ip) > + exp_len = (volumes * exp_base_num) * xen_multi + (exp_cdrom * 2) > I did not understand why we have exp_cdrom * 2. Can you brief on what is the expected cdrom records now ?? With the new changes what is the expected diff DiskPool informations ? > + > + elif virt == 'KVM': > + if curr_cim_rev >= libvirt_rasd_new_changes and \ > + curr_cim_rev < libvirt_rasd_dpool_changes: > + exp_len = exp_base_num + exp_cdrom > + > + elif curr_cim_rev >= libvirt_rasd_dpool_changes: > + volumes = enum_volumes(virt, ip) > + exp_len = (volumes * exp_base_num) + exp_cdrom > + > + return exp_len > + > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Apr 20 11:51:17 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Apr 2009 17:21:17 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] For localhost migration, do not copy image file to host In-Reply-To: <3220adb67645abf37848.1240184065@localhost.localdomain> References: <3220adb67645abf37848.1240184065@localhost.localdomain> Message-ID: <49EC61B5.2070906@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240184059 25200 > # Node ID 3220adb67645abf3784876851de4eab6748e76b3 > # Parent 7bac72ee3582b0bb822b9062234ae1989a464f60 > [TEST] For localhost migration, do not copy image file to host > > No need to do this step since the file already exists > > Signed-off-by: Kaitlin Rupert > > diff -r 7bac72ee3582 -r 3220adb67645 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Apr 19 16:30:00 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Apr 19 16:34:19 2009 -0700 > @@ -158,6 +158,10 @@ > logger.error("Failed to get Disk RASD info for '%s'", test_dom) > return FAIL, req_image, backup_image > > + if t_sysname == s_sysname or t_sysname in s_sysname: > + #Localhost migration, no need to copy image > + return PASS, req_image, backup_image > + > # Check if the image file with the same name already exist on the machine. > # Back it up. Copy the required working image to the destination. > cmd = "ls -l %s" % req_image > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Apr 20 11:55:53 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Apr 2009 17:25:53 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Check to see if either qemu or qemu-kvm is present on the system In-Reply-To: <6d914f871271725d4ed3.1240184163@localhost.localdomain> References: <6d914f871271725d4ed3.1240184163@localhost.localdomain> Message-ID: <49EC62C9.90608@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240184148 25200 > # Node ID 6d914f871271725d4ed31abe4e35a5846b298fea > # Parent 3220adb67645abf3784876851de4eab6748e76b3 > [TEST] Check to see if either qemu or qemu-kvm is present on the system > > If the qemu binary doesn't exist, don't fail - check qemu-kvm first. > > Signed-off-by: Kaitlin Rupert > > diff -r 3220adb67645 -r 6d914f871271 suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Sun Apr 19 16:34:19 2009 -0700 > +++ b/suites/libvirt-cim/main.py Sun Apr 19 16:35:48 2009 -0700 > @@ -107,12 +107,10 @@ > cmd = "qemu -help" > ret, out = utils.run_remote(ip, cmd) > if ret != 0: > - return "Encountered an error querying for qemu" > - > - cmd = "qemu-kvm -help" > - ret, out = utils.run_remote(ip, cmd) > - if ret != 0: > - return "Encountered an error querying for qemu-kvm " > + cmd = "qemu-kvm -help" > + ret, out = utils.run_remote(ip, cmd) > + if ret != 0: > + return "Encountered an error querying for qemu-kvm and qemu " > > cmd = "ps -ef | grep -v grep | grep cimserver" > rc, out = utils.run_remote(ip, cmd) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Apr 20 13:12:07 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Apr 2009 18:42:07 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update RPCS/04 to validate that the Network child pool can be created through the providers In-Reply-To: References: Message-ID: <49EC74A7.8060701@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1240207150 25200 > # Node ID fd53d858ff5fa251862bf36c26eafd79290c2f65 > # Parent ced161a8198115797a6036f3f22e02d234439a76 > [TEST] #2 Update RPCS/04 to validate that the Network child pool can be created through the providers > > > Updates from 1 to 2: > Test all types of networkpool including routed network, nat based network and isolated network > > Tested for KVM with current sources > Signed-off-by: Guolian Yun > > diff -r ced161a81981 -r fd53d858ff5f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py > --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Wed Apr 15 20:19:31 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Sun Apr 19 22:59:10 2009 -0700 > @@ -41,8 +41,8 @@ > # > # REVISIT : > # -------- > -# As of now the CreateChildResourcePool() simply throws an Exception. > -# We must improve this tc once the service is implemented. > +# The CreateChildResourcePool() simply throws an Exception before the > +# changeset number of 839, and now the service is implemented. > Can you include a heading as "Exception details before Revision 839 " for the earlier description and some heading like "OUTPUT details after revision 839". > # > # -Date: 20.02.2008 > This line crosses beyond 90 columns ,wrap it to 80 columns. > @@ -52,32 +52,100 @@ > 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 > +from pywbem.cim_obj import CIMInstanceName, CIMInstance > +from XenKvmLib.enumclass import EnumInstances > +from XenKvmLib.common_util import destroy_netpool > > cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED > cim_mname = "CreateChildResourcePool" > +libvirt_cim_child_pool_rev = 837 > +test_pool = ["routedpool", "natpool", "isolatedpool"] > + > +def verify_pool(pool_list, poolname): > + status = FAIL > + if len(pool_list) < 1: > + logger.error("Return %i instances, expected at least one instance", > + len(pool_list)) > + return FAIL > + > + for i in range(0, len(pool_list)): > + ret_pool = pool_list[i].InstanceID > + if ret_pool == poolname: > + status = PASS > + break > + elif ret_pool != poolname and i == len(pool_list)-1: > + logger.error("Can not find expected pool") > + > + return status > > @do_main(platform_sup) > def main(): > 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) > - return FAIL > - > - logger.error("The execution should not have reached here!!") > - return FAIL > + > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + if curr_cim_rev < libvirt_cim_child_pool_rev: > + 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) > + return FAIL > + elif curr_cim_rev >= libvirt_cim_child_pool_rev: > + nprasd = get_typed_class(options.virt, > + 'NetPoolResourceAllocationSettingData') > + for i in range(0, len(test_pool)): > + np_id = 'NetworkPool/%s' % test_pool[i] > + iname = CIMInstanceName(nprasd, > + namespace = 'root/virt', > You can use CIM_NS from const.py instead of hardcoding. > + keybindings = {'InstanceID':np_id}) > + np_prop = { > + "Address" : "192.168.0.30", > + "Netmask" : "255.255.255.0", > + "IPRangeStart" : "192.168.0.31", > + "IPRangeEnd" : "192.168.0.57", > + } > Since these information does not change for through the loop you can probably declare it outside the loop. Also, you probably want to check if the IP is already used on the system. You can do something like this: n_list = net_list(server, virt) for _net_name in n_list: cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \ cut -d ' ' -f 4 | sed 's/address=//'" % _net_name s, in_use_addr = utils.run_remote(server, cmd) in_use_addr = in_use_addr.strip("'") if in_use_addr == addr: logger.error("IP address is in use by a different network") return FAIL or something better. > + if test_pool == "routedpool": > you should check for test_pool[i] not test_pool or else we endup checking the isolated netpool type. > + np_prop["ForwardMode"] = "route eth1" > I know using route eth1 works.. but to make it more close to the real system, can we use the ifconfig to use one of the eth 's. > + elif test_pool == "natpool": > + np_prop["ForwardMode"] = "nat" > + > + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) > + try: > + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], > + Settings=[nrasd.tomof()]) > + except pywbem.CIMError, details: > + logger.error("Invoke CreateChildResourcePool() error when " > + "create %s", np_id) > + logger.error(details) > + return FAIL > + > + try: > + np = get_typed_class(options.virt, 'NetworkPool') > + netpool = EnumInstances(options.ip, np) > + status = verify_pool(netpool, np_id) > + if status != PASS: > + raise Exception("Error in networkpool verification") > + > + destroy_netpool(options.ip, options.virt, test_pool[i]) > + if status != PASS: > + raise Exception("Unable to destroy networkpool %s" > + % test_pool[i]) > + except Exception, details: > + logger.error(detatils) > + return FAIL > + > Since in the exception block you are not checking for anything specific, instead of using two try, except... blocks you can open the try block immediately after the for loop like the one below: for i in range(0, len(test_pool)): try: np_id = 'NetworkPool/%s' % test_pool[i] ...... except Exception, details: logger.error("Exception Details: %s", details) return FAIL This will reduce the no of return statements as well. > + return status > You should undefine the netpools before returning from the tests otherwise the test will fail for the next run. > + > if __name__ == "__main__": > sys.exit(main()) > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Apr 20 16:19:45 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 20 Apr 2009 09:19:45 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding the missing SKIP import stmt Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1240244367 25200 # Node ID ee7cca75f1e6e46e16dc2f21868ae8836661eb8e # Parent ced161a8198115797a6036f3f22e02d234439a76 [TEST] Adding the missing SKIP import stmt. Signed-off-by: Deepti B. Kalakeri diff -r ced161a81981 -r ee7cca75f1e6 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Apr 15 20:19:31 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Mon Apr 20 09:19:27 2009 -0700 @@ -27,7 +27,7 @@ from VirtLib import utils from pywbem import WBEMConnection, CIMInstanceName from CimTest.CimExt import CIMMethodClass, CIMClassMOF -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, SKIP from XenKvmLib.enumclass import EnumInstances from XenKvmLib.classes import get_typed_class, virt_types from XenKvmLib.xm_virt_util import domain_list From kaitlin at linux.vnet.ibm.com Mon Apr 20 18:14:36 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Apr 2009 11:14:36 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] Allow users to specify NIC model type Message-ID: From kaitlin at linux.vnet.ibm.com Mon Apr 20 18:14:39 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Apr 2009 11:14:39 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] Expose NetRASD templates with interface model specified In-Reply-To: References: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1240250572 25200 # Node ID e5000891e231e6b9896786e48442ef98bfe9f9fd # Parent 7456dabe495895b047b9308c38506cbba1fc0507 Expose NetRASD templates with interface model specified. Signed-off-by: Kaitlin Rupert diff -r 7456dabe4958 -r e5000891e231 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Mon Apr 20 11:00:16 2009 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Mon Apr 20 11:02:52 2009 -0700 @@ -524,6 +524,34 @@ return ret; } +static CMPIStatus set_net_props(int type, + const CMPIObjectPath *ref, + const char *id, + uint64_t num_nics, + const char *model, + struct inst_list *list) +{ + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_NET); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; + + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&num_nics, CMPI_uint64); + + if (model != NULL) + CMSetProperty(inst, "ResourceSubType", + (CMPIValue *)model, CMPI_chars); + + inst_list_add(list, inst); + + out: + return s; +} + static CMPIStatus net_template(const CMPIObjectPath *ref, int template_type, struct inst_list *list) @@ -531,7 +559,6 @@ bool ret; uint64_t num_nics; const char *id; - CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; switch (template_type) { @@ -560,15 +587,12 @@ goto out; } - inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_NET); - if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + + s = set_net_props(template_type, ref, id, num_nics, "e1000", list); + if (s.rc != CMPI_RC_OK) goto out; - - CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); - CMSetProperty(inst, "VirtualQuantity", - (CMPIValue *)&num_nics, CMPI_uint64); - - inst_list_add(list, inst); + + s = set_net_props(template_type, ref, id, num_nics, NULL, list); out: return s; From kaitlin at linux.vnet.ibm.com Mon Apr 20 18:14:38 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Apr 2009 11:14:38 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Add support for specifying the NIC model type In-Reply-To: References: Message-ID: <7456dabe495895b047b9.1240251278@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240250416 25200 # Node ID 7456dabe495895b047b9308c38506cbba1fc0507 # Parent bca16d22da253f390a74fb08d4f61f7419308dba Add support for specifying the NIC model type libvirt only supports this for KVM guests currently. Signed-off-by: Kaitlin Rupert diff -r bca16d22da25 -r 7456dabe4958 src/Virt_RASD.c --- a/src/Virt_RASD.c Mon Apr 20 11:00:16 2009 -0700 +++ b/src/Virt_RASD.c Mon Apr 20 11:00:16 2009 -0700 @@ -398,6 +398,12 @@ "Address", (CMPIValue *)dev->dev.net.mac, CMPI_chars); + + if (dev->dev.net.model != NULL) + CMSetProperty(inst, + "ResourceSubType", + (CMPIValue *)dev->dev.net.model, + CMPI_chars); } else if (dev->type == CIM_RES_TYPE_MEM) { const char *units = "KiloBytes"; diff -r bca16d22da25 -r 7456dabe4958 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Mon Apr 20 11:00:16 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Mon Apr 20 11:00:16 2009 -0700 @@ -495,6 +495,12 @@ free(dev->dev.net.source); dev->dev.net.source = name_from_pool_id(val); + free(dev->dev.net.model); + if (cu_get_str_prop(inst, "ResourceSubType", &val) != CMPI_RC_OK) + dev->dev.net.model = NULL; + else + dev->dev.net.model = strdup(val); + out: return msg; } From kaitlin at linux.vnet.ibm.com Mon Apr 20 18:14:37 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Apr 2009 11:14:37 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Add support for parsing and generating XML for the NIC model type tag In-Reply-To: References: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1240250416 25200 # Node ID bca16d22da253f390a74fb08d4f61f7419308dba # Parent 146ed7d63fbbc2edc78660ddc6ecc393ee61739c Add support for parsing and generating XML for the NIC model type tag Signed-off-by: Kaitlin Rupert diff -r 146ed7d63fbb -r bca16d22da25 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Thu Apr 16 11:20:21 2009 -0700 +++ b/libxkutil/device_parsing.c Mon Apr 20 11:00:16 2009 -0700 @@ -66,6 +66,7 @@ free(dev->type); free(dev->mac); free(dev->source); + free(dev->model); } static void cleanup_emu_device(struct emu_device *dev) @@ -311,6 +312,10 @@ if (ndev->source != NULL) continue; goto err; + } else if (XSTREQ(child->name, "model")) { + ndev->model = get_attr_value(child, "type"); + if (ndev->model == NULL) + goto err; } } diff -r 146ed7d63fbb -r bca16d22da25 libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Thu Apr 16 11:20:21 2009 -0700 +++ b/libxkutil/device_parsing.h Mon Apr 20 11:00:16 2009 -0700 @@ -45,6 +45,7 @@ char *type; char *mac; char *source; + char *model; }; struct mem_device { diff -r 146ed7d63fbb -r bca16d22da25 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Thu Apr 16 11:20:21 2009 -0700 +++ b/libxkutil/xmlgen.c Mon Apr 20 11:00:16 2009 -0700 @@ -210,6 +210,13 @@ return XML_ERROR; xmlNewProp(tmp, BAD_CAST "address", BAD_CAST net->mac); + if (net->model != NULL) { + tmp = xmlNewChild(nic, NULL, BAD_CAST "model", NULL); + if (tmp == NULL) + return XML_ERROR; + xmlNewProp(tmp, BAD_CAST "type", BAD_CAST net->model); + } + if (STREQ(dev->dev.net.type, "network")) msg = set_net_source(nic, net, "network"); else if (STREQ(dev->dev.net.type, "bridge")) From kaitlin at linux.vnet.ibm.com Mon Apr 20 18:19:13 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Apr 2009 11:19:13 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] (#2) Improve enum volumes Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1240002683 25200 # Node ID eea660ff3ad6e589f76bf17b3697d30465e54398 # Parent ced161a8198115797a6036f3f22e02d234439a76 [TEST] (#2) Improve enum volumes The providers don't return a template RASD for volumes that libvirt is unable to get volume info for. So the testsuite needs to do the same. Also, don't use a hardcoded disk pool name - use the default value from const.py Updates: -Remove test code -Allow caller to specify pool name, or use default pool name if one isn't specified Signed-off-by: Kaitlin Rupert diff -r ced161a81981 -r eea660ff3ad6 suites/libvirt-cim/lib/XenKvmLib/pool.py --- a/suites/libvirt-cim/lib/XenKvmLib/pool.py Wed Apr 15 20:19:31 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/pool.py Fri Apr 17 14:11:23 2009 -0700 @@ -24,7 +24,7 @@ from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.classes import get_typed_class -from XenKvmLib.const import get_provider_version +from XenKvmLib.const import get_provider_version, default_pool_name from XenKvmLib.enumclass import EnumInstances from VirtLib.utils import run_remote from XenKvmLib.xm_virt_util import virt2uri @@ -80,16 +80,20 @@ return pool_insts, PASS -def enum_volumes(virt, server): +def enum_volumes(virt, server, pooln=default_pool_name): volume = 0 cmd = "virsh -c %s vol-list %s | sed -e '1,2 d' -e '$ d'" % \ - (virt2uri(virt), 'cimtest-diskpool') + (virt2uri(virt), default_pool_name) ret, out = run_remote(server ,cmd) if ret != 0: return None lines = out.split("\n") for line in lines: - volume = volume + 1 + vol = line.split()[0] + cmd = "virsh -c %s vol-info --pool %s %s" % (virt2uri(virt), pooln, vol) + ret, out = run_remote(server ,cmd) + if ret == 0: + volume = volume + 1 return volume From kaitlin at linux.vnet.ibm.com Mon Apr 20 18:31:51 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Apr 2009 11:31:51 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Add get_exp_template_rasd_len() - returns the expected # of template RASD In-Reply-To: <49EC5F9D.9010900@linux.vnet.ibm.com> References: <7ce2862e03dc20cd1e6d.1240183973@localhost.localdomain> <49EC5F9D.9010900@linux.vnet.ibm.com> Message-ID: <49ECBF97.8090404@linux.vnet.ibm.com> >> + >> + exp_len = exp_base_num >> + >> + if 'DiskPool' in id: >> + if virt == 'Xen' or virt == 'XenFV': >> + # For Xen and XenFV, there is a template for PV and FV, >> so you + # end up with double the number of templates >> + xen_multi = 2 >> + >> + if curr_cim_rev >= libvirt_rasd_template_changes and \ >> + curr_cim_rev < libvirt_rasd_new_changes: >> + exp_len = exp_base_num + exp_cdrom >> + >> + elif curr_cim_rev >= libvirt_rasd_new_changes and \ >> + curr_cim_rev < libvirt_rasd_dpool_changes: >> + exp_len = (exp_base_num + exp_cdrom) * xen_multi + >> + elif curr_cim_rev >= libvirt_rasd_dpool_changes: >> + volumes = enum_volumes(virt, ip) >> + exp_len = (volumes * exp_base_num) * xen_multi + >> (exp_cdrom * 2) >> > I did not understand why we have exp_cdrom * 2. Oops.. this should have been exp_cdrom * xen_multi (4 CDROM instances for PV guests, 4 CDROM instances for FV guests). I'll resend with a fix for this. > Can you brief on what is the expected cdrom records now ?? The CDROM template generation code in libvirt hasn't changed. 4 instances for CDROM are generated (max, min, incr, def). For Xen, we generate a set of max, min, incr, def for PV and for FV. So you see 8 templates in the Xen case. > With the new changes what is the expected diff DiskPool informations ? Are you talking about the recent provider changes? Here's the steps: 1) For min, max, incr, def: a) For each storage volume in the storage pool do: i) Checks to see if we can get info on the storage volume. ii) If libvirt is able to get the info, generate an instance b) Generate a CDROM inst (for Xen, generate one for PV and one for FV) >> + >> + elif virt == 'KVM': >> + if curr_cim_rev >= libvirt_rasd_new_changes and \ >> + curr_cim_rev < libvirt_rasd_dpool_changes: >> + exp_len = exp_base_num + exp_cdrom >> + >> + elif curr_cim_rev >= libvirt_rasd_dpool_changes: >> + volumes = enum_volumes(virt, ip) >> + exp_len = (volumes * exp_base_num) + exp_cdrom >> + >> + return exp_len >> + -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 20 18:35:57 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Apr 2009 11:35:57 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 Create function for determine exp # of template RASDs Message-ID: From kaitlin at linux.vnet.ibm.com Mon Apr 20 18:35:59 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Apr 2009 11:35:59 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Update tests to use get_exp_template_rasd_len() In-Reply-To: References: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1240252517 25200 # Node ID e2dcfef8f97127a0d191f0f148c62a0ce49a21a5 # Parent 100c1a61b0b48a5afdfed3758bc01e0ea8d29b08 [TEST] Update tests to use get_exp_template_rasd_len() This way, the template RASD calculation only needs to be updated in one place if it changes in the future. Signed-off-by: Kaitlin Rupert diff -r 100c1a61b0b4 -r e2dcfef8f971 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Mon Apr 20 11:35:00 2009 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Mon Apr 20 11:35:17 2009 -0700 @@ -29,13 +29,15 @@ # Steps: # 1. Create a guest. # 2. Enumerate the HostSystem . -# 3. Using the HostedResourcePool association, get the HostSystem instances on the system -# 4. Using the ElementCapabilities association get the ProcessorPool, MemPool, DiskPool & -# NetPool instances on the system. -# 5. Using the SettingsDefineCapabilities association on the AllocationCapabilities, get -# the (Default, Minimum, Maximum and Increment) instances for ProcRASD. -# 6. Similarly for the MemRASD, DiskRASD & NetRASD get the SettingDefineCap assocn and \ -# get the instances for (Def, Min, Max and Inc). +# 3. Using the HostedResourcePool association, get the HostSystem instances +# on the system +# 4. Using the ElementCapabilities association get the ProcessorPool, +# MemPool, DiskPool & NetPool instances on the system. +# 5. Using the SettingsDefineCapabilities association on the +# AllocationCapabilities, get the (Default, Minimum, Maximum and +# Increment) instances for ProcRASD. +# 6. Similarly for the MemRASD, DiskRASD & NetRASD get the SettingDefineCap +# assocn and get the instances for (Def, Min, Max and Inc). # # Feb 13 2008 @@ -50,15 +52,11 @@ from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_xml import testxml from XenKvmLib.test_doms import destroy_and_undefine_all -from XenKvmLib.const import get_provider_version -from XenKvmLib.pool import enum_volumes +from XenKvmLib.rasd import get_exp_template_rasd_len sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "domgst_test" test_vcpus = 1 -libvirt_rasd_template_changes = 707 -libvirt_rasd_new_changes = 805 -libvirt_rasd_dpool_changes = 839 def setup_env(server, virt="Xen"): status = PASS @@ -173,7 +171,8 @@ InstanceID = inst['InstanceID']) if len(assoc_info) < 1: - logger.error("'%s' has returned %i objects", an, len(assoc_info)) + logger.error("'%s' has returned %i objects", an, + len(assoc_info)) status = FAIL return status, alloccap @@ -181,10 +180,10 @@ if c != inst.classname: continue status, setdefcap = get_inst_from_list(an, - c, - assoc_info, - filter, - rt ) + c, + assoc_info, + filter, + rt ) if status != FAIL: alloccap.append(setdefcap) @@ -216,25 +215,7 @@ ccn, InstanceID = ap['InstanceID']) - curr_cim_rev, changeset = get_provider_version(virt, server) - exp_len = 4 - if 'DiskPool' in ap['InstanceID']: - # For Diskpool, we have info 1 for each of Min, Max, - # default, Increment and 1 for each of PV and FV - # hence 4 * 2 = 8 records - if virt == 'Xen': - if curr_cim_rev >= libvirt_rasd_template_changes and \ - curr_cim_rev < libvirt_rasd_new_changes: - exp_len = 8 - if curr_cim_rev >= libvirt_rasd_new_changes: - exp_len = 16 - if virt == 'KVM': - if curr_cim_rev >= libvirt_rasd_new_changes and \ - curr_cim_rev < libvirt_rasd_dpool_changes: - exp_len = 8 - if curr_cim_rev >= libvirt_rasd_dpool_changes: - volumes = enum_volumes(virt, server) - exp_len = volumes * 4 + exp_len = get_exp_template_rasd_len(virt, server, ap['InstanceID']) if len(assoc_info) != exp_len: logger.error("'%s' returned %i RASD objects instead of %i", diff -r 100c1a61b0b4 -r e2dcfef8f971 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Mon Apr 20 11:35:00 2009 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Mon Apr 20 11:35:17 2009 -0700 @@ -63,13 +63,9 @@ from XenKvmLib.const import do_main, default_pool_name, default_network_name from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import print_field_error -from XenKvmLib.const import get_provider_version -from XenKvmLib.pool import enum_volumes +from XenKvmLib.rasd import get_exp_template_rasd_len platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] -libvirt_rasd_template_changes = 707 -libvirt_rasd_new_changes = 805 -libvirt_rasd_dpool_changes = 839 memid = "MemoryPool/0" procid = "ProcessorPool/0" @@ -173,25 +169,7 @@ assoc_info = assoc.Associators(server, assoc_cname, cn, InstanceID = instid) - curr_cim_rev, changeset = get_provider_version(virt, server) - exp_len = 4 - if 'DiskPool' in instid: - # For Diskpool, we have info 1 for each of Min, Max, - # default, Increment and 1 for each of PV and FV - # hence 4 * 2 = 8 records - if virt == 'Xen' or virt == 'XenFV': - if curr_cim_rev >= libvirt_rasd_template_changes and \ - curr_cim_rev < libvirt_rasd_new_changes: - exp_len = 8 - if curr_cim_rev >= libvirt_rasd_new_changes: - exp_len = 16 - if virt == 'KVM': - if curr_cim_rev >= libvirt_rasd_new_changes and \ - curr_cim_rev < libvirt_rasd_dpool_changes: - exp_len = 8 - if curr_cim_rev >= libvirt_rasd_dpool_changes: - volumes = enum_volumes(virt, server) - exp_len = volumes * 4 + exp_len = get_exp_template_rasd_len(virt, server, instid) if len(assoc_info) != exp_len: logger.error("%s returned %i ResourcePool objects instead" From kaitlin at linux.vnet.ibm.com Mon Apr 20 18:35:58 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Apr 2009 11:35:58 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] #2 Add get_exp_template_rasd_len() - returns the expected # of template RASD In-Reply-To: References: Message-ID: <100c1a61b0b48a5afdfe.1240252558@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240252500 25200 # Node ID 100c1a61b0b48a5afdfed3758bc01e0ea8d29b08 # Parent 90251a5a9af463cbfbbeb74ed819e0df4faf0f4f [TEST] #2 Add get_exp_template_rasd_len() - returns the expected # of template RASD Updates: -Remove hardcoded 2 value - use xen_multi instead Signed-off-by: Kaitlin Rupert diff -r 90251a5a9af4 -r 100c1a61b0b4 suites/libvirt-cim/lib/XenKvmLib/rasd.py --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Fri Apr 17 14:11:23 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Mon Apr 20 11:35:00 2009 -0700 @@ -28,7 +28,9 @@ from XenKvmLib.classes import get_typed_class, get_class_type from XenKvmLib.enumclass import GetInstance, EnumInstances from XenKvmLib.assoc import Associators -from XenKvmLib.const import default_pool_name, default_network_name +from XenKvmLib.const import default_pool_name, default_network_name, \ + get_provider_version +from XenKvmLib.pool import enum_volumes pasd_cn = 'ProcResourceAllocationSettingData' nasd_cn = 'NetResourceAllocationSettingData' @@ -302,3 +304,45 @@ return rasd_insts, PASS +def get_exp_template_rasd_len(virt, ip, id): + libvirt_rasd_template_changes = 707 + libvirt_rasd_new_changes = 805 + libvirt_rasd_dpool_changes = 839 + + curr_cim_rev, changeset = get_provider_version(virt, ip) + + # For Diskpool, we have info 1 for each of Min, Max, Default, and Incr + exp_base_num = 4 + exp_cdrom = 4 + + exp_len = exp_base_num + + if 'DiskPool' in id: + if virt == 'Xen' or virt == 'XenFV': + # For Xen and XenFV, there is a template for PV and FV, so you + # end up with double the number of templates + xen_multi = 2 + + if curr_cim_rev >= libvirt_rasd_template_changes and \ + curr_cim_rev < libvirt_rasd_new_changes: + exp_len = exp_base_num + exp_cdrom + + elif curr_cim_rev >= libvirt_rasd_new_changes and \ + curr_cim_rev < libvirt_rasd_dpool_changes: + exp_len = (exp_base_num + exp_cdrom) * xen_multi + + elif curr_cim_rev >= libvirt_rasd_dpool_changes: + volumes = enum_volumes(virt, ip) + exp_len = ((volumes * exp_base_num) + exp_cdrom) * xen_multi + + elif virt == 'KVM': + if curr_cim_rev >= libvirt_rasd_new_changes and \ + curr_cim_rev < libvirt_rasd_dpool_changes: + exp_len = exp_base_num + exp_cdrom + + elif curr_cim_rev >= libvirt_rasd_dpool_changes: + volumes = enum_volumes(virt, ip) + exp_len = (volumes * exp_base_num) + exp_cdrom + + return exp_len + From yunguol at cn.ibm.com Tue Apr 21 01:40:56 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 21 Apr 2009 09:40:56 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] (#2) Improve enum volumes In-Reply-To: Message-ID: +1 from me. libvirt-cim-bounces at redhat.com wrote on 2009-04-21 02:19:13: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240002683 25200 > # Node ID eea660ff3ad6e589f76bf17b3697d30465e54398 > # Parent ced161a8198115797a6036f3f22e02d234439a76 > [TEST] (#2) Improve enum volumes > > The providers don't return a template RASD for volumes that libvirt is > unable to get volume info for. So the testsuite needs to do the same. > > Also, don't use a hardcoded disk pool name - use the default value > from const.py > > Updates: > -Remove test code > -Allow caller to specify pool name, or use default pool name if one isn't > specified > > Signed-off-by: Kaitlin Rupert > > diff -r ced161a81981 -r eea660ff3ad6 suites/libvirt-cim/lib/XenKvmLib/pool.py > --- a/suites/libvirt-cim/lib/XenKvmLib/pool.py Wed Apr 15 20:19:312009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/pool.py Fri Apr 17 14:11:232009 -0700 > @@ -24,7 +24,7 @@ > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.classes import get_typed_class > -from XenKvmLib.const import get_provider_version > +from XenKvmLib.const import get_provider_version, default_pool_name > from XenKvmLib.enumclass import EnumInstances > from VirtLib.utils import run_remote > from XenKvmLib.xm_virt_util import virt2uri > @@ -80,16 +80,20 @@ > > return pool_insts, PASS > > -def enum_volumes(virt, server): > +def enum_volumes(virt, server, pooln=default_pool_name): > volume = 0 > cmd = "virsh -c %s vol-list %s | sed -e '1,2 d' -e '$ d'" % \ > - (virt2uri(virt), 'cimtest-diskpool') > + (virt2uri(virt), default_pool_name) > ret, out = run_remote(server ,cmd) > if ret != 0: > return None > lines = out.split("\n") > for line in lines: > - volume = volume + 1 > + vol = line.split()[0] > + cmd = "virsh -c %s vol-info --pool %s %s" % > (virt2uri(virt), pooln, vol) > + ret, out = run_remote(server ,cmd) > + if ret == 0: > + volume = volume + 1 > > return volume > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Tue Apr 21 01:41:29 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 21 Apr 2009 09:41:29 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Adding the missing SKIP import stmt In-Reply-To: Message-ID: +1 from me. libvirt-cim-bounces at redhat.com wrote on 2009-04-21 00:19:45: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1240244367 25200 > # Node ID ee7cca75f1e6e46e16dc2f21868ae8836661eb8e > # Parent ced161a8198115797a6036f3f22e02d234439a76 > [TEST] Adding the missing SKIP import stmt. > > Signed-off-by: Deepti B. Kalakeri > > diff -r ced161a81981 -r ee7cca75f1e6 suites/libvirt- > cim/lib/XenKvmLib/vsmigrations.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Apr 15 > 20:19:31 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Mon Apr 20 > 09:19:27 2009 -0700 > @@ -27,7 +27,7 @@ > from VirtLib import utils > from pywbem import WBEMConnection, CIMInstanceName > from CimTest.CimExt import CIMMethodClass, CIMClassMOF > -from CimTest.ReturnCodes import PASS, FAIL > +from CimTest.ReturnCodes import PASS, FAIL, SKIP > from XenKvmLib.enumclass import EnumInstances > from XenKvmLib.classes import get_typed_class, virt_types > from XenKvmLib.xm_virt_util import domain_list > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Tue Apr 21 06:03:47 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 21 Apr 2009 11:33:47 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] (#2) Improve enum volumes In-Reply-To: References: Message-ID: <49ED61C3.3020905@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240002683 25200 > # Node ID eea660ff3ad6e589f76bf17b3697d30465e54398 > # Parent ced161a8198115797a6036f3f22e02d234439a76 > [TEST] (#2) Improve enum volumes > > The providers don't return a template RASD for volumes that libvirt is > unable to get volume info for. So the testsuite needs to do the same. > The information that libvirt virsh pool-list is returning is not completely correct: For ex: virsh -c qemu:///system vol-list cimtest-diskpoolName Path ----------------------------------------- .X0-lock /tmp/.X0-lock cimtest.uuid /tmp/cimtest.uuid default-kvm-dimage /tmp/default-kvm-dimage tmpnsIv8q /tmp/tmpnsIv8q The last pool information tmpnsIv8q does not seem to exist on the machine, hence when I ran the HostSystem/03_hs_to_settdefcap.py it failed with the following error: ------------------------------------------------------------------------------------------------------------------------------- ERROR - 'KVM_SettingsDefineCapabilities' returned 0 RASD objects instead of 16 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem CIM_ERR_FAILED: Unable to get volume information: cannot open volume '/tmp/tmpnsIv8q': No such file or directory ------------------------------------------------------------------------------------------------------------------------------- The test case passed after I created the file /tmp/tmpnsIv8q. I am not sure if this is the limitation from libvirt side or if its a feature with libvirt. Anyways +1 for these changes. > Also, don't use a hardcoded disk pool name - use the default value from const.py > > Updates: > -Remove test code > -Allow caller to specify pool name, or use default pool name if one isn't > specified > > Signed-off-by: Kaitlin Rupert > > diff -r ced161a81981 -r eea660ff3ad6 suites/libvirt-cim/lib/XenKvmLib/pool.py > --- a/suites/libvirt-cim/lib/XenKvmLib/pool.py Wed Apr 15 20:19:31 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/pool.py Fri Apr 17 14:11:23 2009 -0700 > @@ -24,7 +24,7 @@ > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.classes import get_typed_class > -from XenKvmLib.const import get_provider_version > +from XenKvmLib.const import get_provider_version, default_pool_name > from XenKvmLib.enumclass import EnumInstances > from VirtLib.utils import run_remote > from XenKvmLib.xm_virt_util import virt2uri > @@ -80,16 +80,20 @@ > > return pool_insts, PASS > > -def enum_volumes(virt, server): > +def enum_volumes(virt, server, pooln=default_pool_name): > volume = 0 > cmd = "virsh -c %s vol-list %s | sed -e '1,2 d' -e '$ d'" % \ > - (virt2uri(virt), 'cimtest-diskpool') > + (virt2uri(virt), default_pool_name) > ret, out = run_remote(server ,cmd) > if ret != 0: > return None > lines = out.split("\n") > for line in lines: > - volume = volume + 1 > + vol = line.split()[0] > + cmd = "virsh -c %s vol-info --pool %s %s" % (virt2uri(virt), pooln, vol) > + ret, out = run_remote(server ,cmd) > + if ret == 0: > + volume = volume + 1 > > return volume > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Apr 21 06:04:25 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 21 Apr 2009 11:34:25 +0530 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] #2 Add get_exp_template_rasd_len() - returns the expected # of template RASD In-Reply-To: <100c1a61b0b48a5afdfe.1240252558@localhost.localdomain> References: <100c1a61b0b48a5afdfe.1240252558@localhost.localdomain> Message-ID: <49ED61E9.9060808@linux.vnet.ibm.com> +1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Apr 21 06:32:20 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 21 Apr 2009 12:02:20 +0530 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Update tests to use get_exp_template_rasd_len() In-Reply-To: References: Message-ID: <49ED6874.7000008@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240252517 25200 > # Node ID e2dcfef8f97127a0d191f0f148c62a0ce49a21a5 > # Parent 100c1a61b0b48a5afdfed3758bc01e0ea8d29b08 > [TEST] Update tests to use get_exp_template_rasd_len() > > This way, the template RASD calculation only needs to be updated in one > place if it changes in the future. > > Signed-off-by: Kaitlin Rupert > > diff -r 100c1a61b0b4 -r e2dcfef8f971 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py > --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Mon Apr 20 11:35:00 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Mon Apr 20 11:35:17 2009 -0700 > @@ -29,13 +29,15 @@ > # Steps: > # 1. Create a guest. > # 2. Enumerate the HostSystem . > -# 3. Using the HostedResourcePool association, get the HostSystem instances on the system > -# 4. Using the ElementCapabilities association get the ProcessorPool, MemPool, DiskPool & > -# NetPool instances on the system. > -# 5. Using the SettingsDefineCapabilities association on the AllocationCapabilities, get > -# the (Default, Minimum, Maximum and Increment) instances for ProcRASD. > -# 6. Similarly for the MemRASD, DiskRASD & NetRASD get the SettingDefineCap assocn and \ > -# get the instances for (Def, Min, Max and Inc). > +# 3. Using the HostedResourcePool association, get the HostSystem instances > +# on the system > +# 4. Using the ElementCapabilities association get the ProcessorPool, > +# MemPool, DiskPool & NetPool instances on the system. > +# 5. Using the SettingsDefineCapabilities association on the > +# AllocationCapabilities, get the (Default, Minimum, Maximum and > +# Increment) instances for ProcRASD. > +# 6. Similarly for the MemRASD, DiskRASD & NetRASD get the SettingDefineCap > +# assocn and get the instances for (Def, Min, Max and Inc). > # > # Feb 13 2008 > > @@ -50,15 +52,11 @@ > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.test_xml import testxml > from XenKvmLib.test_doms import destroy_and_undefine_all > -from XenKvmLib.const import get_provider_version > -from XenKvmLib.pool import enum_volumes > +from XenKvmLib.rasd import get_exp_template_rasd_len > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > test_dom = "domgst_test" > test_vcpus = 1 > -libvirt_rasd_template_changes = 707 > -libvirt_rasd_new_changes = 805 > -libvirt_rasd_dpool_changes = 839 > > def setup_env(server, virt="Xen"): > status = PASS > @@ -173,7 +171,8 @@ > InstanceID = inst['InstanceID']) > > if len(assoc_info) < 1: > - logger.error("'%s' has returned %i objects", an, len(assoc_info)) > + logger.error("'%s' has returned %i objects", an, > + len(assoc_info)) > status = FAIL > return status, alloccap > > @@ -181,10 +180,10 @@ > if c != inst.classname: > continue > status, setdefcap = get_inst_from_list(an, > - c, > - assoc_info, > - filter, > - rt ) > + c, > + assoc_info, > + filter, > + rt ) > if status != FAIL: > alloccap.append(setdefcap) > > @@ -216,25 +215,7 @@ > ccn, > InstanceID = ap['InstanceID']) > > - curr_cim_rev, changeset = get_provider_version(virt, server) > - exp_len = 4 > - if 'DiskPool' in ap['InstanceID']: > - # For Diskpool, we have info 1 for each of Min, Max, > - # default, Increment and 1 for each of PV and FV > - # hence 4 * 2 = 8 records > - if virt == 'Xen': > - if curr_cim_rev >= libvirt_rasd_template_changes and \ > - curr_cim_rev < libvirt_rasd_new_changes: > - exp_len = 8 > - if curr_cim_rev >= libvirt_rasd_new_changes: > - exp_len = 16 > - if virt == 'KVM': > - if curr_cim_rev >= libvirt_rasd_new_changes and \ > - curr_cim_rev < libvirt_rasd_dpool_changes: > - exp_len = 8 > - if curr_cim_rev >= libvirt_rasd_dpool_changes: > - volumes = enum_volumes(virt, server) > - exp_len = volumes * 4 > + exp_len = get_exp_template_rasd_len(virt, server, ap['InstanceID']) > > ------------------------------------------------------------------------------------------------------------------------------- ERROR - 'KVM_SettingsDefineCapabilities' returned 0 RASD objects instead of 16 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem CIM_ERR_FAILED: Unable to get volume information: cannot open volume '/tmp/tmpnsIv8q': No such file or directory ------------------------------------------------------------------------------------------------------------------------------- > if len(assoc_info) != exp_len: > logger.error("'%s' returned %i RASD objects instead of %i", > diff -r 100c1a61b0b4 -r e2dcfef8f971 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py > --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Mon Apr 20 11:35:00 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Mon Apr 20 11:35:17 2009 -0700 > @@ -63,13 +63,9 @@ > from XenKvmLib.const import do_main, default_pool_name, default_network_name > from XenKvmLib.classes import get_typed_class > from XenKvmLib.common_util import print_field_error > -from XenKvmLib.const import get_provider_version > -from XenKvmLib.pool import enum_volumes > +from XenKvmLib.rasd import get_exp_template_rasd_len > > platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] > -libvirt_rasd_template_changes = 707 > -libvirt_rasd_new_changes = 805 > -libvirt_rasd_dpool_changes = 839 > > memid = "MemoryPool/0" > procid = "ProcessorPool/0" > @@ -173,25 +169,7 @@ > assoc_info = assoc.Associators(server, assoc_cname, cn, > InstanceID = instid) > > - curr_cim_rev, changeset = get_provider_version(virt, server) > - exp_len = 4 > - if 'DiskPool' in instid: > - # For Diskpool, we have info 1 for each of Min, Max, > - # default, Increment and 1 for each of PV and FV > - # hence 4 * 2 = 8 records > - if virt == 'Xen' or virt == 'XenFV': > - if curr_cim_rev >= libvirt_rasd_template_changes and \ > - curr_cim_rev < libvirt_rasd_new_changes: > - exp_len = 8 > - if curr_cim_rev >= libvirt_rasd_new_changes: > - exp_len = 16 > - if virt == 'KVM': > - if curr_cim_rev >= libvirt_rasd_new_changes and \ > - curr_cim_rev < libvirt_rasd_dpool_changes: > - exp_len = 8 > - if curr_cim_rev >= libvirt_rasd_dpool_changes: > - volumes = enum_volumes(virt, server) > - exp_len = volumes * 4 > + exp_len = get_exp_template_rasd_len(virt, server, instid) > > if len(assoc_info) != exp_len: > logger.error("%s returned %i ResourcePool objects instead" > > This tc failed with the following err: ------------------------------------------------------------------- libvir: Storage error : cannot open volume '/tmp/cimtest.uuid': No such file or directory SettingsDefineCapabilities - 01_forward.py: FAIL CIM_ERR_FAILED: Unable to get volume information: cannot open volume '/tmp/cimtest.uuid': No such file or directory -------------------------------------------------------------------- > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Apr 22 00:05:48 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 21 Apr 2009 17:05:48 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] (#2) Improve enum volumes In-Reply-To: <49ED61C3.3020905@linux.vnet.ibm.com> References: <49ED61C3.3020905@linux.vnet.ibm.com> Message-ID: <49EE5F5C.8000307@linux.vnet.ibm.com> > The information that libvirt virsh pool-list is returning is not > completely correct: > For ex: > > virsh -c qemu:///system vol-list cimtest-diskpoolName Path > ----------------------------------------- > .X0-lock /tmp/.X0-lock > cimtest.uuid /tmp/cimtest.uuid > default-kvm-dimage /tmp/default-kvm-dimage > tmpnsIv8q /tmp/tmpnsIv8q > > The last pool information tmpnsIv8q does not seem to exist on the > machine, hence when I ran the HostSystem/03_hs_to_settdefcap.py it > failed with the following error: > > ------------------------------------------------------------------------------------------------------------------------------- > > ERROR - 'KVM_SettingsDefineCapabilities' returned 0 RASD objects instead > of 16 > CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > CIM_ERR_FAILED: Unable to get volume information: cannot open volume > '/tmp/tmpnsIv8q': No such file or directory > ------------------------------------------------------------------------------------------------------------------------------- > Are you running with recent sources? This issue should have been fixed with Richard's patch: "This patch removes the error throwed when volume info cannot be extracted in the disk template generation" rev: 842, changeset: 2f4943568299 > > The test case passed after I created the file /tmp/tmpnsIv8q. Items written to /tmp aren't permanent. Programs often write temporary files here during execution, so we cannot count on all the files in /tmp to exist. Actually, we really shouldn't place our images in /tmp. We should place them in something like /var/spool/libvirt-cim? Some place more permanent, and a little more expected from a application. A good admin would make sure that a directory based pool (the kind of pool cimtest creates) would only be populated with images. So we should be doing the same with ours. > I am not sure if this is the limitation from libvirt side or if its a > feature with libvirt. > Anyways +1 for these changes. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Apr 22 00:09:37 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 21 Apr 2009 17:09:37 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Update tests to use get_exp_template_rasd_len() In-Reply-To: <49ED6874.7000008@linux.vnet.ibm.com> References: <49ED6874.7000008@linux.vnet.ibm.com> Message-ID: <49EE6041.5030207@linux.vnet.ibm.com> Oops.. I read your +1 on the first patch in the set, and thought you were signing off on the whole set. I missed this mail. I applied the patches, but let me know if you encounter a bug or have suggestions for changes. >> >> > ------------------------------------------------------------------------------------------------------------------------------- > > ERROR - 'KVM_SettingsDefineCapabilities' returned 0 RASD objects instead > of 16 > CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > CIM_ERR_FAILED: Unable to get volume information: cannot open volume > '/tmp/tmpnsIv8q': No such file or directory > ------------------------------------------------------------------------------------------------------------------------------- > >> + exp_len = get_exp_template_rasd_len(virt, server, instid) >> >> if len(assoc_info) != exp_len: >> logger.error("%s returned %i ResourcePool objects >> instead" >> >> > This tc failed with the following err: > ------------------------------------------------------------------- > libvir: Storage error : cannot open volume '/tmp/cimtest.uuid': No such > file or directory > SettingsDefineCapabilities - 01_forward.py: FAIL > CIM_ERR_FAILED: Unable to get volume information: cannot open volume > '/tmp/cimtest.uuid': No such file or directory > -------------------------------------------------------------------- These errors should be fixed upstream (see previous mail). Let me know if you are seeing these errors with the most recent version of the providers. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Apr 22 08:41:44 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 22 Apr 2009 14:11:44 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] (#2) Improve enum volumes In-Reply-To: <49EE5F5C.8000307@linux.vnet.ibm.com> References: <49ED61C3.3020905@linux.vnet.ibm.com> <49EE5F5C.8000307@linux.vnet.ibm.com> Message-ID: <49EED848.9080009@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> The information that libvirt virsh pool-list is returning is not >> completely correct: >> For ex: >> >> virsh -c qemu:///system vol-list cimtest-diskpoolName Path >> ----------------------------------------- >> .X0-lock /tmp/.X0-lock >> cimtest.uuid /tmp/cimtest.uuid >> default-kvm-dimage /tmp/default-kvm-dimage >> tmpnsIv8q /tmp/tmpnsIv8q >> >> The last pool information tmpnsIv8q does not seem to exist on the >> machine, hence when I ran the HostSystem/03_hs_to_settdefcap.py it >> failed with the following error: >> >> ------------------------------------------------------------------------------------------------------------------------------- >> >> ERROR - 'KVM_SettingsDefineCapabilities' returned 0 RASD objects >> instead of 16 >> CIM_ERR_INVALID_CLASS: Linux_ComputerSystem >> CIM_ERR_FAILED: Unable to get volume information: cannot open volume >> '/tmp/tmpnsIv8q': No such file or directory >> ------------------------------------------------------------------------------------------------------------------------------- >> > > Are you running with recent sources? This issue should have been fixed > with Richard's patch: > > "This patch removes the error throwed when volume info cannot be > extracted in the disk template generation" > > rev: 842, changeset: 2f4943568299 No I had not tested with the latest revision. Yes this passed with the latest changes. > >> >> The test case passed after I created the file /tmp/tmpnsIv8q. > > Items written to /tmp aren't permanent. Programs often write > temporary files here during execution, so we cannot count on all the > files in /tmp to exist. > > Actually, we really shouldn't place our images in /tmp. We should > place them in something like /var/spool/libvirt-cim? Some place more > permanent, and a little more expected from a application. > > A good admin would make sure that a directory based pool (the kind of > pool cimtest creates) would only be populated with images. So we > should be doing the same with ours. > Yes its essential for us to keep the images in someother directory other than /tmp/ , how about /etc/libvirt-cim like the one we have for /etc/libvirt? >> I am not sure if this is the limitation from libvirt side or if its a >> feature with libvirt. >> Anyways +1 for these changes. > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Apr 22 08:42:20 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 22 Apr 2009 14:12:20 +0530 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Update tests to use get_exp_template_rasd_len() In-Reply-To: <49EE6041.5030207@linux.vnet.ibm.com> References: <49ED6874.7000008@linux.vnet.ibm.com> <49EE6041.5030207@linux.vnet.ibm.com> Message-ID: <49EED86C.6000901@linux.vnet.ibm.com> Kaitlin Rupert wrote: > > Oops.. I read your +1 on the first patch in the set, and thought you > were signing off on the whole set. I missed this mail. I applied > the patches, but let me know if you encounter a bug or have > suggestions for changes. > > >>> >>> >> ------------------------------------------------------------------------------------------------------------------------------- >> >> ERROR - 'KVM_SettingsDefineCapabilities' returned 0 RASD objects >> instead of 16 >> CIM_ERR_INVALID_CLASS: Linux_ComputerSystem >> CIM_ERR_FAILED: Unable to get volume information: cannot open volume >> '/tmp/tmpnsIv8q': No such file or directory >> ------------------------------------------------------------------------------------------------------------------------------- >> > > >>> + exp_len = get_exp_template_rasd_len(virt, server, instid) >>> >>> if len(assoc_info) != exp_len: >>> logger.error("%s returned %i ResourcePool objects >>> instead" >>> >>> >> This tc failed with the following err: >> ------------------------------------------------------------------- >> libvir: Storage error : cannot open volume '/tmp/cimtest.uuid': No >> such file or directory >> SettingsDefineCapabilities - 01_forward.py: FAIL >> CIM_ERR_FAILED: Unable to get volume information: cannot open volume >> '/tmp/cimtest.uuid': No such file or directory >> -------------------------------------------------------------------- > > These errors should be fixed upstream (see previous mail). Let me > know if you are seeing these errors with the most recent version of > the providers. > This passed with the latest src. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Apr 22 09:41:18 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 22 Apr 2009 15:11:18 +0530 Subject: [Libvirt-cim] Test Run Summary (Apr 22 2009): KVM on Fedora release 10 (Cambridge) with Pegasus Message-ID: <49EEE63E.80900@linux.vnet.ibm.com> ================================================= Test Run Summary (Apr 22 2009): KVM on Fedora release 10 (Cambridge) with Pegasus ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.15-170.2.24.fc10.x86_64 libvirt: 0.5.1 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 812 Libvirt-cim changeset: bad1a43ac1b0 Cimtest revision: 674 Cimtest changeset: e8dc06eefada ================================================= FAIL : 0 XFAIL : 3 SKIP : 4 PASS : 144 ----------------- Total : 151 ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL ================================================= SKIP Test Summary: 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 ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: PASS -------------------------------------------------------------------- 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 CIM_ERR_FAILED: 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): CIM_ERR_FAILED: 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 CIM_ERR_NOT_SUPPORTED: State not supported with return code 7 ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 07_remote_offline_migration.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Thu Apr 23 05:58:31 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 22 Apr 2009 22:58:31 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3Update RPCS/04 to validate that the Network child pool can be created through the providers Message-ID: <6789fc642c76198f983e.1240466311@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1240466305 25200 # Node ID 6789fc642c76198f983ed771f4a00237ed6daeff # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 [TEST] #3Update RPCS/04 to validate that the Network child pool can be created through the providers Updates from 2 to 3: 1) Use CIM_NS from const.py instead of hardcoding 2) Check if the IP is already used on the system before setting 3) Rewrite try, except... blocks Updates from 1 to 2: Test all types of networkpool including routed network, nat based network and isolated network Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r e8dc06eefada -r 6789fc642c76 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Wed Apr 22 22:58:25 2009 -0700 @@ -39,45 +39,123 @@ # 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 CimTest.Globals import CIM_NS +from XenKvmLib.const import do_main, platform_sup, get_provider_version from XenKvmLib.classes import get_typed_class +from pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.enumclass import EnumInstances +from XenKvmLib.common_util import destroy_netpool, undefine_netpool +from XenKvmLib.xm_virt_util import net_list +from VirtLib.utils import run_remote cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED cim_mname = "CreateChildResourcePool" +libvirt_cim_child_pool_rev = 837 +test_pool = ["routedpool", "natpool", "isolatedpool"] + +def verify_pool(pool_list, poolname): + status = FAIL + if len(pool_list) < 1: + logger.error("Return %i instances, expected at least one instance", + len(pool_list)) + return FAIL + + for i in range(0, len(pool_list)): + ret_pool = pool_list[i].InstanceID + if ret_pool == poolname: + status = PASS + break + elif ret_pool != poolname and i == len(pool_list)-1: + logger.error("Can not find expected pool") + + return status @do_main(platform_sup) def main(): 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) - return FAIL - - logger.error("The execution should not have reached here!!") - return FAIL + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev < libvirt_cim_child_pool_rev: + 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) + return FAIL + elif curr_cim_rev >= libvirt_cim_child_pool_rev: + nprasd = get_typed_class(options.virt, + 'NetPoolResourceAllocationSettingData') + addr = "192.168.0.30" + n_list = net_list(options.ip, options.virt) + for _net_name in n_list: + cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \ + cut -d ' ' -f 4 | sed 's/address=//'" % _net_name + s, in_use_addr = run_remote(options.ip, cmd) + in_use_addr = in_use_addr.strip("'") + if in_use_addr == addr: + logger.error("IP address is in use by a different network") + return FAIL + np_prop = { + "Address" : addr, + "Netmask" : "255.255.255.0", + "IPRangeStart" : "192.168.0.31", + "IPRangeEnd" : "192.168.0.57", + } + for i in range(0, len(test_pool)): + np_id = 'NetworkPool/%s' % test_pool[i] + iname = CIMInstanceName(nprasd, + namespace = CIM_NS, + keybindings = {'InstanceID':np_id}) + if test_pool[i] == "routedpool": + np_prop["ForwardMode"] = "route eth1" + elif test_pool[i] == "natpool": + np_prop["ForwardMode"] = "nat" + + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) + try: + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], + Settings=[nrasd.tomof()]) + np = get_typed_class(options.virt, 'NetworkPool') + netpool = EnumInstances(options.ip, np) + status = verify_pool(netpool, np_id) + if status != PASS: + raise Exception("Error in networkpool verification") + status = destroy_netpool(options.ip, options.virt, test_pool[i]) + if status != PASS: + raise Exception("Unable to destroy networkpool %s" + % test_pool[i]) + status = undefine_netpool(options.ip, options.virt, test_pool[i]) + if status != PASS: + raise Exception("Unable to undefine networkpool %s" + % test_pool[i]) + except Exception, details: + logger.error("Invoke CreateChildResourcePool() error when " + "create %s", np_id) + logger.error(details) + return FAIL + + return status + if __name__ == "__main__": sys.exit(main()) - diff -r e8dc06eefada -r 6789fc642c76 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Apr 22 22:58:25 2009 -0700 @@ -36,7 +36,8 @@ CIM_ERROR_GETINSTANCE from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list,\ - domain_list, virt2uri, net_destroy + domain_list, virt2uri, net_destroy,\ + net_undefine from XenKvmLib.vxml import PoolXML, NetXML from VirtLib import utils from XenKvmLib.const import default_pool_name, default_network_name @@ -387,6 +388,17 @@ return PASS +def undefine_netpool(server, virt, net_name): + if net_name == None: + return FAIL + + ret = net_undefine(net_name, server ,virt) + if ret != 0: + logger.error("Failed to undefine Virtual Network '%s'", net_name) + return FAIL + + return PASS + def libvirt_cached_data_poll(ip, virt, dom_name): cs = None diff -r e8dc06eefada -r 6789fc642c76 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Apr 22 22:58:25 2009 -0700 @@ -191,6 +191,15 @@ ret, out = utils.run_remote(server, cmd) return ret + +def net_undefine(network, server, virt="Xen"): + """Function undefine a given virtual network""" + + cmd = "virsh -c %s net-undefine %s" % (virt2uri(virt), network) + print cmd + ret, out = utils.run_remote(server, cmd) + + return ret def network_by_bridge(bridge, server, virt="Xen"): """Function returns virtual network for a given bridge""" From veillard at redhat.com Thu Apr 23 09:04:10 2009 From: veillard at redhat.com (Daniel Veillard) Date: Thu, 23 Apr 2009 11:04:10 +0200 Subject: [Libvirt-cim] Test Run Summary (Apr 22 2009): KVM on Fedora release 10 (Cambridge) with Pegasus In-Reply-To: <49EEE63E.80900@linux.vnet.ibm.com> References: <49EEE63E.80900@linux.vnet.ibm.com> Message-ID: <20090423090410.GI15393@redhat.com> On Wed, Apr 22, 2009 at 03:11:18PM +0530, Deepti B Kalakeri wrote: > ComputerSystem - 32_start_reboot.py: XFAIL > ERROR - Got CIM error CIM_ERR_FAILED: 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): CIM_ERR_FAILED: Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot > Bug:<00005> This is a limitation in KVM, there is no Reboot support, basically only shutdown. The only possibility at the moment is a combination of shutdown and restart, which is not 100% similar at the libvirt level which is why I would rather try to get a reboot operation at the QEmu level. But at the CIM API level maybe "reboot" and "shutdown + restart" are undistinguishable, in which case it's probably a good idea to implement it this way if the hypervisor support for reboot is not present. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From yunguol at cn.ibm.com Thu Apr 23 09:37:38 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 23 Apr 2009 02:37:38 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add new tc to validate that the Disk child pool can be created through the providers Message-ID: # HG changeset patch # User Guolian Yun # Date 1240479451 25200 # Node ID e1be3bd47b8005fad25dcfd80672870009d5c111 # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 [TEST] Add new tc to validate that the Disk child pool can be created through the providers Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r e8dc06eefada -r e1be3bd47b80 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateChildResourcePool_Disk.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateChildResourcePool_Disk.py Thu Apr 23 02:37:31 2009 -0700 @@ -0,0 +1,144 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Guolian Yun +# +# +# 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 should test the CreateChildResourcePool service +# supplied by the RPCS provider. +# Input +# ----- +# IN -- ElementName -- String -- The desired name of the resource pool +# IN -- Settings -- String -- A string representation of a +# CIM_ResourceAllocationSettingData +# instance that represents the allocation +# assigned to this child pool +# IN -- ParentPool -- CIM_ResourcePool REF -- The parent pool from which +# to create this pool +# +# Output +# ------ +# OUT -- Pool -- CIM_ResourcePool REF -- The resulting resource pool +# 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 +# +# Exception details before Revision 837 +# ----- +# Error code: CIM_ERR_NOT_SUPPORTED +# +# After revision 837, the service is implemented +# +# -Date: 23.04.2009 + +import sys +import pywbem +from XenKvmLib import rpcs_service +from CimTest.Globals import logger +from CimTest.ReturnCodes import FAIL, PASS +from CimTest.Globals import CIM_NS +from XenKvmLib.const import do_main, platform_sup, get_provider_version +from XenKvmLib.classes import get_typed_class +from pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.enumclass import EnumInstances +from XenKvmLib.xm_virt_util import diskpool_destroy, diskpool_undefine +from pywbem.cim_types import Uint16 + +cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED +cim_mname = "CreateChildResourcePool" +libvirt_cim_child_pool_rev = 837 +test_pool = ["dir_pool"] + +def verify_pool(pool_list, poolname): + status = FAIL + if len(pool_list) < 1: + logger.error("Return %i instances, expected at least one instance", + len(pool_list)) + return FAIL + + for i in range(0, len(pool_list)): + ret_pool = pool_list[i].InstanceID + if ret_pool == poolname: + status = PASS + break + elif ret_pool != poolname and i == len(pool_list)-1: + logger.error("Can not find expected pool") + + return status + + at 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: + 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) + return FAIL + elif curr_cim_rev >= libvirt_cim_child_pool_rev: + dprasd = get_typed_class(options.virt, + 'DiskPoolResourceAllocationSettingData') + dp_prop = {"Path" : "/tmp"} + + for i in range(0, len(test_pool)): + dp_id = 'DiskPool/%s' % test_pool[i] + iname = CIMInstanceName(dprasd, + namespace = CIM_NS, + keybindings = {'InstanceID':dp_id}) + if test_pool[i] == "dir_pool": + dp_prop["Type"] = Uint16(1) + + drasd = CIMInstance(dprasd, path = iname, properties = dp_prop) + try: + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], + Settings=[drasd.tomof()]) + dp = get_typed_class(options.virt, 'DiskPool') + diskpool = EnumInstances(options.ip, dp) + status = verify_pool(diskpool, dp_id) + if status != PASS: + raise Exception("Error in diskpool verification") + status = diskpool_destroy(test_pool[i], options.ip, options.virt) + if status != PASS: + raise Exception("Unable to destroy diskpool %s" + % test_pool[i]) + status = diskpool_undefine(test_pool[i], options.ip, options.virt) + if status != PASS: + raise Exception("Unable to undefine diskpool %s" + % test_pool[i]) + except Exception, details: + logger.error("Invoke CreateChildResourcePool() error when " + "create %s", dp_id) + logger.error(details) + return FAIL + + return status + +if __name__ == "__main__": + sys.exit(main()) diff -r e8dc06eefada -r e1be3bd47b80 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Thu Apr 23 02:37:31 2009 -0700 @@ -190,7 +190,23 @@ cmd = "virsh -c %s net-destroy %s" % (virt2uri(virt), network) ret, out = utils.run_remote(server, cmd) - return ret + return ret + +def diskpool_destroy(diskpool, server, virt="Xen"): + """Function destroys a given virtual diskpool""" + + cmd = "virsh -c %s pool-destroy %s" % (virt2uri(virt), diskpool) + ret, out = utils.run_remote(server, cmd) + + return ret + +def diskpool_undefine(diskpool, server, virt="Xen"): + """Function undefines a given virtual diskpool""" + + cmd = "virsh -c %s pool-undefine %s" % (virt2uri(virt), diskpool) + ret, out = utils.run_remote(server, cmd) + + return ret def network_by_bridge(bridge, server, virt="Xen"): """Function returns virtual network for a given bridge""" From dayne.medlyn at hp.com Thu Apr 23 17:00:54 2009 From: dayne.medlyn at hp.com (Medlyn, Dayne (VSL - Ft Collins)) Date: Thu, 23 Apr 2009 17:00:54 +0000 Subject: [Libvirt-cim] On SLES 11 with SFCB Xen_HostSystem returns no instances Message-ID: In the SLES 11 distribution Novell is distributing libvirt-cim-0.5.2-8.46 and registering it with the SFCB CIMOM. Does anyone know why the enumeration of Xen_HostSystem returns no instances? I could not find any mention of this on the mailing list. Thanks for your help. Dayne Medlyn From jfehlig at novell.com Thu Apr 23 21:56:13 2009 From: jfehlig at novell.com (Jim Fehlig) Date: Thu, 23 Apr 2009 15:56:13 -0600 Subject: [Libvirt-cim] On SLES 11 with SFCB Xen_HostSystem returns no instances In-Reply-To: References: Message-ID: <49F0E3FD.1080105@novell.com> Medlyn, Dayne (VSL - Ft Collins) wrote: > In the SLES 11 distribution Novell is distributing libvirt-cim-0.5.2-8.46 and registering it with the SFCB CIMOM. Does anyone know why the enumeration of Xen_HostSystem returns no instances? I could not find any mention of this on the mailing list. > The host is Linux_ComputerSystem instance in /root/cimv2. VMs are associated to the host with Xen_HostedDependency association. Jim From dayne.medlyn at hp.com Thu Apr 23 23:26:37 2009 From: dayne.medlyn at hp.com (Medlyn, Dayne (VSL - Ft Collins)) Date: Thu, 23 Apr 2009 23:26:37 +0000 Subject: [Libvirt-cim] On SLES 11 with SFCB Xen_HostSystem returns no instances In-Reply-To: <49F0E3FD.1080105@novell.com> References: <49F0E3FD.1080105@novell.com> Message-ID: Jim, So you are saying that we should not use Xen_HostSystem and that it cannot be relied on? I am dealing with existing code that references the Xen_HostSystem successfully on SLES10sp2 with libvirt-cim-0.4.1 installed, which is now broken in SLES 11 with libvirt-cim-0.5.2. The SLES 10sp2 system is running tog-Pegasus where the SLES 11 system is running SFCB. I was hoping for compatibility from one release to another. Perhaps the choice of using Xen_HostSystem was a bad one? I am trying to determine if I have found a bug in what is included in SLES 11 or if I may be missing some unidentified dependency or configurations. Thoughts? Thanks for your insights. Dayne > -----Original Message----- > From: libvirt-cim-bounces at redhat.com [mailto:libvirt-cim- > bounces at redhat.com] On Behalf Of Jim Fehlig > Sent: Thursday, April 23, 2009 3:56 PM > To: List for discussion and development of libvirt CIM > Subject: Re: [Libvirt-cim] On SLES 11 with SFCB Xen_HostSystem returns > no instances > > Medlyn, Dayne (VSL - Ft Collins) wrote: > > In the SLES 11 distribution Novell is distributing libvirt-cim-0.5.2- > 8.46 and registering it with the SFCB CIMOM. Does anyone know why the > enumeration of Xen_HostSystem returns no instances? I could not find > any mention of this on the mailing list. > > > > The host is Linux_ComputerSystem instance in /root/cimv2. VMs are > associated to the host with Xen_HostedDependency association. > > Jim > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From kaitlin at linux.vnet.ibm.com Fri Apr 24 00:08:10 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 23 Apr 2009 17:08:10 -0700 Subject: [Libvirt-cim] On SLES 11 with SFCB Xen_HostSystem returns no instances In-Reply-To: References: <49F0E3FD.1080105@novell.com> Message-ID: <49F102EA.9090502@linux.vnet.ibm.com> Medlyn, Dayne (VSL - Ft Collins) wrote: > Jim, > > So you are saying that we should not use Xen_HostSystem and that it cannot be relied on? I am dealing with existing code that references the Xen_HostSystem successfully on SLES10sp2 with libvirt-cim-0.4.1 installed, which is now broken in SLES 11 with libvirt-cim-0.5.2. The SLES 10sp2 system is running tog-Pegasus where the SLES 11 system is running SFCB. I was hoping for compatibility from one release to another. Perhaps the choice of using Xen_HostSystem was a bad one? > > I am trying to determine if I have found a bug in what is included in SLES 11 or if I may be missing some unidentified dependency or configurations. Thoughts? > > Thanks for your insights. > > Dayne > > Hi Dayne, The Xen_HostSystem instance is a placeholder, it doesn't give an accurate view of the host system. If the system doesn't have a provider set that accurately represents the host, then libvirt-cim will generate an instance of Xen_HostSystem just so the association linkage works properly. libvirt-cim doesn't set any of the attributes appropriately - we basically set values for the keys and generate the instance. The idea here is that libvirt-cim represents the virtual guests and their resources, it doesn't represent the host system itself. So the instance of Xen_HostSystem doesn't conform to the System Virtualization Profile. Does your implementation need the sblim-cmpi-base package? libvirt-cim will detect whether Linux_ComputerSystem is available. If it is available, then enumerating Xen_HostSystem is disabled. If you remove sblim-cmpi-base, you'll be able to enumerate Xen_HostSystem. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Fri Apr 24 04:46:53 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 24 Apr 2009 01:46:53 -0300 Subject: [Libvirt-cim] [PATCH 0 of 3] Allow users to specify NIC model type In-Reply-To: References: Message-ID: <49F1443D.50800@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Apr 24 05:12:56 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 24 Apr 2009 10:42:56 +0530 Subject: [Libvirt-cim] Test Run Summary (Apr 22 2009): KVM on Fedora release 10 (Cambridge) with Pegasus In-Reply-To: <20090423090410.GI15393@redhat.com> References: <49EEE63E.80900@linux.vnet.ibm.com> <20090423090410.GI15393@redhat.com> Message-ID: <49F14A58.9070803@linux.vnet.ibm.com> Daniel Veillard wrote: > On Wed, Apr 22, 2009 at 03:11:18PM +0530, Deepti B Kalakeri wrote: > >> ComputerSystem - 32_start_reboot.py: XFAIL >> ERROR - Got CIM error CIM_ERR_FAILED: 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): CIM_ERR_FAILED: Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot >> Bug:<00005> >> > > This is a limitation in KVM, there is no Reboot support, basically > only shutdown. The only possibility at the moment is a combination of > shutdown and restart, which is not 100% similar at the libvirt level > which is why I would rather try to get a reboot operation at the QEmu > level. > But at the CIM API level maybe "reboot" and "shutdown + restart" are > I would let the reboot option remain for Xen/XenFV. I can use "shutdown + restart" for now in the test case for KVM. > undistinguishable, in which case it's probably a good idea to implement > it this way if the hypervisor support for reboot is not present. > I believe that the reboot option works for the KVM guests. > Daniel > > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Fri Apr 24 05:35:04 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 23 Apr 2009 22:35:04 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers Message-ID: # HG changeset patch # User Guolian Yun # Date 1240551295 25200 # Node ID f279580cad62f287bdfb01dd817e0d00cc3e7368 # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 [TEST] Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r e8dc06eefada -r f279580cad62 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Thu Apr 23 22:34:55 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 @@ -45,33 +47,84 @@ import pywbem from XenKvmLib import rpcs_service from CimTest.Globals import logger +from CimTest.Globals import CIM_NS 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 pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.enumclass import EnumInstances from XenKvmLib.classes import get_typed_class 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) - return FAIL - - logger.error("The execution should not have reached here!!") - return FAIL + 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: + nprasd = get_typed_class(options.virt, + 'NetPoolResourceAllocationSettingData') + np = get_typed_class(options.virt, 'NetworkPool') + np_id = 'NetworkPool/%s' % test_pool + iname = CIMInstanceName(nprasd, + namespace = CIM_NS, + keybindings = {'InstanceID':np_id}) + np_prop = { + "Address" : "192.168.0.20", + "Netmask" : "255.255.255.0", + "IPRangeStart" : "192.168.0.21", + "IPRangeEnd" : "192.168.0.30" + } + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) + try: + rpcs_conn.CreateChildResourcePool(ElementName=test_pool, + Settings=[nrasd.tomof()]) + netpool = EnumInstances(options.ip, np) + if len(netpool) < 1: + raise Exception("Return %i instances, expected at least"\ + "one instance" % len(netpool)) + for i in range(0, len(netpool)): + ret_pool = netpool[i].InstanceID + if ret_pool == np_id: + break + elif ret_pool != np_id and i == len(netpool) - 1: + raise Exception("Can not find expected pool") + + pool = CIMInstanceName(np, keybindings = {'InstanceID':np_id}) + rpcs_conn.DeleteResourcePool(Pool = pool) + netpool = EnumInstances(options.ip, np) + if len(netpool) < 1: + status = PASS + else: + 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) + break + elif ret_pool != np_id and i == len(netpool) -1: + status = PASS + except Exception, details: + logger.error(details) + return status + + return status if __name__ == "__main__": sys.exit(main()) - From deeptik at linux.vnet.ibm.com Fri Apr 24 07:04:56 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 24 Apr 2009 12:34:56 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3Update RPCS/04 to validate that the Network child pool can be created through the providers In-Reply-To: <6789fc642c76198f983e.1240466311@elm3b197.beaverton.ibm.com> References: <6789fc642c76198f983e.1240466311@elm3b197.beaverton.ibm.com> Message-ID: <49F16498.9090404@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1240466305 25200 > # Node ID 6789fc642c76198f983ed771f4a00237ed6daeff > # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 > [TEST] #3Update RPCS/04 to validate that the Network child pool can be created through the providers > > > Updates from 2 to 3: > 1) Use CIM_NS from const.py instead of hardcoding > 2) Check if the IP is already used on the system before setting > 3) Rewrite try, except... blocks > > Updates from 1 to 2: > Test all types of networkpool including routed network, nat based network and isolated network > > Tested for KVM with current sources > Signed-off-by: Guolian Yun > > diff -r e8dc06eefada -r 6789fc642c76 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py > --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Apr 21 17:08:06 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Wed Apr 22 22:58:25 2009 -0700 > @@ -39,45 +39,123 @@ > # 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 CimTest.Globals import CIM_NS > +from XenKvmLib.const import do_main, platform_sup, get_provider_version > from XenKvmLib.classes import get_typed_class > +from pywbem.cim_obj import CIMInstanceName, CIMInstance > +from XenKvmLib.enumclass import EnumInstances > +from XenKvmLib.common_util import destroy_netpool, undefine_netpool > +from XenKvmLib.xm_virt_util import net_list > +from VirtLib.utils import run_remote > > cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED > cim_mname = "CreateChildResourcePool" > +libvirt_cim_child_pool_rev = 837 > +test_pool = ["routedpool", "natpool", "isolatedpool"] > + > +def verify_pool(pool_list, poolname): > + status = FAIL > + if len(pool_list) < 1: > + logger.error("Return %i instances, expected at least one instance", > + len(pool_list)) > + return FAIL > + > + for i in range(0, len(pool_list)): > + ret_pool = pool_list[i].InstanceID > + if ret_pool == poolname: > + status = PASS > + break > + elif ret_pool != poolname and i == len(pool_list)-1: > + logger.error("Can not find expected pool") > When I did dumpxml for the different netpool types. I did not see any specific information for nat type : for ex: the dump did not show . Also for routed pool I did not see the . Are we not setting these kind of information via Libvirt-cim ? > + > + return status > > @do_main(platform_sup) > def main(): > 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) > - return FAIL > - > - logger.error("The execution should not have reached here!!") > - return FAIL > + > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + if curr_cim_rev < libvirt_cim_child_pool_rev: > + 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) > + return FAIL > + elif curr_cim_rev >= libvirt_cim_child_pool_rev: > + nprasd = get_typed_class(options.virt, > + 'NetPoolResourceAllocationSettingData') > + addr = "192.168.0.30" > + n_list = net_list(options.ip, options.virt) > + for _net_name in n_list: > + cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \ > + cut -d ' ' -f 4 | sed 's/address=//'" % _net_name > + s, in_use_addr = run_remote(options.ip, cmd) > + in_use_addr = in_use_addr.strip("'") > + if in_use_addr == addr: > + logger.error("IP address is in use by a different network") > + return FAIL > + np_prop = { > + "Address" : addr, > + "Netmask" : "255.255.255.0", > + "IPRangeStart" : "192.168.0.31", > + "IPRangeEnd" : "192.168.0.57", > + } > + for i in range(0, len(test_pool)): > + np_id = 'NetworkPool/%s' % test_pool[i] > + iname = CIMInstanceName(nprasd, > + namespace = CIM_NS, > + keybindings = {'InstanceID':np_id}) > + if test_pool[i] == "routedpool": > + np_prop["ForwardMode"] = "route eth1" > + elif test_pool[i] == "natpool": > + np_prop["ForwardMode"] = "nat" > + > + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) > + try: > + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], > + Settings=[nrasd.tomof()]) > + np = get_typed_class(options.virt, 'NetworkPool') > + netpool = EnumInstances(options.ip, np) > + status = verify_pool(netpool, np_id) > + if status != PASS: > + raise Exception("Error in networkpool verification") > + status = destroy_netpool(options.ip, options.virt, test_pool[i]) > + if status != PASS: > + raise Exception("Unable to destroy networkpool %s" > + % test_pool[i]) > + status = undefine_netpool(options.ip, options.virt, test_pool[i]) > + if status != PASS: > + raise Exception("Unable to undefine networkpool %s" > + % test_pool[i]) > + except Exception, details: > + logger.error("Invoke CreateChildResourcePool() error when " > + "create %s", np_id) > + logger.error(details) > since we raise exceptions when failing to destroy and undefine the network pool can you make it more generic ? logger.error("Exception details: %s", details) > + return FAIL > + > + return status > + > if __name__ == "__main__": > sys.exit(main()) > - > diff -r e8dc06eefada -r 6789fc642c76 suites/libvirt-cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Apr 21 17:08:06 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Apr 22 22:58:25 2009 -0700 > @@ -36,7 +36,8 @@ > CIM_ERROR_GETINSTANCE > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list,\ > - domain_list, virt2uri, net_destroy > + domain_list, virt2uri, net_destroy,\ > + net_undefine > from XenKvmLib.vxml import PoolXML, NetXML > from VirtLib import utils > from XenKvmLib.const import default_pool_name, default_network_name > @@ -387,6 +388,17 @@ > > return PASS > > +def undefine_netpool(server, virt, net_name): > + if net_name == None: > + return FAIL > + > + ret = net_undefine(net_name, server ,virt) > + if ret != 0: > + logger.error("Failed to undefine Virtual Network '%s'", net_name) > + return FAIL > + > + return PASS > + > def libvirt_cached_data_poll(ip, virt, dom_name): > cs = None > > diff -r e8dc06eefada -r 6789fc642c76 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Apr 21 17:08:06 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Apr 22 22:58:25 2009 -0700 > @@ -191,6 +191,15 @@ > ret, out = utils.run_remote(server, cmd) > > return ret > + > +def net_undefine(network, server, virt="Xen"): > + """Function undefine a given virtual network""" > + > + cmd = "virsh -c %s net-undefine %s" % (virt2uri(virt), network) > + print cmd > + ret, out = utils.run_remote(server, cmd) > + > + return ret > Any specific reason for calling net_undefine() from common_util.py and for making to 2 levels? Why dont we move it all to xml_virt_util.py ? > def network_by_bridge(bridge, server, virt="Xen"): > """Function returns virtual network for a given bridge""" > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Apr 24 07:08:45 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 24 Apr 2009 12:38:45 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3Update RPCS/04 to validate that the Network child pool can be created through the providers In-Reply-To: <49F16498.9090404@linux.vnet.ibm.com> References: <6789fc642c76198f983e.1240466311@elm3b197.beaverton.ibm.com> <49F16498.9090404@linux.vnet.ibm.com> Message-ID: <49F1657D.5010209@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > yunguol at cn.ibm.com wrote: >> # HG changeset patch >> # User Guolian Yun >> # Date 1240466305 25200 >> # Node ID 6789fc642c76198f983ed771f4a00237ed6daeff >> # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 >> [TEST] #3Update RPCS/04 to validate that the Network child pool can >> be created through the providers >> >> >> Updates from 2 to 3: >> 1) Use CIM_NS from const.py instead of hardcoding >> 2) Check if the IP is already used on the system before setting >> 3) Rewrite try, except... blocks >> >> Updates from 1 to 2: >> Test all types of networkpool including routed network, nat based >> network and isolated network >> >> Tested for KVM with current sources >> Signed-off-by: Guolian Yun >> >> diff -r e8dc06eefada -r 6789fc642c76 >> suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py >> >> --- >> a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py >> Tue Apr 21 17:08:06 2009 -0700 >> +++ >> b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py >> Wed Apr 22 22:58:25 2009 -0700 >> @@ -39,45 +39,123 @@ >> # 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 CimTest.Globals import CIM_NS Can you move the CIM_NS import stmt above and to import it along with the logger >> +from XenKvmLib.const import do_main, platform_sup, get_provider_version >> from XenKvmLib.classes import get_typed_class >> +from pywbem.cim_obj import CIMInstanceName, CIMInstance >> +from XenKvmLib.enumclass import EnumInstances >> +from XenKvmLib.common_util import destroy_netpool, undefine_netpool >> +from XenKvmLib.xm_virt_util import net_list >> +from VirtLib.utils import run_remote >> >> cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED >> cim_mname = "CreateChildResourcePool" >> +libvirt_cim_child_pool_rev = 837 >> +test_pool = ["routedpool", "natpool", "isolatedpool"] >> + >> +def verify_pool(pool_list, poolname): >> + status = FAIL >> + if len(pool_list) < 1: >> + logger.error("Return %i instances, expected at least one instance", >> + len(pool_list)) >> + return FAIL >> + + for i in range(0, len(pool_list)): >> + ret_pool = pool_list[i].InstanceID >> + if ret_pool == poolname: >> + status = PASS >> + break >> + elif ret_pool != poolname and i == len(pool_list)-1: >> + logger.error("Can not find expected pool") > When I did dumpxml for the different netpool types. I did not see any > specific information for nat type : for ex: the dump did not show > . > Also for routed pool I did not see the dev="eth1"/>. Are we not setting these kind of information via > Libvirt-cim ? >> + >> + return status >> >> @do_main(platform_sup) >> def main(): >> 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) >> - return FAIL >> - - logger.error("The execution should not have reached here!!") >> - return FAIL >> + >> + curr_cim_rev, changeset = get_provider_version(options.virt, >> options.ip) >> + if curr_cim_rev < libvirt_cim_child_pool_rev: >> + 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) >> + return FAIL >> + elif curr_cim_rev >= libvirt_cim_child_pool_rev: + nprasd = >> get_typed_class(options.virt, + 'NetPoolResourceAllocationSettingData') >> + addr = "192.168.0.30" >> + n_list = net_list(options.ip, options.virt) >> + for _net_name in n_list: >> + cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \ >> + cut -d ' ' -f 4 | sed 's/address=//'" % _net_name >> + s, in_use_addr = run_remote(options.ip, cmd) >> + in_use_addr = in_use_addr.strip("'") >> + if in_use_addr == addr: >> + logger.error("IP address is in use by a different network") >> + return FAIL >> + np_prop = { >> + "Address" : addr, >> + "Netmask" : "255.255.255.0", >> + "IPRangeStart" : "192.168.0.31", >> + "IPRangeEnd" : "192.168.0.57", >> + } + for i in range(0, len(test_pool)): >> + np_id = 'NetworkPool/%s' % test_pool[i] >> + iname = CIMInstanceName(nprasd, >> + namespace = CIM_NS, >> + keybindings = {'InstanceID':np_id}) >> + if test_pool[i] == "routedpool": >> + np_prop["ForwardMode"] = "route eth1" >> + elif test_pool[i] == "natpool": >> + np_prop["ForwardMode"] = "nat" >> + >> + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) >> + try: >> + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], + >> Settings=[nrasd.tomof()]) >> + np = get_typed_class(options.virt, 'NetworkPool') >> + netpool = EnumInstances(options.ip, np) >> + status = verify_pool(netpool, np_id) >> + if status != PASS: >> + raise Exception("Error in networkpool verification") >> + status = destroy_netpool(options.ip, options.virt, test_pool[i]) >> + if status != PASS: >> + raise Exception("Unable to destroy networkpool %s" >> + % test_pool[i]) >> + status = undefine_netpool(options.ip, options.virt, test_pool[i]) >> + if status != PASS: >> + raise Exception("Unable to undefine networkpool %s" >> + % test_pool[i]) >> + except Exception, details: >> + logger.error("Invoke CreateChildResourcePool() error when " >> + "create %s", np_id) >> + logger.error(details) > since we raise exceptions when failing to destroy and undefine the > network pool can you make it more generic ? > logger.error("Exception details: %s", details) >> + return FAIL >> + + return status >> + >> if __name__ == "__main__": >> sys.exit(main()) >> - diff -r e8dc06eefada -r 6789fc642c76 >> suites/libvirt-cim/lib/XenKvmLib/common_util.py >> --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Apr 21 >> 17:08:06 2009 -0700 >> +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Apr 22 >> 22:58:25 2009 -0700 >> @@ -36,7 +36,8 @@ >> CIM_ERROR_GETINSTANCE >> from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC >> from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, >> net_list,\ >> - domain_list, virt2uri, net_destroy >> + domain_list, virt2uri, net_destroy,\ >> + net_undefine >> from XenKvmLib.vxml import PoolXML, NetXML >> from VirtLib import utils from XenKvmLib.const import >> default_pool_name, default_network_name >> @@ -387,6 +388,17 @@ >> >> return PASS >> +def undefine_netpool(server, virt, net_name): >> + if net_name == None: >> + return FAIL >> + >> + ret = net_undefine(net_name, server ,virt) >> + if ret != 0: >> + logger.error("Failed to undefine Virtual Network '%s'", net_name) >> + return FAIL >> + >> + return PASS + >> def libvirt_cached_data_poll(ip, virt, dom_name): >> cs = None >> >> diff -r e8dc06eefada -r 6789fc642c76 >> suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py >> --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Apr 21 >> 17:08:06 2009 -0700 >> +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Apr 22 >> 22:58:25 2009 -0700 >> @@ -191,6 +191,15 @@ >> ret, out = utils.run_remote(server, cmd) >> >> return ret + +def net_undefine(network, server, virt="Xen"): >> + """Function undefine a given virtual network""" >> + >> + cmd = "virsh -c %s net-undefine %s" % (virt2uri(virt), network) >> + print cmd >> + ret, out = utils.run_remote(server, cmd) >> + + return ret > Any specific reason for calling net_undefine() from common_util.py and > for making to 2 levels? > Why dont we move it all to xml_virt_util.py ? >> def network_by_bridge(bridge, server, virt="Xen"): >> """Function returns virtual network for a given bridge""" >> >> _______________________________________________ >> Libvirt-cim mailing list >> Libvirt-cim at redhat.com >> https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Apr 24 07:58:51 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 24 Apr 2009 13:28:51 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers In-Reply-To: References: Message-ID: <49F1713B.7020507@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1240551295 25200 > # Node ID f279580cad62f287bdfb01dd817e0d00cc3e7368 > # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 > [TEST] Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers > > > Tested for KVM with current sources > Signed-off-by: Guolian Yun > > diff -r e8dc06eefada -r f279580cad62 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py > --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Tue Apr 21 17:08:06 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Thu Apr 23 22:34:55 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 > > @@ -45,33 +47,84 @@ > import pywbem > from XenKvmLib import rpcs_service > from CimTest.Globals import logger > +from CimTest.Globals import CIM_NS > Combine CIM_NS and logger import stmt. > 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 pywbem.cim_obj import CIMInstanceName, CIMInstance > +from XenKvmLib.enumclass import EnumInstances > from XenKvmLib.classes import get_typed_class > > 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) > - return FAIL > - > - logger.error("The execution should not have reached here!!") > - return FAIL > + 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: > + nprasd = get_typed_class(options.virt, > + 'NetPoolResourceAllocationSettingData') > + np = get_typed_class(options.virt, 'NetworkPool') > + np_id = 'NetworkPool/%s' % test_pool > + iname = CIMInstanceName(nprasd, > + namespace = CIM_NS, > + keybindings = {'InstanceID':np_id}) > + np_prop = { > + "Address" : "192.168.0.20", > Its better to check the use of the address before using it as you did it in the RPCS/04*py tc. > + "Netmask" : "255.255.255.0", > + "IPRangeStart" : "192.168.0.21", > + "IPRangeEnd" : "192.168.0.30" > + } > + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) > + try: > + rpcs_conn.CreateChildResourcePool(ElementName=test_pool, > + Settings=[nrasd.tomof()]) > + netpool = EnumInstances(options.ip, np) > + if len(netpool) < 1: > + raise Exception("Return %i instances, expected at least"\ > + "one instance" % len(netpool)) > + for i in range(0, len(netpool)): > + ret_pool = netpool[i].InstanceID > + if ret_pool == np_id: > + break > + elif ret_pool != np_id and i == len(netpool) - 1: > + raise Exception("Can not find expected pool") > + > + pool = CIMInstanceName(np, keybindings = {'InstanceID':np_id}) > + rpcs_conn.DeleteResourcePool(Pool = pool) > + netpool = EnumInstances(options.ip, np) > + if len(netpool) < 1: > + status = PASS > No need to check if the netpool < 1 , the for loop checking below should be enough here. > + else: > + 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) > + break > + elif ret_pool != np_id and i == len(netpool) -1: > + status = PASS > + except Exception, details: > + logger.error(details) > + return status > + > The test fails with the following error: -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - (1, u'CIM_ERR_FAILED: Resource pool instance does not exist') InvokeMethod(DeleteResourcePool): CIM_ERR_FAILED: Resource pool instance does not exist -------------------------------------------------------------------- > + return status > if __name__ == "__main__": > sys.exit(main()) > - > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Apr 24 08:13:02 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 24 Apr 2009 13:43:02 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Add new tc to validate that the Disk child pool can be created through the providers In-Reply-To: References: Message-ID: <49F1748E.9050403@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1240479451 25200 > # Node ID e1be3bd47b8005fad25dcfd80672870009d5c111 > # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 > [TEST] Add new tc to validate that the Disk child pool can be created through the providers > > > Tested for KVM with current sources > Signed-off-by: Guolian Yun > > diff -r e8dc06eefada -r e1be3bd47b80 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateChildResourcePool_Disk.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateChildResourcePool_Disk.py Thu Apr 23 02:37:31 2009 -0700 > @@ -0,0 +1,144 @@ > +#!/usr/bin/python > +# > +# Copyright 2009 IBM Corp. > +# > +# Authors: > +# Guolian Yun > +# > +# > +# 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 should test the CreateChildResourcePool service > +# supplied by the RPCS provider. > +# Input > +# ----- > +# IN -- ElementName -- String -- The desired name of the resource pool > +# IN -- Settings -- String -- A string representation of a > +# CIM_ResourceAllocationSettingData > +# instance that represents the allocation > +# assigned to this child pool > +# IN -- ParentPool -- CIM_ResourcePool REF -- The parent pool from which > +# to create this pool > +# > +# Output > +# ------ > +# OUT -- Pool -- CIM_ResourcePool REF -- The resulting resource pool > +# 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 > +# > +# Exception details before Revision 837 > +# ----- > +# Error code: CIM_ERR_NOT_SUPPORTED > +# > +# After revision 837, the service is implemented > +# > +# -Date: 23.04.2009 > + > +import sys > +import pywbem > +from XenKvmLib import rpcs_service > +from CimTest.Globals import logger > +from CimTest.ReturnCodes import FAIL, PASS > +from CimTest.Globals import CIM_NS > combine CIM_NS and logger > +from XenKvmLib.const import do_main, platform_sup, get_provider_version > +from XenKvmLib.classes import get_typed_class > +from pywbem.cim_obj import CIMInstanceName, CIMInstance > +from XenKvmLib.enumclass import EnumInstances > +from XenKvmLib.xm_virt_util import diskpool_destroy, diskpool_undefine > +from pywbem.cim_types import Uint16 > + > +cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED > +cim_mname = "CreateChildResourcePool" > +libvirt_cim_child_pool_rev = 837 > +test_pool = ["dir_pool"] > + > +def verify_pool(pool_list, poolname): > + status = FAIL > + if len(pool_list) < 1: > + logger.error("Return %i instances, expected at least one instance", > + len(pool_list)) > + return FAIL > + > + for i in range(0, len(pool_list)): > + ret_pool = pool_list[i].InstanceID > + if ret_pool == poolname: > + status = PASS > + break > + elif ret_pool != poolname and i == len(pool_list)-1: > + logger.error("Can not find expected pool") > Can we move this function to a library since it is used in other tc as well ? When you move the function, you can as well move the EnumInstances(options.ip, dp) to the library function. > + > + return status > + > + at 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: > + 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) > + return FAIL > + elif curr_cim_rev >= libvirt_cim_child_pool_rev: > + dprasd = get_typed_class(options.virt, > + 'DiskPoolResourceAllocationSettingData') > + dp_prop = {"Path" : "/tmp"} > + > + for i in range(0, len(test_pool)): > + dp_id = 'DiskPool/%s' % test_pool[i] > + iname = CIMInstanceName(dprasd, > + namespace = CIM_NS, > + keybindings = {'InstanceID':dp_id}) > + if test_pool[i] == "dir_pool": > + dp_prop["Type"] = Uint16(1) > + > + drasd = CIMInstance(dprasd, path = iname, properties = dp_prop) > + try: > + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], > + Settings=[drasd.tomof()]) > + dp = get_typed_class(options.virt, 'DiskPool') > + diskpool = EnumInstances(options.ip, dp) > + status = verify_pool(diskpool, dp_id) > + if status != PASS: > + raise Exception("Error in diskpool verification") > + status = diskpool_destroy(test_pool[i], options.ip, options.virt) > + if status != PASS: > + raise Exception("Unable to destroy diskpool %s" > + % test_pool[i]) > + status = diskpool_undefine(test_pool[i], options.ip, options.virt) > + if status != PASS: > + raise Exception("Unable to undefine diskpool %s" > + % test_pool[i]) > + except Exception, details: > + logger.error("Invoke CreateChildResourcePool() error when " > + "create %s", dp_id) > + logger.error(details) > Make this log msg more generic. > + return FAIL > + > + return status > + > +if __name__ == "__main__": > + sys.exit(main()) > diff -r e8dc06eefada -r e1be3bd47b80 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Apr 21 17:08:06 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Thu Apr 23 02:37:31 2009 -0700 > @@ -190,7 +190,23 @@ > cmd = "virsh -c %s net-destroy %s" % (virt2uri(virt), network) > ret, out = utils.run_remote(server, cmd) > > - return ret > + return ret > + > +def diskpool_destroy(diskpool, server, virt="Xen"): > + """Function destroys a given virtual diskpool""" > + > + cmd = "virsh -c %s pool-destroy %s" % (virt2uri(virt), diskpool) > + ret, out = utils.run_remote(server, cmd) > + > + return ret > + > +def diskpool_undefine(diskpool, server, virt="Xen"): > + """Function undefines a given virtual diskpool""" > + > + cmd = "virsh -c %s pool-undefine %s" % (virt2uri(virt), diskpool) > + ret, out = utils.run_remote(server, cmd) > + > + return ret > > def network_by_bridge(bridge, server, virt="Xen"): > """Function returns virtual network for a given bridge""" > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Apr 24 14:19:22 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 24 Apr 2009 07:19:22 -0700 Subject: [Libvirt-cim] Test Run Summary (Apr 22 2009): KVM on Fedora release 10 (Cambridge) with Pegasus In-Reply-To: <49F14A58.9070803@linux.vnet.ibm.com> References: <49EEE63E.80900@linux.vnet.ibm.com> <20090423090410.GI15393@redhat.com> <49F14A58.9070803@linux.vnet.ibm.com> Message-ID: <49F1CA6A.8010208@linux.vnet.ibm.com> >> >> This is a limitation in KVM, there is no Reboot support, basically >> only shutdown. The only possibility at the moment is a combination of >> shutdown and restart, which is not 100% similar at the libvirt level >> which is why I would rather try to get a reboot operation at the QEmu >> level. >> But at the CIM API level maybe "reboot" and "shutdown + restart" are >> > I would let the reboot option remain for Xen/XenFV. > I can use "shutdown + restart" for now in the test case for KVM. Deepti, No need to change this in the test case, the test case is supposed to fail with KVM guest. That is why it returns an XFAIL instead of a real FAIL. >> undistinguishable, in which case it's probably a good idea to implement >> it this way if the hypervisor support for reboot is not present. >> > I believe that the reboot option works for the KVM guests. libvirt doesn't implement the reboot option for KVM guests. This is because QEMU / KVM doesn't support reboot. So the test case here verifies that you can can ask libvirt-cim to reboot the guest, and we'll return an error saying the hypervisor / libvirt doesn't support rebooting. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From dayne.medlyn at hp.com Fri Apr 24 17:37:10 2009 From: dayne.medlyn at hp.com (Medlyn, Dayne (VSL - Ft Collins)) Date: Fri, 24 Apr 2009 17:37:10 +0000 Subject: [Libvirt-cim] On SLES 11 with SFCB Xen_HostSystem returns no instances In-Reply-To: <49F102EA.9090502@linux.vnet.ibm.com> References: <49F0E3FD.1080105@novell.com> <49F102EA.9090502@linux.vnet.ibm.com> Message-ID: Thanks Kaitlin, We are using slim-campy-base provider as well and removing slim-campy-base enabled Xen_HostSystem precisely as you said. Disabling enumeration of Xen_HostSystem must have been added between libvirt-cim 0.4.1 and libvirt-cim 0.5.2. Thanks for the help. I know have the information necessary to work through a resolution. Dayne > -----Original Message----- > From: libvirt-cim-bounces at redhat.com [mailto:libvirt-cim- > bounces at redhat.com] On Behalf Of Kaitlin Rupert > Sent: Thursday, April 23, 2009 6:08 PM > To: List for discussion and development of libvirt CIM > Subject: Re: [Libvirt-cim] On SLES 11 with SFCB Xen_HostSystem returns > no instances > > Medlyn, Dayne (VSL - Ft Collins) wrote: > > Jim, > > > > So you are saying that we should not use Xen_HostSystem and that it > cannot be relied on? I am dealing with existing code that references > the Xen_HostSystem successfully on SLES10sp2 with libvirt-cim-0.4.1 > installed, which is now broken in SLES 11 with libvirt-cim-0.5.2. The > SLES 10sp2 system is running tog-Pegasus where the SLES 11 system is > running SFCB. I was hoping for compatibility from one release to > another. Perhaps the choice of using Xen_HostSystem was a bad one? > > > > I am trying to determine if I have found a bug in what is included in > SLES 11 or if I may be missing some unidentified dependency or > configurations. Thoughts? > > > > Thanks for your insights. > > > > Dayne > > > > > > Hi Dayne, > > The Xen_HostSystem instance is a placeholder, it doesn't give an > accurate view of the host system. If the system doesn't have a provider > set that accurately represents the host, then libvirt-cim will generate > an instance of Xen_HostSystem just so the association linkage works > properly. > > libvirt-cim doesn't set any of the attributes appropriately - we > basically set values for the keys and generate the instance. The idea > here is that libvirt-cim represents the virtual guests and their > resources, it doesn't represent the host system itself. So the > instance > of Xen_HostSystem doesn't conform to the System Virtualization Profile. > > Does your implementation need the sblim-cmpi-base package? libvirt-cim > will detect whether Linux_ComputerSystem is available. If it is > available, then enumerating Xen_HostSystem is disabled. If you remove > sblim-cmpi-base, you'll be able to enumerate Xen_HostSystem. > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From kaitlin at linux.vnet.ibm.com Fri Apr 24 23:22:23 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 24 Apr 2009 16:22:23 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3Update RPCS/04 to validate that the Network child pool can be created through the providers In-Reply-To: <49F16498.9090404@linux.vnet.ibm.com> References: <6789fc642c76198f983e.1240466311@elm3b197.beaverton.ibm.com> <49F16498.9090404@linux.vnet.ibm.com> Message-ID: <49F249AF.20205@linux.vnet.ibm.com> >> > When I did dumpxml for the different netpool types. I did not see any > specific information for nat type : for ex: the dump did not show > . > Also for routed pool I did not see the dev="eth1"/>. Are we not setting these kind of information via > Libvirt-cim ? We should be able to set these values via libvirt-cim. However, looks like there is a bug here.. I'll work on fixing that. Thanks for catching that! If you don't specify the forward mode (like Daisy does below), then you get an isolated network. >> + return FAIL >> + np_prop = { >> + "Address" : addr, >> + "Netmask" : "255.255.255.0", >> + "IPRangeStart" : "192.168.0.31", >> + "IPRangeEnd" : "192.168.0.57", >> + } -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Fri Apr 24 20:53:57 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 24 Apr 2009 17:53:57 -0300 Subject: [Libvirt-cim] [PATCH 2 of 3] Add support for the DiskDrive class In-Reply-To: References: Message-ID: <33c94f360449aa4324eb.1240606437@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1238703532 10800 # Node ID 33c94f360449aa4324eb42d7a630b7959c36613c # Parent c53de56e085d9ab893b5ef518dbcc4ccb9795531 Add support for the DiskDrive class Signed-off-by: Richard Maciel diff -r c53de56e085d -r 33c94f360449 Makefile.am --- a/Makefile.am Fri Apr 17 16:08:17 2009 -0300 +++ b/Makefile.am Thu Apr 02 17:18:52 2009 -0300 @@ -55,7 +55,8 @@ schema/InputPool.mof \ schema/HostedAccessPoint.mof \ schema/ServiceAccessBySAP.mof \ - schema/SAPAvailableForElement.mof + schema/SAPAvailableForElement.mof \ + schema/DiskDrive.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -129,7 +130,8 @@ schema/InputPool.registration \ schema/HostedAccessPoint.registration \ schema/ServiceAccessBySAP.registration \ - schema/SAPAvailableForElement.registration + schema/SAPAvailableForElement.registration \ + schema/DiskDrive.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r c53de56e085d -r 33c94f360449 schema/DiskDrive.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/DiskDrive.mof Thu Apr 02 17:18:52 2009 -0300 @@ -0,0 +1,29 @@ +// Copyright IBM Corp. 2009 + +[Description ( + "A class derived from CIM_DiskDrive to represent " + "the Xen DiskDrive on the system."), + Provider("cmpi::Virt_Device") +] +class Xen_DiskDrive : CIM_DiskDrive +{ +}; + +[Description ( + "A class derived from CIM_DiskDrive to represent " + "the KVM DiskDrive on the system."), + Provider("cmpi::Virt_Device") +] +class KVM_DiskDrive : CIM_DiskDrive +{ +}; + +[Description ( + "A class derived from CIM_DiskDrive to represent " + "the LXC DiskDrive on the system."), + Provider("cmpi::Virt_Device") +] +class LXC_DiskDrive : CIM_DiskDrive +{ +}; + diff -r c53de56e085d -r 33c94f360449 schema/DiskDrive.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/DiskDrive.registration Thu Apr 02 17:18:52 2009 -0300 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2007 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_DiskDrive root/virt Virt_Device Virt_Device instance +KVM_DiskDrive root/virt Virt_Device Virt_Device instance +LXC_DiskDrive root/virt Virt_Device Virt_Device instance From rmaciel at linux.vnet.ibm.com Fri Apr 24 20:53:56 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 24 Apr 2009 17:53:56 -0300 Subject: [Libvirt-cim] [PATCH 1 of 3] This patches changes the value of the constant representing LogicalDisk resource type from 17 to its correct value 31 In-Reply-To: References: Message-ID: # HG changeset patch # User Richard Maciel # Date 1239995297 10800 # Node ID c53de56e085d9ab893b5ef518dbcc4ccb9795531 # Parent 146ed7d63fbbc2edc78660ddc6ecc393ee61739c This patches changes the value of the constant representing LogicalDisk resource type from 17 to its correct value 31 Signed-off-by: Richard Maciel diff -r 146ed7d63fbb -r c53de56e085d src/svpc_types.h --- a/src/svpc_types.h Thu Apr 16 11:20:21 2009 -0700 +++ b/src/svpc_types.h Fri Apr 17 16:08:17 2009 -0300 @@ -26,7 +26,7 @@ #define CIM_RES_TYPE_PROC 3 #define CIM_RES_TYPE_MEM 4 #define CIM_RES_TYPE_NET 10 -#define CIM_RES_TYPE_DISK 17 +#define CIM_RES_TYPE_DISK 31 #define CIM_RES_TYPE_EMU 1 #define CIM_RES_TYPE_GRAPHICS 24 #define CIM_RES_TYPE_INPUT 13 From rmaciel at linux.vnet.ibm.com Fri Apr 24 20:53:55 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 24 Apr 2009 17:53:55 -0300 Subject: [Libvirt-cim] [PATCH 0 of 3] Represent CDROM devices using DiskDrive class Message-ID: From rmaciel at linux.vnet.ibm.com Fri Apr 24 20:53:58 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 24 Apr 2009 17:53:58 -0300 Subject: [Libvirt-cim] [PATCH 3 of 3] Add support for representing a cdrom device using the DiskDrive class In-Reply-To: References: Message-ID: # HG changeset patch # User Richard Maciel # Date 1239995297 10800 # Node ID c2f18f10ab7eb1049998f8e1ae393fecd914910d # Parent 33c94f360449aa4324eb42d7a630b7959c36613c Add support for representing a cdrom device using the DiskDrive class Signed-off-by: Richard Maciel diff -r 33c94f360449 -r c2f18f10ab7e libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Thu Apr 02 17:18:52 2009 -0300 +++ b/libxkutil/device_parsing.c Fri Apr 17 16:08:17 2009 -0300 @@ -92,7 +92,8 @@ if (dev == NULL) return; /* free()-like semantics */ - if (dev->type == CIM_RES_TYPE_DISK) + if ((dev->type == CIM_RES_TYPE_DISK) || + (dev->type == CIM_RES_TYPE_DRIVE)) cleanup_disk_device(&dev->dev.disk); else if (dev->type == CIM_RES_TYPE_NET) cleanup_net_device(&dev->dev.net); @@ -254,7 +255,14 @@ if ((ddev->source == NULL) || (ddev->virtual_dev == NULL)) goto err; - vdev->type = CIM_RES_TYPE_DISK; + if (STREQ(ddev->device, "disk")) { + vdev->type = CIM_RES_TYPE_DISK; + } else if (STREQ(ddev->device, "cdrom")) { + vdev->type = CIM_RES_TYPE_DRIVE; + } else { + goto err; + } + vdev->id = strdup(ddev->virtual_dev); *vdevs = vdev; @@ -513,6 +521,57 @@ return true; } +static bool filter_list_by_type(int type, struct virt_device **list, int *size) +{ + struct virt_device *filtd_list = NULL; + struct virt_device *_list = NULL; + int filtd_count = 0; + int devlstidx = 0; + + filtd_list = calloc(*size, sizeof(**list)); + if (filtd_list == NULL) + goto err; + + /* To be valid, item from list must have the same type + * than the provided in type parameter + */ + for (devlstidx = 0; devlstidx < *size; devlstidx++) { + if (list[devlstidx]->type == type) { + CU_DEBUG("Item from list (id `%s') accepted by filter", + list[devlstidx]->id); + + memcpy(&filtd_list[filtd_count], + list[devlstidx], + sizeof(**list)); + + filtd_count++; + } + } + + CU_DEBUG("Number of filtered items: %d", filtd_count); + + _list = realloc(filtd_list, + filtd_count * sizeof(*filtd_list)); + + if (_list == NULL && filtd_count != 0) + goto err; + + free(*list); + + *list = _list; + + *size = filtd_count; + + return true; + + err: + free(filtd_list); + + CU_DEBUG("Error when filtering list"); + + return false; +} + static int do_parse(xmlNodeSet *nsv, int type, struct virt_device **l) { int devidx; @@ -525,7 +584,8 @@ /* point to correct parser function according to type */ if (type == CIM_RES_TYPE_NET) do_real_parse = &parse_net_device; - else if (type == CIM_RES_TYPE_DISK) + else if ((type == CIM_RES_TYPE_DISK) || + (type == CIM_RES_TYPE_DRIVE)) do_real_parse = &parse_disk_device; else if (type == CIM_RES_TYPE_PROC) do_real_parse = parse_vcpu_device; @@ -558,6 +618,15 @@ if (devices <= 0) continue; + if ((type == CIM_RES_TYPE_DISK) || + (type == CIM_RES_TYPE_DRIVE)) { + if (!filter_list_by_type(type, &tmp_list, &devices)) { + goto end; + } + if (devices == 0) + goto end; + } + if (!resize_devlist(&list, lstidx + devices)) { /* Skip these devices and try again for the * next cycle, which will probably fail, but @@ -595,7 +664,8 @@ if (type == CIM_RES_TYPE_NET) xpathstr = NET_XPATH; - else if (type == CIM_RES_TYPE_DISK) + else if ((type == CIM_RES_TYPE_DISK) || + (type == CIM_RES_TYPE_DRIVE)) xpathstr = DISK_XPATH; else if (type == CIM_RES_TYPE_PROC) xpathstr = VCPU_XPATH; diff -r 33c94f360449 -r c2f18f10ab7e src/Virt_Device.c --- a/src/Virt_Device.c Thu Apr 02 17:18:52 2009 -0300 +++ b/src/Virt_Device.c Fri Apr 17 16:08:17 2009 -0300 @@ -140,6 +140,26 @@ return inst; } +static CMPIInstance *drive_instance(const CMPIBroker *broker, + struct disk_device *dev, + const virDomainPtr dom, + const char *ns) +{ + CMPIInstance *inst; + virConnectPtr conn; + + conn = virDomainGetConnect(dom); + inst = get_typed_instance(broker, + pfx_from_conn(conn), + "DiskDrive", + ns); + + if (!disk_set_name(inst, dev)) + return NULL; + + return inst; +} + static int mem_set_size(CMPIInstance *instance, struct mem_device *dev) { @@ -440,6 +460,11 @@ &dev->dev.disk, dom, ns); + else if (dev->type == CIM_RES_TYPE_DRIVE) + instance = drive_instance(broker, + &dev->dev.disk, + dom, + ns); else if (dev->type == CIM_RES_TYPE_MEM) instance = mem_instance(broker, &dev->dev.mem, @@ -486,6 +511,8 @@ return CIM_RES_TYPE_NET; else if (strstr(classname, "LogicalDisk")) return CIM_RES_TYPE_DISK; + else if (strstr(classname, "DiskDrive")) + return CIM_RES_TYPE_DRIVE; else if (strstr(classname, "Memory")) return CIM_RES_TYPE_MEM; else if (strstr(classname, "Processor")) diff -r 33c94f360449 -r c2f18f10ab7e src/svpc_types.h --- a/src/svpc_types.h Thu Apr 02 17:18:52 2009 -0300 +++ b/src/svpc_types.h Fri Apr 17 16:08:17 2009 -0300 @@ -27,12 +27,13 @@ #define CIM_RES_TYPE_MEM 4 #define CIM_RES_TYPE_NET 10 #define CIM_RES_TYPE_DISK 31 +#define CIM_RES_TYPE_DRIVE 17 #define CIM_RES_TYPE_EMU 1 #define CIM_RES_TYPE_GRAPHICS 24 #define CIM_RES_TYPE_INPUT 13 #define CIM_RES_TYPE_UNKNOWN 1000 -#define CIM_RES_TYPE_COUNT 6 +#define CIM_RES_TYPE_COUNT 7 const static int cim_res_types[CIM_RES_TYPE_COUNT] = {CIM_RES_TYPE_NET, CIM_RES_TYPE_DISK, @@ -40,6 +41,7 @@ CIM_RES_TYPE_PROC, CIM_RES_TYPE_GRAPHICS, CIM_RES_TYPE_INPUT, + CIM_RES_TYPE_DRIVE, }; #define CIM_VSSD_RECOVERY_NONE 2 From yunguol at cn.ibm.com Mon Apr 27 08:10:16 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 27 Apr 2009 01:10:16 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers Message-ID: # HG changeset patch # User Guolian Yun # Date 1240819808 25200 # Node ID fc3416aaa19e164920af1d7b264175706d68222b # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 [TEST] #4 Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers Updates from 3 to 4: 1) Move general net function to common.py 2) move the CIM_NS import stmt along with the logger Updates from 2 to 3: 1) Use CIM_NS from const.py instead of hardcoding 2) Check if the IP is already used on the system before setting 3) Rewrite try, except... blocks Updates from 1 to 2: Test all types of networkpool including routed network, nat based network and isolated network Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r e8dc06eefada -r fc3416aaa19e suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Mon Apr 27 01:10:08 2009 -0700 @@ -39,45 +39,104 @@ # 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.Globals import logger, CIM_NS 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 +from pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.common_util import destroy_netpool, undefine_netpool, \ + verify_pool +from XenKvmLib.xm_virt_util import net_list +from VirtLib.utils import run_remote cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED cim_mname = "CreateChildResourcePool" +libvirt_cim_child_pool_rev = 837 +test_pool = ["routedpool", "natpool", "isolatedpool"] @do_main(platform_sup) def main(): 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) - return FAIL - - logger.error("The execution should not have reached here!!") - return FAIL + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev < libvirt_cim_child_pool_rev: + 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) + return FAIL + elif curr_cim_rev >= libvirt_cim_child_pool_rev: + nprasd = get_typed_class(options.virt, + 'NetPoolResourceAllocationSettingData') + addr = "192.168.0.30" + n_list = net_list(options.ip, options.virt) + for _net_name in n_list: + cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \ + cut -d ' ' -f 4 | sed 's/address=//'" % _net_name + s, in_use_addr = run_remote(options.ip, cmd) + in_use_addr = in_use_addr.strip("'") + if in_use_addr == addr: + logger.error("IP address is in use by a different network") + return FAIL + np_prop = { + "Address" : addr, + "Netmask" : "255.255.255.0", + "IPRangeStart" : "192.168.0.31", + "IPRangeEnd" : "192.168.0.57", + } + for i in range(0, len(test_pool)): + np_id = 'NetworkPool/%s' % test_pool[i] + iname = CIMInstanceName(nprasd, + namespace = CIM_NS, + keybindings = {'InstanceID':np_id}) + if test_pool[i] == "routedpool": + np_prop["ForwardMode"] = "route eth1" + elif test_pool[i] == "natpool": + np_prop["ForwardMode"] = "nat" + + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) + try: + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], + Settings=[nrasd.tomof()]) + np = get_typed_class(options.virt, 'NetworkPool') + status = verify_pool(options.ip, np, np_id) + if status != PASS: + raise Exception("Error in networkpool verification") + status = destroy_netpool(options.ip, options.virt, test_pool[i]) + if status != PASS: + raise Exception("Unable to destroy networkpool %s" + % test_pool[i]) + status = undefine_netpool(options.ip, options.virt, test_pool[i]) + if status != PASS: + raise Exception("Unable to undefine networkpool %s" + % test_pool[i]) + except Exception, details: + logger.error("Error in networkpool %s creation and verification" + " through provider", np_id) + logger.error(details) + return FAIL + + return status + if __name__ == "__main__": sys.exit(main()) - diff -r e8dc06eefada -r fc3416aaa19e suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Apr 27 01:10:08 2009 -0700 @@ -26,7 +26,8 @@ from time import sleep from distutils.file_util import move_file from XenKvmLib.test_xml import * -from XenKvmLib.test_doms import * +from XenKvmLib.test_doms import * +from XenKvmLib.enumclass import EnumInstances from XenKvmLib import vsms from CimTest import Globals from XenKvmLib import enumclass @@ -385,7 +386,29 @@ logger.error("Failed to destroy Virtual Network '%s'", net_name) return FAIL - return PASS + return PASS + +def net_undefine(network, server, virt="Xen"): + """Function undefine a given virtual network""" + + cmd = "virsh -c %s net-undefine %s" % (virt2uri(virt), network) + print cmd + ret, out = utils.run_remote(server, cmd) + + return ret + + +def undefine_netpool(server, virt, net_name): + if net_name == None: + return FAIL + + ret = net_undefine(net_name, server, virt) + if ret != 0: + logger.error("Failed to undefine Virtual Network '%s'", net_name) + return FAIL + + return PASS + def libvirt_cached_data_poll(ip, virt, dom_name): cs = None @@ -435,3 +458,20 @@ return guest_name, devid, PASS +def verify_pool(server, networkpool, poolname): + status = FAIL + pool_list = EnumInstances(server, networkpool) + if len(pool_list) < 1: + logger.error("Return %i instances, expected at least one instance", + len(pool_list)) + return FAIL + + for i in range(0, len(pool_list)): + ret_pool = pool_list[i].InstanceID + if ret_pool == poolname: + status = PASS + break + elif ret_pool != poolname and i == len(pool_list)-1: + logger.error("Can not find expected pool") + + return status From yunguol at cn.ibm.com Mon Apr 27 07:56:35 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 27 Apr 2009 15:56:35 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers In-Reply-To: Message-ID: Please ignore this patch =) Thanks! Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 Guo Lian Yun/China/IBM at IBMCN Sent by: libvirt-cim-bounces at redhat.com 2009-04-27 16:10 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH] [TEST] #4 Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers # HG changeset patch # User Guolian Yun # Date 1240819808 25200 # Node ID fc3416aaa19e164920af1d7b264175706d68222b # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 [TEST] #4 Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers Updates from 3 to 4: 1) Move general net function to common.py 2) move the CIM_NS import stmt along with the logger Updates from 2 to 3: 1) Use CIM_NS from const.py instead of hardcoding 2) Check if the IP is already used on the system before setting 3) Rewrite try, except... blocks Updates from 1 to 2: Test all types of networkpool including routed network, nat based network and isolated network Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r e8dc06eefada -r fc3416aaa19e suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Mon Apr 27 01:10:08 2009 -0700 @@ -39,45 +39,104 @@ # 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.Globals import logger, CIM_NS 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 +from pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.common_util import destroy_netpool, undefine_netpool, \ + verify_pool +from XenKvmLib.xm_virt_util import net_list +from VirtLib.utils import run_remote cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED cim_mname = "CreateChildResourcePool" +libvirt_cim_child_pool_rev = 837 +test_pool = ["routedpool", "natpool", "isolatedpool"] @do_main(platform_sup) def main(): 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) - return FAIL - - logger.error("The execution should not have reached here!!") - return FAIL + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev < libvirt_cim_child_pool_rev: + 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) + return FAIL + elif curr_cim_rev >= libvirt_cim_child_pool_rev: + nprasd = get_typed_class(options.virt, + 'NetPoolResourceAllocationSettingData') + addr = "192.168.0.30" + n_list = net_list(options.ip, options.virt) + for _net_name in n_list: + cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \ + cut -d ' ' -f 4 | sed 's/address=//'" % _net_name + s, in_use_addr = run_remote(options.ip, cmd) + in_use_addr = in_use_addr.strip("'") + if in_use_addr == addr: + logger.error("IP address is in use by a different network") + return FAIL + np_prop = { + "Address" : addr, + "Netmask" : "255.255.255.0", + "IPRangeStart" : "192.168.0.31", + "IPRangeEnd" : "192.168.0.57", + } + for i in range(0, len(test_pool)): + np_id = 'NetworkPool/%s' % test_pool[i] + iname = CIMInstanceName(nprasd, + namespace = CIM_NS, + keybindings = {'InstanceID':np_id}) + if test_pool[i] == "routedpool": + np_prop["ForwardMode"] = "route eth1" + elif test_pool[i] == "natpool": + np_prop["ForwardMode"] = "nat" + + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) + try: + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], + Settings=[nrasd.tomof()]) + np = get_typed_class(options.virt, 'NetworkPool') + status = verify_pool(options.ip, np, np_id) + if status != PASS: + raise Exception("Error in networkpool verification") + status = destroy_netpool(options.ip, options.virt, test_pool[i]) + if status != PASS: + raise Exception("Unable to destroy networkpool %s" + % test_pool[i]) + status = undefine_netpool(options.ip, options.virt, test_pool[i]) + if status != PASS: + raise Exception("Unable to undefine networkpool %s" + % test_pool[i]) + except Exception, details: + logger.error("Error in networkpool %s creation and verification" + " through provider", np_id) + logger.error(details) + return FAIL + + return status + if __name__ == "__main__": sys.exit(main()) - diff -r e8dc06eefada -r fc3416aaa19e suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Apr 27 01:10:08 2009 -0700 @@ -26,7 +26,8 @@ from time import sleep from distutils.file_util import move_file from XenKvmLib.test_xml import * -from XenKvmLib.test_doms import * +from XenKvmLib.test_doms import * +from XenKvmLib.enumclass import EnumInstances from XenKvmLib import vsms from CimTest import Globals from XenKvmLib import enumclass @@ -385,7 +386,29 @@ logger.error("Failed to destroy Virtual Network '%s'", net_name) return FAIL - return PASS + return PASS + +def net_undefine(network, server, virt="Xen"): + """Function undefine a given virtual network""" + + cmd = "virsh -c %s net-undefine %s" % (virt2uri(virt), network) + print cmd + ret, out = utils.run_remote(server, cmd) + + return ret + + +def undefine_netpool(server, virt, net_name): + if net_name == None: + return FAIL + + ret = net_undefine(net_name, server, virt) + if ret != 0: + logger.error("Failed to undefine Virtual Network '%s'", net_name) + return FAIL + + return PASS + def libvirt_cached_data_poll(ip, virt, dom_name): cs = None @@ -435,3 +458,20 @@ return guest_name, devid, PASS +def verify_pool(server, networkpool, poolname): + status = FAIL + pool_list = EnumInstances(server, networkpool) + if len(pool_list) < 1: + logger.error("Return %i instances, expected at least one instance", + len(pool_list)) + return FAIL + + for i in range(0, len(pool_list)): + ret_pool = pool_list[i].InstanceID + if ret_pool == poolname: + status = PASS + break + elif ret_pool != poolname and i == len(pool_list)-1: + logger.error("Can not find expected pool") + + return status _______________________________________________ Libvirt-cim mailing list Libvirt-cim at redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Apr 27 08:15:41 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 27 Apr 2009 01:15:41 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Update RPCS/04 to validate that the Network child pool can be created through the providers Message-ID: <02b3a5f43721b347c9be.1240820141@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1240820133 25200 # Node ID 02b3a5f43721b347c9bef681ed456fcf99e76e81 # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 [TEST] #4 Update RPCS/04 to validate that the Network child pool can be created through the providers Updates from 3 to 4: 1) Move general net function to common.py 2) move the CIM_NS import stmt along with the logger Updates from 2 to 3: 1) Use CIM_NS from const.py instead of hardcoding 2) Check if the IP is already used on the system before setting 3) Rewrite try, except... blocks Updates from 1 to 2: Test all types of networkpool including routed network, nat based network and isolated network Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r e8dc06eefada -r 02b3a5f43721 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Mon Apr 27 01:15:33 2009 -0700 @@ -39,45 +39,104 @@ # 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.Globals import logger, CIM_NS 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 +from pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.common_util import destroy_netpool, undefine_netpool, \ + verify_pool +from XenKvmLib.xm_virt_util import net_list +from VirtLib.utils import run_remote cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED cim_mname = "CreateChildResourcePool" +libvirt_cim_child_pool_rev = 837 +test_pool = ["routedpool", "natpool", "isolatedpool"] @do_main(platform_sup) def main(): 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) - return FAIL - - logger.error("The execution should not have reached here!!") - return FAIL + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev < libvirt_cim_child_pool_rev: + 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) + return FAIL + elif curr_cim_rev >= libvirt_cim_child_pool_rev: + nprasd = get_typed_class(options.virt, + 'NetPoolResourceAllocationSettingData') + addr = "192.168.0.30" + n_list = net_list(options.ip, options.virt) + for _net_name in n_list: + cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \ + cut -d ' ' -f 4 | sed 's/address=//'" % _net_name + s, in_use_addr = run_remote(options.ip, cmd) + in_use_addr = in_use_addr.strip("'") + if in_use_addr == addr: + logger.error("IP address is in use by a different network") + return FAIL + np_prop = { + "Address" : addr, + "Netmask" : "255.255.255.0", + "IPRangeStart" : "192.168.0.31", + "IPRangeEnd" : "192.168.0.57", + } + for i in range(0, len(test_pool)): + np_id = 'NetworkPool/%s' % test_pool[i] + iname = CIMInstanceName(nprasd, + namespace = CIM_NS, + keybindings = {'InstanceID':np_id}) + if test_pool[i] == "routedpool": + np_prop["ForwardMode"] = "route eth1" + elif test_pool[i] == "natpool": + np_prop["ForwardMode"] = "nat" + + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) + try: + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], + Settings=[nrasd.tomof()]) + np = get_typed_class(options.virt, 'NetworkPool') + status = verify_pool(options.ip, np, np_id) + if status != PASS: + raise Exception("Error in networkpool verification") + status = destroy_netpool(options.ip, options.virt, test_pool[i]) + if status != PASS: + raise Exception("Unable to destroy networkpool %s" + % test_pool[i]) + status = undefine_netpool(options.ip, options.virt, test_pool[i]) + if status != PASS: + raise Exception("Unable to undefine networkpool %s" + % test_pool[i]) + except Exception, details: + logger.error("Error in networkpool %s creation and verification" + " through provider", np_id) + logger.error(details) + return FAIL + + return status + if __name__ == "__main__": sys.exit(main()) - diff -r e8dc06eefada -r 02b3a5f43721 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Apr 27 01:15:33 2009 -0700 @@ -26,7 +26,8 @@ from time import sleep from distutils.file_util import move_file from XenKvmLib.test_xml import * -from XenKvmLib.test_doms import * +from XenKvmLib.test_doms import * +from XenKvmLib.enumclass import EnumInstances from XenKvmLib import vsms from CimTest import Globals from XenKvmLib import enumclass @@ -385,7 +386,29 @@ logger.error("Failed to destroy Virtual Network '%s'", net_name) return FAIL - return PASS + return PASS + +def net_undefine(network, server, virt="Xen"): + """Function undefine a given virtual network""" + + cmd = "virsh -c %s net-undefine %s" % (virt2uri(virt), network) + print cmd + ret, out = utils.run_remote(server, cmd) + + return ret + + +def undefine_netpool(server, virt, net_name): + if net_name == None: + return FAIL + + ret = net_undefine(net_name, server, virt) + if ret != 0: + logger.error("Failed to undefine Virtual Network '%s'", net_name) + return FAIL + + return PASS + def libvirt_cached_data_poll(ip, virt, dom_name): cs = None @@ -435,3 +458,20 @@ return guest_name, devid, PASS +def verify_pool(server, networkpool, poolname): + status = FAIL + pool_list = EnumInstances(server, networkpool) + if len(pool_list) < 1: + logger.error("Return %i instances, expected at least one instance", + len(pool_list)) + return FAIL + + for i in range(0, len(pool_list)): + ret_pool = pool_list[i].InstanceID + if ret_pool == poolname: + status = PASS + break + elif ret_pool != poolname and i == len(pool_list)-1: + logger.error("Can not find expected pool") + + return status From yunguol at cn.ibm.com Mon Apr 27 09:48:49 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 27 Apr 2009 02:48:49 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add new tc to validate that the Disk child pool can be created through the providers Message-ID: # HG changeset patch # User Guolian Yun # Date 1240825724 25200 # Node ID b1920cf4a6c61d3bfda1103bc454c277294745cb # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 [TEST] #2 Add new tc to validate that the Disk child pool can be created through the providers Updates from 1 to 2: 1)Combine CIM_NS and logger 2)Move verify_pool function into library Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r e8dc06eefada -r b1920cf4a6c6 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateChildResourcePool_Disk.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateChildResourcePool_Disk.py Mon Apr 27 02:48:44 2009 -0700 @@ -0,0 +1,125 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Guolian Yun +# +# +# 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 should test the CreateChildResourcePool service +# supplied by the RPCS provider. +# Input +# ----- +# IN -- ElementName -- String -- The desired name of the resource pool +# IN -- Settings -- String -- A string representation of a +# CIM_ResourceAllocationSettingData +# instance that represents the allocation +# assigned to this child pool +# IN -- ParentPool -- CIM_ResourcePool REF -- The parent pool from which +# to create this pool +# +# Output +# ------ +# OUT -- Pool -- CIM_ResourcePool REF -- The resulting resource pool +# 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 +# +# Exception details before Revision 837 +# ----- +# Error code: CIM_ERR_NOT_SUPPORTED +# +# After revision 837, the service is implemented +# +# -Date: 23.04.2009 + +import sys +import pywbem +from XenKvmLib import rpcs_service +from CimTest.Globals import logger, CIM_NS +from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.const import do_main, platform_sup, get_provider_version +from XenKvmLib.classes import get_typed_class +from pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.common_util import diskpool_destroy, diskpool_undefine, \ + verify_pool +from pywbem.cim_types import Uint16 + +cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED +cim_mname = "CreateChildResourcePool" +libvirt_cim_child_pool_rev = 837 +test_pool = ["dir_pool"] + + at 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: + 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) + return FAIL + elif curr_cim_rev >= libvirt_cim_child_pool_rev: + dprasd = get_typed_class(options.virt, + 'DiskPoolResourceAllocationSettingData') + dp_prop = {"Path" : "/tmp"} + + for i in range(0, len(test_pool)): + dp_id = 'DiskPool/%s' % test_pool[i] + iname = CIMInstanceName(dprasd, + namespace = CIM_NS, + keybindings = {'InstanceID':dp_id}) + if test_pool[i] == "dir_pool": + dp_prop["Type"] = Uint16(1) + + drasd = CIMInstance(dprasd, path = iname, properties = dp_prop) + try: + rpcs_conn.CreateChildResourcePool(ElementName=test_pool[i], + Settings=[drasd.tomof()]) + dp = get_typed_class(options.virt, 'DiskPool') + status = verify_pool(options.ip, dp, dp_id) + if status != PASS: + raise Exception("Error in diskpool verification") + status = diskpool_destroy(test_pool[i], options.ip, options.virt) + if status != PASS: + raise Exception("Unable to destroy diskpool %s" + % test_pool[i]) + status = diskpool_undefine(test_pool[i], options.ip, options.virt) + if status != PASS: + raise Exception("Unable to undefine diskpool %s" + % test_pool[i]) + except Exception, details: + logger.error("Error in %s creation and verification" + " through provider", dp_id) + logger.error(details) + return FAIL + + return status + +if __name__ == "__main__": + sys.exit(main()) diff -r e8dc06eefada -r b1920cf4a6c6 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Apr 27 02:48:44 2009 -0700 @@ -403,6 +403,22 @@ return cs +def diskpool_destroy(diskpool, server, virt="Xen"): + """Function destroys a given virtual diskpool""" + + cmd = "virsh -c %s pool-destroy %s" % (virt2uri(virt), diskpool) + ret, out = utils.run_remote(server, cmd) + + return ret + +def diskpool_undefine(diskpool, server, virt="Xen"): + """Function undefines a given virtual diskpool""" + + cmd = "virsh -c %s pool-undefine %s" % (virt2uri(virt), diskpool) + ret, out = utils.run_remote(server, cmd) + + return ret + def check_sblim(server, virt='Xen'): status = FAIL prev_namespace = Globals.CIM_NS From yunguol at cn.ibm.com Mon Apr 27 09:59:29 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 27 Apr 2009 02:59:29 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers Message-ID: # HG changeset patch # User Guolian Yun # Date 1240826363 25200 # Node ID bf6c03f3c0518a6db28f1fc0313b29ed36726a5c # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 [TEST] #2 Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers Updates from 1 to 2: 1) Merge CIM_NS and logger 2) Remove the netpool length check 3) Check the use of the ip address before using Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r e8dc06eefada -r bf6c03f3c051 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Tue Apr 21 17:08:06 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Mon Apr 27 02:59:23 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 @@ -44,34 +46,90 @@ import sys import pywbem from XenKvmLib import rpcs_service -from CimTest.Globals import logger +from CimTest.Globals import logger, CIM_NS 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 pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.enumclass import EnumInstances +from XenKvmLib.xm_virt_util import net_list from XenKvmLib.classes import get_typed_class +from VirtLib.utils import run_remote 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) - return FAIL - - logger.error("The execution should not have reached here!!") - return FAIL + 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: + nprasd = get_typed_class(options.virt, + 'NetPoolResourceAllocationSettingData') + np = get_typed_class(options.virt, 'NetworkPool') + np_id = 'NetworkPool/%s' % test_pool + iname = CIMInstanceName(nprasd, + namespace = CIM_NS, + keybindings = {'InstanceID':np_id}) + addr = "192.168.0.20" + n_list = net_list(options.ip, options.virt) + for _net_name in n_list: + cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \ + cut -d ' ' -f 4 | sed 's/address=//'" % _net_name + s, in_use_addr = run_remote(options.ip, cmd) + in_use_addr = in_use_addr.strip("'") + if in_use_addr == addr: + logger.error("IP address is in use by a different network") + return FAIL + np_prop = { + "Address" : addr, + "Netmask" : "255.255.255.0", + "IPRangeStart" : "192.168.0.21", + "IPRangeEnd" : "192.168.0.30" + } + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) + try: + rpcs_conn.CreateChildResourcePool(ElementName=test_pool, + Settings=[nrasd.tomof()]) + netpool = EnumInstances(options.ip, np) + for i in range(0, len(netpool)): + ret_pool = netpool[i].InstanceID + if ret_pool == np_id: + break + elif ret_pool != np_id and i == len(netpool) - 1: + raise Exception("Can not find expected pool") + + pool = CIMInstanceName(np, keybindings = {'InstanceID':np_id}) + rpcs_conn.DeleteResourcePool(Pool = pool) + 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) + break + elif ret_pool != np_id and i == len(netpool) -1: + status = PASS + except Exception, details: + logger.error(details) + return status + + return status if __name__ == "__main__": sys.exit(main()) - From yunguol at cn.ibm.com Mon Apr 27 10:17:18 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 27 Apr 2009 03:17:18 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add new tc to validate that the Disk child pool can be deleted through the providers Message-ID: <43a14ac09f6fe1f55c2b.1240827438@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1240827432 25200 # Node ID 43a14ac09f6fe1f55c2be730c62ea2f3fac24140 # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 [TEST] Add new tc to validate that the Disk child pool can be deleted through the providers Tested for KVM with current sources Signed-off-by: Guolian Yun diff -r e8dc06eefada -r 43a14ac09f6f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/09_DeleteResourcePool_Disk.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/09_DeleteResourcePool_Disk.py Mon Apr 27 03:17:12 2009 -0700 @@ -0,0 +1,121 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# +# 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 should test the DeleteResourcePool service +# supplied by the RPCS provider. +# The DeleteResourcePool is used to delete a resource pool. +# DeleteResourcePool() details: +# Input +# ----- +# IN -- Pool -- CIM_ResourcePool REF -- The resource pool to delete +# +# Output +# ------ +# 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. +# +# Exception details before Revision 841 +# ----- +# Error code: CIM_ERR_NOT_SUPPORTED +# +# After revision 841, the service is implemented +# +# -Date: 20.02.2008 + + +import sys +import pywbem +from XenKvmLib import rpcs_service +from CimTest.Globals import logger, CIM_NS +from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.const import do_main, platform_sup, get_provider_version +from pywbem.cim_obj import CIMInstanceName, CIMInstance +from XenKvmLib.enumclass import EnumInstances +from XenKvmLib.classes import get_typed_class +from pywbem.cim_types import Uint16 + +cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED +cim_mname = "DeleteResourcePool" +libvirt_cim_child_pool_rev = 841 +test_pool = "dir_pool" + + at do_main(platform_sup) +def main(): + status = FAIL + 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: + 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: + dprasd = get_typed_class(options.virt, + 'DiskPoolResourceAllocationSettingData') + dp = get_typed_class(options.virt, 'DiskPool') + dp_id = 'DiskPool/%s' % test_pool + iname = CIMInstanceName(dprasd, + namespace = CIM_NS, + keybindings = {'InstanceID':dp_id}) + dp_prop = {"Path" : "/tmp"} + if test_pool == "dir_pool": + dp_prop["Type"] = Uint16(1) + drasd = CIMInstance(dprasd, path = iname, properties = dp_prop) + try: + rpcs_conn.CreateChildResourcePool(ElementName=test_pool, + Settings=[drasd.tomof()]) + diskpool = EnumInstances(options.ip, dp) + for i in range(0, len(diskpool)): + ret_pool = diskpool[i].InstanceID + if ret_pool == dp_id: + break + elif ret_pool != dp_id and i == len(diskpool) - 1: + raise Exception("Can not find expected pool") + + pool = CIMInstanceName(dp, keybindings = {'InstanceID':dp_id}) + rpcs_conn.DeleteResourcePool(Pool = pool) + diskpool = EnumInstances(options.ip, dp) + for i in range(0, len(diskpool)): + ret_pool = diskpool[i].InstanceID + if ret_pool == dp_id: + raise Exception("Failed to delete %s" % test_pool) + break + elif ret_pool != dp_id and i == len(diskpool) -1: + status = PASS + except Exception, details: + logger.error(details) + return status + + return status +if __name__ == "__main__": + sys.exit(main()) From kaitlin at linux.vnet.ibm.com Mon Apr 27 18:13:25 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Apr 2009 11:13:25 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] Add support for representing a cdrom device using the DiskDrive class In-Reply-To: References: Message-ID: <49F5F5C5.2090509@linux.vnet.ibm.com> This set of changes breaks the behavior of several providers. Those issues need to be addressed and included in this patchset before it can be applied. Broken behavior: ElementAllocatedFromPool: -Can no longer associate a disk to the pool it was allocated from. -Can no longer associate a pool to the disks that have been allocated from it SettingsDefineCapabilities: Can no longer generate template RASDs for disk and cdrom devices DiskResourceAllocationSettingData: enum doesn't return instances for DiskDrives ResourceAllocationFromPool: Unable to associate DiskRASDs to pools or pools to DiskRASDs > +static CMPIInstance *drive_instance(const CMPIBroker *broker, > + struct disk_device *dev, > + const virDomainPtr dom, > + const char *ns) > +{ > + CMPIInstance *inst; > + virConnectPtr conn; > + > + conn = virDomainGetConnect(dom); Need to check to see if conn is NULL. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 27 21:11:48 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Apr 2009 14:11:48 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers In-Reply-To: References: Message-ID: <49F61F94.3070904@linux.vnet.ibm.com> > import sys > import pywbem > from XenKvmLib import rpcs_service rpcs_service is no longer being used. > @do_main(platform_sup) > def main(): > options = main.options > rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \ > "ResourcePoolConfigurationService"))(options.ip) Put the get_typed_class() call on its own line. > + elif curr_cim_rev >= libvirt_cim_child_pool_rev: > + nprasd = get_typed_class(options.virt, > + 'NetPoolResourceAllocationSettingData') > + addr = "192.168.0.30" > + n_list = net_list(options.ip, options.virt) > + for _net_name in n_list: > + cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \ > + cut -d ' ' -f 4 | sed 's/address=//'" % _net_name > + s, in_use_addr = run_remote(options.ip, cmd) > + in_use_addr = in_use_addr.strip("'") > + if in_use_addr == addr: > + logger.error("IP address is in use by a different network") > + return FAIL I suspect this will be used by other tests at some point, so this should go in XenKvmLib. > +def verify_pool(server, networkpool, poolname): > + status = FAIL > + pool_list = EnumInstances(server, networkpool) > + if len(pool_list) < 1: > + logger.error("Return %i instances, expected at least one instance", > + len(pool_list)) > + return FAIL > + > + for i in range(0, len(pool_list)): > + ret_pool = pool_list[i].InstanceID > + if ret_pool == poolname: > + status = PASS > + break > + elif ret_pool != poolname and i == len(pool_list)-1: > + logger.error("Can not find expected pool") > + > + return status > This isn't enough to verify the pool was created properly. You verify the pool was created, but you don't verify its attributes. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 27 21:17:55 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Apr 2009 14:17:55 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Update RPCS/04 to validate that the Network child pool can be created through the providers In-Reply-To: <02b3a5f43721b347c9be.1240820141@elm3b197.beaverton.ibm.com> References: <02b3a5f43721b347c9be.1240820141@elm3b197.beaverton.ibm.com> Message-ID: <49F62103.7060602@linux.vnet.ibm.com> > diff -r e8dc06eefada -r 02b3a5f43721 suites/libvirt-cim/lib/XenKvmLib/common_util.py > + > +def net_undefine(network, server, virt="Xen"): > + > +def undefine_netpool(server, virt, net_name): > +def verify_pool(server, networkpool, poolname): Can you put these functions in lib/XenKvmLib/pool.py? common_util.py is intended for generic functions, but we've been using it as a catchall. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 27 21:21:38 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Apr 2009 14:21:38 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add new tc to validate that the Disk child pool can be created through the providers In-Reply-To: References: Message-ID: <49F621E2.7040109@linux.vnet.ibm.com> Daisy, Since a lot of the same bugs found in the network pool test case also exist here, can you wait until the network pool test case is in the tree before submitting an update to this test case? I think that'll reduce the amount of churn in this patch. Thanks! > +from pywbem.cim_types import Uint16 > + > +cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED > +cim_mname = "CreateChildResourcePool" > +libvirt_cim_child_pool_rev = 837 > +test_pool = ["dir_pool"] fs type pools are now supported. > + > + at do_main(platform_sup) > +def main(): > + options = main.options > + rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \ > + "ResourcePoolConfigurationService"))(options.ip) Put get_typed_class() on its own line. > + status = verify_pool(options.ip, dp, dp_id) > + if status != PASS: The verify_pool() function doesn't verify the attributes of the pool to ensure that the pool was created properly. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 27 21:32:03 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Apr 2009 14:32:03 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers In-Reply-To: References: Message-ID: <49F62453.6050302@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1240826363 25200 > # Node ID bf6c03f3c0518a6db28f1fc0313b29ed36726a5c > # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 > [TEST] #2 Update RPCS/07_DeleteResourcePool.py validate that the Network pool can be deleted through the providers > > > Updates from 1 to 2: > 1) Merge CIM_NS and logger > 2) Remove the netpool length check > 3) Check the use of the ip address before using > > Tested for KVM with current sources > Signed-off-by: Guolian Yun > > diff -r e8dc06eefada -r bf6c03f3c051 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py > --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Tue Apr 21 17:08:06 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Mon Apr 27 02:59:23 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 > > @@ -44,34 +46,90 @@ > import sys > import pywbem > from XenKvmLib import rpcs_service > -from CimTest.Globals import logger > +from CimTest.Globals import logger, CIM_NS > 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 pywbem.cim_obj import CIMInstanceName, CIMInstance > +from XenKvmLib.enumclass import EnumInstances > +from XenKvmLib.xm_virt_util import net_list > from XenKvmLib.classes import get_typed_class > +from VirtLib.utils import run_remote > > cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED > cim_mname = "DeleteResourcePool" > +libvirt_cim_child_pool_rev = 841 > +test_pool = "nat_pool" The name here is confusing.. the type of pool you create isn't a NAT'ed 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) Place get_typed_class() on its own line. > + 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) The line above is longer than 80 characters. > + elif curr_cim_rev >= libvirt_cim_child_pool_rev: > + nprasd = get_typed_class(options.virt, > + 'NetPoolResourceAllocationSettingData') > + np = get_typed_class(options.virt, 'NetworkPool') > + np_id = 'NetworkPool/%s' % test_pool > + iname = CIMInstanceName(nprasd, > + namespace = CIM_NS, > + keybindings = {'InstanceID':np_id}) > + addr = "192.168.0.20" > + n_list = net_list(options.ip, options.virt) > + for _net_name in n_list: > + cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \ > + cut -d ' ' -f 4 | sed 's/address=//'" % _net_name > + s, in_use_addr = run_remote(options.ip, cmd) > + in_use_addr = in_use_addr.strip("'") > + if in_use_addr == addr: > + logger.error("IP address is in use by a different network") > + return FAIL > + np_prop = { > + "Address" : addr, > + "Netmask" : "255.255.255.0", > + "IPRangeStart" : "192.168.0.21", > + "IPRangeEnd" : "192.168.0.30" > + } > + nrasd = CIMInstance(nprasd, path = iname, properties = np_prop) > + try: > + rpcs_conn.CreateChildResourcePool(ElementName=test_pool, > + Settings=[nrasd.tomof()]) > + netpool = EnumInstances(options.ip, np) > + for i in range(0, len(netpool)): > + ret_pool = netpool[i].InstanceID > + if ret_pool == np_id: > + break > + elif ret_pool != np_id and i == len(netpool) - 1: > + raise Exception("Can not find expected pool") Since you need the almost identical code in RPCS/04, make a function that creates network pool using the providers. > + > + pool = CIMInstanceName(np, keybindings = {'InstanceID':np_id}) > + rpcs_conn.DeleteResourcePool(Pool = pool) > + 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) > + break In this case, status is not set. So in the except block below, you can't guarantee what value the test will return. Also, no need for the break here, because the exception will case the test to jump the the exception block. > + elif ret_pool != np_id and i == len(netpool) -1: > + status = PASS No need for this elif statement. If the test case doesn't hit the exception condition above, then the pool wasn't found. That means the test passes. So, outside of the for loop, set status = PASS. > + except Exception, details: > + logger.error(details) > + return status Just return fail here. > + > + return status You don't have a specific return statement in the case where neither one of the if statements is matched. The test should return a failure in that case. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 27 21:34:25 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Apr 2009 14:34:25 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add new tc to validate that the Disk child pool can be deleted through the providers In-Reply-To: <43a14ac09f6fe1f55c2b.1240827438@elm3b197.beaverton.ibm.com> References: <43a14ac09f6fe1f55c2b.1240827438@elm3b197.beaverton.ibm.com> Message-ID: <49F624E1.3080809@linux.vnet.ibm.com> In general, all of the same comments from the RPCS/07_DeleteResourcePool.py review apply here. As such, I'm not going to review this test. Can you wait until RPCS/07_DeleteResourcePool.py is in the tree before updating this test. Then you can rework this one based on the RPCS/07_DeleteResourcePool.py. Thanks! yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1240827432 25200 > # Node ID 43a14ac09f6fe1f55c2be730c62ea2f3fac24140 > # Parent e8dc06eefada41252ba8d27b08fcef8ef6604251 > [TEST] Add new tc to validate that the Disk child pool can be deleted through the providers > > > Tested for KVM with current sources > Signed-off-by: Guolian Yun > > diff -r e8dc06eefada -r 43a14ac09f6f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/09_DeleteResourcePool_Disk.py -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Apr 27 23:41:08 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Apr 2009 16:41:08 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Add support for primordial parent pool Message-ID: From kaitlin at linux.vnet.ibm.com Mon Apr 27 23:41:09 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Apr 2009 16:41:09 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Create parent diskpool In-Reply-To: References: Message-ID: <1bce4b17fe0bef5d70dc.1240875669@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240874036 25200 # Node ID 1bce4b17fe0bef5d70dc5dd14a02cdfb56d173c8 # Parent e5000891e231e6b9896786e48442ef98bfe9f9fd Create parent diskpool DSP1041 states that all pool allocations will occur from a parent, primordial pool. This patch adds the parent pool for disk pools. Signed-off-by: Kaitlin Rupert diff -r e5000891e231 -r 1bce4b17fe0b src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Mon Apr 20 11:02:52 2009 -0700 +++ b/src/Virt_DevicePool.c Mon Apr 27 16:13:56 2009 -0700 @@ -48,6 +48,7 @@ struct disk_pool { char *tag; char *path; + bool primordial; }; /* @@ -60,6 +61,36 @@ # define VIR_USE_LIBVIRT_STORAGE 0 #endif +static bool get_disk_parent(struct disk_pool **_pools, + int *_count) +{ + struct disk_pool *pools = NULL; + int ret = false; + int count; + + count = *_count; + pools = *_pools; + + pools = realloc(pools, (count + 1) * (sizeof(*pools))); + if (pools == NULL) { + CU_DEBUG("Failed to alloc new pool"); + goto out; + } + + pools[count].tag = strdup("Parent"); + pools[count].path = NULL; + pools[count].primordial = true; + count++; + + *_count = count; + *_pools = pools; + ret = true; + + out: + return ret; +} + + #if VIR_USE_LIBVIRT_STORAGE static int get_diskpool_config(virConnectPtr conn, struct disk_pool **_pools) @@ -67,7 +98,7 @@ int count = 0; int i; char ** names = NULL; - struct disk_pool *pools; + struct disk_pool *pools = NULL; count = virConnectNumOfStoragePools(conn); if (count <= 0) @@ -91,11 +122,16 @@ goto out; } - for (i = 0; i < count; i++) + for (i = 0; i < count; i++) { pools[i].tag = names[i]; + pools[i].primordial = false; + } + + out: + get_disk_parent(&pools, &count); *_pools = pools; - out: + free(names); return count; @@ -180,6 +216,7 @@ free(pool->tag); free(pool->path); } + pools->primordial = false; return (ret == 2); } @@ -212,6 +249,8 @@ count++; } + + get_disk_parent(&pools, &count); out: free(line); *_pools = pools; @@ -831,6 +870,9 @@ set_params(inst, CIM_RES_TYPE_DISK, poolid, "Megabytes", pool->tag); + CMSetProperty(inst, "Primordial", + (CMPIValue *)&pool->primordial, CMPI_boolean); + if (!diskpool_set_capacity(conn, inst, pool)) CU_DEBUG("Failed to set capacity for disk pool: %s", pool->tag); From kaitlin at linux.vnet.ibm.com Mon Apr 27 23:41:10 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Apr 2009 16:41:10 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Expose template DiskPoolRASDs In-Reply-To: References: Message-ID: <68e42eb53c400352e42e.1240875670@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240874183 25200 # Node ID 68e42eb53c400352e42e8fc194de7b02073dc1c6 # Parent 1bce4b17fe0bef5d70dc5dd14a02cdfb56d173c8 Expose template DiskPoolRASDs Signed-off-by: Kaitlin Rupert diff -r 1bce4b17fe0b -r 68e42eb53c40 src/Virt_RASD.c --- a/src/Virt_RASD.c Mon Apr 27 16:13:56 2009 -0700 +++ b/src/Virt_RASD.c Mon Apr 27 16:16:23 2009 -0700 @@ -590,6 +590,21 @@ return rc; } +CMPIrc pool_rasd_classname_from_type(uint16_t type, const char **classname) +{ + CMPIrc rc = CMPI_RC_OK; + + switch(type) { + case CIM_RES_TYPE_DISK: + *classname = "DiskPoolResourceAllocationSettingData"; + break; + default: + rc = CMPI_RC_ERR_FAILED; + } + + return rc; +} + static CMPIStatus _get_rasds(const CMPIBroker *broker, const CMPIObjectPath *reference, const virDomainPtr dom, diff -r 1bce4b17fe0b -r 68e42eb53c40 src/Virt_RASD.h --- a/src/Virt_RASD.h Mon Apr 27 16:13:56 2009 -0700 +++ b/src/Virt_RASD.h Mon Apr 27 16:16:23 2009 -0700 @@ -48,6 +48,8 @@ CMPIrc res_type_from_rasd_classname(const char *cn, uint16_t *type); CMPIrc rasd_classname_from_type(uint16_t type, const char **cn); +CMPIrc pool_rasd_classname_from_type(uint16_t type, const char **classname); + CMPIStatus get_rasd_by_name(const CMPIBroker *broker, const CMPIObjectPath *reference, const char *name, diff -r 1bce4b17fe0b -r 68e42eb53c40 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Mon Apr 27 16:13:56 2009 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Mon Apr 27 16:16:23 2009 -0700 @@ -40,6 +40,7 @@ #include "misc_util.h" #include #include "device_parsing.h" +#include "pool_parsing.h" #include "svpc_types.h" #include "Virt_SettingsDefineCapabilities.h" @@ -68,6 +69,9 @@ #define SDC_DISK_DEF 5000 #define SDC_DISK_INC 250 +#define DEVICE_RASD 0 +#define POOL_RASD 1 + static bool system_has_vt(virConnectPtr conn) { char *caps = NULL; @@ -265,12 +269,19 @@ static CMPIInstance *sdc_rasd_inst(CMPIStatus *s, const CMPIObjectPath *ref, - uint16_t resource_type) + uint16_t resource_type, + uint16_t rasd_type) { CMPIInstance *inst = NULL; const char *base = NULL; + CMPIrc ret = 1; - if (rasd_classname_from_type(resource_type, &base) != CMPI_RC_OK) { + if (rasd_type == DEVICE_RASD) + ret = rasd_classname_from_type(resource_type, &base); + else if (rasd_type == POOL_RASD) + ret = pool_rasd_classname_from_type(resource_type, &base); + + if (ret != CMPI_RC_OK) { cu_statusf(_BROKER, s, CMPI_RC_ERR_FAILED, "Resource type not known"); @@ -329,7 +340,7 @@ goto out; } - inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_MEM); + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_MEM, DEVICE_RASD); if ((inst == NULL) || (s.rc != CMPI_RC_OK)) goto out; @@ -424,7 +435,7 @@ goto out; } - inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_PROC); + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_PROC, DEVICE_RASD); if ((inst == NULL) || (s.rc != CMPI_RC_OK)) goto out; @@ -534,7 +545,7 @@ CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; - inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_NET); + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_NET, DEVICE_RASD); if ((inst == NULL) || (s.rc != CMPI_RC_OK)) goto out; @@ -617,7 +628,7 @@ dev = "hda"; } - inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK, DEVICE_RASD); if ((inst == NULL) || (s.rc != CMPI_RC_OK)) goto out; @@ -1083,6 +1094,107 @@ } #endif +static CMPIStatus disk_pool_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + const char *id; + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *path = "/dev/null"; + const char *dev_path; + int type[2] = {DISK_POOL_DIR, DISK_POOL_FS}; + int pool_types = 2; + int i; + + switch (template_type) { + case SDC_RASD_MIN: + id = "Minimum"; + break; + case SDC_RASD_MAX: + id = "Maximum"; + break; + case SDC_RASD_INC: + id = "Increment"; + break; + case SDC_RASD_DEF: + id = "Default"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + for (i = 0; i < pool_types; i++) { + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK, POOL_RASD); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; + + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + + switch (type[i]) { + case DISK_POOL_FS: + dev_path = "/dev/sda100"; + CMSetProperty(inst, "DevicePath", + (CMPIValue *)dev_path, CMPI_chars); + break; + default: + break; + } + + CMSetProperty(inst, "Type", (CMPIValue *)&type[i], CMPI_uint16); + CMSetProperty(inst, "Path", (CMPIValue *)path, CMPI_chars); + + inst_list_add(list, inst); + } + + out: + return s; +} + +static CMPIStatus disk_dev_or_pool_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst; + const char *poolid; + bool val; + + if (cu_get_str_path(ref, "InstanceID", &poolid) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing InstanceID"); + goto out; + } + + s = get_pool_by_name(_BROKER, ref, poolid, &inst); + if (s.rc != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get pool instance from capabilities"); + goto out; + } + + if (cu_get_bool_prop(inst, "Primordial", &val) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to determine pool type"); + goto out; + } + + if (val) + s = disk_pool_template(ref, template_type, list); + else + s = disk_template(ref, template_type, list); + + out: + + return s; +} + static CMPIStatus graphics_template(const CMPIObjectPath *ref, int template_type, struct inst_list *list) @@ -1112,7 +1224,7 @@ goto out; } - inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_GRAPHICS); + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_GRAPHICS, DEVICE_RASD); CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); @@ -1156,7 +1268,7 @@ } } - inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_INPUT); + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_INPUT, DEVICE_RASD); if ((inst == NULL) || (s.rc != CMPI_RC_OK)) goto out; @@ -1280,7 +1392,7 @@ else if (type == CIM_RES_TYPE_NET) s = net_template(ref, i, list); else if (type == CIM_RES_TYPE_DISK) - s = disk_template(ref, i, list); + s = disk_dev_or_pool_template(ref, i, list); else if (type == CIM_RES_TYPE_GRAPHICS) s = graphics_template(ref, i, list); else if (type == CIM_RES_TYPE_INPUT) From yunguol at cn.ibm.com Tue Apr 28 05:53:41 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 28 Apr 2009 13:53:41 +0800 Subject: [Libvirt-cim] Test Run Summary (Apr 28 2009): KVM on Fedora release 10 (Cambridge) with sfcb Message-ID: ================================================= Test Run Summary (Apr 28 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: 861 Libvirt-cim changeset: e5000891e231 Cimtest revision: 674 Cimtest changeset: e8dc06eefada ================================================= FAIL : 5 XFAIL : 4 SKIP : 9 PASS : 133 ----------------- Total : 151 ================================================= 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Tue Apr 28 06:51:13 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 28 Apr 2009 14:51:13 +0800 Subject: [Libvirt-cim] Test Run Summary (Apr 28 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus Message-ID: ================================================= Test Run Summary (Apr 28 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus ================================================= Distro: Fedora release 10.90 (Rawhide) Kernel: 2.6.29-0.24.rc0.git13.fc11.x86_64 libvirt: 0.6.2 Hypervisor: QEMU 0.10.0 CIMOM: Pegasus 2.7.2 Libvirt-cim revision: 861 Libvirt-cim changeset: e5000891e231 Cimtest revision: 674 Cimtest changeset: e8dc06eefada ================================================= FAIL : 6 XFAIL : 4 SKIP : 9 PASS : 132 ----------------- Total : 151 ================================================= FAIL Test Summary: HostSystem - 03_hs_to_settdefcap.py: FAIL RASD - 05_disk_rasd_emu_type.py: FAIL ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL SettingsDefineCapabilities - 01_forward.py: FAIL SystemDevice - 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 CIM_ERR_FAILED: Unable to reboot domain: failed to set CPU affinity: No such process with return code 1 ERROR - Exception: Unable reboot dom 'cs_test_domain' InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to reboot domain: failed to set CPU affinity: No such process Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - Got CIM error CIM_ERR_NOT_SUPPORTED: State not supported with return code 7 ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: 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: PASS -------------------------------------------------------------------- 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 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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: FAIL ERROR - Exception: EmulatedType Mismatch: got 0,expected 1 -------------------------------------------------------------------- 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 CIM_ERR_INVALID_PARAMETER InvokeMethod(CreateChildResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - Unexpected rc code 4 and description CIM_ERR_INVALID_PARAMETER InvokeMethod(DeleteResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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: FAIL 01_forward.py:29: DeprecationWarning: the sets module is deprecated from sets import Set ERROR - DeviceID mismatch ERROR - Exception Expected DeviceID: ['test_domain/0', 'test_domain/1', 'test_domain/2'] Got: [u'test_domain/0'] -------------------------------------------------------------------- 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 CIM_ERR_NOT_FOUND: 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Wed Apr 29 10:36:11 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 29 Apr 2009 16:06:11 +0530 Subject: [Libvirt-cim] Test Run Summary (Apr 29 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49F82D9B.7040904@linux.vnet.ibm.com> ================================================= Test Run Summary (Apr 29 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 861 Libvirt-cim changeset: e5000891e231 Cimtest revision: Cimtest changeset: ================================================= FAIL : 7 XFAIL : 2 SKIP : 3 PASS : 139 ----------------- Total : 151 ================================================= FAIL Test Summary: ComputerSystem - 32_start_reboot.py: FAIL HostSystem - 03_hs_to_settdefcap.py: FAIL ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL SettingsDefineCapabilities - 01_forward.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 16_removeresource.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.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 -------------------------------------------------------------------- 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: FAIL ERROR - Unable to check guest state ERROR - Exception: Wrong guest instance ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: Wrong guest instance ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Exception: Unable reboot dom 'cs_test_domain' CIM_ERR_FAILED: Unable to get domain information: internal error domain information incomplete, missing id CIM_ERR_NOT_FOUND: Referenced domain `cs_test_domain' does not exist: internal error failed to parse Xend domain information -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - Got CIM error CIM_ERR_NOT_SUPPORTED: State not supported with return code 7 ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: 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: PASS -------------------------------------------------------------------- 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 - 'Xen_SettingsDefineCapabilities' returned 8 RASD objects instead of 4 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- 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 CIM_ERR_INVALID_PARAMETER InvokeMethod(CreateChildResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - Unexpected rc code 4 and description CIM_ERR_INVALID_PARAMETER InvokeMethod(DeleteResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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 - Xen_SettingsDefineCapabilities returned 16 ResourcePool objects instead of 8 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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:xen CIM_ERR_NOT_FOUND: No such instance (no device domain/mouse:xen) 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: FAIL ERROR - Error create domain dom_migrate -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Migration verification for 'dom_migrate' failed -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 06_remote_live_migration.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 07_remote_offline_migration.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Wed Apr 29 17:08:10 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 29 Apr 2009 14:08:10 -0300 Subject: [Libvirt-cim] [PATCH 0 of 2] Add support for primordial parent pool In-Reply-To: References: Message-ID: <49F8897A.6010505@linux.vnet.ibm.com> \o/ Kaitlin Rupert wrote: > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Apr 29 18:55:21 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Apr 2009 11:55:21 -0700 Subject: [Libvirt-cim] [PATCH] Work around for sfcb's lack of association handling Message-ID: <1cb3975921d590d4dda4.1241031321@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1240873892 25200 # Node ID 1cb3975921d590d4dda4de197a4dc687e45d1840 # Parent d4a9e07d6738f76780bcb1ada5b7c0dbc57e4e0f Work around for sfcb's lack of association handling If a association provider has multiple classes listed, and a user queries with the super class for the classes listed in the registration, the provider is not called each time for each class. Instead, the provider is called once. This logic detects whether the association classname specified for by the user is an exact match of one of the classnames in the registration. If it is, the provider is only called once. If the classname is a super class, then the provider is called once for each class listed in the registration. Signed-off-by: Kaitlin Rupert diff -r d4a9e07d6738 -r 1cb3975921d5 std_association.c --- a/std_association.c Thu Jan 22 11:33:20 2009 -0800 +++ b/std_association.c Mon Apr 27 16:11:32 2009 -0700 @@ -274,6 +274,56 @@ return s; } +static bool do_generic_assoc_call(struct std_assoc_info *info, + struct std_assoc *handler) +{ + int i; + + if (info->assoc_class == NULL) { + return true; + } else { + for (i = 0; handler->assoc_class[i]; i++) { + if (STREQ(info->assoc_class, handler->assoc_class[i])) + return false; + } + } + + return true; +} + +static CMPIStatus handle_assoc(struct std_assoc_info *info, + const CMPIObjectPath *ref, + struct std_assoc *handler, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + int i; + + if (do_generic_assoc_call(info, handler)) { + for (i = 0; handler->assoc_class[i]; i++) { + info->assoc_class = handler->assoc_class[i]; + + CU_DEBUG("Calling handler ..."); + s = handler->handler(ref, info, list); + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("Handler did not return CMPI_RC_OK."); + goto out; + } + } + } else { + CU_DEBUG("Calling handler ..."); + s = handler->handler(ref, info, list); + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("Handler did not return CMPI_RC_OK."); + goto out; + } + } + CU_DEBUG("Handler returned CMPI_RC_OK."); + + out: + return s; +} + static CMPIStatus do_assoc(struct std_assoc_ctx *ctx, struct std_assoc_info *info, const CMPIResult *results, @@ -284,6 +334,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; struct inst_list list; struct std_assoc *handler; + int i; CU_DEBUG("Getting handler ..."); handler = std_assoc_get_handler(ctx, info, ref); @@ -295,13 +346,23 @@ inst_list_init(&list); - CU_DEBUG("Calling handler ..."); - s = handler->handler(ref, info, &list); - if (s.rc != CMPI_RC_OK) { - CU_DEBUG("Handler did not return CMPI_RC_OK."); - goto out; + if (do_generic_assoc_call(info, handler)) { + for (i = 0; handler->assoc_class[i]; i++) { + info->assoc_class = handler->assoc_class[i]; + + s = handle_assoc(info, ref, handler, &list); + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("Failed to handle association"); + goto out; + } + } + } else { + s = handle_assoc(info, ref, handler, &list); + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("Failed to handle association"); + goto out; + } } - CU_DEBUG("Handler returned CMPI_RC_OK."); /* References and ReferenceNames */ if (ref_rslt) @@ -320,6 +381,7 @@ CU_DEBUG("Prepare return list did not return CMPI_RC_OK."); goto out; } + CU_DEBUG("Returned %u instance(s).", list.cur); if (names_only) From rmaciel at linux.vnet.ibm.com Thu Apr 30 20:18:37 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Thu, 30 Apr 2009 17:18:37 -0300 Subject: [Libvirt-cim] [PATCH] Work around for sfcb's lack of association handling In-Reply-To: <1cb3975921d590d4dda4.1241031321@localhost.localdomain> References: <1cb3975921d590d4dda4.1241031321@localhost.localdomain> Message-ID: <49FA079D.5070208@linux.vnet.ibm.com> This patch cannot be applied. I used the command hg qimport and hg qpush. All 4 hunks failed. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1240873892 25200 > # Node ID 1cb3975921d590d4dda4de197a4dc687e45d1840 > # Parent d4a9e07d6738f76780bcb1ada5b7c0dbc57e4e0f > Work around for sfcb's lack of association handling > > If a association provider has multiple classes listed, and a user queries with > the super class for the classes listed in the registration, the provider is > not called each time for each class. Instead, the provider is called once. > > This logic detects whether the association classname specified for by the user > is an exact match of one of the classnames in the registration. If it is, > the provider is only called once. If the classname is a super class, then the > provider is called once for each class listed in the registration. > > Signed-off-by: Kaitlin Rupert > > diff -r d4a9e07d6738 -r 1cb3975921d5 std_association.c > --- a/std_association.c Thu Jan 22 11:33:20 2009 -0800 > +++ b/std_association.c Mon Apr 27 16:11:32 2009 -0700 > @@ -274,6 +274,56 @@ > return s; > } > > +static bool do_generic_assoc_call(struct std_assoc_info *info, > + struct std_assoc *handler) > +{ > + int i; > + > + if (info->assoc_class == NULL) { > + return true; > + } else { > + for (i = 0; handler->assoc_class[i]; i++) { > + if (STREQ(info->assoc_class, handler->assoc_class[i])) > + return false; > + } > + } > + > + return true; > +} > + > +static CMPIStatus handle_assoc(struct std_assoc_info *info, > + const CMPIObjectPath *ref, > + struct std_assoc *handler, > + struct inst_list *list) > +{ > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + int i; > + > + if (do_generic_assoc_call(info, handler)) { > + for (i = 0; handler->assoc_class[i]; i++) { > + info->assoc_class = handler->assoc_class[i]; > + > + CU_DEBUG("Calling handler ..."); > + s = handler->handler(ref, info, list); > + if (s.rc != CMPI_RC_OK) { > + CU_DEBUG("Handler did not return CMPI_RC_OK."); > + goto out; > + } > + } > + } else { > + CU_DEBUG("Calling handler ..."); > + s = handler->handler(ref, info, list); > + if (s.rc != CMPI_RC_OK) { > + CU_DEBUG("Handler did not return CMPI_RC_OK."); > + goto out; > + } > + } > + CU_DEBUG("Handler returned CMPI_RC_OK."); > + > + out: > + return s; > +} > + > static CMPIStatus do_assoc(struct std_assoc_ctx *ctx, > struct std_assoc_info *info, > const CMPIResult *results, > @@ -284,6 +334,7 @@ > CMPIStatus s = {CMPI_RC_OK, NULL}; > struct inst_list list; > struct std_assoc *handler; > + int i; > > CU_DEBUG("Getting handler ..."); > handler = std_assoc_get_handler(ctx, info, ref); > @@ -295,13 +346,23 @@ > > inst_list_init(&list); > > - CU_DEBUG("Calling handler ..."); > - s = handler->handler(ref, info, &list); > - if (s.rc != CMPI_RC_OK) { > - CU_DEBUG("Handler did not return CMPI_RC_OK."); > - goto out; > + if (do_generic_assoc_call(info, handler)) { > + for (i = 0; handler->assoc_class[i]; i++) { > + info->assoc_class = handler->assoc_class[i]; > + > + s = handle_assoc(info, ref, handler, &list); > + if (s.rc != CMPI_RC_OK) { > + CU_DEBUG("Failed to handle association"); > + goto out; > + } > + } > + } else { > + s = handle_assoc(info, ref, handler, &list); > + if (s.rc != CMPI_RC_OK) { > + CU_DEBUG("Failed to handle association"); > + goto out; > + } > } > - CU_DEBUG("Handler returned CMPI_RC_OK."); > > /* References and ReferenceNames */ > if (ref_rslt) > @@ -320,6 +381,7 @@ > CU_DEBUG("Prepare return list did not return CMPI_RC_OK."); > goto out; > } > + > CU_DEBUG("Returned %u instance(s).", list.cur); > > if (names_only) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Apr 30 20:45:40 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 30 Apr 2009 13:45:40 -0700 Subject: [Libvirt-cim] [PATCH] Work around for sfcb's lack of association handling In-Reply-To: <49FA079D.5070208@linux.vnet.ibm.com> References: <1cb3975921d590d4dda4.1241031321@localhost.localdomain> <49FA079D.5070208@linux.vnet.ibm.com> Message-ID: <49FA0DF4.2050103@linux.vnet.ibm.com> Richard Maciel wrote: > This patch cannot be applied. I used the command hg qimport > and hg qpush. All 4 hunks failed. This is a libcmpiutil related patch. I forgot to put [CU] in the subject of the patch. Sorry for the confusion! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Apr 30 23:08:34 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 30 Apr 2009 16:08:34 -0700 Subject: [Libvirt-cim] [PATCH] Add ForwardDevice attribute for network pools Message-ID: <327098c60da19f0f3c2c.1241132914@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1241132900 25200 # Node ID 327098c60da19f0f3c2c0a3ec69955503a16602a # Parent 94b1108c2a8be28472a171d9a09d08a2580cc53f Add ForwardDevice attribute for network pools libvirt allows you to restrict the firewall rules of a pool so that traffic is forwarded through a specific device. Also, fix a bug where the value for ForwardMode specified by the user wasn't being read in properly. Also change FowardMode to a value map attribute instead of a string. Fix a bug where the value for IPRangeStart is read in twice - IPRangeEnd wasn't being read in at all. Fix a bug in xmlgen code for the network pool forwarding device. Signed-off-by: Kaitlin Rupert diff -r 94b1108c2a8b -r 327098c60da1 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Thu Apr 30 13:46:35 2009 -0700 +++ b/libxkutil/xmlgen.c Thu Apr 30 16:08:20 2009 -0700 @@ -785,7 +785,7 @@ if (xmlNewProp(forward, BAD_CAST "dev", BAD_CAST pool->forward_dev) == NULL) - goto out; + goto out; } } diff -r 94b1108c2a8b -r 327098c60da1 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Thu Apr 30 13:46:35 2009 -0700 +++ b/schema/ResourceAllocationSettingData.mof Thu Apr 30 16:08:20 2009 -0700 @@ -171,7 +171,12 @@ string Netmask; string IPRangeStart; string IPRangeEnd; - string ForwardMode; + string ForwardDevice; + + [Description ("Network pool forwarding mode"), + ValueMap {"0", "1", "2"}, + Values {"None", "NAT", "Routed"}] + uint16 ForwardMode; }; [Description ("KVM virtual network pool settings"), @@ -182,7 +187,12 @@ string Netmask; string IPRangeStart; string IPRangeEnd; - string ForwardMode; + string ForwardDevice; + + [Description ("Network pool forwarding mode"), + ValueMap {"0", "1", "2"}, + Values {"None", "NAT", "Routed"}] + uint16 ForwardMode; }; [Description ("LXC virtual network pool settings"), @@ -193,7 +203,12 @@ string Netmask; string IPRangeStart; string IPRangeEnd; - string ForwardMode; + string ForwardDevice; + + [Description ("Network pool forwarding mode"), + ValueMap {"0", "1", "2"}, + Values {"None", "NAT", "Routed"}] + uint16 ForwardMode; }; [Description ("Xen virtual disk pool settings"), diff -r 94b1108c2a8b -r 327098c60da1 src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Thu Apr 30 13:46:35 2009 -0700 +++ b/src/Virt_ResourcePoolConfigurationService.c Thu Apr 30 16:08:20 2009 -0700 @@ -82,6 +82,7 @@ { const char *val = NULL; const char *msg = NULL; + uint16_t type; /*FIXME: Need to add validation of addresses if user specified */ @@ -103,12 +104,37 @@ free(pool->pool_info.net.ip_start); pool->pool_info.net.ip_start = strdup(val); - if (cu_get_str_prop(inst, "IPRangeStart", &val) != CMPI_RC_OK) + if (cu_get_str_prop(inst, "IPRangeEnd", &val) != CMPI_RC_OK) val = "192.168.122.254"; free(pool->pool_info.net.ip_end); pool->pool_info.net.ip_end = strdup(val); + if (cu_get_u16_prop(inst, "ForwardMode", &type) != CMPI_RC_OK) { + pool->pool_info.net.forward_mode = strdup("nat"); + } else { + free(pool->pool_info.net.forward_mode); + + switch (type) { + case NETPOOL_FORWARD_NONE: + pool->pool_info.net.forward_mode = NULL; + break; + case NETPOOL_FORWARD_NAT: + pool->pool_info.net.forward_mode = strdup("nat"); + break; + case NETPOOL_FORWARD_ROUTED: + pool->pool_info.net.forward_mode = strdup("route"); + break; + default: + return "Storage pool type not supported"; + } + } + + if (cu_get_str_prop(inst, "ForwardDevice", &val) == CMPI_RC_OK) { + free(pool->pool_info.net.forward_dev); + pool->pool_info.net.forward_dev = strdup(val); + } + return msg; } diff -r 94b1108c2a8b -r 327098c60da1 src/svpc_types.h --- a/src/svpc_types.h Thu Apr 30 13:46:35 2009 -0700 +++ b/src/svpc_types.h Thu Apr 30 16:08:20 2009 -0700 @@ -66,6 +66,10 @@ #define CIM_SAP_INACTIVE_STATE 3 #define CIM_SAP_AVAILABLE_STATE 6 +#define NETPOOL_FORWARD_NONE 0 +#define NETPOOL_FORWARD_NAT 1 +#define NETPOOL_FORWARD_ROUTED 2 + #include #include