From cvincent at linux.vnet.ibm.com Thu Jul 1 15:59:55 2010 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Thu, 01 Jul 2010 11:59:55 -0400 Subject: [Libvirt-cim] [PATCH] Add support for VSI/DCN In-Reply-To: References: Message-ID: <4C2CBB7B.8070609@linux.vnet.ibm.com> +1 NOTE: There appeared to be some whitespace differences for the last chunk of Virt_SettingsDefineCapabilities.c. As such, I first push your changes *except* that chunk, and then manually patched the whitespace issue. Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1276810951 25200 > # Node ID a31f3f023acdd0edd73636a86a93c08803dd7158 > # Parent b2b8177338722a1f961430c8ccfe7820a5368ff7 > Add support for VSI/DCN. > > Signed-off-by: Sharad Mishra > > diff -r b2b817733872 -r a31f3f023acd libxkutil/device_parsing.c > --- a/libxkutil/device_parsing.c Tue Jun 15 14:25:34 2010 -0700 > +++ b/libxkutil/device_parsing.c Thu Jun 17 14:42:31 2010 -0700 > @@ -58,6 +58,17 @@ > free(dev->bus_type); > } > > +static void cleanup_vsi_device(struct vsi_device *dev) > +{ > + free(dev->vsi_type); > + free(dev->manager_id); > + free(dev->type_id); > + free(dev->type_id_version); > + free(dev->instance_id); > + free(dev->filter_ref); > + free(dev->profile_id); > +} > + > static void cleanup_net_device(struct net_device *dev) > { > free(dev->type); > @@ -66,6 +77,7 @@ > free(dev->model); > free(dev->device); > free(dev->net_mode); > + cleanup_vsi_device(&dev->vsi); > } > > static void cleanup_emu_device(struct emu_device *dev) > @@ -288,6 +300,7 @@ > { > struct virt_device *vdev = NULL; > struct net_device *ndev = NULL; > + struct vsi_device *vsi_dev = NULL; > xmlNode *child = NULL; > > vdev = calloc(1, sizeof(*vdev)); > @@ -295,6 +308,7 @@ > goto err; > > ndev = &(vdev->dev.net); > + vsi_dev = &(ndev->vsi); > > ndev->type = get_attr_value(inode, "type"); > if (ndev->type == NULL) > @@ -325,12 +339,28 @@ > ndev->model = get_attr_value(child, "type"); > if (ndev->model == NULL) > goto err; > + } else if (XSTREQ(child->name, "virtualport")) { > + vsi_dev->vsi_type = get_attr_value(child, "type"); > + if (vsi_dev->vsi_type == NULL) > + goto err; > + } else if (XSTREQ(child->name, "parameters")) { > + vsi_dev->manager_id = get_attr_value(child, "managerid"); > + if (vsi_dev->manager_id == NULL) > + goto err; > + > + vsi_dev->type_id = get_attr_value(child, "typeid"); > + if (vsi_dev->type_id == NULL) > + goto err; > + > + vsi_dev->type_id_version = get_attr_value(child, "typeidversion"); > + if (vsi_dev->type_id_version == NULL) > + goto err; > + > + vsi_dev->instance_id = get_attr_value(child, "instanceid"); > + vsi_dev->profile_id = get_attr_value(child, "profileid"); > } > } > > - if (ndev->mac == NULL) > - goto err; > - > if (ndev->source == NULL) > CU_DEBUG("No network source defined, leaving blank\n"); > > @@ -602,6 +632,7 @@ > int len = 0; > int count = 0; > > + CU_DEBUG("In parse_deviceso - type is %d", type); > xmlDoc *xmldoc; > xmlXPathContext *xpathCtx; > xmlXPathObject *xpathObj; > @@ -672,6 +703,13 @@ > DUP_FIELD(dev, _dev, dev.net.model); > DUP_FIELD(dev, _dev, dev.net.device); > DUP_FIELD(dev, _dev, dev.net.net_mode); > + DUP_FIELD(dev, _dev, dev.net.vsi.vsi_type); > + DUP_FIELD(dev, _dev, dev.net.vsi.manager_id); > + DUP_FIELD(dev, _dev, dev.net.vsi.type_id); > + DUP_FIELD(dev, _dev, dev.net.vsi.type_id_version); > + DUP_FIELD(dev, _dev, dev.net.vsi.instance_id); > + DUP_FIELD(dev, _dev, dev.net.vsi.filter_ref); > + DUP_FIELD(dev, _dev, dev.net.vsi.profile_id); > } else if (dev->type == CIM_RES_TYPE_DISK) { > DUP_FIELD(dev, _dev, dev.disk.type); > DUP_FIELD(dev, _dev, dev.disk.device); > @@ -980,6 +1018,7 @@ > { > int ret; > > + CU_DEBUG("In get_dominfo_from_xml"); > *dominfo = malloc(sizeof(**dominfo)); > if (*dominfo == NULL) > return 0; > @@ -1019,8 +1058,8 @@ > { > char *xml; > int ret; > + xml = virDomainGetXMLDesc(dom, 0); > > - xml = virDomainGetXMLDesc(dom, 0); > if (xml == NULL) > return 0; > > diff -r b2b817733872 -r a31f3f023acd libxkutil/device_parsing.h > --- a/libxkutil/device_parsing.h Tue Jun 15 14:25:34 2010 -0700 > +++ b/libxkutil/device_parsing.h Thu Jun 17 14:42:31 2010 -0700 > @@ -33,6 +33,16 @@ > > #include "../src/svpc_types.h" > > +struct vsi_device { > + char *vsi_type; > + char *manager_id; > + char *type_id; > + char *type_id_version; > + char *instance_id; > + char *filter_ref; > + char *profile_id; > +}; > + > struct disk_device { > char *type; > char *device; > @@ -52,6 +62,7 @@ > char *model; > char *device; > char *net_mode; > + struct vsi_device vsi; > }; > > struct mem_device { > diff -r b2b817733872 -r a31f3f023acd libxkutil/xmlgen.c > --- a/libxkutil/xmlgen.c Tue Jun 15 14:25:34 2010 -0700 > +++ b/libxkutil/xmlgen.c Thu Jun 17 14:42:31 2010 -0700 > @@ -159,6 +159,40 @@ > return msg; > } > > +static const char *set_net_vsi(xmlNodePtr nic, struct vsi_device *dev) > +{ > + xmlNodePtr tmp; > + > + tmp = xmlNewChild(nic, NULL, BAD_CAST "virtualport", NULL); > + if (tmp == NULL) > + return XML_ERROR; > + xmlNewProp(tmp, BAD_CAST "type", BAD_CAST dev->vsi_type); > + > + tmp = xmlNewChild(tmp, NULL, BAD_CAST "parameters", NULL); > + if (tmp == NULL) > + return XML_ERROR; > + if (STREQ(dev->vsi_type, "802.1Qbh")) { > + if (dev->profile_id != NULL) > + xmlNewProp(tmp, BAD_CAST "profileid", > + BAD_CAST dev->profile_id); > + } else { > + if (dev->manager_id != NULL) > + xmlNewProp(tmp, BAD_CAST "managerid", > + BAD_CAST dev->manager_id); > + if (dev->type_id != NULL) > + xmlNewProp(tmp, BAD_CAST "typeid", > + BAD_CAST dev->type_id); > + if (dev->type_id_version != NULL) > + xmlNewProp(tmp, BAD_CAST "typeidversion", > + BAD_CAST dev->type_id_version); > + if (dev->instance_id != NULL) > + xmlNewProp(tmp, BAD_CAST "instanceid", > + BAD_CAST dev->instance_id); > + } > + > + return NULL; > +} > + > static const char *set_net_source(xmlNodePtr nic, > struct net_device *dev, > const char *src_type) > @@ -247,8 +281,13 @@ > msg = bridge_net_to_xml(nic, net); > else if (STREQ(dev->dev.net.type, "user")) > continue; > - else if (STREQ(dev->dev.net.type, "direct")) > + else if (STREQ(dev->dev.net.type, "direct")) { > msg = set_net_source(nic, net, "direct"); > + if (net->vsi.vsi_type != NULL) { > + struct vsi_device *vsi = &dev->dev.net.vsi; > + msg = set_net_vsi(nic, vsi); > + } > + } > else > msg = "Unknown interface type"; > } > diff -r b2b817733872 -r a31f3f023acd schema/ResourceAllocationSettingData.mof > --- a/schema/ResourceAllocationSettingData.mof Tue Jun 15 14:25:34 2010 -0700 > +++ b/schema/ResourceAllocationSettingData.mof Thu Jun 17 14:42:31 2010 -0700 > @@ -68,6 +68,29 @@ > > [Description ("Network mode, could be 'vepa', 'pepa' etc.")] > string NetworkMode; > + > + [Description ("VSI type")] > + string VSIType; > + > + [Description ("VSI manager id")] > + string VSIManagerID; > + > + [Description ("VSI type")] > + string VSITypeID; > + > + [Description ("expected/desired version of VTID")] > + string VSITypeIDVersion; > + > + [Description ("A globally unique ID for the connection instance." > + " The ID shall be done consistent with IETF RFC 4122.")] > + string VSIInstanceID; > + > + [Description ("Profile ID")] > + string ProfileID; > + > + [Description ("Filter REF")] > + string FilterRef; > + > }; > > [Description ("KVM virtual network configuration"), > @@ -90,6 +113,28 @@ > > [Description ("Network mode, could be 'vepa', 'pepa' etc.")] > string NetworkMode; > + > + [Description ("VSI type")] > + string VSIType; > + > + [Description ("VSI manager id")] > + string VSIManagerID; > + > + [Description ("VSI type")] > + string VSITypeID; > + > + [Description ("expected/desired version of VTID")] > + string VSITypeIDVersion; > + > + [Description ("A globally unique ID for the connection instance." > + " The ID shall be done consistent with IETF RFC 4122.")] > + string VSIInstanceID; > + > + [Description ("Profile ID")] > + string ProfileID; > + > + [Description ("Filter REF")] > + string FilterRef; > }; > > [Description ("LXC virtual network configuration"), > diff -r b2b817733872 -r a31f3f023acd src/Virt_RASD.c > --- a/src/Virt_RASD.c Tue Jun 15 14:25:34 2010 -0700 > +++ b/src/Virt_RASD.c Thu Jun 17 14:42:31 2010 -0700 > @@ -278,6 +278,57 @@ > return s; > } > > +static CMPIStatus set_net_vsi_rasd_params(const CMPIBroker *broker, > + const CMPIObjectPath *ref, > + const struct vsi_device vsi, > + CMPIInstance *inst) > +{ > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + > + CMSetProperty(inst, > + "VSIType", > + (CMPIValue *)vsi.vsi_type, > + CMPI_chars); > + > + if (vsi.manager_id != NULL) > + CMSetProperty(inst, > + "VSIManagerID", > + (CMPIValue *)vsi.manager_id, > + CMPI_chars); > + > + if (vsi.type_id != NULL) > + CMSetProperty(inst, > + "VSITypeID", > + (CMPIValue *)vsi.type_id, > + CMPI_chars); > + > + if (vsi.type_id_version != NULL) > + CMSetProperty(inst, > + "VSITypeIDVersion", > + (CMPIValue *)vsi.type_id_version, > + CMPI_chars); > + > + if (vsi.instance_id != NULL) > + CMSetProperty(inst, > + "VSIInstanceID", > + (CMPIValue *)vsi.instance_id, > + CMPI_chars); > + > + if (vsi.filter_ref != NULL) > + CMSetProperty(inst, > + "FilterRef", > + (CMPIValue *)vsi.filter_ref, > + CMPI_chars); > + > + if (vsi.profile_id != NULL) > + CMSetProperty(inst, > + "ProfileID", > + (CMPIValue *)vsi.profile_id, > + CMPI_chars); > + > + return s; > +} > + > static CMPIStatus set_net_rasd_params(const CMPIBroker *broker, > const CMPIObjectPath *ref, > const struct virt_device *dev, > @@ -482,6 +533,13 @@ > s = set_disk_rasd_params(broker, ref, dev, inst); > } else if (dev->type == CIM_RES_TYPE_NET) { > s = set_net_rasd_params(broker, ref, dev, inst); > + if ((s.rc == CMPI_RC_OK) && > + (dev->dev.net.vsi.vsi_type != NULL)) > + s = set_net_vsi_rasd_params(broker, > + ref, > + dev->dev.net.vsi, > + inst); > + > } else if (dev->type == CIM_RES_TYPE_MEM) { > const char *units = "KiloBytes"; > > diff -r b2b817733872 -r a31f3f023acd src/Virt_SettingsDefineCapabilities.c > --- a/src/Virt_SettingsDefineCapabilities.c Tue Jun 15 14:25:34 2010 -0700 > +++ b/src/Virt_SettingsDefineCapabilities.c Thu Jun 17 14:42:31 2010 -0700 > @@ -550,6 +550,12 @@ > const char *src_dev, > const char *net_mode, > const char *model, > + const char *vsi, > + const char *manager, > + const char *typeid, > + const char *version, > + const char *instance, > + const char *profile, > struct inst_list *list) > { > CMPIInstance *inst; > @@ -583,6 +589,31 @@ > CMSetProperty(inst, "ResourceSubType", > (CMPIValue *)model, CMPI_chars); > > + if (vsi != NULL) > + s = CMSetProperty(inst, "VSIType", > + (CMPIValue *)vsi, CMPI_chars); > + > + > + if (manager != NULL) > + CMSetProperty(inst, "VSIManagerID", > + (CMPIValue *)manager, CMPI_chars); > + > + if (typeid != NULL) > + CMSetProperty(inst, "VSITypeID", > + (CMPIValue *)typeid, CMPI_chars); > + > + if (version != NULL) > + CMSetProperty(inst, "VSITypeIDVersion", > + (CMPIValue *)version, CMPI_chars); > + > + if (instance != NULL) > + CMSetProperty(inst, "VSIInstanceID", > + (CMPIValue *)instance, CMPI_chars); > + > + if (profile != NULL) > + CMSetProperty(inst, "ProfileID", > + (CMPIValue *)profile, CMPI_chars); > + > inst_list_add(list, inst); > > out: > @@ -600,8 +631,6 @@ > int i,j; > const char *type[] = {"network", "bridge", "user"}; > const char *device[] = {"vtap1", NULL}; > - const char *src_dev[] = {NULL, NULL}; > - const char *net_mode[] = {NULL, NULL}; > const char *model[] = {"e1000", NULL}; > const char *name[] = {NULL, "br0", NULL}; > > @@ -641,17 +670,40 @@ > name[i], > num_nics, > device[j], > - src_dev[j], > - net_mode[j], > + NULL, > + NULL, > model[j], > + NULL, > + NULL, > + NULL, > + NULL, > + NULL, > + NULL, > list); > if (s.rc != CMPI_RC_OK) > goto out; > } > } > > - s = set_net_props(template_type, ref, id, "direct", NULL, num_nics, > - NULL, "eth1", "vepa", NULL, list); > + s = set_net_props(template_type, ref, id, "direct", NULL, > + num_nics, NULL, "eth1", "vepa", NULL, > + NULL, NULL, NULL, NULL, NULL, NULL, list); > + /* profile id*/ > + s = set_net_props(template_type, ref, id, "direct", NULL, > + num_nics, NULL, "eth1", "vepa", NULL, > + "802.1Qbh", NULL, NULL, NULL, > + NULL, "my_profile", list); > + /* no profile id but with instance id*/ > + s = set_net_props(template_type, ref, id, "direct", NULL, > + num_nics, NULL, "eth1", "vepa", NULL, > + "802.1Qbg", "managerid", "typeid", > + "typeidversion", "instanceid", NULL, > + list); > + /* no profile id and no instance id*/ > + s = set_net_props(template_type, ref, id, "direct", NULL, > + num_nics, NULL, "eth1", "vepa", NULL, > + "802.1Qbg", "managerid", "typeid", > + "typeidversion", "NULL", "NULL", list); > > out: > return s; > diff -r b2b817733872 -r a31f3f023acd src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Tue Jun 15 14:25:34 2010 -0700 > +++ b/src/Virt_VirtualSystemManagementService.c Thu Jun 17 14:42:31 2010 -0700 > @@ -760,6 +760,50 @@ > return "Source Device is empty"; > else > return "No Source Device specified"; > + > + free(dev->dev.net.vsi.vsi_type); > + if (cu_get_str_prop(inst, "VSIType", &val) != CMPI_RC_OK) > + dev->dev.net.vsi.vsi_type = NULL; > + else > + dev->dev.net.vsi.vsi_type = strdup(val); > + > + free(dev->dev.net.vsi.manager_id); > + if (cu_get_str_prop(inst, "VSIManagerID", &val) != CMPI_RC_OK) > + dev->dev.net.vsi.manager_id = NULL; > + else > + dev->dev.net.vsi.manager_id = strdup(val); > + > + free(dev->dev.net.vsi.type_id); > + if (cu_get_str_prop(inst, "VSITypeID", &val) != CMPI_RC_OK) > + dev->dev.net.vsi.type_id = NULL; > + else > + dev->dev.net.vsi.type_id = strdup(val); > + > + free(dev->dev.net.vsi.type_id_version); > + if (cu_get_str_prop(inst, "VSITypeIDVersion", &val) != > + CMPI_RC_OK) > + dev->dev.net.vsi.type_id_version = NULL; > + else > + dev->dev.net.vsi.type_id_version = strdup(val); > + > + free(dev->dev.net.vsi.instance_id); > + if (cu_get_str_prop(inst, "VSIInstanceID", &val) != CMPI_RC_OK) > + dev->dev.net.vsi.instance_id = NULL; > + else > + dev->dev.net.vsi.instance_id = strdup(val); > + > + free(dev->dev.net.vsi.filter_ref); > + if (cu_get_str_prop(inst, "FilterRef", &val) != CMPI_RC_OK) > + dev->dev.net.vsi.filter_ref = NULL; > + else > + dev->dev.net.vsi.filter_ref = strdup(val); > + > + free(dev->dev.net.vsi.profile_id); > + if (cu_get_str_prop(inst, "ProfileID", &val) != CMPI_RC_OK) > + dev->dev.net.vsi.profile_id = NULL; > + else > + dev->dev.net.vsi.profile_id = strdup(val); > + > } else > return "Invalid Network Type specified"; > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Chip Vincent Open Virtualization, Linux Technology Center IBM Systems & Technology Group phone: 919-254-4482, T/L 444-4482 email: cvincent at us.ibm.com From snmishra at us.ibm.com Wed Jul 14 17:23:16 2010 From: snmishra at us.ibm.com (Sharad Mishra) Date: Wed, 14 Jul 2010 10:23:16 -0700 Subject: [Libvirt-cim] [PATCH] Add VM Autostart flag Message-ID: <487a2f2bbf148e8abbbe.1279128196@elm3b151.beaverton.ibm.com> # HG changeset patch # User Sharad Mishra # Date 1279127759 25200 # Node ID 487a2f2bbf148e8abbbe332e6c6f2f7a44f8e2a4 # Parent 62069e89413c139c3da8e0b23b83d20890eeec4f Add VM Autostart flag. VMs can be set to autostart on host reboot. Signed-off-by: Sharad Mishra diff -r 62069e89413c -r 487a2f2bbf14 schema/ComputerSystem.mof --- a/schema/ComputerSystem.mof Thu Jul 01 11:52:57 2010 -0400 +++ b/schema/ComputerSystem.mof Wed Jul 14 10:15:59 2010 -0700 @@ -10,6 +10,9 @@ [Description("UUID assigned to this DomU.")] string UUID; + [Description("Flag to set VM autostart.")] + boolean autoStart; + }; [Description ( @@ -23,6 +26,9 @@ [Description("UUID assigned to this virtual machine.")] string UUID; + [Description("Flag to set VM autostart.")] + boolean autoStart; + }; [Description ( @@ -36,5 +42,8 @@ [Description("UUID assigned to this virtual machine.")] string UUID; + [Description("Flag to set VM autostart.")] + boolean autoStart; + }; diff -r 62069e89413c -r 487a2f2bbf14 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Thu Jul 01 11:52:57 2010 -0400 +++ b/src/Virt_VirtualSystemManagementService.c Wed Jul 14 10:15:59 2010 -0700 @@ -1356,6 +1356,7 @@ virDomainPtr dom; const char *name; CMPIInstance *inst = NULL; + bool autoStartFlag = false; conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); if (conn == NULL) { @@ -1373,6 +1374,11 @@ goto out; } + if (cu_get_bool_prop(inst, "autoStart", &autoStartFlag) != CMPI_RC_OK) + autoStartFlag = false; + if(virDomainSetAutostart(dom, (autoStartFlag) ? 1 : 0) == -1) + CU_DEBUG("Failed to set autostart flag."); + name = virDomainGetName(dom); *s = get_domain_by_name(_BROKER, ref, name, &inst); From deeptik at linux.vnet.ibm.com Fri Jul 16 09:05:25 2010 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 16 Jul 2010 02:05:25 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to verify the VSI Libvirt-CIM feature Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1279271077 25200 # Node ID ae6e83c18a8490fc0c583f7d0b8568ae4b8d1efc # Parent f14d55353dd10846428b5b818e478eb6f8a0431e [TEST] Adding new tc to verify the VSI Libvirt-CIM feature. Tested with KVM on RHEL with latest sources. The test now checks with the 'VSIType' --> "802.1Qbg", we can improve the test case to verify with 'VSIType' --> "802.1Qbh" Signed-off-by: Deepti B. Kalakeri diff -r f14d55353dd1 -r ae6e83c18a84 suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py Fri Jul 16 02:04:37 2010 -0700 @@ -0,0 +1,213 @@ +#!/usr/bin/python +# +# Copyright 2010 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 +# +# Purpose: +# Verify provider's VSI support. +# +# Steps: +# 1) Build RASD parameters, making sure to specify macvtap mode for network +# interface and vsi values. +# 2) Create guest +# 3) Verify guest is defined properly and the vsi values assgined to the guest +# are reflected in the NetRASD. +# +# Date: 16-07-2010 +# + +import sys +from CimTest.Globals import logger +from CimTest.ReturnCodes import FAIL, PASS, SKIP, XFAIL_RC, XFAIL +from XenKvmLib.classes import get_typed_class, inst_to_mof +from XenKvmLib.rasd import get_default_rasds +from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.vxml import get_class +from XenKvmLib.common_util import parse_instance_id +from XenKvmLib.enumclass import EnumInstances + +sup_types = ['Xen', 'XenFV', 'KVM'] +test_dom = 'vsi_guest' +bug_no = "00016" + +libvirt_cim_vsi_support = 1042 + +def get_rasd_list(ip, virt, vsi_defaults, nrasd_cn): + rasds = get_default_rasds(ip, virt) + rasd_list = {} + + for rasd in rasds: + if rasd.classname == nrasd_cn and "Default" in rasd['InstanceID']: + + rasd['NetworkMode'] = vsi_defaults['NetworkMode'] + rasd['NetworkType'] = vsi_defaults['NetworkType'] + rasd['SourceDevice'] = vsi_defaults['SourceDevice'] + rasd['VSIType'] = vsi_defaults['VSIType'] + rasd['VSIManagerID'] = vsi_defaults['VSIManagerID'] + rasd['VSITypeID'] = vsi_defaults['VSITypeID'] + rasd['VSITypeIDVersion'] = vsi_defaults['VSITypeIDVersion'] + # Currently Libvirt throws error when passing Profile id, + # add it when supported + # rasd['ProfileID'] = vsi_defaults['ProfileID'] + rasd_list[rasd.classname] = inst_to_mof(rasd) + break + + return rasd_list + +def get_net_inst(ip, nrasd_cn, guest_name): + inst = None + enum_list = EnumInstances(ip, nrasd_cn) + + if enum_list < 1: + logger.error("No %s instances returned", nrasd_cn) + return FAIL, inst + + for rasd in enum_list: + guest, dev, status = parse_instance_id(rasd.InstanceID) + if status != PASS: + logger.error("Unable to parse InstanceID: %s", rasd.InstanceID) + return FAIL, inst + + if guest == guest_name: + inst = rasd + break + + if inst is None: + logger.error("%s instance for %s not found", nrasd_cn, guest_name) + return FAIL, inst + else: + return PASS, inst + + +def verify_net_rasd(ip, virt, vsi_defaults, inst): + try: + if inst.NetworkMode != vsi_defaults['NetworkMode']: + raise Exception("%s" % "NetworkMode", \ + "%s" % inst.NetworkMode, \ + "%s" % vsi_defaults['NetworkMode'],\ + "%s" % FAIL) + + if inst.SourceDevice != vsi_defaults['SourceDevice']: + raise Exception("%s" % "SourceDevice", \ + "%s" % inst.SourceDevice, "%s" \ + % vsi_defaults['SourceDevice'],\ + "%s" % FAIL) + + if inst.VSIType != vsi_defaults['VSIType']: + raise Exception("%s" % "VSIType", \ + "%s" % inst.VSIType, "%s" \ + % vsi_defaults['VSIType'], \ + "%s" % FAIL) + + # Once the bug is fixed change the status value from XFAIL to FAIL + if inst.VSIInstanceID == None: + raise Exception("%s" % "VSIInstanceID", \ + "%s" % inst.VSIInstanceID, \ + "%s" % "a value",\ + "%s" % XFAIL) + + if inst.VSITypeIDVersion != vsi_defaults['VSITypeIDVersion']: + raise Exception("%s" % "VSITypeIDVersion", + "%s" % inst.VSITypeIDVersion, \ + "%s" % vsi_defaults['VSITypeIDVersion'],\ + "%s" % XFAIL) + + if inst.VSITypeID != vsi_defaults['VSITypeID']: + raise Exception("%s" % "VSITypeID", \ + "%s" % inst.VSITypeID, \ + "%s" % vsi_defaults['VSITypeID'], \ + "%s" % XFAIL) + + except Exception, (field, ret_val, exp_val, status): + logger.error("Mismatch in '%s' values", field) + logger.error("Got %s, Expected %s", ret_val, exp_val) + if status == "3": + return XFAIL_RC(bug_no) + return status + + return PASS + + at do_main(sup_types) +def main(): + options = main.options + server = options.ip + virt = options.virt + + status = FAIL + + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev < libvirt_cim_vsi_support: + logger.error("VSI support is available in rev >= %s", + libvirt_cim_vsi_support) + return SKIP + + + # Currently Libvirt throws error when passing Profile id, + # add it when supported + # 'ProfileID' : "vsi_profile" + # Also, Libvirt returns error when 'VSIType' is 802.1Qbh + # The tc can be modified to loop for the different VSIType, + # when supported. + vsi_defaults = { 'NetworkMode' : "vepa", + 'NetworkType' : "direct", + 'SourceDevice' : "eth1", + 'VSIType' : "802.1Qbg", + 'VSIManagerID' : "12", + 'VSITypeID' : "0x12345", + 'VSITypeIDVersion' : "1" + } + + nrasd_cn = get_typed_class(virt, 'NetResourceAllocationSettingData') + status = FAIL + + try: + rasd_list = get_rasd_list(server, virt, vsi_defaults, nrasd_cn) + if len(rasd_list) < 1: + raise Exception("Unable to get template RASDs for %s" % test_dom) + + cxml = get_class(virt)(test_dom) + cxml.set_res_settings(rasd_list) + ret = cxml.cim_define(server) + if not ret: + raise Exception("Unable to define guest %s" % test_dom) + + status = cxml.cim_start(server) + if status != PASS: + raise Exception("Unable to start %s" % test_dom) + + status, inst = get_net_inst(server, nrasd_cn, test_dom) + if status != PASS: + raise Exception("Failed to get net interface for %s" % test_dom) + + status = verify_net_rasd(server, virt, vsi_defaults, inst) + if status != PASS: + logger.error("Failed to verify net interface for %s", test_dom) + + except Exception, details: + logger.error(details) + status = FAIL + + cxml.cim_destroy(server) + cxml.undefine(server) + + return status + +if __name__ == "__main__": + sys.exit(main()) + From snmishra at us.ibm.com Fri Jul 16 17:07:25 2010 From: snmishra at us.ibm.com (Sharad Mishra) Date: Fri, 16 Jul 2010 10:07:25 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to verify the VSI Libvirt-CIM feature In-Reply-To: References: Message-ID: +1 Looks good. I will test it once IBM BZ 65164 is fixed. Sharad Mishra Open Virtualization Linux Technology Center IBM "Deepti B. Kalakeri" libvirt-cim at redhat.com Sent by: cc libvirt-cim-bounc es at redhat.com Subject [Libvirt-cim] [PATCH] [TEST] Adding new tc to verify the VSI 07/16/2010 02:05 Libvirt-CIM feature AM Please respond to List for discussion and development of libvirt CIM # HG changeset patch # User Deepti B. Kalakeri # Date 1279271077 25200 # Node ID ae6e83c18a8490fc0c583f7d0b8568ae4b8d1efc # Parent f14d55353dd10846428b5b818e478eb6f8a0431e [TEST] Adding new tc to verify the VSI Libvirt-CIM feature. Tested with KVM on RHEL with latest sources. The test now checks with the 'VSIType' --> "802.1Qbg", we can improve the test case to verify with 'VSIType' --> "802.1Qbh" Signed-off-by: Deepti B. Kalakeri diff -r f14d55353dd1 -r ae6e83c18a84 suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py Fri Jul 16 02:04:37 2010 -0700 @@ -0,0 +1,213 @@ +#!/usr/bin/python +# +# Copyright 2010 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 +# +# Purpose: +# Verify provider's VSI support. +# +# Steps: +# 1) Build RASD parameters, making sure to specify macvtap mode for network +# interface and vsi values. +# 2) Create guest +# 3) Verify guest is defined properly and the vsi values assgined to the guest +# are reflected in the NetRASD. +# +# Date: 16-07-2010 +# + +import sys +from CimTest.Globals import logger +from CimTest.ReturnCodes import FAIL, PASS, SKIP, XFAIL_RC, XFAIL +from XenKvmLib.classes import get_typed_class, inst_to_mof +from XenKvmLib.rasd import get_default_rasds +from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.vxml import get_class +from XenKvmLib.common_util import parse_instance_id +from XenKvmLib.enumclass import EnumInstances + +sup_types = ['Xen', 'XenFV', 'KVM'] +test_dom = 'vsi_guest' +bug_no = "00016" + +libvirt_cim_vsi_support = 1042 + +def get_rasd_list(ip, virt, vsi_defaults, nrasd_cn): + rasds = get_default_rasds(ip, virt) + rasd_list = {} + + for rasd in rasds: + if rasd.classname == nrasd_cn and "Default" in rasd['InstanceID']: + + rasd['NetworkMode'] = vsi_defaults['NetworkMode'] + rasd['NetworkType'] = vsi_defaults['NetworkType'] + rasd['SourceDevice'] = vsi_defaults['SourceDevice'] + rasd['VSIType'] = vsi_defaults['VSIType'] + rasd['VSIManagerID'] = vsi_defaults['VSIManagerID'] + rasd['VSITypeID'] = vsi_defaults['VSITypeID'] + rasd['VSITypeIDVersion'] = vsi_defaults['VSITypeIDVersion'] + # Currently Libvirt throws error when passing Profile id, + # add it when supported + # rasd['ProfileID'] = vsi_defaults['ProfileID'] + rasd_list[rasd.classname] = inst_to_mof(rasd) + break + + return rasd_list + +def get_net_inst(ip, nrasd_cn, guest_name): + inst = None + enum_list = EnumInstances(ip, nrasd_cn) + + if enum_list < 1: + logger.error("No %s instances returned", nrasd_cn) + return FAIL, inst + + for rasd in enum_list: + guest, dev, status = parse_instance_id(rasd.InstanceID) + if status != PASS: + logger.error("Unable to parse InstanceID: %s", rasd.InstanceID) + return FAIL, inst + + if guest == guest_name: + inst = rasd + break + + if inst is None: + logger.error("%s instance for %s not found", nrasd_cn, guest_name) + return FAIL, inst + else: + return PASS, inst + + +def verify_net_rasd(ip, virt, vsi_defaults, inst): + try: + if inst.NetworkMode != vsi_defaults['NetworkMode']: + raise Exception("%s" % "NetworkMode", \ + "%s" % inst.NetworkMode, \ + "%s" % vsi_defaults['NetworkMode'],\ + "%s" % FAIL) + + if inst.SourceDevice != vsi_defaults['SourceDevice']: + raise Exception("%s" % "SourceDevice", \ + "%s" % inst.SourceDevice, "%s" \ + % vsi_defaults['SourceDevice'],\ + "%s" % FAIL) + + if inst.VSIType != vsi_defaults['VSIType']: + raise Exception("%s" % "VSIType", \ + "%s" % inst.VSIType, "%s" \ + % vsi_defaults['VSIType'], \ + "%s" % FAIL) + + # Once the bug is fixed change the status value from XFAIL to FAIL + if inst.VSIInstanceID == None: + raise Exception("%s" % "VSIInstanceID", \ + "%s" % inst.VSIInstanceID, \ + "%s" % "a value",\ + "%s" % XFAIL) + + if inst.VSITypeIDVersion != vsi_defaults['VSITypeIDVersion']: + raise Exception("%s" % "VSITypeIDVersion", + "%s" % inst.VSITypeIDVersion, \ + "%s" % vsi_defaults['VSITypeIDVersion'],\ + "%s" % XFAIL) + + if inst.VSITypeID != vsi_defaults['VSITypeID']: + raise Exception("%s" % "VSITypeID", \ + "%s" % inst.VSITypeID, \ + "%s" % vsi_defaults['VSITypeID'], \ + "%s" % XFAIL) + + except Exception, (field, ret_val, exp_val, status): + logger.error("Mismatch in '%s' values", field) + logger.error("Got %s, Expected %s", ret_val, exp_val) + if status == "3": + return XFAIL_RC(bug_no) + return status + + return PASS + + at do_main(sup_types) +def main(): + options = main.options + server = options.ip + virt = options.virt + + status = FAIL + + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev < libvirt_cim_vsi_support: + logger.error("VSI support is available in rev >= %s", + libvirt_cim_vsi_support) + return SKIP + + + # Currently Libvirt throws error when passing Profile id, + # add it when supported + # 'ProfileID' : "vsi_profile" + # Also, Libvirt returns error when 'VSIType' is 802.1Qbh + # The tc can be modified to loop for the different VSIType, + # when supported. + vsi_defaults = { 'NetworkMode' : "vepa", + 'NetworkType' : "direct", + 'SourceDevice' : "eth1", + 'VSIType' : "802.1Qbg", + 'VSIManagerID' : "12", + 'VSITypeID' : "0x12345", + 'VSITypeIDVersion' : "1" + } + + nrasd_cn = get_typed_class(virt, 'NetResourceAllocationSettingData') + status = FAIL + + try: + rasd_list = get_rasd_list(server, virt, vsi_defaults, nrasd_cn) + if len(rasd_list) < 1: + raise Exception("Unable to get template RASDs for %s" % test_dom) + + cxml = get_class(virt)(test_dom) + cxml.set_res_settings(rasd_list) + ret = cxml.cim_define(server) + if not ret: + raise Exception("Unable to define guest %s" % test_dom) + + status = cxml.cim_start(server) + if status != PASS: + raise Exception("Unable to start %s" % test_dom) + + status, inst = get_net_inst(server, nrasd_cn, test_dom) + if status != PASS: + raise Exception("Failed to get net interface for %s" % test_dom) + + status = verify_net_rasd(server, virt, vsi_defaults, inst) + if status != PASS: + logger.error("Failed to verify net interface for %s", test_dom) + + except Exception, details: + logger.error(details) + status = FAIL + + cxml.cim_destroy(server) + cxml.undefine(server) + + 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic13308.gif Type: image/gif Size: 1255 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ecblank.gif Type: image/gif Size: 45 bytes Desc: not available URL: From jan.chang at hp.com Mon Jul 19 23:25:51 2010 From: jan.chang at hp.com (Chang, Jan) Date: Mon, 19 Jul 2010 23:25:51 +0000 Subject: [Libvirt-cim] seeing two instances from the CIM_VirtualSystemManagementCapabilities class... Message-ID: <44E3112BDE59DA4786B9500D3922A6CC59AD17D9A2@GVW0436EXB.americas.hpqcorp.net> Hi, Has anyone experienced the problem where the root/virt namespace and CIM_VirtualSystemManagementCapabilities class is queried, both the KVM and Xen instances are returned? Does anyone know how to resolve this issue? Thanks, Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: From snmishra at us.ibm.com Tue Jul 20 23:29:15 2010 From: snmishra at us.ibm.com (Sharad Mishra) Date: Tue, 20 Jul 2010 18:29:15 -0500 Subject: [Libvirt-cim] [PATCH] NetRASD enumeration to show VSI fields Message-ID: <74e5764714b5e172ce70.1279668555@bc1cn3.phx.austin.ibm.com> # HG changeset patch # User Sharad Mishra # Date 1279667490 18000 # Node ID 74e5764714b5e172ce703aee980544d7bc0d03b5 # Parent ad15531492da607d5aa44a4fa2c67f6ef41a6e1b NetRASD enumeration to show VSI fields. This fixes the bug where VSI fields were not populated for NetRASD. Signed-off-by: Sharad Mishra diff -r ad15531492da -r 74e5764714b5 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Jul 14 11:54:31 2010 -0400 +++ b/libxkutil/device_parsing.c Tue Jul 20 18:11:30 2010 -0500 @@ -77,7 +77,6 @@ free(dev->model); free(dev->device); free(dev->net_mode); - cleanup_vsi_device(&dev->vsi); } static void cleanup_emu_device(struct emu_device *dev) @@ -296,11 +295,55 @@ } } +static int parse_vsi_device(xmlNode *dnode, struct net_device *vdevs) +{ + struct vsi_device *vsi_dev = NULL; + xmlNode * child = NULL; + + vsi_dev = calloc(1, sizeof(*vsi_dev)); + if (vsi_dev == NULL) + goto err; + + vsi_dev->vsi_type = get_attr_value(dnode, "type"); + if (vsi_dev->vsi_type == NULL) + goto err; + + for (child = dnode->children; child != NULL; child = child->next) { + if (XSTREQ(child->name, "parameters")) { + vsi_dev->manager_id = get_attr_value(child, + "managerid"); + if (vsi_dev->manager_id == NULL) + goto err; + + vsi_dev->type_id = get_attr_value(child, "typeid"); + if (vsi_dev->type_id == NULL) + goto err; + + vsi_dev->type_id_version = + get_attr_value(child, "typeidversion"); + if (vsi_dev->type_id_version == NULL) + goto err; + + vsi_dev->instance_id = get_attr_value(child, + "instanceid"); + vsi_dev->profile_id = get_attr_value(child, + "profileid"); + } + } + + memcpy(&(vdevs->vsi), vsi_dev, sizeof(*vsi_dev)); + return 1; + +err: + cleanup_vsi_device(vsi_dev); + free(vsi_dev); + return 0; +} + static int parse_net_device(xmlNode *inode, struct virt_device **vdevs) { struct virt_device *vdev = NULL; struct net_device *ndev = NULL; - struct vsi_device *vsi_dev = NULL; xmlNode *child = NULL; vdev = calloc(1, sizeof(*vdev)); @@ -308,7 +351,6 @@ goto err; ndev = &(vdev->dev.net); - vsi_dev = &(ndev->vsi); ndev->type = get_attr_value(inode, "type"); if (ndev->type == NULL) @@ -340,24 +382,7 @@ if (ndev->model == NULL) goto err; } else if (XSTREQ(child->name, "virtualport")) { - vsi_dev->vsi_type = get_attr_value(child, "type"); - if (vsi_dev->vsi_type == NULL) - goto err; - } else if (XSTREQ(child->name, "parameters")) { - vsi_dev->manager_id = get_attr_value(child, "managerid"); - if (vsi_dev->manager_id == NULL) - goto err; - - vsi_dev->type_id = get_attr_value(child, "typeid"); - if (vsi_dev->type_id == NULL) - goto err; - - vsi_dev->type_id_version = get_attr_value(child, "typeidversion"); - if (vsi_dev->type_id_version == NULL) - goto err; - - vsi_dev->instance_id = get_attr_value(child, "instanceid"); - vsi_dev->profile_id = get_attr_value(child, "profileid"); + parse_vsi_device(child, ndev); } } From snmishra at us.ibm.com Tue Jul 20 23:32:43 2010 From: snmishra at us.ibm.com (Sharad Mishra) Date: Tue, 20 Jul 2010 16:32:43 -0700 Subject: [Libvirt-cim] seeing two instances from the CIM_VirtualSystemManagementCapabilities class... In-Reply-To: <44E3112BDE59DA4786B9500D3922A6CC59AD17D9A2@GVW0436EXB.americas.hpqcorp.net> References: <44E3112BDE59DA4786B9500D3922A6CC59AD17D9A2@GVW0436EXB.americas.hpqcorp.net> Message-ID: Jan, Can you email the command(s) you were running? Regards, Sharad Mishra Open Virtualization Linux Technology Center IBM "Chang, Jan" To Sent by: "'libvirt-cim at redhat.com'" libvirt-cim-bounc es at redhat.com cc "Schroeder, Mark" , "Chang, 07/19/2010 04:25 Jan" PM Subject [Libvirt-cim] seeing two instances from the Please respond to CIM_VirtualSystemManagementCapabili List for ties class... discussion and development of libvirt CIM Hi, Has anyone experienced the problem where the root/virt namespace and CIM_VirtualSystemManagementCapabilities class is queried, both the KVM and Xen instances are returned? Does anyone know how to resolve this issue? Thanks, Jan_______________________________________________ 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic01249.gif Type: image/gif Size: 1255 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ecblank.gif Type: image/gif Size: 45 bytes Desc: not available URL: From snmishra at us.ibm.com Fri Jul 23 00:00:55 2010 From: snmishra at us.ibm.com (Sharad Mishra) Date: Thu, 22 Jul 2010 17:00:55 -0700 Subject: [Libvirt-cim] [PATCH] Set default VM autostart value Message-ID: # HG changeset patch # User Sharad Mishra # Date 1279843221 25200 # Node ID d054bf0cab617f6ea47604d6bca11261961a1e73 # Parent 10160de3a1384c2c3dd9ac95d4aec3e3bece3050 Set default VM autostart value. This patch fixes the issue of no default showing up for VMs that were created without autostart flag. Signed-off-by: Sharad Mishra diff -r 10160de3a138 -r d054bf0cab61 libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Thu Jul 15 15:37:05 2010 -0700 +++ b/libxkutil/device_parsing.h Thu Jul 22 17:00:21 2010 -0700 @@ -135,6 +135,7 @@ char *name; char *typestr; /*xen, kvm, etc */ char *uuid; + int autostart; char *bootloader; char *bootloader_args; char *clock; diff -r 10160de3a138 -r d054bf0cab61 schema/ComputerSystem.mof --- a/schema/ComputerSystem.mof Thu Jul 15 15:37:05 2010 -0700 +++ b/schema/ComputerSystem.mof Thu Jul 22 17:00:21 2010 -0700 @@ -11,7 +11,7 @@ string UUID; [Description("Flag to set VM autostart.")] - boolean autoStart; + string autoStart; }; @@ -27,7 +27,7 @@ string UUID; [Description("Flag to set VM autostart.")] - boolean autoStart; + string autoStart; }; @@ -43,7 +43,7 @@ string UUID; [Description("Flag to set VM autostart.")] - boolean autoStart; + string autoStart; }; diff -r 10160de3a138 -r d054bf0cab61 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Thu Jul 15 15:37:05 2010 -0700 +++ b/src/Virt_ComputerSystem.c Thu Jul 22 17:00:21 2010 -0700 @@ -65,6 +65,33 @@ return 1; } +/* Set the "autoStart" property of an instance from a domain */ +static int set_autostart_from_dom(virDomainPtr dom, + CMPIInstance *instance, + struct domain *dominfo) +{ + int autoFlag = 0; + char autovalue[16]; + + if((virDomainGetAutostart(dom, &autoFlag)) == -1) { + CU_DEBUG("Could not read autostart value from xml"); + } else { + CU_DEBUG("Autostart for current domain is set to %d", + autoFlag); + dominfo->autostart = autoFlag; + } + + if(autoFlag) + strcpy(autovalue, "enable"); + else + strcpy(autovalue, "disable"); + + CMSetProperty(instance, "autoStart", + (CMPIValue *)autovalue, CMPI_chars); + + return 1; +} + /* Set the "UUID" property of an instance from a domain */ static int set_uuid_from_dom(virDomainPtr dom, CMPIInstance *instance, @@ -499,6 +526,15 @@ goto out; } + if (!set_autostart_from_dom(dom, instance, domain)) { + virt_set_status(broker, &s, + CMPI_RC_ERR_FAILED, + virDomainGetConnect(dom), + "Unable to get domain autostart flag"); + + goto out; + } + if (!set_uuid_from_dom(dom, instance, &uuid)) { virt_set_status(broker, &s, CMPI_RC_ERR_FAILED, diff -r 10160de3a138 -r d054bf0cab61 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Thu Jul 15 15:37:05 2010 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Thu Jul 22 17:00:21 2010 -0700 @@ -1356,7 +1356,8 @@ virDomainPtr dom; const char *name; CMPIInstance *inst = NULL; - bool autoStartFlag = false; + const char *autoStartFlag = NULL; + int autoflag; conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); if (conn == NULL) { @@ -1374,9 +1375,14 @@ goto out; } - if (cu_get_bool_prop(inst, "autoStart", &autoStartFlag) != CMPI_RC_OK) - autoStartFlag = false; - if(virDomainSetAutostart(dom, (autoStartFlag) ? 1 : 0) == -1) + if (cu_get_str_prop(inst, "autoStart", &autoStartFlag) != CMPI_RC_OK) + autoStartFlag = strdup("disable"); + + if (STREQ(autoStartFlag, "enable")) + autoflag = 1; + else + autoflag = 0; + if((virDomainSetAutostart(dom, autoflag)) == -1) CU_DEBUG("Failed to set autostart flag."); name = virDomainGetName(dom); From deeptik at linux.vnet.ibm.com Fri Jul 23 09:44:09 2010 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 23 Jul 2010 15:14:09 +0530 Subject: [Libvirt-cim] [PATCH] Set default VM autostart value In-Reply-To: References: Message-ID: <4C496469.5090605@linux.vnet.ibm.com> +1 for me. Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1279843221 25200 > # Node ID d054bf0cab617f6ea47604d6bca11261961a1e73 > # Parent 10160de3a1384c2c3dd9ac95d4aec3e3bece3050 > Set default VM autostart value. > > This patch fixes the issue of no default showing up for VMs that were created without autostart flag. > > Signed-off-by: Sharad Mishra > > diff -r 10160de3a138 -r d054bf0cab61 libxkutil/device_parsing.h > --- a/libxkutil/device_parsing.h Thu Jul 15 15:37:05 2010 -0700 > +++ b/libxkutil/device_parsing.h Thu Jul 22 17:00:21 2010 -0700 > @@ -135,6 +135,7 @@ > char *name; > char *typestr; /*xen, kvm, etc */ > char *uuid; > + int autostart; > char *bootloader; > char *bootloader_args; > char *clock; > diff -r 10160de3a138 -r d054bf0cab61 schema/ComputerSystem.mof > --- a/schema/ComputerSystem.mof Thu Jul 15 15:37:05 2010 -0700 > +++ b/schema/ComputerSystem.mof Thu Jul 22 17:00:21 2010 -0700 > @@ -11,7 +11,7 @@ > string UUID; > > [Description("Flag to set VM autostart.")] > - boolean autoStart; > + string autoStart; > > }; > > @@ -27,7 +27,7 @@ > string UUID; > > [Description("Flag to set VM autostart.")] > - boolean autoStart; > + string autoStart; > > }; > > @@ -43,7 +43,7 @@ > string UUID; > > [Description("Flag to set VM autostart.")] > - boolean autoStart; > + string autoStart; > > }; > > diff -r 10160de3a138 -r d054bf0cab61 src/Virt_ComputerSystem.c > --- a/src/Virt_ComputerSystem.c Thu Jul 15 15:37:05 2010 -0700 > +++ b/src/Virt_ComputerSystem.c Thu Jul 22 17:00:21 2010 -0700 > @@ -65,6 +65,33 @@ > return 1; > } > > +/* Set the "autoStart" property of an instance from a domain */ > +static int set_autostart_from_dom(virDomainPtr dom, > + CMPIInstance *instance, > + struct domain *dominfo) > +{ > + int autoFlag = 0; > + char autovalue[16]; > + > + if((virDomainGetAutostart(dom, &autoFlag)) == -1) { > + CU_DEBUG("Could not read autostart value from xml"); > + } else { > + CU_DEBUG("Autostart for current domain is set to %d", > + autoFlag); > + dominfo->autostart = autoFlag; > + } > + > + if(autoFlag) > + strcpy(autovalue, "enable"); > + else > + strcpy(autovalue, "disable"); > + > + CMSetProperty(instance, "autoStart", > + (CMPIValue *)autovalue, CMPI_chars); > + > + return 1; > +} > + > /* Set the "UUID" property of an instance from a domain */ > static int set_uuid_from_dom(virDomainPtr dom, > CMPIInstance *instance, > @@ -499,6 +526,15 @@ > goto out; > } > > + if (!set_autostart_from_dom(dom, instance, domain)) { > + virt_set_status(broker, &s, > + CMPI_RC_ERR_FAILED, > + virDomainGetConnect(dom), > + "Unable to get domain autostart flag"); > + > + goto out; > + } > + > if (!set_uuid_from_dom(dom, instance, &uuid)) { > virt_set_status(broker, &s, > CMPI_RC_ERR_FAILED, > diff -r 10160de3a138 -r d054bf0cab61 src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Thu Jul 15 15:37:05 2010 -0700 > +++ b/src/Virt_VirtualSystemManagementService.c Thu Jul 22 17:00:21 2010 -0700 > @@ -1356,7 +1356,8 @@ > virDomainPtr dom; > const char *name; > CMPIInstance *inst = NULL; > - bool autoStartFlag = false; > + const char *autoStartFlag = NULL; > + int autoflag; > > conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); > if (conn == NULL) { > @@ -1374,9 +1375,14 @@ > goto out; > } > > - if (cu_get_bool_prop(inst, "autoStart", &autoStartFlag) != CMPI_RC_OK) > - autoStartFlag = false; > - if(virDomainSetAutostart(dom, (autoStartFlag) ? 1 : 0) == -1) > + if (cu_get_str_prop(inst, "autoStart", &autoStartFlag) != CMPI_RC_OK) > + autoStartFlag = strdup("disable"); > + > + if (STREQ(autoStartFlag, "enable")) > + autoflag = 1; > + else > + autoflag = 0; > + if((virDomainSetAutostart(dom, autoflag)) == -1) > CU_DEBUG("Failed to set autostart flag."); > > name = virDomainGetName(dom); > > _______________________________________________ > 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 Jul 23 09:44:54 2010 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 23 Jul 2010 15:14:54 +0530 Subject: [Libvirt-cim] [PATCH] Add VM Autostart flag In-Reply-To: <487a2f2bbf148e8abbbe.1279128196@elm3b151.beaverton.ibm.com> References: <487a2f2bbf148e8abbbe.1279128196@elm3b151.beaverton.ibm.com> Message-ID: <4C496496.1080708@linux.vnet.ibm.com> +1 for me when applied with the "Set default VM autostart value" patch. Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1279127759 25200 > # Node ID 487a2f2bbf148e8abbbe332e6c6f2f7a44f8e2a4 > # Parent 62069e89413c139c3da8e0b23b83d20890eeec4f > Add VM Autostart flag. > > VMs can be set to autostart on host reboot. > > Signed-off-by: Sharad Mishra > > diff -r 62069e89413c -r 487a2f2bbf14 schema/ComputerSystem.mof > --- a/schema/ComputerSystem.mof Thu Jul 01 11:52:57 2010 -0400 > +++ b/schema/ComputerSystem.mof Wed Jul 14 10:15:59 2010 -0700 > @@ -10,6 +10,9 @@ > [Description("UUID assigned to this DomU.")] > string UUID; > > + [Description("Flag to set VM autostart.")] > + boolean autoStart; > + > }; > > [Description ( > @@ -23,6 +26,9 @@ > [Description("UUID assigned to this virtual machine.")] > string UUID; > > + [Description("Flag to set VM autostart.")] > + boolean autoStart; > + > }; > > [Description ( > @@ -36,5 +42,8 @@ > [Description("UUID assigned to this virtual machine.")] > string UUID; > > + [Description("Flag to set VM autostart.")] > + boolean autoStart; > + > }; > > diff -r 62069e89413c -r 487a2f2bbf14 src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Thu Jul 01 11:52:57 2010 -0400 > +++ b/src/Virt_VirtualSystemManagementService.c Wed Jul 14 10:15:59 2010 -0700 > @@ -1356,6 +1356,7 @@ > virDomainPtr dom; > const char *name; > CMPIInstance *inst = NULL; > + bool autoStartFlag = false; > > conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); > if (conn == NULL) { > @@ -1373,6 +1374,11 @@ > goto out; > } > > + if (cu_get_bool_prop(inst, "autoStart", &autoStartFlag) != CMPI_RC_OK) > + autoStartFlag = false; > + if(virDomainSetAutostart(dom, (autoStartFlag) ? 1 : 0) == -1) > + CU_DEBUG("Failed to set autostart flag."); > + > name = virDomainGetName(dom); > > *s = get_domain_by_name(_BROKER, ref, name, &inst); > > _______________________________________________ > 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 Jul 23 12:52:07 2010 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 23 Jul 2010 05:52:07 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the syntax error in vsms/27_definesystem_macvtap_dev.py Message-ID: <77a48790e995d59b8e18.1279889527@elm3b151.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1279889355 25200 # Node ID 77a48790e995d59b8e1824a84a12a5c5288750c4 # Parent f14d55353dd10846428b5b818e478eb6f8a0431e [TEST] Fixing the syntax error in vsms/27_definesystem_macvtap_dev.py Tested has been verified with KVM Libvirt-CIM Sources. Signed-off-by: Deepti B. Kalakeri diff -r f14d55353dd1 -r 77a48790e995 suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py Mon Mar 01 11:30:22 2010 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py Fri Jul 23 05:49:15 2010 -0700 @@ -98,7 +98,7 @@ return PASS - do_main(sup_types) + at do_main(sup_types) def main(): options = main.options From deeptik at linux.vnet.ibm.com Fri Jul 23 12:57:19 2010 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 23 Jul 2010 05:57:19 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing a typo in the vsms/08_CreateDiskResourcePool.py Message-ID: <4f2909dd0e2f9be6d3f3.1279889839@elm3b151.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1279889817 25200 # Node ID 4f2909dd0e2f9be6d3f32b0926d564d112ec2572 # Parent 77a48790e995d59b8e1824a84a12a5c5288750c4 [TEST] Fixing a typo in the vsms/08_CreateDiskResourcePool.py Tested has been verified with KVM Libvirt-CIM Sources. Signed-off-by: Deepti B. Kalakeri diff -r 77a48790e995 -r 4f2909dd0e2f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateDiskResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateDiskResourcePool.py Fri Jul 23 05:49:15 2010 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateDiskResourcePool.py Fri Jul 23 05:56:57 2010 -0700 @@ -62,7 +62,7 @@ libvirt_netfs_pool_support=869 def get_pool_attr(server, pool_type, dp_types, rev): - pool_attr = { "Path" : "/var/lib/libvirt/images/" } + pool_attr = { "Path" : "/var/lib/libvirt/images" } if rev >= libvirt_netfs_pool_support and \ pool_type == dp_types['DISK_POOL_NETFS']: From deeptik at linux.vnet.ibm.com Fri Jul 23 13:41:52 2010 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 23 Jul 2010 06:41:52 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding code to verify if a subnet used in the test case already exists Message-ID: <3976f0cbef2a1be8f657.1279892512@elm3b151.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1279892502 25200 # Node ID 3976f0cbef2a1be8f6572ede485552684747ae18 # Parent 4f2909dd0e2f9be6d3f32b0926d564d112ec2572 [TEST] Adding code to verify if a subnet used in the test case already exists The following tests failed because of the networkpool withe the same subnet existed on the machine. VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 18_define_sys_bridge.py: FAIL VirtualSystemManagementService - 19_definenetwork_ers.py: FAIL VirtualSystemManagementService - 22_addmulti_brg_interface.py: FAIL VirtualSystemManagementService - 23_verify_duplicate_mac_err.py: FAIL VirtualSystemManagementService - 27_definesystem_macvtap_dev.py: FAIL This fix will verify if the subnet already is used and gives appropriate message. Tested has been verified with KVM Libvirt-CIM Sources. Signed-off-by: Deepti B. Kalakeri diff -r 4f2909dd0e2f -r 3976f0cbef2a suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Jul 23 05:56:57 2010 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Jul 23 06:41:42 2010 -0700 @@ -237,7 +237,7 @@ self.add_sub_node(network, 'name', self.net_name) self.add_sub_node(network, 'uuid', set_uuid()) self.add_sub_node(network, 'forward') - subnet = '192.168.123.' + subnet = '192.168.%d.' % (random.randint(1, 100)) self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', forwardDelay='0') ip_base = random.randint(1, 100) @@ -249,6 +249,13 @@ awk '/ip address/ {print}' | \ cut -d ' ' -f 4 | sed 's/address=//'" % _net_name s, in_use_addr = utils.run_remote(server, cmd) + + sub_net_in_use = in_use_addr + sub_net_in_use = sub_net_in_use.rsplit('.', 1)[0].strip("'") + "." + if subnet == sub_net_in_use: + logger.error("Subnet address is in use by a different network") + return None + in_use_addr = in_use_addr.strip("'") if in_use_addr == addr: logger.error("IP address is in use by a different network") From snmishra at us.ibm.com Fri Jul 23 16:17:53 2010 From: snmishra at us.ibm.com (Sharad Mishra) Date: Fri, 23 Jul 2010 09:17:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the syntax error in vsms/27_definesystem_macvtap_dev.py In-Reply-To: <77a48790e995d59b8e18.1279889527@elm3b151.beaverton.ibm.com> References: <77a48790e995d59b8e18.1279889527@elm3b151.beaverton.ibm.com> Message-ID: +1 Sharad Mishra Open Virtualization Linux Technology Center IBM libvirt-cim-bounces at redhat.com wrote on 07/23/2010 05:52:07 AM: > "Deepti B. Kalakeri" > Sent by: libvirt-cim-bounces at redhat.com > > 07/23/2010 05:52 AM > > Please respond to > List for discussion and development of libvirt CIM > > To > > libvirt-cim at redhat.com > > cc > > Subject > > [Libvirt-cim] [PATCH] [TEST] Fixing the syntax error in vsms/ > 27_definesystem_macvtap_dev.py > > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1279889355 25200 > # Node ID 77a48790e995d59b8e1824a84a12a5c5288750c4 > # Parent f14d55353dd10846428b5b818e478eb6f8a0431e > [TEST] Fixing the syntax error in vsms/27_definesystem_macvtap_dev.py > > Tested has been verified with KVM Libvirt-CIM Sources. > Signed-off-by: Deepti B. Kalakeri > > diff -r f14d55353dd1 -r 77a48790e995 suites/libvirt-cim/cimtest/ > VirtualSystemManagementService/27_definesystem_macvtap_dev.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/ > 27_definesystem_macvtap_dev.py Mon Mar 01 11:30:22 2010 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/ > 27_definesystem_macvtap_dev.py Fri Jul 23 05:49:15 2010 -0700 > @@ -98,7 +98,7 @@ > > return PASS > > - do_main(sup_types) > + at do_main(sup_types) > def main(): > options = main.options > > > _______________________________________________ > 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 snmishra at us.ibm.com Fri Jul 23 18:02:53 2010 From: snmishra at us.ibm.com (Sharad Mishra) Date: Fri, 23 Jul 2010 11:02:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing a typo in the vsms/08_CreateDiskResourcePool.py In-Reply-To: <4f2909dd0e2f9be6d3f3.1279889839@elm3b151.beaverton.ibm.com> References: <4f2909dd0e2f9be6d3f3.1279889839@elm3b151.beaverton.ibm.com> Message-ID: +1 Sharad Mishra Open Virtualization Linux Technology Center IBM libvirt-cim-bounces at redhat.com wrote on 07/23/2010 05:57:19 AM: > "Deepti B. Kalakeri" > Sent by: libvirt-cim-bounces at redhat.com > > 07/23/2010 05:57 AM > > Please respond to > List for discussion and development of libvirt CIM > > To > > libvirt-cim at redhat.com > > cc > > Subject > > [Libvirt-cim] [PATCH] [TEST] Fixing a typo in the vsms/ > 08_CreateDiskResourcePool.py > > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1279889817 25200 > # Node ID 4f2909dd0e2f9be6d3f32b0926d564d112ec2572 > # Parent 77a48790e995d59b8e1824a84a12a5c5288750c4 > [TEST] Fixing a typo in the vsms/08_CreateDiskResourcePool.py > > Tested has been verified with KVM Libvirt-CIM Sources. > Signed-off-by: Deepti B. Kalakeri > > diff -r 77a48790e995 -r 4f2909dd0e2f suites/libvirt-cim/cimtest/ > ResourcePoolConfigurationService/08_CreateDiskResourcePool.py > --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/ > 08_CreateDiskResourcePool.py Fri Jul 23 05:49:15 2010 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/ > 08_CreateDiskResourcePool.py Fri Jul 23 05:56:57 2010 -0700 > @@ -62,7 +62,7 @@ > libvirt_netfs_pool_support=869 > > def get_pool_attr(server, pool_type, dp_types, rev): > - pool_attr = { "Path" : "/var/lib/libvirt/images/" } > + pool_attr = { "Path" : "/var/lib/libvirt/images" } > > if rev >= libvirt_netfs_pool_support and \ > pool_type == dp_types['DISK_POOL_NETFS']: > > _______________________________________________ > 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 snmishra at us.ibm.com Fri Jul 23 18:34:28 2010 From: snmishra at us.ibm.com (Sharad Mishra) Date: Fri, 23 Jul 2010 11:34:28 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding code to verify if a subnet used in the test case already exists In-Reply-To: <3976f0cbef2a1be8f657.1279892512@elm3b151.beaverton.ibm.com> References: <3976f0cbef2a1be8f657.1279892512@elm3b151.beaverton.ibm.com> Message-ID: +1 Code looks good, ran a minimal test. Haven't tested it thoroughly. Sharad Mishra Open Virtualization Linux Technology Center IBM "Deepti B. Kalakeri" libvirt-cim at redhat.com Sent by: cc libvirt-cim-bounc es at redhat.com Subject [Libvirt-cim] [PATCH] [TEST] Adding code to verify if a subnet used 07/23/2010 06:41 in the test case already exists AM Please respond to List for discussion and development of libvirt CIM # HG changeset patch # User Deepti B. Kalakeri # Date 1279892502 25200 # Node ID 3976f0cbef2a1be8f6572ede485552684747ae18 # Parent 4f2909dd0e2f9be6d3f32b0926d564d112ec2572 [TEST] Adding code to verify if a subnet used in the test case already exists The following tests failed because of the networkpool withe the same subnet existed on the machine. VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 18_define_sys_bridge.py: FAIL VirtualSystemManagementService - 19_definenetwork_ers.py: FAIL VirtualSystemManagementService - 22_addmulti_brg_interface.py: FAIL VirtualSystemManagementService - 23_verify_duplicate_mac_err.py: FAIL VirtualSystemManagementService - 27_definesystem_macvtap_dev.py: FAIL This fix will verify if the subnet already is used and gives appropriate message. Tested has been verified with KVM Libvirt-CIM Sources. Signed-off-by: Deepti B. Kalakeri diff -r 4f2909dd0e2f -r 3976f0cbef2a suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Jul 23 05:56:57 2010 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Jul 23 06:41:42 2010 -0700 @@ -237,7 +237,7 @@ self.add_sub_node(network, 'name', self.net_name) self.add_sub_node(network, 'uuid', set_uuid()) self.add_sub_node(network, 'forward') - subnet = '192.168.123.' + subnet = '192.168.%d.' % (random.randint(1, 100)) self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', forwardDelay='0') ip_base = random.randint(1, 100) @@ -249,6 +249,13 @@ awk '/ip address/ {print}' | \ cut -d ' ' -f 4 | sed 's/address=//'" % _net_name s, in_use_addr = utils.run_remote(server, cmd) + + sub_net_in_use = in_use_addr + sub_net_in_use = sub_net_in_use.rsplit('.', 1)[0].strip("'") + "." + if subnet == sub_net_in_use: + logger.error("Subnet address is in use by a different network") + return None + in_use_addr = in_use_addr.strip("'") if in_use_addr == addr: logger.error("IP address is in use by a different network") _______________________________________________ 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic16442.gif Type: image/gif Size: 1255 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ecblank.gif Type: image/gif Size: 45 bytes Desc: not available URL: From cvincent at linux.vnet.ibm.com Thu Jul 29 15:01:30 2010 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Thu, 29 Jul 2010 11:01:30 -0400 Subject: [Libvirt-cim] [PATCH] Add VM Autostart flag In-Reply-To: <487a2f2bbf148e8abbbe.1279128196@elm3b151.beaverton.ibm.com> References: <487a2f2bbf148e8abbbe.1279128196@elm3b151.beaverton.ibm.com> Message-ID: <4C5197CA.8050801@linux.vnet.ibm.com> +1 Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1279127759 25200 > # Node ID 487a2f2bbf148e8abbbe332e6c6f2f7a44f8e2a4 > # Parent 62069e89413c139c3da8e0b23b83d20890eeec4f > Add VM Autostart flag. > > VMs can be set to autostart on host reboot. > > Signed-off-by: Sharad Mishra > > diff -r 62069e89413c -r 487a2f2bbf14 schema/ComputerSystem.mof > --- a/schema/ComputerSystem.mof Thu Jul 01 11:52:57 2010 -0400 > +++ b/schema/ComputerSystem.mof Wed Jul 14 10:15:59 2010 -0700 > @@ -10,6 +10,9 @@ > [Description("UUID assigned to this DomU.")] > string UUID; > > + [Description("Flag to set VM autostart.")] > + boolean autoStart; > + > }; > > [Description ( > @@ -23,6 +26,9 @@ > [Description("UUID assigned to this virtual machine.")] > string UUID; > > + [Description("Flag to set VM autostart.")] > + boolean autoStart; > + > }; > > [Description ( > @@ -36,5 +42,8 @@ > [Description("UUID assigned to this virtual machine.")] > string UUID; > > + [Description("Flag to set VM autostart.")] > + boolean autoStart; > + > }; > > diff -r 62069e89413c -r 487a2f2bbf14 src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Thu Jul 01 11:52:57 2010 -0400 > +++ b/src/Virt_VirtualSystemManagementService.c Wed Jul 14 10:15:59 2010 -0700 > @@ -1356,6 +1356,7 @@ > virDomainPtr dom; > const char *name; > CMPIInstance *inst = NULL; > + bool autoStartFlag = false; > > conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); > if (conn == NULL) { > @@ -1373,6 +1374,11 @@ > goto out; > } > > + if (cu_get_bool_prop(inst, "autoStart", &autoStartFlag) != CMPI_RC_OK) > + autoStartFlag = false; > + if(virDomainSetAutostart(dom, (autoStartFlag) ? 1 : 0) == -1) > + CU_DEBUG("Failed to set autostart flag."); > + > name = virDomainGetName(dom); > > *s = get_domain_by_name(_BROKER, ref, name, &inst); > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Chip Vincent Open Virtualization, Linux Technology Center IBM Systems & Technology Group phone: 919-254-4482, T/L 444-4482 email: cvincent at us.ibm.com From cvincent at linux.vnet.ibm.com Thu Jul 29 15:03:22 2010 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Thu, 29 Jul 2010 11:03:22 -0400 Subject: [Libvirt-cim] [PATCH] Set default VM autostart value In-Reply-To: References: Message-ID: <4C51983A.3040000@linux.vnet.ibm.com> +1 Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1279843221 25200 > # Node ID d054bf0cab617f6ea47604d6bca11261961a1e73 > # Parent 10160de3a1384c2c3dd9ac95d4aec3e3bece3050 > Set default VM autostart value. > > This patch fixes the issue of no default showing up for VMs that were created without autostart flag. > > Signed-off-by: Sharad Mishra > > diff -r 10160de3a138 -r d054bf0cab61 libxkutil/device_parsing.h > --- a/libxkutil/device_parsing.h Thu Jul 15 15:37:05 2010 -0700 > +++ b/libxkutil/device_parsing.h Thu Jul 22 17:00:21 2010 -0700 > @@ -135,6 +135,7 @@ > char *name; > char *typestr; /*xen, kvm, etc */ > char *uuid; > + int autostart; > char *bootloader; > char *bootloader_args; > char *clock; > diff -r 10160de3a138 -r d054bf0cab61 schema/ComputerSystem.mof > --- a/schema/ComputerSystem.mof Thu Jul 15 15:37:05 2010 -0700 > +++ b/schema/ComputerSystem.mof Thu Jul 22 17:00:21 2010 -0700 > @@ -11,7 +11,7 @@ > string UUID; > > [Description("Flag to set VM autostart.")] > - boolean autoStart; > + string autoStart; > > }; > > @@ -27,7 +27,7 @@ > string UUID; > > [Description("Flag to set VM autostart.")] > - boolean autoStart; > + string autoStart; > > }; > > @@ -43,7 +43,7 @@ > string UUID; > > [Description("Flag to set VM autostart.")] > - boolean autoStart; > + string autoStart; > > }; > > diff -r 10160de3a138 -r d054bf0cab61 src/Virt_ComputerSystem.c > --- a/src/Virt_ComputerSystem.c Thu Jul 15 15:37:05 2010 -0700 > +++ b/src/Virt_ComputerSystem.c Thu Jul 22 17:00:21 2010 -0700 > @@ -65,6 +65,33 @@ > return 1; > } > > +/* Set the "autoStart" property of an instance from a domain */ > +static int set_autostart_from_dom(virDomainPtr dom, > + CMPIInstance *instance, > + struct domain *dominfo) > +{ > + int autoFlag = 0; > + char autovalue[16]; > + > + if((virDomainGetAutostart(dom, &autoFlag)) == -1) { > + CU_DEBUG("Could not read autostart value from xml"); > + } else { > + CU_DEBUG("Autostart for current domain is set to %d", > + autoFlag); > + dominfo->autostart = autoFlag; > + } > + > + if(autoFlag) > + strcpy(autovalue, "enable"); > + else > + strcpy(autovalue, "disable"); > + > + CMSetProperty(instance, "autoStart", > + (CMPIValue *)autovalue, CMPI_chars); > + > + return 1; > +} > + > /* Set the "UUID" property of an instance from a domain */ > static int set_uuid_from_dom(virDomainPtr dom, > CMPIInstance *instance, > @@ -499,6 +526,15 @@ > goto out; > } > > + if (!set_autostart_from_dom(dom, instance, domain)) { > + virt_set_status(broker, &s, > + CMPI_RC_ERR_FAILED, > + virDomainGetConnect(dom), > + "Unable to get domain autostart flag"); > + > + goto out; > + } > + > if (!set_uuid_from_dom(dom, instance, &uuid)) { > virt_set_status(broker, &s, > CMPI_RC_ERR_FAILED, > diff -r 10160de3a138 -r d054bf0cab61 src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Thu Jul 15 15:37:05 2010 -0700 > +++ b/src/Virt_VirtualSystemManagementService.c Thu Jul 22 17:00:21 2010 -0700 > @@ -1356,7 +1356,8 @@ > virDomainPtr dom; > const char *name; > CMPIInstance *inst = NULL; > - bool autoStartFlag = false; > + const char *autoStartFlag = NULL; > + int autoflag; > > conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); > if (conn == NULL) { > @@ -1374,9 +1375,14 @@ > goto out; > } > > - if (cu_get_bool_prop(inst, "autoStart", &autoStartFlag) != CMPI_RC_OK) > - autoStartFlag = false; > - if(virDomainSetAutostart(dom, (autoStartFlag) ? 1 : 0) == -1) > + if (cu_get_str_prop(inst, "autoStart", &autoStartFlag) != CMPI_RC_OK) > + autoStartFlag = strdup("disable"); > + > + if (STREQ(autoStartFlag, "enable")) > + autoflag = 1; > + else > + autoflag = 0; > + if((virDomainSetAutostart(dom, autoflag)) == -1) > CU_DEBUG("Failed to set autostart flag."); > > name = virDomainGetName(dom); > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Chip Vincent Open Virtualization, Linux Technology Center IBM Systems & Technology Group phone: 919-254-4482, T/L 444-4482 email: cvincent at us.ibm.com From cvincent at linux.vnet.ibm.com Thu Jul 29 15:07:22 2010 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Thu, 29 Jul 2010 11:07:22 -0400 Subject: [Libvirt-cim] [PATCH] NetRASD enumeration to show VSI fields In-Reply-To: <74e5764714b5e172ce70.1279668555@bc1cn3.phx.austin.ibm.com> References: <74e5764714b5e172ce70.1279668555@bc1cn3.phx.austin.ibm.com> Message-ID: <4C51992A.8090107@linux.vnet.ibm.com> +1 Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1279667490 18000 > # Node ID 74e5764714b5e172ce703aee980544d7bc0d03b5 > # Parent ad15531492da607d5aa44a4fa2c67f6ef41a6e1b > NetRASD enumeration to show VSI fields. > > This fixes the bug where VSI fields were not populated for NetRASD. > > Signed-off-by: Sharad Mishra > > diff -r ad15531492da -r 74e5764714b5 libxkutil/device_parsing.c > --- a/libxkutil/device_parsing.c Wed Jul 14 11:54:31 2010 -0400 > +++ b/libxkutil/device_parsing.c Tue Jul 20 18:11:30 2010 -0500 > @@ -77,7 +77,6 @@ > free(dev->model); > free(dev->device); > free(dev->net_mode); > - cleanup_vsi_device(&dev->vsi); > } > > static void cleanup_emu_device(struct emu_device *dev) > @@ -296,11 +295,55 @@ > } > } > > +static int parse_vsi_device(xmlNode *dnode, struct net_device *vdevs) > +{ > + struct vsi_device *vsi_dev = NULL; > + xmlNode * child = NULL; > + > + vsi_dev = calloc(1, sizeof(*vsi_dev)); > + if (vsi_dev == NULL) > + goto err; > + > + vsi_dev->vsi_type = get_attr_value(dnode, "type"); > + if (vsi_dev->vsi_type == NULL) > + goto err; > + > + for (child = dnode->children; child != NULL; child = child->next) { > + if (XSTREQ(child->name, "parameters")) { > + vsi_dev->manager_id = get_attr_value(child, > + "managerid"); > + if (vsi_dev->manager_id == NULL) > + goto err; > + > + vsi_dev->type_id = get_attr_value(child, "typeid"); > + if (vsi_dev->type_id == NULL) > + goto err; > + > + vsi_dev->type_id_version = > + get_attr_value(child, "typeidversion"); > + if (vsi_dev->type_id_version == NULL) > + goto err; > + > + vsi_dev->instance_id = get_attr_value(child, > + "instanceid"); > + vsi_dev->profile_id = get_attr_value(child, > + "profileid"); > + } > + } > + > + memcpy(&(vdevs->vsi), vsi_dev, sizeof(*vsi_dev)); > + return 1; > + > +err: > + cleanup_vsi_device(vsi_dev); > + free(vsi_dev); > + return 0; > +} > + > static int parse_net_device(xmlNode *inode, struct virt_device **vdevs) > { > struct virt_device *vdev = NULL; > struct net_device *ndev = NULL; > - struct vsi_device *vsi_dev = NULL; > xmlNode *child = NULL; > > vdev = calloc(1, sizeof(*vdev)); > @@ -308,7 +351,6 @@ > goto err; > > ndev = &(vdev->dev.net); > - vsi_dev = &(ndev->vsi); > > ndev->type = get_attr_value(inode, "type"); > if (ndev->type == NULL) > @@ -340,24 +382,7 @@ > if (ndev->model == NULL) > goto err; > } else if (XSTREQ(child->name, "virtualport")) { > - vsi_dev->vsi_type = get_attr_value(child, "type"); > - if (vsi_dev->vsi_type == NULL) > - goto err; > - } else if (XSTREQ(child->name, "parameters")) { > - vsi_dev->manager_id = get_attr_value(child, "managerid"); > - if (vsi_dev->manager_id == NULL) > - goto err; > - > - vsi_dev->type_id = get_attr_value(child, "typeid"); > - if (vsi_dev->type_id == NULL) > - goto err; > - > - vsi_dev->type_id_version = get_attr_value(child, "typeidversion"); > - if (vsi_dev->type_id_version == NULL) > - goto err; > - > - vsi_dev->instance_id = get_attr_value(child, "instanceid"); > - vsi_dev->profile_id = get_attr_value(child, "profileid"); > + parse_vsi_device(child, ndev); > } > } > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Chip Vincent Open Virtualization, Linux Technology Center IBM Systems & Technology Group phone: 919-254-4482, T/L 444-4482 email: cvincent at us.ibm.com From cvincent at linux.vnet.ibm.com Thu Jul 29 15:21:03 2010 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Thu, 29 Jul 2010 11:21:03 -0400 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to verify the VSI Libvirt-CIM feature In-Reply-To: References: Message-ID: <4C519C5F.6030806@linux.vnet.ibm.com> +1 Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1279271077 25200 > # Node ID ae6e83c18a8490fc0c583f7d0b8568ae4b8d1efc > # Parent f14d55353dd10846428b5b818e478eb6f8a0431e > [TEST] Adding new tc to verify the VSI Libvirt-CIM feature. > > Tested with KVM on RHEL with latest sources. > The test now checks with the 'VSIType' --> "802.1Qbg", we can improve the test case > to verify with 'VSIType' --> "802.1Qbh" > > > Signed-off-by: Deepti B. Kalakeri > > diff -r f14d55353dd1 -r ae6e83c18a84 suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py Fri Jul 16 02:04:37 2010 -0700 > @@ -0,0 +1,213 @@ > +#!/usr/bin/python > +# > +# Copyright 2010 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 > +# > +# Purpose: > +# Verify provider's VSI support. > +# > +# Steps: > +# 1) Build RASD parameters, making sure to specify macvtap mode for network > +# interface and vsi values. > +# 2) Create guest > +# 3) Verify guest is defined properly and the vsi values assgined to the guest > +# are reflected in the NetRASD. > +# > +# Date: 16-07-2010 > +# > + > +import sys > +from CimTest.Globals import logger > +from CimTest.ReturnCodes import FAIL, PASS, SKIP, XFAIL_RC, XFAIL > +from XenKvmLib.classes import get_typed_class, inst_to_mof > +from XenKvmLib.rasd import get_default_rasds > +from XenKvmLib.const import do_main, get_provider_version > +from XenKvmLib.vxml import get_class > +from XenKvmLib.common_util import parse_instance_id > +from XenKvmLib.enumclass import EnumInstances > + > +sup_types = ['Xen', 'XenFV', 'KVM'] > +test_dom = 'vsi_guest' > +bug_no = "00016" > + > +libvirt_cim_vsi_support = 1042 > + > +def get_rasd_list(ip, virt, vsi_defaults, nrasd_cn): > + rasds = get_default_rasds(ip, virt) > + rasd_list = {} > + > + for rasd in rasds: > + if rasd.classname == nrasd_cn and "Default" in rasd['InstanceID']: > + > + rasd['NetworkMode'] = vsi_defaults['NetworkMode'] > + rasd['NetworkType'] = vsi_defaults['NetworkType'] > + rasd['SourceDevice'] = vsi_defaults['SourceDevice'] > + rasd['VSIType'] = vsi_defaults['VSIType'] > + rasd['VSIManagerID'] = vsi_defaults['VSIManagerID'] > + rasd['VSITypeID'] = vsi_defaults['VSITypeID'] > + rasd['VSITypeIDVersion'] = vsi_defaults['VSITypeIDVersion'] > + # Currently Libvirt throws error when passing Profile id, > + # add it when supported > + # rasd['ProfileID'] = vsi_defaults['ProfileID'] > + rasd_list[rasd.classname] = inst_to_mof(rasd) > + break > + > + return rasd_list > + > +def get_net_inst(ip, nrasd_cn, guest_name): > + inst = None > + enum_list = EnumInstances(ip, nrasd_cn) > + > + if enum_list < 1: > + logger.error("No %s instances returned", nrasd_cn) > + return FAIL, inst > + > + for rasd in enum_list: > + guest, dev, status = parse_instance_id(rasd.InstanceID) > + if status != PASS: > + logger.error("Unable to parse InstanceID: %s", rasd.InstanceID) > + return FAIL, inst > + > + if guest == guest_name: > + inst = rasd > + break > + > + if inst is None: > + logger.error("%s instance for %s not found", nrasd_cn, guest_name) > + return FAIL, inst > + else: > + return PASS, inst > + > + > +def verify_net_rasd(ip, virt, vsi_defaults, inst): > + try: > + if inst.NetworkMode != vsi_defaults['NetworkMode']: > + raise Exception("%s" % "NetworkMode", \ > + "%s" % inst.NetworkMode, \ > + "%s" % vsi_defaults['NetworkMode'],\ > + "%s" % FAIL) > + > + if inst.SourceDevice != vsi_defaults['SourceDevice']: > + raise Exception("%s" % "SourceDevice", \ > + "%s" % inst.SourceDevice, "%s" \ > + % vsi_defaults['SourceDevice'],\ > + "%s" % FAIL) > + > + if inst.VSIType != vsi_defaults['VSIType']: > + raise Exception("%s" % "VSIType", \ > + "%s" % inst.VSIType, "%s" \ > + % vsi_defaults['VSIType'], \ > + "%s" % FAIL) > + > + # Once the bug is fixed change the status value from XFAIL to FAIL > + if inst.VSIInstanceID == None: > + raise Exception("%s" % "VSIInstanceID", \ > + "%s" % inst.VSIInstanceID, \ > + "%s" % "a value",\ > + "%s" % XFAIL) > + > + if inst.VSITypeIDVersion != vsi_defaults['VSITypeIDVersion']: > + raise Exception("%s" % "VSITypeIDVersion", > + "%s" % inst.VSITypeIDVersion, \ > + "%s" % vsi_defaults['VSITypeIDVersion'],\ > + "%s" % XFAIL) > + > + if inst.VSITypeID != vsi_defaults['VSITypeID']: > + raise Exception("%s" % "VSITypeID", \ > + "%s" % inst.VSITypeID, \ > + "%s" % vsi_defaults['VSITypeID'], \ > + "%s" % XFAIL) > + > + except Exception, (field, ret_val, exp_val, status): > + logger.error("Mismatch in '%s' values", field) > + logger.error("Got %s, Expected %s", ret_val, exp_val) > + if status == "3": > + return XFAIL_RC(bug_no) > + return status > + > + return PASS > + > + at do_main(sup_types) > +def main(): > + options = main.options > + server = options.ip > + virt = options.virt > + > + status = FAIL > + > + curr_cim_rev, changeset = get_provider_version(virt, server) > + if curr_cim_rev < libvirt_cim_vsi_support: > + logger.error("VSI support is available in rev >= %s", > + libvirt_cim_vsi_support) > + return SKIP > + > + > + # Currently Libvirt throws error when passing Profile id, > + # add it when supported > + # 'ProfileID' : "vsi_profile" > + # Also, Libvirt returns error when 'VSIType' is 802.1Qbh > + # The tc can be modified to loop for the different VSIType, > + # when supported. > + vsi_defaults = { 'NetworkMode' : "vepa", > + 'NetworkType' : "direct", > + 'SourceDevice' : "eth1", > + 'VSIType' : "802.1Qbg", > + 'VSIManagerID' : "12", > + 'VSITypeID' : "0x12345", > + 'VSITypeIDVersion' : "1" > + } > + > + nrasd_cn = get_typed_class(virt, 'NetResourceAllocationSettingData') > + status = FAIL > + > + try: > + rasd_list = get_rasd_list(server, virt, vsi_defaults, nrasd_cn) > + if len(rasd_list) < 1: > + raise Exception("Unable to get template RASDs for %s" % test_dom) > + > + cxml = get_class(virt)(test_dom) > + cxml.set_res_settings(rasd_list) > + ret = cxml.cim_define(server) > + if not ret: > + raise Exception("Unable to define guest %s" % test_dom) > + > + status = cxml.cim_start(server) > + if status != PASS: > + raise Exception("Unable to start %s" % test_dom) > + > + status, inst = get_net_inst(server, nrasd_cn, test_dom) > + if status != PASS: > + raise Exception("Failed to get net interface for %s" % test_dom) > + > + status = verify_net_rasd(server, virt, vsi_defaults, inst) > + if status != PASS: > + logger.error("Failed to verify net interface for %s", test_dom) > + > + except Exception, details: > + logger.error(details) > + status = FAIL > + > + cxml.cim_destroy(server) > + cxml.undefine(server) > + > + 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 > -- Chip Vincent Open Virtualization, Linux Technology Center IBM Systems & Technology Group phone: 919-254-4482, T/L 444-4482 email: cvincent at us.ibm.com From cvincent at linux.vnet.ibm.com Thu Jul 29 15:22:55 2010 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Thu, 29 Jul 2010 11:22:55 -0400 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the syntax error in vsms/27_definesystem_macvtap_dev.py In-Reply-To: <77a48790e995d59b8e18.1279889527@elm3b151.beaverton.ibm.com> References: <77a48790e995d59b8e18.1279889527@elm3b151.beaverton.ibm.com> Message-ID: <4C519CCF.3080001@linux.vnet.ibm.com> +1 Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1279889355 25200 > # Node ID 77a48790e995d59b8e1824a84a12a5c5288750c4 > # Parent f14d55353dd10846428b5b818e478eb6f8a0431e > [TEST] Fixing the syntax error in vsms/27_definesystem_macvtap_dev.py > > Tested has been verified with KVM Libvirt-CIM Sources. > Signed-off-by: Deepti B. Kalakeri > > diff -r f14d55353dd1 -r 77a48790e995 suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py Mon Mar 01 11:30:22 2010 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/27_definesystem_macvtap_dev.py Fri Jul 23 05:49:15 2010 -0700 > @@ -98,7 +98,7 @@ > > return PASS > > - do_main(sup_types) > + at do_main(sup_types) > def main(): > options = main.options > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Chip Vincent Open Virtualization, Linux Technology Center IBM Systems & Technology Group phone: 919-254-4482, T/L 444-4482 email: cvincent at us.ibm.com From cvincent at linux.vnet.ibm.com Thu Jul 29 15:23:09 2010 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Thu, 29 Jul 2010 11:23:09 -0400 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing a typo in the vsms/08_CreateDiskResourcePool.py In-Reply-To: <4f2909dd0e2f9be6d3f3.1279889839@elm3b151.beaverton.ibm.com> References: <4f2909dd0e2f9be6d3f3.1279889839@elm3b151.beaverton.ibm.com> Message-ID: <4C519CDD.7040304@linux.vnet.ibm.com> +1 Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1279889817 25200 > # Node ID 4f2909dd0e2f9be6d3f32b0926d564d112ec2572 > # Parent 77a48790e995d59b8e1824a84a12a5c5288750c4 > [TEST] Fixing a typo in the vsms/08_CreateDiskResourcePool.py > > Tested has been verified with KVM Libvirt-CIM Sources. > Signed-off-by: Deepti B. Kalakeri > > diff -r 77a48790e995 -r 4f2909dd0e2f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateDiskResourcePool.py > --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateDiskResourcePool.py Fri Jul 23 05:49:15 2010 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/08_CreateDiskResourcePool.py Fri Jul 23 05:56:57 2010 -0700 > @@ -62,7 +62,7 @@ > libvirt_netfs_pool_support=869 > > def get_pool_attr(server, pool_type, dp_types, rev): > - pool_attr = { "Path" : "/var/lib/libvirt/images/" } > + pool_attr = { "Path" : "/var/lib/libvirt/images" } > > if rev >= libvirt_netfs_pool_support and \ > pool_type == dp_types['DISK_POOL_NETFS']: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Chip Vincent Open Virtualization, Linux Technology Center IBM Systems & Technology Group phone: 919-254-4482, T/L 444-4482 email: cvincent at us.ibm.com